@pisell/private-materials 3.4.60 → 3.4.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.js +16 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +36 -37
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +39 -14
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.js +2 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/kioskSkuDetail/index.js +7 -5
- package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/index.js +54 -5
- package/es/components/pay/toC/PaymentList/index.less +58 -1
- package/es/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/es/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/serve.js +8 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +26 -0
- package/es/components/pay/toC/PaymentList/utils.js +187 -6
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +127 -36
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/index.js +2 -1
- package/es/components/pay/toC/locales.d.ts +6 -0
- package/es/components/pay/toC/locales.js +9 -3
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -1
- package/es/components/walletList/index.js +180 -41
- package/es/components/walletList/locales.d.ts +9 -0
- package/es/components/walletList/locales.js +12 -3
- package/es/components/walletList/serve.d.ts +19 -0
- package/es/components/walletList/serve.js +94 -5
- package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/es/components/walletList/tempHolderSelector/index.js +196 -0
- package/es/components/walletList/tempHolderSelector/index.less +63 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/productSelect/index.js +5 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +236 -0
- package/es/plus/selectHolder/index.less +117 -0
- package/es/plus/selectHolder/locales.d.ts +21 -0
- package/es/plus/selectHolder/locales.js +20 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/es/plus/walletEditor/WalletEditor.js +60 -2
- package/es/plus/walletEditor/locales.d.ts +9 -0
- package/es/plus/walletEditor/locales.js +12 -3
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.js +17 -5
- package/es/plus/walletPassGallery/index.js +223 -41
- package/es/plus/walletPassGallery/index.less +1 -1
- package/es/plus/walletPassGallery/locales.d.ts +15 -0
- package/es/plus/walletPassGallery/locales.js +29 -5
- package/es/plus/walletPassGallery/serve.d.ts +15 -1
- package/es/plus/walletPassGallery/serve.js +59 -2
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/plus/walletPassGallery/utils.js +342 -0
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/es/pro/Selector/demo.d.ts +0 -1
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/skuDetailModal/index.d.ts +4 -0
- package/es/pro/skuDetailModal/index.js +1031 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +21 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +6 -8
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +37 -7
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/kioskSkuDetail/index.js +9 -9
- package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/index.js +36 -5
- package/lib/components/pay/toC/PaymentList/index.less +58 -1
- package/lib/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/lib/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/serve.js +6 -1
- package/lib/components/pay/toC/PaymentList/utils.d.ts +26 -0
- package/lib/components/pay/toC/PaymentList/utils.js +155 -7
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +85 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/index.js +2 -1
- package/lib/components/pay/toC/locales.d.ts +6 -0
- package/lib/components/pay/toC/locales.js +9 -3
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -1
- package/lib/components/walletList/index.js +105 -5
- package/lib/components/walletList/locales.d.ts +9 -0
- package/lib/components/walletList/locales.js +12 -3
- package/lib/components/walletList/serve.d.ts +19 -0
- package/lib/components/walletList/serve.js +26 -3
- package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/lib/components/walletList/tempHolderSelector/index.js +166 -0
- package/lib/components/walletList/tempHolderSelector/index.less +63 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/productSelect/index.js +4 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +202 -0
- package/lib/plus/selectHolder/index.less +117 -0
- package/lib/plus/selectHolder/locales.d.ts +21 -0
- package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/lib/plus/walletEditor/WalletEditor.js +53 -0
- package/lib/plus/walletEditor/locales.d.ts +9 -0
- package/lib/plus/walletEditor/locales.js +12 -3
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/index.js +154 -27
- package/lib/plus/walletPassGallery/index.less +1 -1
- package/lib/plus/walletPassGallery/locales.d.ts +15 -0
- package/lib/plus/walletPassGallery/locales.js +32 -5
- package/lib/plus/walletPassGallery/serve.d.ts +15 -1
- package/lib/plus/walletPassGallery/serve.js +17 -5
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/plus/walletPassGallery/utils.js +287 -0
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lib/pro/Selector/demo.d.ts +0 -1
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/skuDetailModal/index.d.ts +4 -0
- package/lib/pro/skuDetailModal/index.js +736 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +4 -4
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/index.js +0 -1182
- package/es/components/wallet/Detail/index.less +0 -386
- package/es/components/wallet/Detail/locales.d.ts +0 -153
- package/es/components/wallet/Detail/locales.js +0 -170
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/model.js +0 -22
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/Detail/serve.js +0 -64
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DetailContext.js +0 -162
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/index.js +0 -218
- package/es/components/wallet/DiscountCard/index.less +0 -9
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/DiscountCard/model.js +0 -22
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/index.js +0 -169
- package/es/components/wallet/PointCard/index.less +0 -9
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/PointCard/model.js +0 -22
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.js +0 -463
- package/es/components/wallet/RechargeableCard/index.less +0 -108
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/model.js +0 -28
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/RechargeableCard/serve.js +0 -32
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/index.js +0 -131
- package/es/components/wallet/Voucher/index.less +0 -9
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/locales.js +0 -20
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/Voucher/model.js +0 -22
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/FooterButtons/index.js +0 -81
- package/es/components/wallet/components/FooterButtons/index.less +0 -91
- package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/es/components/wallet/components/UsageRules/index.js +0 -147
- package/es/components/wallet/components/UsageRules/index.less +0 -157
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletBar/index.js +0 -19
- package/es/components/wallet/components/WalletBar/index.less +0 -36
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/WalletCard.js +0 -91
- package/es/components/wallet/components/index.d.ts +0 -3
- package/es/components/wallet/components/index.js +0 -4
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
- package/es/components/wallet/hooks/useWalletCard.js +0 -147
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/index.js +0 -807
- package/es/components/wallet/index.less +0 -151
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/locales.js +0 -139
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/model.js +0 -86
- package/es/components/wallet/serve.d.ts +0 -150
- package/es/components/wallet/serve.js +0 -205
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/index.js +0 -874
- package/lib/components/wallet/Detail/index.less +0 -386
- package/lib/components/wallet/Detail/locales.d.ts +0 -153
- package/lib/components/wallet/Detail/locales.js +0 -194
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/model.js +0 -43
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/Detail/serve.js +0 -44
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DetailContext.js +0 -118
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/index.js +0 -209
- package/lib/components/wallet/DiscountCard/index.less +0 -9
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/DiscountCard/model.js +0 -43
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/index.js +0 -190
- package/lib/components/wallet/PointCard/index.less +0 -9
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.js +0 -380
- package/lib/components/wallet/RechargeableCard/index.less +0 -108
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/model.js +0 -49
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/index.js +0 -146
- package/lib/components/wallet/Voucher/index.less +0 -9
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/Voucher/model.js +0 -43
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/FooterButtons/index.js +0 -109
- package/lib/components/wallet/components/FooterButtons/index.less +0 -91
- package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/lib/components/wallet/components/UsageRules/index.js +0 -113
- package/lib/components/wallet/components/UsageRules/index.less +0 -157
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletBar/index.less +0 -36
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/WalletCard.js +0 -97
- package/lib/components/wallet/components/index.d.ts +0 -3
- package/lib/components/wallet/components/index.js +0 -45
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
- package/lib/components/wallet/hooks/useWalletCard.js +0 -111
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/index.js +0 -580
- package/lib/components/wallet/index.less +0 -151
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/locales.js +0 -163
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/model.js +0 -91
- package/lib/components/wallet/serve.d.ts +0 -150
- package/lib/components/wallet/serve.js +0 -85
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/wallet/utils/formatUtils.js +0 -73
|
@@ -90,11 +90,11 @@ var PaymentList = (props, ref) => {
|
|
|
90
90
|
var _a2, _b2;
|
|
91
91
|
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2);
|
|
92
92
|
}, []);
|
|
93
|
-
const init = (list) => {
|
|
93
|
+
const init = (list, amount) => {
|
|
94
94
|
var _a2, _b2;
|
|
95
95
|
setLoading(true);
|
|
96
96
|
const platform = ((_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform) || "h5";
|
|
97
|
-
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp);
|
|
97
|
+
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp, amount);
|
|
98
98
|
if (paymentList2.length > 0) {
|
|
99
99
|
let first = paymentList2[0];
|
|
100
100
|
setPaymentList(paymentList2);
|
|
@@ -147,6 +147,24 @@ var PaymentList = (props, ref) => {
|
|
|
147
147
|
}
|
|
148
148
|
));
|
|
149
149
|
};
|
|
150
|
+
const renderCreditCardToast = (_item) => {
|
|
151
|
+
var _a2;
|
|
152
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-wrap surcharge-modal-wrap-credit-card" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-lists" }, (_a2 = _item == null ? void 0 : _item.surcharge_config_result) == null ? void 0 : _a2.map((d) => {
|
|
153
|
+
var _a3, _b2;
|
|
154
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: d.name, className: "surcharge-modal-list-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-list-item-header" }, (_a3 = d == null ? void 0 : d.icons) == null ? void 0 : _a3.map((icon) => {
|
|
155
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
156
|
+
import_materials.Image,
|
|
157
|
+
{
|
|
158
|
+
src: icon,
|
|
159
|
+
className: "header-icon",
|
|
160
|
+
isPreview: false
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}), /* @__PURE__ */ import_react.default.createElement("span", null, d.name)), /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-list-item-content" }, (_b2 = d == null ? void 0 : d.lists) == null ? void 0 : _b2.map((item) => {
|
|
164
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: item.name, className: "content-item" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils2.locales.getText(item.area_text)), /* @__PURE__ */ import_react.default.createElement("span", { className: "item-fee" }, item.surcharge_fee), /* @__PURE__ */ import_react.default.createElement("span", null, item.surcharge_text));
|
|
165
|
+
})));
|
|
166
|
+
})));
|
|
167
|
+
};
|
|
150
168
|
const content = (0, import_react.useMemo)(() => {
|
|
151
169
|
if (loading) {
|
|
152
170
|
return null;
|
|
@@ -172,8 +190,9 @@ var PaymentList = (props, ref) => {
|
|
|
172
190
|
onChange: paymentTypeChange,
|
|
173
191
|
optionClassName: "payment-item",
|
|
174
192
|
renderOption: (d, active) => {
|
|
175
|
-
var _a2, _b2;
|
|
193
|
+
var _a2, _b2, _c2;
|
|
176
194
|
const showIcon = d.surcharge && d.service !== "pisell.other.cashmanual" && d.service !== "pisell.custom_payment" || ((_a2 = d == null ? void 0 : d.params) == null ? void 0 : _a2.description) && (d.service === "pisell.other.cashmanual" || d.service === "pisell.custom_payment");
|
|
195
|
+
const showCreditCardToast = (d == null ? void 0 : d.service) === "mw.credit_card" && ((_b2 = d == null ? void 0 : d.surcharge_config_result) == null ? void 0 : _b2.length) > 0;
|
|
177
196
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
178
197
|
import_materials.PisellRow,
|
|
179
198
|
{
|
|
@@ -199,12 +218,24 @@ var PaymentList = (props, ref) => {
|
|
|
199
218
|
d.title,
|
|
200
219
|
" "
|
|
201
220
|
),
|
|
202
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "" }, (((
|
|
221
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "" }, (((_c2 = d == null ? void 0 : d.params) == null ? void 0 : _c2.description) || d.surcharge) && d.service !== "pisell.offline_payment" ? /* @__PURE__ */ import_react.default.createElement(
|
|
203
222
|
import_materials.PisellTooltip,
|
|
204
223
|
{
|
|
205
|
-
title: renderToast(d),
|
|
224
|
+
title: showCreditCardToast ? renderCreditCardToast(d) : renderToast(d),
|
|
206
225
|
onClick: (e) => {
|
|
207
226
|
e.stopPropagation();
|
|
227
|
+
},
|
|
228
|
+
overlayClassName: showCreditCardToast ? "surcharge-tooltip-overlay-wrap" : "",
|
|
229
|
+
getPopupContainer: (triggerNode) => {
|
|
230
|
+
var _a3;
|
|
231
|
+
if (showCreditCardToast) {
|
|
232
|
+
const modalContainer = (_a3 = triggerNode == null ? void 0 : triggerNode.closest) == null ? void 0 : _a3.call(
|
|
233
|
+
triggerNode,
|
|
234
|
+
".toc-pay-modal-content .pisell-lowcode-modal"
|
|
235
|
+
);
|
|
236
|
+
return modalContainer || document.body;
|
|
237
|
+
}
|
|
238
|
+
return document.body;
|
|
208
239
|
}
|
|
209
240
|
},
|
|
210
241
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -109,4 +109,61 @@
|
|
|
109
109
|
font-style: normal;
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.surcharge-tooltip-overlay-wrap{
|
|
115
|
+
max-width: 92% !important;
|
|
116
|
+
width: 92%;
|
|
117
|
+
left: 4% !important;
|
|
118
|
+
.pisell-lowcode-tooltip-inner{
|
|
119
|
+
background: #F2F4F7 !important;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.surcharge-modal-wrap-credit-card {
|
|
124
|
+
.surcharge-modal-lists {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: 16px;
|
|
128
|
+
.surcharge-modal-list-item {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 8px;
|
|
132
|
+
.surcharge-modal-list-item-header {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 12px;
|
|
136
|
+
color: #101828;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
line-height: 20px;
|
|
140
|
+
.header-icon{
|
|
141
|
+
width: 58px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.surcharge-modal-list-item-content {
|
|
145
|
+
display: flex;
|
|
146
|
+
gap: 12px;
|
|
147
|
+
.content-item {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
flex: 1;
|
|
151
|
+
padding: 8px 12px;
|
|
152
|
+
border-radius: 8px;
|
|
153
|
+
box-shadow: 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
|
|
154
|
+
background: white;
|
|
155
|
+
color: #475467;
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
font-weight: 400;
|
|
158
|
+
line-height: 18px;
|
|
159
|
+
.item-fee {
|
|
160
|
+
color: black;
|
|
161
|
+
font-size: 24px;
|
|
162
|
+
font-weight: 700;
|
|
163
|
+
line-height: 32px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -20,7 +20,7 @@ export declare const getPaymentList: (values: any) => Promise<{
|
|
|
20
20
|
* @Author: zhiwei.Wang
|
|
21
21
|
* @Date: 2024-08-16 10:57
|
|
22
22
|
*/
|
|
23
|
-
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean) => {
|
|
23
|
+
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean, amount?: number) => {
|
|
24
24
|
message: string;
|
|
25
25
|
status: string;
|
|
26
26
|
paymentList: any[];
|
|
@@ -27,6 +27,7 @@ var import_utils = require("../../../../utils");
|
|
|
27
27
|
var import_status = require("./status");
|
|
28
28
|
var import_utils2 = require("@pisell/utils");
|
|
29
29
|
var import_status2 = require("./status");
|
|
30
|
+
var import_utils3 = require("./utils");
|
|
30
31
|
var getPaymentList = async (values) => {
|
|
31
32
|
let { data = [] } = await import_utils.request.getRequest().get("/h5/pay/order/payments", values);
|
|
32
33
|
return filterPaymentList(data);
|
|
@@ -43,7 +44,7 @@ var sortArr = [
|
|
|
43
44
|
"pisell.other.cashmanual",
|
|
44
45
|
"pisell.custom_payment"
|
|
45
46
|
];
|
|
46
|
-
var filterPaymentList = (list, platform = "h5", isApp) => {
|
|
47
|
+
var filterPaymentList = (list, platform = "h5", isApp, amount) => {
|
|
47
48
|
let paymentList = [...list];
|
|
48
49
|
let _paymentKeys = [...import_status.paymentKeys];
|
|
49
50
|
const walletPass = paymentList.find((d) => d.service === "pisell.wallet_pass");
|
|
@@ -82,6 +83,10 @@ var filterPaymentList = (list, platform = "h5", isApp) => {
|
|
|
82
83
|
if ((0, import_status2.isCustomPayment)(d.service)) {
|
|
83
84
|
service = service + "|" + d.params.custom_payment_id;
|
|
84
85
|
}
|
|
86
|
+
if (service === "mw.credit_card") {
|
|
87
|
+
d.surcharge = (0, import_utils3.formatCreditCardSurchargeText)(d == null ? void 0 : d.surcharge_config, d == null ? void 0 : d.surcharge_text);
|
|
88
|
+
d.surcharge_config_result = (0, import_utils3.formatCreditCardSurchargeList)(d, amount ?? 0);
|
|
89
|
+
}
|
|
85
90
|
return {
|
|
86
91
|
...d,
|
|
87
92
|
service,
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: visa/master手续费是否一致
|
|
3
|
+
* @param {any} creditCardConfig
|
|
4
|
+
* @return {*}
|
|
5
|
+
*/
|
|
6
|
+
export declare const isCreditCardSurchargeSame: (creditCardConfig: any[]) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 格式化visa/master手续费
|
|
9
|
+
* @param {any} item 支付列表项
|
|
10
|
+
* @param {number} amount 订单金额
|
|
11
|
+
* @param {boolean} isSame 手续费是否一致
|
|
12
|
+
* @return {*}
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatCreditCardSurcharge: (item: any, amount: number, isSame: boolean) => any;
|
|
15
|
+
/**
|
|
16
|
+
* @description: 格式化visa/master手续费列表
|
|
17
|
+
* @param {any} item
|
|
18
|
+
* @param {number} amount
|
|
19
|
+
* @return {*}
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatCreditCardSurchargeList: (item: any, amount: number) => any;
|
|
22
|
+
/**
|
|
23
|
+
* @description: 格式化visa/master手续费文案,只显示百分比区间
|
|
24
|
+
* @return {*}
|
|
25
|
+
*/
|
|
26
|
+
export declare const formatCreditCardSurchargeText: (surcharge_config: any[], surcharge_text: string) => string;
|
|
1
27
|
/**
|
|
2
28
|
* @title: 计算支付列表的手续费
|
|
3
29
|
* @description:
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,14 +16,147 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
28
|
|
|
19
29
|
// src/components/pay/toC/PaymentList/utils.ts
|
|
20
30
|
var utils_exports = {};
|
|
21
31
|
__export(utils_exports, {
|
|
22
|
-
calculateSurcharge: () => calculateSurcharge
|
|
32
|
+
calculateSurcharge: () => calculateSurcharge,
|
|
33
|
+
formatCreditCardSurcharge: () => formatCreditCardSurcharge,
|
|
34
|
+
formatCreditCardSurchargeList: () => formatCreditCardSurchargeList,
|
|
35
|
+
formatCreditCardSurchargeText: () => formatCreditCardSurchargeText,
|
|
36
|
+
isCreditCardSurchargeSame: () => isCreditCardSurchargeSame
|
|
23
37
|
});
|
|
24
38
|
module.exports = __toCommonJS(utils_exports);
|
|
39
|
+
var import_visa = __toESM(require("./payment/visa.png"));
|
|
40
|
+
var import_credit_card = __toESM(require("./payment/credit_card.png"));
|
|
41
|
+
var isCreditCardSurchargeSame = (creditCardConfig) => {
|
|
42
|
+
try {
|
|
43
|
+
const configMap = {};
|
|
44
|
+
creditCardConfig.forEach((config) => {
|
|
45
|
+
const key = `${(config == null ? void 0 : config.credit_card_type) || "-"}_${(config == null ? void 0 : config.area) || "-"}`;
|
|
46
|
+
configMap[key] = config;
|
|
47
|
+
});
|
|
48
|
+
const visaDomestic = configMap["visa_domestic"];
|
|
49
|
+
const visaWorld = configMap["visa_world"];
|
|
50
|
+
const masterDomestic = configMap["master_domestic"];
|
|
51
|
+
const masterWorld = configMap["master_world"];
|
|
52
|
+
const formatFee = (config) => {
|
|
53
|
+
if (!config) return null;
|
|
54
|
+
const percent = parseFloat(config.percent ?? config.percentage ?? "0");
|
|
55
|
+
const amount = parseFloat(config.amount ?? "0");
|
|
56
|
+
return {
|
|
57
|
+
percentStr: percent,
|
|
58
|
+
amountStr: amount
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
const visaDomesticFee = formatFee(visaDomestic);
|
|
62
|
+
const visaWorldFee = formatFee(visaWorld);
|
|
63
|
+
const masterDomesticFee = formatFee(masterDomestic);
|
|
64
|
+
const masterWorldFee = formatFee(masterWorld);
|
|
65
|
+
const isFeeSame = (fee1, fee2) => {
|
|
66
|
+
if (!fee1 || !fee2) return false;
|
|
67
|
+
return fee1.percentStr === fee2.percentStr && fee1.amountStr === fee2.amountStr;
|
|
68
|
+
};
|
|
69
|
+
const isDomesticSame = isFeeSame(visaDomesticFee, masterDomesticFee);
|
|
70
|
+
const isWorldSame = isFeeSame(visaWorldFee, masterWorldFee);
|
|
71
|
+
const isAllSame = isDomesticSame && isWorldSame;
|
|
72
|
+
return isAllSame;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var totalFee = (config, amount) => {
|
|
78
|
+
const percentageFee = parseFloat(config.percent ?? config.percentage) * Number(amount);
|
|
79
|
+
const totalFee2 = percentageFee + parseFloat(config.amount);
|
|
80
|
+
return totalFee2;
|
|
81
|
+
};
|
|
82
|
+
var formatCreditCardSurcharge = (item, amount, isSame) => {
|
|
83
|
+
try {
|
|
84
|
+
const { surcharge_config, currency_symbol } = item;
|
|
85
|
+
const formatSurchargeList = (list) => {
|
|
86
|
+
return list == null ? void 0 : list.map((config) => {
|
|
87
|
+
const percentageFee = parseFloat(
|
|
88
|
+
(config == null ? void 0 : config.percent) ?? (config == null ? void 0 : config.percentage) ?? 0
|
|
89
|
+
);
|
|
90
|
+
const percent = (percentageFee * 100).toFixed(2);
|
|
91
|
+
const amountFee = parseFloat(config == null ? void 0 : config.amount).toFixed(2);
|
|
92
|
+
const _totalFee = totalFee(config, amount).toFixed(2);
|
|
93
|
+
const areaText = (config == null ? void 0 : config.area) === "world" ? "tocPay.text.rest-of-world" : "tocPay.text.domestic";
|
|
94
|
+
return {
|
|
95
|
+
...config,
|
|
96
|
+
area_text: areaText,
|
|
97
|
+
surcharge_text: `${percent}% + ${currency_symbol}${amountFee}`,
|
|
98
|
+
surcharge_fee: `${currency_symbol}${_totalFee}`
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
if (isSame) {
|
|
103
|
+
const visaResult = surcharge_config.filter((config) => {
|
|
104
|
+
return config.credit_card_type === "visa";
|
|
105
|
+
});
|
|
106
|
+
return [
|
|
107
|
+
{
|
|
108
|
+
icons: [import_visa.default, import_credit_card.default],
|
|
109
|
+
name: "Visa / Mastercard",
|
|
110
|
+
lists: formatSurchargeList(visaResult)
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
} else {
|
|
114
|
+
const visaResult = surcharge_config.filter((config) => {
|
|
115
|
+
return config.credit_card_type === "visa";
|
|
116
|
+
});
|
|
117
|
+
const masterResult = surcharge_config.filter((config) => {
|
|
118
|
+
return config.credit_card_type === "master";
|
|
119
|
+
});
|
|
120
|
+
return [
|
|
121
|
+
{
|
|
122
|
+
icons: [import_visa.default],
|
|
123
|
+
name: "Visa",
|
|
124
|
+
lists: formatSurchargeList(visaResult)
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
icons: [import_credit_card.default],
|
|
128
|
+
name: "Mastercard",
|
|
129
|
+
lists: formatSurchargeList(masterResult)
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.error(error);
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var formatCreditCardSurchargeList = (item, amount) => {
|
|
139
|
+
const isSame = isCreditCardSurchargeSame((item == null ? void 0 : item.surcharge_config) || []);
|
|
140
|
+
return formatCreditCardSurcharge(item || {}, amount, isSame);
|
|
141
|
+
};
|
|
142
|
+
var formatCreditCardSurchargeText = (surcharge_config, surcharge_text) => {
|
|
143
|
+
try {
|
|
144
|
+
if (!Array.isArray(surcharge_config) || surcharge_config.length === 0) {
|
|
145
|
+
return surcharge_text;
|
|
146
|
+
}
|
|
147
|
+
const percentList = surcharge_config.map((config) => {
|
|
148
|
+
return parseFloat(config.percent ?? config.percentage ?? "0") * 100;
|
|
149
|
+
});
|
|
150
|
+
const minPercent = Math.min(...percentList);
|
|
151
|
+
const maxPercent = Math.max(...percentList);
|
|
152
|
+
if (minPercent === maxPercent) {
|
|
153
|
+
return `${surcharge_text}${minPercent}%`;
|
|
154
|
+
}
|
|
155
|
+
return `${surcharge_text}${minPercent}% ~ ${maxPercent}%`;
|
|
156
|
+
} catch (error) {
|
|
157
|
+
return surcharge_text;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
25
160
|
var calculateSurcharge = (paymentList, amount) => {
|
|
26
161
|
return paymentList.map((payment) => {
|
|
27
162
|
const { surcharge_config, currency_symbol, surcharge_text } = payment;
|
|
@@ -30,23 +165,36 @@ var calculateSurcharge = (paymentList, amount) => {
|
|
|
30
165
|
return payment;
|
|
31
166
|
}
|
|
32
167
|
const fees = surcharge_config.map((config) => {
|
|
33
|
-
|
|
34
|
-
const totalFee = percentageFee + parseFloat(config.amount);
|
|
35
|
-
return totalFee;
|
|
168
|
+
return totalFee(config, amount);
|
|
36
169
|
});
|
|
37
170
|
const minFee = Math.min(...fees);
|
|
38
171
|
const maxFee = Math.max(...fees);
|
|
39
172
|
if (minFee === 0 && maxFee === 0) {
|
|
40
173
|
payment.surcharge = "";
|
|
41
174
|
} else if (minFee === maxFee) {
|
|
42
|
-
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(
|
|
175
|
+
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(
|
|
176
|
+
2
|
|
177
|
+
)}`;
|
|
43
178
|
} else {
|
|
44
|
-
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(
|
|
179
|
+
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(
|
|
180
|
+
2
|
|
181
|
+
)} ~ ${currency_symbol}${maxFee.toFixed(2)}`;
|
|
182
|
+
}
|
|
183
|
+
if (payment.service === "mw.credit_card") {
|
|
184
|
+
payment.surcharge = formatCreditCardSurchargeText(surcharge_config, surcharge_text);
|
|
185
|
+
payment.surcharge_config_result = formatCreditCardSurchargeList(
|
|
186
|
+
payment,
|
|
187
|
+
amount
|
|
188
|
+
);
|
|
45
189
|
}
|
|
46
190
|
return payment;
|
|
47
191
|
});
|
|
48
192
|
};
|
|
49
193
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
194
|
0 && (module.exports = {
|
|
51
|
-
calculateSurcharge
|
|
195
|
+
calculateSurcharge,
|
|
196
|
+
formatCreditCardSurcharge,
|
|
197
|
+
formatCreditCardSurchargeList,
|
|
198
|
+
formatCreditCardSurchargeText,
|
|
199
|
+
isCreditCardSurchargeSame
|
|
52
200
|
});
|
|
@@ -75,14 +75,38 @@ var log = (data) => {
|
|
|
75
75
|
content: [{ key: "res", value: JSON.stringify(_template) }]
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
+
var setHistoryLog = (log2) => {
|
|
79
|
+
if (!paymentData.logList) {
|
|
80
|
+
paymentData.logList = [];
|
|
81
|
+
}
|
|
82
|
+
paymentData.logList.push(log2);
|
|
83
|
+
};
|
|
84
|
+
var getCurrentTime = () => {
|
|
85
|
+
return (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss");
|
|
86
|
+
};
|
|
78
87
|
var startPayment = async ({ orderId, cardInfo, payData }, callback) => {
|
|
79
88
|
let paymentInfo2 = {
|
|
80
89
|
amount: 0,
|
|
81
90
|
order_id: 0
|
|
82
91
|
};
|
|
83
92
|
try {
|
|
84
|
-
paymentData = {
|
|
93
|
+
paymentData = {
|
|
94
|
+
orderId,
|
|
95
|
+
logList: []
|
|
96
|
+
};
|
|
97
|
+
setHistoryLog({
|
|
98
|
+
msg: "startPayment 开始",
|
|
99
|
+
time: getCurrentTime(),
|
|
100
|
+
hasPayData: !!payData,
|
|
101
|
+
payDataOrderId: payData == null ? void 0 : payData.order_id,
|
|
102
|
+
payDataPayNumber: payData == null ? void 0 : payData.pay_number
|
|
103
|
+
});
|
|
85
104
|
const step2 = payData ? payData : await checkEnrollment(orderId, cardInfo, callback);
|
|
105
|
+
setHistoryLog({
|
|
106
|
+
msg: "步骤2完成: 提交卡信息到后端",
|
|
107
|
+
time: getCurrentTime(),
|
|
108
|
+
hasStep2: !!step2
|
|
109
|
+
});
|
|
86
110
|
if (step2 === 0) {
|
|
87
111
|
return;
|
|
88
112
|
}
|
|
@@ -90,22 +114,62 @@ var startPayment = async ({ orderId, cardInfo, payData }, callback) => {
|
|
|
90
114
|
paymentInfo2.amount = step2.amount;
|
|
91
115
|
paymentInfo2.order_id = step2.order_id;
|
|
92
116
|
console.log("第三步");
|
|
117
|
+
setHistoryLog({
|
|
118
|
+
msg: "步骤3开始: 创建iframe监听postMessage",
|
|
119
|
+
time: getCurrentTime()
|
|
120
|
+
});
|
|
93
121
|
let step3 = await createThreeDSMethodIframe(step2, callback);
|
|
94
122
|
paymentData.step3 = step3;
|
|
123
|
+
setHistoryLog({
|
|
124
|
+
msg: "步骤3完成: iframe监听结束",
|
|
125
|
+
time: getCurrentTime(),
|
|
126
|
+
step3Result: step3
|
|
127
|
+
});
|
|
95
128
|
if (step3 === "N") {
|
|
96
129
|
return;
|
|
97
130
|
}
|
|
131
|
+
setHistoryLog({
|
|
132
|
+
msg: "步骤4开始: 调用checkTDSAuth",
|
|
133
|
+
time: getCurrentTime(),
|
|
134
|
+
order_id: step2 == null ? void 0 : step2.order_id,
|
|
135
|
+
pay_number: step2 == null ? void 0 : step2.pay_number
|
|
136
|
+
});
|
|
98
137
|
const step4 = await checkTDSAuth(step2, step3, callback);
|
|
138
|
+
setHistoryLog({
|
|
139
|
+
msg: "步骤4完成: checkTDSAuth 返回",
|
|
140
|
+
time: getCurrentTime(),
|
|
141
|
+
hasStep4: !!step4
|
|
142
|
+
});
|
|
99
143
|
if (step4 === 0) {
|
|
100
144
|
return;
|
|
101
145
|
}
|
|
102
146
|
paymentData.step4 = step4;
|
|
103
147
|
if (step4) {
|
|
148
|
+
setHistoryLog({
|
|
149
|
+
msg: "步骤5开始: 创建challenge iframe",
|
|
150
|
+
time: getCurrentTime()
|
|
151
|
+
});
|
|
104
152
|
const step5 = await createChallengeIframe(step4, callback);
|
|
105
153
|
paymentData.step5 = step5;
|
|
154
|
+
setHistoryLog({
|
|
155
|
+
msg: "步骤5完成: challenge iframe结束",
|
|
156
|
+
time: getCurrentTime()
|
|
157
|
+
});
|
|
158
|
+
setHistoryLog({
|
|
159
|
+
msg: "步骤6开始: 调用check_pares接口",
|
|
160
|
+
time: getCurrentTime()
|
|
161
|
+
});
|
|
106
162
|
await checkPARes(step2, step4, step5);
|
|
163
|
+
setHistoryLog({
|
|
164
|
+
msg: "步骤6完成: check_pares接口返回",
|
|
165
|
+
time: getCurrentTime()
|
|
166
|
+
});
|
|
107
167
|
}
|
|
108
168
|
callback({ key: "hideModal" });
|
|
169
|
+
setHistoryLog({
|
|
170
|
+
msg: "支付成功",
|
|
171
|
+
time: getCurrentTime()
|
|
172
|
+
});
|
|
109
173
|
paymentEnd(
|
|
110
174
|
{
|
|
111
175
|
status: "success",
|
|
@@ -116,6 +180,11 @@ var startPayment = async ({ orderId, cardInfo, payData }, callback) => {
|
|
|
116
180
|
return true;
|
|
117
181
|
} catch (err) {
|
|
118
182
|
console.log("error", err);
|
|
183
|
+
setHistoryLog({
|
|
184
|
+
msg: "支付异常",
|
|
185
|
+
time: getCurrentTime(),
|
|
186
|
+
error: err
|
|
187
|
+
});
|
|
119
188
|
callback({ key: "hideModal" });
|
|
120
189
|
closeIframe();
|
|
121
190
|
if (err === 0) return;
|
|
@@ -229,6 +298,12 @@ var checkTDSAuth = async (step2, step3, callback) => {
|
|
|
229
298
|
if (REACT_APP_API_ENV === "pre" && pay_info.check_tds_auth.card_name === "aa bb") {
|
|
230
299
|
isPre = true;
|
|
231
300
|
}
|
|
301
|
+
setHistoryLog({
|
|
302
|
+
msg: "步骤4开始: 调用tds_auth_pay接口",
|
|
303
|
+
time: getCurrentTime(),
|
|
304
|
+
order_id,
|
|
305
|
+
pay_number
|
|
306
|
+
});
|
|
232
307
|
let { data } = await import_utils.request.getRequest().post("/h5/pay/order/mw-3ds-pay/v2/tds_auth_pay", {
|
|
233
308
|
order_id,
|
|
234
309
|
pay_number,
|
|
@@ -266,11 +341,20 @@ var checkTDSAuth = async (step2, step3, callback) => {
|
|
|
266
341
|
notifyURL
|
|
267
342
|
}
|
|
268
343
|
});
|
|
344
|
+
setHistoryLog({
|
|
345
|
+
msg: "步骤4完成: tds_auth_pay接口返回",
|
|
346
|
+
time: getCurrentTime(),
|
|
347
|
+
hasStep4: !!data
|
|
348
|
+
});
|
|
269
349
|
if (!data) {
|
|
270
350
|
return null;
|
|
271
351
|
}
|
|
272
352
|
return data;
|
|
273
353
|
} catch (err) {
|
|
354
|
+
setHistoryLog({
|
|
355
|
+
msg: "步骤4异常",
|
|
356
|
+
time: getCurrentTime()
|
|
357
|
+
});
|
|
274
358
|
log({
|
|
275
359
|
msg: err,
|
|
276
360
|
data: paymentData
|
|
@@ -206,7 +206,7 @@ var ToCPay = (props, ref) => {
|
|
|
206
206
|
wait_amount: remain_amount
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
-
await ((_b2 = paymentListRef.current) == null ? void 0 : _b2.init(payment_list));
|
|
209
|
+
await ((_b2 = paymentListRef.current) == null ? void 0 : _b2.init(payment_list, remain_amount || 0));
|
|
210
210
|
setTimeout(() => {
|
|
211
211
|
setLoading(false);
|
|
212
212
|
}, 100);
|
|
@@ -515,6 +515,7 @@ var ToCPay = (props, ref) => {
|
|
|
515
515
|
open,
|
|
516
516
|
cancelVisible: false,
|
|
517
517
|
okText,
|
|
518
|
+
wrapClassName: "toc-pay-modal-content",
|
|
518
519
|
bodyStyle: {
|
|
519
520
|
padding: 24
|
|
520
521
|
},
|
|
@@ -98,6 +98,8 @@ declare const _default: {
|
|
|
98
98
|
'tocPay.text.paymentCompletedAndViewOrder': string;
|
|
99
99
|
'tocPay.text.paymentFailed': string;
|
|
100
100
|
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
|
|
101
|
+
'tocPay.text.domestic': string;
|
|
102
|
+
'tocPay.text.rest-of-world': string;
|
|
101
103
|
};
|
|
102
104
|
'zh-CN': {
|
|
103
105
|
'tocPay.text.checkout': string;
|
|
@@ -197,6 +199,8 @@ declare const _default: {
|
|
|
197
199
|
'tocPay.text.paymentCompletedAndViewOrder': string;
|
|
198
200
|
'tocPay.text.paymentFailed': string;
|
|
199
201
|
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
|
|
202
|
+
'tocPay.text.domestic': string;
|
|
203
|
+
'tocPay.text.rest-of-world': string;
|
|
200
204
|
};
|
|
201
205
|
'zh-HK': {
|
|
202
206
|
'tocPay.text.checkout': string;
|
|
@@ -296,6 +300,8 @@ declare const _default: {
|
|
|
296
300
|
'tocPay.text.paymentCompletedAndViewOrder': string;
|
|
297
301
|
'tocPay.text.paymentFailed': string;
|
|
298
302
|
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
|
|
303
|
+
'tocPay.text.domestic': string;
|
|
304
|
+
'tocPay.text.rest-of-world': string;
|
|
299
305
|
};
|
|
300
306
|
};
|
|
301
307
|
export default _default;
|
|
@@ -121,7 +121,9 @@ var locales_default = {
|
|
|
121
121
|
"tocPay.text.returnAndSelectOtherPaymentMethod": "Go Back / Choose Another Payment",
|
|
122
122
|
"tocPay.text.paymentCompletedAndViewOrder": "Payment Completed / View Order",
|
|
123
123
|
"tocPay.text.paymentFailed": "Not paid yet, please check if the payment is successful",
|
|
124
|
-
"tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "We are verifying your payment. Please check your order status later."
|
|
124
|
+
"tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "We are verifying your payment. Please check your order status later.",
|
|
125
|
+
"tocPay.text.domestic": "Domestic",
|
|
126
|
+
"tocPay.text.rest-of-world": "Rest of world"
|
|
125
127
|
},
|
|
126
128
|
"zh-CN": {
|
|
127
129
|
"tocPay.text.checkout": "结账",
|
|
@@ -220,7 +222,9 @@ var locales_default = {
|
|
|
220
222
|
"tocPay.text.returnAndSelectOtherPaymentMethod": "返回 / 选择其他支付方式",
|
|
221
223
|
"tocPay.text.paymentCompletedAndViewOrder": "支付完成 / 查看订单",
|
|
222
224
|
"tocPay.text.paymentFailed": "未支付完成,请检查是否支付成功",
|
|
223
|
-
"tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "我们正在确认您的支付状态,请稍后查看订单状态。"
|
|
225
|
+
"tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "我们正在确认您的支付状态,请稍后查看订单状态。",
|
|
226
|
+
"tocPay.text.domestic": "本国",
|
|
227
|
+
"tocPay.text.rest-of-world": "国外"
|
|
224
228
|
},
|
|
225
229
|
"zh-HK": {
|
|
226
230
|
"tocPay.text.checkout": "結帳",
|
|
@@ -319,6 +323,8 @@ var locales_default = {
|
|
|
319
323
|
"tocPay.text.returnAndSelectOtherPaymentMethod": "返回 / 選擇其他支付方式",
|
|
320
324
|
"tocPay.text.paymentCompletedAndViewOrder": "支付完成 / 查看訂單",
|
|
321
325
|
"tocPay.text.paymentFailed": "未支付完成,请检查是否支付成功",
|
|
322
|
-
"tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "我們正在確認您的支付狀態,請稍後查看訂單狀態。"
|
|
326
|
+
"tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "我們正在確認您的支付狀態,請稍後查看訂單狀態。",
|
|
327
|
+
"tocPay.text.domestic": "本國",
|
|
328
|
+
"tocPay.text.rest-of-world": "國外"
|
|
323
329
|
}
|
|
324
330
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
export declare const Provider: any, Context: any;
|