@pisell/private-materials 6.5.26 → 6.5.28

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 (907) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +146 -165
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +24 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +24 -9
  11. package/es/components/Sales/Event/Detail.js +4 -3
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
  14. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
  15. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  16. package/es/components/appointmentBooking/components/Services/index.js +22 -8
  17. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  18. package/es/components/appointmentBooking/hooks.js +35 -30
  19. package/es/components/appointmentBooking/locales.d.ts +3 -0
  20. package/es/components/appointmentBooking/locales.js +9 -6
  21. package/es/components/authentication/admin/AuthMethods/AuthMethods.less +136 -0
  22. package/es/components/authentication/admin/AuthMethods/SettingList.d.ts +5 -0
  23. package/es/components/authentication/admin/AuthMethods/SettingList.js +62 -0
  24. package/es/components/authentication/admin/AuthMethods/SettingList.less +85 -0
  25. package/es/components/authentication/admin/AuthMethods/SettingsDrawer.d.ts +22 -0
  26. package/es/components/authentication/admin/AuthMethods/SettingsDrawer.js +121 -0
  27. package/es/components/authentication/admin/AuthMethods/SettingsDrawer.less +163 -0
  28. package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
  29. package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.js +15 -0
  30. package/es/components/authentication/admin/AuthMethods/components/EmailSettingsContent.d.ts +13 -0
  31. package/es/components/authentication/admin/AuthMethods/components/EmailSettingsContent.js +152 -0
  32. package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
  33. package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.js +114 -0
  34. package/es/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.d.ts +14 -0
  35. package/es/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.js +170 -0
  36. package/es/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.d.ts +13 -0
  37. package/es/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.js +116 -0
  38. package/es/components/authentication/admin/AuthMethods/components/index.d.ts +10 -0
  39. package/es/components/authentication/admin/AuthMethods/components/index.js +5 -0
  40. package/es/components/authentication/admin/AuthMethods/constants.d.ts +22 -0
  41. package/es/components/authentication/admin/AuthMethods/constants.js +121 -0
  42. package/es/components/authentication/admin/AuthMethods/index.d.ts +8 -0
  43. package/es/components/authentication/admin/AuthMethods/index.js +233 -0
  44. package/es/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
  45. package/es/components/authentication/admin/AuthMethods/locales.js +290 -0
  46. package/es/components/authentication/admin/AuthMethods/types.d.ts +76 -0
  47. package/es/components/authentication/admin/AuthMethods/types.js +23 -0
  48. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/AuthenticationMethods.less +231 -0
  49. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.d.ts +6 -0
  50. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +447 -0
  51. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
  52. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +107 -0
  53. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
  54. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.js +1 -0
  55. package/es/components/authentication/admin/ChannelAuthSetting/ChannelAuthSetting.less +111 -0
  56. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/CollectInfo.less +259 -0
  57. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.d.ts +6 -0
  58. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +530 -0
  59. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
  60. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +86 -0
  61. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
  62. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.js +1 -0
  63. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.d.ts +6 -0
  64. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +460 -0
  65. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.less +111 -0
  66. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/PageSetting.less +105 -0
  67. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/index.d.ts +8 -0
  68. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/index.js +185 -0
  69. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
  70. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +32 -0
  71. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
  72. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.js +1 -0
  73. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/PageSettingItem.less +272 -0
  74. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.d.ts +8 -0
  75. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +214 -0
  76. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
  77. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +71 -0
  78. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
  79. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.js +1 -0
  80. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
  81. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +287 -0
  82. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.less +111 -0
  83. package/es/components/authentication/admin/ChannelAuthSetting/index.d.ts +6 -0
  84. package/es/components/authentication/admin/ChannelAuthSetting/index.js +228 -0
  85. package/es/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
  86. package/es/components/authentication/admin/ChannelAuthSetting/locales.js +50 -0
  87. package/es/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
  88. package/es/components/authentication/admin/ChannelAuthSetting/types.js +1 -0
  89. package/es/components/authentication/admin/CustomerAuth/CustomerAuth.less +104 -0
  90. package/es/components/authentication/admin/CustomerAuth/index.d.ts +6 -0
  91. package/es/components/authentication/admin/CustomerAuth/index.js +711 -0
  92. package/es/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
  93. package/es/components/authentication/admin/CustomerAuth/locales.js +86 -0
  94. package/es/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
  95. package/es/components/authentication/admin/CustomerAuth/types.js +1 -0
  96. package/es/components/authentication/admin/CustomerOAuthConfig/CustomerOAuthConfig.less +164 -0
  97. package/es/components/authentication/admin/CustomerOAuthConfig/index.d.ts +6 -0
  98. package/es/components/authentication/admin/CustomerOAuthConfig/index.js +545 -0
  99. package/es/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
  100. package/es/components/authentication/admin/CustomerOAuthConfig/locales.js +137 -0
  101. package/es/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
  102. package/es/components/authentication/admin/CustomerOAuthConfig/types.js +1 -0
  103. package/es/components/authentication/admin/DeviceAuth/DeviceAuth.less +104 -0
  104. package/es/components/authentication/admin/DeviceAuth/index.d.ts +6 -0
  105. package/es/components/authentication/admin/DeviceAuth/index.js +366 -0
  106. package/es/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
  107. package/es/components/authentication/admin/DeviceAuth/locales.js +74 -0
  108. package/es/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
  109. package/es/components/authentication/admin/DeviceAuth/types.js +1 -0
  110. package/es/components/authentication/admin/OAuthConfig/OAuthConfig.less +165 -0
  111. package/es/components/authentication/admin/OAuthConfig/index.d.ts +6 -0
  112. package/es/components/authentication/admin/OAuthConfig/index.js +347 -0
  113. package/es/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
  114. package/es/components/authentication/admin/OAuthConfig/locales.js +116 -0
  115. package/es/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
  116. package/es/components/authentication/admin/OAuthConfig/types.js +1 -0
  117. package/es/components/authentication/admin/OrgAdminAuth/OrgAdminAuth.less +104 -0
  118. package/es/components/authentication/admin/OrgAdminAuth/index.d.ts +6 -0
  119. package/es/components/authentication/admin/OrgAdminAuth/index.js +543 -0
  120. package/es/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
  121. package/es/components/authentication/admin/OrgAdminAuth/locales.js +74 -0
  122. package/es/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
  123. package/es/components/authentication/admin/OrgAdminAuth/types.js +1 -0
  124. package/es/components/authentication/admin/POSOperatorAuth/POSOperatorAuth.less +104 -0
  125. package/es/components/authentication/admin/POSOperatorAuth/index.d.ts +6 -0
  126. package/es/components/authentication/admin/POSOperatorAuth/index.js +374 -0
  127. package/es/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
  128. package/es/components/authentication/admin/POSOperatorAuth/locales.js +65 -0
  129. package/es/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
  130. package/es/components/authentication/admin/POSOperatorAuth/types.js +1 -0
  131. package/es/components/authentication/admin/SaaSAdminAuth/SaaSAdminAuth.less +104 -0
  132. package/es/components/authentication/admin/SaaSAdminAuth/index.d.ts +6 -0
  133. package/es/components/authentication/admin/SaaSAdminAuth/index.js +625 -0
  134. package/es/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
  135. package/es/components/authentication/admin/SaaSAdminAuth/locales.js +74 -0
  136. package/es/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
  137. package/es/components/authentication/admin/SaaSAdminAuth/types.js +1 -0
  138. package/es/components/authentication/admin/index.d.ts +26 -0
  139. package/es/components/authentication/admin/index.js +23 -0
  140. package/es/components/authentication/index.d.ts +0 -0
  141. package/es/components/authentication/index.js +0 -0
  142. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  143. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  144. package/es/components/booking/components/customSelect/index.js +23 -4
  145. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  146. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  147. package/es/components/booking/components/footer/index.js +66 -54
  148. package/es/components/booking/components/footer/utils.js +87 -74
  149. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  150. package/es/components/booking/forms/footer.js +24 -10
  151. package/es/components/booking/forms/table/index.d.ts +1 -0
  152. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  153. package/es/components/booking/info/client/index.js +28 -13
  154. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  155. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  156. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  157. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  158. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  159. package/es/components/booking/info/date/index.d.ts +1 -0
  160. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  161. package/es/components/booking/info/main.js +3 -2
  162. package/es/components/booking/info/model.js +5 -0
  163. package/es/components/booking/info/service/Lists.js +1 -1
  164. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  165. package/es/components/booking/info/service/like/index.d.ts +1 -0
  166. package/es/components/booking/info2/cartClientCard/index.js +30 -6
  167. package/es/components/booking/info2/index.js +3 -2
  168. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  169. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  170. package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
  171. package/es/components/booking/locales.d.ts +6 -0
  172. package/es/components/booking/locales.js +12 -3
  173. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  174. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  175. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  176. package/es/components/booking/model.d.ts +4 -0
  177. package/es/components/booking/model.js +3 -0
  178. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  179. package/es/components/checkout/PaymentModal.js +219 -112
  180. package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  181. package/es/components/checkout/components/AdditionalModule/index.js +44 -12
  182. package/es/components/checkout/components/AmountSummary/index.js +9 -76
  183. package/es/components/checkout/components/AmountSummary/index.less +1 -1
  184. package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  185. package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
  186. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  187. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
  188. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  189. package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  190. package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  191. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  192. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
  193. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  194. package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
  195. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  196. package/es/components/checkout/index.less +1 -1
  197. package/es/components/checkout/locales.d.ts +6 -0
  198. package/es/components/checkout/locales.js +6 -0
  199. package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  200. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  201. package/es/components/eftpos/group/index.d.ts +1 -0
  202. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  203. package/es/components/eftpos/icon/device.d.ts +1 -0
  204. package/es/components/eftpos/receipt/index.d.ts +1 -0
  205. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  206. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  207. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  208. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  209. package/es/components/eftposPay/hooks.d.ts +1 -1
  210. package/es/components/eftposPay/linkly/index.js +64 -2
  211. package/es/components/eftposPay/store/index.d.ts +2 -2
  212. package/es/components/eftposPay/tip.d.ts +1 -0
  213. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  214. package/es/components/eftposPay/tyro/index.js +12 -0
  215. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  216. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  217. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  218. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  219. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  220. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  221. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  222. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  223. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  224. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  225. package/es/components/index.d.ts +3 -2
  226. package/es/components/index.js +3 -2
  227. package/es/components/login/index.d.ts +1 -0
  228. package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +68 -35
  229. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +70 -42
  230. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +72 -41
  231. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.d.ts +15 -0
  232. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +143 -0
  233. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +34 -0
  234. package/es/components/pay/toC/PaymentMethods/hooks/index.d.ts +19 -0
  235. package/es/components/pay/toC/PaymentMethods/hooks/index.js +126 -0
  236. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  237. package/es/components/pay/toC/index.js +26 -22
  238. package/es/components/pay/toC/locales.d.ts +9 -0
  239. package/es/components/pay/toC/locales.js +12 -3
  240. package/es/components/pay/toC/model.d.ts +1 -0
  241. package/es/components/pay/toC/serve.d.ts +5 -0
  242. package/es/components/pay/toC/serve.js +9 -1
  243. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  244. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  245. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  246. package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +5 -1
  247. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  248. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  249. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  250. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  251. package/es/components/schedules/calendar/index.d.ts +1 -0
  252. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  253. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  254. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  255. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  256. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  257. package/es/components/schedules/products/list/index.d.ts +1 -0
  258. package/es/components/schedules/resources/list/index.d.ts +1 -0
  259. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  260. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  261. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  262. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -86
  263. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  264. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  265. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  266. package/es/components/ticketBooking/components/timeBar/index.js +112 -7
  267. package/es/components/ticketBooking/components/timeBar/index.less +59 -0
  268. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
  269. package/es/components/ticketBooking/locales.d.ts +6 -0
  270. package/es/components/ticketBooking/locales.js +9 -3
  271. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  272. package/es/components/walletList/index.js +92 -56
  273. package/es/components/walletList/serve.d.ts +4 -0
  274. package/es/components/walletList/serve.js +46 -13
  275. package/es/components/walletList/types/index.d.ts +12 -12
  276. package/es/components/walletList/types/index.js +2 -2
  277. package/es/hooks/usePaymentLogger.d.ts +1 -0
  278. package/es/index.d.ts +7 -1
  279. package/es/index.js +7 -2
  280. package/es/plus/clientCard/locales.js +3 -3
  281. package/es/plus/clientName/index.d.ts +1 -0
  282. package/es/plus/clinetSearch/index.js +28 -30
  283. package/es/plus/clinetSearch/locales.d.ts +3 -0
  284. package/es/plus/clinetSearch/locales.js +7 -4
  285. package/es/plus/clinetSearch/types.d.ts +12 -0
  286. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  287. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  288. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  289. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  290. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  291. package/es/plus/contactInfo/index.d.ts +6 -0
  292. package/es/plus/contactInfo/index.js +198 -0
  293. package/es/plus/contactInfo/index.less +621 -0
  294. package/es/plus/contactInfo/locales.d.ts +15 -0
  295. package/es/plus/contactInfo/locales.js +14 -0
  296. package/es/plus/contactInfo/types.d.ts +91 -0
  297. package/es/plus/contactInfo/types.js +1 -0
  298. package/es/plus/contactInfo/utils.d.ts +7 -0
  299. package/es/plus/contactInfo/utils.js +50 -0
  300. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  301. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  302. package/es/plus/contactInfoModal/index.d.ts +41 -0
  303. package/es/plus/contactInfoModal/index.js +155 -0
  304. package/es/plus/contactInfoModal/index.less +19 -0
  305. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  306. package/es/plus/contactInfoModal/locales.js +65 -0
  307. package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  308. package/es/plus/productSelect/CategoryTabs/index.js +6 -3
  309. package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
  310. package/es/plus/productSelect/ProductCard/index.js +9 -1
  311. package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  312. package/es/plus/productSelect/index.d.ts +3 -2
  313. package/es/plus/productSelect/index.js +33 -8
  314. package/es/plus/productSelect/index.less +4 -0
  315. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  316. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  317. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  318. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  319. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  320. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  321. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  322. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  323. package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
  324. package/es/plus/walletEditor/WalletEditor.js +316 -0
  325. package/es/plus/walletEditor/WalletEditor.less +129 -0
  326. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  327. package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
  328. package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  329. package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
  330. package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
  331. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  332. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
  333. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  334. package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  335. package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
  336. package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
  337. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  338. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
  339. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  340. package/es/plus/walletEditor/index.d.ts +3 -0
  341. package/es/plus/walletEditor/index.js +3 -0
  342. package/es/plus/walletEditor/locales.d.ts +126 -0
  343. package/es/plus/walletEditor/locales.js +143 -0
  344. package/es/plus/walletEditor/types.d.ts +52 -0
  345. package/es/plus/walletEditor/types.js +1 -0
  346. package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  347. package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
  348. package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
  349. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  350. package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
  351. package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
  352. package/es/plus/walletPassGallery/components/passList/index.d.ts +12 -0
  353. package/es/plus/walletPassGallery/components/passList/index.js +115 -0
  354. package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  355. package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
  356. package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
  357. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +9 -0
  358. package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
  359. package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  360. package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  361. package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
  362. package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
  363. package/es/plus/walletPassGallery/index.d.ts +6 -0
  364. package/es/plus/walletPassGallery/index.js +602 -0
  365. package/es/plus/walletPassGallery/index.less +115 -0
  366. package/es/plus/walletPassGallery/locales.d.ts +270 -0
  367. package/es/plus/walletPassGallery/locales.js +279 -0
  368. package/es/plus/walletPassGallery/serve.d.ts +218 -0
  369. package/es/plus/walletPassGallery/serve.js +289 -0
  370. package/es/pro/Login2.0/AuthModal.d.ts +143 -0
  371. package/es/pro/Login2.0/AuthModal.js +630 -0
  372. package/es/pro/Login2.0/Login2.d.ts +61 -0
  373. package/es/pro/Login2.0/Login2.js +2236 -0
  374. package/es/pro/Login2.0/Register2.d.ts +65 -0
  375. package/es/pro/Login2.0/Register2.js +1502 -0
  376. package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
  377. package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
  378. package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
  379. package/es/pro/Login2.0/components/LegalTerms.js +51 -0
  380. package/es/pro/Login2.0/components/LegalTerms.less +74 -0
  381. package/es/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
  382. package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
  383. package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
  384. package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
  385. package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
  386. package/es/pro/Login2.0/components/PhoneInput.js +414 -0
  387. package/es/pro/Login2.0/components/PhoneInput.less +148 -0
  388. package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
  389. package/es/pro/Login2.0/components/phoneValidation.js +228 -0
  390. package/es/pro/Login2.0/hooks/index.d.ts +2 -0
  391. package/es/pro/Login2.0/hooks/index.js +1 -0
  392. package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
  393. package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
  394. package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
  395. package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
  396. package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
  397. package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
  398. package/es/pro/Login2.0/index.js +8 -0
  399. package/es/pro/Login2.0/index.less +1002 -0
  400. package/es/pro/Login2.0/locales.d.ts +543 -0
  401. package/es/pro/Login2.0/locales.js +622 -0
  402. package/es/pro/Login2.0/shared/Header.d.ts +11 -0
  403. package/es/pro/Login2.0/shared/Header.js +42 -0
  404. package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
  405. package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
  406. package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
  407. package/es/pro/Login2.0/shared/registerFlow.js +171 -0
  408. package/es/pro/Login2.0/shared/types.d.ts +232 -0
  409. package/es/pro/Login2.0/shared/types.js +1 -0
  410. package/es/pro/Login2.0/steps/CodeInput.d.ts +24 -0
  411. package/es/pro/Login2.0/steps/CodeInput.js +209 -0
  412. package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
  413. package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
  414. package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
  415. package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
  416. package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
  417. package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
  418. package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
  419. package/es/pro/Login2.0/steps/SetPassword.js +148 -0
  420. package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
  421. package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
  422. package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
  423. package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
  424. package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
  425. package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
  426. package/es/pro/Login2.0/steps/index.d.ts +19 -0
  427. package/es/pro/Login2.0/steps/index.js +11 -0
  428. package/es/pro/Login2.0/steps/steps.less +423 -0
  429. package/es/pro/Login2.0/types.d.ts +167 -0
  430. package/es/pro/Login2.0/types.js +1 -0
  431. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  432. package/es/pro/comprehensiveSearch/locales.js +1 -1
  433. package/es/pro/pisellPaymentList/example.d.ts +20 -0
  434. package/es/pro/pisellPaymentList/example.js +434 -0
  435. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +11 -7
  436. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  437. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
  438. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  439. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
  440. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  441. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  442. package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
  443. package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  444. package/lib/components/Sales/Event/Detail.js +3 -2
  445. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  446. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
  447. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  448. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  449. package/lib/components/appointmentBooking/components/Services/index.js +8 -3
  450. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  451. package/lib/components/appointmentBooking/hooks.js +76 -35
  452. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  453. package/lib/components/appointmentBooking/locales.js +6 -3
  454. package/lib/components/authentication/admin/AuthMethods/AuthMethods.less +136 -0
  455. package/lib/components/authentication/admin/AuthMethods/SettingList.d.ts +5 -0
  456. package/lib/components/authentication/admin/AuthMethods/SettingList.js +75 -0
  457. package/lib/components/authentication/admin/AuthMethods/SettingList.less +85 -0
  458. package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.d.ts +22 -0
  459. package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.js +126 -0
  460. package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.less +163 -0
  461. package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
  462. package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.js +42 -0
  463. package/lib/components/authentication/admin/AuthMethods/components/EmailSettingsContent.d.ts +13 -0
  464. package/lib/components/authentication/admin/AuthMethods/components/EmailSettingsContent.js +108 -0
  465. package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
  466. package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.js +108 -0
  467. package/lib/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.d.ts +14 -0
  468. package/lib/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.js +93 -0
  469. package/lib/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.d.ts +13 -0
  470. package/lib/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.js +85 -0
  471. package/lib/components/authentication/admin/AuthMethods/components/index.d.ts +10 -0
  472. package/lib/components/authentication/admin/AuthMethods/components/index.js +51 -0
  473. package/lib/components/authentication/admin/AuthMethods/constants.d.ts +22 -0
  474. package/lib/components/authentication/admin/AuthMethods/constants.js +115 -0
  475. package/lib/components/authentication/admin/AuthMethods/index.d.ts +8 -0
  476. package/lib/components/authentication/admin/AuthMethods/index.js +196 -0
  477. package/lib/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
  478. package/lib/components/authentication/admin/AuthMethods/locales.js +314 -0
  479. package/lib/components/authentication/admin/AuthMethods/types.d.ts +76 -0
  480. package/lib/components/authentication/admin/AuthMethods/types.js +53 -0
  481. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/AuthenticationMethods.less +231 -0
  482. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.d.ts +6 -0
  483. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +311 -0
  484. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
  485. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +131 -0
  486. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
  487. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.js +17 -0
  488. package/lib/components/authentication/admin/ChannelAuthSetting/ChannelAuthSetting.less +111 -0
  489. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/CollectInfo.less +259 -0
  490. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.d.ts +6 -0
  491. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +410 -0
  492. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
  493. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +110 -0
  494. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
  495. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.js +17 -0
  496. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.d.ts +6 -0
  497. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +383 -0
  498. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.less +111 -0
  499. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/PageSetting.less +105 -0
  500. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/index.d.ts +8 -0
  501. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/index.js +148 -0
  502. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
  503. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +56 -0
  504. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
  505. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.js +17 -0
  506. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/PageSettingItem.less +272 -0
  507. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.d.ts +8 -0
  508. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +206 -0
  509. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
  510. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +95 -0
  511. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
  512. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.js +17 -0
  513. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
  514. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +246 -0
  515. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.less +111 -0
  516. package/lib/components/authentication/admin/ChannelAuthSetting/index.d.ts +6 -0
  517. package/lib/components/authentication/admin/ChannelAuthSetting/index.js +177 -0
  518. package/lib/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
  519. package/lib/components/authentication/admin/ChannelAuthSetting/locales.js +74 -0
  520. package/lib/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
  521. package/lib/components/authentication/admin/ChannelAuthSetting/types.js +17 -0
  522. package/lib/components/authentication/admin/CustomerAuth/CustomerAuth.less +104 -0
  523. package/lib/components/authentication/admin/CustomerAuth/index.d.ts +6 -0
  524. package/lib/components/authentication/admin/CustomerAuth/index.js +507 -0
  525. package/lib/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
  526. package/lib/components/authentication/admin/CustomerAuth/locales.js +110 -0
  527. package/lib/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
  528. package/lib/components/authentication/admin/CustomerAuth/types.js +17 -0
  529. package/lib/components/authentication/admin/CustomerOAuthConfig/CustomerOAuthConfig.less +164 -0
  530. package/lib/components/authentication/admin/CustomerOAuthConfig/index.d.ts +6 -0
  531. package/lib/components/authentication/admin/CustomerOAuthConfig/index.js +331 -0
  532. package/lib/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
  533. package/lib/components/authentication/admin/CustomerOAuthConfig/locales.js +161 -0
  534. package/lib/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
  535. package/lib/components/authentication/admin/CustomerOAuthConfig/types.js +17 -0
  536. package/lib/components/authentication/admin/DeviceAuth/DeviceAuth.less +104 -0
  537. package/lib/components/authentication/admin/DeviceAuth/index.d.ts +6 -0
  538. package/lib/components/authentication/admin/DeviceAuth/index.js +254 -0
  539. package/lib/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
  540. package/lib/components/authentication/admin/DeviceAuth/locales.js +98 -0
  541. package/lib/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
  542. package/lib/components/authentication/admin/DeviceAuth/types.js +17 -0
  543. package/lib/components/authentication/admin/OAuthConfig/OAuthConfig.less +165 -0
  544. package/lib/components/authentication/admin/OAuthConfig/index.d.ts +6 -0
  545. package/lib/components/authentication/admin/OAuthConfig/index.js +226 -0
  546. package/lib/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
  547. package/lib/components/authentication/admin/OAuthConfig/locales.js +140 -0
  548. package/lib/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
  549. package/lib/components/authentication/admin/OAuthConfig/types.js +17 -0
  550. package/lib/components/authentication/admin/OrgAdminAuth/OrgAdminAuth.less +104 -0
  551. package/lib/components/authentication/admin/OrgAdminAuth/index.d.ts +6 -0
  552. package/lib/components/authentication/admin/OrgAdminAuth/index.js +398 -0
  553. package/lib/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
  554. package/lib/components/authentication/admin/OrgAdminAuth/locales.js +98 -0
  555. package/lib/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
  556. package/lib/components/authentication/admin/OrgAdminAuth/types.js +17 -0
  557. package/lib/components/authentication/admin/POSOperatorAuth/POSOperatorAuth.less +104 -0
  558. package/lib/components/authentication/admin/POSOperatorAuth/index.d.ts +6 -0
  559. package/lib/components/authentication/admin/POSOperatorAuth/index.js +262 -0
  560. package/lib/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
  561. package/lib/components/authentication/admin/POSOperatorAuth/locales.js +89 -0
  562. package/lib/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
  563. package/lib/components/authentication/admin/POSOperatorAuth/types.js +17 -0
  564. package/lib/components/authentication/admin/SaaSAdminAuth/SaaSAdminAuth.less +104 -0
  565. package/lib/components/authentication/admin/SaaSAdminAuth/index.d.ts +6 -0
  566. package/lib/components/authentication/admin/SaaSAdminAuth/index.js +481 -0
  567. package/lib/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
  568. package/lib/components/authentication/admin/SaaSAdminAuth/locales.js +98 -0
  569. package/lib/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
  570. package/lib/components/authentication/admin/SaaSAdminAuth/types.js +17 -0
  571. package/lib/components/authentication/admin/index.d.ts +26 -0
  572. package/lib/components/authentication/admin/index.js +83 -0
  573. package/lib/components/authentication/index.d.ts +0 -0
  574. package/lib/components/authentication/index.js +0 -0
  575. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  576. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  577. package/lib/components/booking/components/customSelect/index.js +27 -4
  578. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  579. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  580. package/lib/components/booking/components/footer/index.js +19 -9
  581. package/lib/components/booking/components/footer/utils.js +82 -51
  582. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  583. package/lib/components/booking/forms/footer.js +29 -11
  584. package/lib/components/booking/forms/table/index.d.ts +1 -0
  585. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  586. package/lib/components/booking/info/client/index.js +14 -1
  587. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  588. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
  589. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  590. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  591. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  592. package/lib/components/booking/info/date/index.d.ts +1 -0
  593. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  594. package/lib/components/booking/info/main.js +5 -4
  595. package/lib/components/booking/info/model.js +5 -0
  596. package/lib/components/booking/info/service/Lists.js +1 -1
  597. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  598. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  599. package/lib/components/booking/info2/cartClientCard/index.js +25 -5
  600. package/lib/components/booking/info2/index.js +11 -5
  601. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  602. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  603. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  604. package/lib/components/booking/locales.d.ts +6 -0
  605. package/lib/components/booking/locales.js +12 -3
  606. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  607. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  608. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  609. package/lib/components/booking/model.d.ts +4 -0
  610. package/lib/components/booking/model.js +3 -0
  611. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  612. package/lib/components/checkout/PaymentModal.js +110 -21
  613. package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  614. package/lib/components/checkout/components/AdditionalModule/index.js +44 -11
  615. package/lib/components/checkout/components/AmountSummary/index.js +5 -46
  616. package/lib/components/checkout/components/AmountSummary/index.less +1 -1
  617. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  618. package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
  619. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  620. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
  621. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  622. package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
  623. package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  624. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  625. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
  626. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  627. package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
  628. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  629. package/lib/components/checkout/index.less +1 -1
  630. package/lib/components/checkout/locales.d.ts +6 -0
  631. package/lib/components/checkout/locales.js +6 -0
  632. package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  633. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  634. package/lib/components/eftpos/group/index.d.ts +1 -0
  635. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  636. package/lib/components/eftpos/icon/device.d.ts +1 -0
  637. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  638. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  639. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  640. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  641. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  642. package/lib/components/eftposPay/hooks.d.ts +1 -1
  643. package/lib/components/eftposPay/linkly/index.js +31 -1
  644. package/lib/components/eftposPay/store/index.d.ts +2 -2
  645. package/lib/components/eftposPay/tip.d.ts +1 -0
  646. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  647. package/lib/components/eftposPay/tyro/index.js +12 -0
  648. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  649. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  650. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  651. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  652. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  653. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  654. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  655. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  656. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  657. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  658. package/lib/components/index.d.ts +3 -2
  659. package/lib/components/index.js +20 -1
  660. package/lib/components/login/index.d.ts +1 -0
  661. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +27 -7
  662. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +32 -8
  663. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -4
  664. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.d.ts +15 -0
  665. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +88 -0
  666. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +34 -0
  667. package/lib/components/pay/toC/PaymentMethods/hooks/index.d.ts +19 -0
  668. package/lib/components/pay/toC/PaymentMethods/hooks/index.js +90 -0
  669. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  670. package/lib/components/pay/toC/index.js +11 -2
  671. package/lib/components/pay/toC/locales.d.ts +9 -0
  672. package/lib/components/pay/toC/locales.js +12 -3
  673. package/lib/components/pay/toC/model.d.ts +1 -0
  674. package/lib/components/pay/toC/serve.d.ts +5 -0
  675. package/lib/components/pay/toC/serve.js +3 -0
  676. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  677. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  678. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  679. package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +8 -1
  680. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  681. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  682. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  683. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  684. package/lib/components/schedules/calendar/index.d.ts +1 -0
  685. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  686. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  687. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  688. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  689. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  690. package/lib/components/schedules/products/list/index.d.ts +1 -0
  691. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  692. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  693. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  694. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  695. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
  696. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  697. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  698. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  699. package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
  700. package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
  701. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
  702. package/lib/components/ticketBooking/locales.d.ts +6 -0
  703. package/lib/components/ticketBooking/locales.js +9 -3
  704. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  705. package/lib/components/walletList/index.js +88 -47
  706. package/lib/components/walletList/serve.d.ts +4 -0
  707. package/lib/components/walletList/serve.js +12 -0
  708. package/lib/components/walletList/types/index.d.ts +12 -12
  709. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  710. package/lib/index.d.ts +7 -1
  711. package/lib/index.js +38 -3
  712. package/lib/plus/clientCard/locales.js +3 -3
  713. package/lib/plus/clientName/index.d.ts +1 -0
  714. package/lib/plus/clinetSearch/index.js +17 -8
  715. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  716. package/lib/plus/clinetSearch/locales.js +7 -4
  717. package/lib/plus/clinetSearch/types.d.ts +12 -0
  718. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  719. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  720. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  721. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  722. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  723. package/lib/plus/contactInfo/index.d.ts +6 -0
  724. package/lib/plus/contactInfo/index.js +226 -0
  725. package/lib/plus/contactInfo/index.less +621 -0
  726. package/lib/plus/contactInfo/locales.d.ts +15 -0
  727. package/lib/plus/contactInfo/locales.js +38 -0
  728. package/lib/plus/contactInfo/types.d.ts +91 -0
  729. package/lib/plus/contactInfo/types.js +17 -0
  730. package/lib/plus/contactInfo/utils.d.ts +7 -0
  731. package/lib/plus/contactInfo/utils.js +64 -0
  732. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  733. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  734. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  735. package/lib/plus/contactInfoModal/index.js +139 -0
  736. package/lib/plus/contactInfoModal/index.less +19 -0
  737. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  738. package/lib/plus/contactInfoModal/locales.js +89 -0
  739. package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  740. package/lib/plus/productSelect/CategoryTabs/index.js +86 -71
  741. package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
  742. package/lib/plus/productSelect/ProductCard/index.js +18 -1
  743. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  744. package/lib/plus/productSelect/index.d.ts +3 -2
  745. package/lib/plus/productSelect/index.js +20 -6
  746. package/lib/plus/productSelect/index.less +4 -0
  747. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  748. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  749. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  750. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  751. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  752. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  753. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  754. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  755. package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
  756. package/lib/plus/walletEditor/WalletEditor.js +354 -0
  757. package/lib/plus/walletEditor/WalletEditor.less +129 -0
  758. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  759. package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
  760. package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  761. package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
  762. package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
  763. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  764. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
  765. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  766. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  767. package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
  768. package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
  769. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  770. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
  771. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  772. package/lib/plus/walletEditor/index.d.ts +3 -0
  773. package/lib/plus/walletEditor/index.js +42 -0
  774. package/lib/plus/walletEditor/locales.d.ts +126 -0
  775. package/lib/plus/walletEditor/locales.js +167 -0
  776. package/lib/plus/walletEditor/types.d.ts +52 -0
  777. package/lib/plus/walletEditor/types.js +17 -0
  778. package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  779. package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
  780. package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
  781. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  782. package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
  783. package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
  784. package/lib/plus/walletPassGallery/components/passList/index.d.ts +12 -0
  785. package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
  786. package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  787. package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
  788. package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
  789. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +9 -0
  790. package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
  791. package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  792. package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  793. package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
  794. package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
  795. package/lib/plus/walletPassGallery/index.d.ts +6 -0
  796. package/lib/plus/walletPassGallery/index.js +498 -0
  797. package/lib/plus/walletPassGallery/index.less +115 -0
  798. package/lib/plus/walletPassGallery/locales.d.ts +270 -0
  799. package/lib/plus/walletPassGallery/locales.js +299 -0
  800. package/lib/plus/walletPassGallery/serve.d.ts +218 -0
  801. package/lib/plus/walletPassGallery/serve.js +98 -0
  802. package/lib/pro/Login2.0/AuthModal.d.ts +143 -0
  803. package/lib/pro/Login2.0/AuthModal.js +503 -0
  804. package/lib/pro/Login2.0/Login2.d.ts +61 -0
  805. package/lib/pro/Login2.0/Login2.js +1545 -0
  806. package/lib/pro/Login2.0/Register2.d.ts +65 -0
  807. package/lib/pro/Login2.0/Register2.js +1063 -0
  808. package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
  809. package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
  810. package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
  811. package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
  812. package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
  813. package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
  814. package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
  815. package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
  816. package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
  817. package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
  818. package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
  819. package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
  820. package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
  821. package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
  822. package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
  823. package/lib/pro/Login2.0/hooks/index.js +29 -0
  824. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
  825. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
  826. package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
  827. package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
  828. package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
  829. package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
  830. package/lib/pro/Login2.0/index.js +45 -0
  831. package/lib/pro/Login2.0/index.less +1002 -0
  832. package/lib/pro/Login2.0/locales.d.ts +543 -0
  833. package/lib/pro/Login2.0/locales.js +646 -0
  834. package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
  835. package/lib/pro/Login2.0/shared/Header.js +81 -0
  836. package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
  837. package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
  838. package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
  839. package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
  840. package/lib/pro/Login2.0/shared/types.d.ts +232 -0
  841. package/lib/pro/Login2.0/shared/types.js +17 -0
  842. package/lib/pro/Login2.0/steps/CodeInput.d.ts +24 -0
  843. package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
  844. package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
  845. package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
  846. package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
  847. package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
  848. package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
  849. package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
  850. package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
  851. package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
  852. package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
  853. package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
  854. package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
  855. package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
  856. package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
  857. package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
  858. package/lib/pro/Login2.0/steps/index.d.ts +19 -0
  859. package/lib/pro/Login2.0/steps/index.js +60 -0
  860. package/lib/pro/Login2.0/steps/steps.less +423 -0
  861. package/lib/pro/Login2.0/types.d.ts +167 -0
  862. package/lib/pro/Login2.0/types.js +17 -0
  863. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  864. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  865. package/lib/pro/pisellPaymentList/example.d.ts +20 -0
  866. package/lib/pro/pisellPaymentList/example.js +416 -0
  867. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +9 -5
  868. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  869. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
  870. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  871. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
  872. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  873. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  874. package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
  875. package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  876. package/lowcode/admin-auth-customer-auth/meta.ts +29 -0
  877. package/lowcode/admin-auth-customer-oauth-config/meta.ts +55 -0
  878. package/lowcode/admin-auth-device-auth/meta.ts +30 -0
  879. package/lowcode/admin-auth-methods/meta.ts +385 -0
  880. package/lowcode/admin-auth-oauth-config/meta.ts +29 -0
  881. package/lowcode/admin-auth-online-shop-auth/meta.ts +29 -0
  882. package/lowcode/admin-auth-org-admin-auth/meta.ts +29 -0
  883. package/lowcode/admin-auth-pos-operator-auth/meta.ts +30 -0
  884. package/lowcode/admin-auth-saas-admin-auth/meta.ts +29 -0
  885. package/lowcode/admin-auth-saas-managerment-auth/meta.ts +30 -0
  886. package/lowcode/admin-setting-list/meta.ts +125 -0
  887. package/lowcode/authmodal/meta.ts +395 -0
  888. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  889. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  890. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  891. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  892. package/lowcode/contact-info/meta.ts +199 -0
  893. package/lowcode/contact-info-modal/meta.ts +98 -0
  894. package/lowcode/login2/CONFIG.md +447 -0
  895. package/lowcode/login2/TEST_CONFIG.md +324 -0
  896. package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
  897. package/lowcode/login2/meta.ts +560 -0
  898. package/lowcode/login2/snippets.ts +124 -0
  899. package/lowcode/pro-register/meta.ts +385 -0
  900. package/lowcode/register2/meta.ts +562 -0
  901. package/lowcode/register2/snippets.ts +257 -0
  902. package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
  903. package/lowcode/wallet-editor/meta.ts +57 -0
  904. package/lowcode/wallet-editor/snippets.ts +13 -0
  905. package/lowcode/wallet-pass-gallery/meta.ts +35 -0
  906. package/package.json +7 -5
  907. package/lowcode/wallet/meta.ts +0 -79
