@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
@@ -37,9 +37,9 @@ var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_locales = require("../../utils/locales");
|
38
38
|
var import_ahooks = require("ahooks");
|
39
39
|
var import_react_dom = require("react-dom");
|
40
|
-
var import_react_dom2 = __toESM(require("react-dom"));
|
41
40
|
var import_locales2 = __toESM(require("./locales"));
|
42
41
|
var import_materials = require("@pisell/materials");
|
42
|
+
var import_materials2 = require("@pisell/materials");
|
43
43
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
44
44
|
var import_noteModal = __toESM(require("../../plus/noteModal"));
|
45
45
|
var import_SendPaymentLinkModal = __toESM(require("./components/SendPaymentLinkModal"));
|
@@ -55,13 +55,16 @@ var import_PaymentResultToastUtils = require("./utils/PaymentResultToastUtils");
|
|
55
55
|
var import_icon = require("@pisell/icon");
|
56
56
|
var import_styles = require("./styles");
|
57
57
|
var import_paymentMethods = __toESM(require("../pay/toB/paymentMethods"));
|
58
|
+
var import_components = require("../../pro/comprehensiveSearch/components");
|
58
59
|
var import_SearchAndClientModule = __toESM(require("./components/SearchAndClientModule"));
|
60
|
+
var import_useToast = __toESM(require("../../hooks/useToast"));
|
59
61
|
var import_index = require("./index.less");
|
60
62
|
var import_constants = require("./constants");
|
61
63
|
var import_lodash = require("lodash");
|
62
64
|
var import_utils2 = require("./utils");
|
63
65
|
var import_usePaymentLogger = __toESM(require("./hooks/usePaymentLogger"));
|
64
66
|
var import_antd = require("antd");
|
67
|
+
var import_printer = __toESM(require("../../hooks/printer"));
|
65
68
|
var CheckoutHooks = {
|
66
69
|
OnStateAmountChanged: "checkout:onStateAmountChanged",
|
67
70
|
OnBalanceDueAmountChanged: "checkout:onBalanceDueAmountChanged",
|
@@ -99,7 +102,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
99
102
|
const context = (0, import_useEngineContext.default)();
|
100
103
|
const utils = context.appHelper.utils || {};
|
101
104
|
const { pisellos, getData, pisellosAllModule, interaction } = utils;
|
102
|
-
const Toast = (0,
|
105
|
+
const Toast = (0, import_useToast.default)();
|
103
106
|
const checkoutRef = (0, import_react.useRef)(null);
|
104
107
|
const savePayLaterHandlerRef = (0, import_react.useRef)(null);
|
105
108
|
const [customAmount, setCustomAmount] = (0, import_react.useState)("");
|
@@ -115,6 +118,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
115
118
|
const walletPassRef = (0, import_react.useRef)(null);
|
116
119
|
const [paymentItems, setPaymentItems] = (0, import_react.useState)([]);
|
117
120
|
const [walletPassData, setWalletPassData] = (0, import_react.useState)({});
|
121
|
+
const { nativePrint } = (0, import_printer.default)();
|
118
122
|
const isOrderFree = (0, import_react.useMemo)(() => {
|
119
123
|
if (!customAmount) return false;
|
120
124
|
const amount = parseFloat(customAmount);
|
@@ -139,11 +143,10 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
139
143
|
};
|
140
144
|
}, [paymentMethods]);
|
141
145
|
const handleAddCashPayment = async (result) => {
|
142
|
-
var _a2, _b2;
|
143
146
|
const cashPaymentMethod = paymentMethods.find(
|
144
147
|
(method) => {
|
145
|
-
var
|
146
|
-
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((
|
148
|
+
var _a2;
|
149
|
+
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((_a2 = method.name) == null ? void 0 : _a2.toLowerCase().includes("cash"));
|
147
150
|
}
|
148
151
|
);
|
149
152
|
await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
|
@@ -160,19 +163,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
160
163
|
voucher_id: 0,
|
161
164
|
rounding_amount: result.roundingAmount
|
162
165
|
}));
|
163
|
-
logger == null ? void 0 : logger.addLog({
|
164
|
-
type: "info",
|
165
|
-
title: "open_till",
|
166
|
-
metadata: {}
|
167
|
-
});
|
168
|
-
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
169
|
-
module: "till",
|
170
|
-
key: "open_till",
|
171
|
-
data: {
|
172
|
-
type: "cash"
|
173
|
-
// cash 不需要验证钱箱权限
|
174
|
-
}
|
175
|
-
});
|
176
166
|
};
|
177
167
|
const processSurcharge = (surcharge) => {
|
178
168
|
if (typeof surcharge === "string") {
|
@@ -411,7 +401,8 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
411
401
|
);
|
412
402
|
const orderPaymentAddedUnsubscribe = core.effects.on(
|
413
403
|
CheckoutHooks.OnOrderPaymentAdded,
|
414
|
-
|
404
|
+
(data) => {
|
405
|
+
var _a2, _b2;
|
415
406
|
console.log("orderPaymentAddedUnsubscribe>>>>", data);
|
416
407
|
const balanceDueAmount2 = checkoutModule.getBalanceDueAmount();
|
417
408
|
if (Number(balanceDueAmount2) > 0) {
|
@@ -420,7 +411,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
420
411
|
false
|
421
412
|
);
|
422
413
|
const orderInfo2 = checkoutModule.getCurrentOrderInfo();
|
423
|
-
|
414
|
+
(0, import_PaymentResultToastUtils.displayPaymentResultToast)(
|
424
415
|
{
|
425
416
|
paymentStatus: "partially_paid",
|
426
417
|
orderTotalAmount: orderInfo2.totalAmount,
|
@@ -440,6 +431,19 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
440
431
|
}
|
441
432
|
);
|
442
433
|
}
|
434
|
+
const paymentMethodName = data.paymentMethodName || data.name || "";
|
435
|
+
const isCashPayment = data.paymentMethodCode === "CASHMANUAL" || /现金|現金/i.test(paymentMethodName) || /cash/i.test(paymentMethodName);
|
436
|
+
if (isCashPayment) {
|
437
|
+
logger == null ? void 0 : logger.addLog({
|
438
|
+
type: "info",
|
439
|
+
title: "open_till",
|
440
|
+
metadata: {}
|
441
|
+
});
|
442
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
443
|
+
module: "till",
|
444
|
+
key: "open_till"
|
445
|
+
});
|
446
|
+
}
|
443
447
|
}
|
444
448
|
);
|
445
449
|
return () => {
|
@@ -502,7 +506,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
502
506
|
return;
|
503
507
|
}
|
504
508
|
const result = await checkoutModule.manualSyncOrderAsync();
|
505
|
-
|
509
|
+
showSuccessToast == null ? void 0 : showSuccessToast(result);
|
506
510
|
if (result.success) {
|
507
511
|
const responseData = (_a2 = result.response) == null ? void 0 : _a2.data;
|
508
512
|
console.log("print_order_onOrderSynced>>>>", result);
|
@@ -513,17 +517,17 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
513
517
|
data: {
|
514
518
|
order_id: responseData.order_id,
|
515
519
|
machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
|
516
|
-
small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data
|
520
|
+
small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data,
|
521
|
+
machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
|
517
522
|
}
|
518
523
|
};
|
519
524
|
console.log("print_order_onOrderSynced_params>>>>", params);
|
520
|
-
(
|
525
|
+
nativePrint(params, (res) => {
|
521
526
|
console.log("print_order_onOrderSynced_res>>>>", res);
|
522
527
|
});
|
523
528
|
} catch (error) {
|
524
529
|
console.error("print_order_onOrderSynced_error>>>>", error);
|
525
530
|
}
|
526
|
-
onPaymentCancel(true);
|
527
531
|
}
|
528
532
|
};
|
529
533
|
const handleSavePayLater = (0, import_react.useCallback)(
|
@@ -541,6 +545,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
541
545
|
const res = await checkoutModule.saveForLaterPaymentAsync();
|
542
546
|
if (res.success) {
|
543
547
|
onPaymentCancel(true);
|
548
|
+
(0, import_PaymentResultToast.closePaymentResultToast)();
|
544
549
|
}
|
545
550
|
}
|
546
551
|
},
|
@@ -686,7 +691,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
686
691
|
data: { order_id: data.orderId }
|
687
692
|
};
|
688
693
|
try {
|
689
|
-
(
|
694
|
+
nativePrint(params, (res) => {
|
690
695
|
console.log("handleButtonClick_print-receipt_res>>>>", res);
|
691
696
|
if (!(res == null ? void 0 : res.result)) {
|
692
697
|
Toast == null ? void 0 : Toast.error((res == null ? void 0 : res.msg) || "");
|
@@ -781,49 +786,35 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
781
786
|
const res = await checkoutModule.roundAmountAsync(amount);
|
782
787
|
return res;
|
783
788
|
};
|
784
|
-
const handleModalClick = (0, import_react.useCallback)((event) => {
|
785
|
-
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
786
|
-
}, []);
|
787
789
|
return /* @__PURE__ */ import_react.default.createElement(
|
788
790
|
"div",
|
789
791
|
{
|
790
792
|
ref: checkoutRef,
|
791
|
-
...{ onClick: handleModalClick },
|
792
793
|
style: {
|
793
794
|
...import_styles.checkoutStyles.container,
|
794
795
|
maxHeight: dynamicMaxHeight
|
795
796
|
}
|
796
797
|
},
|
797
798
|
/* @__PURE__ */ import_react.default.createElement(
|
798
|
-
|
799
|
+
import_SearchAndClientModule.default,
|
799
800
|
{
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
}
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
import_WalletPassModule.default,
|
818
|
-
{
|
819
|
-
clientId: (_b = (_a = state == null ? void 0 : state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id,
|
820
|
-
customAmount,
|
821
|
-
orderInfo: orderInfo || void 0,
|
822
|
-
ref: walletPassRef,
|
823
|
-
paymentItems,
|
824
|
-
onSelectChange: handleSelectWalletChange
|
825
|
-
}
|
826
|
-
)
|
801
|
+
onClientChange: () => {
|
802
|
+
clientChangedRef.current = true;
|
803
|
+
},
|
804
|
+
onSearch: handleSearch,
|
805
|
+
...searchAndClientProps
|
806
|
+
}
|
807
|
+
),
|
808
|
+
moduleConfig.showWalletPass && /* @__PURE__ */ import_react.default.createElement(
|
809
|
+
import_WalletPassModule.default,
|
810
|
+
{
|
811
|
+
clientId: (_b = (_a = state == null ? void 0 : state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id,
|
812
|
+
customAmount,
|
813
|
+
orderInfo: orderInfo || void 0,
|
814
|
+
ref: walletPassRef,
|
815
|
+
paymentItems,
|
816
|
+
onSelectChange: handleSelectWalletChange
|
817
|
+
}
|
827
818
|
),
|
828
819
|
/* @__PURE__ */ import_react.default.createElement(
|
829
820
|
import_AmountSummary.default,
|
@@ -839,7 +830,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
839
830
|
clientInfo: (_c = state == null ? void 0 : state.client) == null ? void 0 : _c.value,
|
840
831
|
onAmountChange: handleAmountChange,
|
841
832
|
onDepositStatusChange: handleDepositStatusChange,
|
842
|
-
onBalanceDueAmountClick: handleButtonClick,
|
843
833
|
onConfirm: handleWalletPassConfirmPay,
|
844
834
|
totalAmount
|
845
835
|
}
|
@@ -889,8 +879,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
889
879
|
paymentMethods,
|
890
880
|
customAmount,
|
891
881
|
title: paymentOptionsTitle,
|
892
|
-
disabled: isOrderFree
|
893
|
-
showCashPayment
|
882
|
+
disabled: isOrderFree
|
894
883
|
}
|
895
884
|
)
|
896
885
|
),
|
@@ -956,7 +945,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
956
945
|
) || "Close price adjustment modal"
|
957
946
|
}
|
958
947
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-price-adjust-container" }, /* @__PURE__ */ import_react.default.createElement(
|
959
|
-
|
948
|
+
import_materials2.PisellAdjustPrice,
|
960
949
|
{
|
961
950
|
selectType: "dark",
|
962
951
|
originValue: currentTotalPrice,
|
@@ -1004,14 +993,15 @@ var PaymentModal = ({
|
|
1004
993
|
const [actualShowCashPayment, setActualShowCashPayment] = (0, import_react.useState)(true);
|
1005
994
|
const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
|
1006
995
|
const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
|
1007
|
-
const Toast = (0,
|
996
|
+
const Toast = (0, import_useToast.default)();
|
997
|
+
const { nativePrint } = (0, import_printer.default)();
|
1008
998
|
const handleRetry = async () => {
|
1009
999
|
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1010
1000
|
const res = await (checkoutModule == null ? void 0 : checkoutModule.manualSyncOrderAsync());
|
1011
1001
|
console.log(res);
|
1012
1002
|
if (res.success) {
|
1013
1003
|
setShowRetryModal(false);
|
1014
|
-
|
1004
|
+
showSuccessToast == null ? void 0 : showSuccessToast(res);
|
1015
1005
|
}
|
1016
1006
|
};
|
1017
1007
|
(0, import_react.useEffect)(() => {
|
@@ -1028,29 +1018,6 @@ var PaymentModal = ({
|
|
1028
1018
|
window.removeEventListener("orientationchange", updateHeight);
|
1029
1019
|
};
|
1030
1020
|
}, []);
|
1031
|
-
(0, import_react.useEffect)(() => {
|
1032
|
-
var _a2;
|
1033
|
-
const initTillButtonData = async () => {
|
1034
|
-
var _a3, _b2;
|
1035
|
-
console.log("准备获取tillButton数据");
|
1036
|
-
try {
|
1037
|
-
const tillButtonData = await ((_b2 = (_a3 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a3.asyncDataManager) == null ? void 0 : _b2.call(_a3, {
|
1038
|
-
module: "get",
|
1039
|
-
key: "till_button"
|
1040
|
-
}));
|
1041
|
-
console.log("获取tillButton数据成功", tillButtonData);
|
1042
|
-
if (tillButtonData) {
|
1043
|
-
(0, import_PaymentResultToast.setTillButton)(tillButtonData);
|
1044
|
-
console.log("PaymentModal: tillButton data set successfully", tillButtonData);
|
1045
|
-
}
|
1046
|
-
} catch (error) {
|
1047
|
-
console.error("PaymentModal: Failed to get till_button from asyncDataManager:", error);
|
1048
|
-
}
|
1049
|
-
};
|
1050
|
-
if ((_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.asyncDataManager) {
|
1051
|
-
initTillButtonData();
|
1052
|
-
}
|
1053
|
-
}, [interaction]);
|
1054
1021
|
const dynamicMaxHeight = (0, import_react.useMemo)(() => {
|
1055
1022
|
if (windowHeight === 0) return "600px";
|
1056
1023
|
const bodyTransform = getComputedStyle(document.body).transform;
|
@@ -1152,112 +1119,8 @@ var PaymentModal = ({
|
|
1152
1119
|
const currentPaymentResultRef = import_react.default.useRef(null);
|
1153
1120
|
const paymentContentRef = import_react.default.useRef(null);
|
1154
1121
|
const handleOrderNoteClickFromToast = () => {
|
1155
|
-
|
1156
|
-
|
1157
|
-
document.body.appendChild(modalContainer);
|
1158
|
-
const showToast = (type, message) => {
|
1159
|
-
if (Toast && Toast[type]) {
|
1160
|
-
Toast[type](message);
|
1161
|
-
} else {
|
1162
|
-
if (type === "success") {
|
1163
|
-
console.log("✅ Success:", message);
|
1164
|
-
} else {
|
1165
|
-
console.error("❌ Error:", message);
|
1166
|
-
}
|
1167
|
-
}
|
1168
|
-
};
|
1169
|
-
const handleNoteConfirm2 = async (noteValue) => {
|
1170
|
-
var _a3;
|
1171
|
-
try {
|
1172
|
-
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1173
|
-
const orderId = checkoutModule == null ? void 0 : checkoutModule.getCurrentOrderId();
|
1174
|
-
if (checkoutModule && orderId) {
|
1175
|
-
await ((_a3 = checkoutModule.editOrderNoteByOrderIdAsync) == null ? void 0 : _a3.call(checkoutModule, orderId, noteValue));
|
1176
|
-
setOrderNote(noteValue);
|
1177
|
-
showToast("success", import_utils.locales.getText("pisell2.checkout.order-note.updated-successfully"));
|
1178
|
-
}
|
1179
|
-
} catch (error) {
|
1180
|
-
console.error("Failed to update order note:", error);
|
1181
|
-
showToast("error", import_utils.locales.getText("pisell2.checkout.order-note.update-failed"));
|
1182
|
-
}
|
1183
|
-
import_react_dom2.default.unmountComponentAtNode(modalContainer);
|
1184
|
-
if (document.body.contains(modalContainer)) {
|
1185
|
-
document.body.removeChild(modalContainer);
|
1186
|
-
}
|
1187
|
-
};
|
1188
|
-
const handleNoteDelete2 = async () => {
|
1189
|
-
var _a3;
|
1190
|
-
try {
|
1191
|
-
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1192
|
-
const orderId = checkoutModule == null ? void 0 : checkoutModule.getCurrentOrderId();
|
1193
|
-
if (checkoutModule && orderId) {
|
1194
|
-
await ((_a3 = checkoutModule.editOrderNoteByOrderIdAsync) == null ? void 0 : _a3.call(checkoutModule, orderId, ""));
|
1195
|
-
setOrderNote("");
|
1196
|
-
showToast("success", import_utils.locales.getText("pisell2.checkout.order-note.deleted-successfully"));
|
1197
|
-
}
|
1198
|
-
} catch (error) {
|
1199
|
-
console.error("Failed to delete order note:", error);
|
1200
|
-
showToast("error", import_utils.locales.getText("pisell2.checkout.order-note.delete-failed"));
|
1201
|
-
}
|
1202
|
-
import_react_dom2.default.unmountComponentAtNode(modalContainer);
|
1203
|
-
if (document.body.contains(modalContainer)) {
|
1204
|
-
document.body.removeChild(modalContainer);
|
1205
|
-
}
|
1206
|
-
};
|
1207
|
-
const handleNoteCancel2 = () => {
|
1208
|
-
import_react_dom2.default.unmountComponentAtNode(modalContainer);
|
1209
|
-
if (document.body.contains(modalContainer)) {
|
1210
|
-
document.body.removeChild(modalContainer);
|
1211
|
-
}
|
1212
|
-
};
|
1213
|
-
const currentLocale = ((_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils) == null ? void 0 : _a2.getApp) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.locales) == null ? void 0 : _d2.getLocale) == null ? void 0 : _e2.call(_d2)) || ((_g2 = (_f2 = context.appHelper.utils) == null ? void 0 : _f2.storage) == null ? void 0 : _g2.get("umi_locale")) || "en";
|
1214
|
-
const EngineContextProvider = ({ children }) => {
|
1215
|
-
var _a3;
|
1216
|
-
const tempEngineContext = {
|
1217
|
-
...context,
|
1218
|
-
engine: {
|
1219
|
-
...context.engine,
|
1220
|
-
props: {
|
1221
|
-
...(_a3 = context.engine) == null ? void 0 : _a3.props,
|
1222
|
-
locale: currentLocale
|
1223
|
-
}
|
1224
|
-
}
|
1225
|
-
};
|
1226
|
-
const TempContext = import_react.default.createContext(tempEngineContext);
|
1227
|
-
const originalContext = window.__injectedContext;
|
1228
|
-
window.__injectedContext = tempEngineContext;
|
1229
|
-
import_react.default.useEffect(() => {
|
1230
|
-
return () => {
|
1231
|
-
window.__injectedContext = originalContext;
|
1232
|
-
};
|
1233
|
-
}, []);
|
1234
|
-
return /* @__PURE__ */ import_react.default.createElement(TempContext.Provider, { value: tempEngineContext }, children);
|
1235
|
-
};
|
1236
|
-
let orderNote2 = "";
|
1237
|
-
try {
|
1238
|
-
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1239
|
-
orderNote2 = checkoutModule.getOrderNote();
|
1240
|
-
} catch (error) {
|
1241
|
-
console.warn("Failed to get initial custom amount:", error);
|
1242
|
-
}
|
1243
|
-
import_react_dom2.default.render(
|
1244
|
-
/* @__PURE__ */ import_react.default.createElement(EngineContextProvider, null, /* @__PURE__ */ import_react.default.createElement(import_materials.ConfigProvider, { prefixCls: "pisell-lowcode", theme: {
|
1245
|
-
token: {
|
1246
|
-
colorPrimary: "#7F56DA"
|
1247
|
-
}
|
1248
|
-
} }, /* @__PURE__ */ import_react.default.createElement(
|
1249
|
-
import_noteModal.default,
|
1250
|
-
{
|
1251
|
-
open: true,
|
1252
|
-
title: import_utils.locales.getText("pisell2.text.add-order-notes"),
|
1253
|
-
value: orderNote2,
|
1254
|
-
onConfirm: handleNoteConfirm2,
|
1255
|
-
onDelete: handleNoteDelete2,
|
1256
|
-
onCancel: handleNoteCancel2
|
1257
|
-
}
|
1258
|
-
))),
|
1259
|
-
modalContainer
|
1260
|
-
);
|
1122
|
+
setNoteModalSource("payment-result-toast");
|
1123
|
+
setNoteModalOpen(true);
|
1261
1124
|
};
|
1262
1125
|
const translation = (key, fallback) => {
|
1263
1126
|
const umiLocale = (0, import_locales.getLocale)();
|
@@ -1280,14 +1143,11 @@ var PaymentModal = ({
|
|
1280
1143
|
};
|
1281
1144
|
const handleToastClose = () => {
|
1282
1145
|
console.log(
|
1283
|
-
"PaymentModal - Toast closed, executing
|
1146
|
+
"PaymentModal - Toast closed, executing callbacks and closing modal"
|
1284
1147
|
);
|
1285
1148
|
if (currentPaymentResultRef.current) {
|
1286
1149
|
callback == null ? void 0 : callback(currentPaymentResultRef.current);
|
1287
1150
|
}
|
1288
|
-
};
|
1289
|
-
const handleModalClose = () => {
|
1290
|
-
console.log("PaymentModal - Modal closing independently");
|
1291
1151
|
onClose == null ? void 0 : onClose(true);
|
1292
1152
|
};
|
1293
1153
|
const handlePaymentCancel = (reset) => {
|
@@ -1297,30 +1157,43 @@ var PaymentModal = ({
|
|
1297
1157
|
checkout.cancelCurrentOrderAsync();
|
1298
1158
|
onClose == null ? void 0 : onClose(reset || false);
|
1299
1159
|
};
|
1300
|
-
const CustomHeader = () => /* @__PURE__ */ import_react.default.createElement(
|
1301
|
-
|
1160
|
+
const CustomHeader = () => /* @__PURE__ */ import_react.default.createElement(
|
1161
|
+
"div",
|
1302
1162
|
{
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
if (checkout.isCurrentOrderSynced()) {
|
1309
|
-
handlePaymentCancel(true);
|
1310
|
-
} else {
|
1311
|
-
handlePaymentCancel(false);
|
1312
|
-
}
|
1163
|
+
style: {
|
1164
|
+
display: "flex",
|
1165
|
+
alignItems: "center",
|
1166
|
+
width: "100%",
|
1167
|
+
position: "relative"
|
1313
1168
|
}
|
1314
|
-
}
|
1315
|
-
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "header__center" }, translation("order.total"), ":", (0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, state == null ? void 0 : state.amountSymbol)), /* @__PURE__ */ import_react.default.createElement("div", { className: "header__right" }, /* @__PURE__ */ import_react.default.createElement(
|
1316
|
-
import_antd.Button,
|
1317
|
-
{
|
1318
|
-
size: "small",
|
1319
|
-
type: "link",
|
1320
|
-
onClick: () => handlePaymentCancel(true)
|
1321
1169
|
},
|
1322
|
-
|
1323
|
-
|
1170
|
+
/* @__PURE__ */ import_react.default.createElement(
|
1171
|
+
"div",
|
1172
|
+
{
|
1173
|
+
style: {
|
1174
|
+
display: "flex",
|
1175
|
+
alignItems: "center",
|
1176
|
+
gap: "12px",
|
1177
|
+
flex: "0 0 auto"
|
1178
|
+
}
|
1179
|
+
},
|
1180
|
+
/* @__PURE__ */ import_react.default.createElement(import_components.DeviceIconGroup, null)
|
1181
|
+
),
|
1182
|
+
/* @__PURE__ */ import_react.default.createElement(
|
1183
|
+
"div",
|
1184
|
+
{
|
1185
|
+
style: {
|
1186
|
+
position: "absolute",
|
1187
|
+
left: "50%",
|
1188
|
+
transform: "translateX(-50%)",
|
1189
|
+
fontWeight: "500"
|
1190
|
+
}
|
1191
|
+
},
|
1192
|
+
translation("order.total"),
|
1193
|
+
":",
|
1194
|
+
(0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, state == null ? void 0 : state.amountSymbol)
|
1195
|
+
)
|
1196
|
+
);
|
1324
1197
|
(0, import_react.useEffect)(() => {
|
1325
1198
|
var _a2;
|
1326
1199
|
if ((_a2 = data == null ? void 0 : data.order_info) == null ? void 0 : _a2.order_note) {
|
@@ -1373,8 +1246,8 @@ var PaymentModal = ({
|
|
1373
1246
|
}
|
1374
1247
|
unsubscribeRef.current = checkout.core.effects.on(
|
1375
1248
|
"checkout:onOrderSynced",
|
1376
|
-
|
1377
|
-
var _a3, _b3, _c2
|
1249
|
+
(data2) => {
|
1250
|
+
var _a3, _b3, _c2;
|
1378
1251
|
const responseData = (_a3 = data2.response) == null ? void 0 : _a3.data;
|
1379
1252
|
const paymentStatus = responseData == null ? void 0 : responseData.payment_status;
|
1380
1253
|
if (data2.isManual) return;
|
@@ -1404,7 +1277,8 @@ var PaymentModal = ({
|
|
1404
1277
|
data: {
|
1405
1278
|
order_id: responseData.order_id,
|
1406
1279
|
machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
|
1407
|
-
small_ticket_data: (_c2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _c2.small_ticket_data
|
1280
|
+
small_ticket_data: (_c2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _c2.small_ticket_data,
|
1281
|
+
machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
|
1408
1282
|
}
|
1409
1283
|
};
|
1410
1284
|
console.log("print_order_onOrderSynced_params>>>>", params);
|
@@ -1415,7 +1289,7 @@ var PaymentModal = ({
|
|
1415
1289
|
params
|
1416
1290
|
}
|
1417
1291
|
});
|
1418
|
-
(
|
1292
|
+
nativePrint(params, (res) => {
|
1419
1293
|
console.log("print_order_onOrderSynced_res>>>>", res);
|
1420
1294
|
logger == null ? void 0 : logger.addLog({
|
1421
1295
|
type: "info",
|
@@ -1440,24 +1314,17 @@ var PaymentModal = ({
|
|
1440
1314
|
paymentStatus,
|
1441
1315
|
!!currentChangeGivenAmount
|
1442
1316
|
);
|
1443
|
-
|
1444
|
-
module: "get",
|
1445
|
-
key: "auto_print_receipt"
|
1446
|
-
}));
|
1447
|
-
await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
|
1317
|
+
(0, import_PaymentResultToastUtils.displayPaymentResultToast)(
|
1448
1318
|
{
|
1449
1319
|
paymentStatus,
|
1450
1320
|
orderTotalAmount,
|
1451
1321
|
gapAmount: paymentStatus === "partially_paid" ? gapAmount : currentChangeGivenAmount,
|
1452
1322
|
failureReason,
|
1453
1323
|
autoCloseConfig,
|
1454
|
-
actionButtons: generateActionButtons(paymentStatus
|
1324
|
+
actionButtons: generateActionButtons(paymentStatus)
|
1455
1325
|
},
|
1456
1326
|
paymentResultToastConfig
|
1457
1327
|
);
|
1458
|
-
if (paymentStatus === "paid") {
|
1459
|
-
handleModalClose();
|
1460
|
-
}
|
1461
1328
|
const paymentResult = {
|
1462
1329
|
...data2,
|
1463
1330
|
toastInfo: {
|
@@ -1525,12 +1392,13 @@ var PaymentModal = ({
|
|
1525
1392
|
state,
|
1526
1393
|
onToastClose: handleToastClose
|
1527
1394
|
};
|
1528
|
-
const generateActionButtons = (paymentStatus
|
1395
|
+
const generateActionButtons = (paymentStatus) => {
|
1529
1396
|
const getClassName = (suffix) => `payment-result-toast-${suffix}`;
|
1530
1397
|
const handleDetailsClick = async () => {
|
1531
1398
|
var _a2;
|
1532
1399
|
setTimeout(() => {
|
1533
1400
|
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1401
|
+
handleToastClose();
|
1534
1402
|
}, 0);
|
1535
1403
|
const { isTerminal, isWebPos } = (_a2 = context.appHelper) == null ? void 0 : _a2.utils;
|
1536
1404
|
if (isTerminal == null ? void 0 : isTerminal()) {
|
@@ -1547,9 +1415,6 @@ var PaymentModal = ({
|
|
1547
1415
|
}
|
1548
1416
|
};
|
1549
1417
|
const handlePrintReceiptClick = async () => {
|
1550
|
-
setTimeout(() => {
|
1551
|
-
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1552
|
-
}, 0);
|
1553
1418
|
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1554
1419
|
if (!checkoutModule) return;
|
1555
1420
|
let data2;
|
@@ -1568,7 +1433,7 @@ var PaymentModal = ({
|
|
1568
1433
|
data: { order_id: data2.orderId }
|
1569
1434
|
};
|
1570
1435
|
try {
|
1571
|
-
(
|
1436
|
+
nativePrint(params, (res) => {
|
1572
1437
|
console.log("handleButtonClick_print-receipt_res>>>>", res);
|
1573
1438
|
if (!(res == null ? void 0 : res.result)) {
|
1574
1439
|
Toast == null ? void 0 : Toast.error((res == null ? void 0 : res.msg) || "");
|
@@ -1598,9 +1463,6 @@ var PaymentModal = ({
|
|
1598
1463
|
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1599
1464
|
};
|
1600
1465
|
const handleOrderNoteClick = () => {
|
1601
|
-
setTimeout(() => {
|
1602
|
-
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1603
|
-
}, 0);
|
1604
1466
|
console.log(import_utils.locales.getText("payment.result.actions.orderNoteClicked"));
|
1605
1467
|
if (handleOrderNoteClickFromToast) {
|
1606
1468
|
handleOrderNoteClickFromToast();
|
@@ -1613,7 +1475,7 @@ var PaymentModal = ({
|
|
1613
1475
|
case "paid":
|
1614
1476
|
return [
|
1615
1477
|
[
|
1616
|
-
|
1478
|
+
{
|
1617
1479
|
id: "details",
|
1618
1480
|
buttonProps: {
|
1619
1481
|
className: getClassName("action-button"),
|
@@ -1621,7 +1483,8 @@ var PaymentModal = ({
|
|
1621
1483
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
|
1622
1484
|
children: import_utils.locales.getText("payment.result.details")
|
1623
1485
|
}
|
1624
|
-
}
|
1486
|
+
},
|
1487
|
+
{
|
1625
1488
|
id: "print",
|
1626
1489
|
buttonProps: {
|
1627
1490
|
className: getClassName("action-button"),
|
@@ -1657,12 +1520,21 @@ var PaymentModal = ({
|
|
1657
1520
|
return [
|
1658
1521
|
[
|
1659
1522
|
{
|
1660
|
-
id: "
|
1523
|
+
id: "saveAsPartialPaid",
|
1661
1524
|
buttonProps: {
|
1662
1525
|
className: getClassName("action-button"),
|
1663
|
-
onClick:
|
1664
|
-
|
1665
|
-
|
1526
|
+
onClick: handleSaveAsPartialPaidClick,
|
1527
|
+
children: import_utils.locales.getText("payment.result.saveAsPartialPaid")
|
1528
|
+
}
|
1529
|
+
},
|
1530
|
+
{
|
1531
|
+
id: "continuePayment",
|
1532
|
+
buttonProps: {
|
1533
|
+
className: getClassName("action-button"),
|
1534
|
+
onClick: () => {
|
1535
|
+
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1536
|
+
},
|
1537
|
+
children: import_utils.locales.getText("payment.result.continuePayment")
|
1666
1538
|
}
|
1667
1539
|
},
|
1668
1540
|
{
|
@@ -1806,7 +1678,7 @@ var PaymentModal = ({
|
|
1806
1678
|
paymentResultToastConfig,
|
1807
1679
|
generateActionButtons
|
1808
1680
|
);
|
1809
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
1681
|
+
return /* @__PURE__ */ import_react.default.createElement(import_PaymentResultToast.PaymentResultToastProvider, null, /* @__PURE__ */ import_react.default.createElement(
|
1810
1682
|
import_materials.PisellContainer,
|
1811
1683
|
{
|
1812
1684
|
renderType: "modal",
|
@@ -1820,9 +1692,10 @@ var PaymentModal = ({
|
|
1820
1692
|
destroyOnClose: false,
|
1821
1693
|
maskClosable: false,
|
1822
1694
|
footer: null,
|
1823
|
-
closeIcon:
|
1695
|
+
closeIcon: null,
|
1824
1696
|
wrapClassName: `payment-modal-wrapper ${!actualShowCashPayment ? "no-cash-payment" : ""}`,
|
1825
1697
|
size: "large",
|
1698
|
+
headerDivider: false,
|
1826
1699
|
style: {
|
1827
1700
|
height: "auto"
|
1828
1701
|
},
|
@@ -1830,7 +1703,7 @@ var PaymentModal = ({
|
|
1830
1703
|
maxHeight: "100%",
|
1831
1704
|
// 使用100%基于父元素,而不是视口的90%
|
1832
1705
|
overflowY: "auto",
|
1833
|
-
padding:
|
1706
|
+
padding: 0,
|
1834
1707
|
display: "flex",
|
1835
1708
|
flexDirection: "column"
|
1836
1709
|
}
|