@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
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
selectedGiftOptionId: string | null;
|
|
4
|
-
cardList: Array<{
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
price: number;
|
|
8
|
-
}>;
|
|
9
|
-
selectedItem: {
|
|
10
|
-
id?: string;
|
|
11
|
-
gift_price?: number;
|
|
12
|
-
price?: number;
|
|
13
|
-
name?: string;
|
|
14
|
-
variant_id?: string;
|
|
15
|
-
};
|
|
16
|
-
productId?: string;
|
|
17
|
-
detailId?: string;
|
|
18
|
-
total: string | number;
|
|
19
|
-
rechargeModalOpen: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
-
state: RechargeState;
|
|
23
|
-
} & {
|
|
24
|
-
dispatch: (params: {
|
|
25
|
-
type: string;
|
|
26
|
-
payload: any;
|
|
27
|
-
}) => void;
|
|
28
|
-
}>;
|
|
29
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: 0;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
state: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IWalletListItemProps } from './serve';
|
|
3
2
|
export interface WalletCardItemProps {
|
|
4
3
|
id: string;
|
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
|
27
26
|
currentSearchListItemCode?: string;
|
|
28
27
|
[key: string]: any;
|
|
29
28
|
}
|
|
30
|
-
export declare const Provider:
|
|
31
|
-
global_wallet: WalletListProps;
|
|
32
|
-
} & {
|
|
33
|
-
dispatch: (params: {
|
|
34
|
-
type: string;
|
|
35
|
-
payload: any;
|
|
36
|
-
}) => void;
|
|
37
|
-
}>;
|
|
29
|
+
export declare const Provider: any, Context: any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ClientData = {
|
|
3
|
+
display_name?: string;
|
|
4
|
+
nickname?: string;
|
|
5
|
+
first_name?: string;
|
|
6
|
+
last_name?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export interface IClientNameProps {
|
|
10
|
+
dataSource?: string | ClientData | null;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarConfig } from '../../types';
|
|
3
|
+
import '../../index.less';
|
|
4
|
+
interface AvatarProps {
|
|
5
|
+
config?: AvatarConfig;
|
|
6
|
+
name: string;
|
|
7
|
+
cover?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
10
|
+
export default Avatar;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare type NativeProps<S extends string = never> = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties & Partial<Record<S, string>>;
|
|
6
|
+
};
|
|
7
|
+
declare type PropagationEvent = 'click';
|
|
8
|
+
import './index.less';
|
|
9
|
+
declare type SideType = 'left' | 'right';
|
|
10
|
+
export declare type SwipeActionRef = {
|
|
11
|
+
close: () => void;
|
|
12
|
+
show: (side?: SideType) => void;
|
|
13
|
+
};
|
|
14
|
+
declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
|
+
export declare type Action = {
|
|
16
|
+
key: string | number;
|
|
17
|
+
text: ReactNode;
|
|
18
|
+
color?: ActionColor | string;
|
|
19
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
};
|
|
22
|
+
export declare type SwipeActionProps = {
|
|
23
|
+
rightActions?: Action[];
|
|
24
|
+
leftActions?: Action[];
|
|
25
|
+
onAction?: (action: Action, e: React.MouseEvent) => void;
|
|
26
|
+
closeOnTouchOutside?: boolean;
|
|
27
|
+
closeOnAction?: boolean;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
stopPropagation?: PropagationEvent[];
|
|
30
|
+
onActionsReveal?: (side: SideType) => void;
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
escapeDom?: string;
|
|
33
|
+
} & NativeProps<'--background'>;
|
|
34
|
+
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
35
|
+
rightActions?: Action[] | undefined;
|
|
36
|
+
leftActions?: Action[] | undefined;
|
|
37
|
+
onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
|
|
38
|
+
closeOnTouchOutside?: boolean | undefined;
|
|
39
|
+
closeOnAction?: boolean | undefined;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
stopPropagation?: "click"[] | undefined;
|
|
42
|
+
onActionsReveal?: ((side: SideType) => void) | undefined;
|
|
43
|
+
onClose?: (() => void) | undefined;
|
|
44
|
+
escapeDom?: string | undefined;
|
|
45
|
+
} & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.contact-info.placeholder': string;
|
|
4
|
+
'pisell2.text.contact-info.actions.delete': string;
|
|
5
|
+
};
|
|
6
|
+
'zh-CN': {
|
|
7
|
+
'pisell2.text.contact-info.placeholder': string;
|
|
8
|
+
'pisell2.text.contact-info.actions.delete': string;
|
|
9
|
+
};
|
|
10
|
+
'zh-HK': {
|
|
11
|
+
'pisell2.text.contact-info.placeholder': string;
|
|
12
|
+
'pisell2.text.contact-info.actions.delete': string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 联系信息数据
|
|
4
|
+
*/
|
|
5
|
+
export interface ContactInfoData {
|
|
6
|
+
first_name?: string;
|
|
7
|
+
last_name?: string;
|
|
8
|
+
phone?: {
|
|
9
|
+
phone: string;
|
|
10
|
+
country_calling_code: string;
|
|
11
|
+
country_code?: string;
|
|
12
|
+
};
|
|
13
|
+
email?: string;
|
|
14
|
+
avatar?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 卡片布局类型
|
|
18
|
+
*/
|
|
19
|
+
export declare type Direction = 'horizontal' | 'vertical';
|
|
20
|
+
/**
|
|
21
|
+
* 头像尺寸类型
|
|
22
|
+
*/
|
|
23
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
24
|
+
/**
|
|
25
|
+
* 头像形状类型
|
|
26
|
+
*/
|
|
27
|
+
export declare type AvatarShape = 'circle' | 'square';
|
|
28
|
+
/**
|
|
29
|
+
* 头像配置
|
|
30
|
+
*/
|
|
31
|
+
export interface AvatarConfig {
|
|
32
|
+
shape?: AvatarShape;
|
|
33
|
+
borderRadius?: number;
|
|
34
|
+
size?: AvatarSize;
|
|
35
|
+
useTextAvatar?: boolean;
|
|
36
|
+
children?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 姓名样式配置
|
|
40
|
+
*/
|
|
41
|
+
export interface NameStyle {
|
|
42
|
+
fontSize?: number | string;
|
|
43
|
+
fontWeight?: number | string;
|
|
44
|
+
color?: string;
|
|
45
|
+
textDecoration?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface StyleConfig {
|
|
48
|
+
width?: number | string;
|
|
49
|
+
border?: 'solid' | 'unset';
|
|
50
|
+
borderWidth?: number | string;
|
|
51
|
+
borderColor?: string;
|
|
52
|
+
borderRadius?: number | string;
|
|
53
|
+
padding?: number | string;
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 文本样式配置
|
|
58
|
+
*/
|
|
59
|
+
export interface TextStyle {
|
|
60
|
+
fontSize?: number | string;
|
|
61
|
+
fontWeight?: number | string;
|
|
62
|
+
color?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* ContactInfo 组件属性接口
|
|
66
|
+
*/
|
|
67
|
+
export interface ContactInfoProps {
|
|
68
|
+
dataSource?: ContactInfoData;
|
|
69
|
+
defaultName?: string;
|
|
70
|
+
placeholder?: string | React.ReactNode;
|
|
71
|
+
isShowDelete?: boolean;
|
|
72
|
+
children?: React.ReactNode;
|
|
73
|
+
direction?: Direction;
|
|
74
|
+
horizontalGap?: number | string;
|
|
75
|
+
verticalGap?: number | string;
|
|
76
|
+
isShowAvatar?: boolean;
|
|
77
|
+
isShowPhone?: boolean;
|
|
78
|
+
isShowEmail?: boolean;
|
|
79
|
+
avatar?: AvatarConfig;
|
|
80
|
+
style?: StyleConfig;
|
|
81
|
+
nameStyle?: NameStyle;
|
|
82
|
+
textStyle?: TextStyle;
|
|
83
|
+
placeholderStyle?: CSSProperties;
|
|
84
|
+
button?: {
|
|
85
|
+
addButtonIcon?: string;
|
|
86
|
+
editButtonIcon?: string;
|
|
87
|
+
};
|
|
88
|
+
onSave?: (value: any) => void;
|
|
89
|
+
onDelete?: () => void;
|
|
90
|
+
onCancel?: () => void;
|
|
91
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface FieldMapping<T = any, R = any> {
|
|
2
|
+
[key: string]: string | ((data: T) => R) | undefined;
|
|
3
|
+
}
|
|
4
|
+
export declare function getFieldValue<T, R = any>(data: T, fieldKey: string): R | undefined;
|
|
5
|
+
export declare function getFieldValue<T, R = any>(data: T, fieldKey: string, mapping: FieldMapping<T, R>): R | undefined;
|
|
6
|
+
export declare const getAvatarText: (name: string) => string;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ContactInfoModalProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onSave: (values: any) => void;
|
|
8
|
+
isShowDelete?: boolean;
|
|
9
|
+
onDelete: () => void;
|
|
10
|
+
dataSource?: {
|
|
11
|
+
first_name?: string;
|
|
12
|
+
last_name?: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
phone?: {
|
|
15
|
+
phone: string;
|
|
16
|
+
country_calling_code: string;
|
|
17
|
+
country_code?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
config?: {
|
|
21
|
+
first_name?: {
|
|
22
|
+
visible?: boolean;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
};
|
|
25
|
+
last_name?: {
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
};
|
|
29
|
+
phone?: {
|
|
30
|
+
visible?: boolean;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
};
|
|
33
|
+
email?: {
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
declare const ContactInfoModal: React.FC<ContactInfoModalProps>;
|
|
40
|
+
export default ContactInfoModal;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.button.save': string;
|
|
4
|
+
'pisell2.text.button.delete': string;
|
|
5
|
+
'pisell2.text.button.cancel': string;
|
|
6
|
+
'pisell2.text.contact-info.actions.delete': string;
|
|
7
|
+
'pisell2.text.contact-info.modal.title': string;
|
|
8
|
+
'pisell2.text.contact-info.modal.first-name': string;
|
|
9
|
+
'pisell2.text.contact-info.modal.first-name-placeholder': string;
|
|
10
|
+
'pisell2.text.contact-info.modal.first-name-required': string;
|
|
11
|
+
'pisell2.text.contact-info.modal.last-name': string;
|
|
12
|
+
'pisell2.text.contact-info.modal.last-name-placeholder': string;
|
|
13
|
+
'pisell2.text.contact-info.modal.last-name-required': string;
|
|
14
|
+
'pisell2.text.contact-info.modal.mobile': string;
|
|
15
|
+
'pisell2.text.contact-info.modal.mobile-placeholder': string;
|
|
16
|
+
'pisell2.text.contact-info.modal.mobile-required': string;
|
|
17
|
+
'pisell2.text.contact-info.modal.mobile-error': string;
|
|
18
|
+
'pisell2.text.contact-info.modal.email': string;
|
|
19
|
+
'pisell2.text.contact-info.modal.email-placeholder': string;
|
|
20
|
+
'pisell2.text.contact-info.modal.email-required': string;
|
|
21
|
+
'pisell2.text.contact-info.modal.email-error': string;
|
|
22
|
+
};
|
|
23
|
+
'zh-CN': {
|
|
24
|
+
'pisell2.text.button.save': string;
|
|
25
|
+
'pisell2.text.button.delete': string;
|
|
26
|
+
'pisell2.text.button.cancel': string;
|
|
27
|
+
'pisell2.text.contact-info.actions.delete': string;
|
|
28
|
+
'pisell2.text.contact-info.modal.title': string;
|
|
29
|
+
'pisell2.text.contact-info.modal.first-name': string;
|
|
30
|
+
'pisell2.text.contact-info.modal.first-name-placeholder': string;
|
|
31
|
+
'pisell2.text.contact-info.modal.first-name-required': string;
|
|
32
|
+
'pisell2.text.contact-info.modal.last-name': string;
|
|
33
|
+
'pisell2.text.contact-info.modal.last-name-placeholder': string;
|
|
34
|
+
'pisell2.text.contact-info.modal.last-name-required': string;
|
|
35
|
+
'pisell2.text.contact-info.modal.mobile': string;
|
|
36
|
+
'pisell2.text.contact-info.modal.mobile-placeholder': string;
|
|
37
|
+
'pisell2.text.contact-info.modal.mobile-required': string;
|
|
38
|
+
'pisell2.text.contact-info.modal.mobile-error': string;
|
|
39
|
+
'pisell2.text.contact-info.modal.email': string;
|
|
40
|
+
'pisell2.text.contact-info.modal.email-placeholder': string;
|
|
41
|
+
'pisell2.text.contact-info.modal.email-required': string;
|
|
42
|
+
'pisell2.text.contact-info.modal.email-error': string;
|
|
43
|
+
};
|
|
44
|
+
'zh-HK': {
|
|
45
|
+
'pisell2.text.button.save': string;
|
|
46
|
+
'pisell2.text.button.delete': string;
|
|
47
|
+
'pisell2.text.button.cancel': string;
|
|
48
|
+
'pisell2.text.contact-info.actions.delete': string;
|
|
49
|
+
'pisell2.text.contact-info.modal.title': string;
|
|
50
|
+
'pisell2.text.contact-info.modal.first-name': string;
|
|
51
|
+
'pisell2.text.contact-info.modal.first-name-placeholder': string;
|
|
52
|
+
'pisell2.text.contact-info.modal.first-name-required': string;
|
|
53
|
+
'pisell2.text.contact-info.modal.last-name': string;
|
|
54
|
+
'pisell2.text.contact-info.modal.last-name-placeholder': string;
|
|
55
|
+
'pisell2.text.contact-info.modal.last-name-required': string;
|
|
56
|
+
'pisell2.text.contact-info.modal.mobile': string;
|
|
57
|
+
'pisell2.text.contact-info.modal.mobile-placeholder': string;
|
|
58
|
+
'pisell2.text.contact-info.modal.mobile-required': string;
|
|
59
|
+
'pisell2.text.contact-info.modal.mobile-error': string;
|
|
60
|
+
'pisell2.text.contact-info.modal.email': string;
|
|
61
|
+
'pisell2.text.contact-info.modal.email-placeholder': string;
|
|
62
|
+
'pisell2.text.contact-info.modal.email-required': string;
|
|
63
|
+
'pisell2.text.contact-info.modal.email-error': string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ProductCardSkeleton from './ProductCardSkeleton';
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare type BoolConfigVal = 0 | 1;
|
|
5
|
+
export interface ProductCardConfig {
|
|
6
|
+
isProductCover?: BoolConfigVal;
|
|
7
|
+
imgWidth?: string;
|
|
8
|
+
imgHeight?: string;
|
|
9
|
+
radius?: number;
|
|
10
|
+
isTitle?: BoolConfigVal;
|
|
11
|
+
isSubtitle?: BoolConfigVal;
|
|
12
|
+
showSpec?: boolean;
|
|
13
|
+
isTag?: BoolConfigVal;
|
|
14
|
+
isPrice?: BoolConfigVal;
|
|
15
|
+
isOriginPrice?: BoolConfigVal;
|
|
16
|
+
showZeroPrice?: boolean;
|
|
17
|
+
showMarketingTag?: boolean;
|
|
18
|
+
showRemark?: boolean;
|
|
19
|
+
isStock?: BoolConfigVal;
|
|
20
|
+
}
|
|
21
|
+
export interface ProductCardProps {
|
|
22
|
+
item: any;
|
|
23
|
+
index: number;
|
|
24
|
+
context?: {
|
|
25
|
+
onItemIntersectionIn: (item: any) => void;
|
|
26
|
+
onItemIntersectionOut: (item: any) => void;
|
|
27
|
+
};
|
|
28
|
+
className?: string;
|
|
29
|
+
onSelectProduct?: (item: any) => void;
|
|
30
|
+
currentProductId?: number;
|
|
31
|
+
onSelect?: (item: any) => void;
|
|
32
|
+
onSelectCover?: (item: any) => void;
|
|
33
|
+
onSelectInfo?: (item: any) => void;
|
|
34
|
+
isSelected?: boolean;
|
|
35
|
+
decorateConfig?: ProductCardConfig;
|
|
36
|
+
}
|
|
37
|
+
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, onSelectCover, onSelectInfo, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
38
|
+
export declare const DefaultItemContent: React.MemoExoticComponent<(props: {
|
|
39
|
+
item: any;
|
|
40
|
+
index: number;
|
|
41
|
+
context?: {
|
|
42
|
+
onItemIntersectionIn: (item: any) => void;
|
|
43
|
+
onItemIntersectionOut: (item: any) => void;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}) => JSX.Element>;
|
|
46
|
+
export default ProductCard;
|
|
47
|
+
export { ProductCardSkeleton };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ProductSelectProps {
|
|
4
|
+
dataSource: any[];
|
|
5
|
+
showSearch?: boolean;
|
|
6
|
+
showTab?: boolean;
|
|
7
|
+
layout?: {
|
|
8
|
+
grid: boolean;
|
|
9
|
+
config: string;
|
|
10
|
+
};
|
|
11
|
+
onChange: (value: any, type?: string) => void;
|
|
12
|
+
value?: number;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
emptyDescription?: string;
|
|
16
|
+
/** 当前滚动元素 */
|
|
17
|
+
scrollDom?: string;
|
|
18
|
+
/** 商品列表上方的其它组件 */
|
|
19
|
+
offsetDom?: any;
|
|
20
|
+
/** 样式变量 */
|
|
21
|
+
token?: Partial<any>;
|
|
22
|
+
/** 后台装修单选模式下的已选中项 */
|
|
23
|
+
selectedItems?: Array<any>;
|
|
24
|
+
/** 后台装修配置 */
|
|
25
|
+
productListSetting?: Partial<any>;
|
|
26
|
+
/** 兼容scrollDom */
|
|
27
|
+
customScrollParent?: HTMLElement | string;
|
|
28
|
+
hideCategoryWhenOne?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const PREFIX = "pisell-product-select";
|
|
31
|
+
declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, hideCategoryWhenOne, ...rest }: ProductSelectProps) => JSX.Element;
|
|
32
|
+
export default index;
|
|
@@ -153,26 +153,31 @@ var AuthModal = () => {
|
|
|
153
153
|
}
|
|
154
154
|
enabledMethods.sort((a, b) => a.sort - b.sort);
|
|
155
155
|
enabledMethods.forEach(({ type, config: methodConfig }) => {
|
|
156
|
-
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
156
|
+
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
157
157
|
if (type === "email") {
|
|
158
158
|
const verificationMethods = [];
|
|
159
|
-
const loginMethod = ((_a3 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _a3.login_method) || {
|
|
159
|
+
const loginMethod = ((_a3 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _a3.login_method) || {
|
|
160
|
+
"password": {
|
|
161
|
+
enabled: true,
|
|
162
|
+
sort: 1
|
|
163
|
+
}
|
|
164
|
+
};
|
|
160
165
|
const enabledVerificationMethods = [];
|
|
161
|
-
if ((_b2 = loginMethod.password) == null ? void 0 : _b2.enabled) {
|
|
166
|
+
if ((_b2 = loginMethod == null ? void 0 : loginMethod.password) == null ? void 0 : _b2.enabled) {
|
|
162
167
|
enabledVerificationMethods.push({
|
|
163
168
|
type: "password",
|
|
164
|
-
sort: loginMethod.password.sort || 0
|
|
169
|
+
sort: ((_c2 = loginMethod.password) == null ? void 0 : _c2.sort) || 0
|
|
165
170
|
// 添加默认值保护
|
|
166
171
|
});
|
|
167
172
|
}
|
|
168
|
-
if ((
|
|
173
|
+
if ((_d2 = loginMethod == null ? void 0 : loginMethod.code) == null ? void 0 : _d2.enabled) {
|
|
169
174
|
enabledVerificationMethods.push({
|
|
170
175
|
type: "verification_code",
|
|
171
176
|
sort: loginMethod.code.sort || 0
|
|
172
177
|
// 添加默认值保护
|
|
173
178
|
});
|
|
174
179
|
}
|
|
175
|
-
if ((
|
|
180
|
+
if ((_e2 = loginMethod == null ? void 0 : loginMethod.link) == null ? void 0 : _e2.enabled) {
|
|
176
181
|
enabledVerificationMethods.push({
|
|
177
182
|
type: "verification_code",
|
|
178
183
|
// link 映射为 verification_code
|
|
@@ -191,16 +196,16 @@ var AuthModal = () => {
|
|
|
191
196
|
}
|
|
192
197
|
} else if (type === "phone") {
|
|
193
198
|
const verificationMethods = [];
|
|
194
|
-
const loginMethod = ((
|
|
199
|
+
const loginMethod = ((_f2 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _f2.login_method) || {};
|
|
195
200
|
const enabledVerificationMethods = [];
|
|
196
|
-
if ((
|
|
201
|
+
if ((_g2 = loginMethod == null ? void 0 : loginMethod.password) == null ? void 0 : _g2.enabled) {
|
|
197
202
|
enabledVerificationMethods.push({
|
|
198
203
|
type: "password",
|
|
199
204
|
sort: loginMethod.password.sort || 0
|
|
200
205
|
// 添加默认值保护
|
|
201
206
|
});
|
|
202
207
|
}
|
|
203
|
-
if ((
|
|
208
|
+
if ((_h2 = loginMethod == null ? void 0 : loginMethod.code) == null ? void 0 : _h2.enabled) {
|
|
204
209
|
enabledVerificationMethods.push({
|
|
205
210
|
type: "verification_code",
|
|
206
211
|
sort: loginMethod.code.sort || 0
|
|
@@ -223,12 +228,12 @@ var AuthModal = () => {
|
|
|
223
228
|
} else if (type === "facebook") {
|
|
224
229
|
loginMethods.push({
|
|
225
230
|
type: "facebook",
|
|
226
|
-
appId: ((
|
|
231
|
+
appId: ((_i2 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _i2.appid) || ""
|
|
227
232
|
});
|
|
228
233
|
} else if (type === "apple") {
|
|
229
234
|
loginMethods.push({
|
|
230
235
|
type: "apple",
|
|
231
|
-
clientId: ((
|
|
236
|
+
clientId: ((_j2 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _j2.identifier) || ""
|
|
232
237
|
});
|
|
233
238
|
} else if (type === "guest") {
|
|
234
239
|
loginMethods.push({
|
|
@@ -88,13 +88,13 @@ var Login2 = ({
|
|
|
88
88
|
translate: import_utils.locales.getText,
|
|
89
89
|
fallbackMinLength: 6,
|
|
90
90
|
messageKeys: {
|
|
91
|
-
required: "pisell-login2-password-required",
|
|
92
|
-
minLength: "pisell-set-password-min-length",
|
|
93
|
-
requireUppercase: "pisell-set-password-require-uppercase",
|
|
94
|
-
requireLowercase: "pisell-set-password-require-lowercase",
|
|
95
|
-
requireNumber: "pisell-set-password-require-number",
|
|
96
|
-
requireSpecialCharacters: "pisell-set-password-require-special",
|
|
97
|
-
summary: "pisell-set-password-must-contain"
|
|
91
|
+
required: import_utils.locales.getText("pisell-login2-password-required"),
|
|
92
|
+
minLength: import_utils.locales.getText("pisell-set-password-min-length"),
|
|
93
|
+
requireUppercase: import_utils.locales.getText("pisell-set-password-require-uppercase"),
|
|
94
|
+
requireLowercase: import_utils.locales.getText("pisell-set-password-require-lowercase"),
|
|
95
|
+
requireNumber: import_utils.locales.getText("pisell-set-password-require-number"),
|
|
96
|
+
requireSpecialCharacters: import_utils.locales.getText("pisell-set-password-require-special"),
|
|
97
|
+
summary: import_utils.locales.getText("pisell-set-password-must-contain")
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
);
|
|
@@ -842,7 +842,10 @@ var Login2 = ({
|
|
|
842
842
|
const fbConfig = (_a2 = config == null ? void 0 : config.loginMethods) == null ? void 0 : _a2.find((n) => n.type === "facebook");
|
|
843
843
|
const token = fbConfig == null ? void 0 : fbConfig.appId;
|
|
844
844
|
if (token) {
|
|
845
|
-
await registerAndLogin.loginWithFacebook(token);
|
|
845
|
+
const res = await registerAndLogin.loginWithFacebook(token);
|
|
846
|
+
if (res.status) {
|
|
847
|
+
onLogin == null ? void 0 : onLogin(res.data, "facebook", { account: "", password: "" }, config.channel);
|
|
848
|
+
}
|
|
846
849
|
} else {
|
|
847
850
|
throw new Error("Facebook app_id not configured");
|
|
848
851
|
}
|
|
@@ -850,7 +853,8 @@ var Login2 = ({
|
|
|
850
853
|
const appleConfig = (_b2 = config == null ? void 0 : config.loginMethods) == null ? void 0 : _b2.find((n) => n.type === "apple");
|
|
851
854
|
const token = appleConfig == null ? void 0 : appleConfig.clientId;
|
|
852
855
|
if (token) {
|
|
853
|
-
await registerAndLogin.loginWithApple(token);
|
|
856
|
+
const res = await registerAndLogin.loginWithApple(token);
|
|
857
|
+
onLogin == null ? void 0 : onLogin(res.data, "apple", { account: "", password: "" }, config.channel);
|
|
854
858
|
} else {
|
|
855
859
|
throw new Error("Apple client_id not configured");
|
|
856
860
|
}
|
|
@@ -858,6 +862,9 @@ var Login2 = ({
|
|
|
858
862
|
await (onOAuthLogin == null ? void 0 : onOAuthLogin(provider, config.channel));
|
|
859
863
|
}
|
|
860
864
|
} catch (error) {
|
|
865
|
+
if (error.message === "facebook_login_cancel") {
|
|
866
|
+
return import_antd.message.error(import_utils.locales.getText("pisell-register2-facebook-login-canceled"));
|
|
867
|
+
}
|
|
861
868
|
import_antd.message.error(
|
|
862
869
|
(error == null ? void 0 : error.message) || import_utils.locales.getText("pisell-login2-login-failed")
|
|
863
870
|
);
|
|
@@ -1281,7 +1288,7 @@ var Login2 = ({
|
|
|
1281
1288
|
if (!nonOauthButtons.length && !oauthProviders.length) {
|
|
1282
1289
|
return registerPrompt;
|
|
1283
1290
|
}
|
|
1284
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showDivider && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-divider" }, import_utils.locales.getText("pisell-login2-or")), nonOauthButtons.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-switch-options" }, nonOauthButtons), oauthProviders.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
1291
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showDivider && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-divider" }, import_utils.locales.getText("pisell-login2-or")), (nonOauthButtons.length > 0 || oauthProviders.length > 0) && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-switch-groups" }, nonOauthButtons.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-switch-options" }, nonOauthButtons), oauthProviders.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
1285
1292
|
import_OAuthButtonGroup.default,
|
|
1286
1293
|
{
|
|
1287
1294
|
providers: oauthProviders,
|
|
@@ -1289,7 +1296,7 @@ var Login2 = ({
|
|
|
1289
1296
|
buttonClassName: "login2-oauth-button",
|
|
1290
1297
|
gap: 12
|
|
1291
1298
|
}
|
|
1292
|
-
), registerPrompt);
|
|
1299
|
+
)), registerPrompt);
|
|
1293
1300
|
};
|
|
1294
1301
|
if (!visible) {
|
|
1295
1302
|
return null;
|
|
@@ -454,7 +454,7 @@ var Register2 = ({
|
|
|
454
454
|
}
|
|
455
455
|
await (onOAuthLogin == null ? void 0 : onOAuthLogin(provider, config.channel));
|
|
456
456
|
} catch (error) {
|
|
457
|
-
if (error.
|
|
457
|
+
if (error.message === "facebook_login_cancel") {
|
|
458
458
|
return import_antd.message.error(import_utils.locales.getText("pisell-register2-facebook-login-canceled"));
|
|
459
459
|
}
|
|
460
460
|
console.error(`${provider} login error:`, error);
|
|
@@ -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;
|