@pisell/private-materials 3.4.44 → 3.4.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +150 -164
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +1 -9
- 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/eftposPay/amount.d.ts +1 -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 +4 -4
- package/es/components/pay/toC/index.js +23 -20
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- 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/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/pro/Login2.0/AuthModal.d.ts +143 -0
- package/es/pro/Login2.0/AuthModal.js +630 -0
- package/es/pro/Login2.0/Login2.d.ts +61 -0
- package/es/pro/Login2.0/Login2.js +2235 -0
- package/es/pro/Login2.0/Register2.d.ts +65 -0
- package/es/pro/Login2.0/Register2.js +1501 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
- package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/es/pro/Login2.0/components/LegalTerms.js +51 -0
- package/es/pro/Login2.0/components/LegalTerms.less +74 -0
- package/es/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
- package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/es/pro/Login2.0/components/PhoneInput.js +414 -0
- package/es/pro/Login2.0/components/PhoneInput.less +148 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/Login2.0/components/phoneValidation.js +228 -0
- package/es/pro/Login2.0/hooks/index.d.ts +2 -0
- package/es/pro/Login2.0/hooks/index.js +1 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
- package/es/pro/Login2.0/index.js +8 -0
- package/es/pro/Login2.0/index.less +1002 -0
- package/es/pro/Login2.0/locales.d.ts +543 -0
- package/es/pro/Login2.0/locales.js +622 -0
- package/es/pro/Login2.0/shared/Header.d.ts +11 -0
- package/es/pro/Login2.0/shared/Header.js +42 -0
- package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
- package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/es/pro/Login2.0/shared/registerFlow.js +171 -0
- package/es/pro/Login2.0/shared/types.d.ts +232 -0
- package/es/pro/Login2.0/shared/types.js +1 -0
- package/es/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/es/pro/Login2.0/steps/CodeInput.js +209 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
- package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/es/pro/Login2.0/steps/SetPassword.js +148 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
- package/es/pro/Login2.0/steps/index.d.ts +19 -0
- package/es/pro/Login2.0/steps/index.js +11 -0
- package/es/pro/Login2.0/steps/steps.less +423 -0
- package/es/pro/Login2.0/types.d.ts +167 -0
- package/es/pro/Login2.0/types.js +1 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- 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/eftposPay/amount.d.ts +1 -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 +4 -4
- package/lib/components/pay/toC/index.js +9 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- 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/index.d.ts +1 -0
- package/lib/index.js +7 -0
- package/lib/pro/Login2.0/AuthModal.d.ts +143 -0
- package/lib/pro/Login2.0/AuthModal.js +503 -0
- package/lib/pro/Login2.0/Login2.d.ts +61 -0
- package/lib/pro/Login2.0/Login2.js +1544 -0
- package/lib/pro/Login2.0/Register2.d.ts +65 -0
- package/lib/pro/Login2.0/Register2.js +1062 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
- package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
- package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
- package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
- package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
- package/lib/pro/Login2.0/hooks/index.js +29 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
- package/lib/pro/Login2.0/index.js +45 -0
- package/lib/pro/Login2.0/index.less +1002 -0
- package/lib/pro/Login2.0/locales.d.ts +543 -0
- package/lib/pro/Login2.0/locales.js +646 -0
- package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
- package/lib/pro/Login2.0/shared/Header.js +81 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
- package/lib/pro/Login2.0/shared/types.d.ts +232 -0
- package/lib/pro/Login2.0/shared/types.js +17 -0
- package/lib/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
- package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
- package/lib/pro/Login2.0/steps/index.d.ts +19 -0
- package/lib/pro/Login2.0/steps/index.js +60 -0
- package/lib/pro/Login2.0/steps/steps.less +423 -0
- package/lib/pro/Login2.0/types.d.ts +167 -0
- package/lib/pro/Login2.0/types.js +17 -0
- package/lowcode/authmodal/meta.ts +395 -0
- package/lowcode/login2/CONFIG.md +447 -0
- package/lowcode/login2/TEST_CONFIG.md +324 -0
- package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
- package/lowcode/login2/meta.ts +560 -0
- package/lowcode/login2/snippets.ts +124 -0
- package/lowcode/register2/meta.ts +562 -0
- package/lowcode/register2/snippets.ts +257 -0
- package/package.json +5 -5
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
244
244
|
* @Author: WangHan
|
|
245
245
|
* @Date: 2024-12-24 11:32
|
|
246
246
|
*/
|
|
247
|
-
export declare const updateServicePrice: (state: any) => never[]
|
|
247
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -109,11 +108,4 @@ export declare const walkInData: {
|
|
|
109
108
|
id: number;
|
|
110
109
|
nickname: string;
|
|
111
110
|
};
|
|
112
|
-
export declare const Provider:
|
|
113
|
-
state: FormState;
|
|
114
|
-
} & {
|
|
115
|
-
dispatch: (params: {
|
|
116
|
-
type: string;
|
|
117
|
-
payload: any;
|
|
118
|
-
}) => void;
|
|
119
|
-
}>;
|
|
111
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number |
|
|
168
|
+
}) => number | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
};
|
|
171
|
+
} | "flexible";
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "
|
|
11
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "
|
|
13
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "success" | "warn" | "loading" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -261,7 +261,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
261
261
|
*/
|
|
262
262
|
var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
|
|
263
263
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order) {
|
|
264
|
-
var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass;
|
|
264
|
+
var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass, withCustomerIdList;
|
|
265
265
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
266
266
|
while (1) switch (_context3.prev = _context3.next) {
|
|
267
267
|
case 0:
|
|
@@ -284,10 +284,13 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
284
284
|
_ref4 = data || {}, _ref4$remain_amount = _ref4.remain_amount, remain_amount = _ref4$remain_amount === void 0 ? 0 : _ref4$remain_amount, wallet_pass_recommend_list = _ref4.wallet_pass_recommend_list, wallet_pass_amount = _ref4.wallet_pass_amount, payment_list = _ref4.payment_list, walletPass = _ref4.walletPass; // 记录获取到的数据
|
|
285
285
|
paymentLogger.addLog({
|
|
286
286
|
key: '支付数据获取',
|
|
287
|
-
value:
|
|
287
|
+
value: ''
|
|
288
288
|
});
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
withCustomerIdList = (wallet_pass_recommend_list || []).map(function (item) {
|
|
290
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
291
|
+
customer_id: customer_id || item.customer_id
|
|
292
|
+
});
|
|
293
|
+
}); // 设置交易组
|
|
291
294
|
dispatch({
|
|
292
295
|
type: 'setPayGroup',
|
|
293
296
|
payload: {
|
|
@@ -300,7 +303,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
300
303
|
// 支付方式没有walletPass时walletPass设置null
|
|
301
304
|
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
|
|
302
305
|
amount: wallet_pass_amount,
|
|
303
|
-
cards:
|
|
306
|
+
cards: withCustomerIdList
|
|
304
307
|
}) : null,
|
|
305
308
|
total_amount: order === null || order === void 0 ? void 0 : order.amount,
|
|
306
309
|
wait_amount: remain_amount
|
|
@@ -308,9 +311,9 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
308
311
|
});
|
|
309
312
|
|
|
310
313
|
// 初始化支付列表
|
|
311
|
-
_context3.next =
|
|
314
|
+
_context3.next = 11;
|
|
312
315
|
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list);
|
|
313
|
-
case
|
|
316
|
+
case 11:
|
|
314
317
|
// 解除loading
|
|
315
318
|
setTimeout(function () {
|
|
316
319
|
setLoading(false);
|
|
@@ -319,12 +322,12 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
319
322
|
// 记录获取支付列表成功
|
|
320
323
|
paymentLogger.addLog({
|
|
321
324
|
key: '获取支付列表成功',
|
|
322
|
-
value:
|
|
325
|
+
value: ''
|
|
323
326
|
});
|
|
324
|
-
_context3.next =
|
|
327
|
+
_context3.next = 21;
|
|
325
328
|
break;
|
|
326
|
-
case
|
|
327
|
-
_context3.prev =
|
|
329
|
+
case 15:
|
|
330
|
+
_context3.prev = 15;
|
|
328
331
|
_context3.t0 = _context3["catch"](1);
|
|
329
332
|
console.log('err', _context3.t0);
|
|
330
333
|
|
|
@@ -347,11 +350,11 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
347
350
|
fn: '_getPaymentsAndWalletPass'
|
|
348
351
|
}
|
|
349
352
|
});
|
|
350
|
-
case
|
|
353
|
+
case 21:
|
|
351
354
|
case "end":
|
|
352
355
|
return _context3.stop();
|
|
353
356
|
}
|
|
354
|
-
}, _callee3, null, [[1,
|
|
357
|
+
}, _callee3, null, [[1, 15]]);
|
|
355
358
|
}));
|
|
356
359
|
return function _getPaymentsAndWalletPass(_x3) {
|
|
357
360
|
return _ref3.apply(this, arguments);
|
|
@@ -378,7 +381,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
378
381
|
currentPayGroup = payGroup || state.payGroup; // 记录开始处理支付
|
|
379
382
|
paymentLogger.addLog({
|
|
380
383
|
key: '开始支付处理',
|
|
381
|
-
value:
|
|
384
|
+
value: ''
|
|
382
385
|
});
|
|
383
386
|
_context4.prev = 3;
|
|
384
387
|
// 打开loading
|
|
@@ -394,7 +397,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
394
397
|
// 记录支付方法调用成功
|
|
395
398
|
paymentLogger.addLog({
|
|
396
399
|
key: '支付方法调用成功',
|
|
397
|
-
value:
|
|
400
|
+
value: ''
|
|
398
401
|
});
|
|
399
402
|
paymentLogger.sendLogs('支付方法调用成功');
|
|
400
403
|
|
|
@@ -450,7 +453,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
450
453
|
orderId = newOrderId || ((_state$payGroup4 = state.payGroup) === null || _state$payGroup4 === void 0 ? void 0 : _state$payGroup4.order_id); // 记录开始创建交易组
|
|
451
454
|
paymentLogger.addLog({
|
|
452
455
|
key: '开始创建交易组',
|
|
453
|
-
value:
|
|
456
|
+
value: ''
|
|
454
457
|
});
|
|
455
458
|
setSubmitLoading(true);
|
|
456
459
|
_context5.prev = 3;
|
|
@@ -475,7 +478,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
475
478
|
// 记录创建交易组成功
|
|
476
479
|
paymentLogger.addLog({
|
|
477
480
|
key: '创建交易组成功',
|
|
478
|
-
value:
|
|
481
|
+
value: ''
|
|
479
482
|
});
|
|
480
483
|
return _context5.abrupt("return", _objectSpread(_objectSpread({}, state.payGroup), {}, {
|
|
481
484
|
order_id: orderId,
|
|
@@ -625,7 +628,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
625
628
|
}
|
|
626
629
|
paymentLogger.addLog({
|
|
627
630
|
key: '无痕模式检测',
|
|
628
|
-
value:
|
|
631
|
+
value: ''
|
|
629
632
|
});
|
|
630
633
|
setShowDetectIncognitoConfirm(true);
|
|
631
634
|
return _context7.abrupt("return");
|
|
@@ -636,7 +639,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
636
639
|
}
|
|
637
640
|
paymentLogger.addLog({
|
|
638
641
|
key: '需要创建交易组',
|
|
639
|
-
value:
|
|
642
|
+
value: ''
|
|
640
643
|
});
|
|
641
644
|
_context7.next = 14;
|
|
642
645
|
return paymentInit(newOrderId);
|
|
@@ -653,7 +656,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
653
656
|
// 记录提交成功(这里是调用成功,实际支付结果在payCallback中处理)
|
|
654
657
|
paymentLogger.addLog({
|
|
655
658
|
key: '支付提交调用成功',
|
|
656
|
-
value:
|
|
659
|
+
value: ''
|
|
657
660
|
});
|
|
658
661
|
_context7.next = 25;
|
|
659
662
|
break;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
addWalletCard: any;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
walletDetailState: 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,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
-
state: RechargeState;
|
|
8
|
-
} & {
|
|
9
|
-
dispatch: (params: {
|
|
10
|
-
type: string;
|
|
11
|
-
payload: any;
|
|
12
|
-
}) => void;
|
|
13
|
-
}>;
|
|
14
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
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,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;
|
package/es/index.d.ts
CHANGED
|
@@ -54,3 +54,4 @@ export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthCo
|
|
|
54
54
|
export type { SaaSAdminAuthProps, OrgAdminAuthProps, DeviceAuthProps, POSOperatorAuthProps, CustomerOAuthConfigProps } from './components/authentication/admin';
|
|
55
55
|
export { default as ContactInfo } from './plus/contactInfo';
|
|
56
56
|
export { default as ContactInfoModal } from './plus/contactInfoModal';
|
|
57
|
+
export { Login2, Register2, AuthModal } from './pro/Login2.0';
|
package/es/index.js
CHANGED
|
@@ -56,4 +56,5 @@ export { default as PinModal } from "./components/pinModal";
|
|
|
56
56
|
export { default as PinVerifyModal } from "./components/pinVerifyModal";
|
|
57
57
|
export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./components/authentication/admin";
|
|
58
58
|
export { default as ContactInfo } from "./plus/contactInfo";
|
|
59
|
-
export { default as ContactInfoModal } from "./plus/contactInfoModal";
|
|
59
|
+
export { default as ContactInfoModal } from "./plus/contactInfoModal";
|
|
60
|
+
export { Login2, Register2, AuthModal } from "./pro/Login2.0";
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AuthMethodType, LoginFormData, RegisterFormData, LegalTermsConfig } from './shared/types';
|
|
3
|
+
/** 认证配置 - 基于用户提供的JSON配置结构 */
|
|
4
|
+
export interface AuthConfig {
|
|
5
|
+
/** 认证配置 */
|
|
6
|
+
auth: {
|
|
7
|
+
/** 认证模式 */
|
|
8
|
+
mode: 'custom';
|
|
9
|
+
/** 认证方法配置 */
|
|
10
|
+
method: {
|
|
11
|
+
/** 手机认证配置 */
|
|
12
|
+
phone?: {
|
|
13
|
+
sort: number;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
setting: {
|
|
16
|
+
register_enabled: boolean;
|
|
17
|
+
register_method: 'code';
|
|
18
|
+
login_method: {
|
|
19
|
+
password?: {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
sort: number;
|
|
22
|
+
};
|
|
23
|
+
code?: {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
sort: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/** 邮箱认证配置 */
|
|
31
|
+
email?: {
|
|
32
|
+
sort: number;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
setting: {
|
|
35
|
+
register_enabled: boolean;
|
|
36
|
+
register_method: 'code' | 'link';
|
|
37
|
+
login_method: {
|
|
38
|
+
password?: {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
sort: number;
|
|
41
|
+
};
|
|
42
|
+
link?: {
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
sort: number;
|
|
45
|
+
};
|
|
46
|
+
code?: {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
sort: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/** Facebook 认证配置 */
|
|
54
|
+
facebook?: {
|
|
55
|
+
sort: number;
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
setting: {
|
|
58
|
+
appid: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/** Apple 认证配置 */
|
|
62
|
+
apple?: {
|
|
63
|
+
sort: number;
|
|
64
|
+
enabled: boolean;
|
|
65
|
+
setting: {
|
|
66
|
+
identifier: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/** Google 认证配置 */
|
|
70
|
+
google?: {
|
|
71
|
+
sort: number;
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
setting: {
|
|
74
|
+
clientId: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/** Guest 登录配置 */
|
|
78
|
+
guest?: {
|
|
79
|
+
sort: number;
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
password?: {
|
|
84
|
+
min_length: 8;
|
|
85
|
+
require_lowercase_letters: false;
|
|
86
|
+
require_numbers: false;
|
|
87
|
+
require_special_characters: false;
|
|
88
|
+
require_uppercase_letters: false;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/** 页面配置 */
|
|
92
|
+
page: {
|
|
93
|
+
/** 登录页配置 */
|
|
94
|
+
login: {
|
|
95
|
+
terms: LegalTermsConfig['terms'];
|
|
96
|
+
same_as_register: boolean;
|
|
97
|
+
background_image_url?: string | null;
|
|
98
|
+
};
|
|
99
|
+
/** 注册页配置 */
|
|
100
|
+
register: {
|
|
101
|
+
terms: LegalTermsConfig['terms'];
|
|
102
|
+
background_image_url?: string | null;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
/** logo */
|
|
106
|
+
logo: string | null;
|
|
107
|
+
/** 是否邮箱链接注册 */
|
|
108
|
+
isEmailLinkRegister: boolean;
|
|
109
|
+
/** 是否是邮件链接修改密码 */
|
|
110
|
+
isForGetPasswordLink: boolean;
|
|
111
|
+
/** 邮箱链接注册url 上的编码 */
|
|
112
|
+
linkCode: string;
|
|
113
|
+
}
|
|
114
|
+
/** AuthModal 组件事件 */
|
|
115
|
+
export interface AuthModalEvents {
|
|
116
|
+
/** 登录成功回调 */
|
|
117
|
+
onLoginSuccess?: (data: LoginFormData, method: AuthMethodType, channel?: string) => Promise<void> | void;
|
|
118
|
+
/** 注册成功回调 */
|
|
119
|
+
onRegisterSuccess?: (data: RegisterFormData, method: AuthMethodType, channel?: string) => Promise<void> | void;
|
|
120
|
+
/** 三方登录回调 */
|
|
121
|
+
onOAuthLogin?: (provider: 'google' | 'facebook' | 'apple', channel?: string) => Promise<void> | void;
|
|
122
|
+
/** 发送验证码回调 */
|
|
123
|
+
onSendVerificationCode?: (account: string, type: 'email' | 'phone', channel?: string) => Promise<void> | void;
|
|
124
|
+
/** 忘记密码回调 */
|
|
125
|
+
onForgotPassword?: (account: string, channel?: string) => Promise<void> | void;
|
|
126
|
+
/** 邮件链接过期回调 */
|
|
127
|
+
onEmailLinkExpired?: () => void;
|
|
128
|
+
/** 错误处理回调 */
|
|
129
|
+
onError?: (error: any, context?: {
|
|
130
|
+
action: 'login' | 'register';
|
|
131
|
+
method?: AuthMethodType;
|
|
132
|
+
channel?: string;
|
|
133
|
+
}) => void;
|
|
134
|
+
}
|
|
135
|
+
/** AuthModal 组件属性 */
|
|
136
|
+
export interface AuthModalProps {
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* 认证模态框组件
|
|
140
|
+
* 包装 Login2 和 Register2 组件,提供统一的配置接口和页面切换功能
|
|
141
|
+
*/
|
|
142
|
+
declare const AuthModal: React.FC<AuthModalProps>;
|
|
143
|
+
export default AuthModal;
|