@@ -0,0 +1,2236 @@
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
8
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+ import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
17
+ import { Form, message } from 'antd';
18
+ import { Input, Button, Checkbox } from '@pisell/materials';
19
+ import classNames from 'classnames';
20
+ import { locales } from '@pisell/utils';
21
+ import { useDebounceFn } from 'ahooks';
22
+ import localeTexts from "./locales";
23
+ import Header from "./shared/Header";
24
+ import LoginCodeInput from "./components/LoginCodeInput";
25
+ import ForgotPasswordFlow from "./components/ForgotPasswordFlow";
26
+ import SetPassword from "./steps/SetPassword";
27
+ import PhoneInput from "./components/PhoneInput";
28
+ import { createPhoneValidationRules } from "./components/phoneValidation";
29
+ import LegalTerms from "./components/LegalTerms";
30
+ import "./index.less";
31
+ import { usePisellOS } from "../../hooks/useEngineContext";
32
+ import useEngineContext from "../../hooks/useEngineContext";
33
+ import { Iconfont } from '@pisell/materials';
34
+ import usePasswordValidationRules from "./hooks/usePasswordValidationRules";
35
+ import OAuthButtonGroup from "./components/OAuthButtonGroup";
36
+
37
+ /** 登录组件配置 */
38
+
39
+ /** 登录组件事件 */
40
+
41
+ /** 登录组件属性 */
42
+
43
+ /**
44
+ * 登录 2.0 组件
45
+ * 支持邮箱、手机、三方登录
46
+ * 组件宽度固定 360px
47
+ */
48
+ var Login2 = function Login2(_ref) {
49
+ var _context$appHelper, _config$ui, _config$emailLinkVeri, _config$emailLinkVeri2, _config$emailLinkVeri4;
50
+ var config = _ref.config,
51
+ _ref$visible = _ref.visible,
52
+ visible = _ref$visible === void 0 ? true : _ref$visible,
53
+ onClose = _ref.onClose,
54
+ className = _ref.className,
55
+ style = _ref.style,
56
+ onLogin = _ref.onLogin,
57
+ onOAuthLogin = _ref.onOAuthLogin,
58
+ onSendVerificationCode = _ref.onSendVerificationCode,
59
+ onForgotPassword = _ref.onForgotPassword,
60
+ onSwitchToRegister = _ref.onSwitchToRegister,
61
+ onError = _ref.onError;
62
+ var _Form$useForm = Form.useForm(),
63
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
64
+ form = _Form$useForm2[0];
65
+ var _useState = useState(false),
66
+ _useState2 = _slicedToArray(_useState, 2),
67
+ loading = _useState2[0],
68
+ setLoading = _useState2[1];
69
+ var _useState3 = useState(0),
70
+ _useState4 = _slicedToArray(_useState3, 2),
71
+ countdown = _useState4[0],
72
+ setCountdown = _useState4[1];
73
+ var _useState5 = useState([]),
74
+ _useState6 = _slicedToArray(_useState5, 2),
75
+ countries = _useState6[0],
76
+ setCountries = _useState6[1];
77
+ var pisellOS = usePisellOS();
78
+ var registerAndLogin = pisellOS === null || pisellOS === void 0 ? void 0 : pisellOS.getModule('registerAndLogin');
79
+ var context = useEngineContext();
80
+ var storage = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.storage;
81
+
82
+ // 初始化国际化
83
+ useEffect(function () {
84
+ var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4;
85
+ locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get('umi_locale')) || 'en');
86
+ }, []);
87
+
88
+ // 登录方式配置
89
+ var loginMethods = config.loginMethods || [];
90
+ var passwordValidationRules = usePasswordValidationRules((_config$ui = config.ui) === null || _config$ui === void 0 ? void 0 : _config$ui.passwordRules, {
91
+ translate: locales.getText,
92
+ fallbackMinLength: 6,
93
+ messageKeys: {
94
+ required: locales.getText('pisell-login2-password-required'),
95
+ minLength: locales.getText('pisell-set-password-min-length'),
96
+ requireUppercase: locales.getText('pisell-set-password-require-uppercase'),
97
+ requireLowercase: locales.getText('pisell-set-password-require-lowercase'),
98
+ requireNumber: locales.getText('pisell-set-password-require-number'),
99
+ requireSpecialCharacters: locales.getText('pisell-set-password-require-special'),
100
+ summary: locales.getText('pisell-set-password-must-contain')
101
+ }
102
+ });
103
+
104
+ // 当前激活的登录方式(第一个为默认)
105
+ var _useState7 = useState(null),
106
+ _useState8 = _slicedToArray(_useState7, 2),
107
+ currentLoginMethod = _useState8[0],
108
+ setCurrentLoginMethod = _useState8[1];
109
+
110
+ // 当前验证方式(针对 email/phone)
111
+ var _useState9 = useState('password'),
112
+ _useState10 = _slicedToArray(_useState9, 2),
113
+ currentVerificationMethod = _useState10[0],
114
+ setCurrentVerificationMethod = _useState10[1];
115
+ var hasTriggeredGuestLoginRef = useRef(false);
116
+
117
+ // 初始化 currentLoginMethod(当 loginMethods 变化时)
118
+ useEffect(function () {
119
+ if (loginMethods.length > 0 && !currentLoginMethod) {
120
+ var initialMethod = loginMethods[0];
121
+ setCurrentLoginMethod(initialMethod);
122
+ if ((initialMethod === null || initialMethod === void 0 ? void 0 : initialMethod.type) === 'email' || (initialMethod === null || initialMethod === void 0 ? void 0 : initialMethod.type) === 'phone') {
123
+ var _initialMethod$verifi;
124
+ setCurrentVerificationMethod(((_initialMethod$verifi = initialMethod.verificationMethods) === null || _initialMethod$verifi === void 0 ? void 0 : _initialMethod$verifi[0]) || 'password');
125
+ }
126
+ }
127
+ // 如果只有 guest 登录,则默认直接使用 guest 登录
128
+ if (hasTriggeredGuestLoginRef.current) return;
129
+ var hasOnlyGuest = loginMethods.length === 1 && loginMethods[0].type === 'guest';
130
+ if (!hasOnlyGuest) return;
131
+ hasTriggeredGuestLoginRef.current = true;
132
+ handleGuestLogin();
133
+ }, [loginMethods, currentLoginMethod]);
134
+
135
+ // 检测浏览器记忆的凭据和 Remember me 状态
136
+ useEffect(function () {
137
+ if (((currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' || (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'phone') && currentVerificationMethod === 'password') {
138
+ // 检查是否有存储的 Remember me 状态
139
+ var storedRememberMe = storage.get('login_remember_me') === 'true';
140
+ setRememberMe(storedRememberMe);
141
+ // 检查是否有存储的邮箱/手机号
142
+ var _account = storage.get('login_account');
143
+ try {
144
+ _account = JSON.parse(_account || '{}');
145
+ } catch (e) {
146
+ console.error(e);
147
+ }
148
+ if (_account && storedRememberMe) {
149
+ // 检查存储的账号类型是否匹配当前的登录方式
150
+ var accountString = typeof _account === 'string' ? _account : _account.phone || _account.email || '';
151
+ var isEmail = accountString.includes('@');
152
+ var isPhone = /^\d+$/.test(accountString.replace(/\+/g, '').replace(/\s/g, ''));
153
+
154
+ // 只有当存储的账号类型与当前登录方式匹配时,才使用存储的凭据
155
+ var shouldUseStoredAccount = currentLoginMethod.type === 'email' && isEmail || currentLoginMethod.type === 'phone' && isPhone;
156
+ if (shouldUseStoredAccount) {
157
+ setEnteredAccount(_account);
158
+ setHasStoredCredentials(true);
159
+
160
+ // 如果表单此时没有值,则填充一个
161
+ if (isEmail && !form.getFieldValue('email')) {
162
+ form.setFieldsValue({
163
+ email: _account
164
+ });
165
+ }
166
+ if (isPhone && !form.getFieldValue('phone')) {
167
+ form.setFieldsValue({
168
+ phone: _account
169
+ });
170
+ }
171
+
172
+ // 如果是分步登录且有存储的凭据,直接跳到密码步骤
173
+ if (currentLoginMethod !== null && currentLoginMethod !== void 0 && currentLoginMethod.stepByStep) {
174
+ setLoginStep('password');
175
+ }
176
+ } else {
177
+ // 如果不匹配,清空相关状态
178
+ setHasStoredCredentials(false);
179
+ setEnteredAccount('');
180
+ }
181
+ } else {
182
+ // 如果没有存储的凭据或 remember me,清空状态
183
+ setHasStoredCredentials(false);
184
+ }
185
+ }
186
+ }, [currentLoginMethod, currentVerificationMethod]);
187
+
188
+ // 当组件关闭时,清空密码字段,防止浏览器弹出保存密码提示
189
+ useEffect(function () {
190
+ if (!visible) {
191
+ // 清空密码字段,防止浏览器检测到凭据变化而弹出保存提示
192
+ form.setFieldsValue({
193
+ password: ''
194
+ });
195
+
196
+ // 可选:重置整个表单(如果希望更彻底的清理)
197
+ // form.resetFields();
198
+ }
199
+ }, [visible, form]);
200
+
201
+ // 登录步骤状态:
202
+ // - 'account': 输入账号(密码分步登录的第一步 或 验证码登录的第一步)
203
+ // - 'password': 输入密码(仅密码分步登录的第二步)
204
+ // - 'code': 输入验证码(验证码登录的第二步)
205
+ var _useState11 = useState('account'),
206
+ _useState12 = _slicedToArray(_useState11, 2),
207
+ loginStep = _useState12[0],
208
+ setLoginStep = _useState12[1];
209
+
210
+ // 已输入的账号
211
+ var _useState13 = useState(''),
212
+ _useState14 = _slicedToArray(_useState13, 2),
213
+ enteredAccount = _useState14[0],
214
+ setEnteredAccount = _useState14[1];
215
+
216
+ // 验证码输入错误信息
217
+ var _useState15 = useState(''),
218
+ _useState16 = _slicedToArray(_useState15, 2),
219
+ codeError = _useState16[0],
220
+ setCodeError = _useState16[1];
221
+
222
+ // 记住我状态
223
+ var _useState17 = useState(false),
224
+ _useState18 = _slicedToArray(_useState17, 2),
225
+ rememberMe = _useState18[0],
226
+ setRememberMe = _useState18[1];
227
+
228
+ // 检测浏览器记忆的凭据
229
+ var _useState19 = useState(false),
230
+ _useState20 = _slicedToArray(_useState19, 2),
231
+ hasStoredCredentials = _useState20[0],
232
+ setHasStoredCredentials = _useState20[1];
233
+
234
+ // 上次登录方式
235
+ var _useState21 = useState(null),
236
+ _useState22 = _slicedToArray(_useState21, 2),
237
+ lastLoginMethod = _useState22[0],
238
+ setLastLoginMethod = _useState22[1];
239
+
240
+ // 是否显示忘记密码流程
241
+ var _useState23 = useState(false),
242
+ _useState24 = _slicedToArray(_useState23, 2),
243
+ showForgotPassword = _useState24[0],
244
+ setShowForgotPassword = _useState24[1];
245
+
246
+ // 邮件链接验证相关状态
247
+ var _useState25 = useState(null),
248
+ _useState26 = _slicedToArray(_useState25, 2),
249
+ emailLinkVerifyStatus = _useState26[0],
250
+ setEmailLinkVerifyStatus = _useState26[1];
251
+ var _useState27 = useState(''),
252
+ _useState28 = _slicedToArray(_useState27, 2),
253
+ emailLinkError = _useState28[0],
254
+ setEmailLinkError = _useState28[1];
255
+ var _useState29 = useState(''),
256
+ _useState30 = _slicedToArray(_useState29, 2),
257
+ resetPasswordUserEmail = _useState30[0],
258
+ setResetPasswordUserEmail = _useState30[1];
259
+
260
+ // 检查是否是邮件链接验证模式
261
+ var isEmailLinkVerification = ((_config$emailLinkVeri = config.emailLinkVerification) === null || _config$emailLinkVeri === void 0 ? void 0 : _config$emailLinkVeri.enabled) && ((_config$emailLinkVeri2 = config.emailLinkVerification) === null || _config$emailLinkVeri2 === void 0 ? void 0 : _config$emailLinkVeri2.code);
262
+
263
+ // 邮件链接验证初始化
264
+ useEffect(function () {
265
+ var _config$emailLinkVeri3;
266
+ if (isEmailLinkVerification && (_config$emailLinkVeri3 = config.emailLinkVerification) !== null && _config$emailLinkVeri3 !== void 0 && _config$emailLinkVeri3.code) {
267
+ setEmailLinkVerifyStatus('verifying');
268
+
269
+ // 调用检测重置密码代码的API
270
+ var checkCode = /*#__PURE__*/function () {
271
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
272
+ var result, _result$data;
273
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
274
+ while (1) switch (_context.prev = _context.next) {
275
+ case 0:
276
+ _context.prev = 0;
277
+ if (!(registerAndLogin !== null && registerAndLogin !== void 0 && registerAndLogin.checkResetPasswordCode)) {
278
+ _context.next = 8;
279
+ break;
280
+ }
281
+ _context.next = 4;
282
+ return registerAndLogin.checkResetPasswordCode({
283
+ code: config.emailLinkVerification.code
284
+ });
285
+ case 4:
286
+ result = _context.sent;
287
+ if (result.status) {
288
+ setEmailLinkVerifyStatus('success');
289
+ // 保存用户邮箱信息,如果API返回了邮箱
290
+ if ((_result$data = result.data) !== null && _result$data !== void 0 && _result$data.email) {
291
+ setResetPasswordUserEmail(result.data.email);
292
+ }
293
+ // 验证成功后不需要显示忘记密码流程,直接显示重置密码页面
294
+ } else {
295
+ setEmailLinkVerifyStatus('error');
296
+ setEmailLinkError(result.message || '验证码无效或已过期');
297
+ }
298
+ _context.next = 10;
299
+ break;
300
+ case 8:
301
+ setEmailLinkVerifyStatus('error');
302
+ setEmailLinkError('系统错误,请稍后重试');
303
+ case 10:
304
+ _context.next = 16;
305
+ break;
306
+ case 12:
307
+ _context.prev = 12;
308
+ _context.t0 = _context["catch"](0);
309
+ setEmailLinkVerifyStatus('error');
310
+ setEmailLinkError('网络错误,请稍后重试');
311
+ case 16:
312
+ case "end":
313
+ return _context.stop();
314
+ }
315
+ }, _callee, null, [[0, 12]]);
316
+ }));
317
+ return function checkCode() {
318
+ return _ref2.apply(this, arguments);
319
+ };
320
+ }();
321
+ checkCode();
322
+ }
323
+ }, [isEmailLinkVerification, (_config$emailLinkVeri4 = config.emailLinkVerification) === null || _config$emailLinkVeri4 === void 0 ? void 0 : _config$emailLinkVeri4.code, registerAndLogin]);
324
+
325
+ // 验证码倒计时
326
+ useEffect(function () {
327
+ if (countdown > 0) {
328
+ var timer = setTimeout(function () {
329
+ setCountdown(countdown - 1);
330
+ }, 1000);
331
+ return function () {
332
+ return clearTimeout(timer);
333
+ };
334
+ }
335
+ }, [countdown]);
336
+
337
+ // 获取国家列表
338
+ useEffect(function () {
339
+ var fetchCountries = /*#__PURE__*/function () {
340
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
341
+ var countriesList;
342
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
343
+ while (1) switch (_context2.prev = _context2.next) {
344
+ case 0:
345
+ _context2.prev = 0;
346
+ if (!(registerAndLogin !== null && registerAndLogin !== void 0 && registerAndLogin.getCountries)) {
347
+ _context2.next = 6;
348
+ break;
349
+ }
350
+ _context2.next = 4;
351
+ return registerAndLogin.getCountries();
352
+ case 4:
353
+ countriesList = _context2.sent;
354
+ setCountries(countriesList || []);
355
+ case 6:
356
+ _context2.next = 11;
357
+ break;
358
+ case 8:
359
+ _context2.prev = 8;
360
+ _context2.t0 = _context2["catch"](0);
361
+ console.error('Failed to fetch countries:', _context2.t0);
362
+ case 11:
363
+ case "end":
364
+ return _context2.stop();
365
+ }
366
+ }, _callee2, null, [[0, 8]]);
367
+ }));
368
+ return function fetchCountries() {
369
+ return _ref3.apply(this, arguments);
370
+ };
371
+ }();
372
+ fetchCountries();
373
+ }, [registerAndLogin]);
374
+
375
+ // 读取上次登录方式和记住的密码
376
+ useEffect(function () {
377
+ try {
378
+ var storedLoginMethod = storage.get('pisell_last_login_method');
379
+ if (storedLoginMethod) {
380
+ var parsedMethod = JSON.parse(storedLoginMethod);
381
+ setLastLoginMethod(parsedMethod);
382
+ }
383
+ var _rememberMe = storage.get('login_remember_me') === 'true';
384
+ var _account2 = storage.get('login_account');
385
+ var password = storage.get('login_password');
386
+ if (_rememberMe && _account2 && password) {
387
+ var accountData;
388
+ try {
389
+ accountData = JSON.parse(_account2 || '{}');
390
+ } catch (e) {
391
+ accountData = _account2;
392
+ }
393
+ var isEmail = typeof accountData === 'string' && accountData.includes('@');
394
+ var loginMethod = loginMethods.find(function (m) {
395
+ return m.type === (isEmail ? 'email' : 'phone');
396
+ });
397
+ if (loginMethod) {
398
+ setCurrentLoginMethod(loginMethod);
399
+ setCurrentVerificationMethod('password');
400
+ setEnteredAccount(accountData);
401
+ var accountFieldName = isEmail ? 'email' : 'phone';
402
+ form.setFieldsValue(_defineProperty(_defineProperty(_defineProperty({}, accountFieldName, accountData), "password", password), "remember_me", true));
403
+ setLoginStep('password');
404
+ setRememberMe(true);
405
+ }
406
+ }
407
+ } catch (error) {
408
+ console.error('Failed to parse last login method:', error);
409
+ }
410
+ }, [loginMethods]);
411
+
412
+ // 检查是否是上次登录方式
413
+ var isLastLoginMethod = useCallback(function (methodType) {
414
+ if (!lastLoginMethod) return false;
415
+ return lastLoginMethod.type === methodType;
416
+ }, [lastLoginMethod]);
417
+
418
+ // 切换验证方式
419
+ var switchVerificationMethod = useCallback(function (method) {
420
+ form.resetFields();
421
+ // 重置登录步骤到第一步
422
+ setLoginStep('account');
423
+ setEnteredAccount('');
424
+ // 更新当前验证方式
425
+ setCurrentVerificationMethod(method);
426
+ }, [form]);
427
+
428
+ // 切换登录方式
429
+ var switchLoginMethod = useCallback(function (method) {
430
+ // 清空所有表单值
431
+ form.resetFields();
432
+
433
+ // 如果在第二步(密码输入步骤)或其他步骤,都回到第一步
434
+ setLoginStep('account');
435
+ setEnteredAccount('');
436
+
437
+ // 清空存储的凭据状态,防止 useEffect 重新应用不匹配的凭据
438
+ setHasStoredCredentials(false);
439
+ setCurrentLoginMethod(method);
440
+
441
+ // 设置新登录方式的默认验证方式
442
+ if (method.type === 'email' || method.type === 'phone') {
443
+ setCurrentVerificationMethod(method.verificationMethods[0]);
444
+ }
445
+ }, [form]);
446
+
447
+ // 处理继续(分步骤登录:验证账号后进入密码页)
448
+ var handleContinueWithAccountInternal = /*#__PURE__*/function () {
449
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
450
+ var accountFieldName, accountValues, _account3, _context$appHelper2, _utils$getStore, _utils$getStore$getSt, utils, shopId, result;
451
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
452
+ while (1) switch (_context3.prev = _context3.next) {
453
+ case 0:
454
+ _context3.prev = 0;
455
+ setLoading(true);
456
+ // 根据当前登录方式确定字段名
457
+ accountFieldName = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone';
458
+ _context3.next = 5;
459
+ return form.validateFields([accountFieldName]);
460
+ case 5:
461
+ accountValues = _context3.sent;
462
+ _account3 = accountValues[accountFieldName]; // 如果是邮箱登录,先检查邮箱是否存在
463
+ if (!((currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' && registerAndLogin)) {
464
+ _context3.next = 28;
465
+ break;
466
+ }
467
+ // 获取 shop_id
468
+ utils = (context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {};
469
+ shopId = ((_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 || (_utils$getStore$getSt = _utils$getStore.getState) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.call(_utils$getStore)) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.shop) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.id) || 9;
470
+ _context3.next = 12;
471
+ return registerAndLogin.checkEmailExists({
472
+ email: _account3,
473
+ shop_id: shopId
474
+ });
475
+ case 12:
476
+ result = _context3.sent;
477
+ if (!(result.status && result.data)) {
478
+ _context3.next = 24;
479
+ break;
480
+ }
481
+ if (!result.data.exists) {
482
+ _context3.next = 20;
483
+ break;
484
+ }
485
+ // 邮箱已注册,可以继续登录流程
486
+ setEnteredAccount(_account3);
487
+ setLoginStep('password');
488
+ // 预填充账号到表单
489
+ form.setFieldsValue(_defineProperty({}, accountFieldName, _account3));
490
+ _context3.next = 22;
491
+ break;
492
+ case 20:
493
+ // 邮箱未注册,提示用户
494
+ message.error(locales.getText('pisell-login2-email-not-registered'));
495
+ return _context3.abrupt("return");
496
+ case 22:
497
+ _context3.next = 26;
498
+ break;
499
+ case 24:
500
+ // API 调用失败
501
+ message.error(result.message || locales.getText('pisell-login2-check-email-failed'));
502
+ return _context3.abrupt("return");
503
+ case 26:
504
+ _context3.next = 31;
505
+ break;
506
+ case 28:
507
+ // 非邮箱登录或其他情况,直接继续
508
+ setEnteredAccount(_account3);
509
+ setLoginStep('password');
510
+ // 预填充账号到表单
511
+ form.setFieldsValue(_defineProperty({}, accountFieldName, _account3));
512
+ case 31:
513
+ _context3.next = 39;
514
+ break;
515
+ case 33:
516
+ _context3.prev = 33;
517
+ _context3.t0 = _context3["catch"](0);
518
+ if (!_context3.t0.errorFields) {
519
+ _context3.next = 37;
520
+ break;
521
+ }
522
+ return _context3.abrupt("return");
523
+ case 37:
524
+ console.error('Continue with account error:', _context3.t0);
525
+ message.error((_context3.t0 === null || _context3.t0 === void 0 ? void 0 : _context3.t0.message) || locales.getText('pisell-login2-continue-failed'));
526
+ case 39:
527
+ _context3.prev = 39;
528
+ setLoading(false);
529
+ return _context3.finish(39);
530
+ case 42:
531
+ case "end":
532
+ return _context3.stop();
533
+ }
534
+ }, _callee3, null, [[0, 33, 39, 42]]);
535
+ }));
536
+ return function handleContinueWithAccountInternal() {
537
+ return _ref4.apply(this, arguments);
538
+ };
539
+ }();
540
+
541
+ // 使用防抖的继续按钮处理函数
542
+ var _useDebounceFn = useDebounceFn(handleContinueWithAccountInternal, {
543
+ wait: 200,
544
+ leading: true,
545
+ trailing: false
546
+ }),
547
+ handleContinueWithAccount = _useDebounceFn.run;
548
+ // 返回到账号输入页
549
+ // 返回到账号输入页
550
+ var handleBackToAccountInternal = function handleBackToAccountInternal() {
551
+ setLoginStep('account');
552
+ form.resetFields(['password']);
553
+ };
554
+
555
+ // 使用防抖的返回账号页处理函数
556
+ var _useDebounceFn2 = useDebounceFn(handleBackToAccountInternal, {
557
+ wait: 200,
558
+ leading: true,
559
+ trailing: false
560
+ }),
561
+ handleBackToAccount = _useDebounceFn2.run;
562
+
563
+ // 发送验证码(验证码登录第一步)
564
+ var handleSendCode = /*#__PURE__*/function () {
565
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
566
+ var accountFieldName, _account4, _type, _res, res, phoneData, _countries$find, _res2;
567
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
568
+ while (1) switch (_context4.prev = _context4.next) {
569
+ case 0:
570
+ _context4.prev = 0;
571
+ accountFieldName = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone'; // 先进行表单验证
572
+ _context4.next = 4;
573
+ return form.validateFields([accountFieldName]);
574
+ case 4:
575
+ _account4 = form.getFieldValue(accountFieldName);
576
+ if (_account4) {
577
+ _context4.next = 8;
578
+ break;
579
+ }
580
+ message.error(locales.getText('pisell-login2-account-required'));
581
+ return _context4.abrupt("return");
582
+ case 8:
583
+ setLoading(true);
584
+ _type = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone'; // 调用实际的 API
585
+ if (!registerAndLogin) {
586
+ _context4.next = 23;
587
+ break;
588
+ }
589
+ if (!(_type === 'email')) {
590
+ _context4.next = 17;
591
+ break;
592
+ }
593
+ _context4.next = 14;
594
+ return registerAndLogin.sendEmailLoginCode({
595
+ type: 'email',
596
+ target: _account4,
597
+ purpose: 'login'
598
+ });
599
+ case 14:
600
+ res = _context4.sent;
601
+ _context4.next = 21;
602
+ break;
603
+ case 17:
604
+ // 处理手机号数据
605
+
606
+ if (typeof _account4 === 'string') {
607
+ // 如果是字符串格式,需要解析
608
+ phoneData = {
609
+ phone: _account4,
610
+ country_calling_code: ((_countries$find = countries.find(function (country) {
611
+ return country.value === _account4;
612
+ })) === null || _countries$find === void 0 ? void 0 : _countries$find.calling_code) || ''
613
+ };
614
+ } else {
615
+ // 如果是对象格式,直接使用
616
+ phoneData = _account4;
617
+ }
618
+
619
+ // 发送手机登录验证码
620
+ _context4.next = 20;
621
+ return registerAndLogin.sendSmsLoginCode(phoneData);
622
+ case 20:
623
+ res = _context4.sent;
624
+ case 21:
625
+ if (!(((_res = res) === null || _res === void 0 ? void 0 : _res.code) !== 200)) {
626
+ _context4.next = 23;
627
+ break;
628
+ }
629
+ throw new Error(((_res2 = res) === null || _res2 === void 0 ? void 0 : _res2.message) || locales.getText('pisell-login2-code-send-failed'));
630
+ case 23:
631
+ _context4.next = 25;
632
+ return onSendVerificationCode === null || onSendVerificationCode === void 0 ? void 0 : onSendVerificationCode(_account4, _type, config.channel);
633
+ case 25:
634
+ // 保存账号并跳转到验证码输入页面
635
+ setEnteredAccount(_account4);
636
+ setLoginStep('code');
637
+ setCountdown(60);
638
+ message.success(locales.getText('pisell-login2-code-sent'));
639
+ _context4.next = 36;
640
+ break;
641
+ case 31:
642
+ _context4.prev = 31;
643
+ _context4.t0 = _context4["catch"](0);
644
+ if (!(_context4.t0 !== null && _context4.t0 !== void 0 && _context4.t0.errorFields)) {
645
+ _context4.next = 35;
646
+ break;
647
+ }
648
+ return _context4.abrupt("return");
649
+ case 35:
650
+ message.error((_context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message) || locales.getText('pisell-login2-code-send-failed'));
651
+ case 36:
652
+ _context4.prev = 36;
653
+ setLoading(false);
654
+ return _context4.finish(36);
655
+ case 39:
656
+ case "end":
657
+ return _context4.stop();
658
+ }
659
+ }, _callee4, null, [[0, 31, 36, 39]]);
660
+ }));
661
+ return function handleSendCode() {
662
+ return _ref5.apply(this, arguments);
663
+ };
664
+ }();
665
+
666
+ // 处理验证码提交(验证码登录第二步)
667
+ var handleCodeSubmit = /*#__PURE__*/function () {
668
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(code) {
669
+ var _method, result, _result, phoneData, _countries$find2, _result2, errorMessage, _error, loginData;
670
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
671
+ while (1) switch (_context5.prev = _context5.next) {
672
+ case 0:
673
+ _context5.prev = 0;
674
+ setLoading(true);
675
+ setCodeError(''); // 清除之前的错误
676
+ _method = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) || 'email';
677
+ if (!registerAndLogin) {
678
+ _context5.next = 22;
679
+ break;
680
+ }
681
+ if (!(_method === 'email')) {
682
+ _context5.next = 11;
683
+ break;
684
+ }
685
+ _context5.next = 8;
686
+ return registerAndLogin.emailCodeLogin({
687
+ email: enteredAccount,
688
+ code: code
689
+ });
690
+ case 8:
691
+ result = _context5.sent;
692
+ _context5.next = 16;
693
+ break;
694
+ case 11:
695
+ if (!(_method === 'phone')) {
696
+ _context5.next = 16;
697
+ break;
698
+ }
699
+ // 处理手机号数据
700
+
701
+ if (typeof enteredAccount === 'string') {
702
+ // 如果是字符串格式,需要解析
703
+ phoneData = {
704
+ phone: enteredAccount,
705
+ country_calling_code: ((_countries$find2 = countries.find(function (country) {
706
+ return country.value === enteredAccount;
707
+ })) === null || _countries$find2 === void 0 ? void 0 : _countries$find2.calling_code) || ''
708
+ };
709
+ } else {
710
+ // 如果是对象格式,直接使用
711
+ phoneData = enteredAccount;
712
+ }
713
+
714
+ // 手机验证码登录
715
+ _context5.next = 15;
716
+ return registerAndLogin.phoneCodeLogin({
717
+ phone: phoneData.phone,
718
+ country_calling_code: phoneData.country_calling_code,
719
+ code: code
720
+ });
721
+ case 15:
722
+ result = _context5.sent;
723
+ case 16:
724
+ if (!(((_result = result) === null || _result === void 0 ? void 0 : _result.code) !== 200)) {
725
+ _context5.next = 22;
726
+ break;
727
+ }
728
+ errorMessage = ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.message) || locales.getText('pisell-login2-login-failed');
729
+ _error = new Error(errorMessage); // 调用错误处理回调
730
+ onError === null || onError === void 0 || onError(_error, _method);
731
+ // 设置错误信息,不抛出错误,让组件显示错误并清空输入
732
+ setCodeError(errorMessage);
733
+ return _context5.abrupt("return");
734
+ case 22:
735
+ // 调用外部回调
736
+ loginData = {
737
+ account: enteredAccount,
738
+ password: undefined,
739
+ verification_code: code,
740
+ remember_me: false
741
+ };
742
+ _context5.next = 25;
743
+ return onLogin === null || onLogin === void 0 ? void 0 : onLogin(result.data, _method, loginData, config.channel);
744
+ case 25:
745
+ message.success(locales.getText('pisell-login2-login-success'));
746
+ _context5.next = 31;
747
+ break;
748
+ case 28:
749
+ _context5.prev = 28;
750
+ _context5.t0 = _context5["catch"](0);
751
+ // 设置错误信息,显示在组件下方
752
+ setCodeError((_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.message) || locales.getText('pisell-login2-login-failed'));
753
+ case 31:
754
+ _context5.prev = 31;
755
+ setLoading(false);
756
+ return _context5.finish(31);
757
+ case 34:
758
+ case "end":
759
+ return _context5.stop();
760
+ }
761
+ }, _callee5, null, [[0, 28, 31, 34]]);
762
+ }));
763
+ return function handleCodeSubmit(_x) {
764
+ return _ref6.apply(this, arguments);
765
+ };
766
+ }();
767
+
768
+ // 从验证码页面返回
769
+ var handleBackFromCode = function handleBackFromCode() {
770
+ setLoginStep('account');
771
+ form.resetFields();
772
+ setCodeError(''); // 清除验证码错误
773
+ };
774
+
775
+ // 打开忘记密码流程
776
+ // 打开忘记密码流程
777
+ var handleForgotPasswordClickInternal = function handleForgotPasswordClickInternal() {
778
+ var accountFieldName = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone';
779
+ var account = form.getFieldValue(accountFieldName);
780
+ setEnteredAccount(account || '');
781
+ setShowForgotPassword(true);
782
+ };
783
+
784
+ // 使用防抖的忘记密码处理函数
785
+ var _useDebounceFn3 = useDebounceFn(handleForgotPasswordClickInternal, {
786
+ wait: 200,
787
+ leading: true,
788
+ trailing: false
789
+ }),
790
+ handleForgotPasswordClick = _useDebounceFn3.run;
791
+
792
+ // 关闭忘记密码流程
793
+ var handleCloseForgotPassword = function handleCloseForgotPassword() {
794
+ setShowForgotPassword(false);
795
+ setCountdown(0);
796
+ };
797
+
798
+ // 忘记密码 - 发送重置密码链接
799
+ var handleForgotPasswordSendLink = /*#__PURE__*/function () {
800
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(account) {
801
+ var res;
802
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
803
+ while (1) switch (_context6.prev = _context6.next) {
804
+ case 0:
805
+ _context6.prev = 0;
806
+ setLoading(true);
807
+ if (!registerAndLogin) {
808
+ _context6.next = 8;
809
+ break;
810
+ }
811
+ _context6.next = 5;
812
+ return registerAndLogin.sendResetPasswordLink({
813
+ email: account
814
+ });
815
+ case 5:
816
+ res = _context6.sent;
817
+ if (res.status) {
818
+ _context6.next = 8;
819
+ break;
820
+ }
821
+ throw new Error(res.message || '发送重置密码链接失败');
822
+ case 8:
823
+ message.success(locales.getText('pisell-forgot-password-link-sent'));
824
+ _context6.next = 15;
825
+ break;
826
+ case 11:
827
+ _context6.prev = 11;
828
+ _context6.t0 = _context6["catch"](0);
829
+ message.error((_context6.t0 === null || _context6.t0 === void 0 ? void 0 : _context6.t0.message) || '发送重置密码链接失败');
830
+ throw _context6.t0;
831
+ case 15:
832
+ _context6.prev = 15;
833
+ setLoading(false);
834
+ return _context6.finish(15);
835
+ case 18:
836
+ case "end":
837
+ return _context6.stop();
838
+ }
839
+ }, _callee6, null, [[0, 11, 15, 18]]);
840
+ }));
841
+ return function handleForgotPasswordSendLink(_x2) {
842
+ return _ref7.apply(this, arguments);
843
+ };
844
+ }();
845
+
846
+ // 忘记密码 - 发送验证码
847
+ var handleForgotPasswordSendCode = /*#__PURE__*/function () {
848
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(account) {
849
+ var _type2, res, phoneAccount, _res3;
850
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
851
+ while (1) switch (_context7.prev = _context7.next) {
852
+ case 0:
853
+ _context7.prev = 0;
854
+ setLoading(true);
855
+ _type2 = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone';
856
+ if (!registerAndLogin) {
857
+ _context7.next = 18;
858
+ break;
859
+ }
860
+ if (!(_type2 === 'email')) {
861
+ _context7.next = 12;
862
+ break;
863
+ }
864
+ _context7.next = 7;
865
+ return registerAndLogin.sendPasswordResetEmail({
866
+ email: account
867
+ });
868
+ case 7:
869
+ res = _context7.sent;
870
+ if (res.status) {
871
+ _context7.next = 10;
872
+ break;
873
+ }
874
+ throw new Error(res.message || locales.getText('pisell-login2-code-send-failed'));
875
+ case 10:
876
+ _context7.next = 18;
877
+ break;
878
+ case 12:
879
+ // 处理手机号对象格式
880
+ phoneAccount = account;
881
+ _context7.next = 15;
882
+ return registerAndLogin.sendPasswordResetSms({
883
+ phone: phoneAccount.phone,
884
+ country_calling_code: phoneAccount.country_calling_code
885
+ });
886
+ case 15:
887
+ _res3 = _context7.sent;
888
+ if (_res3.status) {
889
+ _context7.next = 18;
890
+ break;
891
+ }
892
+ throw new Error(_res3.message || locales.getText('pisell-login2-code-send-failed'));
893
+ case 18:
894
+ setCountdown(60);
895
+ message.success(locales.getText('pisell-login2-code-sent'));
896
+ _context7.next = 26;
897
+ break;
898
+ case 22:
899
+ _context7.prev = 22;
900
+ _context7.t0 = _context7["catch"](0);
901
+ message.error((_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.message) || locales.getText('pisell-login2-code-send-failed'));
902
+ throw _context7.t0;
903
+ case 26:
904
+ _context7.prev = 26;
905
+ setLoading(false);
906
+ return _context7.finish(26);
907
+ case 29:
908
+ case "end":
909
+ return _context7.stop();
910
+ }
911
+ }, _callee7, null, [[0, 22, 26, 29]]);
912
+ }));
913
+ return function handleForgotPasswordSendCode(_x3) {
914
+ return _ref8.apply(this, arguments);
915
+ };
916
+ }();
917
+
918
+ // 忘记密码 - 验证验证码
919
+ var handleForgotPasswordVerifyCode = /*#__PURE__*/function () {
920
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(account, code) {
921
+ var _context$appHelper3, _utils$getStore2, _utils$getStore2$getS, utils, shopId, isPhoneAccount, res, phoneData;
922
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
923
+ while (1) switch (_context8.prev = _context8.next) {
924
+ case 0:
925
+ _context8.prev = 0;
926
+ setLoading(true);
927
+ if (!registerAndLogin) {
928
+ _context8.next = 20;
929
+ break;
930
+ }
931
+ // 获取 shop_id
932
+ utils = (context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.utils) || {};
933
+ shopId = ((_utils$getStore2 = utils.getStore) === null || _utils$getStore2 === void 0 || (_utils$getStore2 = _utils$getStore2.call(utils)) === null || _utils$getStore2 === void 0 || (_utils$getStore2$getS = _utils$getStore2.getState) === null || _utils$getStore2$getS === void 0 || (_utils$getStore2$getS = _utils$getStore2$getS.call(_utils$getStore2)) === null || _utils$getStore2$getS === void 0 || (_utils$getStore2$getS = _utils$getStore2$getS.global) === null || _utils$getStore2$getS === void 0 || (_utils$getStore2$getS = _utils$getStore2$getS.shop) === null || _utils$getStore2$getS === void 0 ? void 0 : _utils$getStore2$getS.id) || 9; // 判断账号类型
934
+ isPhoneAccount = _typeof(account) === 'object' && 'phone' in account;
935
+ if (isPhoneAccount) {
936
+ _context8.next = 12;
937
+ break;
938
+ }
939
+ _context8.next = 9;
940
+ return registerAndLogin.checkEmailCode({
941
+ email: account,
942
+ shop_id: shopId,
943
+ code: code,
944
+ action: 'customer_reset_password_code'
945
+ });
946
+ case 9:
947
+ res = _context8.sent;
948
+ _context8.next = 16;
949
+ break;
950
+ case 12:
951
+ // 手机验证码
952
+ phoneData = account;
953
+ _context8.next = 15;
954
+ return registerAndLogin.checkMobileCode({
955
+ phone: phoneData.phone,
956
+ country_calling_code: phoneData.country_calling_code,
957
+ code: code,
958
+ action: 'forget'
959
+ });
960
+ case 15:
961
+ res = _context8.sent;
962
+ case 16:
963
+ if (res.status) {
964
+ _context8.next = 18;
965
+ break;
966
+ }
967
+ throw new Error(res.message || '验证码验证失败');
968
+ case 18:
969
+ if (res.data.valid) {
970
+ _context8.next = 20;
971
+ break;
972
+ }
973
+ throw new Error(locales.getText('pisell-login2-code-verify-failed'));
974
+ case 20:
975
+ _context8.next = 26;
976
+ break;
977
+ case 22:
978
+ _context8.prev = 22;
979
+ _context8.t0 = _context8["catch"](0);
980
+ message.error((_context8.t0 === null || _context8.t0 === void 0 ? void 0 : _context8.t0.message) || '验证码验证失败');
981
+ throw _context8.t0;
982
+ case 26:
983
+ _context8.prev = 26;
984
+ setLoading(false);
985
+ return _context8.finish(26);
986
+ case 29:
987
+ case "end":
988
+ return _context8.stop();
989
+ }
990
+ }, _callee8, null, [[0, 22, 26, 29]]);
991
+ }));
992
+ return function handleForgotPasswordVerifyCode(_x4, _x5) {
993
+ return _ref9.apply(this, arguments);
994
+ };
995
+ }();
996
+
997
+ // 忘记密码 - 重置密码
998
+ var handleForgotPasswordReset = /*#__PURE__*/function () {
999
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(account, password, code) {
1000
+ var _isPhoneAccount, resetPasswordParams, res, isPhoneAccount, phoneMethod, emailMethod;
1001
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1002
+ while (1) switch (_context9.prev = _context9.next) {
1003
+ case 0:
1004
+ _context9.prev = 0;
1005
+ setLoading(true);
1006
+ if (!registerAndLogin) {
1007
+ _context9.next = 10;
1008
+ break;
1009
+ }
1010
+ // 判断账号类型
1011
+ _isPhoneAccount = _typeof(account) === 'object' && 'phone' in account;
1012
+ if (_isPhoneAccount) {
1013
+ // 手机号格式
1014
+ resetPasswordParams = {
1015
+ type: 'phone',
1016
+ target: {
1017
+ phone: account.phone,
1018
+ country_calling_code: account.country_calling_code
1019
+ },
1020
+ password: password,
1021
+ code: code
1022
+ };
1023
+ } else {
1024
+ // 邮箱格式
1025
+ resetPasswordParams = {
1026
+ type: 'email',
1027
+ target: {
1028
+ email: account
1029
+ },
1030
+ password: password,
1031
+ code: code
1032
+ };
1033
+ }
1034
+ _context9.next = 7;
1035
+ return registerAndLogin.resetPassword(resetPasswordParams);
1036
+ case 7:
1037
+ res = _context9.sent;
1038
+ if (!((res === null || res === void 0 ? void 0 : res.code) !== 200)) {
1039
+ _context9.next = 10;
1040
+ break;
1041
+ }
1042
+ throw new Error((res === null || res === void 0 ? void 0 : res.message) || '密码重置失败');
1043
+ case 10:
1044
+ // 重置成功后关闭忘记密码流程
1045
+ handleCloseForgotPassword();
1046
+
1047
+ // 根据账号类型自动切换登录方式并预填充账号
1048
+ isPhoneAccount = _typeof(account) === 'object' && 'phone' in account;
1049
+ if (isPhoneAccount) {
1050
+ // 手机号重置密码成功,切换到手机号登录
1051
+ phoneMethod = config.loginMethods.find(function (method) {
1052
+ return method.type === 'phone';
1053
+ });
1054
+ if (phoneMethod) {
1055
+ setCurrentLoginMethod(phoneMethod);
1056
+ setCurrentVerificationMethod(phoneMethod.verificationMethods[0]);
1057
+ }
1058
+
1059
+ // 预填充手机号到表单
1060
+ form.setFieldsValue({
1061
+ phone: account
1062
+ });
1063
+ setEnteredAccount(account);
1064
+ } else {
1065
+ // 邮箱重置密码成功,切换到邮箱登录
1066
+ emailMethod = config.loginMethods.find(function (method) {
1067
+ return method.type === 'email';
1068
+ });
1069
+ if (emailMethod) {
1070
+ setCurrentLoginMethod(emailMethod);
1071
+ setCurrentVerificationMethod(emailMethod.verificationMethods[0]);
1072
+ }
1073
+
1074
+ // 预填充邮箱到表单
1075
+ form.setFieldsValue({
1076
+ email: account
1077
+ });
1078
+ setEnteredAccount(account);
1079
+ }
1080
+
1081
+ // 重置登录步骤到账号输入页面
1082
+ setLoginStep('account');
1083
+ _context9.next = 19;
1084
+ break;
1085
+ case 16:
1086
+ _context9.prev = 16;
1087
+ _context9.t0 = _context9["catch"](0);
1088
+ message.error((_context9.t0 === null || _context9.t0 === void 0 ? void 0 : _context9.t0.message) || '密码重置失败');
1089
+ // throw error;
1090
+ case 19:
1091
+ _context9.prev = 19;
1092
+ setLoading(false);
1093
+ return _context9.finish(19);
1094
+ case 22:
1095
+ case "end":
1096
+ return _context9.stop();
1097
+ }
1098
+ }, _callee9, null, [[0, 16, 19, 22]]);
1099
+ }));
1100
+ return function handleForgotPasswordReset(_x6, _x7, _x8) {
1101
+ return _ref10.apply(this, arguments);
1102
+ };
1103
+ }();
1104
+
1105
+ // 邮件链接重置密码
1106
+ var handleEmailLinkResetPassword = /*#__PURE__*/function () {
1107
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(account, password, code) {
1108
+ var res;
1109
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1110
+ while (1) switch (_context10.prev = _context10.next) {
1111
+ case 0:
1112
+ _context10.prev = 0;
1113
+ setLoading(true);
1114
+ if (!registerAndLogin) {
1115
+ _context10.next = 8;
1116
+ break;
1117
+ }
1118
+ _context10.next = 5;
1119
+ return registerAndLogin.resetPasswordByCode({
1120
+ code: config.emailLinkVerification.code,
1121
+ password: password
1122
+ });
1123
+ case 5:
1124
+ res = _context10.sent;
1125
+ if (!((res === null || res === void 0 ? void 0 : res.code) !== 200)) {
1126
+ _context10.next = 8;
1127
+ break;
1128
+ }
1129
+ throw new Error((res === null || res === void 0 ? void 0 : res.message) || '密码重置失败');
1130
+ case 8:
1131
+ // 重置成功后关闭忘记密码流程并重置邮件链接验证状态
1132
+ handleCloseForgotPassword();
1133
+ setEmailLinkVerifyStatus(null);
1134
+ message.success('密码重置成功');
1135
+ _context10.next = 17;
1136
+ break;
1137
+ case 13:
1138
+ _context10.prev = 13;
1139
+ _context10.t0 = _context10["catch"](0);
1140
+ message.error((_context10.t0 === null || _context10.t0 === void 0 ? void 0 : _context10.t0.message) || '密码重置失败');
1141
+ throw _context10.t0;
1142
+ case 17:
1143
+ _context10.prev = 17;
1144
+ setLoading(false);
1145
+ return _context10.finish(17);
1146
+ case 20:
1147
+ case "end":
1148
+ return _context10.stop();
1149
+ }
1150
+ }, _callee10, null, [[0, 13, 17, 20]]);
1151
+ }));
1152
+ return function handleEmailLinkResetPassword(_x9, _x10, _x11) {
1153
+ return _ref11.apply(this, arguments);
1154
+ };
1155
+ }();
1156
+
1157
+ // 处理 Guest 登录
1158
+ var handleGuestLoginInternal = /*#__PURE__*/function () {
1159
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
1160
+ var result, loginMethodInfo;
1161
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1162
+ while (1) switch (_context11.prev = _context11.next) {
1163
+ case 0:
1164
+ _context11.prev = 0;
1165
+ setLoading(true);
1166
+ if (!registerAndLogin) {
1167
+ _context11.next = 7;
1168
+ break;
1169
+ }
1170
+ _context11.next = 5;
1171
+ return registerAndLogin.guestLogin();
1172
+ case 5:
1173
+ result = _context11.sent;
1174
+ if (result.code === 200) {
1175
+ message.success(locales.getText('pisell-login2-login-success'));
1176
+
1177
+ // 记录本次登录方式到localStorage
1178
+ loginMethodInfo = {
1179
+ type: 'guest',
1180
+ verificationMethod: null,
1181
+ timestamp: Date.now()
1182
+ };
1183
+ storage.set('pisell_last_login_method', JSON.stringify(loginMethodInfo));
1184
+ onLogin === null || onLogin === void 0 || onLogin(result.data, 'guest', {
1185
+ account: 'guest',
1186
+ password: undefined
1187
+ }, config.channel);
1188
+ } else {
1189
+ message.error(result.message || locales.getText('pisell-login2-login-failed'));
1190
+ }
1191
+ case 7:
1192
+ _context11.next = 13;
1193
+ break;
1194
+ case 9:
1195
+ _context11.prev = 9;
1196
+ _context11.t0 = _context11["catch"](0);
1197
+ console.error('Guest login error:', _context11.t0);
1198
+ message.error(locales.getText('pisell-login2-login-failed'));
1199
+ case 13:
1200
+ _context11.prev = 13;
1201
+ setLoading(false);
1202
+ return _context11.finish(13);
1203
+ case 16:
1204
+ case "end":
1205
+ return _context11.stop();
1206
+ }
1207
+ }, _callee11, null, [[0, 9, 13, 16]]);
1208
+ }));
1209
+ return function handleGuestLoginInternal() {
1210
+ return _ref12.apply(this, arguments);
1211
+ };
1212
+ }();
1213
+
1214
+ // 使用防抖的Guest登录处理函数
1215
+ var _useDebounceFn4 = useDebounceFn(handleGuestLoginInternal, {
1216
+ wait: 200,
1217
+ leading: true,
1218
+ trailing: false
1219
+ }),
1220
+ handleGuestLogin = _useDebounceFn4.run;
1221
+ var oauthProviders = useMemo(function () {
1222
+ return loginMethods.filter(function (method) {
1223
+ return ['google', 'facebook', 'apple', 'guest'].includes(method.type);
1224
+ }).map(function (method) {
1225
+ var isLast = isLastLoginMethod(method.type);
1226
+ var commonConfig = {
1227
+ className: classNames('login2-oauth-button', method.type, {
1228
+ 'has-last-login-badge': isLast
1229
+ }),
1230
+ badge: isLast ? locales.getText('pisell-login2-last-login-badge') : undefined,
1231
+ badgeClassName: 'last-login-badge'
1232
+ };
1233
+ switch (method.type) {
1234
+ case 'google':
1235
+ return _objectSpread({
1236
+ key: 'google',
1237
+ label: /*#__PURE__*/React.createElement("span", null, locales.getText('pisell-login2-continue-with'), " Google"),
1238
+ icon: /*#__PURE__*/React.createElement(Iconfont, {
1239
+ type: "pisell2-google"
1240
+ }),
1241
+ onClick: function onClick() {
1242
+ return handleOAuthClick('google');
1243
+ }
1244
+ }, commonConfig);
1245
+ case 'facebook':
1246
+ return _objectSpread({
1247
+ key: 'facebook',
1248
+ label: /*#__PURE__*/React.createElement("span", null, locales.getText('pisell-login2-continue-with'), " Facebook"),
1249
+ icon: /*#__PURE__*/React.createElement(Iconfont, {
1250
+ type: "pisell2-facebook"
1251
+ }),
1252
+ onClick: function onClick() {
1253
+ return handleOAuthClick('facebook');
1254
+ }
1255
+ }, commonConfig);
1256
+ case 'apple':
1257
+ return _objectSpread({
1258
+ key: 'apple',
1259
+ label: /*#__PURE__*/React.createElement("span", null, locales.getText('pisell-login2-continue-with'), " Apple"),
1260
+ icon: /*#__PURE__*/React.createElement(Iconfont, {
1261
+ type: "pisell2-apple"
1262
+ }),
1263
+ onClick: function onClick() {
1264
+ return handleOAuthClick('apple');
1265
+ }
1266
+ }, commonConfig);
1267
+ case 'guest':
1268
+ return _objectSpread({
1269
+ key: 'guest',
1270
+ label: locales.getText('pisell-login2-login-as-guest'),
1271
+ icon: /*#__PURE__*/React.createElement(Iconfont, {
1272
+ type: "pisell2-user-01"
1273
+ }),
1274
+ onClick: handleGuestLogin
1275
+ }, commonConfig);
1276
+ default:
1277
+ return null;
1278
+ }
1279
+ }).filter(Boolean);
1280
+ }, [handleGuestLogin, handleOAuthClick, isLastLoginMethod, loginMethods]);
1281
+
1282
+ // 处理登录
1283
+ var handleLoginInternal = /*#__PURE__*/function () {
1284
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
1285
+ var values, accountFieldName, _account5, loginData, _method2, result, _result3, phoneData, _countries$find3, _result4, loginMethodInfo;
1286
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
1287
+ while (1) switch (_context12.prev = _context12.next) {
1288
+ case 0:
1289
+ _context12.prev = 0;
1290
+ setLoading(true);
1291
+ _context12.next = 4;
1292
+ return form.validateFields();
1293
+ case 4:
1294
+ values = _context12.sent;
1295
+ // 在分步骤登录模式下,账号从表单字段获取(支持编辑)
1296
+ accountFieldName = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone';
1297
+ _account5 = values[accountFieldName] || values.account; // 兼容旧的 account
1298
+ loginData = {
1299
+ account: _account5,
1300
+ password: currentVerificationMethod === 'password' ? values.password : undefined,
1301
+ verification_code: currentVerificationMethod === 'verification_code' ? values.verification_code : undefined,
1302
+ remember_me: values.remember_me
1303
+ };
1304
+ _method2 = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) || 'email';
1305
+ if (!registerAndLogin) {
1306
+ _context12.next = 35;
1307
+ break;
1308
+ }
1309
+ if (!(_method2 === 'email')) {
1310
+ _context12.next = 22;
1311
+ break;
1312
+ }
1313
+ if (!(currentVerificationMethod === 'password')) {
1314
+ _context12.next = 17;
1315
+ break;
1316
+ }
1317
+ _context12.next = 14;
1318
+ return registerAndLogin.emailPasswordLogin({
1319
+ email: _account5,
1320
+ password: values.password
1321
+ });
1322
+ case 14:
1323
+ result = _context12.sent;
1324
+ _context12.next = 20;
1325
+ break;
1326
+ case 17:
1327
+ _context12.next = 19;
1328
+ return registerAndLogin.emailCodeLogin({
1329
+ email: _account5,
1330
+ code: values.verification_code
1331
+ });
1332
+ case 19:
1333
+ result = _context12.sent;
1334
+ case 20:
1335
+ _context12.next = 33;
1336
+ break;
1337
+ case 22:
1338
+ if (!(_method2 === 'phone')) {
1339
+ _context12.next = 33;
1340
+ break;
1341
+ }
1342
+ // 处理手机号数据
1343
+
1344
+ if (typeof _account5 === 'string') {
1345
+ // 如果是字符串格式,需要解析
1346
+ phoneData = {
1347
+ phone: _account5,
1348
+ country_calling_code: ((_countries$find3 = countries.find(function (country) {
1349
+ return country.value === _account5;
1350
+ })) === null || _countries$find3 === void 0 ? void 0 : _countries$find3.calling_code) || ''
1351
+ };
1352
+ } else {
1353
+ // 如果是对象格式,直接使用
1354
+ phoneData = _account5;
1355
+ }
1356
+ if (!(currentVerificationMethod === 'password')) {
1357
+ _context12.next = 30;
1358
+ break;
1359
+ }
1360
+ _context12.next = 27;
1361
+ return registerAndLogin.phonePasswordLogin({
1362
+ phone: phoneData.phone,
1363
+ country_calling_code: phoneData.country_calling_code,
1364
+ password: values.password
1365
+ });
1366
+ case 27:
1367
+ result = _context12.sent;
1368
+ _context12.next = 33;
1369
+ break;
1370
+ case 30:
1371
+ _context12.next = 32;
1372
+ return registerAndLogin.phoneCodeLogin({
1373
+ phone: phoneData.phone,
1374
+ country_calling_code: phoneData.country_calling_code,
1375
+ code: values.verification_code
1376
+ });
1377
+ case 32:
1378
+ result = _context12.sent;
1379
+ case 33:
1380
+ if (!(((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.code) !== 200)) {
1381
+ _context12.next = 35;
1382
+ break;
1383
+ }
1384
+ throw new Error(((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.message) || locales.getText('pisell-login2-login-failed'));
1385
+ case 35:
1386
+ _context12.next = 37;
1387
+ return onLogin === null || onLogin === void 0 ? void 0 : onLogin(result.data, _method2, loginData, config.channel);
1388
+ case 37:
1389
+ // 记录本次登录方式到localStorage
1390
+ loginMethodInfo = {
1391
+ type: _method2,
1392
+ verificationMethod: currentVerificationMethod,
1393
+ timestamp: Date.now()
1394
+ };
1395
+ storage.set('pisell_last_login_method', JSON.stringify(loginMethodInfo));
1396
+
1397
+ // 登录成功后处理 Remember me
1398
+ if (values.remember_me && _account5) {
1399
+ storage.set('login_account', JSON.stringify(_account5));
1400
+ storage.set('login_remember_me', 'true');
1401
+ if (currentVerificationMethod === 'password') {
1402
+ storage.set('login_password', values.password);
1403
+ }
1404
+ // 同步更新 enteredAccount 状态
1405
+ setEnteredAccount(_account5);
1406
+ } else {
1407
+ storage.remove('login_account');
1408
+ storage.remove('login_remember_me');
1409
+ storage.remove('login_password');
1410
+ }
1411
+ message.success(locales.getText('pisell-login2-login-success'));
1412
+ _context12.next = 48;
1413
+ break;
1414
+ case 43:
1415
+ _context12.prev = 43;
1416
+ _context12.t0 = _context12["catch"](0);
1417
+ if (!_context12.t0.errorFields) {
1418
+ _context12.next = 47;
1419
+ break;
1420
+ }
1421
+ return _context12.abrupt("return");
1422
+ case 47:
1423
+ message.error((_context12.t0 === null || _context12.t0 === void 0 ? void 0 : _context12.t0.message) || locales.getText('pisell-login2-login-failed'));
1424
+ case 48:
1425
+ _context12.prev = 48;
1426
+ setLoading(false);
1427
+ return _context12.finish(48);
1428
+ case 51:
1429
+ case "end":
1430
+ return _context12.stop();
1431
+ }
1432
+ }, _callee12, null, [[0, 43, 48, 51]]);
1433
+ }));
1434
+ return function handleLoginInternal() {
1435
+ return _ref13.apply(this, arguments);
1436
+ };
1437
+ }();
1438
+
1439
+ // 使用防抖的登录处理函数
1440
+ var _useDebounceFn5 = useDebounceFn(handleLoginInternal, {
1441
+ wait: 1000,
1442
+ leading: true,
1443
+ trailing: false
1444
+ }),
1445
+ handleLogin = _useDebounceFn5.run;
1446
+
1447
+ // 处理三方登录
1448
+ var handleOAuthClickInternal = /*#__PURE__*/function () {
1449
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(provider) {
1450
+ var _config$loginMethods, fbConfig, token, res, _config$loginMethods2, appleConfig, _token, _res4;
1451
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
1452
+ while (1) switch (_context13.prev = _context13.next) {
1453
+ case 0:
1454
+ _context13.prev = 0;
1455
+ setLoading(true);
1456
+ if (!(provider === 'facebook')) {
1457
+ _context13.next = 15;
1458
+ break;
1459
+ }
1460
+ fbConfig = config === null || config === void 0 || (_config$loginMethods = config.loginMethods) === null || _config$loginMethods === void 0 ? void 0 : _config$loginMethods.find(function (n) {
1461
+ return n.type === 'facebook';
1462
+ });
1463
+ token = fbConfig === null || fbConfig === void 0 ? void 0 : fbConfig.appId;
1464
+ if (!token) {
1465
+ _context13.next = 12;
1466
+ break;
1467
+ }
1468
+ _context13.next = 8;
1469
+ return registerAndLogin.loginWithFacebook(token);
1470
+ case 8:
1471
+ res = _context13.sent;
1472
+ if (res.status) {
1473
+ onLogin === null || onLogin === void 0 || onLogin(res.data, 'facebook', {
1474
+ account: '',
1475
+ password: ''
1476
+ }, config.channel);
1477
+ }
1478
+ _context13.next = 13;
1479
+ break;
1480
+ case 12:
1481
+ throw new Error('Facebook app_id not configured');
1482
+ case 13:
1483
+ _context13.next = 30;
1484
+ break;
1485
+ case 15:
1486
+ if (!(provider === 'apple')) {
1487
+ _context13.next = 28;
1488
+ break;
1489
+ }
1490
+ appleConfig = config === null || config === void 0 || (_config$loginMethods2 = config.loginMethods) === null || _config$loginMethods2 === void 0 ? void 0 : _config$loginMethods2.find(function (n) {
1491
+ return n.type === 'apple';
1492
+ });
1493
+ _token = appleConfig === null || appleConfig === void 0 ? void 0 : appleConfig.clientId;
1494
+ if (!_token) {
1495
+ _context13.next = 25;
1496
+ break;
1497
+ }
1498
+ _context13.next = 21;
1499
+ return registerAndLogin.loginWithApple(_token);
1500
+ case 21:
1501
+ _res4 = _context13.sent;
1502
+ onLogin === null || onLogin === void 0 || onLogin(_res4.data, 'apple', {
1503
+ account: '',
1504
+ password: ''
1505
+ }, config.channel);
1506
+ _context13.next = 26;
1507
+ break;
1508
+ case 25:
1509
+ throw new Error('Apple client_id not configured');
1510
+ case 26:
1511
+ _context13.next = 30;
1512
+ break;
1513
+ case 28:
1514
+ _context13.next = 30;
1515
+ return onOAuthLogin === null || onOAuthLogin === void 0 ? void 0 : onOAuthLogin(provider, config.channel);
1516
+ case 30:
1517
+ _context13.next = 37;
1518
+ break;
1519
+ case 32:
1520
+ _context13.prev = 32;
1521
+ _context13.t0 = _context13["catch"](0);
1522
+ if (!(_context13.t0.message === 'facebook_login_cancel')) {
1523
+ _context13.next = 36;
1524
+ break;
1525
+ }
1526
+ return _context13.abrupt("return", message.error(locales.getText('pisell-register2-facebook-login-canceled')));
1527
+ case 36:
1528
+ message.error((_context13.t0 === null || _context13.t0 === void 0 ? void 0 : _context13.t0.message) || locales.getText('pisell-login2-login-failed'));
1529
+ case 37:
1530
+ _context13.prev = 37;
1531
+ setLoading(false);
1532
+ return _context13.finish(37);
1533
+ case 40:
1534
+ case "end":
1535
+ return _context13.stop();
1536
+ }
1537
+ }, _callee13, null, [[0, 32, 37, 40]]);
1538
+ }));
1539
+ return function handleOAuthClickInternal(_x12) {
1540
+ return _ref14.apply(this, arguments);
1541
+ };
1542
+ }();
1543
+
1544
+ // 使用防抖的OAuth登录处理函数
1545
+ var _useDebounceFn6 = useDebounceFn(handleOAuthClickInternal, {
1546
+ wait: 200,
1547
+ leading: true,
1548
+ trailing: false
1549
+ }),
1550
+ handleOAuthClick = _useDebounceFn6.run;
1551
+
1552
+ // 渲染主登录表单
1553
+ var renderMainLoginForm = function renderMainLoginForm() {
1554
+ var _config$ui2, _config$ui3, _config$ui4, _config$ui5, _config$ui8, _config$ui9;
1555
+ if (!currentLoginMethod) return null;
1556
+ var type = currentLoginMethod.type;
1557
+
1558
+ // OAuth 类型和 Guest 登录不在主表单区域显示,而是在 switch-options 区域显示
1559
+ if (type === 'google' || type === 'facebook' || type === 'apple' || type === 'guest') {
1560
+ return null;
1561
+ }
1562
+
1563
+ // 检查是否有邮箱或手机登录方法
1564
+ var hasEmailOrPhoneMethod = loginMethods.some(function (method) {
1565
+ return method.type === 'email' || method.type === 'phone';
1566
+ });
1567
+
1568
+ // 如果没有邮箱或手机登录方法,不渲染主输入表单
1569
+ if (!hasEmailOrPhoneMethod) {
1570
+ return null;
1571
+ }
1572
+ var isEmail = type === 'email';
1573
+ var isPhone = type === 'phone';
1574
+
1575
+ // 根据当前模式获取账号字段名(用于区分浏览器自动填充)
1576
+ var accountFieldName = isEmail ? 'email' : 'phone';
1577
+
1578
+ // 辅助函数:根据当前模式获取账号值
1579
+ var getAccountValue = function getAccountValue(values) {
1580
+ if (values) {
1581
+ return values[accountFieldName] || values.account; // 兼容旧的 account
1582
+ }
1583
+ return form.getFieldValue(accountFieldName) || form.getFieldValue('account');
1584
+ };
1585
+ var accountLabel = isEmail ? ((_config$ui2 = config.ui) === null || _config$ui2 === void 0 || (_config$ui2 = _config$ui2.formLabels) === null || _config$ui2 === void 0 || (_config$ui2 = _config$ui2.email) === null || _config$ui2 === void 0 ? void 0 : _config$ui2.show) !== false ? ((_config$ui3 = config.ui) === null || _config$ui3 === void 0 || (_config$ui3 = _config$ui3.formLabels) === null || _config$ui3 === void 0 || (_config$ui3 = _config$ui3.email) === null || _config$ui3 === void 0 ? void 0 : _config$ui3.text) || locales.getText('pisell-login2-email-label') : undefined : ((_config$ui4 = config.ui) === null || _config$ui4 === void 0 || (_config$ui4 = _config$ui4.formLabels) === null || _config$ui4 === void 0 || (_config$ui4 = _config$ui4.phone) === null || _config$ui4 === void 0 ? void 0 : _config$ui4.show) !== false ? ((_config$ui5 = config.ui) === null || _config$ui5 === void 0 || (_config$ui5 = _config$ui5.formLabels) === null || _config$ui5 === void 0 || (_config$ui5 = _config$ui5.phone) === null || _config$ui5 === void 0 ? void 0 : _config$ui5.text) || locales.getText('pisell-login2-phone-label') : undefined;
1586
+ var accountPlaceholder = isEmail ? locales.getText('pisell-login2-email-placeholder') : locales.getText('pisell-login2-phone-placeholder');
1587
+ var accountRules = isEmail ? [{
1588
+ required: true,
1589
+ message: locales.getText('pisell-login2-email-required')
1590
+ }, {
1591
+ type: 'email',
1592
+ message: locales.getText('pisell-login2-email-invalid')
1593
+ }] : createPhoneValidationRules(locales.getText, true);
1594
+
1595
+ // 判断是否使用分步骤登录
1596
+ var useStepByStep = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.stepByStep) && currentVerificationMethod === 'password';
1597
+
1598
+ // 分步骤登录 - 合并步骤1和步骤2为同一表单,通过条件渲染控制显示
1599
+ if (useStepByStep) {
1600
+ var _getAccountValue, _getAccountValue2, _config$ui6, _config$ui7;
1601
+ var isPasswordStep = loginStep === 'password';
1602
+ var showPasswordField = isPasswordStep;
1603
+
1604
+ // 处理表单提交(仅用于用户主动触发,防止自动触发)
1605
+ var handleFormSubmit = function handleFormSubmit(e) {
1606
+ e === null || e === void 0 || e.preventDefault();
1607
+ if (isPasswordStep) {
1608
+ handleLogin();
1609
+ } else {
1610
+ handleContinueWithAccount();
1611
+ }
1612
+ };
1613
+ return /*#__PURE__*/React.createElement(Form, {
1614
+ form: form,
1615
+ layout: "vertical",
1616
+ className: "login2-form",
1617
+ size: "large"
1618
+ }, (isEmail || isPhone) && !showPasswordField && /*#__PURE__*/React.createElement("div", {
1619
+ style: {
1620
+ position: 'absolute',
1621
+ left: '-9999px',
1622
+ opacity: 0,
1623
+ pointerEvents: 'none'
1624
+ }
1625
+ }, /*#__PURE__*/React.createElement("input", {
1626
+ type: "text",
1627
+ name: "username",
1628
+ autoComplete: "username",
1629
+ tabIndex: -1,
1630
+ readOnly: true,
1631
+ "aria-hidden": "true"
1632
+ })), showPasswordField && /*#__PURE__*/React.createElement("div", {
1633
+ className: "login2-account-show-text-edit"
1634
+ }, /*#__PURE__*/React.createElement("span", {
1635
+ className: "login2-account-show-text-edit-text"
1636
+ }, isPhone && "+".concat((_getAccountValue = getAccountValue()) === null || _getAccountValue === void 0 ? void 0 : _getAccountValue.country_calling_code).concat((_getAccountValue2 = getAccountValue()) === null || _getAccountValue2 === void 0 ? void 0 : _getAccountValue2.phone) || '', isEmail && getAccountValue() || ''), /*#__PURE__*/React.createElement("span", {
1637
+ className: "login2-account-show-text-edit-icon",
1638
+ onClick: handleBackToAccount
1639
+ }, /*#__PURE__*/React.createElement(Iconfont, {
1640
+ type: "pisell2-edit-05"
1641
+ }))), /*#__PURE__*/React.createElement(Form.Item, {
1642
+ style: {
1643
+ display: showPasswordField ? 'none' : 'block'
1644
+ },
1645
+ label: accountLabel,
1646
+ name: isEmail ? 'email' : 'phone',
1647
+ rules: accountRules,
1648
+ validateTrigger: ['onBlur', 'onSubmit'],
1649
+ className: isPhone ? 'phone-input-form-item' : ''
1650
+ }, isPhone ? /*#__PURE__*/React.createElement(PhoneInput, {
1651
+ size: "large",
1652
+ placeholder: accountPlaceholder,
1653
+ className: "login2-phone-input",
1654
+ countries: countries,
1655
+ valueFormat: "object",
1656
+ value: isPasswordStep ? enteredAccount : getAccountValue() || undefined,
1657
+ onChange: function onChange(value) {
1658
+ if (isPasswordStep) {
1659
+ setEnteredAccount(value);
1660
+ }
1661
+ form.setFieldsValue(_defineProperty({}, accountFieldName, value));
1662
+ }
1663
+ }) : /*#__PURE__*/React.createElement(Input, {
1664
+ size: "large",
1665
+ placeholder: accountPlaceholder,
1666
+ className: "login2-input",
1667
+ type: "email",
1668
+ autoComplete: "email",
1669
+ value: getAccountValue() || enteredAccount || '',
1670
+ onChange: function onChange(e) {
1671
+ var newValue = e.target.value;
1672
+ if (isPasswordStep) {
1673
+ setEnteredAccount(newValue);
1674
+ }
1675
+ form.setFieldsValue(_defineProperty({}, accountFieldName, newValue));
1676
+ },
1677
+ onKeyDown: function onKeyDown(e) {
1678
+ if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
1679
+ e.preventDefault();
1680
+ handleFormSubmit(e);
1681
+ }
1682
+ }
1683
+ })), /*#__PURE__*/React.createElement(Form.Item, {
1684
+ style: {
1685
+ display: showPasswordField ? 'block' : 'none'
1686
+ },
1687
+ label: ((_config$ui6 = config.ui) === null || _config$ui6 === void 0 || (_config$ui6 = _config$ui6.formLabels) === null || _config$ui6 === void 0 || (_config$ui6 = _config$ui6.password) === null || _config$ui6 === void 0 ? void 0 : _config$ui6.show) !== false ? ((_config$ui7 = config.ui) === null || _config$ui7 === void 0 || (_config$ui7 = _config$ui7.formLabels) === null || _config$ui7 === void 0 || (_config$ui7 = _config$ui7.password) === null || _config$ui7 === void 0 ? void 0 : _config$ui7.text) || locales.getText('pisell-login2-password-label') : undefined,
1688
+ name: "password",
1689
+ validateTrigger: ['onBlur', 'onSubmit'],
1690
+ rules: passwordValidationRules
1691
+ }, /*#__PURE__*/React.createElement(Input.Password, {
1692
+ size: "large",
1693
+ placeholder: locales.getText('pisell-login2-password-placeholder'),
1694
+ className: "login2-input",
1695
+ name: "password",
1696
+ autoComplete: "current-password",
1697
+ type: "password",
1698
+ autoFocus: hasStoredCredentials,
1699
+ onKeyDown: function onKeyDown(e) {
1700
+ if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
1701
+ e.preventDefault();
1702
+ handleFormSubmit(e);
1703
+ }
1704
+ }
1705
+ })), showPasswordField && /*#__PURE__*/React.createElement("div", {
1706
+ className: "login2-form-footer"
1707
+ }, /*#__PURE__*/React.createElement(Form.Item, {
1708
+ name: "remember_me",
1709
+ valuePropName: "checked",
1710
+ noStyle: true
1711
+ }, /*#__PURE__*/React.createElement(Checkbox, {
1712
+ defaultChecked: rememberMe
1713
+ }, locales.getText('pisell-login2-remember-me'))), /*#__PURE__*/React.createElement("a", {
1714
+ className: "login2-link",
1715
+ onClick: handleForgotPasswordClick
1716
+ }, locales.getText('pisell-login2-forgot-password'))), /*#__PURE__*/React.createElement(Button, {
1717
+ type: "primary",
1718
+ size: "large",
1719
+ block: true,
1720
+ htmlType: "button",
1721
+ loading: loading,
1722
+ onClick: handleFormSubmit,
1723
+ className: "login2-submit-button"
1724
+ }, isPasswordStep ? locales.getText('pisell-login2-login-button') : isEmail ? locales.getText('pisell-login2-continue-with-email') : locales.getText('pisell-login2-continue-with-phone')), showPasswordField && /*#__PURE__*/React.createElement(Button, {
1725
+ size: "large",
1726
+ block: true,
1727
+ onClick: handleBackToAccount,
1728
+ className: "login2-back-button"
1729
+ }, locales.getText('pisell-login2-back')));
1730
+ }
1731
+
1732
+ // 验证码登录 - 第一步:仅输入账号
1733
+ if (currentVerificationMethod === 'verification_code' && loginStep === 'account') {
1734
+ // 处理表单提交(仅用于用户主动触发,防止自动触发)
1735
+ var _handleFormSubmit = function _handleFormSubmit(e) {
1736
+ e === null || e === void 0 || e.preventDefault();
1737
+ handleSendCode();
1738
+ };
1739
+ return /*#__PURE__*/React.createElement(Form, {
1740
+ form: form,
1741
+ layout: "vertical",
1742
+ className: "login2-form",
1743
+ size: "large"
1744
+ }, isEmail && /*#__PURE__*/React.createElement("div", {
1745
+ style: {
1746
+ position: 'absolute',
1747
+ left: '-9999px',
1748
+ opacity: 0,
1749
+ pointerEvents: 'none'
1750
+ }
1751
+ }, /*#__PURE__*/React.createElement("input", {
1752
+ type: "text",
1753
+ name: "username",
1754
+ autoComplete: "username",
1755
+ tabIndex: -1,
1756
+ readOnly: true,
1757
+ "aria-hidden": "true"
1758
+ })), /*#__PURE__*/React.createElement(Form.Item, {
1759
+ label: accountLabel,
1760
+ name: accountFieldName,
1761
+ rules: accountRules,
1762
+ className: isPhone ? 'phone-input-form-item' : '',
1763
+ validateTrigger: ['onBlur', 'onSubmit']
1764
+ }, isPhone ? /*#__PURE__*/React.createElement(PhoneInput, {
1765
+ size: "large",
1766
+ placeholder: accountPlaceholder,
1767
+ className: "login2-phone-input",
1768
+ countries: countries,
1769
+ valueFormat: "object",
1770
+ onKeyDown: function onKeyDown(e) {
1771
+ if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
1772
+ e.preventDefault();
1773
+ _handleFormSubmit(e);
1774
+ }
1775
+ }
1776
+ }) : /*#__PURE__*/React.createElement(Input, {
1777
+ size: "large",
1778
+ placeholder: accountPlaceholder,
1779
+ className: "login2-input",
1780
+ type: "email",
1781
+ autoComplete: "email",
1782
+ onKeyDown: function onKeyDown(e) {
1783
+ if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
1784
+ e.preventDefault();
1785
+ _handleFormSubmit(e);
1786
+ }
1787
+ }
1788
+ })), /*#__PURE__*/React.createElement(Button, {
1789
+ type: "primary",
1790
+ size: "large",
1791
+ block: true,
1792
+ htmlType: "button",
1793
+ loading: loading,
1794
+ onClick: _handleFormSubmit,
1795
+ className: "login2-submit-button"
1796
+ }, isEmail ? locales.getText('pisell-login2-continue-with-email') : locales.getText('pisell-login2-continue-with-phone')));
1797
+ }
1798
+
1799
+ // 密码登录 - 单步完成
1800
+ return /*#__PURE__*/React.createElement(Form, {
1801
+ form: form,
1802
+ layout: "vertical",
1803
+ className: "login2-form",
1804
+ size: "large",
1805
+ onFinish: handleLogin
1806
+ }, isEmail && /*#__PURE__*/React.createElement("div", {
1807
+ style: {
1808
+ position: 'absolute',
1809
+ left: '-9999px',
1810
+ opacity: 0,
1811
+ pointerEvents: 'none'
1812
+ }
1813
+ }, /*#__PURE__*/React.createElement("input", {
1814
+ type: "text",
1815
+ name: "username",
1816
+ autoComplete: "username",
1817
+ tabIndex: -1,
1818
+ readOnly: true,
1819
+ "aria-hidden": "true"
1820
+ })), isEmail ? /*#__PURE__*/React.createElement(Form.Item, {
1821
+ label: accountLabel,
1822
+ name: accountFieldName,
1823
+ rules: accountRules,
1824
+ validateTrigger: ['onBlur', 'onSubmit']
1825
+ }, /*#__PURE__*/React.createElement(Input, {
1826
+ size: "large",
1827
+ placeholder: accountPlaceholder,
1828
+ className: "login2-input",
1829
+ type: "email",
1830
+ autoComplete: "email",
1831
+ value: getAccountValue() || enteredAccount || '',
1832
+ onChange: function onChange(e) {
1833
+ var newValue = e.target.value;
1834
+ setEnteredAccount(newValue);
1835
+ form.setFieldsValue(_defineProperty({}, accountFieldName, newValue));
1836
+ }
1837
+ })) : /*#__PURE__*/React.createElement(Form.Item, {
1838
+ label: accountLabel,
1839
+ name: accountFieldName,
1840
+ rules: accountRules,
1841
+ validateTrigger: ['onBlur', 'onSubmit']
1842
+ }, /*#__PURE__*/React.createElement(PhoneInput, {
1843
+ size: "large",
1844
+ placeholder: accountPlaceholder,
1845
+ className: "login2-phone-input",
1846
+ countries: countries,
1847
+ valueFormat: "object"
1848
+ })), /*#__PURE__*/React.createElement(Form.Item, {
1849
+ label: ((_config$ui8 = config.ui) === null || _config$ui8 === void 0 || (_config$ui8 = _config$ui8.formLabels) === null || _config$ui8 === void 0 || (_config$ui8 = _config$ui8.password) === null || _config$ui8 === void 0 ? void 0 : _config$ui8.show) !== false ? ((_config$ui9 = config.ui) === null || _config$ui9 === void 0 || (_config$ui9 = _config$ui9.formLabels) === null || _config$ui9 === void 0 || (_config$ui9 = _config$ui9.password) === null || _config$ui9 === void 0 ? void 0 : _config$ui9.text) || locales.getText('pisell-login2-password-label') : undefined,
1850
+ name: "password",
1851
+ rules: passwordValidationRules,
1852
+ validateTrigger: ['onBlur', 'onSubmit']
1853
+ }, /*#__PURE__*/React.createElement(Input.Password, {
1854
+ size: "large",
1855
+ placeholder: locales.getText('pisell-login2-password-placeholder'),
1856
+ className: "login2-input",
1857
+ name: "password",
1858
+ autoComplete: "current-password",
1859
+ type: "password"
1860
+ })), /*#__PURE__*/React.createElement("div", {
1861
+ className: "login2-form-footer"
1862
+ }, /*#__PURE__*/React.createElement(Form.Item, {
1863
+ name: "remember_me",
1864
+ valuePropName: "checked",
1865
+ noStyle: true
1866
+ }, /*#__PURE__*/React.createElement(Checkbox, null, locales.getText('pisell-login2-remember-me'))), currentVerificationMethod === 'password' && /*#__PURE__*/React.createElement("a", {
1867
+ className: "login2-link",
1868
+ onClick: handleForgotPasswordClick
1869
+ }, locales.getText('pisell-login2-forgot-password'))), /*#__PURE__*/React.createElement(Button, {
1870
+ type: "primary",
1871
+ size: "large",
1872
+ block: true,
1873
+ htmlType: "submit",
1874
+ loading: loading,
1875
+ onClick: handleLogin,
1876
+ className: "login2-submit-button"
1877
+ }, locales.getText('pisell-login2-login-button')));
1878
+ };
1879
+
1880
+ // 渲染底部切换选项区域
1881
+ var renderSwitchOptions = function renderSwitchOptions() {
1882
+ if (!currentLoginMethod) return null;
1883
+ var primaryMethod = loginMethods[0];
1884
+ var currentIsFormMethod = currentLoginMethod.type === 'email' || currentLoginMethod.type === 'phone';
1885
+ var primaryIsFormMethod = (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'email' || (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'phone';
1886
+ var shouldUseFormLayout = currentIsFormMethod || primaryIsFormMethod;
1887
+ var verificationSwitchButtons = [];
1888
+ if (currentIsFormMethod) {
1889
+ (currentLoginMethod.verificationMethods || []).filter(function (method) {
1890
+ return method !== currentVerificationMethod;
1891
+ }).forEach(function (method) {
1892
+ if (method === 'verification_code') {
1893
+ var text = currentLoginMethod.type === 'email' ? locales.getText('pisell-login2-switch-to-email-code') : locales.getText('pisell-login2-switch-to-sms-code');
1894
+ verificationSwitchButtons.push( /*#__PURE__*/React.createElement("button", {
1895
+ key: "switch-to-code",
1896
+ className: "login2-switch-option-button",
1897
+ onClick: function onClick() {
1898
+ return switchVerificationMethod('verification_code');
1899
+ }
1900
+ }, currentLoginMethod.type === 'email' ? /*#__PURE__*/React.createElement(Iconfont, {
1901
+ type: "pisell2-mail-01"
1902
+ }) : /*#__PURE__*/React.createElement(Iconfont, {
1903
+ type: "pisell2-phone"
1904
+ }), /*#__PURE__*/React.createElement("span", {
1905
+ className: "option-text"
1906
+ }, text)));
1907
+ } else {
1908
+ verificationSwitchButtons.push( /*#__PURE__*/React.createElement("button", {
1909
+ key: "switch-to-password",
1910
+ className: "login2-switch-option-button",
1911
+ onClick: function onClick() {
1912
+ return switchVerificationMethod('password');
1913
+ }
1914
+ }, /*#__PURE__*/React.createElement(Iconfont, {
1915
+ type: "pisell2-key-01"
1916
+ }), /*#__PURE__*/React.createElement("span", {
1917
+ className: "option-text"
1918
+ }, locales.getText('pisell-login2-switch-to-password'))));
1919
+ }
1920
+ });
1921
+ }
1922
+ var emailPhoneSwitchButtons = [];
1923
+ loginMethods.forEach(function (method, index) {
1924
+ if (method.type === 'email' || method.type === 'phone') {
1925
+ if (method.type === currentLoginMethod.type) return;
1926
+ var isLast = isLastLoginMethod(method.type);
1927
+ var _className = classNames('login2-switch-option-button', {
1928
+ 'has-last-login-badge': isLast
1929
+ });
1930
+ emailPhoneSwitchButtons.push( /*#__PURE__*/React.createElement("button", {
1931
+ key: "".concat(method.type, "-").concat(index),
1932
+ className: _className,
1933
+ onClick: function onClick() {
1934
+ return switchLoginMethod(method);
1935
+ }
1936
+ }, isLast && /*#__PURE__*/React.createElement("div", {
1937
+ className: "last-login-badge"
1938
+ }, locales.getText('pisell-login2-last-login-badge')), /*#__PURE__*/React.createElement(Iconfont, {
1939
+ type: method.type === 'email' ? 'pisell2-mail-01' : 'pisell2-phone'
1940
+ }), /*#__PURE__*/React.createElement("span", {
1941
+ className: "option-text"
1942
+ }, method.type === 'email' ? locales.getText('pisell-login2-switch-to-email') : locales.getText('pisell-login2-switch-to-phone'))));
1943
+ }
1944
+ });
1945
+ var nonOauthButtons = [].concat(verificationSwitchButtons, emailPhoneSwitchButtons);
1946
+ var registerPrompt = onSwitchToRegister && /*#__PURE__*/React.createElement("div", {
1947
+ className: "login2-register-prompt"
1948
+ }, /*#__PURE__*/React.createElement("span", {
1949
+ className: "register-prompt-text"
1950
+ }, locales.getText('pisell-login2-no-account')), /*#__PURE__*/React.createElement("button", {
1951
+ className: "register-prompt-link",
1952
+ onClick: onSwitchToRegister
1953
+ }, locales.getText('pisell-login2-register-link')));
1954
+ if (!nonOauthButtons.length && !oauthProviders.length) {
1955
+ return registerPrompt;
1956
+ }
1957
+ if (shouldUseFormLayout) {
1958
+ var groups = [];
1959
+ if (nonOauthButtons.length > 0) {
1960
+ groups.push( /*#__PURE__*/React.createElement("div", {
1961
+ key: "non-oauth",
1962
+ className: "login2-switch-options"
1963
+ }, nonOauthButtons));
1964
+ }
1965
+ if (oauthProviders.length > 0) {
1966
+ groups.push( /*#__PURE__*/React.createElement(OAuthButtonGroup, {
1967
+ key: "oauth",
1968
+ providers: oauthProviders,
1969
+ wrapperClassName: "login2-oauth-buttons",
1970
+ buttonClassName: "login2-oauth-button",
1971
+ gap: 12
1972
+ }));
1973
+ }
1974
+ if (!groups.length) {
1975
+ return registerPrompt;
1976
+ }
1977
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1978
+ className: "login2-divider"
1979
+ }, locales.getText('pisell-login2-or')), /*#__PURE__*/React.createElement("div", {
1980
+ className: "login2-switch-groups"
1981
+ }, groups), registerPrompt);
1982
+ }
1983
+ var primaryProvider = oauthProviders.find(function (provider) {
1984
+ return provider.key === (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type);
1985
+ });
1986
+ var secondaryOauthProviders = oauthProviders.filter(function (provider) {
1987
+ return provider.key !== (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type);
1988
+ });
1989
+ var hasSecondaryButtons = nonOauthButtons.length > 0 || secondaryOauthProviders.length > 0;
1990
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1991
+ className: "login2-switch-groups"
1992
+ }, primaryProvider ? /*#__PURE__*/React.createElement(OAuthButtonGroup, {
1993
+ providers: [primaryProvider],
1994
+ wrapperClassName: "login2-oauth-buttons",
1995
+ buttonClassName: "login2-oauth-button",
1996
+ gap: 12
1997
+ }) : /*#__PURE__*/React.createElement("div", {
1998
+ className: "login2-switch-options"
1999
+ }, /*#__PURE__*/React.createElement("button", {
2000
+ key: "primary-fallback",
2001
+ className: "login2-switch-option-button",
2002
+ onClick: function onClick() {
2003
+ if ((primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'guest') {
2004
+ handleGuestLogin();
2005
+ } else if ((primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'google' || (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'facebook' || (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'apple') {
2006
+ handleOAuthClick(primaryMethod.type);
2007
+ }
2008
+ }
2009
+ }, /*#__PURE__*/React.createElement(Iconfont, {
2010
+ type: (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'guest' ? 'pisell2-user-01' : (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'google' ? 'pisell2-google' : (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'facebook' ? 'pisell2-facebook' : 'pisell2-apple'
2011
+ }), /*#__PURE__*/React.createElement("span", {
2012
+ className: "option-text"
2013
+ }, (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'guest' ? locales.getText('pisell-login2-login-as-guest') : "".concat(locales.getText('pisell-login2-continue-with'), " ").concat(primaryMethod !== null && primaryMethod !== void 0 && primaryMethod.type ? primaryMethod.type.charAt(0).toUpperCase() + primaryMethod.type.slice(1) : '')))), hasSecondaryButtons && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2014
+ className: "login2-divider"
2015
+ }, locales.getText('pisell-login2-or')), nonOauthButtons.length > 0 && /*#__PURE__*/React.createElement("div", {
2016
+ className: "login2-switch-options"
2017
+ }, nonOauthButtons), secondaryOauthProviders.length > 0 && /*#__PURE__*/React.createElement(OAuthButtonGroup, {
2018
+ providers: secondaryOauthProviders,
2019
+ wrapperClassName: "login2-oauth-buttons",
2020
+ buttonClassName: "login2-oauth-button",
2021
+ gap: 12
2022
+ }))), registerPrompt);
2023
+ };
2024
+
2025
+ // 渲染 OAuth 按钮
2026
+ if (!visible) {
2027
+ return null;
2028
+ }
2029
+ var ui = config.ui;
2030
+
2031
+ // 如果是邮件链接验证模式,显示相应的页面
2032
+ if (isEmailLinkVerification) {
2033
+ if (emailLinkVerifyStatus === 'verifying') {
2034
+ // 显示验证中页面
2035
+ return /*#__PURE__*/React.createElement("div", {
2036
+ className: classNames('login2-container', className),
2037
+ style: _objectSpread(_objectSpread({}, style), {}, {
2038
+ '--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
2039
+ })
2040
+ }, /*#__PURE__*/React.createElement("div", {
2041
+ className: "login2-email-link-verifying"
2042
+ }, /*#__PURE__*/React.createElement("div", {
2043
+ className: "verifying-content"
2044
+ }, /*#__PURE__*/React.createElement("div", {
2045
+ className: "verifying-icon"
2046
+ }, /*#__PURE__*/React.createElement(Iconfont, {
2047
+ type: "icon-loading",
2048
+ spin: true
2049
+ })), /*#__PURE__*/React.createElement("h2", {
2050
+ className: "verifying-title"
2051
+ }, "Verifying your email..."), /*#__PURE__*/React.createElement("p", {
2052
+ className: "verifying-desc"
2053
+ }, "Please wait while we verify your email link."))));
2054
+ }
2055
+ if (emailLinkVerifyStatus === 'success') {
2056
+ // 验证成功,显示重置密码页面
2057
+ return /*#__PURE__*/React.createElement("div", {
2058
+ className: classNames('login2-container', className),
2059
+ style: _objectSpread(_objectSpread({}, style), {}, {
2060
+ '--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
2061
+ })
2062
+ }, /*#__PURE__*/React.createElement(SetPassword, {
2063
+ scenario: "reset",
2064
+ flowData: {
2065
+ account: resetPasswordUserEmail || '',
2066
+ accountType: 'email',
2067
+ verificationMethod: 'verification_code'
2068
+ },
2069
+ onSubmit: ( /*#__PURE__*/function () {
2070
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(password, confirmPassword) {
2071
+ var result, emailMethod;
2072
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
2073
+ while (1) switch (_context14.prev = _context14.next) {
2074
+ case 0:
2075
+ _context14.prev = 0;
2076
+ if (!(registerAndLogin !== null && registerAndLogin !== void 0 && registerAndLogin.resetPasswordByCode)) {
2077
+ _context14.next = 8;
2078
+ break;
2079
+ }
2080
+ _context14.next = 4;
2081
+ return registerAndLogin.resetPasswordByCode({
2082
+ code: config.emailLinkVerification.code,
2083
+ password: password
2084
+ });
2085
+ case 4:
2086
+ result = _context14.sent;
2087
+ if (result.status) {
2088
+ message.success('密码重置成功');
2089
+ // 重置状态
2090
+ setEmailLinkVerifyStatus(null);
2091
+ setEmailLinkError('');
2092
+
2093
+ // 根据用户邮箱自动切换到邮箱登录并预填充
2094
+ if (resetPasswordUserEmail) {
2095
+ // 切换到邮箱登录方式
2096
+ emailMethod = config.loginMethods.find(function (method) {
2097
+ return method.type === 'email';
2098
+ });
2099
+ if (emailMethod) {
2100
+ setCurrentLoginMethod(emailMethod);
2101
+ setCurrentVerificationMethod(emailMethod.verificationMethods[0]);
2102
+ }
2103
+
2104
+ // 预填充邮箱到表单
2105
+ form.setFieldsValue({
2106
+ email: resetPasswordUserEmail
2107
+ });
2108
+ setEnteredAccount(resetPasswordUserEmail);
2109
+
2110
+ // 重置登录步骤到账号输入页面
2111
+ setLoginStep('account');
2112
+ }
2113
+ } else {
2114
+ message.error(result.message || '密码重置失败');
2115
+ }
2116
+ _context14.next = 9;
2117
+ break;
2118
+ case 8:
2119
+ message.error('系统错误,请稍后重试');
2120
+ case 9:
2121
+ _context14.next = 14;
2122
+ break;
2123
+ case 11:
2124
+ _context14.prev = 11;
2125
+ _context14.t0 = _context14["catch"](0);
2126
+ message.error((_context14.t0 === null || _context14.t0 === void 0 ? void 0 : _context14.t0.message) || '密码重置失败');
2127
+ case 14:
2128
+ case "end":
2129
+ return _context14.stop();
2130
+ }
2131
+ }, _callee14, null, [[0, 11]]);
2132
+ }));
2133
+ return function (_x13, _x14) {
2134
+ return _ref15.apply(this, arguments);
2135
+ };
2136
+ }()),
2137
+ onBack: function onBack() {
2138
+ setEmailLinkVerifyStatus(null);
2139
+ setEmailLinkError('');
2140
+ },
2141
+ loading: loading
2142
+ }));
2143
+ }
2144
+ if (emailLinkVerifyStatus === 'error') {
2145
+ // 显示错误页面
2146
+ return /*#__PURE__*/React.createElement("div", {
2147
+ className: classNames('login2-container', className),
2148
+ style: _objectSpread(_objectSpread({}, style), {}, {
2149
+ '--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
2150
+ })
2151
+ }, /*#__PURE__*/React.createElement("div", {
2152
+ className: "login2-email-link-error"
2153
+ }, /*#__PURE__*/React.createElement("div", {
2154
+ className: "error-content"
2155
+ }, /*#__PURE__*/React.createElement("div", {
2156
+ className: "error-icon"
2157
+ }, /*#__PURE__*/React.createElement(Iconfont, {
2158
+ type: "icon-error"
2159
+ })), /*#__PURE__*/React.createElement("h2", {
2160
+ className: "error-title"
2161
+ }, locales.getText('pisell-login2-verification-failed-title')), /*#__PURE__*/React.createElement("p", {
2162
+ className: "error-desc"
2163
+ }, emailLinkError), /*#__PURE__*/React.createElement(Button, {
2164
+ type: "primary",
2165
+ size: "large",
2166
+ block: true,
2167
+ className: "login2-error-main-button",
2168
+ onClick: function onClick() {
2169
+ setEmailLinkVerifyStatus(null);
2170
+ setEmailLinkError('');
2171
+ }
2172
+ }, locales.getText('pisell-login2-login-button')))));
2173
+ }
2174
+ }
2175
+
2176
+ // 如果显示忘记密码流程
2177
+ if (showForgotPassword) {
2178
+ var accountType = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone';
2179
+ return /*#__PURE__*/React.createElement("div", {
2180
+ className: classNames('login2-container', className),
2181
+ style: _objectSpread(_objectSpread({}, style), {}, {
2182
+ '--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
2183
+ })
2184
+ }, /*#__PURE__*/React.createElement(ForgotPasswordFlow, {
2185
+ initialEmail: enteredAccount,
2186
+ accountType: accountType,
2187
+ onSendCode: handleForgotPasswordSendCode,
2188
+ onVerifyCode: handleForgotPasswordVerifyCode,
2189
+ onResetPassword: isEmailLinkVerification ? handleEmailLinkResetPassword : handleForgotPasswordReset,
2190
+ onSendResetLink: handleForgotPasswordSendLink,
2191
+ onBack: handleCloseForgotPassword,
2192
+ loading: loading,
2193
+ countdown: countdown,
2194
+ countries: countries
2195
+ }));
2196
+ }
2197
+
2198
+ // 如果在验证码输入步骤,显示验证码输入页面
2199
+ if (loginStep === 'code') {
2200
+ var _accountType = (currentLoginMethod === null || currentLoginMethod === void 0 ? void 0 : currentLoginMethod.type) === 'email' ? 'email' : 'phone';
2201
+ return /*#__PURE__*/React.createElement("div", {
2202
+ className: classNames('login2-container', className),
2203
+ style: _objectSpread(_objectSpread({}, style), {}, {
2204
+ '--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
2205
+ })
2206
+ }, /*#__PURE__*/React.createElement(LoginCodeInput, {
2207
+ account: typeof enteredAccount === 'string' ? enteredAccount : enteredAccount.phone,
2208
+ accountType: _accountType,
2209
+ codeLength: 4,
2210
+ onSubmit: handleCodeSubmit,
2211
+ onResend: handleSendCode,
2212
+ onBack: handleBackFromCode,
2213
+ countdown: countdown,
2214
+ loading: loading,
2215
+ error: codeError,
2216
+ onClearError: function onClearError() {
2217
+ return setCodeError('');
2218
+ }
2219
+ }));
2220
+ }
2221
+ return /*#__PURE__*/React.createElement("div", {
2222
+ className: classNames('login2-container', 'register2-container', className),
2223
+ style: _objectSpread(_objectSpread({}, style), {}, {
2224
+ '--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
2225
+ })
2226
+ }, /*#__PURE__*/React.createElement(Header, {
2227
+ ui: ui
2228
+ }), /*#__PURE__*/React.createElement("div", {
2229
+ className: "login2-content"
2230
+ }, renderMainLoginForm(), renderSwitchOptions()), /*#__PURE__*/React.createElement(LegalTerms, {
2231
+ config: _objectSpread(_objectSpread({}, config.legalTerms), {}, {
2232
+ mode: 'login'
2233
+ })
2234
+ }));
2235
+ };
2236
+ export default Login2;