@pisell/private-materials 6.6.2 → 6.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -8
- package/es/components/Sales/Event/Detail.js +4 -3
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Services/index.js +22 -8
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +5 -0
- package/es/components/authentication/admin/AuthMethods/AuthMethods.less +136 -0
- package/es/components/authentication/admin/AuthMethods/SettingList.d.ts +5 -0
- package/es/components/authentication/admin/AuthMethods/SettingList.js +62 -0
- package/es/components/authentication/admin/AuthMethods/SettingList.less +85 -0
- package/es/components/authentication/admin/AuthMethods/SettingsDrawer.d.ts +22 -0
- package/es/components/authentication/admin/AuthMethods/SettingsDrawer.js +121 -0
- package/es/components/authentication/admin/AuthMethods/SettingsDrawer.less +163 -0
- package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
- package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.js +15 -0
- package/es/components/authentication/admin/AuthMethods/components/EmailSettingsContent.d.ts +13 -0
- package/es/components/authentication/admin/AuthMethods/components/EmailSettingsContent.js +152 -0
- package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
- package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.js +114 -0
- package/es/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.d.ts +14 -0
- package/es/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.js +170 -0
- package/es/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.d.ts +13 -0
- package/es/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.js +116 -0
- package/es/components/authentication/admin/AuthMethods/components/index.d.ts +10 -0
- package/es/components/authentication/admin/AuthMethods/components/index.js +5 -0
- package/es/components/authentication/admin/AuthMethods/constants.d.ts +22 -0
- package/es/components/authentication/admin/AuthMethods/constants.js +121 -0
- package/es/components/authentication/admin/AuthMethods/index.d.ts +8 -0
- package/es/components/authentication/admin/AuthMethods/index.js +233 -0
- package/es/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
- package/es/components/authentication/admin/AuthMethods/locales.js +290 -0
- package/es/components/authentication/admin/AuthMethods/types.d.ts +76 -0
- package/es/components/authentication/admin/AuthMethods/types.js +23 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/AuthenticationMethods.less +231 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.d.ts +6 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +447 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +107 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.js +1 -0
- package/es/components/authentication/admin/ChannelAuthSetting/ChannelAuthSetting.less +111 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/CollectInfo.less +259 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.d.ts +6 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +530 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +86 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.js +1 -0
- package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +460 -0
- package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.less +111 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/PageSetting.less +105 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/index.d.ts +8 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/index.js +185 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +32 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.js +1 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/PageSettingItem.less +272 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.d.ts +8 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +214 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +71 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.js +1 -0
- package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +287 -0
- package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.less +111 -0
- package/es/components/authentication/admin/ChannelAuthSetting/index.d.ts +6 -0
- package/es/components/authentication/admin/ChannelAuthSetting/index.js +228 -0
- package/es/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
- package/es/components/authentication/admin/ChannelAuthSetting/locales.js +50 -0
- package/es/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
- package/es/components/authentication/admin/ChannelAuthSetting/types.js +1 -0
- package/es/components/authentication/admin/CustomerAuth/CustomerAuth.less +104 -0
- package/es/components/authentication/admin/CustomerAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/CustomerAuth/index.js +711 -0
- package/es/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
- package/es/components/authentication/admin/CustomerAuth/locales.js +86 -0
- package/es/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/CustomerAuth/types.js +1 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/CustomerOAuthConfig.less +164 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/index.d.ts +6 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/index.js +545 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/locales.js +137 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/types.js +1 -0
- package/es/components/authentication/admin/DeviceAuth/DeviceAuth.less +104 -0
- package/es/components/authentication/admin/DeviceAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/DeviceAuth/index.js +366 -0
- package/es/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
- package/es/components/authentication/admin/DeviceAuth/locales.js +74 -0
- package/es/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/DeviceAuth/types.js +1 -0
- package/es/components/authentication/admin/OAuthConfig/OAuthConfig.less +165 -0
- package/es/components/authentication/admin/OAuthConfig/index.d.ts +6 -0
- package/es/components/authentication/admin/OAuthConfig/index.js +347 -0
- package/es/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
- package/es/components/authentication/admin/OAuthConfig/locales.js +116 -0
- package/es/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
- package/es/components/authentication/admin/OAuthConfig/types.js +1 -0
- package/es/components/authentication/admin/OrgAdminAuth/OrgAdminAuth.less +104 -0
- package/es/components/authentication/admin/OrgAdminAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/OrgAdminAuth/index.js +543 -0
- package/es/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
- package/es/components/authentication/admin/OrgAdminAuth/locales.js +74 -0
- package/es/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/OrgAdminAuth/types.js +1 -0
- package/es/components/authentication/admin/POSOperatorAuth/POSOperatorAuth.less +104 -0
- package/es/components/authentication/admin/POSOperatorAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/POSOperatorAuth/index.js +374 -0
- package/es/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
- package/es/components/authentication/admin/POSOperatorAuth/locales.js +65 -0
- package/es/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/POSOperatorAuth/types.js +1 -0
- package/es/components/authentication/admin/SaaSAdminAuth/SaaSAdminAuth.less +104 -0
- package/es/components/authentication/admin/SaaSAdminAuth/index.d.ts +6 -0
- package/es/components/authentication/admin/SaaSAdminAuth/index.js +625 -0
- package/es/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
- package/es/components/authentication/admin/SaaSAdminAuth/locales.js +74 -0
- package/es/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/SaaSAdminAuth/types.js +1 -0
- package/es/components/authentication/admin/index.d.ts +26 -0
- package/es/components/authentication/admin/index.js +23 -0
- package/es/components/authentication/index.d.ts +0 -0
- package/es/components/authentication/index.js +0 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/customSelect/index.js +22 -3
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +65 -57
- package/es/components/booking/components/footer/utils.js +30 -19
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +2 -1
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/checkout/PaymentModal.js +178 -108
- package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/es/components/checkout/components/AdditionalModule/index.js +50 -12
- package/es/components/checkout/components/AmountSummary/index.js +9 -76
- package/es/components/checkout/components/AmountSummary/index.less +1 -1
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/index.d.ts +3 -2
- package/es/components/index.js +3 -2
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +68 -35
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +70 -42
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +72 -41
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.d.ts +15 -0
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +143 -0
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +34 -0
- package/es/components/pay/toC/PaymentMethods/hooks/index.d.ts +19 -0
- package/es/components/pay/toC/PaymentMethods/hooks/index.js +126 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/index.js +26 -22
- package/es/components/pay/toC/locales.d.ts +9 -0
- package/es/components/pay/toC/locales.js +12 -3
- package/es/components/pay/toC/model.d.ts +1 -0
- package/es/components/pay/toC/serve.d.ts +5 -0
- package/es/components/pay/toC/serve.js +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +112 -7
- package/es/components/ticketBooking/components/timeBar/index.less +59 -0
- package/es/components/ticketBooking/locales.d.ts +6 -0
- package/es/components/ticketBooking/locales.js +9 -3
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/index.js +34 -2
- package/es/components/wallet/Detail/index.less +11 -0
- package/es/components/wallet/Detail/locales.d.ts +6 -0
- package/es/components/wallet/Detail/locales.js +14 -2
- package/es/components/wallet/Voucher/index.js +11 -10
- package/es/components/wallet/components/WalletCard.js +5 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/index.js +4 -2
- package/es/components/wallet/serve.d.ts +7 -0
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/wallet/utils.js +342 -0
- package/es/components/walletList/index.js +92 -56
- package/es/components/walletList/serve.d.ts +4 -0
- package/es/components/walletList/serve.js +46 -13
- package/es/components/walletList/types/index.d.ts +12 -12
- package/es/components/walletList/types/index.js +2 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/index.d.ts +6 -1
- package/es/index.js +6 -2
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/es/plus/productSelect/CategoryTabs/index.js +6 -3
- package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/es/plus/productSelect/ProductCard/index.js +14 -5
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/es/plus/productSelect/index.d.ts +3 -2
- package/es/plus/productSelect/index.js +33 -8
- package/es/plus/productSelect/index.less +4 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/es/plus/walletEditor/WalletEditor.js +316 -0
- package/es/plus/walletEditor/WalletEditor.less +129 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
- package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +7 -0
- package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
- package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/es/plus/walletEditor/index.d.ts +3 -0
- package/es/plus/walletEditor/index.js +3 -0
- package/es/plus/walletEditor/locales.d.ts +126 -0
- package/es/plus/walletEditor/locales.js +143 -0
- package/es/plus/walletEditor/types.d.ts +52 -0
- package/es/plus/walletEditor/types.js +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
- package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +323 -0
- package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +12 -0
- package/es/plus/walletPassGallery/components/passList/index.js +115 -0
- package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
- package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
- package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/es/plus/walletPassGallery/index.d.ts +6 -0
- package/es/plus/walletPassGallery/index.js +604 -0
- package/es/plus/walletPassGallery/index.less +115 -0
- package/es/plus/walletPassGallery/locales.d.ts +270 -0
- package/es/plus/walletPassGallery/locales.js +279 -0
- package/es/plus/walletPassGallery/serve.d.ts +221 -0
- package/es/plus/walletPassGallery/serve.js +291 -0
- package/es/pro/Login2.0/AuthModal.d.ts +143 -0
- package/es/pro/Login2.0/AuthModal.js +630 -0
- package/es/pro/Login2.0/Login2.d.ts +61 -0
- package/es/pro/Login2.0/Login2.js +2236 -0
- package/es/pro/Login2.0/Register2.d.ts +65 -0
- package/es/pro/Login2.0/Register2.js +1502 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
- package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/es/pro/Login2.0/components/LegalTerms.js +51 -0
- package/es/pro/Login2.0/components/LegalTerms.less +74 -0
- package/es/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
- package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/es/pro/Login2.0/components/PhoneInput.js +414 -0
- package/es/pro/Login2.0/components/PhoneInput.less +148 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/Login2.0/components/phoneValidation.js +228 -0
- package/es/pro/Login2.0/hooks/index.d.ts +2 -0
- package/es/pro/Login2.0/hooks/index.js +1 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
- package/es/pro/Login2.0/index.js +8 -0
- package/es/pro/Login2.0/index.less +1002 -0
- package/es/pro/Login2.0/locales.d.ts +543 -0
- package/es/pro/Login2.0/locales.js +622 -0
- package/es/pro/Login2.0/shared/Header.d.ts +11 -0
- package/es/pro/Login2.0/shared/Header.js +42 -0
- package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
- package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/es/pro/Login2.0/shared/registerFlow.js +171 -0
- package/es/pro/Login2.0/shared/types.d.ts +232 -0
- package/es/pro/Login2.0/shared/types.js +1 -0
- package/es/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/es/pro/Login2.0/steps/CodeInput.js +209 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
- package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/es/pro/Login2.0/steps/SetPassword.js +148 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
- package/es/pro/Login2.0/steps/index.d.ts +19 -0
- package/es/pro/Login2.0/steps/index.js +11 -0
- package/es/pro/Login2.0/steps/steps.less +423 -0
- package/es/pro/Login2.0/types.d.ts +167 -0
- package/es/pro/Login2.0/types.js +1 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +37 -39
- package/es/pro/pisellPaymentList/example.d.ts +20 -0
- package/es/pro/pisellPaymentList/example.js +434 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +11 -7
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
- package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lib/components/Sales/Event/Detail.js +3 -2
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Services/index.js +8 -3
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +3 -0
- package/lib/components/authentication/admin/AuthMethods/AuthMethods.less +136 -0
- package/lib/components/authentication/admin/AuthMethods/SettingList.d.ts +5 -0
- package/lib/components/authentication/admin/AuthMethods/SettingList.js +75 -0
- package/lib/components/authentication/admin/AuthMethods/SettingList.less +85 -0
- package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.d.ts +22 -0
- package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.js +126 -0
- package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.less +163 -0
- package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
- package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.js +42 -0
- package/lib/components/authentication/admin/AuthMethods/components/EmailSettingsContent.d.ts +13 -0
- package/lib/components/authentication/admin/AuthMethods/components/EmailSettingsContent.js +108 -0
- package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
- package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.js +108 -0
- package/lib/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.d.ts +14 -0
- package/lib/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.js +93 -0
- package/lib/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.d.ts +13 -0
- package/lib/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.js +85 -0
- package/lib/components/authentication/admin/AuthMethods/components/index.d.ts +10 -0
- package/lib/components/authentication/admin/AuthMethods/components/index.js +51 -0
- package/lib/components/authentication/admin/AuthMethods/constants.d.ts +22 -0
- package/lib/components/authentication/admin/AuthMethods/constants.js +115 -0
- package/lib/components/authentication/admin/AuthMethods/index.d.ts +8 -0
- package/lib/components/authentication/admin/AuthMethods/index.js +196 -0
- package/lib/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
- package/lib/components/authentication/admin/AuthMethods/locales.js +314 -0
- package/lib/components/authentication/admin/AuthMethods/types.d.ts +76 -0
- package/lib/components/authentication/admin/AuthMethods/types.js +53 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/AuthenticationMethods.less +231 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.d.ts +6 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +311 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +131 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.js +17 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/ChannelAuthSetting.less +111 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/CollectInfo.less +259 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.d.ts +6 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +410 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +110 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.js +17 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +383 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.less +111 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/PageSetting.less +105 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/index.d.ts +8 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/index.js +148 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +56 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.js +17 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/PageSettingItem.less +272 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.d.ts +8 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +206 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +95 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.js +17 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +246 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.less +111 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/index.d.ts +6 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/index.js +177 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/locales.js +74 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/types.js +17 -0
- package/lib/components/authentication/admin/CustomerAuth/CustomerAuth.less +104 -0
- package/lib/components/authentication/admin/CustomerAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/CustomerAuth/index.js +507 -0
- package/lib/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
- package/lib/components/authentication/admin/CustomerAuth/locales.js +110 -0
- package/lib/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/CustomerAuth/types.js +17 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/CustomerOAuthConfig.less +164 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/index.d.ts +6 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/index.js +331 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/locales.js +161 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/types.js +17 -0
- package/lib/components/authentication/admin/DeviceAuth/DeviceAuth.less +104 -0
- package/lib/components/authentication/admin/DeviceAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/DeviceAuth/index.js +254 -0
- package/lib/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
- package/lib/components/authentication/admin/DeviceAuth/locales.js +98 -0
- package/lib/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/DeviceAuth/types.js +17 -0
- package/lib/components/authentication/admin/OAuthConfig/OAuthConfig.less +165 -0
- package/lib/components/authentication/admin/OAuthConfig/index.d.ts +6 -0
- package/lib/components/authentication/admin/OAuthConfig/index.js +226 -0
- package/lib/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
- package/lib/components/authentication/admin/OAuthConfig/locales.js +140 -0
- package/lib/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
- package/lib/components/authentication/admin/OAuthConfig/types.js +17 -0
- package/lib/components/authentication/admin/OrgAdminAuth/OrgAdminAuth.less +104 -0
- package/lib/components/authentication/admin/OrgAdminAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/OrgAdminAuth/index.js +398 -0
- package/lib/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
- package/lib/components/authentication/admin/OrgAdminAuth/locales.js +98 -0
- package/lib/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/OrgAdminAuth/types.js +17 -0
- package/lib/components/authentication/admin/POSOperatorAuth/POSOperatorAuth.less +104 -0
- package/lib/components/authentication/admin/POSOperatorAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/POSOperatorAuth/index.js +262 -0
- package/lib/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
- package/lib/components/authentication/admin/POSOperatorAuth/locales.js +89 -0
- package/lib/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/POSOperatorAuth/types.js +17 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/SaaSAdminAuth.less +104 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/index.d.ts +6 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/index.js +481 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/locales.js +98 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/types.js +17 -0
- package/lib/components/authentication/admin/index.d.ts +26 -0
- package/lib/components/authentication/admin/index.js +83 -0
- package/lib/components/authentication/index.d.ts +0 -0
- package/lib/components/authentication/index.js +0 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/customSelect/index.js +26 -3
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +17 -10
- package/lib/components/booking/components/footer/utils.js +11 -6
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +2 -1
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/checkout/PaymentModal.js +73 -11
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +50 -11
- package/lib/components/checkout/components/AmountSummary/index.js +5 -46
- package/lib/components/checkout/components/AmountSummary/index.less +1 -1
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/index.d.ts +3 -2
- package/lib/components/index.js +20 -1
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +27 -7
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +32 -8
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -4
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.d.ts +15 -0
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +88 -0
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +34 -0
- package/lib/components/pay/toC/PaymentMethods/hooks/index.d.ts +19 -0
- package/lib/components/pay/toC/PaymentMethods/hooks/index.js +90 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/index.js +11 -2
- package/lib/components/pay/toC/locales.d.ts +9 -0
- package/lib/components/pay/toC/locales.js +12 -3
- package/lib/components/pay/toC/model.d.ts +1 -0
- package/lib/components/pay/toC/serve.d.ts +5 -0
- package/lib/components/pay/toC/serve.js +3 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
- package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
- package/lib/components/ticketBooking/locales.d.ts +6 -0
- package/lib/components/ticketBooking/locales.js +9 -3
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/index.js +31 -3
- package/lib/components/wallet/Detail/index.less +11 -0
- package/lib/components/wallet/Detail/locales.d.ts +6 -0
- package/lib/components/wallet/Detail/locales.js +14 -2
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/components/WalletCard.js +4 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/serve.d.ts +7 -0
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/wallet/utils.js +287 -0
- package/lib/components/walletList/index.js +88 -47
- package/lib/components/walletList/serve.d.ts +4 -0
- package/lib/components/walletList/serve.js +12 -0
- package/lib/components/walletList/types/index.d.ts +12 -12
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/index.d.ts +6 -1
- package/lib/index.js +35 -3
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +86 -71
- package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/lib/plus/productSelect/ProductCard/index.js +18 -4
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/lib/plus/productSelect/index.d.ts +3 -2
- package/lib/plus/productSelect/index.js +20 -6
- package/lib/plus/productSelect/index.less +4 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/lib/plus/walletEditor/WalletEditor.js +354 -0
- package/lib/plus/walletEditor/WalletEditor.less +129 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +7 -0
- package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
- package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/lib/plus/walletEditor/index.d.ts +3 -0
- package/lib/plus/walletEditor/index.js +42 -0
- package/lib/plus/walletEditor/locales.d.ts +126 -0
- package/lib/plus/walletEditor/locales.js +167 -0
- package/lib/plus/walletEditor/types.d.ts +52 -0
- package/lib/plus/walletEditor/types.js +17 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +323 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +12 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
- package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
- package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/lib/plus/walletPassGallery/index.d.ts +6 -0
- package/lib/plus/walletPassGallery/index.js +500 -0
- package/lib/plus/walletPassGallery/index.less +115 -0
- package/lib/plus/walletPassGallery/locales.d.ts +270 -0
- package/lib/plus/walletPassGallery/locales.js +299 -0
- package/lib/plus/walletPassGallery/serve.d.ts +221 -0
- package/lib/plus/walletPassGallery/serve.js +99 -0
- package/lib/pro/Login2.0/AuthModal.d.ts +143 -0
- package/lib/pro/Login2.0/AuthModal.js +503 -0
- package/lib/pro/Login2.0/Login2.d.ts +61 -0
- package/lib/pro/Login2.0/Login2.js +1545 -0
- package/lib/pro/Login2.0/Register2.d.ts +65 -0
- package/lib/pro/Login2.0/Register2.js +1063 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
- package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
- package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
- package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
- package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
- package/lib/pro/Login2.0/hooks/index.js +29 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
- package/lib/pro/Login2.0/index.js +45 -0
- package/lib/pro/Login2.0/index.less +1002 -0
- package/lib/pro/Login2.0/locales.d.ts +543 -0
- package/lib/pro/Login2.0/locales.js +646 -0
- package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
- package/lib/pro/Login2.0/shared/Header.js +81 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
- package/lib/pro/Login2.0/shared/types.d.ts +232 -0
- package/lib/pro/Login2.0/shared/types.js +17 -0
- package/lib/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
- package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
- package/lib/pro/Login2.0/steps/index.d.ts +19 -0
- package/lib/pro/Login2.0/steps/index.js +60 -0
- package/lib/pro/Login2.0/steps/steps.less +423 -0
- package/lib/pro/Login2.0/types.d.ts +167 -0
- package/lib/pro/Login2.0/types.js +17 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +16 -30
- package/lib/pro/pisellPaymentList/example.d.ts +20 -0
- package/lib/pro/pisellPaymentList/example.js +416 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +9 -5
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lowcode/admin-auth-customer-auth/meta.ts +29 -0
- package/lowcode/admin-auth-customer-oauth-config/meta.ts +55 -0
- package/lowcode/admin-auth-device-auth/meta.ts +30 -0
- package/lowcode/admin-auth-methods/meta.ts +385 -0
- package/lowcode/admin-auth-oauth-config/meta.ts +29 -0
- package/lowcode/admin-auth-online-shop-auth/meta.ts +29 -0
- package/lowcode/admin-auth-org-admin-auth/meta.ts +29 -0
- package/lowcode/admin-auth-pos-operator-auth/meta.ts +30 -0
- package/lowcode/admin-auth-saas-admin-auth/meta.ts +29 -0
- package/lowcode/admin-auth-saas-managerment-auth/meta.ts +30 -0
- package/lowcode/admin-setting-list/meta.ts +125 -0
- package/lowcode/authmodal/meta.ts +395 -0
- package/lowcode/login2/CONFIG.md +447 -0
- package/lowcode/login2/TEST_CONFIG.md +324 -0
- package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
- package/lowcode/login2/meta.ts +560 -0
- package/lowcode/login2/snippets.ts +124 -0
- package/lowcode/pro-register/meta.ts +385 -0
- package/lowcode/register2/meta.ts +562 -0
- package/lowcode/register2/snippets.ts +257 -0
- package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
- package/lowcode/wallet-editor/meta.ts +57 -0
- package/lowcode/wallet-editor/snippets.ts +13 -0
- package/lowcode/wallet-pass-detail/meta.ts +89 -0
- package/lowcode/wallet-pass-gallery/meta.ts +35 -0
- package/package.json +13 -13
- package/lowcode/wallet/meta.ts +0 -79
|
@@ -0,0 +1,1502 @@
|
|
|
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 _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; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
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); }
|
|
6
|
+
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); }
|
|
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, useMemo, useCallback } from 'react';
|
|
17
|
+
import { Form, message } from 'antd';
|
|
18
|
+
import { Input, Button } from '@pisell/materials';
|
|
19
|
+
import { useDebounceFn } from 'ahooks';
|
|
20
|
+
import classNames from 'classnames';
|
|
21
|
+
import { locales } from '@pisell/utils';
|
|
22
|
+
import localeTexts from "./locales";
|
|
23
|
+
import Header from "./shared/Header";
|
|
24
|
+
import PhoneInput from "./components/PhoneInput";
|
|
25
|
+
import { createPhoneValidationRules } from "./components/phoneValidation";
|
|
26
|
+
import LegalTerms from "./components/LegalTerms";
|
|
27
|
+
import "./index.less";
|
|
28
|
+
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
29
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
30
|
+
import { useRegisterFlow } from "./hooks/useRegisterFlow";
|
|
31
|
+
import { useRegistrationMethods } from "./hooks/useRegistrationMethods";
|
|
32
|
+
import { RegisterStep, VerificationMethod } from "./shared/registerFlow";
|
|
33
|
+
import { WaitEmailLink, EmailAlreadyRegistered, CodeInput, VerificationSuccess, SetPassword, VerifyingEmailLink, EmailLinkExpired, EmailLinkAlreadyUsed } from "./steps";
|
|
34
|
+
import "./steps/steps.less";
|
|
35
|
+
import { Iconfont } from '@pisell/materials';
|
|
36
|
+
import usePasswordValidationRules from "./hooks/usePasswordValidationRules";
|
|
37
|
+
import OAuthButtonGroup from "./components/OAuthButtonGroup";
|
|
38
|
+
|
|
39
|
+
/** 注册组件配置 */
|
|
40
|
+
|
|
41
|
+
/** 注册组件事件 */
|
|
42
|
+
|
|
43
|
+
/** 注册组件属性 */
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 注册 2.0 组件
|
|
47
|
+
* 支持邮箱、手机、三方注册
|
|
48
|
+
* 组件宽度固定 360px
|
|
49
|
+
*/
|
|
50
|
+
var Register2 = function Register2(_ref) {
|
|
51
|
+
var _context$appHelper, _utils$getStore, _utils$getStore$getSt, _config$ui, _config$emailLinkVeri3, _config$ui4, _config$ui5, _config$ui6, _config$ui7, _config$ui8, _config$ui9;
|
|
52
|
+
var config = _ref.config,
|
|
53
|
+
_ref$visible = _ref.visible,
|
|
54
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
55
|
+
onClose = _ref.onClose,
|
|
56
|
+
className = _ref.className,
|
|
57
|
+
style = _ref.style,
|
|
58
|
+
onRegister = _ref.onRegister,
|
|
59
|
+
onOAuthLogin = _ref.onOAuthLogin,
|
|
60
|
+
onSendVerificationCode = _ref.onSendVerificationCode,
|
|
61
|
+
onEmailLinkExpired = _ref.onEmailLinkExpired,
|
|
62
|
+
onGoToLogin = _ref.onGoToLogin,
|
|
63
|
+
onError = _ref.onError;
|
|
64
|
+
var _Form$useForm = Form.useForm(),
|
|
65
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
66
|
+
form = _Form$useForm2[0];
|
|
67
|
+
var _useState = useState(false),
|
|
68
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
+
loading = _useState2[0],
|
|
70
|
+
setLoading = _useState2[1];
|
|
71
|
+
var _useState3 = useState(0),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
countdown = _useState4[0],
|
|
74
|
+
setCountdown = _useState4[1];
|
|
75
|
+
var _useState5 = useState([]),
|
|
76
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
77
|
+
countries = _useState6[0],
|
|
78
|
+
setCountries = _useState6[1];
|
|
79
|
+
var _useState7 = useState(''),
|
|
80
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
81
|
+
codeError = _useState8[0],
|
|
82
|
+
setCodeError = _useState8[1];
|
|
83
|
+
var pisellOS = usePisellOS();
|
|
84
|
+
var registerAndLogin = pisellOS === null || pisellOS === void 0 ? void 0 : pisellOS.getModule('registerAndLogin');
|
|
85
|
+
|
|
86
|
+
// 获取 context 和 shopId
|
|
87
|
+
var context = useEngineContext();
|
|
88
|
+
var utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
|
|
89
|
+
var 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;
|
|
90
|
+
|
|
91
|
+
// 邮件链接验证模式相关状态
|
|
92
|
+
var _useState9 = useState(null),
|
|
93
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
|
+
emailLinkVerifyStatus = _useState10[0],
|
|
95
|
+
setEmailLinkVerifyStatus = _useState10[1];
|
|
96
|
+
var _useState11 = useState(''),
|
|
97
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
98
|
+
verifiedEmail = _useState12[0],
|
|
99
|
+
setVerifiedEmail = _useState12[1];
|
|
100
|
+
|
|
101
|
+
// 规范化注册方式配置
|
|
102
|
+
var normalizedRegistrationMethods = useMemo(function () {
|
|
103
|
+
var _config$email, _config$phone, _config$oauth, _config$oauth2, _config$oauth3, _config$oauth4, _config$oauth5, _config$oauth6;
|
|
104
|
+
if (config.registrationMethods && config.registrationMethods.length > 0) {
|
|
105
|
+
return config.registrationMethods;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// 向后兼容:从旧的配置中构建 registrationMethods
|
|
109
|
+
var methods = [];
|
|
110
|
+
|
|
111
|
+
// 添加邮箱注册方式
|
|
112
|
+
if ((_config$email = config.email) !== null && _config$email !== void 0 && _config$email.enable_email) {
|
|
113
|
+
methods.push({
|
|
114
|
+
type: 'email',
|
|
115
|
+
verificationMethod: config.email.registration_verification ? config.email.registration_verification : 'verification_code'
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// 添加手机注册方式
|
|
120
|
+
if ((_config$phone = config.phone) !== null && _config$phone !== void 0 && _config$phone.enable_phone_number) {
|
|
121
|
+
methods.push({
|
|
122
|
+
type: 'phone',
|
|
123
|
+
verificationMethod: 'verification_code' // 手机号仅支持验证码
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 添加三方注册方式
|
|
128
|
+
if ((_config$oauth = config.oauth) !== null && _config$oauth !== void 0 && (_config$oauth = _config$oauth.google) !== null && _config$oauth !== void 0 && _config$oauth.enabled && (_config$oauth2 = config.oauth) !== null && _config$oauth2 !== void 0 && (_config$oauth2 = _config$oauth2.google) !== null && _config$oauth2 !== void 0 && _config$oauth2.client_id) {
|
|
129
|
+
methods.push({
|
|
130
|
+
type: 'google',
|
|
131
|
+
clientId: config.oauth.google.client_id
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if ((_config$oauth3 = config.oauth) !== null && _config$oauth3 !== void 0 && (_config$oauth3 = _config$oauth3.facebook) !== null && _config$oauth3 !== void 0 && _config$oauth3.enabled && (_config$oauth4 = config.oauth) !== null && _config$oauth4 !== void 0 && (_config$oauth4 = _config$oauth4.facebook) !== null && _config$oauth4 !== void 0 && _config$oauth4.app_id) {
|
|
135
|
+
methods.push({
|
|
136
|
+
type: 'facebook',
|
|
137
|
+
appId: config.oauth.facebook.app_id
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if ((_config$oauth5 = config.oauth) !== null && _config$oauth5 !== void 0 && (_config$oauth5 = _config$oauth5.apple) !== null && _config$oauth5 !== void 0 && _config$oauth5.enabled && (_config$oauth6 = config.oauth) !== null && _config$oauth6 !== void 0 && (_config$oauth6 = _config$oauth6.apple) !== null && _config$oauth6 !== void 0 && _config$oauth6.client_id) {
|
|
141
|
+
methods.push({
|
|
142
|
+
type: 'apple',
|
|
143
|
+
clientId: config.oauth.apple.client_id
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return methods;
|
|
147
|
+
}, [config.registrationMethods, config.email, config.phone, config.oauth]);
|
|
148
|
+
|
|
149
|
+
// 智能判断默认认证方式
|
|
150
|
+
var getDefaultAuthMethod = function getDefaultAuthMethod() {
|
|
151
|
+
var _config$phone2, _config$email2, _config$email3, _config$phone3;
|
|
152
|
+
// 1. 优先使用 registrationMethods 配置
|
|
153
|
+
if (normalizedRegistrationMethods.length > 0) {
|
|
154
|
+
// 如果有明确的 defaultAuthMethod 且该方式在 registrationMethods 中存在
|
|
155
|
+
if (config.defaultAuthMethod) {
|
|
156
|
+
var _method = normalizedRegistrationMethods.find(function (m) {
|
|
157
|
+
return m.type === config.defaultAuthMethod;
|
|
158
|
+
});
|
|
159
|
+
if (_method) {
|
|
160
|
+
return config.defaultAuthMethod;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// 否则返回第一个注册方式
|
|
165
|
+
return normalizedRegistrationMethods[0].type;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 2. 向后兼容:使用旧的配置逻辑
|
|
169
|
+
if (config.defaultAuthMethod) {
|
|
170
|
+
return config.defaultAuthMethod;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 3. 如果只启用了手机认证,默认使用手机
|
|
174
|
+
if ((_config$phone2 = config.phone) !== null && _config$phone2 !== void 0 && _config$phone2.enable_phone_number && !((_config$email2 = config.email) !== null && _config$email2 !== void 0 && _config$email2.enable_email)) {
|
|
175
|
+
return 'phone';
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 4. 如果只启用了邮箱认证,默认使用邮箱
|
|
179
|
+
if ((_config$email3 = config.email) !== null && _config$email3 !== void 0 && _config$email3.enable_email && !((_config$phone3 = config.phone) !== null && _config$phone3 !== void 0 && _config$phone3.enable_phone_number)) {
|
|
180
|
+
return 'email';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// 5. 都启用或都未启用,默认邮箱
|
|
184
|
+
return 'email';
|
|
185
|
+
};
|
|
186
|
+
var _useState13 = useState(function () {
|
|
187
|
+
return getDefaultAuthMethod();
|
|
188
|
+
}),
|
|
189
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
190
|
+
currentAuthMethod = _useState14[0],
|
|
191
|
+
setCurrentAuthMethod = _useState14[1];
|
|
192
|
+
|
|
193
|
+
// 获取某个注册方式的配置
|
|
194
|
+
var getRegistrationMethodConfig = useCallback(function (type) {
|
|
195
|
+
return normalizedRegistrationMethods.find(function (method) {
|
|
196
|
+
return method.type === type;
|
|
197
|
+
});
|
|
198
|
+
}, [normalizedRegistrationMethods]);
|
|
199
|
+
|
|
200
|
+
// 获取当前认证方式的验证方法
|
|
201
|
+
var getCurrentVerificationMethod = useCallback(function () {
|
|
202
|
+
var methodConfig = getRegistrationMethodConfig(currentAuthMethod);
|
|
203
|
+
if (methodConfig && 'verificationMethod' in methodConfig) {
|
|
204
|
+
return methodConfig.verificationMethod;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// 向后兼容:从旧配置中获取
|
|
208
|
+
if (currentAuthMethod === 'email') {
|
|
209
|
+
var _config$email4;
|
|
210
|
+
return ((_config$email4 = config.email) === null || _config$email4 === void 0 ? void 0 : _config$email4.registration_verification) || 'verification_code';
|
|
211
|
+
} else if (currentAuthMethod === 'phone') {
|
|
212
|
+
return 'verification_code'; // 手机号仅支持验证码
|
|
213
|
+
}
|
|
214
|
+
return 'verification_code';
|
|
215
|
+
}, [currentAuthMethod, getRegistrationMethodConfig, config.email, config.phone]);
|
|
216
|
+
var passwordValidationRules = usePasswordValidationRules((_config$ui = config.ui) === null || _config$ui === void 0 ? void 0 : _config$ui.passwordRules, {
|
|
217
|
+
translate: locales.getText,
|
|
218
|
+
fallbackMinLength: 6,
|
|
219
|
+
messageKeys: {
|
|
220
|
+
required: 'pisell-register2-password-required',
|
|
221
|
+
minLength: 'pisell-register2-password-min-length',
|
|
222
|
+
requireUppercase: 'pisell-set-password-require-uppercase',
|
|
223
|
+
requireLowercase: 'pisell-set-password-require-lowercase',
|
|
224
|
+
requireNumber: 'pisell-set-password-require-number',
|
|
225
|
+
requireSpecialCharacters: 'pisell-set-password-require-special',
|
|
226
|
+
summary: 'pisell-set-password-must-contain'
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
// 检查某个注册方式是否启用
|
|
231
|
+
var isRegistrationMethodEnabled = useCallback(function (type) {
|
|
232
|
+
return normalizedRegistrationMethods.some(function (method) {
|
|
233
|
+
return method.type === type;
|
|
234
|
+
});
|
|
235
|
+
}, [normalizedRegistrationMethods]);
|
|
236
|
+
|
|
237
|
+
// 使用注册方式相关的逻辑hook
|
|
238
|
+
var _useRegistrationMetho = useRegistrationMethods(isRegistrationMethodEnabled),
|
|
239
|
+
shouldShowDivider = _useRegistrationMetho.shouldShowDivider,
|
|
240
|
+
hasEmailAndPhone = _useRegistrationMetho.hasEmailAndPhone;
|
|
241
|
+
|
|
242
|
+
// 稳定的回调函数,避免不必要的重新渲染
|
|
243
|
+
var handleStepChange = useCallback(function () {}, []);
|
|
244
|
+
var handleComplete = useCallback(function (data) {
|
|
245
|
+
var _data$extraData;
|
|
246
|
+
// 从 data.extraData 中获取 API 返回的原始数据
|
|
247
|
+
var apiResponse = (_data$extraData = data.extraData) === null || _data$extraData === void 0 ? void 0 : _data$extraData.apiResponse;
|
|
248
|
+
onRegister === null || onRegister === void 0 || onRegister(apiResponse || (data === null || data === void 0 ? void 0 : data.data), data.accountType, {
|
|
249
|
+
account: data.account,
|
|
250
|
+
password: data.password || ''
|
|
251
|
+
}, config.channel);
|
|
252
|
+
}, [onRegister, config.channel]);
|
|
253
|
+
|
|
254
|
+
// 初始化注册流程管理
|
|
255
|
+
var _useRegisterFlow = useRegisterFlow({
|
|
256
|
+
accountType: currentAuthMethod,
|
|
257
|
+
emailConfig: config.email,
|
|
258
|
+
phoneConfig: config.phone,
|
|
259
|
+
initialAccount: '',
|
|
260
|
+
onStepChange: handleStepChange,
|
|
261
|
+
onComplete: handleComplete
|
|
262
|
+
}),
|
|
263
|
+
flowData = _useRegisterFlow.flowData,
|
|
264
|
+
currentStepDef = _useRegisterFlow.currentStepDef,
|
|
265
|
+
goToStep = _useRegisterFlow.goToStep,
|
|
266
|
+
updateFlowData = _useRegisterFlow.updateFlowData,
|
|
267
|
+
resetFlow = _useRegisterFlow.resetFlow,
|
|
268
|
+
handleError = _useRegisterFlow.handleError;
|
|
269
|
+
|
|
270
|
+
// 获取国家列表
|
|
271
|
+
useEffect(function () {
|
|
272
|
+
var fetchCountries = /*#__PURE__*/function () {
|
|
273
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
274
|
+
var countriesList;
|
|
275
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
276
|
+
while (1) switch (_context.prev = _context.next) {
|
|
277
|
+
case 0:
|
|
278
|
+
_context.prev = 0;
|
|
279
|
+
if (!(registerAndLogin !== null && registerAndLogin !== void 0 && registerAndLogin.getCountries)) {
|
|
280
|
+
_context.next = 6;
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
_context.next = 4;
|
|
284
|
+
return registerAndLogin.getCountries();
|
|
285
|
+
case 4:
|
|
286
|
+
countriesList = _context.sent;
|
|
287
|
+
setCountries(countriesList || []);
|
|
288
|
+
case 6:
|
|
289
|
+
_context.next = 11;
|
|
290
|
+
break;
|
|
291
|
+
case 8:
|
|
292
|
+
_context.prev = 8;
|
|
293
|
+
_context.t0 = _context["catch"](0);
|
|
294
|
+
console.error('Failed to fetch countries:', _context.t0);
|
|
295
|
+
// 如果获取失败,保持空数组,PhoneInput 会使用默认列表
|
|
296
|
+
case 11:
|
|
297
|
+
case "end":
|
|
298
|
+
return _context.stop();
|
|
299
|
+
}
|
|
300
|
+
}, _callee, null, [[0, 8]]);
|
|
301
|
+
}));
|
|
302
|
+
return function fetchCountries() {
|
|
303
|
+
return _ref2.apply(this, arguments);
|
|
304
|
+
};
|
|
305
|
+
}();
|
|
306
|
+
fetchCountries();
|
|
307
|
+
}, [registerAndLogin]);
|
|
308
|
+
|
|
309
|
+
// 邮件链接验证模式 - 组件挂载时验证 code
|
|
310
|
+
useEffect(function () {
|
|
311
|
+
var verifyEmailLink = /*#__PURE__*/function () {
|
|
312
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
313
|
+
var _config$emailLinkVeri, _config$emailLinkVeri2;
|
|
314
|
+
var result;
|
|
315
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
316
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
317
|
+
case 0:
|
|
318
|
+
if (!(!((_config$emailLinkVeri = config.emailLinkVerification) !== null && _config$emailLinkVeri !== void 0 && _config$emailLinkVeri.enabled) || !((_config$emailLinkVeri2 = config.emailLinkVerification) !== null && _config$emailLinkVeri2 !== void 0 && _config$emailLinkVeri2.code))) {
|
|
319
|
+
_context2.next = 2;
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
return _context2.abrupt("return");
|
|
323
|
+
case 2:
|
|
324
|
+
setEmailLinkVerifyStatus('verifying');
|
|
325
|
+
_context2.prev = 3;
|
|
326
|
+
_context2.next = 6;
|
|
327
|
+
return registerAndLogin.checkEmailLinkCode({
|
|
328
|
+
code: config.emailLinkVerification.code
|
|
329
|
+
});
|
|
330
|
+
case 6:
|
|
331
|
+
result = _context2.sent;
|
|
332
|
+
if (result.code === 200 && result.data.valid) {
|
|
333
|
+
// code 有效,保存到 flowData 并跳转到设置密码页面
|
|
334
|
+
updateFlowData({
|
|
335
|
+
emailLinkCode: config.emailLinkVerification.code,
|
|
336
|
+
account: result.data.email || '',
|
|
337
|
+
accountType: 'email',
|
|
338
|
+
verificationMethod: VerificationMethod.EMAIL_LINK
|
|
339
|
+
});
|
|
340
|
+
setVerifiedEmail(result.data.email);
|
|
341
|
+
setEmailLinkVerifyStatus('success');
|
|
342
|
+
goToStep(RegisterStep.SET_PASSWORD);
|
|
343
|
+
} else if (result.code === 50011) {
|
|
344
|
+
setEmailLinkVerifyStatus('expired');
|
|
345
|
+
} else if (!result.data.valid) {
|
|
346
|
+
setEmailLinkVerifyStatus('already_used');
|
|
347
|
+
} else {
|
|
348
|
+
setEmailLinkVerifyStatus(null);
|
|
349
|
+
message.error(result.message || '验证失败,请稍后重试');
|
|
350
|
+
}
|
|
351
|
+
_context2.next = 15;
|
|
352
|
+
break;
|
|
353
|
+
case 10:
|
|
354
|
+
_context2.prev = 10;
|
|
355
|
+
_context2.t0 = _context2["catch"](3);
|
|
356
|
+
console.error('Email link verification failed:', _context2.t0);
|
|
357
|
+
message.error('验证失败,请稍后重试');
|
|
358
|
+
setEmailLinkVerifyStatus(null);
|
|
359
|
+
case 15:
|
|
360
|
+
case "end":
|
|
361
|
+
return _context2.stop();
|
|
362
|
+
}
|
|
363
|
+
}, _callee2, null, [[3, 10]]);
|
|
364
|
+
}));
|
|
365
|
+
return function verifyEmailLink() {
|
|
366
|
+
return _ref3.apply(this, arguments);
|
|
367
|
+
};
|
|
368
|
+
}();
|
|
369
|
+
verifyEmailLink();
|
|
370
|
+
}, [config.emailLinkVerification, registerAndLogin]);
|
|
371
|
+
|
|
372
|
+
// 当组件关闭时,清空密码字段,防止浏览器弹出保存密码提示
|
|
373
|
+
useEffect(function () {
|
|
374
|
+
if (!visible) {
|
|
375
|
+
// 清空密码字段,防止浏览器检测到凭据变化而弹出保存提示
|
|
376
|
+
form.setFieldsValue({
|
|
377
|
+
password: ''
|
|
378
|
+
});
|
|
379
|
+
form.setFieldsValue({
|
|
380
|
+
confirmPassword: ''
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
// 可选:重置整个表单(如果希望更彻底的清理)
|
|
384
|
+
// form.resetFields();
|
|
385
|
+
}
|
|
386
|
+
}, [visible, form]);
|
|
387
|
+
|
|
388
|
+
// 当配置变化时,更新认证方式
|
|
389
|
+
useEffect(function () {
|
|
390
|
+
var newAuthMethod = getDefaultAuthMethod();
|
|
391
|
+
if (newAuthMethod !== currentAuthMethod) {
|
|
392
|
+
setCurrentAuthMethod(newAuthMethod);
|
|
393
|
+
form.resetFields(['account']);
|
|
394
|
+
}
|
|
395
|
+
}, [normalizedRegistrationMethods, config.defaultAuthMethod]);
|
|
396
|
+
|
|
397
|
+
// 初始化国际化
|
|
398
|
+
useEffect(function () {
|
|
399
|
+
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4;
|
|
400
|
+
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');
|
|
401
|
+
}, []);
|
|
402
|
+
|
|
403
|
+
// 验证码倒计时
|
|
404
|
+
useEffect(function () {
|
|
405
|
+
if (countdown > 0) {
|
|
406
|
+
var timer = setTimeout(function () {
|
|
407
|
+
setCountdown(countdown - 1);
|
|
408
|
+
}, 1000);
|
|
409
|
+
return function () {
|
|
410
|
+
return clearTimeout(timer);
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
}, [countdown]);
|
|
414
|
+
|
|
415
|
+
// 发送验证码或链接
|
|
416
|
+
var handleSendCode = /*#__PURE__*/function () {
|
|
417
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
418
|
+
var values, _account, _type, res, emailVerificationMethod, accountForCallback, verificationMethod;
|
|
419
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
420
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
421
|
+
case 0:
|
|
422
|
+
_context3.prev = 0;
|
|
423
|
+
_context3.next = 3;
|
|
424
|
+
return form.validateFields(['account']);
|
|
425
|
+
case 3:
|
|
426
|
+
values = _context3.sent;
|
|
427
|
+
_account = values.account;
|
|
428
|
+
setLoading(true);
|
|
429
|
+
_type = currentAuthMethod === 'email' ? 'email' : 'phone';
|
|
430
|
+
if (!(currentAuthMethod === 'email')) {
|
|
431
|
+
_context3.next = 20;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
// 邮箱认证:根据验证方式调用不同的 API
|
|
435
|
+
emailVerificationMethod = getCurrentVerificationMethod();
|
|
436
|
+
if (!(emailVerificationMethod === 'verification_link')) {
|
|
437
|
+
_context3.next = 15;
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
_context3.next = 12;
|
|
441
|
+
return registerAndLogin.sendEmailRegisterLink(_account);
|
|
442
|
+
case 12:
|
|
443
|
+
res = _context3.sent;
|
|
444
|
+
_context3.next = 18;
|
|
445
|
+
break;
|
|
446
|
+
case 15:
|
|
447
|
+
_context3.next = 17;
|
|
448
|
+
return registerAndLogin.sendEmailVerificationCode({
|
|
449
|
+
type: 'email',
|
|
450
|
+
target: _account,
|
|
451
|
+
purpose: 'register'
|
|
452
|
+
});
|
|
453
|
+
case 17:
|
|
454
|
+
res = _context3.sent;
|
|
455
|
+
case 18:
|
|
456
|
+
_context3.next = 23;
|
|
457
|
+
break;
|
|
458
|
+
case 20:
|
|
459
|
+
_context3.next = 22;
|
|
460
|
+
return registerAndLogin.sendSmsRegisterCode(_account);
|
|
461
|
+
case 22:
|
|
462
|
+
res = _context3.sent;
|
|
463
|
+
case 23:
|
|
464
|
+
// 调用外部回调(如果是手机号,需要转换为字符串格式)
|
|
465
|
+
accountForCallback = currentAuthMethod === 'phone' && _typeof(_account) === 'object' ? "+".concat(_account.country_calling_code).concat(_account.phone) : _account;
|
|
466
|
+
_context3.next = 26;
|
|
467
|
+
return onSendVerificationCode === null || onSendVerificationCode === void 0 ? void 0 : onSendVerificationCode(accountForCallback, _type, config.channel);
|
|
468
|
+
case 26:
|
|
469
|
+
// 根据响应码决定跳转到哪个步骤
|
|
470
|
+
if (res.code === 200) {
|
|
471
|
+
// 更新流程数据中的账号和账号类型
|
|
472
|
+
updateFlowData({
|
|
473
|
+
account: _account,
|
|
474
|
+
accountType: currentAuthMethod
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// 判断验证方式
|
|
478
|
+
verificationMethod = getCurrentVerificationMethod();
|
|
479
|
+
if (verificationMethod === 'verification_link') {
|
|
480
|
+
// 邮件链接验证:跳转到等待邮件链接页面(图1)
|
|
481
|
+
// 直接在 goToStep 中更新所有数据,包括验证方式
|
|
482
|
+
goToStep(RegisterStep.WAIT_EMAIL_LINK, {
|
|
483
|
+
account: _account,
|
|
484
|
+
accountType: currentAuthMethod,
|
|
485
|
+
verificationMethod: VerificationMethod.EMAIL_LINK // 同时更新验证方式
|
|
486
|
+
});
|
|
487
|
+
setCountdown(60);
|
|
488
|
+
// message.success('Verification link sent to your email');
|
|
489
|
+
// TODO 到发送成功的页面去
|
|
490
|
+
} else if (verificationMethod === 'verification_code') {
|
|
491
|
+
// 验证码验证(邮箱或手机):跳转到输入验证码页面(图2)
|
|
492
|
+
goToStep(RegisterStep.INPUT_VERIFICATION_CODE, {
|
|
493
|
+
account: _account,
|
|
494
|
+
accountType: currentAuthMethod
|
|
495
|
+
});
|
|
496
|
+
setCountdown(60);
|
|
497
|
+
message.success(locales.getText('pisell-login2-code-sent'));
|
|
498
|
+
}
|
|
499
|
+
} else if (res.code === 5002) {
|
|
500
|
+
// 账号已注册(邮箱或手机号)
|
|
501
|
+
goToStep(RegisterStep.EMAIL_ALREADY_REGISTERED, {
|
|
502
|
+
account: _account,
|
|
503
|
+
accountType: currentAuthMethod
|
|
504
|
+
});
|
|
505
|
+
} else {
|
|
506
|
+
message.error(res.message);
|
|
507
|
+
}
|
|
508
|
+
_context3.next = 35;
|
|
509
|
+
break;
|
|
510
|
+
case 29:
|
|
511
|
+
_context3.prev = 29;
|
|
512
|
+
_context3.t0 = _context3["catch"](0);
|
|
513
|
+
if (!_context3.t0.errorFields) {
|
|
514
|
+
_context3.next = 33;
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
return _context3.abrupt("return");
|
|
518
|
+
case 33:
|
|
519
|
+
handleError('SEND_CODE_FAILED', _context3.t0.message || 'Failed to send verification code');
|
|
520
|
+
message.error(_context3.t0 === null || _context3.t0 === void 0 ? void 0 : _context3.t0.message);
|
|
521
|
+
case 35:
|
|
522
|
+
_context3.prev = 35;
|
|
523
|
+
setLoading(false);
|
|
524
|
+
return _context3.finish(35);
|
|
525
|
+
case 38:
|
|
526
|
+
case "end":
|
|
527
|
+
return _context3.stop();
|
|
528
|
+
}
|
|
529
|
+
}, _callee3, null, [[0, 29, 35, 38]]);
|
|
530
|
+
}));
|
|
531
|
+
return function handleSendCode() {
|
|
532
|
+
return _ref4.apply(this, arguments);
|
|
533
|
+
};
|
|
534
|
+
}();
|
|
535
|
+
|
|
536
|
+
// 处理注册(无需验证模式)
|
|
537
|
+
var handleRegister = /*#__PURE__*/function () {
|
|
538
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
539
|
+
var values, registerData;
|
|
540
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
541
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
542
|
+
case 0:
|
|
543
|
+
_context4.prev = 0;
|
|
544
|
+
setLoading(true);
|
|
545
|
+
_context4.next = 4;
|
|
546
|
+
return form.validateFields();
|
|
547
|
+
case 4:
|
|
548
|
+
values = _context4.sent;
|
|
549
|
+
registerData = {
|
|
550
|
+
account: values.account,
|
|
551
|
+
password: values.password
|
|
552
|
+
}; // TODO: 调用后端注册接口
|
|
553
|
+
// const res = await registerAndLogin.register({
|
|
554
|
+
// type: currentAuthMethod === 'email' ? 'email' : 'phone',
|
|
555
|
+
// account: registerData.account,
|
|
556
|
+
// password: registerData.password,
|
|
557
|
+
// channel: config.channel
|
|
558
|
+
// });
|
|
559
|
+
// if (res.code === 200) {
|
|
560
|
+
// message.success('Registration successful');
|
|
561
|
+
// await onRegister?.(registerData, currentAuthMethod, config.channel);
|
|
562
|
+
// } else if (res.code === 409) {
|
|
563
|
+
// // 账号已注册
|
|
564
|
+
// goToStep(RegisterStep.EMAIL_ALREADY_REGISTERED, { account: registerData.account });
|
|
565
|
+
// } else {
|
|
566
|
+
// message.error(res.message || 'Registration failed');
|
|
567
|
+
// }
|
|
568
|
+
// 临时:直接调用回调
|
|
569
|
+
_context4.next = 8;
|
|
570
|
+
return onRegister === null || onRegister === void 0 ? void 0 : onRegister(registerData, currentAuthMethod, config.channel);
|
|
571
|
+
case 8:
|
|
572
|
+
message.success(locales.getText('pisell-register2-register-success'));
|
|
573
|
+
_context4.next = 16;
|
|
574
|
+
break;
|
|
575
|
+
case 11:
|
|
576
|
+
_context4.prev = 11;
|
|
577
|
+
_context4.t0 = _context4["catch"](0);
|
|
578
|
+
if (!_context4.t0.errorFields) {
|
|
579
|
+
_context4.next = 15;
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
return _context4.abrupt("return");
|
|
583
|
+
case 15:
|
|
584
|
+
message.error((_context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message) || 'Registration failed');
|
|
585
|
+
case 16:
|
|
586
|
+
_context4.prev = 16;
|
|
587
|
+
setLoading(false);
|
|
588
|
+
return _context4.finish(16);
|
|
589
|
+
case 19:
|
|
590
|
+
case "end":
|
|
591
|
+
return _context4.stop();
|
|
592
|
+
}
|
|
593
|
+
}, _callee4, null, [[0, 11, 16, 19]]);
|
|
594
|
+
}));
|
|
595
|
+
return function handleRegister() {
|
|
596
|
+
return _ref5.apply(this, arguments);
|
|
597
|
+
};
|
|
598
|
+
}();
|
|
599
|
+
|
|
600
|
+
// 处理表单提交(用于 Enter 键提交和按钮点击)
|
|
601
|
+
var handleFormSubmit = function handleFormSubmit(e) {
|
|
602
|
+
e === null || e === void 0 || e.preventDefault();
|
|
603
|
+
if (isEmailNoVerification) {
|
|
604
|
+
handleRegister();
|
|
605
|
+
} else if (needsVerification) {
|
|
606
|
+
handleSendCode();
|
|
607
|
+
} else {
|
|
608
|
+
handleRegister();
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
// 处理三方登录
|
|
613
|
+
var handleOAuthClickInternal = /*#__PURE__*/function () {
|
|
614
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(provider) {
|
|
615
|
+
var _config$registrationM, fbConfig, token, res, _config$registrationM2, appleConfig, _token, _res, _config$registrationM3, googleConfig, _token2, _res2;
|
|
616
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
617
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
618
|
+
case 0:
|
|
619
|
+
_context5.prev = 0;
|
|
620
|
+
setLoading(true);
|
|
621
|
+
if (!(provider === 'facebook')) {
|
|
622
|
+
_context5.next = 15;
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
fbConfig = config === null || config === void 0 || (_config$registrationM = config.registrationMethods) === null || _config$registrationM === void 0 ? void 0 : _config$registrationM.find(function (n) {
|
|
626
|
+
return n.type === 'facebook';
|
|
627
|
+
});
|
|
628
|
+
token = fbConfig === null || fbConfig === void 0 ? void 0 : fbConfig.appId;
|
|
629
|
+
if (token) {
|
|
630
|
+
_context5.next = 7;
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
|
+
throw new Error('Facebook app_id not configured');
|
|
634
|
+
case 7:
|
|
635
|
+
_context5.next = 9;
|
|
636
|
+
return registerAndLogin.loginWithFacebook(token);
|
|
637
|
+
case 9:
|
|
638
|
+
res = _context5.sent;
|
|
639
|
+
if (!res.data) {
|
|
640
|
+
_context5.next = 13;
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
_context5.next = 13;
|
|
644
|
+
return onRegister === null || onRegister === void 0 ? void 0 : onRegister(res.data, 'facebook', {
|
|
645
|
+
account: '',
|
|
646
|
+
password: ''
|
|
647
|
+
}, config.channel);
|
|
648
|
+
case 13:
|
|
649
|
+
_context5.next = 43;
|
|
650
|
+
break;
|
|
651
|
+
case 15:
|
|
652
|
+
if (!(provider === 'apple')) {
|
|
653
|
+
_context5.next = 30;
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
appleConfig = config === null || config === void 0 || (_config$registrationM2 = config.registrationMethods) === null || _config$registrationM2 === void 0 ? void 0 : _config$registrationM2.find(function (n) {
|
|
657
|
+
return n.type === 'apple';
|
|
658
|
+
});
|
|
659
|
+
_token = appleConfig === null || appleConfig === void 0 ? void 0 : appleConfig.clientId;
|
|
660
|
+
if (!_token) {
|
|
661
|
+
_context5.next = 27;
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
_context5.next = 21;
|
|
665
|
+
return registerAndLogin.loginWithApple(_token);
|
|
666
|
+
case 21:
|
|
667
|
+
_res = _context5.sent;
|
|
668
|
+
if (!_res.data) {
|
|
669
|
+
_context5.next = 25;
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
_context5.next = 25;
|
|
673
|
+
return onRegister === null || onRegister === void 0 ? void 0 : onRegister(_res.data, 'apple', {
|
|
674
|
+
account: '',
|
|
675
|
+
password: ''
|
|
676
|
+
}, config.channel);
|
|
677
|
+
case 25:
|
|
678
|
+
_context5.next = 28;
|
|
679
|
+
break;
|
|
680
|
+
case 27:
|
|
681
|
+
throw new Error('Apple client_id not configured');
|
|
682
|
+
case 28:
|
|
683
|
+
_context5.next = 43;
|
|
684
|
+
break;
|
|
685
|
+
case 30:
|
|
686
|
+
if (!(provider === 'google')) {
|
|
687
|
+
_context5.next = 43;
|
|
688
|
+
break;
|
|
689
|
+
}
|
|
690
|
+
googleConfig = config === null || config === void 0 || (_config$registrationM3 = config.registrationMethods) === null || _config$registrationM3 === void 0 ? void 0 : _config$registrationM3.find(function (n) {
|
|
691
|
+
return n.type === 'google';
|
|
692
|
+
});
|
|
693
|
+
_token2 = googleConfig === null || googleConfig === void 0 ? void 0 : googleConfig.clientId;
|
|
694
|
+
if (!_token2) {
|
|
695
|
+
_context5.next = 42;
|
|
696
|
+
break;
|
|
697
|
+
}
|
|
698
|
+
_context5.next = 36;
|
|
699
|
+
return registerAndLogin.loginWithGoogle(_token2);
|
|
700
|
+
case 36:
|
|
701
|
+
_res2 = _context5.sent;
|
|
702
|
+
if (!_res2.data) {
|
|
703
|
+
_context5.next = 40;
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
_context5.next = 40;
|
|
707
|
+
return onRegister === null || onRegister === void 0 ? void 0 : onRegister(_res2.data, 'google', {
|
|
708
|
+
account: '',
|
|
709
|
+
password: ''
|
|
710
|
+
}, config.channel);
|
|
711
|
+
case 40:
|
|
712
|
+
_context5.next = 43;
|
|
713
|
+
break;
|
|
714
|
+
case 42:
|
|
715
|
+
throw new Error('Google client_id not configured');
|
|
716
|
+
case 43:
|
|
717
|
+
_context5.next = 45;
|
|
718
|
+
return onOAuthLogin === null || onOAuthLogin === void 0 ? void 0 : onOAuthLogin(provider, config.channel);
|
|
719
|
+
case 45:
|
|
720
|
+
_context5.next = 54;
|
|
721
|
+
break;
|
|
722
|
+
case 47:
|
|
723
|
+
_context5.prev = 47;
|
|
724
|
+
_context5.t0 = _context5["catch"](0);
|
|
725
|
+
if (!(_context5.t0.message === 'facebook_login_cancel')) {
|
|
726
|
+
_context5.next = 51;
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
return _context5.abrupt("return", message.error(locales.getText('pisell-register2-facebook-login-canceled')));
|
|
730
|
+
case 51:
|
|
731
|
+
console.error("".concat(provider, " login error:"), _context5.t0);
|
|
732
|
+
message.error((_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.message) || "".concat(provider, " login failed"));
|
|
733
|
+
onError === null || onError === void 0 || onError(_context5.t0, provider);
|
|
734
|
+
case 54:
|
|
735
|
+
_context5.prev = 54;
|
|
736
|
+
setLoading(false);
|
|
737
|
+
return _context5.finish(54);
|
|
738
|
+
case 57:
|
|
739
|
+
case "end":
|
|
740
|
+
return _context5.stop();
|
|
741
|
+
}
|
|
742
|
+
}, _callee5, null, [[0, 47, 54, 57]]);
|
|
743
|
+
}));
|
|
744
|
+
return function handleOAuthClickInternal(_x) {
|
|
745
|
+
return _ref6.apply(this, arguments);
|
|
746
|
+
};
|
|
747
|
+
}();
|
|
748
|
+
|
|
749
|
+
// 使用防抖的 OAuth 点击处理函数
|
|
750
|
+
var _useDebounceFn = useDebounceFn(handleOAuthClickInternal, {
|
|
751
|
+
wait: 200,
|
|
752
|
+
leading: true,
|
|
753
|
+
trailing: false
|
|
754
|
+
}),
|
|
755
|
+
handleOAuthClick = _useDebounceFn.run;
|
|
756
|
+
var oauthProviders = useMemo(function () {
|
|
757
|
+
var providers = [];
|
|
758
|
+
if (isRegistrationMethodEnabled('google')) {
|
|
759
|
+
providers.push({
|
|
760
|
+
key: 'google',
|
|
761
|
+
label: locales.getText('pisell-register2-continue-with-google'),
|
|
762
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
763
|
+
className: "oauth-icon"
|
|
764
|
+
}, "G"),
|
|
765
|
+
onClick: function onClick() {
|
|
766
|
+
return handleOAuthClick('google');
|
|
767
|
+
},
|
|
768
|
+
className: 'oauth-button google'
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
if (isRegistrationMethodEnabled('facebook')) {
|
|
772
|
+
providers.push({
|
|
773
|
+
key: 'facebook',
|
|
774
|
+
label: locales.getText('pisell-register2-continue-with-facebook'),
|
|
775
|
+
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
776
|
+
type: "pisell2-facebook",
|
|
777
|
+
className: "oauth-icon"
|
|
778
|
+
}),
|
|
779
|
+
onClick: function onClick() {
|
|
780
|
+
return handleOAuthClick('facebook');
|
|
781
|
+
},
|
|
782
|
+
className: 'oauth-button facebook'
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
if (isRegistrationMethodEnabled('apple')) {
|
|
786
|
+
providers.push({
|
|
787
|
+
key: 'apple',
|
|
788
|
+
label: locales.getText('pisell-register2-continue-with-apple'),
|
|
789
|
+
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
790
|
+
type: "pisell2-apple",
|
|
791
|
+
className: "oauth-icon"
|
|
792
|
+
}),
|
|
793
|
+
onClick: function onClick() {
|
|
794
|
+
return handleOAuthClick('apple');
|
|
795
|
+
},
|
|
796
|
+
className: 'oauth-button apple'
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
return providers;
|
|
800
|
+
}, [handleOAuthClick, isRegistrationMethodEnabled]);
|
|
801
|
+
|
|
802
|
+
// 重新发送验证码/链接
|
|
803
|
+
var handleResendCode = /*#__PURE__*/function () {
|
|
804
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
805
|
+
var _type2, verificationMethod, res, successMessage, errorMessage, _errorMessage, _verificationMethod;
|
|
806
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
807
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
808
|
+
case 0:
|
|
809
|
+
if (!(countdown > 0)) {
|
|
810
|
+
_context6.next = 2;
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
return _context6.abrupt("return");
|
|
814
|
+
case 2:
|
|
815
|
+
_context6.prev = 2;
|
|
816
|
+
setLoading(true);
|
|
817
|
+
_type2 = currentAuthMethod === 'email' ? 'email' : 'phone';
|
|
818
|
+
verificationMethod = getCurrentVerificationMethod();
|
|
819
|
+
if (!(currentAuthMethod === 'email')) {
|
|
820
|
+
_context6.next = 18;
|
|
821
|
+
break;
|
|
822
|
+
}
|
|
823
|
+
if (!(verificationMethod === 'verification_link')) {
|
|
824
|
+
_context6.next = 13;
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
_context6.next = 10;
|
|
828
|
+
return registerAndLogin.resendEmailRegisterLink();
|
|
829
|
+
case 10:
|
|
830
|
+
res = _context6.sent;
|
|
831
|
+
_context6.next = 16;
|
|
832
|
+
break;
|
|
833
|
+
case 13:
|
|
834
|
+
_context6.next = 15;
|
|
835
|
+
return registerAndLogin.sendEmailVerificationCode({
|
|
836
|
+
type: 'email',
|
|
837
|
+
target: flowData.account,
|
|
838
|
+
purpose: 'register'
|
|
839
|
+
});
|
|
840
|
+
case 15:
|
|
841
|
+
res = _context6.sent;
|
|
842
|
+
case 16:
|
|
843
|
+
_context6.next = 21;
|
|
844
|
+
break;
|
|
845
|
+
case 18:
|
|
846
|
+
_context6.next = 20;
|
|
847
|
+
return registerAndLogin.sendSmsRegisterCode(flowData.account);
|
|
848
|
+
case 20:
|
|
849
|
+
res = _context6.sent;
|
|
850
|
+
case 21:
|
|
851
|
+
if (res.code === 200) {
|
|
852
|
+
setCountdown(60);
|
|
853
|
+
|
|
854
|
+
// 根据认证方式和验证方法显示不同的成功提示
|
|
855
|
+
successMessage = '';
|
|
856
|
+
if (currentAuthMethod === 'email') {
|
|
857
|
+
if (verificationMethod === 'verification_link') {
|
|
858
|
+
successMessage = locales.getText('pisell-register2-email-link-resent');
|
|
859
|
+
} else {
|
|
860
|
+
successMessage = locales.getText('pisell-register2-email-code-resent');
|
|
861
|
+
}
|
|
862
|
+
} else {
|
|
863
|
+
successMessage = locales.getText('pisell-register2-phone-code-resent');
|
|
864
|
+
}
|
|
865
|
+
message.success(successMessage);
|
|
866
|
+
} else {
|
|
867
|
+
// 根据认证方式和验证方法显示不同的失败提示
|
|
868
|
+
errorMessage = '';
|
|
869
|
+
if (currentAuthMethod === 'email') {
|
|
870
|
+
if (verificationMethod === 'verification_link') {
|
|
871
|
+
errorMessage = locales.getText('pisell-register2-email-link-resend-failed');
|
|
872
|
+
} else {
|
|
873
|
+
errorMessage = locales.getText('pisell-register2-email-code-resend-failed');
|
|
874
|
+
}
|
|
875
|
+
} else {
|
|
876
|
+
errorMessage = locales.getText('pisell-register2-phone-code-resend-failed');
|
|
877
|
+
}
|
|
878
|
+
message.error(res.message || errorMessage);
|
|
879
|
+
}
|
|
880
|
+
_context6.next = 30;
|
|
881
|
+
break;
|
|
882
|
+
case 24:
|
|
883
|
+
_context6.prev = 24;
|
|
884
|
+
_context6.t0 = _context6["catch"](2);
|
|
885
|
+
// 根据认证方式和验证方法显示不同的失败提示
|
|
886
|
+
_errorMessage = '';
|
|
887
|
+
_verificationMethod = getCurrentVerificationMethod();
|
|
888
|
+
if (currentAuthMethod === 'email') {
|
|
889
|
+
if (_verificationMethod === 'verification_link') {
|
|
890
|
+
_errorMessage = locales.getText('pisell-register2-email-link-resend-failed');
|
|
891
|
+
} else {
|
|
892
|
+
_errorMessage = locales.getText('pisell-register2-email-code-resend-failed');
|
|
893
|
+
}
|
|
894
|
+
} else {
|
|
895
|
+
_errorMessage = locales.getText('pisell-register2-phone-code-resend-failed');
|
|
896
|
+
}
|
|
897
|
+
message.error(_errorMessage);
|
|
898
|
+
case 30:
|
|
899
|
+
_context6.prev = 30;
|
|
900
|
+
setLoading(false);
|
|
901
|
+
return _context6.finish(30);
|
|
902
|
+
case 33:
|
|
903
|
+
case "end":
|
|
904
|
+
return _context6.stop();
|
|
905
|
+
}
|
|
906
|
+
}, _callee6, null, [[2, 24, 30, 33]]);
|
|
907
|
+
}));
|
|
908
|
+
return function handleResendCode() {
|
|
909
|
+
return _ref7.apply(this, arguments);
|
|
910
|
+
};
|
|
911
|
+
}();
|
|
912
|
+
|
|
913
|
+
// 验证验证码
|
|
914
|
+
var handleVerifyCode = /*#__PURE__*/function () {
|
|
915
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(code) {
|
|
916
|
+
var _type3, res, phoneData, _res3, errorMessage;
|
|
917
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
918
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
919
|
+
case 0:
|
|
920
|
+
_context7.prev = 0;
|
|
921
|
+
setLoading(true);
|
|
922
|
+
setCodeError(''); // 清除之前的错误
|
|
923
|
+
_type3 = currentAuthMethod === 'email' ? 'email' : 'phone';
|
|
924
|
+
if (!(_type3 === 'email')) {
|
|
925
|
+
_context7.next = 10;
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
_context7.next = 7;
|
|
929
|
+
return registerAndLogin.checkEmailCode({
|
|
930
|
+
email: flowData.account,
|
|
931
|
+
shop_id: shopId,
|
|
932
|
+
code: code,
|
|
933
|
+
action: 'customer_registration_code'
|
|
934
|
+
});
|
|
935
|
+
case 7:
|
|
936
|
+
res = _context7.sent;
|
|
937
|
+
_context7.next = 14;
|
|
938
|
+
break;
|
|
939
|
+
case 10:
|
|
940
|
+
// 手机验证码
|
|
941
|
+
phoneData = flowData.account;
|
|
942
|
+
_context7.next = 13;
|
|
943
|
+
return registerAndLogin.checkMobileCode({
|
|
944
|
+
phone: phoneData.phone,
|
|
945
|
+
country_calling_code: phoneData.country_calling_code,
|
|
946
|
+
code: code,
|
|
947
|
+
action: 'register'
|
|
948
|
+
});
|
|
949
|
+
case 13:
|
|
950
|
+
res = _context7.sent;
|
|
951
|
+
case 14:
|
|
952
|
+
if (res.code === 200 && res.data.valid) {
|
|
953
|
+
// 验证成功,更新流程数据
|
|
954
|
+
updateFlowData({
|
|
955
|
+
verificationCode: code
|
|
956
|
+
});
|
|
957
|
+
// 跳转到验证成功页面(会自动跳转到设置密码)
|
|
958
|
+
goToStep(RegisterStep.VERIFICATION_SUCCESS);
|
|
959
|
+
} else {
|
|
960
|
+
// 验证失败,设置错误信息
|
|
961
|
+
errorMessage = ((_res3 = res) === null || _res3 === void 0 ? void 0 : _res3.message) || locales.getText('pisell-register2-invalid-verification-code');
|
|
962
|
+
setCodeError(errorMessage);
|
|
963
|
+
}
|
|
964
|
+
_context7.next = 21;
|
|
965
|
+
break;
|
|
966
|
+
case 17:
|
|
967
|
+
_context7.prev = 17;
|
|
968
|
+
_context7.t0 = _context7["catch"](0);
|
|
969
|
+
console.error(_context7.t0);
|
|
970
|
+
// 设置错误信息,显示在组件下方
|
|
971
|
+
setCodeError((_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.message) || locales.getText('pisell-register2-verification-failed'));
|
|
972
|
+
case 21:
|
|
973
|
+
_context7.prev = 21;
|
|
974
|
+
setLoading(false);
|
|
975
|
+
return _context7.finish(21);
|
|
976
|
+
case 24:
|
|
977
|
+
case "end":
|
|
978
|
+
return _context7.stop();
|
|
979
|
+
}
|
|
980
|
+
}, _callee7, null, [[0, 17, 21, 24]]);
|
|
981
|
+
}));
|
|
982
|
+
return function handleVerifyCode(_x2) {
|
|
983
|
+
return _ref8.apply(this, arguments);
|
|
984
|
+
};
|
|
985
|
+
}();
|
|
986
|
+
|
|
987
|
+
// 设置密码并完成注册
|
|
988
|
+
var handleSetPassword = /*#__PURE__*/function () {
|
|
989
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(password, confirmPassword) {
|
|
990
|
+
var res, phoneData, _error;
|
|
991
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
992
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
993
|
+
case 0:
|
|
994
|
+
_context8.prev = 0;
|
|
995
|
+
setLoading(true);
|
|
996
|
+
|
|
997
|
+
// 调用注册 API
|
|
998
|
+
if (!flowData.emailLinkCode) {
|
|
999
|
+
_context8.next = 8;
|
|
1000
|
+
break;
|
|
1001
|
+
}
|
|
1002
|
+
_context8.next = 5;
|
|
1003
|
+
return registerAndLogin.verifyEmailRegistrationLink({
|
|
1004
|
+
code: flowData.emailLinkCode,
|
|
1005
|
+
password: password
|
|
1006
|
+
});
|
|
1007
|
+
case 5:
|
|
1008
|
+
res = _context8.sent;
|
|
1009
|
+
_context8.next = 18;
|
|
1010
|
+
break;
|
|
1011
|
+
case 8:
|
|
1012
|
+
if (!(currentAuthMethod === 'email')) {
|
|
1013
|
+
_context8.next = 14;
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
_context8.next = 11;
|
|
1017
|
+
return registerAndLogin.emailCodeRegister({
|
|
1018
|
+
email: flowData.account,
|
|
1019
|
+
code: flowData.verificationCode,
|
|
1020
|
+
password: password
|
|
1021
|
+
});
|
|
1022
|
+
case 11:
|
|
1023
|
+
res = _context8.sent;
|
|
1024
|
+
_context8.next = 18;
|
|
1025
|
+
break;
|
|
1026
|
+
case 14:
|
|
1027
|
+
// 手机验证码注册
|
|
1028
|
+
phoneData = flowData.account;
|
|
1029
|
+
_context8.next = 17;
|
|
1030
|
+
return registerAndLogin.phoneCodeRegister({
|
|
1031
|
+
phone: phoneData.phone,
|
|
1032
|
+
code: flowData.verificationCode,
|
|
1033
|
+
password: password,
|
|
1034
|
+
country_calling_code: phoneData.country_calling_code
|
|
1035
|
+
});
|
|
1036
|
+
case 17:
|
|
1037
|
+
res = _context8.sent;
|
|
1038
|
+
case 18:
|
|
1039
|
+
if (res.code === 200) {
|
|
1040
|
+
// 更新密码和 API 返回数据到流程数据
|
|
1041
|
+
updateFlowData({
|
|
1042
|
+
password: password,
|
|
1043
|
+
extraData: _objectSpread(_objectSpread({}, flowData.extraData), {}, {
|
|
1044
|
+
apiResponse: res.data
|
|
1045
|
+
})
|
|
1046
|
+
});
|
|
1047
|
+
// 跳转到完成步骤
|
|
1048
|
+
goToStep(RegisterStep.COMPLETE);
|
|
1049
|
+
message.success(locales.getText('pisell-register2-register-success'));
|
|
1050
|
+
} else {
|
|
1051
|
+
_error = new Error(res.message || 'Registration failed'); // 调用错误处理回调
|
|
1052
|
+
onError === null || onError === void 0 || onError(_error, currentAuthMethod);
|
|
1053
|
+
message.error(res.message || locales.getText('pisell-register2-registration-failed'));
|
|
1054
|
+
}
|
|
1055
|
+
_context8.next = 25;
|
|
1056
|
+
break;
|
|
1057
|
+
case 21:
|
|
1058
|
+
_context8.prev = 21;
|
|
1059
|
+
_context8.t0 = _context8["catch"](0);
|
|
1060
|
+
message.error(_context8.t0.message, locales.getText('pisell-register2-failed-to-complete'));
|
|
1061
|
+
console.error(_context8.t0);
|
|
1062
|
+
case 25:
|
|
1063
|
+
_context8.prev = 25;
|
|
1064
|
+
setLoading(false);
|
|
1065
|
+
return _context8.finish(25);
|
|
1066
|
+
case 28:
|
|
1067
|
+
case "end":
|
|
1068
|
+
return _context8.stop();
|
|
1069
|
+
}
|
|
1070
|
+
}, _callee8, null, [[0, 21, 25, 28]]);
|
|
1071
|
+
}));
|
|
1072
|
+
return function handleSetPassword(_x3, _x4) {
|
|
1073
|
+
return _ref9.apply(this, arguments);
|
|
1074
|
+
};
|
|
1075
|
+
}();
|
|
1076
|
+
|
|
1077
|
+
// 返回到初始表单
|
|
1078
|
+
var handleBackToInitialForm = useCallback(function () {
|
|
1079
|
+
// 清除验证码错误
|
|
1080
|
+
setCodeError('');
|
|
1081
|
+
// 使用当前流程数据中的验证方式来确保一致性
|
|
1082
|
+
goToStep(RegisterStep.INITIAL_FORM, {
|
|
1083
|
+
verificationMethod: flowData.verificationMethod
|
|
1084
|
+
});
|
|
1085
|
+
}, [goToStep, flowData]);
|
|
1086
|
+
|
|
1087
|
+
// 编辑邮箱/手机号(返回初始表单并保留当前账号)
|
|
1088
|
+
var handleEditAccount = function handleEditAccount() {
|
|
1089
|
+
// 保留当前账号信息,预填充到表单中
|
|
1090
|
+
if (flowData.account) {
|
|
1091
|
+
form.setFieldsValue({
|
|
1092
|
+
account: flowData.account
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
// 返回初始表单步骤
|
|
1096
|
+
handleBackToInitialForm();
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
// 跳转到登录
|
|
1100
|
+
var handleGoToLogin = function handleGoToLogin() {
|
|
1101
|
+
if (onGoToLogin) {
|
|
1102
|
+
onGoToLogin();
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
// 切换认证方式
|
|
1107
|
+
var handleSwitchAuthMethod = function handleSwitchAuthMethod(method) {
|
|
1108
|
+
setCurrentAuthMethod(method);
|
|
1109
|
+
form.resetFields(['account']);
|
|
1110
|
+
// 重置流程到初始状态
|
|
1111
|
+
resetFlow();
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
// 处理返回注册页面(重置所有状态到初始状态)
|
|
1115
|
+
var handleBackToRegistration = function handleBackToRegistration() {
|
|
1116
|
+
// 重置邮件链接验证状态
|
|
1117
|
+
setEmailLinkVerifyStatus(null);
|
|
1118
|
+
setVerifiedEmail('');
|
|
1119
|
+
// 重置表单
|
|
1120
|
+
form.resetFields();
|
|
1121
|
+
// 重置流程到初始状态
|
|
1122
|
+
resetFlow();
|
|
1123
|
+
// 如果有外部回调,也调用它
|
|
1124
|
+
onEmailLinkExpired === null || onEmailLinkExpired === void 0 || onEmailLinkExpired();
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
// 渲染账号输入框
|
|
1128
|
+
var renderAccountInput = function renderAccountInput() {
|
|
1129
|
+
var _ui$formLabels3, _ui$formLabels4;
|
|
1130
|
+
var placeholder = currentAuthMethod === 'email' ? locales.getText('pisell-login2-email-placeholder') : 'Enter your phone number';
|
|
1131
|
+
|
|
1132
|
+
// 手机号模式:使用新的 PhoneInput 组件
|
|
1133
|
+
if (currentAuthMethod === 'phone') {
|
|
1134
|
+
var _ui$formLabels, _ui$formLabels2;
|
|
1135
|
+
var phoneLabel = (ui === null || ui === void 0 || (_ui$formLabels = ui.formLabels) === null || _ui$formLabels === void 0 || (_ui$formLabels = _ui$formLabels.phone) === null || _ui$formLabels === void 0 ? void 0 : _ui$formLabels.show) !== false ? (ui === null || ui === void 0 || (_ui$formLabels2 = ui.formLabels) === null || _ui$formLabels2 === void 0 || (_ui$formLabels2 = _ui$formLabels2.phone) === null || _ui$formLabels2 === void 0 ? void 0 : _ui$formLabels2.text) || locales.getText('pisell-login2-phone-label') : undefined;
|
|
1136
|
+
var phoneRules = createPhoneValidationRules(locales.getText, true);
|
|
1137
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
1138
|
+
name: "account",
|
|
1139
|
+
label: phoneLabel,
|
|
1140
|
+
rules: phoneRules,
|
|
1141
|
+
validateTrigger: ['onBlur', 'onSubmit']
|
|
1142
|
+
}, /*#__PURE__*/React.createElement(PhoneInput, {
|
|
1143
|
+
placeholder: placeholder,
|
|
1144
|
+
size: "large",
|
|
1145
|
+
countries: (countries === null || countries === void 0 ? void 0 : countries.length) > 0 ? countries : [],
|
|
1146
|
+
valueFormat: "object"
|
|
1147
|
+
}));
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
// 邮箱模式:需要 Form.Item 包裹
|
|
1151
|
+
var emailRules = [{
|
|
1152
|
+
required: true,
|
|
1153
|
+
message: locales.getText('pisell-register2-email-required')
|
|
1154
|
+
}, {
|
|
1155
|
+
type: 'email',
|
|
1156
|
+
message: locales.getText('pisell-register2-email-invalid')
|
|
1157
|
+
}];
|
|
1158
|
+
var emailLabel = (ui === null || ui === void 0 || (_ui$formLabels3 = ui.formLabels) === null || _ui$formLabels3 === void 0 || (_ui$formLabels3 = _ui$formLabels3.email) === null || _ui$formLabels3 === void 0 ? void 0 : _ui$formLabels3.show) !== false ? (ui === null || ui === void 0 || (_ui$formLabels4 = ui.formLabels) === null || _ui$formLabels4 === void 0 || (_ui$formLabels4 = _ui$formLabels4.email) === null || _ui$formLabels4 === void 0 ? void 0 : _ui$formLabels4.text) || locales.getText('pisell-login2-email-label') : undefined;
|
|
1159
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
1160
|
+
name: "account",
|
|
1161
|
+
label: emailLabel,
|
|
1162
|
+
rules: emailRules,
|
|
1163
|
+
validateTrigger: ['onBlur', 'onSubmit']
|
|
1164
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1165
|
+
size: "large",
|
|
1166
|
+
placeholder: placeholder,
|
|
1167
|
+
className: "login2-input"
|
|
1168
|
+
}));
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
// 渲染步骤页面
|
|
1172
|
+
var renderStepPage = function renderStepPage() {
|
|
1173
|
+
var _config$ui2;
|
|
1174
|
+
switch (flowData.currentStep) {
|
|
1175
|
+
case RegisterStep.WAIT_EMAIL_LINK:
|
|
1176
|
+
return /*#__PURE__*/React.createElement(WaitEmailLink, {
|
|
1177
|
+
flowData: flowData,
|
|
1178
|
+
onResend: handleResendCode,
|
|
1179
|
+
onBack: handleBackToInitialForm,
|
|
1180
|
+
onEditEmail: handleEditAccount,
|
|
1181
|
+
countdown: countdown,
|
|
1182
|
+
verificationMethod: flowData.verificationMethod
|
|
1183
|
+
});
|
|
1184
|
+
case RegisterStep.EMAIL_ALREADY_REGISTERED:
|
|
1185
|
+
return /*#__PURE__*/React.createElement(EmailAlreadyRegistered, {
|
|
1186
|
+
flowData: flowData,
|
|
1187
|
+
onGoToLogin: handleGoToLogin,
|
|
1188
|
+
onBack: handleBackToInitialForm
|
|
1189
|
+
});
|
|
1190
|
+
case RegisterStep.INPUT_VERIFICATION_CODE:
|
|
1191
|
+
return /*#__PURE__*/React.createElement(CodeInput, {
|
|
1192
|
+
flowData: flowData,
|
|
1193
|
+
codeLength: 4,
|
|
1194
|
+
onSubmit: handleVerifyCode,
|
|
1195
|
+
onResend: handleResendCode,
|
|
1196
|
+
onBack: handleBackToInitialForm,
|
|
1197
|
+
countdown: countdown,
|
|
1198
|
+
loading: loading,
|
|
1199
|
+
error: codeError,
|
|
1200
|
+
onClearError: function onClearError() {
|
|
1201
|
+
return setCodeError('');
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
case RegisterStep.VERIFICATION_SUCCESS:
|
|
1205
|
+
return /*#__PURE__*/React.createElement(VerificationSuccess, {
|
|
1206
|
+
flowData: flowData
|
|
1207
|
+
});
|
|
1208
|
+
case RegisterStep.SET_PASSWORD:
|
|
1209
|
+
return /*#__PURE__*/React.createElement(SetPassword, {
|
|
1210
|
+
flowData: flowData,
|
|
1211
|
+
onSubmit: handleSetPassword,
|
|
1212
|
+
onBack: function onBack() {
|
|
1213
|
+
return goToStep(RegisterStep.INPUT_VERIFICATION_CODE);
|
|
1214
|
+
},
|
|
1215
|
+
loading: loading,
|
|
1216
|
+
passwordRules: (_config$ui2 = config.ui) === null || _config$ui2 === void 0 ? void 0 : _config$ui2.passwordRules,
|
|
1217
|
+
scenario: "create"
|
|
1218
|
+
});
|
|
1219
|
+
case RegisterStep.COMPLETE:
|
|
1220
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1221
|
+
className: "register-step-container"
|
|
1222
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1223
|
+
className: "register-step-content"
|
|
1224
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1225
|
+
className: "success-icon-wrapper"
|
|
1226
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
1227
|
+
width: "64",
|
|
1228
|
+
height: "64",
|
|
1229
|
+
viewBox: "0 0 64 64",
|
|
1230
|
+
fill: "none"
|
|
1231
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
1232
|
+
cx: "32",
|
|
1233
|
+
cy: "32",
|
|
1234
|
+
r: "32",
|
|
1235
|
+
fill: "#10B981",
|
|
1236
|
+
fillOpacity: "0.1"
|
|
1237
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1238
|
+
d: "M22 32L28 38L42 24",
|
|
1239
|
+
stroke: "#10B981",
|
|
1240
|
+
strokeWidth: "3",
|
|
1241
|
+
strokeLinecap: "round",
|
|
1242
|
+
strokeLinejoin: "round"
|
|
1243
|
+
}))), /*#__PURE__*/React.createElement("h2", {
|
|
1244
|
+
className: "register-step-title"
|
|
1245
|
+
}, locales.getText('pisell-register2-complete-title')), /*#__PURE__*/React.createElement("p", {
|
|
1246
|
+
className: "register-step-desc"
|
|
1247
|
+
}, locales.getText('pisell-register2-redirecting'))));
|
|
1248
|
+
default:
|
|
1249
|
+
return null;
|
|
1250
|
+
}
|
|
1251
|
+
};
|
|
1252
|
+
var handleSetPasswordSubmit = /*#__PURE__*/function () {
|
|
1253
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(password, confirmPassword) {
|
|
1254
|
+
var res;
|
|
1255
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1256
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1257
|
+
case 0:
|
|
1258
|
+
_context9.prev = 0;
|
|
1259
|
+
setLoading(true);
|
|
1260
|
+
// 邮件链接注册 - 调用 verifyEmailRegistrationLink
|
|
1261
|
+
_context9.next = 4;
|
|
1262
|
+
return registerAndLogin.verifyEmailRegistrationLink({
|
|
1263
|
+
code: config.emailLinkVerification.code,
|
|
1264
|
+
password: password
|
|
1265
|
+
});
|
|
1266
|
+
case 4:
|
|
1267
|
+
res = _context9.sent;
|
|
1268
|
+
if (!(res.code === 200)) {
|
|
1269
|
+
_context9.next = 11;
|
|
1270
|
+
break;
|
|
1271
|
+
}
|
|
1272
|
+
message.success(locales.getText('pisell-register2-register-success'));
|
|
1273
|
+
// 调用外部注册回调
|
|
1274
|
+
_context9.next = 9;
|
|
1275
|
+
return onRegister === null || onRegister === void 0 ? void 0 : onRegister(res.data, 'email', {
|
|
1276
|
+
account: verifiedEmail,
|
|
1277
|
+
password: password
|
|
1278
|
+
}, config.channel);
|
|
1279
|
+
case 9:
|
|
1280
|
+
_context9.next = 12;
|
|
1281
|
+
break;
|
|
1282
|
+
case 11:
|
|
1283
|
+
message.error(res.message || locales.getText('pisell-register2-registration-failed'));
|
|
1284
|
+
case 12:
|
|
1285
|
+
_context9.next = 17;
|
|
1286
|
+
break;
|
|
1287
|
+
case 14:
|
|
1288
|
+
_context9.prev = 14;
|
|
1289
|
+
_context9.t0 = _context9["catch"](0);
|
|
1290
|
+
message.error((_context9.t0 === null || _context9.t0 === void 0 ? void 0 : _context9.t0.message) || locales.getText('pisell-register2-failed-to-complete'));
|
|
1291
|
+
case 17:
|
|
1292
|
+
_context9.prev = 17;
|
|
1293
|
+
setLoading(false);
|
|
1294
|
+
return _context9.finish(17);
|
|
1295
|
+
case 20:
|
|
1296
|
+
case "end":
|
|
1297
|
+
return _context9.stop();
|
|
1298
|
+
}
|
|
1299
|
+
}, _callee9, null, [[0, 14, 17, 20]]);
|
|
1300
|
+
}));
|
|
1301
|
+
return function handleSetPasswordSubmit(_x5, _x6) {
|
|
1302
|
+
return _ref10.apply(this, arguments);
|
|
1303
|
+
};
|
|
1304
|
+
}();
|
|
1305
|
+
if (!visible) {
|
|
1306
|
+
return null;
|
|
1307
|
+
}
|
|
1308
|
+
var ui = config.ui;
|
|
1309
|
+
|
|
1310
|
+
// 邮件链接验证模式 - 优先渲染
|
|
1311
|
+
if ((_config$emailLinkVeri3 = config.emailLinkVerification) !== null && _config$emailLinkVeri3 !== void 0 && _config$emailLinkVeri3.enabled) {
|
|
1312
|
+
// 图1: 验证中
|
|
1313
|
+
if (emailLinkVerifyStatus === 'verifying') {
|
|
1314
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1315
|
+
className: classNames('login2-container', 'register-flow-container', className),
|
|
1316
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
1317
|
+
'--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
|
|
1318
|
+
})
|
|
1319
|
+
}, /*#__PURE__*/React.createElement(VerifyingEmailLink, null));
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// 图2: 链接已过期
|
|
1323
|
+
if (emailLinkVerifyStatus === 'expired') {
|
|
1324
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1325
|
+
className: classNames('login2-container', 'register-flow-container', className),
|
|
1326
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
1327
|
+
'--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
|
|
1328
|
+
})
|
|
1329
|
+
}, /*#__PURE__*/React.createElement(EmailLinkExpired, {
|
|
1330
|
+
onBackToRegistration: handleBackToRegistration,
|
|
1331
|
+
onGoToLogin: onGoToLogin
|
|
1332
|
+
}));
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// 图3: 链接已使用(账号已注册)
|
|
1336
|
+
if (emailLinkVerifyStatus === 'already_used') {
|
|
1337
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1338
|
+
className: classNames('login2-container', 'register-flow-container', className),
|
|
1339
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
1340
|
+
'--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
|
|
1341
|
+
})
|
|
1342
|
+
}, /*#__PURE__*/React.createElement(EmailLinkAlreadyUsed, {
|
|
1343
|
+
onGoToLogin: onGoToLogin
|
|
1344
|
+
}));
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
// 图4: 验证成功,显示设置密码页面
|
|
1348
|
+
if (emailLinkVerifyStatus === 'success') {
|
|
1349
|
+
var _config$ui3;
|
|
1350
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1351
|
+
className: classNames('login2-container', 'register-flow-container', className),
|
|
1352
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
1353
|
+
'--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
|
|
1354
|
+
})
|
|
1355
|
+
}, /*#__PURE__*/React.createElement(SetPassword, {
|
|
1356
|
+
flowData: _objectSpread(_objectSpread({}, flowData), {}, {
|
|
1357
|
+
account: verifiedEmail
|
|
1358
|
+
}),
|
|
1359
|
+
onSubmit: handleSetPasswordSubmit,
|
|
1360
|
+
loading: loading,
|
|
1361
|
+
passwordRules: (_config$ui3 = config.ui) === null || _config$ui3 === void 0 ? void 0 : _config$ui3.passwordRules,
|
|
1362
|
+
scenario: "create"
|
|
1363
|
+
}));
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
// 判断是否需要验证(邮件链接或验证码)
|
|
1368
|
+
var isEmailVerificationLink = currentAuthMethod === 'email' && getCurrentVerificationMethod() === 'verification_link';
|
|
1369
|
+
var isEmailVerificationCode = currentAuthMethod === 'email' && getCurrentVerificationMethod() === 'verification_code';
|
|
1370
|
+
var isEmailNoVerification = currentAuthMethod === 'email' && getCurrentVerificationMethod() === 'none';
|
|
1371
|
+
var isPhoneVerificationCode = currentAuthMethod === 'phone' && getCurrentVerificationMethod() === 'verification_code';
|
|
1372
|
+
|
|
1373
|
+
// 是否需要验证(邮件链接、邮箱验证码、手机验证码)
|
|
1374
|
+
// 注意:无需验证模式(none)不需要验证
|
|
1375
|
+
var needsVerification = isEmailVerificationLink || isEmailVerificationCode || isPhoneVerificationCode;
|
|
1376
|
+
if (flowData.currentStep !== RegisterStep.INITIAL_FORM) {
|
|
1377
|
+
// 验证码输入页面和邮箱已注册页面不需要显示 Header
|
|
1378
|
+
var showHeader = flowData.currentStep !== RegisterStep.INPUT_VERIFICATION_CODE && flowData.currentStep !== RegisterStep.WAIT_EMAIL_LINK && flowData.currentStep !== RegisterStep.SET_PASSWORD && flowData.currentStep !== RegisterStep.EMAIL_ALREADY_REGISTERED;
|
|
1379
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1380
|
+
className: classNames('login2-container', 'register-flow-container', className),
|
|
1381
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
1382
|
+
'--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
|
|
1383
|
+
})
|
|
1384
|
+
}, showHeader && /*#__PURE__*/React.createElement(Header, {
|
|
1385
|
+
ui: ui
|
|
1386
|
+
}), renderStepPage());
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
// 显示初始注册表单
|
|
1390
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1391
|
+
className: classNames('login2-container', 'register2-container', className),
|
|
1392
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
1393
|
+
'--theme-color': (ui === null || ui === void 0 ? void 0 : ui.themeColor) || '#7F56D9'
|
|
1394
|
+
})
|
|
1395
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
1396
|
+
ui: ui
|
|
1397
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1398
|
+
className: "login2-content"
|
|
1399
|
+
}, (isRegistrationMethodEnabled('email') || isRegistrationMethodEnabled('phone')) && /*#__PURE__*/React.createElement(Form, {
|
|
1400
|
+
form: form,
|
|
1401
|
+
layout: "vertical",
|
|
1402
|
+
className: "login2-form",
|
|
1403
|
+
size: "large"
|
|
1404
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
1405
|
+
label: currentAuthMethod === 'email' ? ((_config$ui4 = config.ui) === null || _config$ui4 === void 0 || (_config$ui4 = _config$ui4.formLabels) === null || _config$ui4 === void 0 || (_config$ui4 = _config$ui4.email) === 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.email) === null || _config$ui5 === void 0 ? void 0 : _config$ui5.text) || locales.getText('pisell-login2-email-label') : undefined : ((_config$ui6 = config.ui) === null || _config$ui6 === void 0 || (_config$ui6 = _config$ui6.formLabels) === null || _config$ui6 === void 0 || (_config$ui6 = _config$ui6.phone) === 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.phone) === null || _config$ui7 === void 0 ? void 0 : _config$ui7.text) || locales.getText('pisell-login2-phone-label') : undefined,
|
|
1406
|
+
name: "account",
|
|
1407
|
+
rules: currentAuthMethod === 'email' ? [{
|
|
1408
|
+
required: true,
|
|
1409
|
+
message: locales.getText('pisell-register2-email-required')
|
|
1410
|
+
}, {
|
|
1411
|
+
type: 'email',
|
|
1412
|
+
message: locales.getText('pisell-register2-email-invalid')
|
|
1413
|
+
}] : createPhoneValidationRules(locales.getText, true),
|
|
1414
|
+
validateTrigger: ['onBlur', 'onSubmit'],
|
|
1415
|
+
className: currentAuthMethod === 'phone' ? 'phone-input-form-item' : ''
|
|
1416
|
+
}, currentAuthMethod === 'phone' ? /*#__PURE__*/React.createElement(PhoneInput, {
|
|
1417
|
+
size: "large",
|
|
1418
|
+
placeholder: locales.getText('pisell-register2-phone-placeholder'),
|
|
1419
|
+
className: "login2-phone-input",
|
|
1420
|
+
countries: countries,
|
|
1421
|
+
valueFormat: "object",
|
|
1422
|
+
onKeyDown: function onKeyDown(e) {
|
|
1423
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
|
|
1424
|
+
e.preventDefault();
|
|
1425
|
+
handleFormSubmit(e);
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
}) : /*#__PURE__*/React.createElement(Input, {
|
|
1429
|
+
size: "large",
|
|
1430
|
+
placeholder: locales.getText('pisell-register2-email-placeholder'),
|
|
1431
|
+
className: "login2-email-input",
|
|
1432
|
+
autoComplete: "email",
|
|
1433
|
+
onKeyDown: function onKeyDown(e) {
|
|
1434
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
|
|
1435
|
+
e.preventDefault();
|
|
1436
|
+
handleFormSubmit(e);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
})), (!needsVerification || isEmailNoVerification) && /*#__PURE__*/React.createElement(Form.Item, {
|
|
1440
|
+
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-register2-password-label') : undefined,
|
|
1441
|
+
name: "password",
|
|
1442
|
+
rules: passwordValidationRules,
|
|
1443
|
+
validateTrigger: ['onBlur', 'onSubmit']
|
|
1444
|
+
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
1445
|
+
size: "large",
|
|
1446
|
+
placeholder: locales.getText('pisell-register2-password-placeholder'),
|
|
1447
|
+
className: "login2-password-input",
|
|
1448
|
+
autoComplete: "new-password",
|
|
1449
|
+
onKeyDown: function onKeyDown(e) {
|
|
1450
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
|
|
1451
|
+
e.preventDefault();
|
|
1452
|
+
handleFormSubmit(e);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
1456
|
+
type: "primary",
|
|
1457
|
+
size: "large",
|
|
1458
|
+
block: true,
|
|
1459
|
+
htmlType: "button",
|
|
1460
|
+
loading: loading,
|
|
1461
|
+
onClick: handleFormSubmit,
|
|
1462
|
+
className: "login2-submit-button"
|
|
1463
|
+
}, isEmailNoVerification ? locales.getText('pisell-common-continue') : needsVerification ? locales.getText('pisell-common-continue') : locales.getText('pisell-common-sign-up'))), shouldShowDivider && /*#__PURE__*/React.createElement("div", {
|
|
1464
|
+
className: "divider"
|
|
1465
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell-common-or'))), /*#__PURE__*/React.createElement("div", {
|
|
1466
|
+
className: "oauth-section"
|
|
1467
|
+
}, hasEmailAndPhone && /*#__PURE__*/React.createElement(Button, {
|
|
1468
|
+
type: "default",
|
|
1469
|
+
size: "large",
|
|
1470
|
+
block: true,
|
|
1471
|
+
onClick: function onClick() {
|
|
1472
|
+
return handleSwitchAuthMethod(currentAuthMethod === 'email' ? 'phone' : 'email');
|
|
1473
|
+
},
|
|
1474
|
+
className: "login2-switch-button",
|
|
1475
|
+
icon: currentAuthMethod === 'email' ? /*#__PURE__*/React.createElement(Iconfont, {
|
|
1476
|
+
type: "pisell2-phone",
|
|
1477
|
+
className: "oauth-icon"
|
|
1478
|
+
}) : /*#__PURE__*/React.createElement(Iconfont, {
|
|
1479
|
+
type: "pisell2-mail-01",
|
|
1480
|
+
className: "oauth-icon"
|
|
1481
|
+
}),
|
|
1482
|
+
style: {
|
|
1483
|
+
marginBottom: oauthProviders.length ? 12 : 0
|
|
1484
|
+
}
|
|
1485
|
+
}, currentAuthMethod === 'email' ? locales.getText('pisell-register2-with-phone') : locales.getText('pisell-register2-with-email')), /*#__PURE__*/React.createElement(OAuthButtonGroup, {
|
|
1486
|
+
providers: oauthProviders,
|
|
1487
|
+
wrapperClassName: "oauth-buttons-container",
|
|
1488
|
+
buttonClassName: "oauth-button",
|
|
1489
|
+
layout: "vertical",
|
|
1490
|
+
gap: 12
|
|
1491
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1492
|
+
className: "login2-footer-text"
|
|
1493
|
+
}, locales.getText('pisell-register2-have-account'), ' ', /*#__PURE__*/React.createElement("a", {
|
|
1494
|
+
className: "login2-link",
|
|
1495
|
+
onClick: onGoToLogin
|
|
1496
|
+
}, locales.getText('pisell-register2-login-link'))), /*#__PURE__*/React.createElement(LegalTerms, {
|
|
1497
|
+
config: _objectSpread(_objectSpread({}, config.legalTerms), {}, {
|
|
1498
|
+
mode: 'register'
|
|
1499
|
+
})
|
|
1500
|
+
}));
|
|
1501
|
+
};
|
|
1502
|
+
export default Register2;
|