@pisell/private-materials 6.3.31 → 6.3.33
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 +1 -1
- package/build/lowcode/preview.js +151 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/hooks.d.ts +107 -0
- package/es/components/appointmentBooking/locales.d.ts +363 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/utils.d.ts +41 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +43 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/index.d.ts +8 -0
- package/es/components/booking/info/main.d.ts +12 -0
- package/es/components/booking/info/model.d.ts +5 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.d.ts +7 -0
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/service/addService/index.d.ts +11 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +1 -0
- package/es/components/booking/locales.d.ts +840 -0
- package/es/components/booking/model.d.ts +112 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +3 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +22 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/ruleSetting/locales.d.ts +48 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/index.d.ts +40 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +47 -0
- package/es/plus/productSelect/index.d.ts +32 -0
- package/es/pro/Login2.0/AuthModal.js +14 -8
- package/es/pro/Login2.0/Login2.js +55 -35
- package/es/pro/Login2.0/Register2.js +1 -1
- package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/es/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/Login2.0/components/phoneValidation.js +1 -1
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/es/pro/Login2.0/index.less +11 -2
- package/es/pro/Login2.0/locales.d.ts +543 -0
- package/es/pro/Login2.0/locales.js +19 -19
- package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/es/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/es/pro/Login2.0/steps/SetPassword.js +7 -7
- package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/es/pro/Login2.0/steps/index.d.ts +19 -0
- package/es/pro/Login2.0/types.d.ts +167 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/hooks.d.ts +107 -0
- package/lib/components/appointmentBooking/locales.d.ts +363 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.d.ts +41 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +43 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/index.d.ts +8 -0
- package/lib/components/booking/info/main.d.ts +12 -0
- package/lib/components/booking/info/model.d.ts +5 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +8 -1
- package/lib/components/booking/locales.d.ts +840 -0
- package/lib/components/booking/model.d.ts +112 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +3 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +22 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/ruleSetting/locales.d.ts +48 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/index.d.ts +40 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +47 -0
- package/lib/plus/productSelect/index.d.ts +32 -0
- package/lib/pro/Login2.0/AuthModal.js +16 -11
- package/lib/pro/Login2.0/Login2.js +18 -11
- package/lib/pro/Login2.0/Register2.js +1 -1
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/Login2.0/components/phoneValidation.js +1 -1
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/lib/pro/Login2.0/index.less +11 -2
- package/lib/pro/Login2.0/locales.d.ts +543 -0
- package/lib/pro/Login2.0/locales.js +19 -19
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/lib/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/lib/pro/Login2.0/steps/SetPassword.js +7 -7
- package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/lib/pro/Login2.0/steps/index.d.ts +19 -0
- package/lib/pro/Login2.0/types.d.ts +167 -0
- package/package.json +4 -4
|
@@ -91,13 +91,13 @@ var Login2 = function Login2(_ref) {
|
|
|
91
91
|
translate: locales.getText,
|
|
92
92
|
fallbackMinLength: 6,
|
|
93
93
|
messageKeys: {
|
|
94
|
-
required: 'pisell-login2-password-required',
|
|
95
|
-
minLength: 'pisell-set-password-min-length',
|
|
96
|
-
requireUppercase: 'pisell-set-password-require-uppercase',
|
|
97
|
-
requireLowercase: 'pisell-set-password-require-lowercase',
|
|
98
|
-
requireNumber: 'pisell-set-password-require-number',
|
|
99
|
-
requireSpecialCharacters: 'pisell-set-password-require-special',
|
|
100
|
-
summary: 'pisell-set-password-must-contain'
|
|
94
|
+
required: locales.getText('pisell-login2-password-required'),
|
|
95
|
+
minLength: locales.getText('pisell-set-password-min-length'),
|
|
96
|
+
requireUppercase: locales.getText('pisell-set-password-require-uppercase'),
|
|
97
|
+
requireLowercase: locales.getText('pisell-set-password-require-lowercase'),
|
|
98
|
+
requireNumber: locales.getText('pisell-set-password-require-number'),
|
|
99
|
+
requireSpecialCharacters: locales.getText('pisell-set-password-require-special'),
|
|
100
|
+
summary: locales.getText('pisell-set-password-must-contain')
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
|
|
@@ -1445,14 +1445,14 @@ var Login2 = function Login2(_ref) {
|
|
|
1445
1445
|
// 处理三方登录
|
|
1446
1446
|
var handleOAuthClickInternal = /*#__PURE__*/function () {
|
|
1447
1447
|
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(provider) {
|
|
1448
|
-
var _config$loginMethods, fbConfig, token, _config$loginMethods2, appleConfig, _token;
|
|
1448
|
+
var _config$loginMethods, fbConfig, token, res, _config$loginMethods2, appleConfig, _token, _res4;
|
|
1449
1449
|
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1450
1450
|
while (1) switch (_context13.prev = _context13.next) {
|
|
1451
1451
|
case 0:
|
|
1452
1452
|
_context13.prev = 0;
|
|
1453
1453
|
setLoading(true);
|
|
1454
1454
|
if (!(provider === 'facebook')) {
|
|
1455
|
-
_context13.next =
|
|
1455
|
+
_context13.next = 15;
|
|
1456
1456
|
break;
|
|
1457
1457
|
}
|
|
1458
1458
|
fbConfig = config === null || config === void 0 || (_config$loginMethods = config.loginMethods) === null || _config$loginMethods === void 0 ? void 0 : _config$loginMethods.find(function (n) {
|
|
@@ -1460,22 +1460,29 @@ var Login2 = function Login2(_ref) {
|
|
|
1460
1460
|
});
|
|
1461
1461
|
token = fbConfig === null || fbConfig === void 0 ? void 0 : fbConfig.appId;
|
|
1462
1462
|
if (!token) {
|
|
1463
|
-
_context13.next =
|
|
1463
|
+
_context13.next = 12;
|
|
1464
1464
|
break;
|
|
1465
1465
|
}
|
|
1466
1466
|
_context13.next = 8;
|
|
1467
1467
|
return registerAndLogin.loginWithFacebook(token);
|
|
1468
1468
|
case 8:
|
|
1469
|
-
|
|
1469
|
+
res = _context13.sent;
|
|
1470
|
+
if (res.status) {
|
|
1471
|
+
onLogin === null || onLogin === void 0 || onLogin(res.data, 'facebook', {
|
|
1472
|
+
account: '',
|
|
1473
|
+
password: ''
|
|
1474
|
+
}, config.channel);
|
|
1475
|
+
}
|
|
1476
|
+
_context13.next = 13;
|
|
1470
1477
|
break;
|
|
1471
|
-
case
|
|
1478
|
+
case 12:
|
|
1472
1479
|
throw new Error('Facebook app_id not configured');
|
|
1473
|
-
case 11:
|
|
1474
|
-
_context13.next = 26;
|
|
1475
|
-
break;
|
|
1476
1480
|
case 13:
|
|
1481
|
+
_context13.next = 30;
|
|
1482
|
+
break;
|
|
1483
|
+
case 15:
|
|
1477
1484
|
if (!(provider === 'apple')) {
|
|
1478
|
-
_context13.next =
|
|
1485
|
+
_context13.next = 28;
|
|
1479
1486
|
break;
|
|
1480
1487
|
}
|
|
1481
1488
|
appleConfig = config === null || config === void 0 || (_config$loginMethods2 = config.loginMethods) === null || _config$loginMethods2 === void 0 ? void 0 : _config$loginMethods2.find(function (n) {
|
|
@@ -1483,38 +1490,49 @@ var Login2 = function Login2(_ref) {
|
|
|
1483
1490
|
});
|
|
1484
1491
|
_token = appleConfig === null || appleConfig === void 0 ? void 0 : appleConfig.clientId;
|
|
1485
1492
|
if (!_token) {
|
|
1486
|
-
_context13.next =
|
|
1493
|
+
_context13.next = 25;
|
|
1487
1494
|
break;
|
|
1488
1495
|
}
|
|
1489
|
-
_context13.next =
|
|
1496
|
+
_context13.next = 21;
|
|
1490
1497
|
return registerAndLogin.loginWithApple(_token);
|
|
1491
|
-
case 19:
|
|
1492
|
-
_context13.next = 22;
|
|
1493
|
-
break;
|
|
1494
1498
|
case 21:
|
|
1495
|
-
|
|
1496
|
-
|
|
1499
|
+
_res4 = _context13.sent;
|
|
1500
|
+
onLogin === null || onLogin === void 0 || onLogin(_res4.data, 'apple', {
|
|
1501
|
+
account: '',
|
|
1502
|
+
password: ''
|
|
1503
|
+
}, config.channel);
|
|
1497
1504
|
_context13.next = 26;
|
|
1498
1505
|
break;
|
|
1499
|
-
case
|
|
1500
|
-
|
|
1501
|
-
return onOAuthLogin === null || onOAuthLogin === void 0 ? void 0 : onOAuthLogin(provider, config.channel);
|
|
1506
|
+
case 25:
|
|
1507
|
+
throw new Error('Apple client_id not configured');
|
|
1502
1508
|
case 26:
|
|
1503
|
-
_context13.next =
|
|
1509
|
+
_context13.next = 30;
|
|
1504
1510
|
break;
|
|
1505
1511
|
case 28:
|
|
1506
|
-
_context13.
|
|
1512
|
+
_context13.next = 30;
|
|
1513
|
+
return onOAuthLogin === null || onOAuthLogin === void 0 ? void 0 : onOAuthLogin(provider, config.channel);
|
|
1514
|
+
case 30:
|
|
1515
|
+
_context13.next = 37;
|
|
1516
|
+
break;
|
|
1517
|
+
case 32:
|
|
1518
|
+
_context13.prev = 32;
|
|
1507
1519
|
_context13.t0 = _context13["catch"](0);
|
|
1520
|
+
if (!(_context13.t0.message === 'facebook_login_cancel')) {
|
|
1521
|
+
_context13.next = 36;
|
|
1522
|
+
break;
|
|
1523
|
+
}
|
|
1524
|
+
return _context13.abrupt("return", message.error(locales.getText('pisell-register2-facebook-login-canceled')));
|
|
1525
|
+
case 36:
|
|
1508
1526
|
message.error((_context13.t0 === null || _context13.t0 === void 0 ? void 0 : _context13.t0.message) || locales.getText('pisell-login2-login-failed'));
|
|
1509
|
-
case
|
|
1510
|
-
_context13.prev =
|
|
1527
|
+
case 37:
|
|
1528
|
+
_context13.prev = 37;
|
|
1511
1529
|
setLoading(false);
|
|
1512
|
-
return _context13.finish(
|
|
1513
|
-
case
|
|
1530
|
+
return _context13.finish(37);
|
|
1531
|
+
case 40:
|
|
1514
1532
|
case "end":
|
|
1515
1533
|
return _context13.stop();
|
|
1516
1534
|
}
|
|
1517
|
-
}, _callee13, null, [[0,
|
|
1535
|
+
}, _callee13, null, [[0, 32, 37, 40]]);
|
|
1518
1536
|
}));
|
|
1519
1537
|
return function handleOAuthClickInternal(_x12) {
|
|
1520
1538
|
return _ref14.apply(this, arguments);
|
|
@@ -1933,14 +1951,16 @@ var Login2 = function Login2(_ref) {
|
|
|
1933
1951
|
}
|
|
1934
1952
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showDivider && /*#__PURE__*/React.createElement("div", {
|
|
1935
1953
|
className: "login2-divider"
|
|
1936
|
-
}, locales.getText('pisell-login2-or')), nonOauthButtons.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
1954
|
+
}, locales.getText('pisell-login2-or')), (nonOauthButtons.length > 0 || oauthProviders.length > 0) && /*#__PURE__*/React.createElement("div", {
|
|
1955
|
+
className: "login2-switch-groups"
|
|
1956
|
+
}, nonOauthButtons.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
1937
1957
|
className: "login2-switch-options"
|
|
1938
1958
|
}, nonOauthButtons), oauthProviders.length > 0 && /*#__PURE__*/React.createElement(OAuthButtonGroup, {
|
|
1939
1959
|
providers: oauthProviders,
|
|
1940
1960
|
wrapperClassName: "login2-oauth-buttons",
|
|
1941
1961
|
buttonClassName: "login2-oauth-button",
|
|
1942
1962
|
gap: 12
|
|
1943
|
-
}), registerPrompt);
|
|
1963
|
+
})), registerPrompt);
|
|
1944
1964
|
};
|
|
1945
1965
|
|
|
1946
1966
|
// 渲染 OAuth 按钮
|
|
@@ -722,7 +722,7 @@ var Register2 = function Register2(_ref) {
|
|
|
722
722
|
case 47:
|
|
723
723
|
_context5.prev = 47;
|
|
724
724
|
_context5.t0 = _context5["catch"](0);
|
|
725
|
-
if (!(_context5.t0.
|
|
725
|
+
if (!(_context5.t0.message === 'facebook_login_cancel')) {
|
|
726
726
|
_context5.next = 51;
|
|
727
727
|
break;
|
|
728
728
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PhoneValueObject } from './PhoneInput';
|
|
3
|
+
export interface ForgotPasswordFlowProps {
|
|
4
|
+
/** 初始账号(可选,如果用户在登录页已输入) */
|
|
5
|
+
initialEmail?: string | PhoneValueObject;
|
|
6
|
+
/** 账号类型 */
|
|
7
|
+
accountType: 'email' | 'phone';
|
|
8
|
+
/** 发送验证码回调 */
|
|
9
|
+
onSendCode?: (account: string | PhoneValueObject) => Promise<void>;
|
|
10
|
+
/** 验证验证码回调 */
|
|
11
|
+
onVerifyCode?: (account: string | PhoneValueObject, code: string) => Promise<void>;
|
|
12
|
+
/** 发送重置密码链接回调 */
|
|
13
|
+
onSendResetLink?: (account: string) => Promise<void>;
|
|
14
|
+
/** 重置密码回调 */
|
|
15
|
+
onResetPassword?: (account: string | PhoneValueObject, password: string, code: string) => Promise<void>;
|
|
16
|
+
/** 返回登录页 */
|
|
17
|
+
onBack?: () => void;
|
|
18
|
+
/** 加载状态 */
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/** 倒计时 */
|
|
21
|
+
countdown?: number;
|
|
22
|
+
/** 可用的国家/地区列表 */
|
|
23
|
+
countries?: Array<{
|
|
24
|
+
name: string;
|
|
25
|
+
code: string;
|
|
26
|
+
calling_code: string;
|
|
27
|
+
currency_code: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
declare function ForgotPasswordFlow({ initialEmail, accountType, onSendCode, onVerifyCode, onResetPassword, onSendResetLink, onBack, loading, countdown, countries, }: ForgotPasswordFlowProps): JSX.Element | null;
|
|
31
|
+
export default ForgotPasswordFlow;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface LoginCodeInputProps {
|
|
3
|
+
/** 账号(邮箱或手机号) */
|
|
4
|
+
account: string;
|
|
5
|
+
/** 账号类型 */
|
|
6
|
+
accountType: 'email' | 'phone';
|
|
7
|
+
/** 验证码长度 */
|
|
8
|
+
codeLength?: number;
|
|
9
|
+
/** 提交验证码 */
|
|
10
|
+
onSubmit?: (code: string) => void;
|
|
11
|
+
/** 重新发送 */
|
|
12
|
+
onResend?: () => void;
|
|
13
|
+
/** 返回 */
|
|
14
|
+
onBack?: () => void;
|
|
15
|
+
/** 倒计时秒数 */
|
|
16
|
+
countdown?: number;
|
|
17
|
+
/** 加载状态 */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** 按钮文案(默认为"Log in",忘记密码场景为"Verify") */
|
|
20
|
+
submitButtonText?: string;
|
|
21
|
+
/** 错误信息 */
|
|
22
|
+
error?: string;
|
|
23
|
+
/** 当用户输入时清除错误的回调 */
|
|
24
|
+
onClearError?: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare function LoginCodeInput({ account, accountType, codeLength, onSubmit, onResend, onBack, countdown, loading, submitButtonText, error, onClearError, }: LoginCodeInputProps): JSX.Element;
|
|
27
|
+
export default LoginCodeInput;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface OAuthProviderConfig {
|
|
3
|
+
key: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
badge?: string;
|
|
10
|
+
badgeClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface OAuthButtonGroupProps {
|
|
13
|
+
providers: OAuthProviderConfig[];
|
|
14
|
+
layout?: 'vertical' | 'horizontal';
|
|
15
|
+
size?: 'large' | 'middle' | 'small';
|
|
16
|
+
block?: boolean;
|
|
17
|
+
wrapperClassName?: string;
|
|
18
|
+
buttonClassName?: string;
|
|
19
|
+
gap?: number;
|
|
20
|
+
}
|
|
21
|
+
declare const OAuthButtonGroup: React.FC<OAuthButtonGroupProps>;
|
|
22
|
+
export default OAuthButtonGroup;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './PhoneInput.less';
|
|
3
|
+
/** 国家/地区配置(后端返回格式) */
|
|
4
|
+
export interface CountryOption {
|
|
5
|
+
/** 国家/地区名称 */
|
|
6
|
+
name: string;
|
|
7
|
+
/** 国家/地区代码 */
|
|
8
|
+
code: string;
|
|
9
|
+
/** 区号(不带+号) */
|
|
10
|
+
calling_code: string;
|
|
11
|
+
/** 货币代码 */
|
|
12
|
+
currency_code: string;
|
|
13
|
+
}
|
|
14
|
+
/** 手机号对象格式 */
|
|
15
|
+
export interface PhoneValueObject {
|
|
16
|
+
/** 手机号(不含区号) */
|
|
17
|
+
phone: string;
|
|
18
|
+
/** 国家区号(不带+号) */
|
|
19
|
+
country_calling_code: string;
|
|
20
|
+
}
|
|
21
|
+
/** 值格式类型 */
|
|
22
|
+
export declare type ValueFormat = 'string' | 'object';
|
|
23
|
+
/** 手机号输入组件属性 */
|
|
24
|
+
export interface PhoneInputProps {
|
|
25
|
+
/** 完整的手机号值(包含区号),格式:+86138****,或 +1555****(字符串模式) */
|
|
26
|
+
value?: string | PhoneValueObject;
|
|
27
|
+
/** 值变化回调 */
|
|
28
|
+
onChange?: (value: string | PhoneValueObject) => void;
|
|
29
|
+
/** Placeholder */
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/** 大小 */
|
|
32
|
+
size?: 'large' | 'middle' | 'small';
|
|
33
|
+
/** 是否禁用 */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** 自定义类名 */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** 可用的国家/地区列表 */
|
|
38
|
+
countries?: CountryOption[];
|
|
39
|
+
/** 默认国家/地区代码 */
|
|
40
|
+
defaultCountry?: string;
|
|
41
|
+
/** 值格式:'string' 返回 "+8613800138000",'object' 返回 { phone: "13800138000", country_calling_code: "86" } */
|
|
42
|
+
valueFormat?: ValueFormat;
|
|
43
|
+
/** 键盘按键事件回调 */
|
|
44
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 手机号输入组件
|
|
48
|
+
*
|
|
49
|
+
* 支持国际区号选择和手机号输入
|
|
50
|
+
* 值格式:+区号+手机号,例如:+8613800138000 或 +15551234567
|
|
51
|
+
*/
|
|
52
|
+
declare function PhoneInput({ value, onChange, placeholder, onKeyDown, size, disabled, className, countries, defaultCountry, valueFormat, }: PhoneInputProps): JSX.Element;
|
|
53
|
+
export default PhoneInput;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PhoneValueObject } from './PhoneInput';
|
|
2
|
+
declare type GetTextFunction = (key: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* 手机号校验函数,用于 Ant Design Form 的 rules
|
|
5
|
+
* @param value 手机号值,可以是字符串或对象格式
|
|
6
|
+
* @param getText 国际化文本获取函数
|
|
7
|
+
* @returns Promise<void> 校验通过时 resolve,失败时 reject 并返回错误信息
|
|
8
|
+
*/
|
|
9
|
+
export declare const validatePhoneNumber: (value: string | PhoneValueObject, getText: GetTextFunction) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* 创建手机号校验规则,用于 Form.Item 的 rules 属性
|
|
12
|
+
* @param getText 国际化文本获取函数
|
|
13
|
+
* @param required 是否必填
|
|
14
|
+
* @returns Form 校验规则数组
|
|
15
|
+
*/
|
|
16
|
+
export declare const createPhoneValidationRules: (getText: GetTextFunction, required?: boolean) => any[];
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Rule } from 'antd/es/form';
|
|
2
|
+
export interface PasswordRuleConfig {
|
|
3
|
+
minLength?: number;
|
|
4
|
+
requireUppercase?: boolean;
|
|
5
|
+
requireLowercase?: boolean;
|
|
6
|
+
requireNumber?: boolean;
|
|
7
|
+
requireSpecialCharacters?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface PasswordRuleMessages {
|
|
10
|
+
required?: string;
|
|
11
|
+
minLength?: string;
|
|
12
|
+
requireUppercase?: string;
|
|
13
|
+
requireLowercase?: string;
|
|
14
|
+
requireNumber?: string;
|
|
15
|
+
requireSpecialCharacters?: string;
|
|
16
|
+
summary?: string;
|
|
17
|
+
}
|
|
18
|
+
interface UsePasswordValidationRulesOptions {
|
|
19
|
+
translate?: (key: string) => string;
|
|
20
|
+
fallbackMinLength?: number;
|
|
21
|
+
messageKeys?: PasswordRuleMessages;
|
|
22
|
+
}
|
|
23
|
+
export declare const usePasswordValidationRules: (passwordRules?: PasswordRuleConfig, options?: UsePasswordValidationRulesOptions) => Rule[];
|
|
24
|
+
export default usePasswordValidationRules;
|
|
@@ -547,7 +547,10 @@
|
|
|
547
547
|
align-items: center;
|
|
548
548
|
justify-content: center;
|
|
549
549
|
gap: 12px;
|
|
550
|
-
|
|
550
|
+
.pisell-lowcode-btn-icon {
|
|
551
|
+
margin-right: 0!important;
|
|
552
|
+
font-size: 24px;
|
|
553
|
+
}
|
|
551
554
|
svg {
|
|
552
555
|
flex-shrink: 0;
|
|
553
556
|
}
|
|
@@ -685,6 +688,12 @@
|
|
|
685
688
|
}
|
|
686
689
|
|
|
687
690
|
// 切换选项区域
|
|
691
|
+
.login2-container .login2-switch-groups {
|
|
692
|
+
display: flex;
|
|
693
|
+
flex-direction: column;
|
|
694
|
+
gap: 12px;
|
|
695
|
+
}
|
|
696
|
+
|
|
688
697
|
.login2-container .login2-switch-options {
|
|
689
698
|
display: flex;
|
|
690
699
|
flex-direction: column;
|
|
@@ -778,7 +787,7 @@
|
|
|
778
787
|
position: relative; // 为角标定位提供基准
|
|
779
788
|
|
|
780
789
|
.oauth-icon {
|
|
781
|
-
font-size:
|
|
790
|
+
font-size: 24px;
|
|
782
791
|
font-weight: 700;
|
|
783
792
|
flex-shrink: 0;
|
|
784
793
|
}
|