@pisell/private-materials 6.4.42 → 6.5.2
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/actionButtons/index.js +8 -4
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/customiseItemModal/index.js +2 -2
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +42 -48
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +4 -18
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +20 -33
- package/es/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/checkout/PaymentModal.js +443 -723
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -1
- package/es/components/checkout/components/AdditionalModule/index.js +49 -80
- package/es/components/checkout/components/AdditionalModule/index.less +34 -33
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +0 -3
- package/es/components/checkout/components/AdditionalModule/locales.js +4 -7
- package/es/components/checkout/components/AmountSummary/index.d.ts +1 -2
- package/es/components/checkout/components/AmountSummary/index.js +31 -69
- package/es/components/checkout/components/AmountSummary/index.less +9 -27
- package/es/components/checkout/components/CashPaymentModule/index.less +2 -0
- package/es/components/checkout/components/PaymentDetailModal/index.js +10 -55
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -2
- package/es/components/checkout/components/PaymentOptionsModule/index.js +25 -40
- package/es/components/checkout/components/PaymentOptionsModule/index.less +6 -11
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +9 -42
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +82 -512
- package/es/components/checkout/components/PaymentResultToast/index.d.ts +1 -2
- package/es/components/checkout/components/PaymentResultToast/index.js +35 -90
- package/es/components/checkout/components/PaymentResultToast/index.less +77 -445
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +0 -26
- package/es/components/checkout/components/PaymentResultToast/utils.js +2 -81
- package/es/components/checkout/components/ScrollableList/index.js +1 -0
- package/es/components/checkout/components/SearchAndClientModule/index.js +16 -17
- package/es/components/checkout/components/SearchAndClientModule/index.less +8 -29
- package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +1 -3
- package/es/components/checkout/components/WalletPassModule/index.less +3 -3
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +1 -1
- package/es/components/checkout/index.d.ts +1 -1
- package/es/components/checkout/index.js +1 -1
- package/es/components/checkout/index.less +38 -56
- package/es/components/checkout/locales.d.ts +0 -6
- package/es/components/checkout/locales.js +3 -9
- package/es/components/checkout/payment-modal-utils.js +5 -5
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +3 -3
- package/es/components/checkout/utils/PaymentResultToastUtils.js +72 -111
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +58 -91
- package/es/components/pay/toB/components/MX51/index.js +44 -14
- package/es/components/pay/toB/types/index.d.ts +12 -0
- package/es/components/pay/toB/types/index.js +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +13 -6
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +1 -1
- package/es/components/ticketBooking/components/menuBar/index.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +5 -4
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +2 -4
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/index.js +5 -2
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/printer.js +35 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/clientCard/index.js +2 -3
- package/es/plus/clientCard/index.less +32 -3
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.js +12 -9
- package/es/pro/comprehensiveSearch/components/searchSection/index.less +19 -22
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/actionButtons/index.js +5 -4
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/customiseItemModal/index.js +2 -2
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +0 -3
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +3 -15
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +5 -16
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/checkout/PaymentModal.js +120 -247
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +34 -98
- package/lib/components/checkout/components/AdditionalModule/index.less +34 -33
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +0 -3
- package/lib/components/checkout/components/AdditionalModule/locales.js +4 -7
- package/lib/components/checkout/components/AmountSummary/index.d.ts +1 -2
- package/lib/components/checkout/components/AmountSummary/index.js +47 -103
- package/lib/components/checkout/components/AmountSummary/index.less +9 -27
- package/lib/components/checkout/components/CashPaymentModule/index.less +2 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.js +11 -56
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -2
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +8 -11
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +6 -11
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +9 -42
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +73 -279
- package/lib/components/checkout/components/PaymentResultToast/index.d.ts +1 -2
- package/lib/components/checkout/components/PaymentResultToast/index.js +22 -69
- package/lib/components/checkout/components/PaymentResultToast/index.less +77 -445
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +0 -26
- package/lib/components/checkout/components/PaymentResultToast/utils.js +4 -58
- package/lib/components/checkout/components/ScrollableList/index.js +1 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.js +15 -17
- package/lib/components/checkout/components/SearchAndClientModule/index.less +8 -29
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +2 -12
- package/lib/components/checkout/components/WalletPassModule/index.less +3 -3
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +2 -2
- package/lib/components/checkout/index.d.ts +1 -1
- package/lib/components/checkout/index.js +0 -2
- package/lib/components/checkout/index.less +38 -56
- package/lib/components/checkout/locales.d.ts +0 -6
- package/lib/components/checkout/locales.js +3 -9
- package/lib/components/checkout/payment-modal-utils.js +5 -5
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +3 -3
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +18 -26
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +10 -25
- package/lib/components/pay/toB/components/MX51/index.js +37 -12
- package/lib/components/pay/toB/types/index.d.ts +12 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +15 -9
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +2 -2
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -12
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +12 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +12 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +13 -5
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.js +2 -2
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/printer.js +60 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/clientCard/index.js +4 -5
- package/lib/plus/clientCard/index.less +32 -3
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.js +18 -6
- package/lib/pro/comprehensiveSearch/components/searchSection/index.less +19 -22
- package/lib/utils/index.d.ts +1 -1
- package/package.json +12 -12
@@ -1,14 +1,4 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
7
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
10
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
12
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
13
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
14
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -20,10 +10,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
20
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
21
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
22
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
23
|
-
import React, { createContext, useContext, useState, useCallback, useEffect } from 'react';
|
24
|
-
import {
|
13
|
+
import React, { createContext, useContext, useState, useCallback, useEffect, useRef } from 'react';
|
14
|
+
import { createPortal } from 'react-dom';
|
25
15
|
import PaymentResultToast from "./index";
|
26
|
-
import useEngineContext from "../../../../hooks/useEngineContext";
|
27
16
|
|
28
17
|
// 支付结果弹窗显示配置类型
|
29
18
|
|
@@ -37,85 +26,79 @@ var globalPaymentResultToastContext = null;
|
|
37
26
|
// 默认配置
|
38
27
|
var DEFAULT_TOAST_CONFIG = {
|
39
28
|
width: 680,
|
40
|
-
mask:
|
41
|
-
maskClosable:
|
42
|
-
closable: true
|
43
|
-
|
29
|
+
mask: true,
|
30
|
+
maskClosable: true,
|
31
|
+
closable: true,
|
32
|
+
zIndex: 2000
|
44
33
|
};
|
45
34
|
export var PaymentResultToastProvider = function PaymentResultToastProvider(_ref) {
|
46
|
-
var _context$appHelper, _interaction$utils, _interaction$utils$as;
|
47
35
|
var children = _ref.children;
|
48
|
-
|
49
|
-
var _useState = useState([]),
|
36
|
+
var _useState = useState(null),
|
50
37
|
_useState2 = _slicedToArray(_useState, 2),
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
module: 'get',
|
58
|
-
key: 'till_button'
|
59
|
-
}).then(function (res) {
|
60
|
-
globalToastManager.setTillButton(res);
|
61
|
-
}).catch(function (err) {
|
62
|
-
console.error('Failed to get till_button from asyncDataManager:', err);
|
63
|
-
});
|
38
|
+
toastProps = _useState2[0],
|
39
|
+
setToastProps = _useState2[1];
|
40
|
+
|
41
|
+
// 使用ref保存当前的自定义回调,避免重复创建函数
|
42
|
+
var customOnCloseRef = useRef();
|
43
|
+
var customOnCountdownCompleteRef = useRef();
|
64
44
|
var closeToast = useCallback(function () {
|
65
|
-
|
66
|
-
|
67
|
-
globalToastManager.removeToast(id);
|
68
|
-
});
|
69
|
-
setContextToastIds([]);
|
70
|
-
}, [contextToastIds]);
|
71
|
-
var showToast = useCallback(function (config) {
|
72
|
-
// 使用全局管理器创建Toast
|
73
|
-
var toastId = globalToastManager.addToast(_objectSpread(_objectSpread({}, config), {}, {
|
74
|
-
onClose: function onClose() {
|
75
|
-
var _config$onClose;
|
76
|
-
// 先调用用户的onClose回调
|
77
|
-
(_config$onClose = config.onClose) === null || _config$onClose === void 0 || _config$onClose.call(config);
|
78
|
-
// 从Context的ID列表中移除
|
79
|
-
setContextToastIds(function (prev) {
|
80
|
-
return prev.filter(function (id) {
|
81
|
-
return id !== toastId;
|
82
|
-
});
|
83
|
-
});
|
84
|
-
}
|
85
|
-
}));
|
45
|
+
setToastProps(null);
|
46
|
+
}, []);
|
86
47
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
48
|
+
// 稳定化的onClose函数
|
49
|
+
var handleClose = useCallback(function () {
|
50
|
+
var _customOnCloseRef$cur;
|
51
|
+
// 先调用自定义的onClose回调
|
52
|
+
(_customOnCloseRef$cur = customOnCloseRef.current) === null || _customOnCloseRef$cur === void 0 || _customOnCloseRef$cur.call(customOnCloseRef);
|
53
|
+
// 然后关闭toast
|
54
|
+
closeToast();
|
55
|
+
}, [closeToast]);
|
56
|
+
|
57
|
+
// 稳定化的onCountdownComplete函数
|
58
|
+
var handleCountdownComplete = useCallback(function () {
|
59
|
+
var _customOnCountdownCom;
|
60
|
+
(_customOnCountdownCom = customOnCountdownCompleteRef.current) === null || _customOnCountdownCom === void 0 || _customOnCountdownCom.call(customOnCountdownCompleteRef);
|
92
61
|
}, []);
|
62
|
+
var showToast = useCallback(function (config) {
|
63
|
+
// 更新ref中的自定义回调
|
64
|
+
customOnCloseRef.current = config.onClose;
|
65
|
+
customOnCountdownCompleteRef.current = config.onCountdownComplete;
|
66
|
+
var finalConfig = _objectSpread(_objectSpread({}, DEFAULT_TOAST_CONFIG), {}, {
|
67
|
+
visible: true,
|
68
|
+
statusClassName: config.statusClassName,
|
69
|
+
title: config.title,
|
70
|
+
subtitle: config.subtitle,
|
71
|
+
changeDueText: config.changeDueText,
|
72
|
+
actionButtons: config.actionButtons || [],
|
73
|
+
autoClose: config.autoClose,
|
74
|
+
autoCloseDelay: config.autoCloseDelay || 5,
|
75
|
+
showCountdownProgress: config.showCountdownProgress,
|
76
|
+
onCountdownComplete: handleCountdownComplete,
|
77
|
+
// 使用稳定的handleCountdownComplete函数
|
78
|
+
onClose: handleClose // 使用稳定的handleClose函数
|
79
|
+
});
|
80
|
+
setToastProps(finalConfig);
|
81
|
+
}, [handleClose, handleCountdownComplete]);
|
93
82
|
var showSuccess = useCallback(function (config) {
|
94
|
-
|
83
|
+
showToast(_objectSpread(_objectSpread({}, config), {}, {
|
95
84
|
statusClassName: 'success'
|
96
85
|
}));
|
97
86
|
}, [showToast]);
|
98
87
|
var showFailed = useCallback(function (config) {
|
99
|
-
|
88
|
+
showToast(_objectSpread(_objectSpread({}, config), {}, {
|
100
89
|
statusClassName: 'failed'
|
101
90
|
}));
|
102
91
|
}, [showToast]);
|
103
92
|
var showWalletPassFailed = useCallback(function (config) {
|
104
|
-
|
93
|
+
showToast(_objectSpread(_objectSpread({}, config), {}, {
|
105
94
|
statusClassName: 'wallet-pass-failed'
|
106
95
|
}));
|
107
96
|
}, [showToast]);
|
108
|
-
var
|
109
|
-
return showToast(_objectSpread(_objectSpread({}, config), {}, {
|
110
|
-
statusClassName: 'partially-paid'
|
111
|
-
}));
|
112
|
-
}, [showToast]);
|
113
|
-
var isVisible = contextToastIds.length > 0;
|
97
|
+
var isVisible = !!(toastProps !== null && toastProps !== void 0 && toastProps.visible);
|
114
98
|
var contextValue = {
|
115
99
|
showSuccess: showSuccess,
|
116
100
|
showFailed: showFailed,
|
117
101
|
showWalletPassFailed: showWalletPassFailed,
|
118
|
-
showPartiallyPaid: showPartiallyPaid,
|
119
102
|
showToast: showToast,
|
120
103
|
closeToast: closeToast,
|
121
104
|
isVisible: isVisible
|
@@ -130,7 +113,7 @@ export var PaymentResultToastProvider = function PaymentResultToastProvider(_ref
|
|
130
113
|
}, [contextValue]);
|
131
114
|
return /*#__PURE__*/React.createElement(PaymentResultToastContext.Provider, {
|
132
115
|
value: contextValue
|
133
|
-
}, children);
|
116
|
+
}, children, toastProps && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(PaymentResultToast, toastProps), document.body));
|
134
117
|
};
|
135
118
|
export var usePaymentResultToast = function usePaymentResultToast() {
|
136
119
|
var context = useContext(PaymentResultToastContext);
|
@@ -140,454 +123,41 @@ export var usePaymentResultToast = function usePaymentResultToast() {
|
|
140
123
|
return context;
|
141
124
|
};
|
142
125
|
|
143
|
-
//
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
_defineProperty(this, "nextId", 1);
|
150
|
-
_defineProperty(this, "TOAST_HEIGHT", 160);
|
151
|
-
// 单个Toast的高度(估算:内容约128px + padding 32px)
|
152
|
-
_defineProperty(this, "TOAST_MARGIN", 8);
|
153
|
-
// Toast之间的间距
|
154
|
-
_defineProperty(this, "BOTTOM_OFFSET", 110);
|
155
|
-
// 距离底部的距离
|
156
|
-
_defineProperty(this, "LEFT_OFFSET", 96);
|
157
|
-
// 距离左边的距离
|
158
|
-
_defineProperty(this, "cachedBottomOffset", null);
|
159
|
-
// 缓存计算的bottom位置
|
160
|
-
_defineProperty(this, "cachedCenterOffset", null);
|
161
|
-
// 缓存计算的center位置
|
162
|
-
_defineProperty(this, "tillButton", null);
|
126
|
+
// 全局调用方法(用于兼容现有代码,无需Context)
|
127
|
+
export var showPaymentResultToastSuccess = function showPaymentResultToastSuccess(config) {
|
128
|
+
if (globalPaymentResultToastContext) {
|
129
|
+
globalPaymentResultToastContext.showSuccess(config);
|
130
|
+
} else {
|
131
|
+
console.error('PaymentResultToastProvider not found. Please wrap your app with PaymentResultToastProvider.');
|
163
132
|
}
|
164
|
-
_createClass(GlobalToastManager, [{
|
165
|
-
key: "setTillButton",
|
166
|
-
value:
|
167
|
-
// 缓存的tillButton数据
|
168
|
-
|
169
|
-
function setTillButton(tillButton) {
|
170
|
-
this.tillButton = tillButton;
|
171
|
-
}
|
172
|
-
|
173
|
-
// 生成唯一ID
|
174
|
-
}, {
|
175
|
-
key: "generateId",
|
176
|
-
value: function generateId() {
|
177
|
-
return "toast-".concat(this.nextId++);
|
178
|
-
}
|
179
|
-
|
180
|
-
// 计算并缓存 .ticket-booking-left-panel-content 组件的 bottom 位置
|
181
|
-
}, {
|
182
|
-
key: "calculateAndCacheBottomOffset",
|
183
|
-
value: function calculateAndCacheBottomOffset() {
|
184
|
-
var _this$tillButton;
|
185
|
-
if (this.cachedBottomOffset !== null) {
|
186
|
-
return this.cachedBottomOffset;
|
187
|
-
}
|
188
|
-
|
189
|
-
// 如果存在钱箱按钮位置信息,则使用钱箱按钮位置
|
190
|
-
if ((_this$tillButton = this.tillButton) !== null && _this$tillButton !== void 0 && _this$tillButton.y) {
|
191
|
-
console.log('使用钱箱按钮位置', this.tillButton);
|
192
|
-
this.cachedBottomOffset = window.innerHeight - this.tillButton.y + 8 + this.tillButton.size;
|
193
|
-
console.log('计算钱箱按钮位置得到的bottom位置', this.cachedBottomOffset);
|
194
|
-
return this.cachedBottomOffset;
|
195
|
-
}
|
196
|
-
var ticketBookingElement = document.querySelector('.ticket-booking-left-panel-content');
|
197
|
-
if (ticketBookingElement) {
|
198
|
-
var rect = ticketBookingElement.getBoundingClientRect();
|
199
|
-
var windowHeight = window.innerHeight;
|
200
|
-
// 计算:整个高度 - 组件的 bottom + 8px
|
201
|
-
this.cachedBottomOffset = windowHeight - rect.bottom + 16;
|
202
|
-
} else {
|
203
|
-
// 如果找不到组件,使用默认值
|
204
|
-
this.cachedBottomOffset = this.BOTTOM_OFFSET;
|
205
|
-
}
|
206
|
-
return this.cachedBottomOffset;
|
207
|
-
}
|
208
|
-
}, {
|
209
|
-
key: "calculateAndCacheCenterOffset",
|
210
|
-
value: function calculateAndCacheCenterOffset() {
|
211
|
-
if (this.cachedCenterOffset !== null) {
|
212
|
-
return this.cachedCenterOffset;
|
213
|
-
}
|
214
|
-
var ticketBookingElement = document.querySelector('.ticket-booking-left-panel-content');
|
215
|
-
if (ticketBookingElement) {
|
216
|
-
var rect = ticketBookingElement.getBoundingClientRect();
|
217
|
-
// 计算:整个高度 - 组件的 bottom + 8px
|
218
|
-
this.cachedCenterOffset = {
|
219
|
-
x: rect.width / 2,
|
220
|
-
y: rect.height / 2
|
221
|
-
};
|
222
|
-
} else {
|
223
|
-
// 如果找不到组件,使用默认值
|
224
|
-
this.cachedCenterOffset = {
|
225
|
-
x: 0,
|
226
|
-
y: 0
|
227
|
-
};
|
228
|
-
}
|
229
|
-
return this.cachedCenterOffset;
|
230
|
-
}
|
231
|
-
|
232
|
-
// 重置缓存的 bottom 位置(当窗口大小变化或组件位置变化时调用)
|
233
|
-
}, {
|
234
|
-
key: "resetBottomOffsetCache",
|
235
|
-
value: function resetBottomOffsetCache() {
|
236
|
-
this.cachedBottomOffset = null;
|
237
|
-
}
|
238
|
-
|
239
|
-
// 计算Toast的bottom位置
|
240
|
-
// 新逻辑:最新的Toast在最底部,旧Toast向上位移
|
241
|
-
}, {
|
242
|
-
key: "calculateBottomPosition",
|
243
|
-
value: function calculateBottomPosition(offsetIndex, totalCount) {
|
244
|
-
// 反转索引:最新的Toast (最后添加的) 获得index=0 (最底部)
|
245
|
-
// 最旧的Toast获得最大的index (最顶部)
|
246
|
-
var reversedIndex = totalCount - 1 - offsetIndex;
|
247
|
-
// 使用计算并缓存的bottom位置,而不是固定的BOTTOM_OFFSET
|
248
|
-
var dynamicBottomOffset = this.calculateAndCacheBottomOffset();
|
249
|
-
// 第一个toast在动态计算的位置,后续每个toast向上偏移(toast高度 + 间距)
|
250
|
-
return dynamicBottomOffset + (this.TOAST_HEIGHT + this.TOAST_MARGIN) * reversedIndex;
|
251
|
-
}
|
252
|
-
|
253
|
-
// 更新所有Toast的位置(新Toast在底部,旧Toast平滑向上位移)
|
254
|
-
}, {
|
255
|
-
key: "updatePositions",
|
256
|
-
value: function updatePositions() {
|
257
|
-
var _this = this;
|
258
|
-
var instances = Array.from(this.instances.values());
|
259
|
-
var totalCount = instances.length;
|
260
|
-
instances.forEach(function (instance, index) {
|
261
|
-
instance.offsetIndex = index;
|
262
|
-
var bottomPosition = _this.calculateBottomPosition(index, totalCount);
|
263
|
-
|
264
|
-
// 更新容器样式,带有平滑动画效果
|
265
|
-
if (instance.container) {
|
266
|
-
// 添加动画类名表示正在移动
|
267
|
-
instance.container.classList.add('toast-moving');
|
268
|
-
instance.container.style.position = 'fixed';
|
269
|
-
instance.container.style.left = "".concat(_this.LEFT_OFFSET, "px");
|
270
|
-
instance.container.style.bottom = "".concat(bottomPosition, "px");
|
271
|
-
instance.container.style.top = 'auto';
|
272
|
-
instance.container.style.right = 'auto';
|
273
|
-
|
274
|
-
// 移除强制的z-index设置,让Toast使用默认层级
|
275
|
-
// const reversedZIndex = totalCount - 1 - index;
|
276
|
-
// instance.container.style.zIndex = `${(instance.props.zIndex || 2000) + reversedZIndex}`;
|
277
|
-
|
278
|
-
// 优化的动画过渡效果
|
279
|
-
instance.container.style.transition = 'all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)';
|
280
|
-
instance.container.style.pointerEvents = 'none'; // 让容器本身点击穿透
|
281
|
-
instance.container.style.width = 'auto';
|
282
|
-
instance.container.style.height = 'auto';
|
283
|
-
instance.container.style.transform = 'none';
|
284
|
-
instance.container.style.margin = '0';
|
285
|
-
|
286
|
-
// 动画完成后移除动画类名
|
287
|
-
setTimeout(function () {
|
288
|
-
if (instance.container) {
|
289
|
-
instance.container.classList.remove('toast-moving');
|
290
|
-
}
|
291
|
-
}, 400); // 与 CSS transition 时间一致
|
292
|
-
}
|
293
|
-
});
|
294
|
-
}
|
295
|
-
|
296
|
-
// 添加新的Toast实例
|
297
|
-
}, {
|
298
|
-
key: "addToast",
|
299
|
-
value: function addToast(config) {
|
300
|
-
var _this2 = this;
|
301
|
-
var id = this.generateId();
|
302
|
-
|
303
|
-
// 在创建Toast之前,重置缓存以确保使用最新的位置计算
|
304
|
-
this.resetBottomOffsetCache();
|
305
|
-
var finalConfig = _objectSpread(_objectSpread({}, DEFAULT_TOAST_CONFIG), {}, {
|
306
|
-
visible: true,
|
307
|
-
statusClassName: config.statusClassName,
|
308
|
-
title: config.title,
|
309
|
-
subtitle: config.subtitle,
|
310
|
-
changeDueText: config.changeDueText,
|
311
|
-
actionButtons: config.actionButtons || [],
|
312
|
-
autoClose: config.autoClose,
|
313
|
-
autoCloseDelay: config.autoCloseDelay || 30,
|
314
|
-
showCountdownProgress: config.showCountdownProgress,
|
315
|
-
onCountdownComplete: config.onCountdownComplete,
|
316
|
-
onClose: function onClose() {
|
317
|
-
var _config$onClose2;
|
318
|
-
(_config$onClose2 = config.onClose) === null || _config$onClose2 === void 0 || _config$onClose2.call(config);
|
319
|
-
_this2.removeToast(id);
|
320
|
-
},
|
321
|
-
closable: config.closable !== undefined ? config.closable : DEFAULT_TOAST_CONFIG.closable
|
322
|
-
});
|
323
|
-
|
324
|
-
// 创建容器
|
325
|
-
var container = document.createElement('div');
|
326
|
-
container.setAttribute('data-toast-id', id);
|
327
|
-
|
328
|
-
// 计算动态的bottom位置
|
329
|
-
var dynamicBottomOffset = this.calculateAndCacheBottomOffset();
|
330
|
-
// const centerOffset = this.calculateAndCacheCenterOffset();
|
331
|
-
|
332
|
-
// 设置初始样式确保左下角定位
|
333
|
-
// 新Toast使用动态计算的位置
|
334
|
-
container.style.position = 'fixed';
|
335
|
-
container.style.left = "".concat(this.LEFT_OFFSET, "px");
|
336
|
-
container.style.bottom = "".concat(dynamicBottomOffset, "px"); // 使用动态计算的位置
|
337
|
-
container.style.top = 'auto';
|
338
|
-
container.style.right = 'auto';
|
339
|
-
// 移除强制的z-index设置,让Toast使用默认层级
|
340
|
-
// container.style.zIndex = `${(finalConfig.zIndex || 2000) + this.instances.size}`;
|
341
|
-
|
342
|
-
// 初始状态:隐藏在底部下方,准备滑入动画
|
343
|
-
// container.style.opacity = '0';
|
344
|
-
// container.style.transform = `translate(${centerOffset.x}px, -${centerOffset.y}px)`;
|
345
|
-
// container.style.transition = 'all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)';
|
346
|
-
container.style.pointerEvents = 'none'; // 让容器本身点击穿透
|
347
|
-
container.style.width = 'auto';
|
348
|
-
container.style.height = 'auto';
|
349
|
-
container.style.margin = '0';
|
350
|
-
|
351
|
-
// 添加进入动画类名
|
352
|
-
// container.classList.add('toast-entering');
|
353
|
-
|
354
|
-
document.body.appendChild(container);
|
355
|
-
|
356
|
-
// 创建实例
|
357
|
-
var instance = {
|
358
|
-
id: id,
|
359
|
-
container: container,
|
360
|
-
props: finalConfig,
|
361
|
-
offsetIndex: this.instances.size
|
362
|
-
};
|
363
|
-
this.instances.set(id, instance);
|
364
|
-
|
365
|
-
// 渲染Toast
|
366
|
-
render( /*#__PURE__*/React.createElement(PaymentResultToast, finalConfig), container);
|
367
|
-
|
368
|
-
// // 延迟触发动画,确保DOM渲染完成
|
369
|
-
// requestAnimationFrame(() => {
|
370
|
-
// // 先更新旧Toast的位置(平滑向上位移)
|
371
|
-
// this.updatePositions();
|
372
|
-
|
373
|
-
// // 然后触发新Toast的进入动画
|
374
|
-
// requestAnimationFrame(() => {
|
375
|
-
// if (container) {
|
376
|
-
// container.classList.remove('toast-entering');
|
377
|
-
// container.style.opacity = '1';
|
378
|
-
// container.style.transform = 'translateY(0)';
|
379
|
-
// }
|
380
|
-
// });
|
381
|
-
// });
|
382
|
-
|
383
|
-
return id;
|
384
|
-
}
|
385
|
-
|
386
|
-
// 移除Toast实例(带动画效果)
|
387
|
-
}, {
|
388
|
-
key: "removeToast",
|
389
|
-
value: function removeToast(id) {
|
390
|
-
var _this3 = this;
|
391
|
-
var instance = this.instances.get(id);
|
392
|
-
if (instance) {
|
393
|
-
// 先添加退出动画
|
394
|
-
if (instance.container) {
|
395
|
-
instance.container.classList.add('toast-exiting');
|
396
|
-
|
397
|
-
// 等待退出动画完成后再移除DOM
|
398
|
-
setTimeout(function () {
|
399
|
-
// 卸载组件
|
400
|
-
if (instance.container) {
|
401
|
-
unmountComponentAtNode(instance.container);
|
402
|
-
if (document.body.contains(instance.container)) {
|
403
|
-
document.body.removeChild(instance.container);
|
404
|
-
}
|
405
|
-
}
|
406
|
-
|
407
|
-
// 从实例集合中移除
|
408
|
-
_this3.instances.delete(id);
|
409
|
-
|
410
|
-
// 重新计算剩余Toast的位置(平滑向上位移)
|
411
|
-
_this3.updatePositions();
|
412
|
-
}, 300); // 与 CSS 退出动画时间一致
|
413
|
-
} else {
|
414
|
-
// 如果没有container,直接移除
|
415
|
-
this.instances.delete(id);
|
416
|
-
this.updatePositions();
|
417
|
-
}
|
418
|
-
}
|
419
|
-
}
|
420
|
-
|
421
|
-
// 清理所有Toast
|
422
|
-
}, {
|
423
|
-
key: "clearAll",
|
424
|
-
value: function clearAll() {
|
425
|
-
this.instances.forEach(function (instance) {
|
426
|
-
if (instance.container) {
|
427
|
-
unmountComponentAtNode(instance.container);
|
428
|
-
if (document.body.contains(instance.container)) {
|
429
|
-
document.body.removeChild(instance.container);
|
430
|
-
}
|
431
|
-
}
|
432
|
-
});
|
433
|
-
this.instances.clear();
|
434
|
-
}
|
435
|
-
|
436
|
-
// 获取当前Toast数量
|
437
|
-
}, {
|
438
|
-
key: "getCount",
|
439
|
-
value: function getCount() {
|
440
|
-
return this.instances.size;
|
441
|
-
}
|
442
|
-
|
443
|
-
// 初始化窗口大小变化监听器
|
444
|
-
}, {
|
445
|
-
key: "initializeResizeListener",
|
446
|
-
value: function initializeResizeListener() {
|
447
|
-
var _this4 = this;
|
448
|
-
var handleResize = function handleResize() {
|
449
|
-
_this4.resetBottomOffsetCache();
|
450
|
-
// 重新计算所有Toast的位置
|
451
|
-
_this4.updatePositions();
|
452
|
-
};
|
453
|
-
window.addEventListener('resize', handleResize);
|
454
|
-
|
455
|
-
// 返回清理函数
|
456
|
-
return function () {
|
457
|
-
window.removeEventListener('resize', handleResize);
|
458
|
-
};
|
459
|
-
}
|
460
|
-
}]);
|
461
|
-
return GlobalToastManager;
|
462
|
-
}(); // 全局Toast管理器实例
|
463
|
-
var globalToastManager = new GlobalToastManager();
|
464
|
-
|
465
|
-
// 初始化窗口大小变化监听器
|
466
|
-
if (typeof window !== 'undefined') {
|
467
|
-
globalToastManager.initializeResizeListener();
|
468
|
-
}
|
469
|
-
|
470
|
-
// 直接渲染Toast到document.body
|
471
|
-
var renderGlobalToast = function renderGlobalToast(config) {
|
472
|
-
return globalToastManager.addToast(config);
|
473
133
|
};
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config) {
|
478
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
479
|
-
while (1) switch (_context.prev = _context.next) {
|
480
|
-
case 0:
|
481
|
-
return _context.abrupt("return", renderGlobalToast(_objectSpread(_objectSpread({}, config), {}, {
|
482
|
-
statusClassName: 'success'
|
483
|
-
})));
|
484
|
-
case 1:
|
485
|
-
case "end":
|
486
|
-
return _context.stop();
|
487
|
-
}
|
488
|
-
}, _callee);
|
489
|
-
}));
|
490
|
-
return function showPaymentResultToastSuccess(_x) {
|
491
|
-
return _ref3.apply(this, arguments);
|
492
|
-
};
|
493
|
-
}();
|
494
|
-
export var showPaymentResultToastFailed = /*#__PURE__*/function () {
|
495
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(config) {
|
496
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
497
|
-
while (1) switch (_context2.prev = _context2.next) {
|
498
|
-
case 0:
|
499
|
-
return _context2.abrupt("return", renderGlobalToast(_objectSpread(_objectSpread({}, config), {}, {
|
500
|
-
statusClassName: 'failed'
|
501
|
-
})));
|
502
|
-
case 1:
|
503
|
-
case "end":
|
504
|
-
return _context2.stop();
|
505
|
-
}
|
506
|
-
}, _callee2);
|
507
|
-
}));
|
508
|
-
return function showPaymentResultToastFailed(_x2) {
|
509
|
-
return _ref4.apply(this, arguments);
|
510
|
-
};
|
511
|
-
}();
|
512
|
-
export var showPaymentResultToastWalletPassFailed = /*#__PURE__*/function () {
|
513
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(config) {
|
514
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
515
|
-
while (1) switch (_context3.prev = _context3.next) {
|
516
|
-
case 0:
|
517
|
-
return _context3.abrupt("return", renderGlobalToast(_objectSpread(_objectSpread({}, config), {}, {
|
518
|
-
statusClassName: 'wallet-pass-failed'
|
519
|
-
})));
|
520
|
-
case 1:
|
521
|
-
case "end":
|
522
|
-
return _context3.stop();
|
523
|
-
}
|
524
|
-
}, _callee3);
|
525
|
-
}));
|
526
|
-
return function showPaymentResultToastWalletPassFailed(_x3) {
|
527
|
-
return _ref5.apply(this, arguments);
|
528
|
-
};
|
529
|
-
}();
|
530
|
-
export var showPaymentResultToastPartiallyPaid = /*#__PURE__*/function () {
|
531
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) {
|
532
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
533
|
-
while (1) switch (_context4.prev = _context4.next) {
|
534
|
-
case 0:
|
535
|
-
return _context4.abrupt("return", renderGlobalToast(_objectSpread(_objectSpread({}, config), {}, {
|
536
|
-
statusClassName: 'partially-paid'
|
537
|
-
})));
|
538
|
-
case 1:
|
539
|
-
case "end":
|
540
|
-
return _context4.stop();
|
541
|
-
}
|
542
|
-
}, _callee4);
|
543
|
-
}));
|
544
|
-
return function showPaymentResultToastPartiallyPaid(_x4) {
|
545
|
-
return _ref6.apply(this, arguments);
|
546
|
-
};
|
547
|
-
}();
|
548
|
-
export var showPaymentResultToast = /*#__PURE__*/function () {
|
549
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(config) {
|
550
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
551
|
-
while (1) switch (_context5.prev = _context5.next) {
|
552
|
-
case 0:
|
553
|
-
return _context5.abrupt("return", renderGlobalToast(config));
|
554
|
-
case 1:
|
555
|
-
case "end":
|
556
|
-
return _context5.stop();
|
557
|
-
}
|
558
|
-
}, _callee5);
|
559
|
-
}));
|
560
|
-
return function showPaymentResultToast(_x5) {
|
561
|
-
return _ref7.apply(this, arguments);
|
562
|
-
};
|
563
|
-
}();
|
564
|
-
|
565
|
-
// 关闭指定的Toast
|
566
|
-
export var closePaymentResultToast = function closePaymentResultToast(id) {
|
567
|
-
if (id) {
|
568
|
-
globalToastManager.removeToast(id);
|
134
|
+
export var showPaymentResultToastFailed = function showPaymentResultToastFailed(config) {
|
135
|
+
if (globalPaymentResultToastContext) {
|
136
|
+
globalPaymentResultToastContext.showFailed(config);
|
569
137
|
} else {
|
570
|
-
|
571
|
-
globalToastManager.clearAll();
|
138
|
+
console.error('PaymentResultToastProvider not found. Please wrap your app with PaymentResultToastProvider.');
|
572
139
|
}
|
573
140
|
};
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
141
|
+
export var showPaymentResultToastWalletPassFailed = function showPaymentResultToastWalletPassFailed(config) {
|
142
|
+
if (globalPaymentResultToastContext) {
|
143
|
+
globalPaymentResultToastContext.showWalletPassFailed(config);
|
144
|
+
} else {
|
145
|
+
console.error('PaymentResultToastProvider not found. Please wrap your app with PaymentResultToastProvider.');
|
146
|
+
}
|
578
147
|
};
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
148
|
+
export var showPaymentResultToast = function showPaymentResultToast(config) {
|
149
|
+
if (globalPaymentResultToastContext) {
|
150
|
+
globalPaymentResultToastContext.showToast(config);
|
151
|
+
} else {
|
152
|
+
console.error('PaymentResultToastProvider not found. Please wrap your app with PaymentResultToastProvider.');
|
153
|
+
}
|
583
154
|
};
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
155
|
+
export var closePaymentResultToast = function closePaymentResultToast() {
|
156
|
+
if (globalPaymentResultToastContext) {
|
157
|
+
globalPaymentResultToastContext.closeToast();
|
158
|
+
} else {
|
159
|
+
console.error('PaymentResultToastProvider not found.');
|
160
|
+
}
|
590
161
|
};
|
591
162
|
|
592
|
-
//
|
593
|
-
export { globalToastManager };
|
163
|
+
// 导出类型供外部使用
|