@pisell/private-materials 6.5.2 → 6.5.3
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 +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +2 -2
- package/es/components/booking/components/customiseItemModal/index.js +2 -2
- package/es/components/booking/components/footer/index.js +48 -42
- package/es/components/booking/components/voucher/index.js +18 -4
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- 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/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +33 -20
- package/es/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- 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/checkout/PaymentModal.js +719 -432
- package/es/components/checkout/PaymentPlugin.d.ts +1 -0
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -1
- package/es/components/checkout/components/AdditionalModule/index.js +80 -49
- package/es/components/checkout/components/AdditionalModule/index.less +33 -34
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +3 -0
- package/es/components/checkout/components/AdditionalModule/locales.js +7 -4
- package/es/components/checkout/components/AmountSummary/index.d.ts +2 -1
- package/es/components/checkout/components/AmountSummary/index.js +69 -31
- package/es/components/checkout/components/AmountSummary/index.less +27 -9
- package/es/components/checkout/components/CashPaymentModule/index.less +0 -2
- package/es/components/checkout/components/PaymentDetailModal/index.js +55 -10
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +40 -25
- package/es/components/checkout/components/PaymentOptionsModule/index.less +11 -6
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +42 -9
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +512 -82
- package/es/components/checkout/components/PaymentResultToast/index.d.ts +2 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +90 -35
- package/es/components/checkout/components/PaymentResultToast/index.less +445 -77
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +26 -0
- package/es/components/checkout/components/PaymentResultToast/utils.js +81 -2
- package/es/components/checkout/components/SearchAndClientModule/index.js +17 -16
- package/es/components/checkout/components/SearchAndClientModule/index.less +29 -8
- package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +3 -1
- package/es/components/checkout/components/WalletPassModule/index.less +3 -3
- 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 +56 -38
- package/es/components/checkout/locales.d.ts +6 -0
- package/es/components/checkout/locales.js +9 -3
- 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 +111 -72
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.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/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +91 -58
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/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/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -3
- 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.js +2 -2
- 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 +4 -2
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/plus/clientCard/index.js +3 -2
- package/es/plus/clientCard/index.less +3 -32
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/pro/comprehensiveSearch/components/searchSection/index.js +9 -12
- package/es/pro/comprehensiveSearch/components/searchSection/index.less +22 -19
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +2 -1
- package/lib/components/booking/components/customiseItemModal/index.js +2 -2
- package/lib/components/booking/components/footer/index.js +3 -0
- package/lib/components/booking/components/voucher/index.js +15 -3
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- 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/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +16 -5
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- 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/checkout/PaymentModal.js +241 -109
- package/lib/components/checkout/PaymentPlugin.d.ts +1 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +98 -34
- package/lib/components/checkout/components/AdditionalModule/index.less +33 -34
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +3 -0
- package/lib/components/checkout/components/AdditionalModule/locales.js +7 -4
- package/lib/components/checkout/components/AmountSummary/index.d.ts +2 -1
- package/lib/components/checkout/components/AmountSummary/index.js +103 -47
- package/lib/components/checkout/components/AmountSummary/index.less +27 -9
- package/lib/components/checkout/components/CashPaymentModule/index.less +0 -2
- package/lib/components/checkout/components/PaymentDetailModal/index.js +56 -11
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -8
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +11 -6
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +42 -9
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +279 -73
- package/lib/components/checkout/components/PaymentResultToast/index.d.ts +2 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +69 -22
- package/lib/components/checkout/components/PaymentResultToast/index.less +445 -77
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +26 -0
- package/lib/components/checkout/components/PaymentResultToast/utils.js +58 -4
- package/lib/components/checkout/components/SearchAndClientModule/index.js +17 -15
- package/lib/components/checkout/components/SearchAndClientModule/index.less +29 -8
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +12 -2
- package/lib/components/checkout/components/WalletPassModule/index.less +3 -3
- package/lib/components/checkout/hooks/useWalletPass.js +2 -2
- package/lib/components/checkout/index.d.ts +1 -1
- package/lib/components/checkout/index.js +2 -0
- package/lib/components/checkout/index.less +56 -38
- package/lib/components/checkout/locales.d.ts +6 -0
- package/lib/components/checkout/locales.js +9 -3
- 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 +26 -18
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.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/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +25 -10
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/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/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -6
- 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.js +1 -1
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +2 -12
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +2 -12
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +5 -13
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/plus/clientCard/index.js +5 -4
- package/lib/plus/clientCard/index.less +3 -32
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/pro/comprehensiveSearch/components/searchSection/index.js +6 -18
- package/lib/pro/comprehensiveSearch/components/searchSection/index.less +22 -19
- package/package.json +1 -1
@@ -1,4 +1,14 @@
|
|
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); }
|
2
12
|
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; }
|
3
13
|
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; }
|
4
14
|
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; }
|
@@ -10,9 +20,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
10
20
|
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; }
|
11
21
|
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; } }
|
12
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
13
|
-
import React, { createContext, useContext, useState, useCallback, useEffect
|
14
|
-
import {
|
23
|
+
import React, { createContext, useContext, useState, useCallback, useEffect } from 'react';
|
24
|
+
import { render, unmountComponentAtNode } from 'react-dom';
|
15
25
|
import PaymentResultToast from "./index";
|
26
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
16
27
|
|
17
28
|
// 支付结果弹窗显示配置类型
|
18
29
|
|
@@ -26,79 +37,85 @@ var globalPaymentResultToastContext = null;
|
|
26
37
|
// 默认配置
|
27
38
|
var DEFAULT_TOAST_CONFIG = {
|
28
39
|
width: 680,
|
29
|
-
mask:
|
30
|
-
maskClosable:
|
31
|
-
closable: true
|
32
|
-
zIndex
|
40
|
+
mask: false,
|
41
|
+
maskClosable: false,
|
42
|
+
closable: true
|
43
|
+
// 移除强制的zIndex设置,让Toast使用默认层级或由外部控制
|
33
44
|
};
|
34
45
|
export var PaymentResultToastProvider = function PaymentResultToastProvider(_ref) {
|
46
|
+
var _context$appHelper, _interaction$utils, _interaction$utils$as;
|
35
47
|
var children = _ref.children;
|
36
|
-
|
48
|
+
// 使用全局Toast管理器,不再使用本地state
|
49
|
+
var _useState = useState([]),
|
37
50
|
_useState2 = _slicedToArray(_useState, 2),
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
51
|
+
contextToastIds = _useState2[0],
|
52
|
+
setContextToastIds = _useState2[1];
|
53
|
+
var context = useEngineContext();
|
54
|
+
var _ref2 = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
55
|
+
interaction = _ref2.interaction;
|
56
|
+
interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$as = _interaction$utils.asyncDataManager) === null || _interaction$utils$as === void 0 || _interaction$utils$as.call(_interaction$utils, {
|
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
|
+
});
|
44
64
|
var closeToast = useCallback(function () {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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);
|
61
|
-
}, []);
|
65
|
+
// 关闭所有通过Context创建的Toast
|
66
|
+
contextToastIds.forEach(function (id) {
|
67
|
+
globalToastManager.removeToast(id);
|
68
|
+
});
|
69
|
+
setContextToastIds([]);
|
70
|
+
}, [contextToastIds]);
|
62
71
|
var showToast = useCallback(function (config) {
|
63
|
-
//
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
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
|
+
}));
|
86
|
+
|
87
|
+
// 将新的Toast ID添加到Context管理的列表中
|
88
|
+
setContextToastIds(function (prev) {
|
89
|
+
return [].concat(_toConsumableArray(prev), [toastId]);
|
79
90
|
});
|
80
|
-
|
81
|
-
}, [
|
91
|
+
return toastId;
|
92
|
+
}, []);
|
82
93
|
var showSuccess = useCallback(function (config) {
|
83
|
-
showToast(_objectSpread(_objectSpread({}, config), {}, {
|
94
|
+
return showToast(_objectSpread(_objectSpread({}, config), {}, {
|
84
95
|
statusClassName: 'success'
|
85
96
|
}));
|
86
97
|
}, [showToast]);
|
87
98
|
var showFailed = useCallback(function (config) {
|
88
|
-
showToast(_objectSpread(_objectSpread({}, config), {}, {
|
99
|
+
return showToast(_objectSpread(_objectSpread({}, config), {}, {
|
89
100
|
statusClassName: 'failed'
|
90
101
|
}));
|
91
102
|
}, [showToast]);
|
92
103
|
var showWalletPassFailed = useCallback(function (config) {
|
93
|
-
showToast(_objectSpread(_objectSpread({}, config), {}, {
|
104
|
+
return showToast(_objectSpread(_objectSpread({}, config), {}, {
|
94
105
|
statusClassName: 'wallet-pass-failed'
|
95
106
|
}));
|
96
107
|
}, [showToast]);
|
97
|
-
var
|
108
|
+
var showPartiallyPaid = useCallback(function (config) {
|
109
|
+
return showToast(_objectSpread(_objectSpread({}, config), {}, {
|
110
|
+
statusClassName: 'partially-paid'
|
111
|
+
}));
|
112
|
+
}, [showToast]);
|
113
|
+
var isVisible = contextToastIds.length > 0;
|
98
114
|
var contextValue = {
|
99
115
|
showSuccess: showSuccess,
|
100
116
|
showFailed: showFailed,
|
101
117
|
showWalletPassFailed: showWalletPassFailed,
|
118
|
+
showPartiallyPaid: showPartiallyPaid,
|
102
119
|
showToast: showToast,
|
103
120
|
closeToast: closeToast,
|
104
121
|
isVisible: isVisible
|
@@ -113,7 +130,7 @@ export var PaymentResultToastProvider = function PaymentResultToastProvider(_ref
|
|
113
130
|
}, [contextValue]);
|
114
131
|
return /*#__PURE__*/React.createElement(PaymentResultToastContext.Provider, {
|
115
132
|
value: contextValue
|
116
|
-
}, children
|
133
|
+
}, children);
|
117
134
|
};
|
118
135
|
export var usePaymentResultToast = function usePaymentResultToast() {
|
119
136
|
var context = useContext(PaymentResultToastContext);
|
@@ -123,41 +140,454 @@ export var usePaymentResultToast = function usePaymentResultToast() {
|
|
123
140
|
return context;
|
124
141
|
};
|
125
142
|
|
126
|
-
//
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
143
|
+
// Toast实例接口
|
144
|
+
// 全局Toast实例管理
|
145
|
+
var GlobalToastManager = /*#__PURE__*/function () {
|
146
|
+
function GlobalToastManager() {
|
147
|
+
_classCallCheck(this, GlobalToastManager);
|
148
|
+
_defineProperty(this, "instances", new Map());
|
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);
|
132
163
|
}
|
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);
|
133
473
|
};
|
134
|
-
|
135
|
-
|
136
|
-
|
474
|
+
|
475
|
+
// 全局调用方法(用于兼容现有代码,无需Context)
|
476
|
+
export var showPaymentResultToastSuccess = /*#__PURE__*/function () {
|
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);
|
137
569
|
} else {
|
138
|
-
|
570
|
+
// 如果没有提供ID,清理所有Toast(向后兼容)
|
571
|
+
globalToastManager.clearAll();
|
139
572
|
}
|
140
573
|
};
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
console.error('PaymentResultToastProvider not found. Please wrap your app with PaymentResultToastProvider.');
|
146
|
-
}
|
574
|
+
|
575
|
+
// 清理所有Toast
|
576
|
+
export var clearAllPaymentResultToasts = function clearAllPaymentResultToasts() {
|
577
|
+
globalToastManager.clearAll();
|
147
578
|
};
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
console.error('PaymentResultToastProvider not found. Please wrap your app with PaymentResultToastProvider.');
|
153
|
-
}
|
579
|
+
|
580
|
+
// 获取当前Toast数量
|
581
|
+
export var getPaymentResultToastCount = function getPaymentResultToastCount() {
|
582
|
+
return globalToastManager.getCount();
|
154
583
|
};
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
584
|
+
|
585
|
+
// 导出类型供外部使用
|
586
|
+
|
587
|
+
// 导出setTillButton方法供外部使用
|
588
|
+
export var setTillButton = function setTillButton(tillButton) {
|
589
|
+
globalToastManager.setTillButton(tillButton);
|
161
590
|
};
|
162
591
|
|
163
|
-
//
|
592
|
+
// 导出Toast管理器(用于高级用法)
|
593
|
+
export { globalToastManager };
|