@pisell/private-materials 6.3.31 → 6.3.32
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/meta.js +1 -1
- 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 +1 -1
- 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/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/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 +14 -0
- 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/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 +120 -0
- 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/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/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/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/Login2.js +7 -7
- 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/hooks/usePasswordValidationRules.d.ts +24 -0
- package/es/pro/Login2.0/locales.d.ts +543 -0
- 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/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/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 +14 -0
- 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/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 +120 -0
- 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/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/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/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/Login2.js +7 -7
- 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/hooks/usePasswordValidationRules.d.ts +24 -0
- package/lib/pro/Login2.0/locales.d.ts +543 -0
- 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 +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { RegisterFlowData } from '../shared/registerFlow';
|
|
3
|
+
export interface CodeInputProps {
|
|
4
|
+
/** 流程数据 */
|
|
5
|
+
flowData: RegisterFlowData;
|
|
6
|
+
/** 验证码长度 */
|
|
7
|
+
codeLength?: number;
|
|
8
|
+
/** 提交验证码 */
|
|
9
|
+
onSubmit?: (code: string) => void;
|
|
10
|
+
/** 重新发送 */
|
|
11
|
+
onResend?: () => void;
|
|
12
|
+
/** 返回 */
|
|
13
|
+
onBack?: () => void;
|
|
14
|
+
/** 倒计时秒数 */
|
|
15
|
+
countdown?: number;
|
|
16
|
+
/** 加载状态 */
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
/** 错误信息 */
|
|
19
|
+
error?: string;
|
|
20
|
+
/** 当用户输入时清除错误的回调 */
|
|
21
|
+
onClearError?: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare function CodeInput({ flowData, codeLength, onSubmit, onResend, onBack, countdown, loading, error, onClearError, }: CodeInputProps): JSX.Element;
|
|
24
|
+
export default CodeInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { RegisterFlowData } from '../shared/registerFlow';
|
|
3
|
+
export interface EmailAlreadyRegisteredProps {
|
|
4
|
+
/** 流程数据 */
|
|
5
|
+
flowData: RegisterFlowData;
|
|
6
|
+
/** 跳转到登录 */
|
|
7
|
+
onGoToLogin?: () => void;
|
|
8
|
+
/** 返回重新输入 */
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare function EmailAlreadyRegistered({ flowData, onGoToLogin, onBack, }: EmailAlreadyRegisteredProps): JSX.Element;
|
|
12
|
+
export default EmailAlreadyRegistered;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface EmailLinkExpiredProps {
|
|
3
|
+
/** 返回注册页回调 */
|
|
4
|
+
onBackToRegistration?: () => void;
|
|
5
|
+
/** 跳转到登录页回调 */
|
|
6
|
+
onGoToLogin?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function EmailLinkExpired({ onBackToRegistration, onGoToLogin }: EmailLinkExpiredProps): JSX.Element;
|
|
9
|
+
export default EmailLinkExpired;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { RegisterFlowData } from '../shared/registerFlow';
|
|
3
|
+
import { PasswordRuleConfig } from '../hooks/usePasswordValidationRules';
|
|
4
|
+
export interface SetPasswordProps {
|
|
5
|
+
/** 流程数据 */
|
|
6
|
+
flowData: RegisterFlowData;
|
|
7
|
+
/** 提交密码 */
|
|
8
|
+
onSubmit?: (password: string, confirmPassword: string) => void;
|
|
9
|
+
/** 返回 */
|
|
10
|
+
onBack?: () => void;
|
|
11
|
+
/** 加载状态 */
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
/** 密码验证规则配置 */
|
|
14
|
+
passwordRules?: PasswordRuleConfig;
|
|
15
|
+
/** 场景类型:create 表示注册场景,reset 表示修改密码场景 */
|
|
16
|
+
scenario?: 'create' | 'reset';
|
|
17
|
+
}
|
|
18
|
+
declare function SetPassword({ flowData, onSubmit, onBack, loading, passwordRules, scenario, }: SetPasswordProps): JSX.Element;
|
|
19
|
+
export default SetPassword;
|
|
@@ -67,13 +67,13 @@ function SetPassword({
|
|
|
67
67
|
translate: import_utils.locales.getText,
|
|
68
68
|
fallbackMinLength: 8,
|
|
69
69
|
messageKeys: {
|
|
70
|
-
required: "pisell-set-password-required",
|
|
71
|
-
minLength: "pisell-set-password-min-length",
|
|
72
|
-
requireUppercase: "pisell-set-password-require-uppercase",
|
|
73
|
-
requireLowercase: "pisell-set-password-require-lowercase",
|
|
74
|
-
requireNumber: "pisell-set-password-require-number",
|
|
75
|
-
requireSpecialCharacters: "pisell-set-password-require-special",
|
|
76
|
-
summary: "pisell-set-password-must-contain"
|
|
70
|
+
required: import_utils.locales.getText("pisell-set-password-required"),
|
|
71
|
+
minLength: import_utils.locales.getText("pisell-set-password-min-length"),
|
|
72
|
+
requireUppercase: import_utils.locales.getText("pisell-set-password-require-uppercase"),
|
|
73
|
+
requireLowercase: import_utils.locales.getText("pisell-set-password-require-lowercase"),
|
|
74
|
+
requireNumber: import_utils.locales.getText("pisell-set-password-require-number"),
|
|
75
|
+
requireSpecialCharacters: import_utils.locales.getText("pisell-set-password-require-special"),
|
|
76
|
+
summary: import_utils.locales.getText("pisell-set-password-must-contain")
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "register-step-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ import_react.default.createElement("h2", { className: "register-step-title" }, scenario === "create" ? import_utils.locales.getText("pisell-set-password-create-title") : import_utils.locales.getText("pisell-set-password-reset-title")), /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, layout: "vertical", className: "password-set-form" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "password", rules: passwordValidationRules }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { RegisterFlowData } from '../shared/registerFlow';
|
|
3
|
+
export interface VerificationSuccessProps {
|
|
4
|
+
/** 流程数据 */
|
|
5
|
+
flowData: RegisterFlowData;
|
|
6
|
+
}
|
|
7
|
+
declare function VerificationSuccess({ flowData }: VerificationSuccessProps): JSX.Element;
|
|
8
|
+
export default VerificationSuccess;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface VerifyingEmailLinkProps {
|
|
3
|
+
/** 加载提示文本(可选,不传则使用国际化默认文本) */
|
|
4
|
+
loadingText?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function VerifyingEmailLink({ loadingText }: VerifyingEmailLinkProps): JSX.Element;
|
|
7
|
+
export default VerifyingEmailLink;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { RegisterFlowData, VerificationMethod } from '../shared/registerFlow';
|
|
3
|
+
export interface WaitEmailLinkProps {
|
|
4
|
+
/** 流程数据 */
|
|
5
|
+
flowData: RegisterFlowData;
|
|
6
|
+
/** 重新发送 */
|
|
7
|
+
onResend?: () => void;
|
|
8
|
+
/** 返回 */
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
/** 编辑邮箱 */
|
|
11
|
+
onEditEmail?: () => void;
|
|
12
|
+
/** 倒计时秒数 */
|
|
13
|
+
countdown?: number;
|
|
14
|
+
/** 验证方式 */
|
|
15
|
+
verificationMethod?: VerificationMethod;
|
|
16
|
+
}
|
|
17
|
+
declare function WaitEmailLink({ flowData, onResend, onBack, onEditEmail, countdown, verificationMethod, }: WaitEmailLinkProps): JSX.Element;
|
|
18
|
+
export default WaitEmailLink;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注册流程步骤组件导出
|
|
3
|
+
*/
|
|
4
|
+
export { default as WaitEmailLink } from './WaitEmailLink';
|
|
5
|
+
export { default as EmailAlreadyRegistered } from './EmailAlreadyRegistered';
|
|
6
|
+
export { default as CodeInput } from './CodeInput';
|
|
7
|
+
export { default as VerificationSuccess } from './VerificationSuccess';
|
|
8
|
+
export { default as SetPassword } from './SetPassword';
|
|
9
|
+
export { default as VerifyingEmailLink } from './VerifyingEmailLink';
|
|
10
|
+
export { default as EmailLinkExpired } from './EmailLinkExpired';
|
|
11
|
+
export { default as EmailLinkAlreadyUsed } from './EmailLinkAlreadyUsed';
|
|
12
|
+
export type { WaitEmailLinkProps } from './WaitEmailLink';
|
|
13
|
+
export type { EmailAlreadyRegisteredProps } from './EmailAlreadyRegistered';
|
|
14
|
+
export type { CodeInputProps } from './CodeInput';
|
|
15
|
+
export type { VerificationSuccessProps } from './VerificationSuccess';
|
|
16
|
+
export type { SetPasswordProps } from './SetPassword';
|
|
17
|
+
export type { VerifyingEmailLinkProps } from './VerifyingEmailLink';
|
|
18
|
+
export type { EmailLinkExpiredProps } from './EmailLinkExpired';
|
|
19
|
+
export type { EmailLinkAlreadyUsedProps } from './EmailLinkAlreadyUsed';
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 登录注册 2.0 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="react" />
|
|
5
|
+
/** 验证方式枚举 */
|
|
6
|
+
export declare type VerificationMethod = 'verification_code' | 'password';
|
|
7
|
+
/** 邮箱注册验证方式 */
|
|
8
|
+
export declare type EmailRegistrationVerification = 'verification_link' | 'verification_code';
|
|
9
|
+
/** 认证方式类型 */
|
|
10
|
+
export declare type AuthMethodType = 'email' | 'phone' | 'google' | 'facebook' | 'apple';
|
|
11
|
+
/** 当前状态:登录或注册 */
|
|
12
|
+
export declare type AuthState = 'login' | 'register';
|
|
13
|
+
/** 邮箱认证配置 */
|
|
14
|
+
export interface EmailAuthConfig {
|
|
15
|
+
/** 是否启用邮箱认证 */
|
|
16
|
+
enable_email: boolean;
|
|
17
|
+
/** 注册验证方式 */
|
|
18
|
+
registration_verification: EmailRegistrationVerification;
|
|
19
|
+
/** 登录验证方式列表 */
|
|
20
|
+
login_verification_methods: VerificationMethod[];
|
|
21
|
+
}
|
|
22
|
+
/** 手机认证配置 */
|
|
23
|
+
export interface PhoneAuthConfig {
|
|
24
|
+
/** 是否启用手机认证 */
|
|
25
|
+
enable_phone_number: boolean;
|
|
26
|
+
/** 注册验证方式(手机仅支持验证码) */
|
|
27
|
+
registration_verification: 'verification_code';
|
|
28
|
+
/** 登录验证方式列表 */
|
|
29
|
+
login_verification_methods: VerificationMethod[];
|
|
30
|
+
}
|
|
31
|
+
/** 三方 OAuth 配置 */
|
|
32
|
+
export interface OAuthConfig {
|
|
33
|
+
/** Google 登录 */
|
|
34
|
+
google?: {
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
client_id?: string;
|
|
37
|
+
};
|
|
38
|
+
/** Facebook 登录 */
|
|
39
|
+
facebook?: {
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
app_id?: string;
|
|
42
|
+
};
|
|
43
|
+
/** Apple 登录 */
|
|
44
|
+
apple?: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
client_id?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** UI 配置 */
|
|
50
|
+
export interface UIConfig {
|
|
51
|
+
/** Logo 配置 */
|
|
52
|
+
logo?: {
|
|
53
|
+
show: boolean;
|
|
54
|
+
url?: string;
|
|
55
|
+
position?: 'left' | 'center' | 'right';
|
|
56
|
+
size?: {
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/** 标题配置 */
|
|
62
|
+
title?: {
|
|
63
|
+
show: boolean;
|
|
64
|
+
text?: string;
|
|
65
|
+
align?: 'left' | 'center' | 'right';
|
|
66
|
+
};
|
|
67
|
+
/** 副标题配置 */
|
|
68
|
+
subtitle?: {
|
|
69
|
+
show: boolean;
|
|
70
|
+
text?: string;
|
|
71
|
+
align?: 'left' | 'center' | 'right';
|
|
72
|
+
};
|
|
73
|
+
/** 描述配置 */
|
|
74
|
+
desc?: {
|
|
75
|
+
show: boolean;
|
|
76
|
+
text?: string;
|
|
77
|
+
align?: 'left' | 'center' | 'right';
|
|
78
|
+
};
|
|
79
|
+
/** 标签页配置 */
|
|
80
|
+
tabs?: {
|
|
81
|
+
show: boolean;
|
|
82
|
+
loginText?: string;
|
|
83
|
+
registerText?: string;
|
|
84
|
+
};
|
|
85
|
+
/** 主题色 */
|
|
86
|
+
themeColor?: string;
|
|
87
|
+
}
|
|
88
|
+
/** 组件总配置 */
|
|
89
|
+
export interface Login2Config {
|
|
90
|
+
/** 邮箱认证配置 */
|
|
91
|
+
email?: EmailAuthConfig;
|
|
92
|
+
/** 手机认证配置 */
|
|
93
|
+
phone?: PhoneAuthConfig;
|
|
94
|
+
/** 三方 OAuth 配置 */
|
|
95
|
+
oauth?: OAuthConfig;
|
|
96
|
+
/** UI 配置 */
|
|
97
|
+
ui?: UIConfig;
|
|
98
|
+
/** 默认认证方式 */
|
|
99
|
+
defaultAuthMethod?: AuthMethodType;
|
|
100
|
+
/** 默认状态(登录或注册) */
|
|
101
|
+
defaultState?: AuthState;
|
|
102
|
+
}
|
|
103
|
+
/** 登录表单数据 */
|
|
104
|
+
export interface LoginFormData {
|
|
105
|
+
/** 邮箱或手机号 */
|
|
106
|
+
account: string;
|
|
107
|
+
/** 密码 */
|
|
108
|
+
password?: string;
|
|
109
|
+
/** 验证码 */
|
|
110
|
+
verification_code?: string;
|
|
111
|
+
/** 记住我 */
|
|
112
|
+
remember_me?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** 注册表单数据 */
|
|
115
|
+
export interface RegisterFormData {
|
|
116
|
+
/** 邮箱或手机号 */
|
|
117
|
+
account: string;
|
|
118
|
+
/** 密码 */
|
|
119
|
+
password?: string;
|
|
120
|
+
/** 确认密码 */
|
|
121
|
+
confirm_password?: string;
|
|
122
|
+
/** 验证码 */
|
|
123
|
+
verification_code?: string;
|
|
124
|
+
/** 验证链接 token */
|
|
125
|
+
verification_token?: string;
|
|
126
|
+
}
|
|
127
|
+
/** 组件事件回调 */
|
|
128
|
+
export interface Login2Events {
|
|
129
|
+
/** 登录回调 */
|
|
130
|
+
onLogin?: (data: LoginFormData, method: AuthMethodType) => Promise<void> | void;
|
|
131
|
+
/** 注册回调 */
|
|
132
|
+
onRegister?: (data: RegisterFormData, method: AuthMethodType) => Promise<void> | void;
|
|
133
|
+
/** 三方登录回调 */
|
|
134
|
+
onOAuthLogin?: (provider: 'google' | 'facebook' | 'apple') => Promise<void> | void;
|
|
135
|
+
/** 发送验证码回调 */
|
|
136
|
+
onSendVerificationCode?: (account: string, type: 'email' | 'phone') => Promise<void> | void;
|
|
137
|
+
/** 忘记密码回调 */
|
|
138
|
+
onForgotPassword?: (account: string) => Promise<void> | void;
|
|
139
|
+
}
|
|
140
|
+
/** 组件完整属性 */
|
|
141
|
+
export interface Login2Props extends Login2Events {
|
|
142
|
+
/** 配置对象 */
|
|
143
|
+
config: Login2Config;
|
|
144
|
+
/** 是否显示 */
|
|
145
|
+
visible?: boolean;
|
|
146
|
+
/** 关闭回调 */
|
|
147
|
+
onClose?: () => void;
|
|
148
|
+
/** 自定义类名 */
|
|
149
|
+
className?: string;
|
|
150
|
+
/** 自定义样式 */
|
|
151
|
+
style?: React.CSSProperties;
|
|
152
|
+
}
|
|
153
|
+
/** 组件内部状态 */
|
|
154
|
+
export interface Login2State {
|
|
155
|
+
/** 当前状态:登录或注册 */
|
|
156
|
+
authState: AuthState;
|
|
157
|
+
/** 当前认证方式 */
|
|
158
|
+
currentAuthMethod: AuthMethodType;
|
|
159
|
+
/** 当前使用的验证方式 */
|
|
160
|
+
currentVerificationMethod: VerificationMethod;
|
|
161
|
+
/** 加载状态 */
|
|
162
|
+
loading: boolean;
|
|
163
|
+
/** 验证码倒计时 */
|
|
164
|
+
countdown: number;
|
|
165
|
+
/** 表单数据 */
|
|
166
|
+
formData: Partial<LoginFormData | RegisterFormData>;
|
|
167
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.32",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@use-gesture/react": "^10.3.1",
|
|
64
64
|
"@pisell/utils": "3.0.1",
|
|
65
65
|
"@pisell/materials": "6.3.8",
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
66
|
+
"@pisell/icon": "0.0.11",
|
|
67
|
+
"@pisell/date-picker": "3.0.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|