@pisell/private-materials 6.1.7 → 6.1.8
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 +9 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/es/components/Sales/Cart/index.js +14 -4
- package/es/components/Sales/Cart/utils.d.ts +40 -0
- package/es/components/Sales/Cart/utils.js +187 -0
- package/es/components/Sales/Checkout/index.d.ts +4 -0
- package/es/components/Sales/Checkout/index.js +52 -8
- package/es/components/Sales/Checkout/serve.d.ts +13 -0
- package/es/components/Sales/Checkout/serve.js +16 -2
- package/es/components/Sales/Checkout/utils.d.ts +7 -1
- package/es/components/Sales/Checkout/utils.js +17 -5
- package/es/components/Sales/Customer/index.d.ts +1 -0
- package/es/components/Sales/Customer/index.js +1 -0
- package/es/components/Sales/Event/Detail.d.ts +1 -0
- package/es/components/Sales/Event/Detail.js +45 -11
- package/es/components/Sales/Event/serve.d.ts +10 -0
- package/es/components/Sales/Event/serve.js +25 -0
- package/es/components/Sales/Summary/index.d.ts +10 -0
- package/es/components/Sales/Summary/index.js +17 -2
- package/es/components/Sales/Summary/serve.d.ts +1 -0
- package/es/components/Sales/Summary/serve.js +6 -0
- package/es/components/Sales/Summary/utils.d.ts +16 -1
- package/es/components/Sales/Summary/utils.js +43 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +8 -13
- package/es/components/appointmentBooking/components/Content/index.js +120 -20
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
- package/es/components/appointmentBooking/components/Form/index.js +1 -1
- package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Form/utils.js +17 -15
- package/es/components/appointmentBooking/components/Header/index.js +2 -1
- package/es/components/appointmentBooking/components/Resource/index.js +1 -0
- package/es/components/appointmentBooking/components/Services/index.js +7 -2
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
- package/es/components/appointmentBooking/components/Voucher/index.js +10 -10
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
- package/es/components/appointmentBooking/deposit/index.js +4 -2
- package/es/components/appointmentBooking/hooks.js +28 -30
- package/es/components/booking/addons/index.js +4 -1
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/actionButtons/index.d.ts +29 -0
- package/es/components/booking/components/actionButtons/index.js +395 -0
- package/es/components/booking/components/actionButtons/index.less +148 -0
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/clearCartModal/index.d.ts +10 -0
- package/es/components/booking/components/clearCartModal/index.js +50 -0
- package/es/components/booking/components/clearCartModal/index.less +109 -0
- package/es/components/booking/components/customiseItemModal/index.d.ts +28 -0
- package/es/components/booking/components/customiseItemModal/index.js +287 -0
- package/es/components/booking/components/customiseItemModal/index.less +593 -0
- package/es/components/booking/components/drawer/index.d.ts +19 -0
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +15 -3
- package/es/components/booking/components/footer/index.js +137 -62
- package/es/components/booking/components/footer/utils.js +52 -24
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/reloadResourceModal/index.js +73 -0
- package/es/components/booking/components/reloadResourceModal/index.less +6 -0
- package/es/components/booking/components/tabPane/index.js +86 -5
- package/es/components/booking/components/tabPane/index.less +75 -1
- package/es/components/booking/components/voucher/index.js +21 -10
- package/es/components/booking/components/voucher/index.less +1 -1
- package/es/components/booking/dashboard/index.d.ts +1 -1
- package/es/components/booking/dashboard/index.js +10 -3
- package/es/components/booking/editBookingModal/index.js +58 -29
- package/es/components/booking/editBookingModal/serve.d.ts +1 -0
- package/es/components/booking/editBookingModal/serve.js +19 -11
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -1
- package/es/components/booking/hooks/useIsBooking4Shop.js +4 -3
- package/es/components/booking/hooks/useQuotation.js +17 -7
- package/es/components/booking/info/addServiceVariant/index.js +2 -2
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +15 -14
- package/es/components/booking/info/index.js +3 -4
- package/es/components/booking/info/index.less +18 -2
- package/es/components/booking/info/main.js +14 -15
- package/es/components/booking/info/service/Lists.js +5 -2
- package/es/components/booking/info/service/editService/index.js +1 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.js +2 -2
- package/es/components/booking/info/service/serviceManager/index.js +4 -4
- package/es/components/booking/info/service2/utils.d.ts +4 -0
- package/es/components/booking/info/service2/utils.js +12 -2
- package/es/components/booking/info/utils.d.ts +1 -1
- package/es/components/booking/info/utils.js +5 -3
- package/es/components/booking/info2/cartClientCard/index.d.ts +6 -0
- package/es/components/booking/info2/cartClientCard/index.js +343 -0
- package/es/components/booking/info2/cartClientCard/index.less +6 -0
- package/es/components/booking/info2/cartClientCard/locales.d.ts +21 -0
- package/es/components/booking/info2/cartClientCard/locales.js +26 -0
- package/es/components/booking/info2/cartClientCard/types.d.ts +13 -0
- package/es/components/booking/info2/cartClientCard/types.js +1 -0
- package/es/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/es/components/booking/info2/cartClientCard/utils.js +7 -0
- package/es/components/booking/info2/index.js +104 -32
- package/es/components/booking/info2/service/addService/index.js +21 -8
- package/es/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/es/components/booking/info2/service/addService/utils.js +38 -9
- package/es/components/booking/info2/service/addTimeModal/index.js +33 -9
- package/es/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/es/components/booking/info2/service/editNormalService/index.js +67 -0
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/es/components/booking/info2/service/editService/index.js +6 -7
- package/es/components/booking/info2/service/index.js +12 -6
- package/es/components/booking/info2/service/serviceItem/index.js +2 -2
- package/es/components/booking/info2/utils.js +13 -16
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +36 -7
- package/es/components/booking/locales.d.ts +84 -0
- package/es/components/booking/locales.js +108 -3
- package/es/components/booking/materiels/duration/index.d.ts +13 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.d.ts +1 -1
- package/es/components/booking/notes/addNote/index.js +52 -32
- package/es/components/booking/notes/addNote/index.less +53 -0
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/hooks.js +3 -1
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/const.js +82 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/index.js +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/index.js +197 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/linkly/service.js +81 -0
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +40 -19
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/es/components/eventBooking/components/bookingDetailModal/index.js +6 -3
- package/es/components/eventBooking/index.js +14 -0
- package/es/components/eventBooking/index.less +1 -1
- package/es/components/eventBooking/locales.d.ts +24 -0
- package/es/components/eventBooking/locales.js +27 -3
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +18 -3
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +7 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +8 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +44 -18
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +18 -3
- package/es/components/pay/toC/PaymentMethods/index.js +70 -21
- package/es/components/pay/toC/index.js +46 -14
- package/es/components/pay/toC/locales.d.ts +3 -0
- package/es/components/pay/toC/locales.js +3 -0
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.js +103 -39
- package/es/components/productSelect/components/TabProduct/tabs/index.less +1 -0
- package/es/components/productSelect/index.d.ts +2 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +21 -4
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/subTotal/index.less +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -212
- package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +8 -0
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +7 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +12 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.d.ts +9 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +14 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/es/components/ticketBooking/components/floatButtons/index.d.ts +11 -0
- package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
- package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/es/components/ticketBooking/components/menuBar/index.js +50 -1
- package/es/components/ticketBooking/components/menuBar/index.less +8 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +195 -26
- package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +20 -16
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +1 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +3 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +12 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +2 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
- package/es/components/ticketBooking/index.js +22 -3
- package/es/components/ticketBooking/locales.d.ts +6 -0
- package/es/components/ticketBooking/locales.js +9 -3
- package/es/components/ticketBooking/serve.js +11 -11
- package/es/components/ticketBooking/utils/index.d.ts +39 -2
- package/es/components/ticketBooking/utils/index.js +104 -11
- package/es/components/walletList/index.js +4 -4
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useToast.d.ts +2 -0
- package/es/hooks/useToast.js +9 -0
- package/es/hooks/useTranslationOriginal.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/index.d.ts +7 -0
- package/es/plus/clientCard/index.js +452 -0
- package/es/plus/clientCard/index.less +539 -0
- package/es/plus/clientCard/line/index.d.ts +9 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.d.ts +18 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.d.ts +126 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.d.ts +8 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +2 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +2 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +2 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.d.ts +18 -0
- package/es/plus/clinetSearch/Add/index.js +212 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.d.ts +18 -0
- package/es/plus/clinetSearch/index.js +214 -0
- package/es/plus/clinetSearch/index.less +91 -0
- package/es/plus/clinetSearch/locales.d.ts +102 -0
- package/es/plus/clinetSearch/locales.js +101 -0
- package/es/plus/clinetSearch/serve.d.ts +1 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.d.ts +49 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/noteModal/AddTempModal.d.ts +7 -0
- package/es/plus/noteModal/AddTempModal.js +64 -0
- package/es/plus/noteModal/index.d.ts +4 -0
- package/es/plus/noteModal/index.js +199 -0
- package/es/plus/noteModal/index.less +168 -0
- package/es/plus/noteModal/locales.d.ts +33 -0
- package/es/plus/noteModal/locales.js +32 -0
- package/es/plus/noteModal/types.d.ts +17 -0
- package/es/plus/noteModal/types.js +1 -0
- package/es/pro/comprehensiveSearch/camera.svg +4 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.d.ts +9 -0
- package/es/pro/comprehensiveSearch/index.js +342 -0
- package/es/pro/comprehensiveSearch/index.less +323 -0
- package/es/pro/comprehensiveSearch/locales.d.ts +18 -0
- package/es/pro/comprehensiveSearch/locales.js +17 -0
- package/es/pro/comprehensiveSearch/types.d.ts +31 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/numberKeyboard/index.d.ts +28 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.d.ts +12 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.d.ts +3 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.d.ts +26 -0
- package/es/pro/pisellNumberSelector/index.js +231 -0
- package/es/pro/pisellNumberSelector/index.less +193 -0
- package/es/pro/pisellPhoneKeyboard/index.d.ts +12 -0
- package/es/pro/pisellPhoneKeyboard/index.js +211 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +5 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +157 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +9 -0
- package/es/pro/pisellPriceKeyboardModal/index.d.ts +2 -0
- package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
- package/es/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
- package/es/pro/pisellPriceRadio/index.d.ts +26 -0
- package/es/pro/pisellPriceRadio/index.js +113 -0
- package/es/pro/pisellPriceRadio/index.less +158 -0
- package/es/pro/skuDetailModal/index.d.ts +5 -0
- package/es/pro/skuDetailModal/index.js +352 -0
- package/es/pro/skuDetailModal/index.less +236 -0
- package/es/pro/skuDetailModal/locales.d.ts +48 -0
- package/es/pro/skuDetailModal/locales.js +47 -0
- package/es/pro/skuDetailModal/types.d.ts +347 -0
- package/es/pro/skuDetailModal/types.js +1 -0
- package/lib/components/Sales/Cart/index.js +10 -4
- package/lib/components/Sales/Cart/utils.d.ts +40 -0
- package/lib/components/Sales/Cart/utils.js +129 -0
- package/lib/components/Sales/Checkout/index.d.ts +4 -0
- package/lib/components/Sales/Checkout/index.js +39 -7
- package/lib/components/Sales/Checkout/serve.d.ts +13 -0
- package/lib/components/Sales/Checkout/serve.js +7 -2
- package/lib/components/Sales/Checkout/utils.d.ts +7 -1
- package/lib/components/Sales/Checkout/utils.js +7 -2
- package/lib/components/Sales/Customer/index.d.ts +1 -0
- package/lib/components/Sales/Customer/index.js +1 -0
- package/lib/components/Sales/Event/Detail.d.ts +1 -0
- package/lib/components/Sales/Event/Detail.js +37 -12
- package/lib/components/Sales/Event/serve.d.ts +10 -0
- package/lib/components/Sales/Event/serve.js +7 -0
- package/lib/components/Sales/Summary/index.d.ts +10 -0
- package/lib/components/Sales/Summary/index.js +7 -1
- package/lib/components/Sales/Summary/serve.d.ts +1 -0
- package/lib/components/Sales/Summary/serve.js +32 -0
- package/lib/components/Sales/Summary/utils.d.ts +16 -1
- package/lib/components/Sales/Summary/utils.js +30 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +0 -10
- package/lib/components/appointmentBooking/components/Content/index.js +55 -8
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
- package/lib/components/appointmentBooking/components/Form/index.js +6 -1
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
- package/lib/components/appointmentBooking/components/Header/index.js +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +1 -0
- package/lib/components/appointmentBooking/components/Services/index.js +6 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
- package/lib/components/appointmentBooking/components/Voucher/index.js +0 -11
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
- package/lib/components/appointmentBooking/deposit/index.js +4 -2
- package/lib/components/appointmentBooking/hooks.js +5 -16
- package/lib/components/booking/addons/index.js +4 -1
- package/lib/components/booking/components/actionButtons/index.d.ts +29 -0
- package/lib/components/booking/components/actionButtons/index.js +325 -0
- package/lib/components/booking/components/actionButtons/index.less +148 -0
- package/lib/components/booking/components/clearCartModal/index.d.ts +10 -0
- package/lib/components/booking/components/clearCartModal/index.js +80 -0
- package/lib/components/booking/components/clearCartModal/index.less +109 -0
- package/lib/components/booking/components/customiseItemModal/index.d.ts +28 -0
- package/lib/components/booking/components/customiseItemModal/index.js +273 -0
- package/lib/components/booking/components/customiseItemModal/index.less +593 -0
- package/lib/components/booking/components/drawer/index.d.ts +19 -0
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +5 -3
- package/lib/components/booking/components/footer/index.js +115 -30
- package/lib/components/booking/components/footer/utils.js +38 -13
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/reloadResourceModal/index.js +74 -0
- package/lib/components/booking/components/reloadResourceModal/index.less +6 -0
- package/lib/components/booking/components/tabPane/index.js +78 -4
- package/lib/components/booking/components/tabPane/index.less +75 -1
- package/lib/components/booking/components/voucher/index.js +18 -9
- package/lib/components/booking/components/voucher/index.less +1 -1
- package/lib/components/booking/dashboard/index.d.ts +1 -1
- package/lib/components/booking/dashboard/index.js +7 -2
- package/lib/components/booking/editBookingModal/index.js +56 -21
- package/lib/components/booking/editBookingModal/serve.d.ts +1 -0
- package/lib/components/booking/editBookingModal/serve.js +12 -6
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -1
- package/lib/components/booking/hooks/useIsBooking4Shop.js +6 -4
- package/lib/components/booking/hooks/useQuotation.js +3 -1
- package/lib/components/booking/info/addServiceVariant/index.js +3 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +14 -8
- package/lib/components/booking/info/index.js +7 -4
- package/lib/components/booking/info/index.less +18 -2
- package/lib/components/booking/info/main.js +12 -5
- package/lib/components/booking/info/service/Lists.js +6 -2
- package/lib/components/booking/info/service/editService/index.js +1 -0
- package/lib/components/booking/info/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info/service/serviceManager/index.js +3 -3
- package/lib/components/booking/info/service2/utils.d.ts +4 -0
- package/lib/components/booking/info/service2/utils.js +14 -2
- package/lib/components/booking/info/utils.d.ts +1 -1
- package/lib/components/booking/info/utils.js +6 -3
- package/lib/components/booking/info2/cartClientCard/index.d.ts +6 -0
- package/lib/components/booking/info2/cartClientCard/index.js +298 -0
- package/lib/components/booking/info2/cartClientCard/index.less +6 -0
- package/lib/components/booking/info2/cartClientCard/locales.d.ts +21 -0
- package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
- package/lib/components/booking/info2/cartClientCard/types.d.ts +13 -0
- package/lib/components/booking/info2/cartClientCard/types.js +17 -0
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
- package/lib/components/booking/info2/index.js +119 -34
- package/lib/components/booking/info2/service/addService/index.js +17 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/lib/components/booking/info2/service/addService/utils.js +31 -10
- package/lib/components/booking/info2/service/addTimeModal/index.js +28 -10
- package/lib/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/lib/components/booking/info2/service/editService/index.js +5 -10
- package/lib/components/booking/info2/service/index.js +6 -6
- package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info2/utils.js +0 -15
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +28 -6
- package/lib/components/booking/locales.d.ts +84 -0
- package/lib/components/booking/locales.js +102 -3
- package/lib/components/booking/materiels/duration/index.d.ts +13 -0
- package/lib/components/booking/model.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -1
- package/lib/components/booking/notes/addNote/index.js +41 -23
- package/lib/components/booking/notes/addNote/index.less +53 -0
- package/lib/components/eftposPay/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/hooks.js +11 -4
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/const.js +102 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/index.js +208 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/linkly/service.js +55 -0
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +13 -2
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -8
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +4 -3
- package/lib/components/eventBooking/index.js +11 -0
- package/lib/components/eventBooking/index.less +1 -1
- package/lib/components/eventBooking/locales.d.ts +24 -0
- package/lib/components/eventBooking/locales.js +27 -3
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +13 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +2 -2
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +8 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +66 -47
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +13 -1
- package/lib/components/pay/toC/PaymentMethods/index.js +30 -2
- package/lib/components/pay/toC/index.js +29 -9
- package/lib/components/pay/toC/locales.d.ts +3 -0
- package/lib/components/pay/toC/locales.js +3 -0
- package/lib/components/productSelect/components/TabProduct/index.js +74 -37
- package/lib/components/productSelect/components/TabProduct/tabs/index.less +1 -0
- package/lib/components/productSelect/index.d.ts +2 -0
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +26 -7
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/subTotal/index.less +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +53 -129
- package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +8 -0
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +7 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +12 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.d.ts +9 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +14 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/lib/components/ticketBooking/components/floatButtons/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
- package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +63 -1
- package/lib/components/ticketBooking/components/menuBar/index.less +8 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +227 -74
- package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +21 -8
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +1 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +3 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +12 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +2 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
- package/lib/components/ticketBooking/index.js +19 -3
- package/lib/components/ticketBooking/locales.d.ts +6 -0
- package/lib/components/ticketBooking/locales.js +9 -3
- package/lib/components/ticketBooking/serve.js +11 -11
- package/lib/components/ticketBooking/utils/index.d.ts +39 -2
- package/lib/components/ticketBooking/utils/index.js +71 -10
- package/lib/components/walletList/index.js +3 -3
- package/lib/hooks/useToast.d.ts +2 -0
- package/lib/hooks/useToast.js +42 -0
- package/lib/hooks/useTranslationOriginal.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/index.d.ts +7 -0
- package/lib/plus/clientCard/index.js +442 -0
- package/lib/plus/clientCard/index.less +539 -0
- package/lib/plus/clientCard/line/index.d.ts +9 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.d.ts +18 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.d.ts +126 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.d.ts +8 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
- package/lib/plus/clinetSearch/Add/index.js +243 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.d.ts +18 -0
- package/lib/plus/clinetSearch/index.js +205 -0
- package/lib/plus/clinetSearch/index.less +91 -0
- package/lib/plus/clinetSearch/locales.d.ts +102 -0
- package/lib/plus/clinetSearch/locales.js +125 -0
- package/lib/plus/clinetSearch/serve.d.ts +1 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.d.ts +49 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/noteModal/AddTempModal.d.ts +7 -0
- package/lib/plus/noteModal/AddTempModal.js +95 -0
- package/lib/plus/noteModal/index.d.ts +4 -0
- package/lib/plus/noteModal/index.js +199 -0
- package/lib/plus/noteModal/index.less +168 -0
- package/lib/plus/noteModal/locales.d.ts +33 -0
- package/lib/plus/noteModal/locales.js +56 -0
- package/lib/plus/noteModal/types.d.ts +17 -0
- package/lib/plus/noteModal/types.js +17 -0
- package/lib/pro/comprehensiveSearch/camera.svg +4 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.d.ts +9 -0
- package/lib/pro/comprehensiveSearch/index.js +259 -0
- package/lib/pro/comprehensiveSearch/index.less +323 -0
- package/lib/pro/comprehensiveSearch/locales.d.ts +18 -0
- package/lib/pro/comprehensiveSearch/locales.js +41 -0
- package/lib/pro/comprehensiveSearch/types.d.ts +31 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/numberKeyboard/index.d.ts +28 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.d.ts +12 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.d.ts +26 -0
- package/lib/pro/pisellNumberSelector/index.js +260 -0
- package/lib/pro/pisellNumberSelector/index.less +193 -0
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +12 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +5 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +157 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +9 -0
- package/lib/pro/pisellPriceKeyboardModal/index.d.ts +2 -0
- package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
- package/lib/pro/pisellPriceRadio/index.d.ts +26 -0
- package/lib/pro/pisellPriceRadio/index.js +130 -0
- package/lib/pro/pisellPriceRadio/index.less +158 -0
- package/lib/pro/skuDetailModal/index.d.ts +5 -0
- package/lib/pro/skuDetailModal/index.js +311 -0
- package/lib/pro/skuDetailModal/index.less +236 -0
- package/lib/pro/skuDetailModal/locales.d.ts +48 -0
- package/lib/pro/skuDetailModal/locales.js +71 -0
- package/lib/pro/skuDetailModal/types.d.ts +347 -0
- package/lib/pro/skuDetailModal/types.js +17 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +337 -0
- package/lowcode/comprehensive-search/meta.ts +261 -0
- package/package.json +26 -26
@@ -0,0 +1,347 @@
|
|
1
|
+
export declare type ChannelApplication = 'online-store' | 'pos' | 'wholesalebusiness' | 'kiosk';
|
2
|
+
export declare type ProductType = 'physical' | 'virtual';
|
3
|
+
export declare type WeightUnit = 'KILOGRAMS' | 'GRAMS' | 'POUNDS' | 'OUNCES';
|
4
|
+
export declare type DurationType = 'minutes' | 'hours' | 'days';
|
5
|
+
export declare type ResourceType = 'single' | 'multiple';
|
6
|
+
export declare type RelationType = 'form';
|
7
|
+
export declare type EventType = 'schedule_event';
|
8
|
+
export declare type MaxParticipantsType = 'custom-limit' | 'unlimited';
|
9
|
+
export interface TimeSlice {
|
10
|
+
label: string;
|
11
|
+
value: string;
|
12
|
+
}
|
13
|
+
export interface DurationSlice {
|
14
|
+
label: string;
|
15
|
+
value: number;
|
16
|
+
}
|
17
|
+
export interface MultiLanguageName {
|
18
|
+
en?: string;
|
19
|
+
'zh-CN'?: string;
|
20
|
+
'zh-HK'?: string;
|
21
|
+
original?: string;
|
22
|
+
auto?: string;
|
23
|
+
}
|
24
|
+
export interface MultiLanguageTitle {
|
25
|
+
label: {
|
26
|
+
type: 'i18n';
|
27
|
+
'en-US': string;
|
28
|
+
'zh-CN': string;
|
29
|
+
};
|
30
|
+
}
|
31
|
+
export interface SelectType {
|
32
|
+
type: 'single' | 'multiple';
|
33
|
+
min: number;
|
34
|
+
max: number;
|
35
|
+
}
|
36
|
+
export interface Duration {
|
37
|
+
type: DurationType;
|
38
|
+
value: number;
|
39
|
+
}
|
40
|
+
export interface CutOffTime {
|
41
|
+
unit: number;
|
42
|
+
unit_type: DurationType;
|
43
|
+
future_day: number;
|
44
|
+
type: 'advance';
|
45
|
+
ongoing: {
|
46
|
+
type: 'before_end';
|
47
|
+
unit: number;
|
48
|
+
};
|
49
|
+
}
|
50
|
+
export interface MachineCode {
|
51
|
+
make_over: number;
|
52
|
+
beforehand: number;
|
53
|
+
limit_count: number;
|
54
|
+
customer: number;
|
55
|
+
send_action: string;
|
56
|
+
hide_recharge: number;
|
57
|
+
distributor_automatic: number;
|
58
|
+
}
|
59
|
+
export interface Form {
|
60
|
+
id: number;
|
61
|
+
shop_id: number;
|
62
|
+
title: string;
|
63
|
+
navigation_display: number;
|
64
|
+
button: string;
|
65
|
+
describe: string;
|
66
|
+
status: 'published' | 'draft';
|
67
|
+
resource_sort: number;
|
68
|
+
code: string;
|
69
|
+
type: 'manual' | 'auto';
|
70
|
+
version: number;
|
71
|
+
setting: any;
|
72
|
+
created_at: string;
|
73
|
+
updated_at: string;
|
74
|
+
}
|
75
|
+
export interface PartyroomPackage {
|
76
|
+
type: 'product_all' | 'product_part';
|
77
|
+
}
|
78
|
+
export interface EventListItem {
|
79
|
+
id: number;
|
80
|
+
start_date?: string;
|
81
|
+
start_time?: string;
|
82
|
+
end_date?: string;
|
83
|
+
end_time?: string;
|
84
|
+
relation_id: number;
|
85
|
+
number?: number;
|
86
|
+
start_at?: string;
|
87
|
+
end_at?: string;
|
88
|
+
keys?: string;
|
89
|
+
pax: number;
|
90
|
+
type: EventType;
|
91
|
+
pax_list: Record<string, number>;
|
92
|
+
}
|
93
|
+
export interface TimeConfig {
|
94
|
+
keys: string;
|
95
|
+
schedule_id: number;
|
96
|
+
item_type: string;
|
97
|
+
item_id: number;
|
98
|
+
start_date: string;
|
99
|
+
end_date: string;
|
100
|
+
start_time: string;
|
101
|
+
end_time: string;
|
102
|
+
is_all: number;
|
103
|
+
relation_type: RelationType;
|
104
|
+
start_at: string;
|
105
|
+
end_at: string;
|
106
|
+
event_list: EventListItem[];
|
107
|
+
max_participants_type?: MaxParticipantsType;
|
108
|
+
max_participants_limit?: number;
|
109
|
+
is_blocked?: number;
|
110
|
+
blocked_times?: any[];
|
111
|
+
order_event_count?: number;
|
112
|
+
unique?: string;
|
113
|
+
_extend?: {
|
114
|
+
isMaxLimitRange: boolean;
|
115
|
+
isDateRange: boolean;
|
116
|
+
isCountRange: boolean;
|
117
|
+
isUsable: boolean;
|
118
|
+
};
|
119
|
+
}
|
120
|
+
export interface ResourceMetadata {
|
121
|
+
combined_resource: any;
|
122
|
+
}
|
123
|
+
export interface ResourceItem {
|
124
|
+
id: number;
|
125
|
+
main_field: string;
|
126
|
+
sort: number;
|
127
|
+
form_id: number;
|
128
|
+
times: TimeConfig[];
|
129
|
+
capacity: number;
|
130
|
+
combined_resource: any;
|
131
|
+
resource_form_id: string | number;
|
132
|
+
form_code: string;
|
133
|
+
resourceType: ResourceType;
|
134
|
+
children: any[];
|
135
|
+
metadata: ResourceMetadata;
|
136
|
+
form_tag?: any;
|
137
|
+
policy?: number;
|
138
|
+
partyroom_package?: PartyroomPackage;
|
139
|
+
status?: string;
|
140
|
+
description?: string;
|
141
|
+
media?: string;
|
142
|
+
subtitle?: string;
|
143
|
+
room_name?: string;
|
144
|
+
labelText?: string;
|
145
|
+
form_record_id?: number;
|
146
|
+
item_type?: string;
|
147
|
+
form_resource_sort?: number;
|
148
|
+
form_title?: string;
|
149
|
+
form?: Form;
|
150
|
+
_extend?: {
|
151
|
+
usableTime?: TimeConfig;
|
152
|
+
};
|
153
|
+
usable?: boolean;
|
154
|
+
label?: any;
|
155
|
+
}
|
156
|
+
export interface ResourceTypeInfo {
|
157
|
+
id: number;
|
158
|
+
title: string;
|
159
|
+
status: number;
|
160
|
+
code: string;
|
161
|
+
created_at: string;
|
162
|
+
updated_at: string | null;
|
163
|
+
type: ResourceType;
|
164
|
+
optional_resource: number[];
|
165
|
+
default_resource: any[];
|
166
|
+
select_type: SelectType;
|
167
|
+
resource_type_id: number;
|
168
|
+
renderList?: ResourceItem[];
|
169
|
+
form_id?: number;
|
170
|
+
renderListMaps?: Record<string, ResourceItem>;
|
171
|
+
}
|
172
|
+
export interface ProductResource {
|
173
|
+
resources: ResourceTypeInfo[];
|
174
|
+
}
|
175
|
+
export interface CapacityCustom {
|
176
|
+
name: MultiLanguageName;
|
177
|
+
min: number;
|
178
|
+
max: number;
|
179
|
+
id: string;
|
180
|
+
}
|
181
|
+
export interface CapacityPackage {
|
182
|
+
}
|
183
|
+
export interface Capacity {
|
184
|
+
type: 'product' | 'package';
|
185
|
+
custom: CapacityCustom[];
|
186
|
+
package: CapacityPackage[];
|
187
|
+
}
|
188
|
+
export interface ProductDisplaySetting {
|
189
|
+
kiosk: {
|
190
|
+
use_display_mode: number;
|
191
|
+
product_option_mode: any;
|
192
|
+
product_option_mode_paging: any;
|
193
|
+
product_bundle_mode: any;
|
194
|
+
product_bundle_mode_paging: any;
|
195
|
+
};
|
196
|
+
}
|
197
|
+
export interface ShelfProductData {
|
198
|
+
}
|
199
|
+
export interface Category {
|
200
|
+
id: number;
|
201
|
+
name: string;
|
202
|
+
icon: string;
|
203
|
+
slug: string;
|
204
|
+
sort: number;
|
205
|
+
}
|
206
|
+
export interface Collection {
|
207
|
+
id: number;
|
208
|
+
title: string;
|
209
|
+
cover: string;
|
210
|
+
}
|
211
|
+
export interface ExtendData {
|
212
|
+
duration: number;
|
213
|
+
start_time: string;
|
214
|
+
start_date: string;
|
215
|
+
quantity: number;
|
216
|
+
price: string;
|
217
|
+
product_name: string;
|
218
|
+
other: {
|
219
|
+
bundle: any[];
|
220
|
+
key: number;
|
221
|
+
option: any[];
|
222
|
+
product_id: number;
|
223
|
+
product_variant_id: number;
|
224
|
+
quantity: number;
|
225
|
+
rowKey: number;
|
226
|
+
session: any;
|
227
|
+
unique: string;
|
228
|
+
};
|
229
|
+
total: number;
|
230
|
+
origin_total: number;
|
231
|
+
startDate: string;
|
232
|
+
endDate: string;
|
233
|
+
capacity: Array<{
|
234
|
+
id: number;
|
235
|
+
value: number;
|
236
|
+
name: string;
|
237
|
+
}>;
|
238
|
+
resource: Record<string, Array<{
|
239
|
+
children: any[];
|
240
|
+
form_id: number;
|
241
|
+
relation_id: number;
|
242
|
+
like_status: string;
|
243
|
+
errors: any[];
|
244
|
+
metadata: {
|
245
|
+
form_name: string;
|
246
|
+
resource_name: string;
|
247
|
+
};
|
248
|
+
}>>;
|
249
|
+
note?: string;
|
250
|
+
}
|
251
|
+
export interface TimeObj {
|
252
|
+
timeSlices: TimeSlice[];
|
253
|
+
durationSlicesBasedOnTime: DurationSlice[];
|
254
|
+
}
|
255
|
+
export interface DataObj {
|
256
|
+
timeObj: TimeObj;
|
257
|
+
capacitys: Capacity;
|
258
|
+
resourcesOrigin: ResourceTypeInfo[];
|
259
|
+
resources: ResourceTypeInfo[];
|
260
|
+
resourceMaps: Record<string, ResourceTypeInfo>;
|
261
|
+
}
|
262
|
+
export interface DiscountItem {
|
263
|
+
amount: number;
|
264
|
+
type: 'discount_card' | 'discount_code' | 'discount_package';
|
265
|
+
discount: {
|
266
|
+
resource_id: number;
|
267
|
+
title: MultiLanguageTitle;
|
268
|
+
original_amount: number;
|
269
|
+
product_id: number;
|
270
|
+
percent: string;
|
271
|
+
};
|
272
|
+
num: number;
|
273
|
+
}
|
274
|
+
export interface ProductData {
|
275
|
+
id: number;
|
276
|
+
extension_id: number;
|
277
|
+
extension_type: string;
|
278
|
+
shop_id: number;
|
279
|
+
title: string;
|
280
|
+
slug: string;
|
281
|
+
status: 'published' | 'draft' | 'archived';
|
282
|
+
stock_quantity: number;
|
283
|
+
sales_quantity: number;
|
284
|
+
sum_stock: number;
|
285
|
+
price: string;
|
286
|
+
original_price: string;
|
287
|
+
cost_price: string;
|
288
|
+
cover: string;
|
289
|
+
channel_application: ChannelApplication[];
|
290
|
+
is_track: number;
|
291
|
+
over_sold: number;
|
292
|
+
is_gst: number;
|
293
|
+
code: string;
|
294
|
+
barcode: string;
|
295
|
+
is_delivery: number;
|
296
|
+
weight_unit: WeightUnit;
|
297
|
+
weight_value: string;
|
298
|
+
type: ProductType;
|
299
|
+
unit: string;
|
300
|
+
sort: number;
|
301
|
+
subtitle: string;
|
302
|
+
minimum_markup_price: string;
|
303
|
+
is_bundle: number;
|
304
|
+
bundle_group_count: number;
|
305
|
+
option_group_count: number;
|
306
|
+
is_variant: number;
|
307
|
+
variant_count: number;
|
308
|
+
cut_off_time: CutOffTime;
|
309
|
+
policy: number;
|
310
|
+
machine_code: MachineCode;
|
311
|
+
duration: Duration;
|
312
|
+
product_resource: ProductResource;
|
313
|
+
capacity: Capacity;
|
314
|
+
product_display_setting: ProductDisplaySetting;
|
315
|
+
shelf_product_datas: ShelfProductData[];
|
316
|
+
step_value: number;
|
317
|
+
min_num_unit: number;
|
318
|
+
schedules: any[];
|
319
|
+
is_charge_tax: number;
|
320
|
+
base_price: string;
|
321
|
+
variant: any[];
|
322
|
+
category: Category[];
|
323
|
+
collection: Collection[];
|
324
|
+
product_id: number;
|
325
|
+
_id: string;
|
326
|
+
_key: number;
|
327
|
+
_extend: ExtendData;
|
328
|
+
new: number;
|
329
|
+
currentDefaultTime: string;
|
330
|
+
_data: DataObj;
|
331
|
+
autoClose: boolean;
|
332
|
+
_serviceKey: string;
|
333
|
+
discount_list: DiscountItem[];
|
334
|
+
}
|
335
|
+
export declare type SkuDetailModalData = ProductData;
|
336
|
+
export interface SkuDetailModalProps {
|
337
|
+
/** 确认回调 */
|
338
|
+
onConfirm?: (data: ProductData) => void;
|
339
|
+
/** 删除回调 */
|
340
|
+
onRemove?: (productData: ProductData) => void;
|
341
|
+
/** 关闭回调 */
|
342
|
+
onClose?: () => void;
|
343
|
+
}
|
344
|
+
export interface SkuDetailModalRef {
|
345
|
+
/** 打开弹窗 */
|
346
|
+
open: (data: ProductData) => void;
|
347
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -52,7 +52,7 @@ var CartContext = (0, import_react.createContext)(
|
|
52
52
|
void 0
|
53
53
|
);
|
54
54
|
var CartProvider = ({ children }) => {
|
55
|
-
const { appUtils, getUserInfo } = (0, import_Customer.useCustomer)();
|
55
|
+
const { appContext, appUtils, getUserInfo } = (0, import_Customer.useCustomer)();
|
56
56
|
const { data, setData, hooks, getCurrentData } = (0, import_SalesModel.useSales)();
|
57
57
|
const [openCart, setOpen] = (0, import_react.useState)(false);
|
58
58
|
const checkRef = (0, import_react.useRef)(null);
|
@@ -203,12 +203,16 @@ var CartProvider = ({ children }) => {
|
|
203
203
|
});
|
204
204
|
const checkBeforeAddToCart = () => {
|
205
205
|
return new Promise((resolve) => {
|
206
|
+
var _a, _b;
|
206
207
|
const _cartData = getCurrentData().cartData;
|
207
208
|
const newCartItem = createCartItemData() || {};
|
208
209
|
const params = (0, import_utils2.formatValues)({
|
209
|
-
|
210
|
-
|
211
|
-
|
210
|
+
state: {
|
211
|
+
cartData: {
|
212
|
+
cartItems: [..._cartData.cartItems || [], newCartItem]
|
213
|
+
}
|
214
|
+
},
|
215
|
+
platform: (_b = (_a = appContext == null ? void 0 : appContext.appHelper) == null ? void 0 : _a.constants) == null ? void 0 : _b.platform
|
212
216
|
});
|
213
217
|
checkRef.current = {
|
214
218
|
callback: (res) => {
|
@@ -291,6 +295,7 @@ var CartProvider = ({ children }) => {
|
|
291
295
|
},
|
292
296
|
_productDetail: eventDetail.productDetail
|
293
297
|
};
|
298
|
+
newCartItem.deposit = (0, import_utils3.handleProductDeposit)(newCartItem, eventDetail, num);
|
294
299
|
const originData = (0, import_utils3.handleCartItemOrigin)(newCartItem, eventDetail);
|
295
300
|
newCartItem._originData = originData;
|
296
301
|
if (holderItem == null ? void 0 : holderItem._originData) {
|
@@ -428,6 +433,7 @@ var CartProvider = ({ children }) => {
|
|
428
433
|
const productId = (_b = (_a = item._originData) == null ? void 0 : _a.product) == null ? void 0 : _b.product_id;
|
429
434
|
const relationId = (_c = item._originData) == null ? void 0 : _c.relation_id;
|
430
435
|
const eventUniqueIdentifier = (_d = item._originData) == null ? void 0 : _d.event_unique_identifier;
|
436
|
+
debugger;
|
431
437
|
return list.find((res) => {
|
432
438
|
var _a2;
|
433
439
|
const checkType = ["available_capacity"];
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import Decimal from 'decimal.js';
|
1
2
|
import { ICalculatePriceParams } from './types';
|
2
3
|
export declare const handleProductInfo: (eventDetail: any, num: number) => {
|
3
4
|
totalPrice: number;
|
@@ -21,3 +22,42 @@ export declare const getOriginTotalPrice: (params: ICalculatePriceParams) => num
|
|
21
22
|
export declare const handleCartItemOrigin: (cartItem: any, eventDetail: any) => any;
|
22
23
|
export declare const formatBundleToOrigin: (bundle: any) => any;
|
23
24
|
export declare const formatOptionsToOrigin: (options: any) => any;
|
25
|
+
export declare const handleProductDeposit: (cartItem: any, eventDetail: any, num: number) => {
|
26
|
+
total: number;
|
27
|
+
protocols: any;
|
28
|
+
} | null;
|
29
|
+
/**
|
30
|
+
* 获取商品定金
|
31
|
+
* @description 定金基于商品售价来算,最终乘商品数量
|
32
|
+
* 1、如果套餐主商品有定金规则,则定金为:(套餐商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
|
33
|
+
* 2、如果套餐主商品没有定金规则,子商品有定金规则,则定金为:(套餐子商品售价 * 套餐子商品定金百分比 + 套餐子商品定金固定金额)* 商品数量,最终将所有子商品定金相加
|
34
|
+
* 3、普通商品/单规格商品/组合规则商品,定金规则:(商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
|
35
|
+
* @param params 参数
|
36
|
+
* @returns 商品定金
|
37
|
+
*/
|
38
|
+
export declare const getProductDeposit: (params: {
|
39
|
+
cartItem: any;
|
40
|
+
product: any;
|
41
|
+
bundle?: any;
|
42
|
+
options?: any;
|
43
|
+
num?: number;
|
44
|
+
}) => {
|
45
|
+
total: number;
|
46
|
+
protocols: any;
|
47
|
+
} | null;
|
48
|
+
/**
|
49
|
+
* 计算商品定金
|
50
|
+
* @param params 参数
|
51
|
+
* @returns 商品定金
|
52
|
+
*/
|
53
|
+
export declare const calculateProductDeposit: (params: {
|
54
|
+
depositData: {
|
55
|
+
deposit_fixed?: string;
|
56
|
+
deposit_percentage?: string;
|
57
|
+
};
|
58
|
+
total: string | number;
|
59
|
+
num: number;
|
60
|
+
}) => {
|
61
|
+
result: boolean;
|
62
|
+
depositTotal: Decimal;
|
63
|
+
};
|
@@ -1,6 +1,8 @@
|
|
1
|
+
var __create = Object.create;
|
1
2
|
var __defProp = Object.defineProperty;
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
7
|
var __export = (target, all) => {
|
6
8
|
for (var name in all)
|
@@ -14,19 +16,31 @@ var __copyProps = (to, from, except, desc) => {
|
|
14
16
|
}
|
15
17
|
return to;
|
16
18
|
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
28
|
|
19
29
|
// src/components/Sales/Cart/utils.ts
|
20
30
|
var utils_exports = {};
|
21
31
|
__export(utils_exports, {
|
32
|
+
calculateProductDeposit: () => calculateProductDeposit,
|
22
33
|
formatBundleToOrigin: () => formatBundleToOrigin,
|
23
34
|
formatOptionsToOrigin: () => formatOptionsToOrigin,
|
24
35
|
getOriginTotalPrice: () => getOriginTotalPrice,
|
36
|
+
getProductDeposit: () => getProductDeposit,
|
25
37
|
getTotalPrice: () => getTotalPrice,
|
26
38
|
handleCartItemOrigin: () => handleCartItemOrigin,
|
39
|
+
handleProductDeposit: () => handleProductDeposit,
|
27
40
|
handleProductInfo: () => handleProductInfo
|
28
41
|
});
|
29
42
|
module.exports = __toCommonJS(utils_exports);
|
43
|
+
var import_decimal = __toESM(require("decimal.js"));
|
30
44
|
var handleProductInfo = (eventDetail, num) => {
|
31
45
|
var _a;
|
32
46
|
const { productDetail, bookingOptionItem } = eventDetail;
|
@@ -138,12 +152,127 @@ var formatOptionsToOrigin = (options) => {
|
|
138
152
|
};
|
139
153
|
});
|
140
154
|
};
|
155
|
+
var handleProductDeposit = (cartItem, eventDetail, num) => {
|
156
|
+
var _a;
|
157
|
+
const { productDetail, bookingOptionItem } = eventDetail;
|
158
|
+
const normalProduct = bookingOptionItem == null ? void 0 : bookingOptionItem._originData;
|
159
|
+
if (!productDetail && normalProduct) {
|
160
|
+
const { custom_deposit_data } = normalProduct;
|
161
|
+
if ((custom_deposit_data == null ? void 0 : custom_deposit_data.has_deposit) == 1) {
|
162
|
+
return getProductDeposit({ cartItem, product: normalProduct, num });
|
163
|
+
} else {
|
164
|
+
return null;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
if (!productDetail) {
|
168
|
+
return null;
|
169
|
+
}
|
170
|
+
const { origin, bundle, options, product_variant_id } = productDetail || {};
|
171
|
+
let deposit = null;
|
172
|
+
const product = origin;
|
173
|
+
if (product_variant_id) {
|
174
|
+
product.product_variant_id = product_variant_id;
|
175
|
+
}
|
176
|
+
if (((_a = origin == null ? void 0 : origin.custom_deposit_data) == null ? void 0 : _a.has_deposit) == 1) {
|
177
|
+
deposit = getProductDeposit({ cartItem, product, bundle, options, num });
|
178
|
+
}
|
179
|
+
return deposit;
|
180
|
+
};
|
181
|
+
var getProductDeposit = (params) => {
|
182
|
+
var _a, _b;
|
183
|
+
const { cartItem, product, bundle, options } = params;
|
184
|
+
const num = (params == null ? void 0 : params.num) || 1;
|
185
|
+
if (((_a = product == null ? void 0 : product.custom_deposit_data) == null ? void 0 : _a.has_deposit) == 1) {
|
186
|
+
let total = new import_decimal.default(0);
|
187
|
+
const {
|
188
|
+
deposit_fixed,
|
189
|
+
deposit_percentage,
|
190
|
+
deposit_policy_data,
|
191
|
+
self_deposit_policy_ids
|
192
|
+
} = (product == null ? void 0 : product.custom_deposit_data) || {};
|
193
|
+
const allProtocols = deposit_policy_data || [];
|
194
|
+
let productHasDeposit = false;
|
195
|
+
const protocolIds = [];
|
196
|
+
if (typeof deposit_fixed === "string" && typeof deposit_percentage === "string") {
|
197
|
+
const { depositTotal, result } = calculateProductDeposit({
|
198
|
+
depositData: product == null ? void 0 : product.custom_deposit_data,
|
199
|
+
total: (cartItem == null ? void 0 : cartItem.total) || 0,
|
200
|
+
num
|
201
|
+
});
|
202
|
+
if (result) {
|
203
|
+
total = depositTotal;
|
204
|
+
protocolIds.push(...self_deposit_policy_ids || []);
|
205
|
+
productHasDeposit = true;
|
206
|
+
}
|
207
|
+
} else {
|
208
|
+
if (product == null ? void 0 : product.product_variant_id) {
|
209
|
+
const variantProduct = (_b = product == null ? void 0 : product.variant) == null ? void 0 : _b.find(
|
210
|
+
(item) => (item == null ? void 0 : item.id) === (product == null ? void 0 : product.product_variant_id)
|
211
|
+
);
|
212
|
+
if (variantProduct) {
|
213
|
+
const depositData = variantProduct == null ? void 0 : variantProduct.custom_deposit_data;
|
214
|
+
const { depositTotal, result } = calculateProductDeposit({
|
215
|
+
depositData,
|
216
|
+
total: (cartItem == null ? void 0 : cartItem.total) || 0,
|
217
|
+
num
|
218
|
+
});
|
219
|
+
if (result) {
|
220
|
+
total = depositTotal;
|
221
|
+
protocolIds.push(...(depositData == null ? void 0 : depositData.self_deposit_policy_ids) || []);
|
222
|
+
productHasDeposit = true;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
if (bundle == null ? void 0 : bundle.length) {
|
227
|
+
total = bundle.reduce((accumulator, currBundleProduct) => {
|
228
|
+
const depositData = currBundleProduct == null ? void 0 : currBundleProduct.custom_deposit_data;
|
229
|
+
const { depositTotal, result } = calculateProductDeposit({
|
230
|
+
depositData,
|
231
|
+
total: currBundleProduct == null ? void 0 : currBundleProduct.price,
|
232
|
+
num: (currBundleProduct == null ? void 0 : currBundleProduct.num) || 1
|
233
|
+
});
|
234
|
+
if (result) {
|
235
|
+
protocolIds.push(...(depositData == null ? void 0 : depositData.self_deposit_policy_ids) || []);
|
236
|
+
productHasDeposit = true;
|
237
|
+
return accumulator.plus(depositTotal);
|
238
|
+
}
|
239
|
+
return accumulator;
|
240
|
+
}, new import_decimal.default(0));
|
241
|
+
}
|
242
|
+
}
|
243
|
+
if (productHasDeposit) {
|
244
|
+
const ids = new Set(protocolIds);
|
245
|
+
const protocols = allProtocols.filter((item) => ids.has(item.id));
|
246
|
+
return { total: total.toNumber(), protocols };
|
247
|
+
}
|
248
|
+
return null;
|
249
|
+
}
|
250
|
+
return null;
|
251
|
+
};
|
252
|
+
var calculateProductDeposit = (params) => {
|
253
|
+
const { depositData, total, num } = params;
|
254
|
+
if (!depositData) {
|
255
|
+
return { result: false, depositTotal: new import_decimal.default(0) };
|
256
|
+
}
|
257
|
+
const { deposit_fixed, deposit_percentage } = depositData || {};
|
258
|
+
if (typeof deposit_fixed === "string" && typeof deposit_percentage === "string") {
|
259
|
+
const depositFixed = new import_decimal.default(deposit_fixed || 0);
|
260
|
+
const depositPercent = new import_decimal.default(deposit_percentage || 0);
|
261
|
+
const productTotalPrice = new import_decimal.default(total || 0);
|
262
|
+
const deposit = depositFixed.plus(depositPercent.times(productTotalPrice));
|
263
|
+
return { depositTotal: deposit.times(num), result: true };
|
264
|
+
}
|
265
|
+
return { result: false, depositTotal: new import_decimal.default(0) };
|
266
|
+
};
|
141
267
|
// Annotate the CommonJS export names for ESM import in node:
|
142
268
|
0 && (module.exports = {
|
269
|
+
calculateProductDeposit,
|
143
270
|
formatBundleToOrigin,
|
144
271
|
formatOptionsToOrigin,
|
145
272
|
getOriginTotalPrice,
|
273
|
+
getProductDeposit,
|
146
274
|
getTotalPrice,
|
147
275
|
handleCartItemOrigin,
|
276
|
+
handleProductDeposit,
|
148
277
|
handleProductInfo
|
149
278
|
});
|
@@ -5,6 +5,9 @@ interface PayProps {
|
|
5
5
|
order_id: string;
|
6
6
|
amount: number;
|
7
7
|
sale_channel?: string;
|
8
|
+
is_deposit?: number;
|
9
|
+
deposit_amount?: number;
|
10
|
+
total_amount?: number;
|
8
11
|
}
|
9
12
|
interface CheckoutContextType {
|
10
13
|
onCheckBeforeBooking: (data: any) => Promise<{
|
@@ -15,6 +18,7 @@ interface CheckoutContextType {
|
|
15
18
|
onPay: (payProps: PayProps) => void;
|
16
19
|
createBooking: any;
|
17
20
|
checkBeforeBooking: any;
|
21
|
+
freePay: any;
|
18
22
|
}
|
19
23
|
interface CheckoutProviderProps {
|
20
24
|
children: React.ReactNode;
|