@pisell/private-materials 6.4.33 → 6.5.1
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 +5 -5
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +6 -6
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +7 -23
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/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/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +33 -23
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/es/components/checkout/components/ScrollableList/index.js +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.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/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toB/components/MX51/index.js +44 -14
- package/es/components/pay/toB/types/index.d.ts +12 -0
- package/es/components/pay/toB/types/index.js +4 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/index.js +5 -2
- package/es/components/ticketBooking/utils/index.d.ts +1 -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/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/printer.js +35 -0
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +7 -8
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/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/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +17 -7
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/lib/components/checkout/components/ScrollableList/index.js +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.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/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toB/components/MX51/index.js +37 -12
- package/lib/components/pay/toB/types/index.d.ts +12 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +8 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +11 -9
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- 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/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/printer.js +60 -0
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { forwardRef, useImperativeHandle } from 'react';
|
2
|
-
import { webPayment } from '@pisell/utils';
|
3
2
|
import useLogger from "../../../../../hooks/useLogger";
|
3
|
+
import useEngineContext from "../../../../../hooks/useEngineContext";
|
4
4
|
var getUuid = function getUuid() {
|
5
5
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxx'.replace(/[xy]/g, function (c) {
|
6
6
|
var r = Math.random() * 16 | 0;
|
@@ -9,7 +9,10 @@ var getUuid = function getUuid() {
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
var MX51 = function MX51(props, ref) {
|
12
|
+
var _context$appHelper;
|
12
13
|
var logger = useLogger();
|
14
|
+
var context = useEngineContext();
|
15
|
+
var action = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.action;
|
13
16
|
var onOpen = function onOpen(_ref) {
|
14
17
|
var data = _ref.data,
|
15
18
|
payCallback = _ref.payCallback;
|
@@ -33,20 +36,47 @@ var MX51 = function MX51(props, ref) {
|
|
33
36
|
params: newData
|
34
37
|
}
|
35
38
|
});
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
|
40
|
+
// 通过action调用mx51支付
|
41
|
+
action({
|
42
|
+
type: 'webpos.handleMX51Pay',
|
43
|
+
data: newData,
|
44
|
+
callback: function callback(res) {
|
45
|
+
var isSame = false;
|
46
|
+
if (res !== null && res !== void 0 && res.uniquePaymentNumber) {
|
47
|
+
// jsbridge调用场景结果
|
48
|
+
var _res = res;
|
49
|
+
// 判断是否是同一个支付
|
50
|
+
isSame = (_res === null || _res === void 0 ? void 0 : _res.uniquePaymentNumber) === uniquePaymentNumber;
|
51
|
+
if (isSame) {
|
52
|
+
payCallback === null || payCallback === void 0 || payCallback(_res);
|
53
|
+
}
|
54
|
+
} else {
|
55
|
+
var _res2$data, _res2$data2;
|
56
|
+
// 原生调用场景结果
|
57
|
+
var _res2 = res;
|
58
|
+
// 转换为MX51PayResult类型,上层调用需要
|
59
|
+
var newRes = {
|
60
|
+
result: (_res2 === null || _res2 === void 0 ? void 0 : _res2.code) == '200' ? true : false,
|
61
|
+
msg: _res2 === null || _res2 === void 0 ? void 0 : _res2.msg,
|
62
|
+
amount: _res2 === null || _res2 === void 0 || (_res2$data = _res2.data) === null || _res2$data === void 0 ? void 0 : _res2$data.amount,
|
63
|
+
surcharge: _res2 === null || _res2 === void 0 || (_res2$data2 = _res2.data) === null || _res2$data2 === void 0 ? void 0 : _res2$data2.surcharge,
|
64
|
+
uniquePaymentNumber: _res2 === null || _res2 === void 0 ? void 0 : _res2.uuid
|
65
|
+
};
|
66
|
+
// 判断是否是同一个支付
|
67
|
+
isSame = (_res2 === null || _res2 === void 0 ? void 0 : _res2.uuid) === uniquePaymentNumber;
|
68
|
+
if (isSame) {
|
69
|
+
payCallback === null || payCallback === void 0 || payCallback(newRes);
|
70
|
+
}
|
46
71
|
}
|
47
|
-
|
48
|
-
|
49
|
-
|
72
|
+
logger === null || logger === void 0 || logger.addLog({
|
73
|
+
type: 'info',
|
74
|
+
title: 'ToB_MX51_onOpen_callback',
|
75
|
+
metadata: {
|
76
|
+
msg: isSame ? '交易流水号一致' : '交易流水号不一致',
|
77
|
+
res: res
|
78
|
+
}
|
79
|
+
});
|
50
80
|
}
|
51
81
|
});
|
52
82
|
};
|
@@ -58,3 +58,15 @@ export interface MX51PayResult {
|
|
58
58
|
surcharge: number;
|
59
59
|
uniquePaymentNumber: string;
|
60
60
|
}
|
61
|
+
/**
|
62
|
+
* @title 原生MX51支付结果
|
63
|
+
*/
|
64
|
+
export interface NativeMX51PayResult {
|
65
|
+
code: string;
|
66
|
+
msg?: string;
|
67
|
+
data: {
|
68
|
+
amount: number;
|
69
|
+
surcharge: number;
|
70
|
+
};
|
71
|
+
uuid: string;
|
72
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
export interface FormState {
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
3
4
|
order: any;
|
@@ -28,4 +29,11 @@ export interface PayGroup {
|
|
28
29
|
pay_number?: string;
|
29
30
|
_order: any;
|
30
31
|
}
|
31
|
-
export declare const Provider: any, Context:
|
32
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
33
|
+
state: FormState;
|
34
|
+
} & {
|
35
|
+
dispatch: (params: {
|
36
|
+
type: string;
|
37
|
+
payload: any;
|
38
|
+
}) => void;
|
39
|
+
}>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
2
3
|
import dayjs from "dayjs";
|
3
4
|
export interface FormState {
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
68
69
|
};
|
69
70
|
setGlobalState: Function | null;
|
70
71
|
}
|
71
|
-
export declare const Provider: any, Context:
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
73
|
+
state: FormState;
|
74
|
+
} & {
|
75
|
+
dispatch: (params: {
|
76
|
+
type: string;
|
77
|
+
payload: any;
|
78
|
+
}) => void;
|
79
|
+
}>;
|
@@ -51,7 +51,8 @@ var AddSerivce = function AddSerivce(props) {
|
|
51
51
|
state = props.state,
|
52
52
|
dispatch = props.dispatch,
|
53
53
|
_props$renderMode = props.renderMode,
|
54
|
-
renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode
|
54
|
+
renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode,
|
55
|
+
onPrerenderComplete = props.onPrerenderComplete;
|
55
56
|
var context = useEngineContext();
|
56
57
|
var notAvailableRef = useRef(null);
|
57
58
|
var isLoadedServiceRef = useRef(false);
|
@@ -72,6 +73,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
72
73
|
setCurrentProduct = _useState2[1];
|
73
74
|
var stateRef = useRef(state);
|
74
75
|
stateRef.current = state;
|
76
|
+
var prerenderCompletedRef = useRef(false);
|
75
77
|
var _useProducts = useProducts(),
|
76
78
|
getProducts = _useProducts.getProducts,
|
77
79
|
products = _useProducts.products,
|
@@ -85,6 +87,12 @@ var AddSerivce = function AddSerivce(props) {
|
|
85
87
|
debounceTimersRef.current = {};
|
86
88
|
};
|
87
89
|
}, []);
|
90
|
+
useEffect(function () {
|
91
|
+
if (!loading && !prerenderCompletedRef.current) {
|
92
|
+
onPrerenderComplete === null || onPrerenderComplete === void 0 || onPrerenderComplete();
|
93
|
+
prerenderCompletedRef.current = true;
|
94
|
+
}
|
95
|
+
}, [loading]);
|
88
96
|
|
89
97
|
// 处理商品添加后的列表归位
|
90
98
|
useEffect(function () {
|
@@ -1,7 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
interface AddServiceVariantProps {
|
3
2
|
globalState: any;
|
4
3
|
setGlobalState: any;
|
4
|
+
onPrerenderComplete?: () => void;
|
5
5
|
}
|
6
6
|
declare const AddServiceVariant: (props: AddServiceVariantProps) => JSX.Element;
|
7
7
|
export default AddServiceVariant;
|
@@ -8,7 +8,8 @@ import React, { useRef } from 'react';
|
|
8
8
|
import AddService from "./addService";
|
9
9
|
var AddServiceVariant = function AddServiceVariant(props) {
|
10
10
|
var globalState = props.globalState,
|
11
|
-
setGlobalState = props.setGlobalState
|
11
|
+
setGlobalState = props.setGlobalState,
|
12
|
+
onPrerenderComplete = props.onPrerenderComplete;
|
12
13
|
var stateRef = useRef(globalState);
|
13
14
|
stateRef.current = globalState;
|
14
15
|
var dispatch = function dispatch(_ref) {
|
@@ -22,7 +23,8 @@ var AddServiceVariant = function AddServiceVariant(props) {
|
|
22
23
|
};
|
23
24
|
return /*#__PURE__*/React.createElement(AddService, {
|
24
25
|
state: globalState,
|
25
|
-
dispatch: dispatch
|
26
|
+
dispatch: dispatch,
|
27
|
+
onPrerenderComplete: onPrerenderComplete
|
26
28
|
});
|
27
29
|
};
|
28
30
|
export default AddServiceVariant;
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import './index.less';
|
2
2
|
export declare const _formatBookingDetail: (data: any, modalState: any) => any;
|
3
|
-
|
3
|
+
interface TicketBookingProps {
|
4
|
+
onPrerenderComplete?: () => void;
|
5
|
+
}
|
6
|
+
declare const TicketBooking: (props: TicketBookingProps) => JSX.Element;
|
4
7
|
export default TicketBooking;
|
@@ -217,8 +217,9 @@ var formatProductValues = function formatProductValues(data) {
|
|
217
217
|
});
|
218
218
|
});
|
219
219
|
};
|
220
|
-
var TicketBooking = function TicketBooking() {
|
220
|
+
var TicketBooking = function TicketBooking(props) {
|
221
221
|
var _engineContext$appHel2, _state$modalState2, _state$modalState4;
|
222
|
+
var onPrerenderComplete = props.onPrerenderComplete;
|
222
223
|
var _useStore = useStore(),
|
223
224
|
_useStore2 = _slicedToArray(_useStore, 2),
|
224
225
|
state = _useStore2[0],
|
@@ -1197,6 +1198,7 @@ var TicketBooking = function TicketBooking() {
|
|
1197
1198
|
}, /*#__PURE__*/React.createElement("div", {
|
1198
1199
|
className: "ticket-booking-left-panel-content"
|
1199
1200
|
}, /*#__PURE__*/React.createElement(AddServiceVariant, {
|
1201
|
+
onPrerenderComplete: onPrerenderComplete,
|
1200
1202
|
globalState: _objectSpread(_objectSpread({}, state.modalState), {}, {
|
1201
1203
|
amountSymbol: state.amountSymbol,
|
1202
1204
|
bookingConfig: state.bookingConfig,
|
@@ -3,6 +3,7 @@ interface TicketBookingProps {
|
|
3
3
|
productExtensionType: string[];
|
4
4
|
bookingConfigParams: Record<string, any>;
|
5
5
|
isShowMenuBar?: boolean;
|
6
|
+
onPrerenderComplete?: () => void;
|
6
7
|
}
|
7
8
|
declare const _default: (props: TicketBookingProps) => JSX.Element;
|
8
9
|
export default _default;
|
@@ -139,7 +139,8 @@ export default (function (props) {
|
|
139
139
|
var productExtensionType = props.productExtensionType,
|
140
140
|
bookingConfigParams = props.bookingConfigParams,
|
141
141
|
_props$isShowMenuBar = props.isShowMenuBar,
|
142
|
-
isShowMenuBar = _props$isShowMenuBar === void 0 ? true : _props$isShowMenuBar
|
142
|
+
isShowMenuBar = _props$isShowMenuBar === void 0 ? true : _props$isShowMenuBar,
|
143
|
+
onPrerenderComplete = props.onPrerenderComplete;
|
143
144
|
var storeRef = useRef(null);
|
144
145
|
var context = useEngineContext();
|
145
146
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
@@ -173,5 +174,7 @@ export default (function (props) {
|
|
173
174
|
className: "pisell-ticket-booking-wrapper"
|
174
175
|
}, isShowMenuBar && /*#__PURE__*/React.createElement(MenuBar, null), /*#__PURE__*/React.createElement(Provider, {
|
175
176
|
store: storeRef.current
|
176
|
-
}, /*#__PURE__*/React.createElement(TicketBooking,
|
177
|
+
}, /*#__PURE__*/React.createElement(TicketBooking, {
|
178
|
+
onPrerenderComplete: onPrerenderComplete
|
179
|
+
})));
|
177
180
|
});
|
@@ -41,7 +41,7 @@ declare type ScanData = {
|
|
41
41
|
};
|
42
42
|
};
|
43
43
|
export declare const formatScanCustomer: (data: ScanData) => {
|
44
|
-
searchType: "
|
44
|
+
searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
|
45
45
|
data: any;
|
46
46
|
scanCode: string;
|
47
47
|
} | null;
|
@@ -1 +1,13 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,14 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,13 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,29 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,13 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 {};
|