@pisell/private-materials 6.5.3 → 6.5.5
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 +150 -150
- 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 +7 -7
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/actionButtons/index.js +37 -42
- package/es/components/booking/components/actionButtons/index.less +0 -28
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/footer/amount.d.ts +3 -3
- package/es/components/booking/components/footer/amount.js +52 -31
- package/es/components/booking/components/footer/index.js +168 -68
- package/es/components/booking/components/footer/utils.js +62 -33
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.js +2 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +42 -2
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +2 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +12 -4
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.js +10 -5
- package/es/components/checkout/PaymentModal.d.ts +2 -0
- package/es/components/checkout/PaymentModal.js +402 -241
- package/es/components/checkout/PaymentPlugin.d.ts +0 -1
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +161 -54
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +114 -131
- package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
- package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/components/WalletPassModule/index.js +4 -3
- package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +2 -0
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +33 -0
- package/es/components/checkout/locales.js +39 -3
- package/es/components/checkout/types.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -2
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +143 -71
- package/es/components/shoppingCart/components/Cart/index.js +1 -1
- package/es/components/shoppingCart/components/Cart/index.less +31 -0
- package/es/components/shoppingCart/locales.d.ts +3 -0
- package/es/components/shoppingCart/locales.js +12 -3
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/ticketBooking/utils/index.js +2 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
- package/es/pro/priceKeyboard/index.d.ts +3 -0
- package/es/pro/priceKeyboard/index.js +3 -0
- package/es/pro/priceKeyboard/index.less +215 -0
- package/es/pro/priceKeyboard/utils.d.ts +31 -0
- package/es/pro/priceKeyboard/utils.js +51 -0
- package/es/pro/skuDetailModal/index.js +19 -16
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/actionButtons/index.js +31 -28
- package/lib/components/booking/components/actionButtons/index.less +0 -28
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.d.ts +3 -3
- package/lib/components/booking/components/footer/amount.js +50 -34
- package/lib/components/booking/components/footer/index.js +107 -40
- package/lib/components/booking/components/footer/utils.js +35 -7
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.js +2 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +18 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +12 -4
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.js +10 -5
- package/lib/components/checkout/PaymentModal.d.ts +2 -0
- package/lib/components/checkout/PaymentModal.js +160 -73
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -1
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +114 -40
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +103 -134
- package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/components/WalletPassModule/index.js +4 -3
- package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +2 -0
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +33 -0
- package/lib/components/checkout/locales.js +39 -3
- package/lib/components/checkout/types.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -2
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
- package/lib/components/shoppingCart/components/Cart/index.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.less +31 -0
- package/lib/components/shoppingCart/locales.d.ts +3 -0
- package/lib/components/shoppingCart/locales.js +6 -3
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/ticketBooking/utils/index.js +2 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
- package/lib/pro/priceKeyboard/index.d.ts +3 -0
- package/lib/pro/priceKeyboard/index.js +45 -0
- package/lib/pro/priceKeyboard/index.less +215 -0
- package/lib/pro/priceKeyboard/utils.d.ts +31 -0
- package/lib/pro/priceKeyboard/utils.js +75 -0
- package/lib/pro/skuDetailModal/index.js +18 -22
- package/lib/utils/index.d.ts +1 -1
- package/package.json +12 -12
@@ -41,7 +41,8 @@ var import_utils = require("@pisell/utils");
|
|
41
41
|
var import_decimal = __toESM(require("decimal.js"));
|
42
42
|
var import_locales = __toESM(require("../../locales"));
|
43
43
|
var import_PaymentDetailModal = __toESM(require("../PaymentDetailModal"));
|
44
|
-
var
|
44
|
+
var import_pisellSimplePriceKeyboardPopover = __toESM(require("../../../../pro/pisellSimplePriceKeyboardPopover"));
|
45
|
+
var import_priceKeyboard = require("../../../../pro/priceKeyboard");
|
45
46
|
var import_index = require("./index.less");
|
46
47
|
var import_classnames = __toESM(require("classnames"));
|
47
48
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
@@ -105,6 +106,7 @@ function AmountSummary({
|
|
105
106
|
const [summaryData, setSummaryData] = (0, import_react.useState)([]);
|
106
107
|
const [partialPaidAmount, setPartialPaidAmount] = (0, import_react.useState)("0");
|
107
108
|
const checkoutModule = pisellos.getModule("checkout");
|
109
|
+
const [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(false);
|
108
110
|
const labelMaps = {
|
109
111
|
deposit: getText("pisell2.subtotal.deposit") || "Deposit",
|
110
112
|
total: getText("pisell2.subtotal.total") || "Total",
|
@@ -117,13 +119,15 @@ function AmountSummary({
|
|
117
119
|
expect_amount: getText("pisell2.subtotal.expect-amount") || "Expected Amount"
|
118
120
|
};
|
119
121
|
const getBalanceDueAmount = () => {
|
120
|
-
|
121
|
-
(
|
122
|
-
);
|
123
|
-
if (expectAmountItem) {
|
124
|
-
return expectAmountItem.value;
|
122
|
+
if (paymentType === "deposit") {
|
123
|
+
return (orderInfo == null ? void 0 : orderInfo.depositAmount) || "0";
|
125
124
|
}
|
126
|
-
return 0
|
125
|
+
return (paymentItems == null ? void 0 : paymentItems.reduce((acc, item) => {
|
126
|
+
if (item.isSynced || !item.voucher_id) {
|
127
|
+
return acc;
|
128
|
+
}
|
129
|
+
return acc.plus(item.amount);
|
130
|
+
}, new import_decimal.default(0)).toNumber()) || 0;
|
127
131
|
};
|
128
132
|
const parseFormattedAmount = (formattedAmount) => {
|
129
133
|
if (typeof formattedAmount === "number") {
|
@@ -155,6 +159,7 @@ function AmountSummary({
|
|
155
159
|
if (Array.isArray(summary)) {
|
156
160
|
setSummaryData(summary);
|
157
161
|
}
|
162
|
+
setPaymentType(orderInfo.isDeposit ? "deposit" : "regular");
|
158
163
|
} catch (error) {
|
159
164
|
console.warn("Failed to get cart summary:", error);
|
160
165
|
}
|
@@ -223,20 +228,10 @@ function AmountSummary({
|
|
223
228
|
);
|
224
229
|
return totalDecimal.toNumber();
|
225
230
|
};
|
226
|
-
const getOrderDueAmount = () => {
|
227
|
-
const expectAmountItem = summaryData.find(
|
228
|
-
(item) => item.key === "expect_amount"
|
229
|
-
);
|
230
|
-
if (expectAmountItem) {
|
231
|
-
return expectAmountItem.value;
|
232
|
-
}
|
233
|
-
return paymentType === "deposit" ? 15.1 : 130.2;
|
234
|
-
};
|
235
231
|
const getKeyboardLimits = () => {
|
236
232
|
const walletTotal = getWalletTotalAmount();
|
237
|
-
const orderDue = getOrderDueAmount();
|
238
233
|
const walletTotalDecimal = new import_decimal.default(walletTotal);
|
239
|
-
const orderDueDecimal = new import_decimal.default(
|
234
|
+
const orderDueDecimal = new import_decimal.default(Number(balanceDueAmount || 0));
|
240
235
|
const minDecimal = new import_decimal.default(0.01);
|
241
236
|
const diffDecimal = orderDueDecimal.minus(walletTotalDecimal);
|
242
237
|
const maxAmountDecimal = import_decimal.default.max(minDecimal, diffDecimal);
|
@@ -302,7 +297,7 @@ function AmountSummary({
|
|
302
297
|
var _a2;
|
303
298
|
const partialPaidAmountDecimal = new import_decimal.default(partialPaidAmount || "0");
|
304
299
|
const voucherPaymentAmount = ((_a2 = paymentItems == null ? void 0 : paymentItems.reduce((acc, item) => {
|
305
|
-
if (item.voucher_id) {
|
300
|
+
if (item.voucher_id && !item.isSynced) {
|
306
301
|
try {
|
307
302
|
const amount = new import_decimal.default(item.amount || "0");
|
308
303
|
const roundingAmount = new import_decimal.default(item.rounding_amount || "0");
|
@@ -314,6 +309,10 @@ function AmountSummary({
|
|
314
309
|
return acc;
|
315
310
|
}, new import_decimal.default(0))) == null ? void 0 : _a2.toNumber()) || 0;
|
316
311
|
const totalPaidAmount = partialPaidAmountDecimal.plus(voucherPaymentAmount).toNumber();
|
312
|
+
const syncedPaymentItems = (paymentItems == null ? void 0 : paymentItems.filter((item) => item.isSynced && !item.voucher_id)) || [];
|
313
|
+
if ((syncedPaymentItems == null ? void 0 : syncedPaymentItems.length) > 0 && totalPaidAmount < totalAmount) {
|
314
|
+
return true;
|
315
|
+
}
|
317
316
|
if (totalPaidAmount >= totalAmount) {
|
318
317
|
return false;
|
319
318
|
}
|
@@ -351,7 +350,8 @@ function AmountSummary({
|
|
351
350
|
return false;
|
352
351
|
}
|
353
352
|
if (amount <= 0) {
|
354
|
-
const
|
353
|
+
const unSyncedPaymentItems = paymentItems == null ? void 0 : paymentItems.filter((item) => !item.isSynced);
|
354
|
+
const allItemsHaveVoucherId = unSyncedPaymentItems == null ? void 0 : unSyncedPaymentItems.every(
|
355
355
|
(item) => item.voucher_id
|
356
356
|
);
|
357
357
|
return allItemsHaveVoucherId || (((_a2 = walletPassData == null ? void 0 : walletPassData.selectedDiscountList) == null ? void 0 : _a2.length) ?? 0) > 0;
|
@@ -393,7 +393,7 @@ function AmountSummary({
|
|
393
393
|
};
|
394
394
|
const getMiddleContent = () => {
|
395
395
|
if (paymentType === "deposit") {
|
396
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("payment-details") }, shouldShowPartialPaidCard() && /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("partial-paid-card") }, /* @__PURE__ */ import_react2.default.createElement("span", { className: (0, import_classnames.default)("partial-paid-label") }, getText("partial.paid") || "Partial Paid"), /* @__PURE__ */ import_react2.default.createElement("span", { className: (0, import_classnames.default)("partial-paid-amount") }, (0, import_utils.formatAmountWithOptions)(partialPaidAmount, amountSymbol, {
|
396
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("payment-details") }, shouldShowPartialPaidCard() && /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("partial-paid-card") }, /* @__PURE__ */ import_react2.default.createElement("span", { className: (0, import_classnames.default)("partial-paid-label") }, paymentType === "deposit" ? getText("deposit.partial.paid") || "Deposit Paid" : getText("partial.paid") || "Partial Paid"), /* @__PURE__ */ import_react2.default.createElement("span", { className: (0, import_classnames.default)("partial-paid-amount") }, (0, import_utils.formatAmountWithOptions)(partialPaidAmount, amountSymbol, {
|
397
397
|
precision: 2,
|
398
398
|
hideDecimalForWholeNumbers: false,
|
399
399
|
useThousandsSeparator: true,
|
@@ -440,6 +440,33 @@ function AmountSummary({
|
|
440
440
|
));
|
441
441
|
}
|
442
442
|
};
|
443
|
+
const canSwitch = (0, import_react.useMemo)(() => {
|
444
|
+
if (Number(orderInfo == null ? void 0 : orderInfo.totalAmount) === 0) {
|
445
|
+
return false;
|
446
|
+
}
|
447
|
+
if (paymentType === "regular") {
|
448
|
+
const depositPaidAmount = paymentItems == null ? void 0 : paymentItems.reduce((acc, item) => {
|
449
|
+
if (item.order_payment_type === "deposit") {
|
450
|
+
return acc.plus(item.amount).plus(Math.abs(item.rounding_amount));
|
451
|
+
}
|
452
|
+
return acc;
|
453
|
+
}, new import_decimal.default(0)).toNumber();
|
454
|
+
const depositFlag = depositPaidAmount >= new import_decimal.default((orderInfo == null ? void 0 : orderInfo.depositAmount) || "0").toNumber() && Number(orderInfo == null ? void 0 : orderInfo.depositAmount) > 0;
|
455
|
+
return !(paymentItems == null ? void 0 : paymentItems.some((item) => item.order_payment_type === "normal")) && !depositFlag;
|
456
|
+
} else {
|
457
|
+
const depositPaidAmount = paymentItems == null ? void 0 : paymentItems.reduce((acc, item) => {
|
458
|
+
if (item.order_payment_type === "deposit") {
|
459
|
+
return acc.plus(item.amount);
|
460
|
+
}
|
461
|
+
return acc;
|
462
|
+
}, new import_decimal.default(0)).toNumber();
|
463
|
+
return depositPaidAmount < new import_decimal.default(totalAmount).toNumber();
|
464
|
+
}
|
465
|
+
}, [paymentItems, paymentType, totalAmount]);
|
466
|
+
const handleChangeDepositAmount = (value) => {
|
467
|
+
console.log("handleChangeDepositAmount", value);
|
468
|
+
checkoutModule == null ? void 0 : checkoutModule.setDepositAmountAsync(value);
|
469
|
+
};
|
443
470
|
return /* @__PURE__ */ import_react2.default.createElement(
|
444
471
|
"div",
|
445
472
|
{
|
@@ -448,7 +475,7 @@ function AmountSummary({
|
|
448
475
|
"amount-summary-container"
|
449
476
|
)
|
450
477
|
},
|
451
|
-
/* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("left-section") }, open_deposit ? /* @__PURE__ */ import_react2.default.createElement(
|
478
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("left-section") }, open_deposit && canSwitch ? /* @__PURE__ */ import_react2.default.createElement(
|
452
479
|
import_antd.Dropdown,
|
453
480
|
{
|
454
481
|
menu: {
|
@@ -475,11 +502,35 @@ function AmountSummary({
|
|
475
502
|
/* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("middle-section") }, getMiddleContent()),
|
476
503
|
/* @__PURE__ */ import_react2.default.createElement(
|
477
504
|
"div",
|
478
|
-
{
|
479
|
-
"
|
480
|
-
|
505
|
+
{
|
506
|
+
className: (0, import_classnames.default)("balance-due-card", {
|
507
|
+
"confirm-mode": shouldShowConfirmMode()
|
508
|
+
})
|
509
|
+
},
|
481
510
|
// 如果应该显示确认模式,直接返回确认界面
|
482
|
-
shouldShowConfirmMode() ? renderConfirmMode() : /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-info") },
|
511
|
+
shouldShowConfirmMode() ? renderConfirmMode() : /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-info") }, paymentType === "deposit" ? /* @__PURE__ */ import_react2.default.createElement(
|
512
|
+
import_pisellSimplePriceKeyboardPopover.default,
|
513
|
+
{
|
514
|
+
value: (orderInfo == null ? void 0 : orderInfo.depositAmount) || "0",
|
515
|
+
onConfirm: handleChangeDepositAmount,
|
516
|
+
showCurrencySymbol: true,
|
517
|
+
useThousandsSeparator: true,
|
518
|
+
selectType: "dark",
|
519
|
+
overlayClassName: "cash-payment-keyboard-popover"
|
520
|
+
},
|
521
|
+
/* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-label") }, getText("deposit.due") || "Deposit Due"), /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-amount") }, (0, import_utils.formatAmountWithOptions)(balanceDueAmount, amountSymbol, {
|
522
|
+
precision: 2,
|
523
|
+
hideDecimalForWholeNumbers: false,
|
524
|
+
useThousandsSeparator: true,
|
525
|
+
showCurrencySymbol: true
|
526
|
+
}), /* @__PURE__ */ import_react2.default.createElement(
|
527
|
+
import_icon.Edit05,
|
528
|
+
{
|
529
|
+
className: (0, import_classnames.default)("edit-icon"),
|
530
|
+
style: { color: "#7F56DA" }
|
531
|
+
}
|
532
|
+
)))
|
533
|
+
) : /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-label") }, getText("balance.due") || "Balance Due"), /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-amount"), onClick: () => {
|
483
534
|
onBalanceDueAmountClick == null ? void 0 : onBalanceDueAmountClick("manual-discount");
|
484
535
|
} }, (0, import_utils.formatAmountWithOptions)(balanceDueAmount, amountSymbol, {
|
485
536
|
precision: 2,
|
@@ -492,8 +543,8 @@ function AmountSummary({
|
|
492
543
|
className: (0, import_classnames.default)("edit-icon"),
|
493
544
|
style: { color: "#7F56DA" }
|
494
545
|
}
|
495
|
-
))),
|
496
|
-
/* @__PURE__ */ import_react2.default.createElement(
|
546
|
+
)))),
|
547
|
+
Number(currentAmount) > 0 && /* @__PURE__ */ import_react2.default.createElement(
|
497
548
|
"div",
|
498
549
|
{
|
499
550
|
className: (0, import_classnames.default)("pay-section"),
|
@@ -520,20 +571,43 @@ function AmountSummary({
|
|
520
571
|
)
|
521
572
|
),
|
522
573
|
!shouldShowConfirmMode() && /* @__PURE__ */ import_react2.default.createElement(
|
523
|
-
|
574
|
+
import_antd.Popover,
|
524
575
|
{
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
576
|
+
content: /* @__PURE__ */ import_react2.default.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react2.default.createElement(
|
577
|
+
import_priceKeyboard.PaymentKeyboard,
|
578
|
+
{
|
579
|
+
paymentOriginalValue: balanceDueAmount,
|
580
|
+
paymentDefaultValue: String(customAmount || 0),
|
581
|
+
enableExceedMaxAmount: false,
|
582
|
+
payment: {
|
583
|
+
enable: true
|
584
|
+
},
|
585
|
+
surcharge: {
|
586
|
+
enable: false
|
587
|
+
},
|
588
|
+
surchargeDefaultValue: {
|
589
|
+
percent: "0",
|
590
|
+
fixed: "0"
|
591
|
+
},
|
592
|
+
selectType: "light",
|
593
|
+
onChange: (value) => {
|
594
|
+
console.log(value);
|
595
|
+
},
|
596
|
+
doneText: getText("confirm"),
|
597
|
+
onPay: (args) => {
|
598
|
+
console.log(args);
|
599
|
+
setIsKeyboardVisible(false);
|
600
|
+
handleKeyboardConfirm(args.amount);
|
601
|
+
}
|
530
602
|
}
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
overlayClassName: "
|
603
|
+
)),
|
604
|
+
trigger: "click",
|
605
|
+
open: isKeyboardVisible,
|
606
|
+
onOpenChange: setIsKeyboardVisible,
|
607
|
+
placement: "bottom",
|
608
|
+
overlayClassName: "payment-keyboard-popover",
|
609
|
+
arrow: true,
|
610
|
+
destroyTooltipOnHide: true
|
537
611
|
},
|
538
612
|
/* @__PURE__ */ import_react2.default.createElement(import_antd.Button, { className: (0, import_classnames.default)("split-payment-button") }, getText("split.payment") || "拆分支付")
|
539
613
|
),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import './index.less';
|
3
2
|
import { CurrentOrderInfo } from '../../types';
|
3
|
+
import './index.less';
|
4
4
|
export interface CashPaymentModuleProps {
|
5
5
|
amountSymbol?: string;
|
6
6
|
orderInfo?: CurrentOrderInfo;
|
@@ -13,8 +13,10 @@ export interface CashPaymentModuleProps {
|
|
13
13
|
roundingDifference: number;
|
14
14
|
}>;
|
15
15
|
balanceDueAmount?: string;
|
16
|
+
syncingLock?: boolean;
|
16
17
|
}
|
17
|
-
export declare function CashPaymentModule({ amountSymbol, orderInfo, onPaymentComplete, customAmount, amountButtons, //
|
18
|
+
export declare function CashPaymentModule({ amountSymbol, orderInfo, onPaymentComplete, customAmount, amountButtons, // 按钮列表,默认5个推荐金额
|
18
19
|
disabled, // 禁用状态
|
19
|
-
roundingFunction, balanceDueAmount,
|
20
|
+
roundingFunction, balanceDueAmount, // 剩余支付金额
|
21
|
+
syncingLock, }: CashPaymentModuleProps): JSX.Element;
|
20
22
|
export default CashPaymentModule;
|
@@ -34,39 +34,36 @@ __export(CashPaymentModule_exports, {
|
|
34
34
|
});
|
35
35
|
module.exports = __toCommonJS(CashPaymentModule_exports);
|
36
36
|
var import_react = __toESM(require("react"));
|
37
|
-
var import_index = require("./index.less");
|
38
|
-
var import_classnames = __toESM(require("classnames"));
|
39
|
-
var import_icon = require("@pisell/icon");
|
40
|
-
var import_pisellPriceKeyboardPopover = __toESM(require("../../../../pro/pisellPriceKeyboardPopover"));
|
41
37
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
42
38
|
var import_utils = require("@pisell/utils");
|
43
39
|
var import_locales = __toESM(require("../../locales"));
|
44
40
|
var import_useToast = __toESM(require("../../../../hooks/useToast"));
|
41
|
+
var import_ahooks = require("ahooks");
|
42
|
+
var import_priceKeyboard = require("../../../../pro/priceKeyboard");
|
43
|
+
var import_index = require("./index.less");
|
45
44
|
function CashPaymentModule({
|
46
45
|
amountSymbol,
|
47
46
|
orderInfo,
|
48
47
|
onPaymentComplete,
|
49
48
|
customAmount,
|
50
49
|
amountButtons = [],
|
51
|
-
//
|
50
|
+
// 按钮列表,默认5个推荐金额
|
52
51
|
disabled = false,
|
53
52
|
// 禁用状态
|
54
53
|
roundingFunction,
|
55
|
-
balanceDueAmount = "0"
|
54
|
+
balanceDueAmount = "0",
|
56
55
|
// 剩余支付金额
|
56
|
+
syncingLock = false
|
57
|
+
// 是否锁定
|
57
58
|
}) {
|
58
59
|
const [amount, setAmount] = (0, import_react.useState)(customAmount || "");
|
59
60
|
const [roundingAmount, setRoundingAmount] = (0, import_react.useState)(0);
|
60
|
-
const [amountList, setAmountList] = (0, import_react.useState)(amountButtons.length ? amountButtons : new Array(6).fill(0));
|
61
|
-
(0, import_react.useEffect)(() => {
|
62
|
-
setAmountList(amountButtons.length ? amountButtons : new Array(6).fill(0));
|
63
|
-
}, [amountButtons]);
|
64
61
|
const context = (0, import_useEngineContext.default)();
|
65
62
|
const Toast = (0, import_useToast.default)();
|
66
63
|
const getText = (key, fallback) => {
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
68
|
-
const currentLang = ((_e = (_d = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 :
|
69
|
-
const checkoutText = (
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
65
|
+
const currentLang = ((_f = (_e = (_d = (_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getApp) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.locales) == null ? void 0 : _e.getLocale) == null ? void 0 : _f.call(_e)) || ((_h = (_g = context.appHelper.utils) == null ? void 0 : _g.storage) == null ? void 0 : _h.get("umi_locale")) || "en";
|
66
|
+
const checkoutText = (_i = import_locales.default[currentLang]) == null ? void 0 : _i[key];
|
70
67
|
if (checkoutText) {
|
71
68
|
return checkoutText;
|
72
69
|
}
|
@@ -83,11 +80,16 @@ function CashPaymentModule({
|
|
83
80
|
setAmount(amountStr);
|
84
81
|
setRoundingAmount(0);
|
85
82
|
};
|
86
|
-
const
|
83
|
+
const handleCashPayInternal = () => {
|
87
84
|
if (isAmountButtonsDisabled) return;
|
88
85
|
if (onPaymentComplete) {
|
89
86
|
if (Number(amount) === 0 && Math.abs(roundingAmount) === 0) {
|
90
|
-
Toast.fail(
|
87
|
+
Toast.fail(
|
88
|
+
getText(
|
89
|
+
"cash-payment-amount-cannot-be-zero",
|
90
|
+
"The amount cannot be 0"
|
91
|
+
)
|
92
|
+
);
|
91
93
|
return;
|
92
94
|
}
|
93
95
|
const finalAmount = typeof amount === "number" ? amount : Number(amount) || 0;
|
@@ -100,17 +102,21 @@ function CashPaymentModule({
|
|
100
102
|
});
|
101
103
|
}
|
102
104
|
};
|
105
|
+
const { run: handleCashPay } = (0, import_ahooks.useDebounceFn)(handleCashPayInternal, {
|
106
|
+
wait: 1e3
|
107
|
+
});
|
103
108
|
const handleKeyboardConfirm = async (value) => {
|
104
109
|
if (isInputDisabled) {
|
105
110
|
setAmount("0.00");
|
106
111
|
setRoundingAmount(0);
|
107
112
|
return;
|
108
113
|
}
|
109
|
-
;
|
110
114
|
const finalValue = String(value);
|
111
115
|
console.log("键盘确认:", finalValue);
|
112
116
|
if (Number(finalValue) === 0) {
|
113
|
-
Toast.fail(
|
117
|
+
Toast.fail(
|
118
|
+
getText("cash-payment-amount-cannot-be-zero", "The amount cannot be 0")
|
119
|
+
);
|
114
120
|
return;
|
115
121
|
}
|
116
122
|
if (finalValue === "" || finalValue === null || finalValue === void 0) {
|
@@ -127,9 +133,21 @@ function CashPaymentModule({
|
|
127
133
|
const { roundedAmount = numValue, roundingDifference = 0 } = result || {};
|
128
134
|
finalAmount = roundedAmount;
|
129
135
|
roundingDiff = roundingDifference;
|
130
|
-
console.log(
|
136
|
+
console.log(
|
137
|
+
"应用抹零:",
|
138
|
+
numValue,
|
139
|
+
"->",
|
140
|
+
roundedAmount,
|
141
|
+
"差额:",
|
142
|
+
roundingDifference
|
143
|
+
);
|
131
144
|
} else {
|
132
|
-
console.log(
|
145
|
+
console.log(
|
146
|
+
"不应用抹零,用户输入金额:",
|
147
|
+
numValue,
|
148
|
+
"剩余支付金额:",
|
149
|
+
balanceDue
|
150
|
+
);
|
133
151
|
}
|
134
152
|
setRoundingAmount(roundingDiff);
|
135
153
|
if (isNaN(numValue)) {
|
@@ -140,126 +158,77 @@ function CashPaymentModule({
|
|
140
158
|
}
|
141
159
|
}
|
142
160
|
};
|
143
|
-
const
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
const
|
149
|
-
|
150
|
-
|
161
|
+
const handleReset = async () => {
|
162
|
+
if (isAmountButtonsDisabled) return;
|
163
|
+
const resetAmount = balanceDueAmount || "0";
|
164
|
+
const cleanValue = resetAmount.replace(/[$\s]/g, "");
|
165
|
+
const numValue = parseFloat(cleanValue);
|
166
|
+
const balanceDue = parseFloat(balanceDueAmount);
|
167
|
+
const shouldApplyRounding = Math.abs(numValue - balanceDue) < 0.01;
|
168
|
+
let finalAmount = numValue;
|
169
|
+
let roundingDiff = 0;
|
170
|
+
if (shouldApplyRounding && roundingFunction) {
|
171
|
+
const result = await roundingFunction(finalAmount);
|
172
|
+
const { roundedAmount = numValue, roundingDifference = 0 } = result || {};
|
173
|
+
finalAmount = roundedAmount;
|
174
|
+
roundingDiff = roundingDifference;
|
175
|
+
console.log(
|
176
|
+
"应用抹零:",
|
177
|
+
numValue,
|
178
|
+
"->",
|
179
|
+
roundedAmount,
|
180
|
+
"差额:",
|
181
|
+
roundingDifference
|
182
|
+
);
|
183
|
+
} else {
|
184
|
+
console.log(
|
185
|
+
"不应用抹零,用户输入金额:",
|
186
|
+
numValue,
|
187
|
+
"剩余支付金额:",
|
188
|
+
balanceDue
|
189
|
+
);
|
190
|
+
}
|
191
|
+
setAmount(finalAmount.toString());
|
192
|
+
setRoundingAmount(roundingDiff);
|
151
193
|
};
|
152
194
|
return /* @__PURE__ */ import_react.default.createElement(
|
153
|
-
|
195
|
+
import_priceKeyboard.CashKeyboard,
|
154
196
|
{
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
className: (0, import_classnames.default)("cash-pay-main-content", {
|
164
|
-
"cash-pay-main-content--disabled": disabled
|
165
|
-
})
|
197
|
+
variant: "intact",
|
198
|
+
originalValue: customAmount,
|
199
|
+
value: amount,
|
200
|
+
disabled,
|
201
|
+
hiddenChangeDue: roundingAmount > 0,
|
202
|
+
onChange: (value) => {
|
203
|
+
setAmount(value);
|
204
|
+
setRoundingAmount(0);
|
166
205
|
},
|
167
|
-
|
168
|
-
|
169
|
-
{
|
170
|
-
|
171
|
-
onConfirm: handleKeyboardConfirm,
|
172
|
-
onCancel: handleKeyboardCancel,
|
173
|
-
showCurrencySymbol: true,
|
174
|
-
useThousandsSeparator: true,
|
175
|
-
selectType: "dark",
|
176
|
-
overlayClassName: "cash-payment-keyboard-popover",
|
177
|
-
disabled: isInputDisabled
|
178
|
-
},
|
179
|
-
/* @__PURE__ */ import_react.default.createElement(
|
180
|
-
"div",
|
181
|
-
{
|
182
|
-
className: (0, import_classnames.default)("cash-pay-amount-input-area", {
|
183
|
-
"cash-pay-amount-input-area--disabled": isInputDisabled
|
184
|
-
})
|
185
|
-
},
|
186
|
-
/* @__PURE__ */ import_react.default.createElement(
|
187
|
-
import_icon.Edit05,
|
188
|
-
{
|
189
|
-
className: (0, import_classnames.default)("cash-pay-amount-edit-icon", {
|
190
|
-
"cash-pay-amount-edit-icon--disabled": isInputDisabled
|
191
|
-
})
|
192
|
-
}
|
193
|
-
),
|
194
|
-
/* @__PURE__ */ import_react.default.createElement(
|
195
|
-
"div",
|
196
|
-
{
|
197
|
-
className: (0, import_classnames.default)("cash-pay-amount-input-wrapper", {
|
198
|
-
"cash-pay-amount-input-wrapper--disabled": isInputDisabled
|
199
|
-
})
|
200
|
-
},
|
201
|
-
/* @__PURE__ */ import_react.default.createElement(
|
202
|
-
"span",
|
203
|
-
{
|
204
|
-
className: (0, import_classnames.default)("cash-pay-currency-symbol", {
|
205
|
-
"cash-pay-currency-symbol--disabled": isInputDisabled
|
206
|
-
})
|
207
|
-
},
|
208
|
-
amountSymbol
|
209
|
-
),
|
210
|
-
/* @__PURE__ */ import_react.default.createElement(
|
211
|
-
"div",
|
212
|
-
{
|
213
|
-
className: (0, import_classnames.default)("cash-pay-amount-display", {
|
214
|
-
"cash-pay-amount-display--disabled": isInputDisabled
|
215
|
-
})
|
216
|
-
},
|
217
|
-
amount || "0.00"
|
218
|
-
)
|
219
|
-
)
|
220
|
-
)
|
221
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
222
|
-
"div",
|
223
|
-
{
|
224
|
-
className: (0, import_classnames.default)("cash-pay-button", {
|
225
|
-
"cash-pay-button--disabled": isAmountButtonsDisabled
|
226
|
-
}),
|
227
|
-
...isAmountButtonsDisabled ? {} : { onClick: handleCashPay },
|
228
|
-
style: { cursor: isAmountButtonsDisabled ? "not-allowed" : "pointer" }
|
229
|
-
},
|
230
|
-
/* @__PURE__ */ import_react.default.createElement(
|
231
|
-
"div",
|
232
|
-
{
|
233
|
-
className: (0, import_classnames.default)("cash-pay-button-text", {
|
234
|
-
"cash-pay-button-text--disabled": isAmountButtonsDisabled
|
235
|
-
})
|
236
|
-
},
|
237
|
-
getText("cash.payment") || "Cash Pay"
|
238
|
-
)
|
239
|
-
)),
|
240
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("cash-pay-amount-button-grid", {
|
241
|
-
"cash-pay-amount-button-grid--disabled": isAmountButtonsDisabled
|
242
|
-
}) }, amountList.slice(0, 6).map((amount2, index) => /* @__PURE__ */ import_react.default.createElement(
|
243
|
-
"div",
|
244
|
-
{
|
245
|
-
key: index,
|
246
|
-
className: (0, import_classnames.default)("cash-pay-amount-button", {
|
247
|
-
"cash-pay-amount-button--disabled": isAmountButtonsDisabled
|
248
|
-
}),
|
249
|
-
...isAmountButtonsDisabled ? {} : { onClick: () => handleAmountClick(amount2) },
|
250
|
-
style: { cursor: isAmountButtonsDisabled ? "not-allowed" : "pointer" }
|
206
|
+
titleArea: {
|
207
|
+
visible: true,
|
208
|
+
title: {
|
209
|
+
text: getText("cash-payment-title", "Cash Payment")
|
251
210
|
},
|
252
|
-
|
253
|
-
|
254
|
-
{
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
211
|
+
subtitle: {
|
212
|
+
visible: Math.abs(roundingAmount) > 0,
|
213
|
+
text: `${getText(
|
214
|
+
"cash-payment-rounding",
|
215
|
+
"Rounding"
|
216
|
+
)}: ${(0, import_utils.formatAmount)(roundingAmount, 2, amountSymbol)}`
|
217
|
+
}
|
218
|
+
},
|
219
|
+
style: {
|
220
|
+
width: "100%",
|
221
|
+
backgroundColor: "transparent"
|
222
|
+
},
|
223
|
+
presets: amountButtons.slice(0, 5).map((buttonAmount) => {
|
224
|
+
return {
|
225
|
+
label: (0, import_utils.formatAmount)(buttonAmount, 2, amountSymbol),
|
226
|
+
value: buttonAmount
|
227
|
+
};
|
228
|
+
}),
|
229
|
+
onReset: handleReset,
|
230
|
+
onEnter: syncingLock ? void 0 : handleCashPay
|
231
|
+
}
|
263
232
|
);
|
264
233
|
}
|
265
234
|
var CashPaymentModule_default = CashPaymentModule;
|