@pisell/private-materials 6.3.15 → 6.3.17
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 +150 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +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 +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/utils.js +1 -1
- package/es/components/pinModal/hooks.d.ts +7 -0
- package/es/components/pinModal/hooks.js +65 -0
- package/es/components/pinModal/index.d.ts +4 -0
- package/es/components/pinModal/index.js +98 -0
- package/es/components/pinModal/index.less +44 -0
- package/es/components/pinModal/locales.d.ts +27 -0
- package/es/components/pinModal/locales.js +26 -0
- package/es/components/pinModal/serve.d.ts +6 -0
- package/es/components/pinModal/serve.js +11 -0
- package/es/components/pinModal/types.d.ts +0 -0
- package/es/components/pinModal/types.js +0 -0
- package/es/components/pinVerifyModal/hooks.d.ts +7 -0
- package/es/components/pinVerifyModal/hooks.js +80 -0
- package/es/components/pinVerifyModal/index.d.ts +5 -0
- package/es/components/pinVerifyModal/index.js +218 -0
- package/es/components/pinVerifyModal/index.less +92 -0
- package/es/components/pinVerifyModal/locales.d.ts +24 -0
- package/es/components/pinVerifyModal/locales.js +23 -0
- package/es/components/pinVerifyModal/types.d.ts +33 -0
- package/es/components/pinVerifyModal/types.js +1 -0
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -0
- package/es/components/wallet/Detail/index.js +3 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +8 -3
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/walletList/index.js +20 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/useComponents.js +1 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/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 +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/utils.js +1 -1
- package/lib/components/pinModal/hooks.d.ts +7 -0
- package/lib/components/pinModal/hooks.js +85 -0
- package/lib/components/pinModal/index.d.ts +4 -0
- package/lib/components/pinModal/index.js +88 -0
- package/lib/components/pinModal/index.less +44 -0
- package/lib/components/pinModal/locales.d.ts +27 -0
- package/lib/components/pinModal/locales.js +50 -0
- package/lib/components/pinModal/serve.d.ts +6 -0
- package/lib/components/pinModal/serve.js +37 -0
- package/lib/components/pinModal/types.d.ts +0 -0
- package/lib/components/pinModal/types.js +0 -0
- package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
- package/lib/components/pinVerifyModal/hooks.js +93 -0
- package/lib/components/pinVerifyModal/index.d.ts +5 -0
- package/lib/components/pinVerifyModal/index.js +230 -0
- package/lib/components/pinVerifyModal/index.less +92 -0
- package/lib/components/pinVerifyModal/locales.d.ts +24 -0
- package/lib/components/pinVerifyModal/locales.js +47 -0
- package/lib/components/pinVerifyModal/types.d.ts +33 -0
- package/lib/components/pinVerifyModal/types.js +17 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -0
- package/lib/components/wallet/Detail/index.js +18 -5
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +3 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/walletList/index.js +19 -2
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/pin-modal/meta.ts +37 -0
- package/lowcode/pin-verify-modal/meta.ts +80 -0
- package/package.json +3 -3
@@ -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,5 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { FormState } from '../model';
|
1
3
|
export declare const walkInData: {
|
2
4
|
id: number;
|
3
5
|
nickname: string;
|
4
6
|
};
|
5
|
-
export declare const Provider: any, Context:
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
8
|
+
state: FormState;
|
9
|
+
} & {
|
10
|
+
dispatch: (params: {
|
11
|
+
type: string;
|
12
|
+
payload: any;
|
13
|
+
}) => void;
|
14
|
+
}>;
|
@@ -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) => Promise<any
|
247
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
export interface FormState {
|
2
3
|
amountSymbol: string;
|
3
4
|
apis: {
|
@@ -105,4 +106,11 @@ export declare const walkInData: {
|
|
105
106
|
id: number;
|
106
107
|
nickname: string;
|
107
108
|
};
|
108
|
-
export declare const Provider: any, Context:
|
109
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
110
|
+
state: FormState;
|
111
|
+
} & {
|
112
|
+
dispatch: (params: {
|
113
|
+
type: string;
|
114
|
+
payload: any;
|
115
|
+
}) => void;
|
116
|
+
}>;
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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
|
+
}>;
|
@@ -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: "page" | "success" | "print" | "fail" | "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: "page" | "success" | "print" | "fail" | "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<"loading" | "success" | "warn" | "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" | "tyro" | "windcave" | "payo" | "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: "loading" | "success" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
297
297
|
amount?: string | number | undefined;
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
|
-
eftpos?: "stripe" | "
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "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?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|
@@ -17,4 +17,6 @@ import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
17
17
|
import SubTotal from './subTotal';
|
18
18
|
import EditBookingModal from './booking/editBookingModal';
|
19
19
|
import StepController from './stepController';
|
20
|
-
|
20
|
+
import PinModal from './pinModal';
|
21
|
+
import PinVerifyModal from './pinVerifyModal';
|
22
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, };
|
package/lib/components/index.js
CHANGED
@@ -36,6 +36,8 @@ __export(components_exports, {
|
|
36
36
|
BookingNotes: () => import_notes.default,
|
37
37
|
EditBookingModal: () => import_editBookingModal.default,
|
38
38
|
Login: () => import_login.default,
|
39
|
+
PinModal: () => import_pinModal.default,
|
40
|
+
PinVerifyModal: () => import_pinVerifyModal.default,
|
39
41
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
40
42
|
ProductExtension: () => import_productExtension.default,
|
41
43
|
RuleSetting: () => import_ruleSetting.default,
|
@@ -69,6 +71,8 @@ var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerMo
|
|
69
71
|
var import_subTotal = __toESM(require("./subTotal"));
|
70
72
|
var import_editBookingModal = __toESM(require("./booking/editBookingModal"));
|
71
73
|
var import_stepController = __toESM(require("./stepController"));
|
74
|
+
var import_pinModal = __toESM(require("./pinModal"));
|
75
|
+
var import_pinVerifyModal = __toESM(require("./pinVerifyModal"));
|
72
76
|
// Annotate the CommonJS export names for ESM import in node:
|
73
77
|
0 && (module.exports = {
|
74
78
|
Booking,
|
@@ -78,6 +82,8 @@ var import_stepController = __toESM(require("./stepController"));
|
|
78
82
|
BookingNotes,
|
79
83
|
EditBookingModal,
|
80
84
|
Login,
|
85
|
+
PinModal,
|
86
|
+
PinVerifyModal,
|
81
87
|
PisellSelectCustomerModal,
|
82
88
|
ProductExtension,
|
83
89
|
RuleSetting,
|
@@ -11,6 +11,8 @@ export interface WalletPassListProps {
|
|
11
11
|
name: string;
|
12
12
|
};
|
13
13
|
onChangeDebounce?: boolean;
|
14
|
+
loading?: boolean;
|
15
|
+
onLoadingChange?: (loading: boolean) => void;
|
14
16
|
}
|
15
17
|
export declare type WalletPassListRef = {
|
16
18
|
init: (params: MachineCodeListParams, formatList?: (val: WalletPassDataType[]) => WalletPassDataType[]) => void;
|
@@ -37,16 +37,20 @@ var import_materials = require("@pisell/materials");
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
38
38
|
var import_ahooks = require("ahooks");
|
39
39
|
var import_icons = require("@ant-design/icons");
|
40
|
+
var import_pinVerifyModal = __toESM(require("../../../../pinVerifyModal"));
|
40
41
|
var import_MultiModeSearch = __toESM(require("./MultiModeSearch"));
|
41
42
|
var import_List = __toESM(require("./List"));
|
42
43
|
var import_serve = require("./serve");
|
43
44
|
var import_utils2 = require("./utils");
|
44
45
|
var import_utils3 = require("../../utils");
|
45
46
|
var import_index = require("./index.less");
|
47
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
46
48
|
var { Amount } = import_materials.PisellText;
|
47
49
|
var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
48
|
-
var _a;
|
50
|
+
var _a, _b, _c, _d, _e;
|
49
51
|
const { onWalletPassChange, walletPass, walletSetting } = props;
|
52
|
+
const context = (0, import_useEngineContext.default)();
|
53
|
+
const isWalletCode = (_d = (_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.businessUtils) == null ? void 0 : _c.getAppByModal) == null ? void 0 : _d.call(_c, "wallet");
|
50
54
|
const [currentWalletPass, setCurrentWalletPass] = (0, import_react.useState)(walletPass);
|
51
55
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
52
56
|
const [open, setOpen] = (0, import_react.useState)(false);
|
@@ -60,7 +64,8 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
60
64
|
});
|
61
65
|
const isAutoSelect = (0, import_react.useRef)(false);
|
62
66
|
const listRef = (0, import_react.useRef)(null);
|
63
|
-
const searchValRef = (0, import_react.useRef)(
|
67
|
+
const searchValRef = (0, import_react.useRef)(null);
|
68
|
+
const pinVerifyModalRef = (0, import_react.useRef)(null);
|
64
69
|
const { cards: walletPassSelectCards, amount } = currentWalletPass || {};
|
65
70
|
const [currentCustomerWalletPass, otherCustomerWalletPass] = (0, import_react.useMemo)(() => {
|
66
71
|
const current = [];
|
@@ -98,9 +103,9 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
98
103
|
return codes;
|
99
104
|
}, [addList, selectValue]);
|
100
105
|
const refreshList = (0, import_ahooks.useMemoizedFn)(() => {
|
101
|
-
var _a2,
|
106
|
+
var _a2, _b2;
|
102
107
|
if ((order == null ? void 0 : order.order_id) && (order == null ? void 0 : order.customer_id)) {
|
103
|
-
(
|
108
|
+
(_b2 = listRef.current) == null ? void 0 : _b2.init(
|
104
109
|
{
|
105
110
|
order_id: order.order_id,
|
106
111
|
available: 2,
|
@@ -146,52 +151,86 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
146
151
|
refreshList();
|
147
152
|
});
|
148
153
|
};
|
149
|
-
const searchList = async (
|
154
|
+
const searchList = async ({ code, customer_pin_key }, isSelectChange) => {
|
150
155
|
var _a2;
|
151
156
|
if (!(order == null ? void 0 : order.order_id)) return;
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
157
|
+
setLoading(true);
|
158
|
+
try {
|
159
|
+
const result = await (0, import_serve.searchMachineCodeList)({
|
160
|
+
order_id: order.order_id,
|
161
|
+
code,
|
162
|
+
prepare_payments,
|
163
|
+
// filter_prepare_wallet_pass: 1,
|
164
|
+
sale_channel: ((_a2 = order._order) == null ? void 0 : _a2.sale_channel) || "online-store",
|
165
|
+
customer_pin_key
|
166
|
+
});
|
167
|
+
if (!result) {
|
168
|
+
if (!isSelectChange) {
|
169
|
+
(0, import_materials.PisellToast)({
|
170
|
+
content: import_utils.locales.getText("tocPay.text.walletSearchEmpty")
|
171
|
+
});
|
172
|
+
}
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
if (isSelectChange && !searchValRef.current) {
|
176
|
+
return;
|
164
177
|
}
|
165
|
-
|
178
|
+
setSearchData(
|
179
|
+
(0, import_utils2.formatMachineCodeServer2CardList)(
|
180
|
+
[...searchSelectData.details, ...result],
|
181
|
+
searchSelectData.ids
|
182
|
+
)
|
183
|
+
);
|
184
|
+
if (result.length) {
|
185
|
+
if (result.length === 1 && result[0].unified_available_status && isAutoSelect.current) {
|
186
|
+
setSearchSelectData({
|
187
|
+
ids: [result[0].id],
|
188
|
+
details: result
|
189
|
+
});
|
190
|
+
}
|
191
|
+
setSearchOpen(true);
|
192
|
+
searchValRef.current = { code, customer_pin_key };
|
193
|
+
}
|
194
|
+
} finally {
|
195
|
+
setLoading(false);
|
166
196
|
}
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
if (result
|
175
|
-
|
176
|
-
|
177
|
-
details: result
|
178
|
-
});
|
197
|
+
};
|
198
|
+
const searchWalletCodeFn = async (val) => {
|
199
|
+
var _a2;
|
200
|
+
setLoading(true);
|
201
|
+
try {
|
202
|
+
const result = await (0, import_serve.searchWalletCode)({ code: val, with_customer: 1 });
|
203
|
+
console.log(result, "result");
|
204
|
+
if (!result) {
|
205
|
+
searchList({ code: val });
|
206
|
+
return;
|
179
207
|
}
|
180
|
-
|
181
|
-
|
208
|
+
(_a2 = pinVerifyModalRef.current) == null ? void 0 : _a2.open({
|
209
|
+
wallet_code: result.code,
|
210
|
+
wallet_detail_id: result.id,
|
211
|
+
failed_count: result.failed_count,
|
212
|
+
check_max_count: result.check_max_count,
|
213
|
+
customer: result.customer
|
214
|
+
});
|
215
|
+
} finally {
|
216
|
+
setLoading(false);
|
182
217
|
}
|
183
218
|
};
|
184
219
|
const handleSearch = (0, import_ahooks.useMemoizedFn)((val) => {
|
185
220
|
if (!val || searchOpen) return;
|
186
221
|
isAutoSelect.current = true;
|
187
|
-
|
222
|
+
if ((0, import_utils2.getIsWalletCode)(val) && isWalletCode) {
|
223
|
+
searchWalletCodeFn(val);
|
224
|
+
} else {
|
225
|
+
searchList({ code: val });
|
226
|
+
}
|
188
227
|
});
|
189
228
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
190
229
|
init
|
191
230
|
}));
|
192
231
|
const handleSearchModalClose = () => {
|
193
232
|
setSearchOpen(false);
|
194
|
-
searchValRef.current =
|
233
|
+
searchValRef.current = null;
|
195
234
|
setSearchSelectData({
|
196
235
|
ids: [],
|
197
236
|
details: []
|
@@ -309,7 +348,7 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
309
348
|
okText: import_utils.locales.getText("tocPay.text.select"),
|
310
349
|
onOk: handleSelectOk,
|
311
350
|
okButtonProps: {
|
312
|
-
disabled: ((
|
351
|
+
disabled: ((_e = searchSelectData.ids) == null ? void 0 : _e.length) === 0
|
313
352
|
}
|
314
353
|
},
|
315
354
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { marginTop: 24 } }, /* @__PURE__ */ import_react.default.createElement(
|
@@ -318,9 +357,18 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
318
357
|
walletSetting,
|
319
358
|
data: searchData,
|
320
359
|
value: searchSelectData.ids,
|
321
|
-
onChange: handleAddChange
|
360
|
+
onChange: handleAddChange,
|
361
|
+
loading
|
322
362
|
}
|
323
363
|
))
|
364
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
365
|
+
import_pinVerifyModal.default,
|
366
|
+
{
|
367
|
+
ref: pinVerifyModalRef,
|
368
|
+
onSuccess: (params) => {
|
369
|
+
searchList({ customer_pin_key: params == null ? void 0 : params.customer_pin_key });
|
370
|
+
}
|
371
|
+
}
|
324
372
|
));
|
325
373
|
});
|
326
374
|
var WalletPass_default = (0, import_react.memo)(WalletPass);
|
@@ -84,14 +84,15 @@ export declare const getRecommendMachineCodeList: (order_id: number) => Promise<
|
|
84
84
|
*/
|
85
85
|
export declare const searchMachineCodeList: (params: {
|
86
86
|
order_id: number | string;
|
87
|
-
code
|
87
|
+
code?: string;
|
88
88
|
sale_channel: string;
|
89
89
|
prepare_payments: {
|
90
90
|
voucher_id: number;
|
91
91
|
amount: number;
|
92
92
|
tag: string;
|
93
93
|
}[];
|
94
|
-
filter_prepare_wallet_pass
|
94
|
+
filter_prepare_wallet_pass?: 1 | 0;
|
95
|
+
customer_pin_key?: string;
|
95
96
|
}) => Promise<WalletPassDataType[]>;
|
96
97
|
/**
|
97
98
|
* walletpass支付
|
@@ -110,4 +111,39 @@ export declare const walletPassPay: (params: {
|
|
110
111
|
};
|
111
112
|
}[];
|
112
113
|
}) => Promise<WalletPassDataType[]>;
|
114
|
+
/**
|
115
|
+
* 搜索wallet code
|
116
|
+
*/
|
117
|
+
export declare const searchWalletCode: (params: {
|
118
|
+
code: string;
|
119
|
+
with_customer: 1 | 0;
|
120
|
+
}) => Promise<{
|
121
|
+
code: string;
|
122
|
+
id: number;
|
123
|
+
status: 'enable' | 'disable' | 'expired';
|
124
|
+
expired_at: string;
|
125
|
+
customer: Record<string, any>;
|
126
|
+
check_max_count: number;
|
127
|
+
failed_count: number;
|
128
|
+
}>;
|
129
|
+
/**
|
130
|
+
* 验证pin码
|
131
|
+
*/
|
132
|
+
export declare const verifyPinCode: (params: {
|
133
|
+
wallet_detail_id: number;
|
134
|
+
pin: string;
|
135
|
+
}) => Promise<{
|
136
|
+
status: number;
|
137
|
+
customer_id: number;
|
138
|
+
msg: string;
|
139
|
+
customer_pin_key: string;
|
140
|
+
}>;
|
141
|
+
/**
|
142
|
+
* 获取pin码
|
143
|
+
*/
|
144
|
+
export declare const getPin: (params: {
|
145
|
+
wallet_detail_id: number;
|
146
|
+
}) => Promise<{
|
147
|
+
pin: string;
|
148
|
+
}>;
|
113
149
|
export {};
|
@@ -20,8 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
20
20
|
var serve_exports = {};
|
21
21
|
__export(serve_exports, {
|
22
22
|
getMachineCodeList: () => getMachineCodeList,
|
23
|
+
getPin: () => getPin,
|
23
24
|
getRecommendMachineCodeList: () => getRecommendMachineCodeList,
|
24
25
|
searchMachineCodeList: () => searchMachineCodeList,
|
26
|
+
searchWalletCode: () => searchWalletCode,
|
27
|
+
verifyPinCode: () => verifyPinCode,
|
25
28
|
walletPassPay: () => walletPassPay
|
26
29
|
});
|
27
30
|
module.exports = __toCommonJS(serve_exports);
|
@@ -45,10 +48,25 @@ var walletPassPay = async (params) => {
|
|
45
48
|
const { data } = await import_utils.request.getRequest().post(`/h5/pay/order/wallet-pass-pay/${order_id}`, others);
|
46
49
|
return data;
|
47
50
|
};
|
51
|
+
var searchWalletCode = async (params) => {
|
52
|
+
const { data } = await import_utils.request.getRequest().post(`/h5/wallet/detail/search`, params);
|
53
|
+
return data;
|
54
|
+
};
|
55
|
+
var verifyPinCode = async (params) => {
|
56
|
+
const { data } = await import_utils.request.getRequest().post(`/h5/wallet/detail/pin/validate`, params);
|
57
|
+
return data;
|
58
|
+
};
|
59
|
+
var getPin = async (params) => {
|
60
|
+
const { data } = await import_utils.request.getRequest().get(`/h5/wallet/detail/pin`, params);
|
61
|
+
return data;
|
62
|
+
};
|
48
63
|
// Annotate the CommonJS export names for ESM import in node:
|
49
64
|
0 && (module.exports = {
|
50
65
|
getMachineCodeList,
|
66
|
+
getPin,
|
51
67
|
getRecommendMachineCodeList,
|
52
68
|
searchMachineCodeList,
|
69
|
+
searchWalletCode,
|
70
|
+
verifyPinCode,
|
53
71
|
walletPassPay
|
54
72
|
});
|
@@ -1,3 +1,9 @@
|
|
1
1
|
import { WalletPassDataType } from './serve';
|
2
2
|
export declare const formatMachineCodeServer2CardList: (data: WalletPassDataType[], selectId?: number[]) => any;
|
3
3
|
export declare const getDataByIds: (arr: any[], ids: number[]) => any[];
|
4
|
+
/**
|
5
|
+
* 判断是否是wallet code
|
6
|
+
* @param val
|
7
|
+
* @returns
|
8
|
+
*/
|
9
|
+
export declare const getIsWalletCode: (val: string) => boolean;
|
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
20
20
|
var utils_exports = {};
|
21
21
|
__export(utils_exports, {
|
22
22
|
formatMachineCodeServer2CardList: () => formatMachineCodeServer2CardList,
|
23
|
-
getDataByIds: () => getDataByIds
|
23
|
+
getDataByIds: () => getDataByIds,
|
24
|
+
getIsWalletCode: () => getIsWalletCode
|
24
25
|
});
|
25
26
|
module.exports = __toCommonJS(utils_exports);
|
26
27
|
var import_utils = require("@pisell/utils");
|
@@ -64,8 +65,12 @@ var formatMachineCodeServer2CardList = (data, selectId = []) => {
|
|
64
65
|
var getDataByIds = (arr, ids) => {
|
65
66
|
return arr.filter((item) => ids.includes(item.id));
|
66
67
|
};
|
68
|
+
var getIsWalletCode = (val) => {
|
69
|
+
return val.startsWith("WL") || val.startsWith("2") && val.length === 10;
|
70
|
+
};
|
67
71
|
// Annotate the CommonJS export names for ESM import in node:
|
68
72
|
0 && (module.exports = {
|
69
73
|
formatMachineCodeServer2CardList,
|
70
|
-
getDataByIds
|
74
|
+
getDataByIds,
|
75
|
+
getIsWalletCode
|
71
76
|
});
|