@pisell/private-materials 6.3.14 → 6.4.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 +9 -1
- package/build/lowcode/preview.js +145 -145
- 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/Sales/Cart/index.js +1 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/booking/addons/index.js +4 -1
- package/es/components/booking/components/actionButtons/index.d.ts +31 -0
- package/es/components/booking/components/actionButtons/index.js +545 -0
- package/es/components/booking/components/actionButtons/index.less +215 -0
- package/es/components/booking/components/clearCartModal/index.d.ts +10 -0
- package/es/components/booking/components/clearCartModal/index.js +50 -0
- package/es/components/booking/components/clearCartModal/index.less +109 -0
- package/es/components/booking/components/customiseItemModal/index.d.ts +28 -0
- package/es/components/booking/components/customiseItemModal/index.js +298 -0
- package/es/components/booking/components/customiseItemModal/index.less +606 -0
- package/es/components/booking/components/footer/amount.d.ts +11 -3
- package/es/components/booking/components/footer/amount.js +556 -173
- package/es/components/booking/components/footer/index.js +659 -240
- package/es/components/booking/components/footer/index.less +26 -2
- package/es/components/booking/components/footer/utils.js +99 -43
- package/es/components/booking/components/tabPane/index.d.ts +2 -2
- package/es/components/booking/components/tabPane/index.js +77 -10
- package/es/components/booking/components/tabPane/index.less +78 -4
- package/es/components/booking/components/voucher/index.js +53 -22
- package/es/components/booking/components/voucher/index.less +1 -1
- package/es/components/booking/components/voucherModal/index.d.ts +19 -0
- package/es/components/booking/components/voucherModal/index.js +47 -0
- package/es/components/booking/components/voucherModal/index.less +23 -0
- package/es/components/booking/dashboard/index.d.ts +1 -1
- package/es/components/booking/dashboard/index.js +10 -3
- package/es/components/booking/deposit/ClientItem/index.js +1 -1
- package/es/components/booking/deposit/DepositItem/index.js +1 -1
- package/es/components/booking/deposit/index.js +45 -2
- package/es/components/booking/forms/forms.js +1 -1
- package/es/components/booking/hooks/useIsBooking4Shop.js +2 -2
- package/es/components/booking/hooks/useQuotation.js +17 -7
- package/es/components/booking/info/addServiceVariant/index.js +2 -2
- package/es/components/booking/info/client/index.js +2 -2
- package/es/components/booking/info/clientVariant/utils.d.ts +2 -0
- package/es/components/booking/info/clientVariant/utils.js +7 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +3 -2
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +13 -12
- package/es/components/booking/info/index.js +4 -3
- package/es/components/booking/info/index.less +19 -3
- package/es/components/booking/info/main.js +14 -15
- package/es/components/booking/info/pet/index.less +1 -1
- package/es/components/booking/info/service/Lists.js +10 -3
- package/es/components/booking/info/service/addService/index.js +2 -2
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/index.js +6 -1
- package/es/components/booking/info/service/index.less +1 -1
- package/es/components/booking/info/service/serviceItem/index.js +2 -2
- package/es/components/booking/info/service/serviceList/index.js +4 -0
- package/es/components/booking/info/service/serviceManager/index.js +5 -2
- package/es/components/booking/info/service2/Lists.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +4 -0
- package/es/components/booking/info/service2/utils.js +39 -19
- package/es/components/booking/info2/cartClientCard/index.d.ts +6 -0
- package/es/components/booking/info2/cartClientCard/index.js +394 -0
- package/es/components/booking/info2/cartClientCard/index.less +6 -0
- package/es/components/booking/info2/cartClientCard/locales.d.ts +21 -0
- package/es/components/booking/info2/cartClientCard/locales.js +26 -0
- package/es/components/booking/info2/cartClientCard/types.d.ts +18 -0
- package/es/components/booking/info2/cartClientCard/types.js +1 -0
- package/es/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/es/components/booking/info2/cartClientCard/utils.js +7 -0
- package/es/components/booking/info2/index.js +40 -18
- package/es/components/booking/info2/service/addService/index.js +4 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -2
- package/es/components/booking/info2/service/addTimeModal/index.js +5 -6
- package/es/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/es/components/booking/info2/service/editNormalService/index.js +67 -0
- package/es/components/booking/info2/service/editService/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +114 -30
- package/es/components/booking/info2/service/editService/index.less +47 -11
- package/es/components/booking/info2/service/index.js +11 -6
- package/es/components/booking/info2/service/serviceItem/index.js +2 -2
- package/es/components/booking/info2/service/serviceList/index.js +4 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +26 -3
- package/es/components/booking/locales.d.ts +78 -0
- package/es/components/booking/locales.js +106 -4
- package/es/components/booking/notes/addNote/index.d.ts +1 -1
- package/es/components/booking/notes/addNote/index.js +52 -32
- package/es/components/booking/notes/addNote/index.less +53 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.d.ts +28 -0
- package/es/components/checkout/PaymentModal.js +2015 -0
- package/es/components/checkout/PaymentPlugin.d.ts +2 -0
- package/es/components/checkout/PaymentPlugin.js +199 -0
- package/es/components/checkout/PaymentProvider.d.ts +13 -0
- package/es/components/checkout/PaymentProvider.js +66 -0
- package/es/components/checkout/components/AdditionalModule/index.d.ts +13 -0
- package/es/components/checkout/components/AdditionalModule/index.js +173 -0
- package/es/components/checkout/components/AdditionalModule/index.less +181 -0
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +33 -0
- package/es/components/checkout/components/AdditionalModule/locales.js +32 -0
- package/es/components/checkout/components/AmountSummary/index.d.ts +25 -0
- package/es/components/checkout/components/AmountSummary/index.js +691 -0
- package/es/components/checkout/components/AmountSummary/index.less +470 -0
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +20 -0
- package/es/components/checkout/components/CashPaymentModule/index.js +275 -0
- package/es/components/checkout/components/CashPaymentModule/index.less +320 -0
- package/es/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/es/components/checkout/components/PaymentDetailModal/index.js +411 -0
- package/es/components/checkout/components/PaymentDetailModal/index.less +472 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +16 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +189 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.less +255 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +48 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +163 -0
- package/es/components/checkout/components/PaymentResultToast/index.d.ts +8 -0
- package/es/components/checkout/components/PaymentResultToast/index.js +241 -0
- package/es/components/checkout/components/PaymentResultToast/index.less +343 -0
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +57 -0
- package/es/components/checkout/components/PaymentResultToast/types.js +1 -0
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +18 -0
- package/es/components/checkout/components/PaymentResultToast/utils.js +35 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.d.ts +17 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.js +188 -0
- package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/es/components/checkout/components/ScrollableList/index.js +260 -0
- package/es/components/checkout/components/ScrollableList/index.less +93 -0
- package/es/components/checkout/components/ScrollableList/types.d.ts +53 -0
- package/es/components/checkout/components/ScrollableList/types.js +1 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +14 -0
- package/es/components/checkout/components/SearchAndClientModule/index.js +218 -0
- package/es/components/checkout/components/SearchAndClientModule/index.less +18 -0
- package/es/components/checkout/components/SendPaymentLinkModal/index.d.ts +12 -0
- package/es/components/checkout/components/SendPaymentLinkModal/index.js +143 -0
- package/es/components/checkout/components/SendPaymentLinkModal/index.less +471 -0
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +10 -0
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.js +270 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/DiscountTextMode.d.ts +7 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/DiscountTextMode.js +22 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +11 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.js +94 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.less +45 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletModal/index.d.ts +5 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletModal/index.js +65 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletModal/index.less +25 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassCardDisplay/index.d.ts +5 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassCardDisplay/index.js +114 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassCardDisplay/index.less +11 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.d.ts +5 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +48 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.less +64 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassTextMode/index.d.ts +5 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassTextMode/index.js +23 -0
- package/es/components/checkout/components/WalletPassModule/components/WalletPassTextMode/index.less +31 -0
- package/es/components/checkout/components/WalletPassModule/index.d.ts +5 -0
- package/es/components/checkout/components/WalletPassModule/index.js +185 -0
- package/es/components/checkout/components/WalletPassModule/index.less +15 -0
- package/es/components/checkout/components/WalletPassModule/types.d.ts +133 -0
- package/es/components/checkout/components/WalletPassModule/types.js +1 -0
- package/es/components/checkout/components/WalletPassModule/utils.d.ts +23 -0
- package/es/components/checkout/components/WalletPassModule/utils.js +132 -0
- package/es/components/checkout/constants.d.ts +2 -0
- package/es/components/checkout/constants.js +9 -0
- package/es/components/checkout/export.d.ts +9 -0
- package/es/components/checkout/export.js +16 -0
- package/es/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
- package/es/components/checkout/hooks/usePaymentLogger.js +51 -0
- package/es/components/checkout/hooks/useWalletPass.d.ts +39 -0
- package/es/components/checkout/hooks/useWalletPass.js +893 -0
- package/es/components/checkout/index.d.ts +5 -0
- package/es/components/checkout/index.js +5 -0
- package/es/components/checkout/index.less +100 -0
- package/es/components/checkout/locales.d.ts +450 -0
- package/es/components/checkout/locales.js +593 -0
- package/es/components/checkout/payment-modal-utils.d.ts +30 -0
- package/es/components/checkout/payment-modal-utils.js +135 -0
- package/es/components/checkout/styles.d.ts +67 -0
- package/es/components/checkout/styles.js +75 -0
- package/es/components/checkout/types.d.ts +129 -0
- package/es/components/checkout/types.js +1 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +33 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +190 -0
- package/es/components/checkout/utils.d.ts +1 -0
- package/es/components/checkout/utils.js +35 -0
- package/es/components/eftposPay/EFTPos.d.ts +13 -0
- package/es/components/eftposPay/EFTPos.js +589 -0
- package/es/components/eftposPay/app.js +3 -1
- package/es/components/eftposPay/const.d.ts +5 -0
- package/es/components/eftposPay/device.d.ts +3 -1
- package/es/components/eftposPay/device.js +5 -3
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.js +2 -1
- package/es/components/eftposPay/serve.d.ts +16 -0
- package/es/components/eftposPay/serve.js +261 -0
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +8 -8
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +4 -4
- package/es/components/pay/toB/components/Cache/index.d.ts +10 -0
- package/es/components/pay/toB/components/Cache/index.js +94 -0
- package/es/components/pay/toB/components/Cache/index.less +41 -0
- package/es/components/pay/toB/components/Card/index.d.ts +7 -0
- package/es/components/pay/toB/components/Card/index.js +32 -0
- package/es/components/pay/toB/components/Card/index.less +26 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +7 -0
- package/es/components/pay/toB/components/CardGroup/index.js +22 -0
- package/es/components/pay/toB/components/CardGroup/index.less +18 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +6 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.js +67 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.less +69 -0
- package/es/components/pay/toB/components/Content/Footer.d.ts +7 -0
- package/es/components/pay/toB/components/Content/Footer.js +36 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +4 -0
- package/es/components/pay/toB/components/Content/Header.js +12 -0
- package/es/components/pay/toB/components/Content/index.d.ts +4 -0
- package/es/components/pay/toB/components/Content/index.js +260 -0
- package/es/components/pay/toB/components/Content/index.less +9 -0
- package/es/components/pay/toB/components/Content/utils.d.ts +16 -0
- package/es/components/pay/toB/components/Content/utils.js +76 -0
- package/es/components/pay/toB/components/EFTPOS/index.d.ts +7 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +266 -0
- package/es/components/pay/toB/components/EFTPOS/index.less +20 -0
- package/es/components/pay/toB/components/MX51/index.d.ts +3 -0
- package/es/components/pay/toB/components/MX51/index.js +60 -0
- package/es/components/pay/toB/components/index.d.ts +5 -0
- package/es/components/pay/toB/components/index.js +5 -0
- package/es/components/pay/toB/hooks.d.ts +12 -0
- package/es/components/pay/toB/hooks.js +30 -0
- package/es/components/pay/toB/index.d.ts +3 -0
- package/es/components/pay/toB/index.js +24 -0
- package/es/components/pay/toB/locales.d.ts +54 -0
- package/es/components/pay/toB/locales.js +65 -0
- package/es/components/pay/toB/paymentMethods/index.d.ts +10 -0
- package/es/components/pay/toB/paymentMethods/index.js +98 -0
- package/es/components/pay/toB/store/context.d.ts +3 -0
- package/es/components/pay/toB/store/context.js +2 -0
- package/es/components/pay/toB/store/hooks.d.ts +15 -0
- package/es/components/pay/toB/store/hooks.js +89 -0
- package/es/components/pay/toB/store/index.d.ts +3 -0
- package/es/components/pay/toB/store/index.js +3 -0
- package/es/components/pay/toB/store/provider.d.ts +4 -0
- package/es/components/pay/toB/store/provider.js +78 -0
- package/es/components/pay/toB/store/utils.d.ts +13 -0
- package/es/components/pay/toB/store/utils.js +66 -0
- package/es/components/pay/toB/types/index.d.ts +60 -0
- package/es/components/pay/toB/types/index.js +14 -0
- package/es/components/pay/toB/types/storeTypes.d.ts +143 -0
- package/es/components/pay/toB/types/storeTypes.js +24 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +52 -6
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +58 -8
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +74 -12
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +73 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +93 -11
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +46 -7
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +64 -13
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -8
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +4 -4
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +4 -4
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +3 -3
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +3 -3
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +68 -17
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +86 -14
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +89 -15
- package/es/components/pay/toC/index.js +278 -118
- package/es/components/productSelect/components/TabProduct/index.js +7 -2
- package/es/components/productSelect/components/pisellPriceText/index.js +3 -2
- package/es/components/productSelect/components/productGroup/index.js +23 -6
- package/es/components/productSelect/components/productGroup/index.less +17 -0
- package/es/components/shoppingCart/components/Cart/Product.js +48 -7
- package/es/components/shoppingCart/components/Cart/index.less +15 -1
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/subTotal/index.less +1 -1
- package/es/components/subTotal/locales.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +182 -230
- package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +8 -0
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +191 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +7 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +12 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.d.ts +9 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +14 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/es/components/ticketBooking/components/floatButtons/index.d.ts +11 -0
- package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
- package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/es/components/ticketBooking/components/menuBar/index.js +12 -3
- package/es/components/ticketBooking/components/ticketBooking/index.js +335 -77
- package/es/components/ticketBooking/components/ticketBooking/index.less +29 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +24 -17
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +1 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +3 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +252 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +12 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +2 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanManager.js +23 -0
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/index.js +25 -5
- package/es/components/ticketBooking/index.less +1 -1
- package/es/components/ticketBooking/locales.d.ts +9 -3
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/serve.d.ts +1 -0
- package/es/components/ticketBooking/serve.js +37 -11
- package/es/components/ticketBooking/utils/index.d.ts +39 -2
- package/es/components/ticketBooking/utils/index.js +109 -12
- package/es/components/walletList/index.js +1 -3
- package/es/hooks/index.d.ts +10 -0
- package/es/hooks/index.js +12 -0
- package/es/hooks/useEngineContext.d.ts +1 -8
- package/es/hooks/useEngineContext.js +4 -1
- package/es/hooks/useLogger.d.ts +2 -0
- package/es/hooks/useLogger.js +8 -0
- package/es/hooks/useModal.d.ts +35 -0
- package/es/hooks/useModal.example.d.ts +12 -0
- package/es/hooks/useModal.example.js +231 -0
- package/es/hooks/useModal.integration.example.d.ts +15 -0
- package/es/hooks/useModal.integration.example.js +248 -0
- package/es/hooks/useModal.js +116 -0
- package/es/hooks/usePaymentLogger.d.ts +22 -0
- package/es/hooks/usePaymentLogger.js +78 -0
- package/es/hooks/useToast.d.ts +2 -0
- package/es/hooks/useToast.js +9 -0
- package/es/hooks/useTranslationOriginal.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.d.ts +11 -0
- package/es/index.js +11 -0
- package/es/plus/clientCard/index.d.ts +7 -0
- package/es/plus/clientCard/index.js +459 -0
- package/es/plus/clientCard/index.less +540 -0
- package/es/plus/clientCard/line/index.d.ts +9 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.d.ts +18 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.d.ts +134 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.d.ts +8 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +2 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +2 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +2 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.d.ts +18 -0
- package/es/plus/clinetSearch/Add/index.js +213 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.d.ts +17 -0
- package/es/plus/clinetSearch/index.js +214 -0
- package/es/plus/clinetSearch/index.less +95 -0
- package/es/plus/clinetSearch/locales.d.ts +102 -0
- package/es/plus/clinetSearch/locales.js +101 -0
- package/es/plus/clinetSearch/serve.d.ts +1 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.d.ts +49 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/noteModal/AddTempModal.d.ts +7 -0
- package/es/plus/noteModal/AddTempModal.js +64 -0
- package/es/plus/noteModal/index.d.ts +4 -0
- package/es/plus/noteModal/index.js +201 -0
- package/es/plus/noteModal/index.less +168 -0
- package/es/plus/noteModal/locales.d.ts +33 -0
- package/es/plus/noteModal/locales.js +32 -0
- package/es/plus/noteModal/types.d.ts +19 -0
- package/es/plus/noteModal/types.js +1 -0
- package/es/plus/productSelect/CategoryTabs/index.js +4 -2
- package/es/plus/productSelect/index.js +7 -4
- package/es/plus/productSelect/utils.js +0 -1
- package/es/pro/NumberKeyboardPopover/index.d.ts +36 -0
- package/es/pro/NumberKeyboardPopover/index.js +105 -0
- package/es/pro/NumberKeyboardPopover/index.less +36 -0
- package/es/pro/NumberKeyboardPopover/types.d.ts +31 -0
- package/es/pro/NumberKeyboardPopover/types.js +1 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.js +54 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
- package/es/pro/comprehensiveSearch/components/index.d.ts +2 -0
- package/es/pro/comprehensiveSearch/components/index.js +2 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.js +143 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.less +97 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +14 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.d.ts +7 -0
- package/es/pro/comprehensiveSearch/index.js +207 -0
- package/es/pro/comprehensiveSearch/index.less +196 -0
- package/es/pro/comprehensiveSearch/locales.d.ts +15 -0
- package/es/pro/comprehensiveSearch/locales.js +14 -0
- package/es/pro/comprehensiveSearch/types.d.ts +32 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/numberKeyboard/index.d.ts +28 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.d.ts +12 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.d.ts +3 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.d.ts +26 -0
- package/es/pro/pisellNumberSelector/index.js +250 -0
- package/es/pro/pisellNumberSelector/index.less +193 -0
- package/es/pro/pisellPhoneKeyboard/index.d.ts +12 -0
- package/es/pro/pisellPhoneKeyboard/index.js +210 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +5 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/es/pro/pisellPriceKeyboardModal/index.d.ts +2 -0
- package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
- package/es/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/es/pro/pisellPriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellPriceKeyboardPopover/index.js +1 -0
- package/es/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellPriceKeyboardPopover/types.js +1 -0
- package/es/pro/pisellPriceRadio/index.d.ts +26 -0
- package/es/pro/pisellPriceRadio/index.js +113 -0
- package/es/pro/pisellPriceRadio/index.less +158 -0
- package/es/pro/skuDetailModal/index.d.ts +5 -0
- package/es/pro/skuDetailModal/index.js +366 -0
- package/es/pro/skuDetailModal/index.less +276 -0
- package/es/pro/skuDetailModal/locales.d.ts +48 -0
- package/es/pro/skuDetailModal/locales.js +47 -0
- package/es/pro/skuDetailModal/types.d.ts +347 -0
- package/es/pro/skuDetailModal/types.js +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/booking/addons/index.js +4 -1
- package/lib/components/booking/components/actionButtons/index.d.ts +31 -0
- package/lib/components/booking/components/actionButtons/index.js +459 -0
- package/lib/components/booking/components/actionButtons/index.less +215 -0
- package/lib/components/booking/components/clearCartModal/index.d.ts +10 -0
- package/lib/components/booking/components/clearCartModal/index.js +80 -0
- package/lib/components/booking/components/clearCartModal/index.less +109 -0
- package/lib/components/booking/components/customiseItemModal/index.d.ts +28 -0
- package/lib/components/booking/components/customiseItemModal/index.js +285 -0
- package/lib/components/booking/components/customiseItemModal/index.less +606 -0
- package/lib/components/booking/components/footer/amount.d.ts +11 -3
- package/lib/components/booking/components/footer/amount.js +375 -81
- package/lib/components/booking/components/footer/index.js +444 -122
- package/lib/components/booking/components/footer/index.less +26 -2
- package/lib/components/booking/components/footer/utils.js +62 -22
- package/lib/components/booking/components/tabPane/index.d.ts +2 -2
- package/lib/components/booking/components/tabPane/index.js +57 -4
- package/lib/components/booking/components/tabPane/index.less +78 -4
- package/lib/components/booking/components/voucher/index.js +50 -21
- package/lib/components/booking/components/voucher/index.less +1 -1
- package/lib/components/booking/components/voucherModal/index.d.ts +19 -0
- package/lib/components/booking/components/voucherModal/index.js +83 -0
- package/lib/components/booking/components/voucherModal/index.less +23 -0
- package/lib/components/booking/dashboard/index.d.ts +1 -1
- package/lib/components/booking/dashboard/index.js +7 -2
- package/lib/components/booking/deposit/ClientItem/index.js +1 -1
- package/lib/components/booking/deposit/DepositItem/index.js +1 -1
- package/lib/components/booking/deposit/index.js +40 -2
- package/lib/components/booking/forms/forms.js +1 -1
- package/lib/components/booking/hooks/useIsBooking4Shop.js +3 -3
- package/lib/components/booking/hooks/useQuotation.js +3 -1
- package/lib/components/booking/info/addServiceVariant/index.js +4 -4
- package/lib/components/booking/info/client/index.js +57 -19
- package/lib/components/booking/info/clientVariant/utils.d.ts +2 -0
- package/lib/components/booking/info/clientVariant/utils.js +13 -2
- package/lib/components/booking/info/clientVariant/vertical/index.js +7 -6
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +12 -6
- package/lib/components/booking/info/index.js +5 -4
- package/lib/components/booking/info/index.less +19 -3
- package/lib/components/booking/info/main.js +12 -5
- package/lib/components/booking/info/pet/index.less +1 -1
- package/lib/components/booking/info/service/Lists.js +10 -3
- package/lib/components/booking/info/service/addService/index.js +3 -3
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/index.js +9 -2
- package/lib/components/booking/info/service/index.less +1 -1
- package/lib/components/booking/info/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info/service/serviceList/index.js +4 -0
- package/lib/components/booking/info/service/serviceManager/index.js +4 -1
- package/lib/components/booking/info/service2/Lists.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +4 -0
- package/lib/components/booking/info/service2/utils.js +35 -13
- package/lib/components/booking/info2/cartClientCard/index.d.ts +6 -0
- package/lib/components/booking/info2/cartClientCard/index.js +314 -0
- package/lib/components/booking/info2/cartClientCard/index.less +6 -0
- package/lib/components/booking/info2/cartClientCard/locales.d.ts +21 -0
- package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
- package/lib/components/booking/info2/cartClientCard/types.d.ts +18 -0
- package/lib/components/booking/info2/cartClientCard/types.js +17 -0
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
- package/lib/components/booking/info2/index.js +30 -9
- package/lib/components/booking/info2/service/addService/index.js +5 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -2
- package/lib/components/booking/info2/service/addTimeModal/index.js +5 -6
- package/lib/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +156 -55
- package/lib/components/booking/info2/service/editService/index.less +47 -11
- package/lib/components/booking/info2/service/index.js +6 -6
- package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info2/service/serviceList/index.js +4 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +24 -5
- package/lib/components/booking/locales.d.ts +78 -0
- package/lib/components/booking/locales.js +100 -4
- package/lib/components/booking/notes/addNote/index.d.ts +1 -1
- package/lib/components/booking/notes/addNote/index.js +41 -23
- package/lib/components/booking/notes/addNote/index.less +53 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.d.ts +28 -0
- package/lib/components/checkout/PaymentModal.js +1576 -0
- package/lib/components/checkout/PaymentPlugin.d.ts +2 -0
- package/lib/components/checkout/PaymentPlugin.js +181 -0
- package/lib/components/checkout/PaymentProvider.d.ts +13 -0
- package/lib/components/checkout/PaymentProvider.js +95 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +13 -0
- package/lib/components/checkout/components/AdditionalModule/index.js +209 -0
- package/lib/components/checkout/components/AdditionalModule/index.less +181 -0
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +33 -0
- package/lib/components/checkout/components/AdditionalModule/locales.js +56 -0
- package/lib/components/checkout/components/AmountSummary/index.d.ts +25 -0
- package/lib/components/checkout/components/AmountSummary/index.js +517 -0
- package/lib/components/checkout/components/AmountSummary/index.less +470 -0
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +20 -0
- package/lib/components/checkout/components/CashPaymentModule/index.js +269 -0
- package/lib/components/checkout/components/CashPaymentModule/index.less +320 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.js +209 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.less +472 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +16 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +247 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +255 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +48 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +170 -0
- package/lib/components/checkout/components/PaymentResultToast/index.d.ts +8 -0
- package/lib/components/checkout/components/PaymentResultToast/index.js +218 -0
- package/lib/components/checkout/components/PaymentResultToast/index.less +343 -0
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +57 -0
- package/lib/components/checkout/components/PaymentResultToast/types.js +17 -0
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +18 -0
- package/lib/components/checkout/components/PaymentResultToast/utils.js +49 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.d.ts +17 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.js +167 -0
- package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/lib/components/checkout/components/ScrollableList/index.js +233 -0
- package/lib/components/checkout/components/ScrollableList/index.less +93 -0
- package/lib/components/checkout/components/ScrollableList/types.d.ts +53 -0
- package/lib/components/checkout/components/ScrollableList/types.js +17 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +14 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.js +215 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.less +18 -0
- package/lib/components/checkout/components/SendPaymentLinkModal/index.d.ts +12 -0
- package/lib/components/checkout/components/SendPaymentLinkModal/index.js +144 -0
- package/lib/components/checkout/components/SendPaymentLinkModal/index.less +471 -0
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +10 -0
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.js +332 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/DiscountTextMode.d.ts +7 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/DiscountTextMode.js +50 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +11 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.js +124 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.less +45 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletModal/index.d.ts +5 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletModal/index.js +106 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletModal/index.less +25 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassCardDisplay/index.d.ts +5 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassCardDisplay/index.js +166 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassCardDisplay/index.less +11 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.d.ts +5 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +100 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.less +64 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassTextMode/index.d.ts +5 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassTextMode/index.js +51 -0
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassTextMode/index.less +31 -0
- package/lib/components/checkout/components/WalletPassModule/index.d.ts +5 -0
- package/lib/components/checkout/components/WalletPassModule/index.js +198 -0
- package/lib/components/checkout/components/WalletPassModule/index.less +15 -0
- package/lib/components/checkout/components/WalletPassModule/types.d.ts +133 -0
- package/lib/components/checkout/components/WalletPassModule/types.js +17 -0
- package/lib/components/checkout/components/WalletPassModule/utils.d.ts +23 -0
- package/lib/components/checkout/components/WalletPassModule/utils.js +147 -0
- package/lib/components/checkout/constants.d.ts +2 -0
- package/lib/components/checkout/constants.js +36 -0
- package/lib/components/checkout/export.d.ts +9 -0
- package/lib/components/checkout/export.js +61 -0
- package/lib/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
- package/lib/components/checkout/hooks/usePaymentLogger.js +78 -0
- package/lib/components/checkout/hooks/useWalletPass.d.ts +39 -0
- package/lib/components/checkout/hooks/useWalletPass.js +717 -0
- package/lib/components/checkout/index.d.ts +5 -0
- package/lib/components/checkout/index.js +61 -0
- package/lib/components/checkout/index.less +100 -0
- package/lib/components/checkout/locales.d.ts +450 -0
- package/lib/components/checkout/locales.js +577 -0
- package/lib/components/checkout/payment-modal-utils.d.ts +30 -0
- package/lib/components/checkout/payment-modal-utils.js +153 -0
- package/lib/components/checkout/styles.d.ts +67 -0
- package/lib/components/checkout/styles.js +101 -0
- package/lib/components/checkout/types.d.ts +129 -0
- package/lib/components/checkout/types.js +17 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +33 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +223 -0
- package/lib/components/checkout/utils.d.ts +1 -0
- package/lib/components/checkout/utils.js +41 -0
- package/lib/components/eftposPay/EFTPos.d.ts +13 -0
- package/lib/components/eftposPay/EFTPos.js +563 -0
- package/lib/components/eftposPay/app.js +3 -1
- package/lib/components/eftposPay/const.d.ts +5 -0
- package/lib/components/eftposPay/device.d.ts +3 -1
- package/lib/components/eftposPay/device.js +6 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.js +2 -1
- package/lib/components/eftposPay/serve.d.ts +16 -0
- package/lib/components/eftposPay/serve.js +75 -0
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +6 -6
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +4 -4
- package/lib/components/pay/toB/components/Cache/index.d.ts +10 -0
- package/lib/components/pay/toB/components/Cache/index.js +108 -0
- package/lib/components/pay/toB/components/Cache/index.less +41 -0
- package/lib/components/pay/toB/components/Card/index.d.ts +7 -0
- package/lib/components/pay/toB/components/Card/index.js +66 -0
- package/lib/components/pay/toB/components/Card/index.less +26 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +7 -0
- package/lib/components/pay/toB/components/CardGroup/index.js +43 -0
- package/lib/components/pay/toB/components/CardGroup/index.less +18 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +6 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.js +77 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.less +69 -0
- package/lib/components/pay/toB/components/Content/Footer.d.ts +7 -0
- package/lib/components/pay/toB/components/Content/Footer.js +63 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +4 -0
- package/lib/components/pay/toB/components/Content/Header.js +40 -0
- package/lib/components/pay/toB/components/Content/index.d.ts +4 -0
- package/lib/components/pay/toB/components/Content/index.js +209 -0
- package/lib/components/pay/toB/components/Content/index.less +9 -0
- package/lib/components/pay/toB/components/Content/utils.d.ts +16 -0
- package/lib/components/pay/toB/components/Content/utils.js +91 -0
- package/lib/components/pay/toB/components/EFTPOS/index.d.ts +7 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +207 -0
- package/lib/components/pay/toB/components/EFTPOS/index.less +20 -0
- package/lib/components/pay/toB/components/MX51/index.d.ts +3 -0
- package/lib/components/pay/toB/components/MX51/index.js +85 -0
- package/lib/components/pay/toB/components/index.d.ts +5 -0
- package/lib/components/pay/toB/components/index.js +51 -0
- package/lib/components/pay/toB/hooks.d.ts +12 -0
- package/lib/components/pay/toB/hooks.js +60 -0
- package/lib/components/pay/toB/index.d.ts +3 -0
- package/lib/components/pay/toB/index.js +54 -0
- package/lib/components/pay/toB/locales.d.ts +54 -0
- package/lib/components/pay/toB/locales.js +77 -0
- package/lib/components/pay/toB/paymentMethods/index.d.ts +10 -0
- package/lib/components/pay/toB/paymentMethods/index.js +95 -0
- package/lib/components/pay/toB/store/context.d.ts +3 -0
- package/lib/components/pay/toB/store/context.js +32 -0
- package/lib/components/pay/toB/store/hooks.d.ts +15 -0
- package/lib/components/pay/toB/store/hooks.js +92 -0
- package/lib/components/pay/toB/store/index.d.ts +3 -0
- package/lib/components/pay/toB/store/index.js +27 -0
- package/lib/components/pay/toB/store/provider.d.ts +4 -0
- package/lib/components/pay/toB/store/provider.js +71 -0
- package/lib/components/pay/toB/store/utils.d.ts +13 -0
- package/lib/components/pay/toB/store/utils.js +72 -0
- package/lib/components/pay/toB/types/index.d.ts +60 -0
- package/lib/components/pay/toB/types/index.js +23 -0
- package/lib/components/pay/toB/types/storeTypes.d.ts +143 -0
- package/lib/components/pay/toB/types/storeTypes.js +36 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +42 -3
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +52 -15
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +66 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +29 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +50 -6
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +72 -10
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +4 -4
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +2 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +4 -4
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +4 -4
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +3 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +2 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +3 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +47 -5
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +61 -3
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +63 -3
- package/lib/components/pay/toC/index.js +183 -48
- package/lib/components/productSelect/components/TabProduct/index.js +7 -1
- package/lib/components/productSelect/components/pisellPriceText/index.js +8 -2
- package/lib/components/productSelect/components/productGroup/index.js +18 -4
- package/lib/components/productSelect/components/productGroup/index.less +17 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +54 -12
- package/lib/components/shoppingCart/components/Cart/index.less +15 -1
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/subTotal/index.less +1 -1
- package/lib/components/subTotal/locales.js +2 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +100 -163
- package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +8 -0
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +174 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +7 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +12 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.d.ts +9 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +14 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/lib/components/ticketBooking/components/floatButtons/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
- package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +24 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.js +340 -115
- package/lib/components/ticketBooking/components/ticketBooking/index.less +29 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +92 -66
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +1 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +3 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +158 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +12 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +2 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanManager.js +47 -0
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.js +33 -6
- package/lib/components/ticketBooking/index.less +1 -1
- package/lib/components/ticketBooking/locales.d.ts +9 -3
- package/lib/components/ticketBooking/locales.js +21 -6
- package/lib/components/ticketBooking/serve.d.ts +1 -0
- package/lib/components/ticketBooking/serve.js +22 -11
- package/lib/components/ticketBooking/utils/index.d.ts +39 -2
- package/lib/components/ticketBooking/utils/index.js +70 -10
- package/lib/hooks/index.d.ts +10 -0
- package/lib/hooks/index.js +63 -0
- package/lib/hooks/useEngineContext.d.ts +1 -8
- package/lib/hooks/useEngineContext.js +4 -3
- package/lib/hooks/useLogger.d.ts +2 -0
- package/lib/hooks/useLogger.js +42 -0
- package/lib/hooks/useModal.d.ts +35 -0
- package/lib/hooks/useModal.example.d.ts +12 -0
- package/lib/hooks/useModal.example.js +144 -0
- package/lib/hooks/useModal.integration.example.d.ts +15 -0
- package/lib/hooks/useModal.integration.example.js +173 -0
- package/lib/hooks/useModal.js +111 -0
- package/lib/hooks/usePaymentLogger.d.ts +22 -0
- package/lib/hooks/usePaymentLogger.js +69 -0
- package/lib/hooks/useToast.d.ts +2 -0
- package/lib/hooks/useToast.js +42 -0
- package/lib/hooks/useTranslationOriginal.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +33 -0
- package/lib/plus/clientCard/index.d.ts +7 -0
- package/lib/plus/clientCard/index.js +455 -0
- package/lib/plus/clientCard/index.less +540 -0
- package/lib/plus/clientCard/line/index.d.ts +9 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.d.ts +18 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.d.ts +134 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.d.ts +8 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
- package/lib/plus/clinetSearch/Add/index.js +244 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.d.ts +17 -0
- package/lib/plus/clinetSearch/index.js +204 -0
- package/lib/plus/clinetSearch/index.less +95 -0
- package/lib/plus/clinetSearch/locales.d.ts +102 -0
- package/lib/plus/clinetSearch/locales.js +125 -0
- package/lib/plus/clinetSearch/serve.d.ts +1 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.d.ts +49 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/noteModal/AddTempModal.d.ts +7 -0
- package/lib/plus/noteModal/AddTempModal.js +95 -0
- package/lib/plus/noteModal/index.d.ts +4 -0
- package/lib/plus/noteModal/index.js +201 -0
- package/lib/plus/noteModal/index.less +168 -0
- package/lib/plus/noteModal/locales.d.ts +33 -0
- package/lib/plus/noteModal/locales.js +56 -0
- package/lib/plus/noteModal/types.d.ts +19 -0
- package/lib/plus/noteModal/types.js +17 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +4 -2
- package/lib/plus/productSelect/index.js +8 -5
- package/lib/plus/productSelect/utils.js +0 -1
- package/lib/pro/NumberKeyboardPopover/index.d.ts +36 -0
- package/lib/pro/NumberKeyboardPopover/index.js +114 -0
- package/lib/pro/NumberKeyboardPopover/index.less +36 -0
- package/lib/pro/NumberKeyboardPopover/types.d.ts +31 -0
- package/lib/pro/NumberKeyboardPopover/types.js +17 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.js +64 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
- package/lib/pro/comprehensiveSearch/components/index.d.ts +2 -0
- package/lib/pro/comprehensiveSearch/components/index.js +42 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.js +165 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.less +97 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +38 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.d.ts +7 -0
- package/lib/pro/comprehensiveSearch/index.js +190 -0
- package/lib/pro/comprehensiveSearch/index.less +196 -0
- package/lib/pro/comprehensiveSearch/locales.d.ts +15 -0
- package/lib/pro/comprehensiveSearch/locales.js +38 -0
- package/lib/pro/comprehensiveSearch/types.d.ts +32 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/numberKeyboard/index.d.ts +28 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.d.ts +12 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.d.ts +26 -0
- package/lib/pro/pisellNumberSelector/index.js +270 -0
- package/lib/pro/pisellNumberSelector/index.less +193 -0
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +12 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +5 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/lib/pro/pisellPriceKeyboardModal/index.d.ts +2 -0
- package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/lib/pro/pisellPriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellPriceKeyboardPopover/index.js +35 -0
- package/lib/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellPriceKeyboardPopover/types.js +17 -0
- package/lib/pro/pisellPriceRadio/index.d.ts +26 -0
- package/lib/pro/pisellPriceRadio/index.js +130 -0
- package/lib/pro/pisellPriceRadio/index.less +158 -0
- package/lib/pro/skuDetailModal/index.d.ts +5 -0
- package/lib/pro/skuDetailModal/index.js +327 -0
- package/lib/pro/skuDetailModal/index.less +276 -0
- package/lib/pro/skuDetailModal/locales.d.ts +48 -0
- package/lib/pro/skuDetailModal/locales.js +71 -0
- package/lib/pro/skuDetailModal/types.d.ts +347 -0
- package/lib/pro/skuDetailModal/types.js +17 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +337 -0
- package/lowcode/comprehensive-search/meta.ts +261 -0
- package/lowcode/pro-number-keyboard/meta.ts +427 -0
- package/lowcode/pro-phone-selector/meta.ts +357 -0
- package/lowcode/tob-pay/meta.ts +44 -0
- package/package.json +33 -33
@@ -17,7 +17,7 @@ import React, { useState, useMemo, useContext, useRef, useImperativeHandle, forw
|
|
17
17
|
import { Decimal } from 'decimal.js';
|
18
18
|
import { useMemoizedFn, useUpdateEffect } from 'ahooks';
|
19
19
|
import { PisellModal, PisellText, PisellContainer, PisellLoading, PisellToast } from '@pisell/materials';
|
20
|
-
import { detectIncognito, locales, copyToClipboard
|
20
|
+
import { detectIncognito, locales, copyToClipboard } from '@pisell/utils';
|
21
21
|
import PayCountdown from "./PayCountdown";
|
22
22
|
import PayAmount from "./PayAmount";
|
23
23
|
import WalletPassBlock from "./WalletPassBlock";
|
@@ -26,6 +26,7 @@ import PaymentMethods from "./PaymentMethods";
|
|
26
26
|
import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus } from "./serve";
|
27
27
|
import { Provider, Context } from "./model";
|
28
28
|
import useEngineContext from "../../../hooks/useEngineContext";
|
29
|
+
import usePaymentLogger from "../../../hooks/usePaymentLogger";
|
29
30
|
import { request } from "../../../utils";
|
30
31
|
import { removePayGroupFromStorage } from "./payGroup";
|
31
32
|
import localeTexts from "./locales";
|
@@ -41,7 +42,7 @@ import "./index.less";
|
|
41
42
|
* @Date: 2024-08-16 10:43
|
42
43
|
*/
|
43
44
|
var ToCPay = function ToCPay(props, ref) {
|
44
|
-
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _dvaStore$core, _dvaStore$core2, _state$
|
45
|
+
var _state$payGroup, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _dvaStore$core, _dvaStore$core2, _state$payGroup7, _state$payGroup25, _state$order, _state$order2, _state$payGroup30, _state$payGroup31, _state$payGroup32;
|
45
46
|
//@ts-ignore
|
46
47
|
var _useContext = useContext(Context),
|
47
48
|
state = _useContext.state,
|
@@ -73,6 +74,12 @@ var ToCPay = function ToCPay(props, ref) {
|
|
73
74
|
var walletPassBlockRef = useRef(null);
|
74
75
|
var context = useEngineContext();
|
75
76
|
|
77
|
+
// 支付日志记录器
|
78
|
+
var paymentLogger = usePaymentLogger({
|
79
|
+
orderId: ((_state$payGroup = state.payGroup) === null || _state$payGroup === void 0 ? void 0 : _state$payGroup.order_id) || 'unknown',
|
80
|
+
step: '1'
|
81
|
+
});
|
82
|
+
|
76
83
|
// 退出提醒
|
77
84
|
var _useState9 = useState(false),
|
78
85
|
_useState10 = _slicedToArray(_useState9, 2),
|
@@ -177,11 +184,16 @@ var ToCPay = function ToCPay(props, ref) {
|
|
177
184
|
*/
|
178
185
|
var init = /*#__PURE__*/function () {
|
179
186
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(initProps) {
|
180
|
-
var renderType;
|
187
|
+
var renderType, _initProps$order2;
|
181
188
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
182
189
|
while (1) switch (_context2.prev = _context2.next) {
|
183
190
|
case 0:
|
184
|
-
renderType = initProps.renderType;
|
191
|
+
renderType = initProps.renderType; // 记录初始化开始
|
192
|
+
paymentLogger.addLog({
|
193
|
+
key: '初始化开始',
|
194
|
+
value: ""
|
195
|
+
});
|
196
|
+
_context2.prev = 2;
|
185
197
|
setRenderType(renderType !== null && renderType !== void 0 ? renderType : 'modal');
|
186
198
|
// 打开弹窗
|
187
199
|
setOpen(true);
|
@@ -199,16 +211,39 @@ var ToCPay = function ToCPay(props, ref) {
|
|
199
211
|
removePayGroupFromStorage(initProps.order.order_id);
|
200
212
|
|
201
213
|
// 获取支付列表和钱包
|
202
|
-
_context2.next = 9;
|
203
|
-
return _getPaymentsAndWalletPass(initProps.order);
|
204
|
-
case 9:
|
205
214
|
_context2.next = 11;
|
206
|
-
return
|
215
|
+
return _getPaymentsAndWalletPass(initProps.order);
|
207
216
|
case 11:
|
217
|
+
_context2.next = 13;
|
218
|
+
return getWalletSetting(initProps);
|
219
|
+
case 13:
|
220
|
+
// 记录初始化成功
|
221
|
+
paymentLogger.addLog({
|
222
|
+
key: '初始化成功',
|
223
|
+
value: ""
|
224
|
+
});
|
225
|
+
_context2.next = 21;
|
226
|
+
break;
|
227
|
+
case 16:
|
228
|
+
_context2.prev = 16;
|
229
|
+
_context2.t0 = _context2["catch"](2);
|
230
|
+
// 记录初始化错误并发送日志
|
231
|
+
paymentLogger.addLog({
|
232
|
+
key: '初始化错误',
|
233
|
+
value: {
|
234
|
+
title: "\u8BA2\u5355".concat(initProps === null || initProps === void 0 || (_initProps$order2 = initProps.order) === null || _initProps$order2 === void 0 ? void 0 : _initProps$order2.order_id, " \u521D\u59CB\u5316\u5931\u8D25: ").concat((_context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message) || '未知错误'),
|
235
|
+
data: {
|
236
|
+
order: initProps === null || initProps === void 0 ? void 0 : initProps.order
|
237
|
+
}
|
238
|
+
}
|
239
|
+
});
|
240
|
+
paymentLogger.sendLogs('支付初始化失败', _context2.t0);
|
241
|
+
throw _context2.t0;
|
242
|
+
case 21:
|
208
243
|
case "end":
|
209
244
|
return _context2.stop();
|
210
245
|
}
|
211
|
-
}, _callee2);
|
246
|
+
}, _callee2, null, [[2, 16]]);
|
212
247
|
}));
|
213
248
|
return function init(_x2) {
|
214
249
|
return _ref2.apply(this, arguments);
|
@@ -225,20 +260,33 @@ var ToCPay = function ToCPay(props, ref) {
|
|
225
260
|
*/
|
226
261
|
var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
|
227
262
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order) {
|
228
|
-
var _state$
|
263
|
+
var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass;
|
229
264
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
230
265
|
while (1) switch (_context3.prev = _context3.next) {
|
231
266
|
case 0:
|
232
|
-
|
233
|
-
|
267
|
+
// 记录获取支付列表开始
|
268
|
+
paymentLogger.addLog({
|
269
|
+
key: '获取支付列表开始',
|
270
|
+
value: {
|
271
|
+
title: "\u8BA2\u5355".concat(order === null || order === void 0 ? void 0 : order.order_id, " \u5F00\u59CB\u83B7\u53D6\u652F\u4ED8\u5217\u8868, \u91D1\u989D: ").concat(order === null || order === void 0 ? void 0 : order.amount)
|
272
|
+
}
|
273
|
+
});
|
274
|
+
_context3.prev = 1;
|
275
|
+
_context3.next = 4;
|
234
276
|
return getPaymentsAndWalletPass({
|
235
277
|
order_id: order.order_id,
|
236
278
|
total_amount: order.amount,
|
237
279
|
sale_channel: order.sale_channel || 'online-store'
|
238
280
|
});
|
239
|
-
case
|
281
|
+
case 4:
|
240
282
|
data = _context3.sent;
|
241
|
-
_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; //
|
283
|
+
_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; // 记录获取到的数据
|
284
|
+
paymentLogger.addLog({
|
285
|
+
key: '支付数据获取',
|
286
|
+
value: ""
|
287
|
+
});
|
288
|
+
|
289
|
+
// 设置交易组
|
242
290
|
dispatch({
|
243
291
|
type: 'setPayGroup',
|
244
292
|
payload: {
|
@@ -249,7 +297,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
249
297
|
_order: order,
|
250
298
|
payment_group_id: order === null || order === void 0 ? void 0 : order.payment_group_id,
|
251
299
|
// 支付方式没有walletPass时walletPass设置null
|
252
|
-
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$
|
300
|
+
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
|
253
301
|
amount: wallet_pass_amount,
|
254
302
|
cards: wallet_pass_recommend_list
|
255
303
|
}) : null,
|
@@ -259,19 +307,37 @@ var ToCPay = function ToCPay(props, ref) {
|
|
259
307
|
});
|
260
308
|
|
261
309
|
// 初始化支付列表
|
262
|
-
_context3.next =
|
310
|
+
_context3.next = 10;
|
263
311
|
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list);
|
264
|
-
case
|
312
|
+
case 10:
|
265
313
|
// 解除loading
|
266
314
|
setTimeout(function () {
|
267
315
|
setLoading(false);
|
268
316
|
}, 100);
|
269
|
-
|
317
|
+
|
318
|
+
// 记录获取支付列表成功
|
319
|
+
paymentLogger.addLog({
|
320
|
+
key: '获取支付列表成功',
|
321
|
+
value: ""
|
322
|
+
});
|
323
|
+
_context3.next = 20;
|
270
324
|
break;
|
271
|
-
case
|
272
|
-
_context3.prev =
|
273
|
-
_context3.t0 = _context3["catch"](
|
325
|
+
case 14:
|
326
|
+
_context3.prev = 14;
|
327
|
+
_context3.t0 = _context3["catch"](1);
|
274
328
|
console.log('err', _context3.t0);
|
329
|
+
|
330
|
+
// 记录获取支付列表错误并发送日志
|
331
|
+
paymentLogger.addLog({
|
332
|
+
key: '获取支付列表错误',
|
333
|
+
value: {
|
334
|
+
title: "\u8BA2\u5355".concat(order === null || order === void 0 ? void 0 : order.order_id, " \u83B7\u53D6\u5931\u8D25: ").concat((_context3.t0 === null || _context3.t0 === void 0 ? void 0 : _context3.t0.message) || '未知错误'),
|
335
|
+
data: {
|
336
|
+
order: order
|
337
|
+
}
|
338
|
+
}
|
339
|
+
});
|
340
|
+
paymentLogger.sendLogs('获取支付列表失败', _context3.t0);
|
275
341
|
payCallback({
|
276
342
|
key: 'fail',
|
277
343
|
data: {
|
@@ -280,11 +346,11 @@ var ToCPay = function ToCPay(props, ref) {
|
|
280
346
|
fn: '_getPaymentsAndWalletPass'
|
281
347
|
}
|
282
348
|
});
|
283
|
-
case
|
349
|
+
case 20:
|
284
350
|
case "end":
|
285
351
|
return _context3.stop();
|
286
352
|
}
|
287
|
-
}, _callee3, null, [[
|
353
|
+
}, _callee3, null, [[1, 14]]);
|
288
354
|
}));
|
289
355
|
return function _getPaymentsAndWalletPass(_x3) {
|
290
356
|
return _ref3.apply(this, arguments);
|
@@ -302,27 +368,63 @@ var ToCPay = function ToCPay(props, ref) {
|
|
302
368
|
*/
|
303
369
|
var handlePaymentByType = /*#__PURE__*/function () {
|
304
370
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
|
305
|
-
var
|
371
|
+
var _state$payGroup3;
|
372
|
+
var paymentType, currentPayGroup, _paymentMethodsRef$cu;
|
306
373
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
307
374
|
while (1) switch (_context4.prev = _context4.next) {
|
308
375
|
case 0:
|
376
|
+
paymentType = type || ((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 || (_state$payGroup3 = _state$payGroup3.otherPayment) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.service);
|
377
|
+
currentPayGroup = payGroup || state.payGroup; // 记录开始处理支付
|
378
|
+
paymentLogger.addLog({
|
379
|
+
key: '开始支付处理',
|
380
|
+
value: ""
|
381
|
+
});
|
382
|
+
_context4.prev = 3;
|
309
383
|
// 打开loading
|
310
384
|
setSubmitLoading(true);
|
311
385
|
|
312
386
|
// 根据不同的支付方式, 调用不同的支付方法
|
313
|
-
_context4.next =
|
387
|
+
_context4.next = 7;
|
314
388
|
return (_paymentMethodsRef$cu = paymentMethodsRef.current) === null || _paymentMethodsRef$cu === void 0 ? void 0 : _paymentMethodsRef$cu.onPay({
|
315
|
-
type:
|
316
|
-
payGroup:
|
389
|
+
type: paymentType,
|
390
|
+
payGroup: currentPayGroup
|
317
391
|
});
|
318
|
-
case
|
392
|
+
case 7:
|
393
|
+
// 记录支付方法调用成功
|
394
|
+
paymentLogger.addLog({
|
395
|
+
key: '支付方法调用成功',
|
396
|
+
value: ""
|
397
|
+
});
|
398
|
+
paymentLogger.sendLogs('支付方法调用成功');
|
399
|
+
|
319
400
|
// 关闭loading
|
320
401
|
setSubmitLoading(false);
|
321
|
-
|
402
|
+
_context4.next = 18;
|
403
|
+
break;
|
404
|
+
case 12:
|
405
|
+
_context4.prev = 12;
|
406
|
+
_context4.t0 = _context4["catch"](3);
|
407
|
+
// 记录支付处理错误并发送日志
|
408
|
+
paymentLogger.addLog({
|
409
|
+
key: '支付处理错误',
|
410
|
+
value: {
|
411
|
+
title: "\u8BA2\u5355".concat(currentPayGroup === null || currentPayGroup === void 0 ? void 0 : currentPayGroup.order_id, " ").concat(paymentType, "\u652F\u4ED8\u5931\u8D25: ").concat((_context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message) || '未知错误'),
|
412
|
+
data: {
|
413
|
+
type: paymentType,
|
414
|
+
payGroup: currentPayGroup
|
415
|
+
}
|
416
|
+
}
|
417
|
+
});
|
418
|
+
paymentLogger.sendLogs('支付处理失败', _context4.t0);
|
419
|
+
|
420
|
+
// 关闭loading
|
421
|
+
setSubmitLoading(false);
|
422
|
+
throw _context4.t0;
|
423
|
+
case 18:
|
322
424
|
case "end":
|
323
425
|
return _context4.stop();
|
324
426
|
}
|
325
|
-
}, _callee4);
|
427
|
+
}, _callee4, null, [[3, 12]]);
|
326
428
|
}));
|
327
429
|
return function handlePaymentByType(_x4, _x5) {
|
328
430
|
return _ref5.apply(this, arguments);
|
@@ -338,21 +440,25 @@ var ToCPay = function ToCPay(props, ref) {
|
|
338
440
|
*/
|
339
441
|
var paymentInit = /*#__PURE__*/function () {
|
340
442
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
|
341
|
-
var _state$
|
342
|
-
var orderId, _state$
|
443
|
+
var _state$payGroup4;
|
444
|
+
var orderId, _state$payGroup5, data;
|
343
445
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
344
446
|
while (1) switch (_context5.prev = _context5.next) {
|
345
447
|
case 0:
|
346
448
|
// 默认使用store内的order_id, 如果传入了新的order_id, 则使用新的order_id
|
347
|
-
orderId = newOrderId || ((_state$
|
449
|
+
orderId = newOrderId || ((_state$payGroup4 = state.payGroup) === null || _state$payGroup4 === void 0 ? void 0 : _state$payGroup4.order_id); // 记录开始创建交易组
|
450
|
+
paymentLogger.addLog({
|
451
|
+
key: '开始创建交易组',
|
452
|
+
value: ""
|
453
|
+
});
|
348
454
|
setSubmitLoading(true);
|
349
|
-
_context5.prev =
|
350
|
-
_context5.next =
|
455
|
+
_context5.prev = 3;
|
456
|
+
_context5.next = 6;
|
351
457
|
return getPaymentInit({
|
352
458
|
order_id: orderId,
|
353
|
-
amount: (_state$
|
459
|
+
amount: (_state$payGroup5 = state.payGroup) === null || _state$payGroup5 === void 0 ? void 0 : _state$payGroup5.total_amount
|
354
460
|
});
|
355
|
-
case
|
461
|
+
case 6:
|
356
462
|
data = _context5.sent;
|
357
463
|
// 设置交易组
|
358
464
|
dispatch({
|
@@ -364,28 +470,32 @@ var ToCPay = function ToCPay(props, ref) {
|
|
364
470
|
payment_priority: data.payment_priority
|
365
471
|
}
|
366
472
|
});
|
473
|
+
|
474
|
+
// 记录创建交易组成功
|
475
|
+
paymentLogger.addLog({
|
476
|
+
key: '创建交易组成功',
|
477
|
+
value: ""
|
478
|
+
});
|
367
479
|
return _context5.abrupt("return", _objectSpread(_objectSpread({}, state.payGroup), {}, {
|
368
480
|
order_id: orderId,
|
369
481
|
total_amount: data.amount,
|
370
482
|
payment_group_id: data.payment_group_id,
|
371
483
|
payment_priority: data.payment_priority
|
372
484
|
}));
|
373
|
-
case
|
374
|
-
_context5.prev =
|
375
|
-
_context5.t0 = _context5["catch"](
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
}
|
385
|
-
key: '错误类型',
|
386
|
-
value: (_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.name) || '未知错误类型'
|
387
|
-
}]
|
485
|
+
case 12:
|
486
|
+
_context5.prev = 12;
|
487
|
+
_context5.t0 = _context5["catch"](3);
|
488
|
+
// 记录创建交易组错误并发送日志
|
489
|
+
paymentLogger.addLog({
|
490
|
+
key: '创建交易组错误',
|
491
|
+
value: {
|
492
|
+
title: "\u8BA2\u5355".concat(orderId, " \u521B\u5EFA\u4EA4\u6613\u7EC4\u5931\u8D25: ").concat((_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.message) || '未知错误'),
|
493
|
+
data: {
|
494
|
+
order: orderId
|
495
|
+
}
|
496
|
+
}
|
388
497
|
});
|
498
|
+
paymentLogger.sendLogs('创建交易组失败', _context5.t0);
|
389
499
|
setSubmitLoading(false);
|
390
500
|
payCallback({
|
391
501
|
key: 'fail',
|
@@ -395,11 +505,11 @@ var ToCPay = function ToCPay(props, ref) {
|
|
395
505
|
fn: 'paymentInit'
|
396
506
|
}
|
397
507
|
});
|
398
|
-
case
|
508
|
+
case 18:
|
399
509
|
case "end":
|
400
510
|
return _context5.stop();
|
401
511
|
}
|
402
|
-
}, _callee5, null, [[
|
512
|
+
}, _callee5, null, [[3, 12]]);
|
403
513
|
}));
|
404
514
|
return function paymentInit(_x6) {
|
405
515
|
return _ref6.apply(this, arguments);
|
@@ -415,9 +525,9 @@ var ToCPay = function ToCPay(props, ref) {
|
|
415
525
|
* @Date: 2024-08-15 13:47
|
416
526
|
*/
|
417
527
|
var waitAmount = useMemo(function () {
|
418
|
-
var _state$
|
419
|
-
return ((_state$
|
420
|
-
}, [(_state$
|
528
|
+
var _state$payGroup6;
|
529
|
+
return ((_state$payGroup6 = state.payGroup) === null || _state$payGroup6 === void 0 ? void 0 : _state$payGroup6.wait_amount) || 0;
|
530
|
+
}, [(_state$payGroup7 = state.payGroup) === null || _state$payGroup7 === void 0 ? void 0 : _state$payGroup7.wait_amount]);
|
421
531
|
|
422
532
|
/**
|
423
533
|
* @title: 是否仅钱包支付
|
@@ -428,8 +538,8 @@ var ToCPay = function ToCPay(props, ref) {
|
|
428
538
|
* @Date: 2024-08-15 13:46
|
429
539
|
*/
|
430
540
|
var isWalletPassPay = useMemo(function () {
|
431
|
-
var _state$
|
432
|
-
var isWalletPass = (_state$
|
541
|
+
var _state$payGroup8;
|
542
|
+
var isWalletPass = (_state$payGroup8 = state.payGroup) === null || _state$payGroup8 === void 0 || (_state$payGroup8 = _state$payGroup8.walletPass) === null || _state$payGroup8 === void 0 || (_state$payGroup8 = _state$payGroup8.cards) === null || _state$payGroup8 === void 0 ? void 0 : _state$payGroup8.length;
|
433
543
|
// 待支付金额小于0 并且已经选择了卡
|
434
544
|
return waitAmount <= 0 && isWalletPass;
|
435
545
|
}, [state.payGroup, waitAmount]);
|
@@ -445,8 +555,8 @@ var ToCPay = function ToCPay(props, ref) {
|
|
445
555
|
var isDisabled = useMemo(function () {
|
446
556
|
// 当待支付金额 大于 0 则必须选择其他支付方式, 否则禁止
|
447
557
|
if (waitAmount > 0) {
|
448
|
-
var _state$
|
449
|
-
var isOtherPayment = (_state$
|
558
|
+
var _state$payGroup9;
|
559
|
+
var isOtherPayment = (_state$payGroup9 = state.payGroup) === null || _state$payGroup9 === void 0 || (_state$payGroup9 = _state$payGroup9.otherPayment) === null || _state$payGroup9 === void 0 ? void 0 : _state$payGroup9.service;
|
450
560
|
return !isOtherPayment;
|
451
561
|
} else {
|
452
562
|
return !isWalletPassPay;
|
@@ -492,58 +602,81 @@ var ToCPay = function ToCPay(props, ref) {
|
|
492
602
|
*/
|
493
603
|
var onSubmit = /*#__PURE__*/function () {
|
494
604
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
|
495
|
-
var _state$
|
605
|
+
var _state$payGroup10, _state$payGroup11, _state$payGroup12;
|
606
|
+
var newPayGroup, _state$payGroup13, _newPayGroup, _newPayGroup2, _state$payGroup14, result, _state$payGroup15;
|
496
607
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
497
608
|
while (1) switch (_context7.prev = _context7.next) {
|
498
609
|
case 0:
|
499
|
-
|
500
|
-
|
501
|
-
|
610
|
+
// 记录开始提交支付
|
611
|
+
paymentLogger.addLog({
|
612
|
+
key: '开始提交支付',
|
613
|
+
value: "\u8BA2\u5355".concat(newOrderId || ((_state$payGroup10 = state.payGroup) === null || _state$payGroup10 === void 0 ? void 0 : _state$payGroup10.order_id), " \u5F00\u59CB\u63D0\u4EA4, \u5F85\u652F\u4ED8: ").concat((_state$payGroup11 = state.payGroup) === null || _state$payGroup11 === void 0 ? void 0 : _state$payGroup11.wait_amount, ", \u603B\u91D1\u989D: ").concat((_state$payGroup12 = state.payGroup) === null || _state$payGroup12 === void 0 ? void 0 : _state$payGroup12.total_amount)
|
614
|
+
});
|
615
|
+
newPayGroup = state.payGroup;
|
616
|
+
_context7.prev = 2;
|
617
|
+
_context7.next = 5;
|
502
618
|
return getIsShowDetectIncognitoConfirm(newPayGroup);
|
503
|
-
case
|
619
|
+
case 5:
|
504
620
|
result = _context7.sent;
|
505
621
|
if (!result) {
|
506
|
-
_context7.next =
|
622
|
+
_context7.next = 10;
|
507
623
|
break;
|
508
624
|
}
|
625
|
+
paymentLogger.addLog({
|
626
|
+
key: '无痕模式检测',
|
627
|
+
value: ""
|
628
|
+
});
|
509
629
|
setShowDetectIncognitoConfirm(true);
|
510
630
|
return _context7.abrupt("return");
|
511
|
-
case
|
512
|
-
if ((_state$
|
513
|
-
_context7.next =
|
631
|
+
case 10:
|
632
|
+
if ((_state$payGroup13 = state.payGroup) !== null && _state$payGroup13 !== void 0 && _state$payGroup13.payment_group_id) {
|
633
|
+
_context7.next = 15;
|
514
634
|
break;
|
515
635
|
}
|
516
|
-
|
636
|
+
paymentLogger.addLog({
|
637
|
+
key: '需要创建交易组',
|
638
|
+
value: ""
|
639
|
+
});
|
640
|
+
_context7.next = 14;
|
517
641
|
return paymentInit(newOrderId);
|
518
|
-
case
|
642
|
+
case 14:
|
519
643
|
newPayGroup = _context7.sent;
|
520
|
-
case
|
644
|
+
case 15:
|
521
645
|
// 调用支付
|
646
|
+
paymentLogger.addLog({
|
647
|
+
key: '调用支付方法',
|
648
|
+
value: "\u8BA2\u5355".concat((_newPayGroup = newPayGroup) === null || _newPayGroup === void 0 ? void 0 : _newPayGroup.order_id, " \u4EA4\u6613\u7EC4").concat((_newPayGroup2 = newPayGroup) === null || _newPayGroup2 === void 0 ? void 0 : _newPayGroup2.payment_group_id, " \u4F7F\u7528").concat((_state$payGroup14 = state.payGroup) === null || _state$payGroup14 === void 0 || (_state$payGroup14 = _state$payGroup14.otherPayment) === null || _state$payGroup14 === void 0 ? void 0 : _state$payGroup14.service, "\u652F\u4ED8")
|
649
|
+
});
|
522
650
|
handlePaymentByType(undefined, newPayGroup);
|
523
|
-
|
651
|
+
|
652
|
+
// 记录提交成功(这里是调用成功,实际支付结果在payCallback中处理)
|
653
|
+
paymentLogger.addLog({
|
654
|
+
key: '支付提交调用成功',
|
655
|
+
value: ""
|
656
|
+
});
|
657
|
+
_context7.next = 25;
|
524
658
|
break;
|
525
|
-
case
|
526
|
-
_context7.prev =
|
527
|
-
_context7.t0 = _context7["catch"](
|
659
|
+
case 20:
|
660
|
+
_context7.prev = 20;
|
661
|
+
_context7.t0 = _context7["catch"](2);
|
528
662
|
console.log('err', _context7.t0);
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
value: (_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.name) || '未知错误类型'
|
540
|
-
}]
|
663
|
+
|
664
|
+
// 记录提交支付错误并发送日志
|
665
|
+
paymentLogger.addLog({
|
666
|
+
key: '提交支付错误',
|
667
|
+
value: {
|
668
|
+
title: "\u8BA2\u5355".concat(newOrderId || ((_state$payGroup15 = state.payGroup) === null || _state$payGroup15 === void 0 ? void 0 : _state$payGroup15.order_id), " \u63D0\u4EA4\u5931\u8D25: ").concat((_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.message) || '未知错误'),
|
669
|
+
data: {
|
670
|
+
newPayGroup: newPayGroup
|
671
|
+
}
|
672
|
+
}
|
541
673
|
});
|
542
|
-
|
674
|
+
paymentLogger.sendLogs('提交支付失败', _context7.t0);
|
675
|
+
case 25:
|
543
676
|
case "end":
|
544
677
|
return _context7.stop();
|
545
678
|
}
|
546
|
-
}, _callee7, null, [[
|
679
|
+
}, _callee7, null, [[2, 20]]);
|
547
680
|
}));
|
548
681
|
return function onSubmit(_x8) {
|
549
682
|
return _ref8.apply(this, arguments);
|
@@ -569,28 +702,28 @@ var ToCPay = function ToCPay(props, ref) {
|
|
569
702
|
|
570
703
|
// 确认按钮
|
571
704
|
var okText = useMemo(function () {
|
572
|
-
var _state$
|
573
|
-
var current = (_state$
|
705
|
+
var _state$payGroup16, _state$payGroup17;
|
706
|
+
var current = (_state$payGroup16 = state.payGroup) === null || _state$payGroup16 === void 0 ? void 0 : _state$payGroup16.otherPayment;
|
574
707
|
|
575
708
|
// 没有其他支付金额, 则直接使用钱包支付 展示submit
|
576
|
-
if (((_state$
|
709
|
+
if (((_state$payGroup17 = state.payGroup) === null || _state$payGroup17 === void 0 ? void 0 : _state$payGroup17.wait_amount) == 0) {
|
577
710
|
return locales.getText('tocPay.text.submit');
|
578
711
|
}
|
579
712
|
|
580
713
|
// 有手续费的话展示手续费
|
581
714
|
if (current !== null && current !== void 0 && current.surcharge) {
|
582
|
-
var _state$
|
715
|
+
var _state$payGroup18;
|
583
716
|
return /*#__PURE__*/React.createElement("span", {
|
584
717
|
className: ""
|
585
718
|
}, locales.getText('tocPay.text.pay'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
586
|
-
value: ((_state$
|
719
|
+
value: ((_state$payGroup18 = state.payGroup) === null || _state$payGroup18 === void 0 ? void 0 : _state$payGroup18.wait_amount) || 0.0
|
587
720
|
}), " +", locales.getText('tocPay.text.surcharge'));
|
588
721
|
} else {
|
589
|
-
var _state$
|
722
|
+
var _state$payGroup19;
|
590
723
|
return /*#__PURE__*/React.createElement("span", {
|
591
724
|
className: ""
|
592
725
|
}, locales.getText('tocPay.text.pay'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
593
|
-
value: ((_state$
|
726
|
+
value: ((_state$payGroup19 = state.payGroup) === null || _state$payGroup19 === void 0 ? void 0 : _state$payGroup19.wait_amount) || 0.0
|
594
727
|
}));
|
595
728
|
}
|
596
729
|
}, [state.payGroup]);
|
@@ -604,18 +737,39 @@ var ToCPay = function ToCPay(props, ref) {
|
|
604
737
|
*/
|
605
738
|
var payCallback = /*#__PURE__*/function () {
|
606
739
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
|
607
|
-
var _props$callback;
|
740
|
+
var _res$data, _state$payGroup20, _props$callback;
|
741
|
+
var orderId, _res$data2;
|
608
742
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
609
743
|
while (1) switch (_context8.prev = _context8.next) {
|
610
744
|
case 0:
|
611
|
-
//
|
612
|
-
|
745
|
+
// 记录支付回调结果
|
746
|
+
orderId = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.order_id) || ((_state$payGroup20 = state.payGroup) === null || _state$payGroup20 === void 0 ? void 0 : _state$payGroup20.order_id);
|
747
|
+
if (res.key === 'success') {
|
748
|
+
paymentLogger.addLog({
|
749
|
+
key: '支付最终成功',
|
750
|
+
value: "\u8BA2\u5355".concat(orderId, " \u652F\u4ED8\u6210\u529F")
|
751
|
+
});
|
752
|
+
paymentLogger.sendLogs('支付成功');
|
753
|
+
} else if (res.key === 'fail') {
|
754
|
+
paymentLogger.addLog({
|
755
|
+
key: '支付最终失败',
|
756
|
+
value: {
|
757
|
+
title: "\u8BA2\u5355".concat(orderId, " \u652F\u4ED8\u5931\u8D25"),
|
758
|
+
data: res === null || res === void 0 ? void 0 : res.data
|
759
|
+
}
|
760
|
+
});
|
761
|
+
paymentLogger.sendLogs('支付失败', res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.err);
|
762
|
+
} else if (res.key === 'cancel') {
|
763
|
+
paymentLogger.addLog({
|
764
|
+
key: '支付被取消',
|
765
|
+
value: "\u8BA2\u5355".concat(orderId, " \u652F\u4ED8\u88AB\u53D6\u6D88")
|
766
|
+
});
|
613
767
|
setOpen(false);
|
614
768
|
}
|
615
769
|
|
616
770
|
// 回调外部
|
617
771
|
(_props$callback = props.callback) === null || _props$callback === void 0 || _props$callback.call(props, res);
|
618
|
-
case
|
772
|
+
case 3:
|
619
773
|
case "end":
|
620
774
|
return _context8.stop();
|
621
775
|
}
|
@@ -634,9 +788,15 @@ var ToCPay = function ToCPay(props, ref) {
|
|
634
788
|
* @Date: 2024-08-08 16:34
|
635
789
|
*/
|
636
790
|
var onCancel = function onCancel() {
|
637
|
-
var _state$
|
791
|
+
var _state$payGroup21, _state$payGroup22, _state$payGroup23;
|
792
|
+
// 记录取消支付操作
|
793
|
+
paymentLogger.addLog({
|
794
|
+
key: '用户主动取消支付',
|
795
|
+
value: "\u8BA2\u5355".concat((_state$payGroup21 = state.payGroup) === null || _state$payGroup21 === void 0 ? void 0 : _state$payGroup21.order_id, " \u7528\u6237\u53D6\u6D88\u652F\u4ED8")
|
796
|
+
});
|
797
|
+
|
638
798
|
// 删除交易组
|
639
|
-
removePayGroupFromStorage((_state$
|
799
|
+
removePayGroupFromStorage((_state$payGroup22 = state.payGroup) === null || _state$payGroup22 === void 0 ? void 0 : _state$payGroup22.order_id);
|
640
800
|
|
641
801
|
// 关闭二次提示弹窗
|
642
802
|
setShowInformation(false);
|
@@ -648,16 +808,16 @@ var ToCPay = function ToCPay(props, ref) {
|
|
648
808
|
payCallback({
|
649
809
|
key: 'cancel',
|
650
810
|
data: {
|
651
|
-
order_id: (_state$
|
811
|
+
order_id: (_state$payGroup23 = state.payGroup) === null || _state$payGroup23 === void 0 ? void 0 : _state$payGroup23.order_id
|
652
812
|
}
|
653
813
|
});
|
654
814
|
};
|
655
815
|
|
656
816
|
// 待支付金额变化时, 重新计算附加费
|
657
817
|
useUpdateEffect(function () {
|
658
|
-
var _paymentListRef$curre2, _state$
|
659
|
-
(_paymentListRef$curre2 = paymentListRef.current) === null || _paymentListRef$curre2 === void 0 || _paymentListRef$curre2.calculateSurcharge(((_state$
|
660
|
-
}, [(_state$
|
818
|
+
var _paymentListRef$curre2, _state$payGroup24;
|
819
|
+
(_paymentListRef$curre2 = paymentListRef.current) === null || _paymentListRef$curre2 === void 0 || _paymentListRef$curre2.calculateSurcharge(((_state$payGroup24 = state.payGroup) === null || _state$payGroup24 === void 0 ? void 0 : _state$payGroup24.wait_amount) || 0);
|
820
|
+
}, [(_state$payGroup25 = state.payGroup) === null || _state$payGroup25 === void 0 ? void 0 : _state$payGroup25.wait_amount]);
|
661
821
|
useImperativeHandle(ref, function () {
|
662
822
|
return {
|
663
823
|
init: init,
|
@@ -674,7 +834,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
674
834
|
* @Date: 2024-08-16 10:49
|
675
835
|
*/
|
676
836
|
var renderPaymentListTitle = function renderPaymentListTitle() {
|
677
|
-
var _state$
|
837
|
+
var _state$payGroup26;
|
678
838
|
// 待支付金额为0 展示无需选择支付方式
|
679
839
|
if (waitAmount == 0) {
|
680
840
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -687,13 +847,13 @@ var ToCPay = function ToCPay(props, ref) {
|
|
687
847
|
}
|
688
848
|
|
689
849
|
// 有剩余金额, 展示继续支付
|
690
|
-
if (((_state$
|
691
|
-
var _state$
|
850
|
+
if (((_state$payGroup26 = state.payGroup) === null || _state$payGroup26 === void 0 ? void 0 : _state$payGroup26.total_amount) !== waitAmount) {
|
851
|
+
var _state$payGroup27;
|
692
852
|
return /*#__PURE__*/React.createElement("div", {
|
693
853
|
className: "custom-payment-list-title"
|
694
854
|
}, locales.getText('tocPay.text.continuePayment'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
695
855
|
className: "custom-payment-list-title-price",
|
696
|
-
value: ((_state$
|
856
|
+
value: ((_state$payGroup27 = state.payGroup) === null || _state$payGroup27 === void 0 ? void 0 : _state$payGroup27.wait_amount) || 0.0
|
697
857
|
}));
|
698
858
|
}
|
699
859
|
|
@@ -709,12 +869,12 @@ var ToCPay = function ToCPay(props, ref) {
|
|
709
869
|
* @Date: 2024-08-16 10:50
|
710
870
|
*/
|
711
871
|
var onWalletPassChange = useMemoizedFn(function (walletPass) {
|
712
|
-
var _state$
|
713
|
-
var _waitAmount = new Decimal(String(((_state$
|
872
|
+
var _state$payGroup28, _state$payGroup29;
|
873
|
+
var _waitAmount = new Decimal(String(((_state$payGroup28 = state.payGroup) === null || _state$payGroup28 === void 0 ? void 0 : _state$payGroup28.total_amount) || 0)).minus(new Decimal(String(walletPass.amount || 0))).toNumber();
|
714
874
|
dispatch({
|
715
875
|
type: 'setPayGroup',
|
716
876
|
payload: {
|
717
|
-
walletPass: _objectSpread(_objectSpread({}, (_state$
|
877
|
+
walletPass: _objectSpread(_objectSpread({}, (_state$payGroup29 = state.payGroup) === null || _state$payGroup29 === void 0 ? void 0 : _state$payGroup29.walletPass), walletPass),
|
718
878
|
wait_amount: _waitAmount
|
719
879
|
}
|
720
880
|
});
|
@@ -793,8 +953,8 @@ var ToCPay = function ToCPay(props, ref) {
|
|
793
953
|
}, ((_state$order = state.order) === null || _state$order === void 0 ? void 0 : _state$order.countdown) && /*#__PURE__*/React.createElement(PayCountdown, {
|
794
954
|
time: (_state$order2 = state.order) === null || _state$order2 === void 0 ? void 0 : _state$order2.countdown
|
795
955
|
}), /*#__PURE__*/React.createElement(PayAmount, {
|
796
|
-
amount: ((_state$
|
797
|
-
}), ((_state$
|
956
|
+
amount: ((_state$payGroup30 = state.payGroup) === null || _state$payGroup30 === void 0 ? void 0 : _state$payGroup30.total_amount) || 0
|
957
|
+
}), ((_state$payGroup31 = state.payGroup) === null || _state$payGroup31 === void 0 ? void 0 : _state$payGroup31.walletPass) && /*#__PURE__*/React.createElement(WalletPassBlock, {
|
798
958
|
customer_id: customer_id,
|
799
959
|
payGroup: state.payGroup,
|
800
960
|
onWalletPassChange: onWalletPassChange,
|
@@ -806,7 +966,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
806
966
|
handlePaymentByType(detail === null || detail === void 0 ? void 0 : detail.service);
|
807
967
|
},
|
808
968
|
paymentTypeChange: paymentTypeChange,
|
809
|
-
hide: ((_state$
|
969
|
+
hide: ((_state$payGroup32 = state.payGroup) === null || _state$payGroup32 === void 0 ? void 0 : _state$payGroup32.wait_amount) == 0,
|
810
970
|
renderTitle: renderPaymentListTitle
|
811
971
|
})), /*#__PURE__*/React.createElement(PaymentMethods, {
|
812
972
|
ref: paymentMethodsRef,
|