@pisell/private-materials 3.0.207 → 3.0.209
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 +154 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -33
- package/es/businessModel/SalesModel/Sales/index.d.ts +24 -0
- package/es/businessModel/SalesModel/Sales/index.js +69 -0
- package/es/businessModel/SalesModel/hooks/index.d.ts +1 -0
- package/es/businessModel/SalesModel/hooks/index.js +7 -0
- package/es/businessModel/SalesModel/index.d.ts +4 -0
- package/es/businessModel/SalesModel/index.js +18 -0
- package/es/businessModel/index.d.ts +0 -0
- package/es/businessModel/index.js +0 -0
- package/es/components/Sales/Cart/index.d.ts +50 -0
- package/es/components/Sales/Cart/index.js +468 -0
- package/es/components/Sales/Cart/serve.d.ts +1 -0
- package/es/components/Sales/Cart/serve.js +6 -0
- package/es/components/Sales/Checkout/index.d.ts +33 -0
- package/es/components/Sales/Checkout/index.js +140 -0
- package/es/components/Sales/Checkout/serve.d.ts +2 -0
- package/es/components/Sales/Checkout/serve.js +11 -0
- package/es/components/Sales/Checkout/utils.d.ts +27 -0
- package/es/components/Sales/Checkout/utils.js +104 -0
- package/es/components/Sales/Customer/index.d.ts +24 -0
- package/es/components/Sales/Customer/index.js +56 -0
- package/es/components/Sales/Event/Detail.d.ts +27 -0
- package/es/components/Sales/Event/Detail.js +244 -0
- package/es/components/Sales/Event/index.d.ts +30 -0
- package/es/components/Sales/Event/index.js +121 -0
- package/es/components/Sales/Event/serve.d.ts +26 -0
- package/es/components/Sales/Event/serve.js +33 -0
- package/es/components/Sales/Holder/index.d.ts +33 -0
- package/es/components/Sales/Holder/index.js +226 -0
- package/es/components/Sales/Holder/serve.d.ts +8 -0
- package/es/components/Sales/Holder/serve.js +20 -0
- package/es/components/Sales/Init/index.d.ts +20 -0
- package/es/components/Sales/Init/index.js +110 -0
- package/es/components/Sales/Init/serve.d.ts +3 -0
- package/es/components/Sales/Init/serve.js +11 -0
- package/es/components/Sales/Resource/index.d.ts +26 -0
- package/es/components/Sales/Resource/index.js +126 -0
- package/es/components/Sales/Resource/serve.d.ts +4 -0
- package/es/components/Sales/Resource/serve.js +8 -0
- package/es/components/Sales/Step/index.d.ts +37 -0
- package/es/components/Sales/Step/index.js +189 -0
- package/es/components/Sales/Summary/index.d.ts +22 -0
- package/es/components/Sales/Summary/index.js +41 -0
- package/es/components/Sales/Summary/serve.d.ts +2 -0
- package/es/components/Sales/Summary/serve.js +11 -0
- package/es/components/Sales/Summary/utils.d.ts +22 -0
- package/es/components/Sales/Summary/utils.js +34 -0
- package/es/components/Sales/hooks/index.d.ts +1 -0
- package/es/components/Sales/hooks/index.js +3 -0
- package/es/components/Sales/index.d.ts +20 -0
- package/es/components/Sales/index.js +26 -0
- package/es/components/Sales/utils/index.d.ts +1 -0
- package/es/components/Sales/utils/index.js +18 -0
- package/es/components/booking/components/customSelect/index.d.ts +1 -0
- package/es/components/booking/components/customSelect/index.js +6 -2
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +38 -0
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/components/footer/amount.js +46 -22
- package/es/components/booking/components/footer/index.js +116 -79
- package/es/components/booking/components/footer/serve.d.ts +2 -0
- package/es/components/booking/components/footer/serve.js +44 -0
- package/es/components/booking/components/footer/utils.js +282 -35
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +54 -0
- package/es/components/booking/info/addServiceVariant/index.js +8 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +14 -13
- package/es/components/booking/info/clientVariant/vertical/index.js +131 -15
- package/es/components/booking/info/dateRange/index.d.ts +5 -0
- package/es/components/booking/info/dateRange/index.js +98 -0
- package/es/components/booking/info/dateRange/index.less +21 -0
- package/es/components/booking/info/main.js +44 -28
- package/es/components/booking/info/model.js +3 -0
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
- package/es/components/booking/info/pet/ChangePetModal/index.js +134 -0
- package/es/components/booking/info/pet/ChangePetModal/index.less +4 -0
- package/es/components/booking/info/pet/index.d.ts +1 -1
- package/es/components/booking/info/pet/index.js +91 -32
- package/es/components/booking/info/service/addService/index.js +195 -104
- package/es/components/booking/info/service/addService/index.less +13 -3
- package/es/components/booking/info/service/addService/utils.d.ts +12 -2
- package/es/components/booking/info/service/addService/utils.js +103 -26
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +5 -0
- package/es/components/booking/info/service/editService/BookingList/index.js +39 -0
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
- package/es/components/booking/info/service/editService/EditTabs/index.js +35 -0
- package/es/components/booking/info/service/editService/index.js +450 -142
- package/es/components/booking/info/service/editService/index.less +18 -13
- package/es/components/booking/info/service/serve.d.ts +10 -0
- package/es/components/booking/info/service/serve.js +28 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +55 -0
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service/serviceManager/index.js +281 -0
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +14 -0
- package/es/components/booking/info/service2/Group/utils.js +146 -0
- package/es/components/booking/info/service2/Lists.d.ts +3 -0
- package/es/components/booking/info/service2/Lists.js +153 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.js +54 -0
- package/es/components/booking/info/service2/index.d.ts +6 -0
- package/es/components/booking/info/service2/index.js +57 -0
- package/es/components/booking/info/service2/status.d.ts +31 -0
- package/es/components/booking/info/service2/status.js +78 -0
- package/es/components/booking/info/service2/utils.d.ts +240 -0
- package/es/components/booking/info/service2/utils.js +1077 -0
- package/es/components/booking/info/utils.d.ts +20 -0
- package/es/components/booking/info/utils.js +37 -0
- package/es/components/booking/info2/utilsByBooking.js +0 -1
- package/es/components/booking/locales.d.ts +66 -0
- package/es/components/booking/locales.js +81 -3
- package/es/components/booking/materiels/holder/index.d.ts +7 -0
- package/es/components/booking/materiels/holder/index.js +51 -0
- package/es/components/booking/model.d.ts +5 -1
- package/es/components/booking/model.js +4 -2
- package/es/components/booking/utils.d.ts +12 -3
- package/es/components/booking/utils.js +143 -26
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/eventBooking/assets/alert-circle.png +0 -0
- package/es/components/eventBooking/assets/calendar-heart.svg +5 -0
- package/es/components/eventBooking/assets/compass.svg +13 -0
- package/es/components/eventBooking/assets/image.svg +5 -0
- package/es/components/eventBooking/assets/phone.svg +5 -0
- package/es/components/eventBooking/assets/shopping-cart.svg +10 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +4 -0
- package/es/components/eventBooking/components/ErrorTip/index.js +14 -0
- package/es/components/eventBooking/components/ErrorTip/index.less +51 -0
- package/es/components/eventBooking/components/OpenCard/index.d.ts +4 -0
- package/es/components/eventBooking/components/OpenCard/index.js +65 -0
- package/es/components/eventBooking/components/OpenCard/index.less +52 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +154 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +69 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.less +55 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Cart/index.js +34 -0
- package/es/components/eventBooking/components/Provider/Cart/index.less +4 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Content/index.js +41 -0
- package/es/components/eventBooking/components/Provider/Content/index.less +30 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Event/index.js +86 -0
- package/es/components/eventBooking/components/Provider/Event/index.less +20 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Footer/index.js +69 -0
- package/es/components/eventBooking/components/Provider/Footer/index.less +40 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Header/index.js +73 -0
- package/es/components/eventBooking/components/Provider/Header/index.less +2 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Information/index.js +178 -0
- package/es/components/eventBooking/components/Provider/Information/index.less +92 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.js +34 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.js +51 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +31 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Resource/index.js +85 -0
- package/es/components/eventBooking/components/Provider/Resource/index.less +46 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.js +87 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +26 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +11 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +65 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +69 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +13 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +152 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +20 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +38 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +28 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +268 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +257 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +174 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.js +36 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +38 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.js +33 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +30 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +208 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.less +83 -0
- package/es/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
- package/es/components/eventBooking/components/bookingServiceList/index.js +52 -0
- package/es/components/eventBooking/components/bookingServiceList/index.less +6 -0
- package/es/components/eventBooking/components/eventCard/index.d.ts +14 -0
- package/es/components/eventBooking/components/eventCard/index.js +116 -0
- package/es/components/eventBooking/components/eventCard/index.less +81 -0
- package/es/components/eventBooking/components/productCard/index.d.ts +16 -0
- package/es/components/eventBooking/components/productCard/index.js +79 -0
- package/es/components/eventBooking/components/productCard/index.less +60 -0
- package/es/components/eventBooking/components/progressBar/index.d.ts +16 -0
- package/es/components/eventBooking/components/progressBar/index.js +77 -0
- package/es/components/eventBooking/components/progressBar/index.less +15 -0
- package/es/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
- package/es/components/eventBooking/components/resourceDisplay/index.js +148 -0
- package/es/components/eventBooking/components/resourceDisplay/index.less +81 -0
- package/es/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
- package/es/components/eventBooking/components/resourceUsability/index.js +44 -0
- package/es/components/eventBooking/components/resourceUsability/index.less +40 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +37 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +119 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +13 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.js +142 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.less +210 -0
- package/es/components/eventBooking/components/selectHolder/index.d.ts +22 -0
- package/es/components/eventBooking/components/selectHolder/index.js +122 -0
- package/es/components/eventBooking/components/selectHolder/index.less +70 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.js +168 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.less +74 -0
- package/es/components/eventBooking/index.d.ts +4 -0
- package/es/components/eventBooking/index.js +71 -0
- package/es/components/eventBooking/index.less +20 -0
- package/es/components/eventBooking/locales.d.ts +183 -0
- package/es/components/eventBooking/locales.js +200 -0
- package/es/components/eventBooking/mock.d.ts +627 -0
- package/es/components/eventBooking/mock.js +1172 -0
- package/es/components/eventBooking/status.d.ts +21 -0
- package/es/components/eventBooking/status.js +51 -0
- package/es/components/eventBooking/type.d.ts +17 -0
- package/es/components/eventBooking/type.js +1 -0
- package/es/components/eventBooking/utils.d.ts +36 -0
- package/es/components/eventBooking/utils.js +82 -0
- package/es/components/shoppingCart/Provider.d.ts +3 -0
- package/es/components/shoppingCart/Provider.js +86 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +4 -0
- package/es/components/shoppingCart/components/Cart/Product.js +71 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Cart/index.js +73 -0
- package/es/components/shoppingCart/components/Cart/index.less +68 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Empty/index.js +15 -0
- package/es/components/shoppingCart/components/Empty/index.less +19 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Render/index.js +70 -0
- package/es/components/shoppingCart/components/Render/index.less +2 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +132 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +3 -0
- package/es/components/shoppingCart/hooks/useAddService.js +23 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +60 -0
- package/es/components/shoppingCart/hooks/useContext.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useContext.js +5 -0
- package/es/components/shoppingCart/index.d.ts +4 -0
- package/es/components/shoppingCart/index.js +24 -0
- package/es/components/shoppingCart/locales.d.ts +33 -0
- package/es/components/shoppingCart/locales.js +38 -0
- package/es/components/shoppingCart/mock.d.ts +40 -0
- package/es/components/shoppingCart/mock.js +40 -0
- package/es/components/shoppingCart/status.d.ts +2 -0
- package/es/components/shoppingCart/status.js +22 -0
- package/es/components/shoppingCart/type.d.ts +40 -0
- package/es/components/shoppingCart/type.js +1 -0
- package/es/components/shoppingCart/utils.d.ts +63 -0
- package/es/components/shoppingCart/utils.js +116 -0
- package/es/index.d.ts +13 -0
- package/es/index.js +14 -1
- package/lib/businessModel/SalesModel/Sales/index.d.ts +24 -0
- package/lib/businessModel/SalesModel/Sales/index.js +104 -0
- package/lib/businessModel/SalesModel/hooks/index.d.ts +1 -0
- package/lib/businessModel/SalesModel/hooks/index.js +34 -0
- package/lib/businessModel/SalesModel/index.d.ts +4 -0
- package/lib/businessModel/SalesModel/index.js +51 -0
- package/lib/businessModel/index.d.ts +0 -0
- package/lib/businessModel/index.js +0 -0
- package/lib/components/Sales/Cart/index.d.ts +50 -0
- package/lib/components/Sales/Cart/index.js +414 -0
- package/lib/components/Sales/Cart/serve.d.ts +1 -0
- package/lib/components/Sales/Cart/serve.js +32 -0
- package/lib/components/Sales/Checkout/index.d.ts +33 -0
- package/lib/components/Sales/Checkout/index.js +126 -0
- package/lib/components/Sales/Checkout/serve.d.ts +2 -0
- package/lib/components/Sales/Checkout/serve.js +37 -0
- package/lib/components/Sales/Checkout/utils.d.ts +27 -0
- package/lib/components/Sales/Checkout/utils.js +88 -0
- package/lib/components/Sales/Customer/index.d.ts +24 -0
- package/lib/components/Sales/Customer/index.js +90 -0
- package/lib/components/Sales/Event/Detail.d.ts +27 -0
- package/lib/components/Sales/Event/Detail.js +224 -0
- package/lib/components/Sales/Event/index.d.ts +30 -0
- package/lib/components/Sales/Event/index.js +136 -0
- package/lib/components/Sales/Event/serve.d.ts +26 -0
- package/lib/components/Sales/Event/serve.js +54 -0
- package/lib/components/Sales/Holder/index.d.ts +33 -0
- package/lib/components/Sales/Holder/index.js +210 -0
- package/lib/components/Sales/Holder/serve.d.ts +8 -0
- package/lib/components/Sales/Holder/serve.js +37 -0
- package/lib/components/Sales/Init/index.d.ts +20 -0
- package/lib/components/Sales/Init/index.js +125 -0
- package/lib/components/Sales/Init/serve.d.ts +3 -0
- package/lib/components/Sales/Init/serve.js +34 -0
- package/lib/components/Sales/Resource/index.d.ts +26 -0
- package/lib/components/Sales/Resource/index.js +133 -0
- package/lib/components/Sales/Resource/serve.d.ts +4 -0
- package/lib/components/Sales/Resource/serve.js +32 -0
- package/lib/components/Sales/Step/index.d.ts +37 -0
- package/lib/components/Sales/Step/index.js +170 -0
- package/lib/components/Sales/Summary/index.d.ts +22 -0
- package/lib/components/Sales/Summary/index.js +75 -0
- package/lib/components/Sales/Summary/serve.d.ts +2 -0
- package/lib/components/Sales/Summary/serve.js +37 -0
- package/lib/components/Sales/Summary/utils.d.ts +22 -0
- package/lib/components/Sales/Summary/utils.js +60 -0
- package/lib/components/Sales/hooks/index.d.ts +1 -0
- package/lib/components/Sales/hooks/index.js +31 -0
- package/lib/components/Sales/index.d.ts +20 -0
- package/lib/components/Sales/index.js +79 -0
- package/lib/components/Sales/utils/index.d.ts +1 -0
- package/lib/components/Sales/utils/index.js +43 -0
- package/lib/components/booking/components/customSelect/index.d.ts +1 -0
- package/lib/components/booking/components/customSelect/index.js +6 -2
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +60 -0
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/components/footer/amount.js +27 -8
- package/lib/components/booking/components/footer/index.js +50 -55
- package/lib/components/booking/components/footer/serve.d.ts +2 -0
- package/lib/components/booking/components/footer/serve.js +12 -0
- package/lib/components/booking/components/footer/utils.js +177 -35
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/addServiceVariant/index.js +5 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +8 -7
- package/lib/components/booking/info/clientVariant/vertical/index.js +97 -20
- package/lib/components/booking/info/dateRange/index.d.ts +5 -0
- package/lib/components/booking/info/dateRange/index.js +111 -0
- package/lib/components/booking/info/dateRange/index.less +21 -0
- package/lib/components/booking/info/main.js +32 -21
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.js +121 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.less +4 -0
- package/lib/components/booking/info/pet/index.d.ts +1 -1
- package/lib/components/booking/info/pet/index.js +88 -41
- package/lib/components/booking/info/service/addService/index.js +132 -101
- package/lib/components/booking/info/service/addService/index.less +13 -3
- package/lib/components/booking/info/service/addService/utils.d.ts +12 -2
- package/lib/components/booking/info/service/addService/utils.js +58 -10
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +5 -0
- package/lib/components/booking/info/service/editService/BookingList/index.js +55 -0
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
- package/lib/components/booking/info/service/editService/EditTabs/index.js +75 -0
- package/lib/components/booking/info/service/editService/index.js +447 -197
- package/lib/components/booking/info/service/editService/index.less +18 -13
- package/lib/components/booking/info/service/serve.d.ts +10 -0
- package/lib/components/booking/info/service/serve.js +7 -2
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +70 -0
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service/serviceManager/index.js +211 -0
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +14 -0
- package/lib/components/booking/info/service2/Group/utils.js +142 -0
- package/lib/components/booking/info/service2/Lists.d.ts +3 -0
- package/lib/components/booking/info/service2/Lists.js +116 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +50 -0
- package/lib/components/booking/info/service2/index.d.ts +6 -0
- package/lib/components/booking/info/service2/index.js +75 -0
- package/lib/components/booking/info/service2/status.d.ts +31 -0
- package/lib/components/booking/info/service2/status.js +81 -0
- package/lib/components/booking/info/service2/utils.d.ts +240 -0
- package/lib/components/booking/info/service2/utils.js +695 -0
- package/lib/components/booking/info/utils.d.ts +20 -0
- package/lib/components/booking/info/utils.js +41 -0
- package/lib/components/booking/locales.d.ts +66 -0
- package/lib/components/booking/locales.js +69 -3
- package/lib/components/booking/materiels/holder/index.d.ts +7 -0
- package/lib/components/booking/materiels/holder/index.js +65 -0
- package/lib/components/booking/model.d.ts +5 -1
- package/lib/components/booking/model.js +4 -2
- package/lib/components/booking/utils.d.ts +12 -3
- package/lib/components/booking/utils.js +89 -18
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/eventBooking/assets/alert-circle.png +0 -0
- package/lib/components/eventBooking/assets/calendar-heart.svg +5 -0
- package/lib/components/eventBooking/assets/compass.svg +13 -0
- package/lib/components/eventBooking/assets/image.svg +5 -0
- package/lib/components/eventBooking/assets/phone.svg +5 -0
- package/lib/components/eventBooking/assets/shopping-cart.svg +10 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +4 -0
- package/lib/components/eventBooking/components/ErrorTip/index.js +30 -0
- package/lib/components/eventBooking/components/ErrorTip/index.less +51 -0
- package/lib/components/eventBooking/components/OpenCard/index.d.ts +4 -0
- package/lib/components/eventBooking/components/OpenCard/index.js +90 -0
- package/lib/components/eventBooking/components/OpenCard/index.less +52 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +106 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +99 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +55 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.js +63 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.less +4 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Content/index.js +75 -0
- package/lib/components/eventBooking/components/Provider/Content/index.less +30 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Event/index.js +92 -0
- package/lib/components/eventBooking/components/Provider/Event/index.less +20 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.js +85 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.less +40 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Header/index.js +77 -0
- package/lib/components/eventBooking/components/Provider/Header/index.less +2 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Information/index.js +151 -0
- package/lib/components/eventBooking/components/Provider/Information/index.less +92 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.js +67 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.js +73 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +62 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.js +93 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.less +46 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.js +95 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +55 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +11 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +78 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +86 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +13 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +121 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +37 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +58 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +55 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +197 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +198 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +122 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.js +70 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +71 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +75 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.js +66 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +70 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +177 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.less +83 -0
- package/lib/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
- package/lib/components/eventBooking/components/bookingServiceList/index.js +79 -0
- package/lib/components/eventBooking/components/bookingServiceList/index.less +6 -0
- package/lib/components/eventBooking/components/eventCard/index.d.ts +14 -0
- package/lib/components/eventBooking/components/eventCard/index.js +124 -0
- package/lib/components/eventBooking/components/eventCard/index.less +81 -0
- package/lib/components/eventBooking/components/productCard/index.d.ts +16 -0
- package/lib/components/eventBooking/components/productCard/index.js +78 -0
- package/lib/components/eventBooking/components/productCard/index.less +60 -0
- package/lib/components/eventBooking/components/progressBar/index.d.ts +16 -0
- package/lib/components/eventBooking/components/progressBar/index.js +96 -0
- package/lib/components/eventBooking/components/progressBar/index.less +15 -0
- package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
- package/lib/components/eventBooking/components/resourceDisplay/index.js +117 -0
- package/lib/components/eventBooking/components/resourceDisplay/index.less +81 -0
- package/lib/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
- package/lib/components/eventBooking/components/resourceUsability/index.js +76 -0
- package/lib/components/eventBooking/components/resourceUsability/index.less +40 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +73 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +127 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +13 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.js +125 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.less +210 -0
- package/lib/components/eventBooking/components/selectHolder/index.d.ts +22 -0
- package/lib/components/eventBooking/components/selectHolder/index.js +106 -0
- package/lib/components/eventBooking/components/selectHolder/index.less +70 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.js +146 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.less +74 -0
- package/lib/components/eventBooking/index.d.ts +4 -0
- package/lib/components/eventBooking/index.js +86 -0
- package/lib/components/eventBooking/index.less +20 -0
- package/lib/components/eventBooking/locales.d.ts +183 -0
- package/lib/components/eventBooking/locales.js +206 -0
- package/lib/components/eventBooking/mock.d.ts +627 -0
- package/lib/components/eventBooking/mock.js +1352 -0
- package/lib/components/eventBooking/status.d.ts +21 -0
- package/lib/components/eventBooking/status.js +70 -0
- package/lib/components/eventBooking/type.d.ts +17 -0
- package/lib/components/eventBooking/type.js +17 -0
- package/lib/components/eventBooking/utils.d.ts +36 -0
- package/lib/components/eventBooking/utils.js +80 -0
- package/lib/components/shoppingCart/Provider.d.ts +3 -0
- package/lib/components/shoppingCart/Provider.js +110 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +4 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +73 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Cart/index.js +85 -0
- package/lib/components/shoppingCart/components/Cart/index.less +68 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Empty/index.js +43 -0
- package/lib/components/shoppingCart/components/Empty/index.less +19 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Render/index.js +75 -0
- package/lib/components/shoppingCart/components/Render/index.less +2 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +124 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +3 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +55 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +66 -0
- package/lib/components/shoppingCart/hooks/useContext.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useContext.js +31 -0
- package/lib/components/shoppingCart/index.d.ts +4 -0
- package/lib/components/shoppingCart/index.js +60 -0
- package/lib/components/shoppingCart/locales.d.ts +33 -0
- package/lib/components/shoppingCart/locales.js +56 -0
- package/lib/components/shoppingCart/mock.d.ts +40 -0
- package/lib/components/shoppingCart/mock.js +76 -0
- package/lib/components/shoppingCart/status.d.ts +2 -0
- package/lib/components/shoppingCart/status.js +60 -0
- package/lib/components/shoppingCart/type.d.ts +40 -0
- package/lib/components/shoppingCart/type.js +17 -0
- package/lib/components/shoppingCart/utils.d.ts +63 -0
- package/lib/components/shoppingCart/utils.js +86 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +39 -0
- package/lowcode/event-booking/meta.ts +69 -0
- package/lowcode/event-booking-availability-calendar/meta.ts +53 -0
- package/lowcode/event-booking-detail-modal/meta.ts +39 -0
- package/lowcode/event-booking-service-list/meta.ts +77 -0
- package/lowcode/event-card/meta.ts +77 -0
- package/lowcode/event-product-card/meta.ts +79 -0
- package/lowcode/event-progress-bar/meta.ts +65 -0
- package/lowcode/event-resource-display/meta.ts +169 -0
- package/lowcode/event-resource-usability/meta.ts +67 -0
- package/lowcode/event-schedule-calendar/meta.ts +56 -0
- package/lowcode/event-select-holder/meta.ts +84 -0
- package/lowcode/event-time-resource-selector/meta.ts +69 -0
- package/lowcode/shopping-cart/meta.ts +98 -0
- package/package.json +3 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CheckoutData {
|
|
3
|
+
}
|
|
4
|
+
interface PayProps {
|
|
5
|
+
order_id: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
sale_channel?: string;
|
|
8
|
+
}
|
|
9
|
+
interface CheckoutContextType {
|
|
10
|
+
onCheckBeforeBooking: (data: any) => Promise<{
|
|
11
|
+
result: boolean;
|
|
12
|
+
num: number;
|
|
13
|
+
}>;
|
|
14
|
+
onCheckout: (data: any) => Promise<any>;
|
|
15
|
+
onPay: (payProps: PayProps) => void;
|
|
16
|
+
createBooking: any;
|
|
17
|
+
checkBeforeBooking: any;
|
|
18
|
+
}
|
|
19
|
+
interface CheckoutProviderProps {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare const CheckoutContext: React.Context<CheckoutContextType | undefined>;
|
|
23
|
+
export declare const CheckoutProvider: React.FC<CheckoutProviderProps>;
|
|
24
|
+
/**
|
|
25
|
+
* 使用步骤管理的Hook
|
|
26
|
+
* @throws {Error} 如果在StepProvider外部使用会抛出错误
|
|
27
|
+
* @returns {StepContextType} 步骤管理上下文
|
|
28
|
+
*/
|
|
29
|
+
export declare const useCheckout: () => CheckoutContextType;
|
|
30
|
+
declare const _default: {
|
|
31
|
+
defaultState: CheckoutData;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
import React, { createContext, useRef } from 'react';
|
|
6
|
+
import { useSales } from "../../../businessModel/SalesModel";
|
|
7
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
8
|
+
import { useRequest } from 'ahooks';
|
|
9
|
+
import { checkBeforeBookingApi, createBookingApi } from "./serve";
|
|
10
|
+
import { useCart } from "../Cart";
|
|
11
|
+
// 默认步骤状态
|
|
12
|
+
var defaultState = {};
|
|
13
|
+
|
|
14
|
+
// 创建步骤上下文
|
|
15
|
+
export var CheckoutContext = /*#__PURE__*/createContext(undefined);
|
|
16
|
+
export var CheckoutProvider = function CheckoutProvider(_ref) {
|
|
17
|
+
var children = _ref.children;
|
|
18
|
+
var context = useEngineContext();
|
|
19
|
+
var utils = context.appHelper.utils || {};
|
|
20
|
+
var _useSales = useSales(),
|
|
21
|
+
data = _useSales.data,
|
|
22
|
+
setData = _useSales.setData;
|
|
23
|
+
var _useCart = useCart(),
|
|
24
|
+
updateDisabledCartItem = _useCart.updateDisabledCartItem;
|
|
25
|
+
var checkoutCallback = useRef(null);
|
|
26
|
+
var checkRef = useRef(null);
|
|
27
|
+
var checkBeforeBooking = useRequest(checkBeforeBookingApi, {
|
|
28
|
+
manual: true,
|
|
29
|
+
onSuccess: function onSuccess(res) {
|
|
30
|
+
var _res$data;
|
|
31
|
+
if ((_res$data = res.data) !== null && _res$data !== void 0 && _res$data.length) {
|
|
32
|
+
var _res$data2;
|
|
33
|
+
// 同步更新当前在购物车中不可用的商品数据
|
|
34
|
+
updateDisabledCartItem(res.data);
|
|
35
|
+
checkRef.current({
|
|
36
|
+
result: false,
|
|
37
|
+
num: (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.length
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
checkRef.current({
|
|
41
|
+
result: true
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
var createBooking = useRequest(createBookingApi, {
|
|
47
|
+
manual: true,
|
|
48
|
+
onSuccess: function onSuccess(res) {
|
|
49
|
+
onPay(res.data);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @title: 下单前校验
|
|
55
|
+
* @param {any} data
|
|
56
|
+
* @return {*}
|
|
57
|
+
* @Author: xiangfeng.xue
|
|
58
|
+
*/
|
|
59
|
+
var onCheckBeforeBooking = function onCheckBeforeBooking(data) {
|
|
60
|
+
return new Promise(function (resolve) {
|
|
61
|
+
checkRef.current = function (res) {
|
|
62
|
+
resolve(res);
|
|
63
|
+
checkRef.current = null;
|
|
64
|
+
};
|
|
65
|
+
checkBeforeBooking.runAsync(data);
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @title: 下单
|
|
71
|
+
* @description:
|
|
72
|
+
* @return {*}
|
|
73
|
+
* @Author: zhiwei.Wang
|
|
74
|
+
*/
|
|
75
|
+
var onCheckout = /*#__PURE__*/function () {
|
|
76
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
77
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
78
|
+
while (1) switch (_context.prev = _context.next) {
|
|
79
|
+
case 0:
|
|
80
|
+
return _context.abrupt("return", new Promise(function (resolve) {
|
|
81
|
+
checkoutCallback.current = function (e) {
|
|
82
|
+
resolve(e);
|
|
83
|
+
checkoutCallback.current = null;
|
|
84
|
+
};
|
|
85
|
+
createBooking.runAsync(data);
|
|
86
|
+
}));
|
|
87
|
+
case 1:
|
|
88
|
+
case "end":
|
|
89
|
+
return _context.stop();
|
|
90
|
+
}
|
|
91
|
+
}, _callee);
|
|
92
|
+
}));
|
|
93
|
+
return function onCheckout(_x) {
|
|
94
|
+
return _ref2.apply(this, arguments);
|
|
95
|
+
};
|
|
96
|
+
}();
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @title: 支付
|
|
100
|
+
* @description:
|
|
101
|
+
* @param {PayProps} payProps
|
|
102
|
+
* @return {*}
|
|
103
|
+
* @Author: zhiwei.Wang
|
|
104
|
+
*/
|
|
105
|
+
var onPay = function onPay(payProps) {
|
|
106
|
+
utils.action({
|
|
107
|
+
type: 'pisell1.payment',
|
|
108
|
+
data: payProps,
|
|
109
|
+
callback: function callback(e) {
|
|
110
|
+
checkoutCallback.current && checkoutCallback.current(e);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
var contextValue = {
|
|
115
|
+
onCheckBeforeBooking: onCheckBeforeBooking,
|
|
116
|
+
onCheckout: onCheckout,
|
|
117
|
+
onPay: onPay,
|
|
118
|
+
createBooking: createBooking,
|
|
119
|
+
checkBeforeBooking: checkBeforeBooking
|
|
120
|
+
};
|
|
121
|
+
return /*#__PURE__*/React.createElement(CheckoutContext.Provider, {
|
|
122
|
+
value: contextValue
|
|
123
|
+
}, children);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 使用步骤管理的Hook
|
|
128
|
+
* @throws {Error} 如果在StepProvider外部使用会抛出错误
|
|
129
|
+
* @returns {StepContextType} 步骤管理上下文
|
|
130
|
+
*/
|
|
131
|
+
export var useCheckout = function useCheckout() {
|
|
132
|
+
var context = React.useContext(CheckoutContext);
|
|
133
|
+
if (!context) {
|
|
134
|
+
throw new Error('useCheckout must be used within a CheckoutProvider');
|
|
135
|
+
}
|
|
136
|
+
return context;
|
|
137
|
+
};
|
|
138
|
+
export default {
|
|
139
|
+
defaultState: defaultState
|
|
140
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { request } from "../../../utils";
|
|
2
|
+
|
|
3
|
+
// 下单前置校验接口
|
|
4
|
+
export var checkBeforeBookingApi = function checkBeforeBookingApi(data) {
|
|
5
|
+
return request.getRequest().post('/h5/eventbookingv2/order/check-config', data);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
// 创建
|
|
9
|
+
export var createBookingApi = function createBookingApi(data) {
|
|
10
|
+
return request.getRequest().post('/h5/eventbookingv2/order', data);
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 套餐单规格信息
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {any} option
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: zhiwei.Wang
|
|
7
|
+
* @Date: 2024-02-19 09:26
|
|
8
|
+
*/
|
|
9
|
+
export declare const formatProductOption: (option: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
* @title: 套餐信息
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {any} bundle
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @Author: zhiwei.Wang
|
|
16
|
+
* @Date: 2024-02-19 09:26
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatProductBundle: (bundle: any) => any;
|
|
19
|
+
/**
|
|
20
|
+
* @title: 格式化下单接口数据
|
|
21
|
+
* @description:
|
|
22
|
+
* @param {any} state saledModel数据源
|
|
23
|
+
* @param {boolean} excludeDisabled 是否需要排除购物车中失效商品
|
|
24
|
+
* @Author: xiangfeng.xue
|
|
25
|
+
* @Date: 2025-01-21 17:57
|
|
26
|
+
*/
|
|
27
|
+
export declare const formatValues: (state: any, excludeDisabled?: boolean) => any;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 套餐单规格信息
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {any} option
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: zhiwei.Wang
|
|
7
|
+
* @Date: 2024-02-19 09:26
|
|
8
|
+
*/
|
|
9
|
+
export var formatProductOption = function formatProductOption(option) {
|
|
10
|
+
if (!option) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
return option.map(function (d) {
|
|
14
|
+
return {
|
|
15
|
+
num: d.num,
|
|
16
|
+
option_group_item_id: d.product_option_item_id,
|
|
17
|
+
option_group_id: d.option_group_id
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @title: 套餐信息
|
|
24
|
+
* @description:
|
|
25
|
+
* @param {any} bundle
|
|
26
|
+
* @return {*}
|
|
27
|
+
* @Author: zhiwei.Wang
|
|
28
|
+
* @Date: 2024-02-19 09:26
|
|
29
|
+
*/
|
|
30
|
+
export var formatProductBundle = function formatProductBundle(bundle) {
|
|
31
|
+
if (!bundle) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
return bundle.map(function (d) {
|
|
35
|
+
return {
|
|
36
|
+
bundle_group_id: d.group_id,
|
|
37
|
+
bundle_id: d.id,
|
|
38
|
+
bundle_product_id: d._bundle_product_id,
|
|
39
|
+
bundle_variant_id: d.bundle_variant_id,
|
|
40
|
+
num: d.num,
|
|
41
|
+
extension_id: d.extension_id,
|
|
42
|
+
extension_type: d.extension_type,
|
|
43
|
+
option: formatProductOption(d.option)
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var getSubType = function getSubType(item) {
|
|
48
|
+
var _item$duration;
|
|
49
|
+
var _type = (_item$duration = item.duration) === null || _item$duration === void 0 ? void 0 : _item$duration.type;
|
|
50
|
+
// 目前不支持跨天
|
|
51
|
+
if (_type && _type !== 'days') {
|
|
52
|
+
return _type;
|
|
53
|
+
}
|
|
54
|
+
return 'minutes';
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @title: 预约商品信息
|
|
59
|
+
* @description:
|
|
60
|
+
* @param {any} data
|
|
61
|
+
* @return {*}
|
|
62
|
+
* @Author: zhiwei.Wang
|
|
63
|
+
* @Date: 2024-02-19 09:26
|
|
64
|
+
*/
|
|
65
|
+
var formatBookings = function formatBookings(list) {
|
|
66
|
+
var bookings = [];
|
|
67
|
+
bookings = list.map(function (item) {
|
|
68
|
+
return item._originData;
|
|
69
|
+
});
|
|
70
|
+
return bookings;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @title: 格式化下单接口数据
|
|
75
|
+
* @description:
|
|
76
|
+
* @param {any} state saledModel数据源
|
|
77
|
+
* @param {boolean} excludeDisabled 是否需要排除购物车中失效商品
|
|
78
|
+
* @Author: xiangfeng.xue
|
|
79
|
+
* @Date: 2025-01-21 17:57
|
|
80
|
+
*/
|
|
81
|
+
export var formatValues = function formatValues(state, excludeDisabled) {
|
|
82
|
+
var values = {
|
|
83
|
+
type: 'event_booking_v2',
|
|
84
|
+
platform: 'H5',
|
|
85
|
+
sales_channel: 'my_pisel',
|
|
86
|
+
order_sales_channel: 'online_store',
|
|
87
|
+
bookings: [],
|
|
88
|
+
shop_note: '',
|
|
89
|
+
schedule_date: ''
|
|
90
|
+
};
|
|
91
|
+
var data = [];
|
|
92
|
+
if (excludeDisabled) {
|
|
93
|
+
var _state$cartData$cartI, _state$cartData$cartI2;
|
|
94
|
+
data = (_state$cartData$cartI = state.cartData.cartItems) === null || _state$cartData$cartI === void 0 ? void 0 : (_state$cartData$cartI2 = _state$cartData$cartI.filter) === null || _state$cartData$cartI2 === void 0 ? void 0 : _state$cartData$cartI2.call(_state$cartData$cartI, function (v) {
|
|
95
|
+
return v.disabled !== true;
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
data = state.cartData.cartItems;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// 服务
|
|
102
|
+
values.bookings = formatBookings(data);
|
|
103
|
+
return values;
|
|
104
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CustomerData {
|
|
3
|
+
}
|
|
4
|
+
interface CustomerContextType {
|
|
5
|
+
appUtils: any;
|
|
6
|
+
isLogin: () => boolean;
|
|
7
|
+
openLoginModal: (params: any) => void;
|
|
8
|
+
getUserInfo: () => any;
|
|
9
|
+
}
|
|
10
|
+
interface CustomerProviderProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const CustomerContext: React.Context<CustomerContextType | undefined>;
|
|
14
|
+
export declare const CustomerProvider: React.FC<CustomerProviderProps>;
|
|
15
|
+
/**
|
|
16
|
+
* 使用步骤管理的Hook
|
|
17
|
+
* @throws {Error} 如果在StepProvider外部使用会抛出错误
|
|
18
|
+
* @returns {StepContextType} 步骤管理上下文
|
|
19
|
+
*/
|
|
20
|
+
export declare const useCustomer: () => CustomerContextType;
|
|
21
|
+
declare const _default: {
|
|
22
|
+
defaultState: CustomerData;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { createContext } from 'react';
|
|
2
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
3
|
+
// 默认步骤状态
|
|
4
|
+
var defaultState = {};
|
|
5
|
+
|
|
6
|
+
// 创建步骤上下文
|
|
7
|
+
export var CustomerContext = /*#__PURE__*/createContext(undefined);
|
|
8
|
+
export var CustomerProvider = function CustomerProvider(_ref) {
|
|
9
|
+
var children = _ref.children;
|
|
10
|
+
var context = useEngineContext();
|
|
11
|
+
var utils = context.appHelper.utils || {};
|
|
12
|
+
var isLogin = function isLogin() {
|
|
13
|
+
var _utils$token, _utils$token$get;
|
|
14
|
+
return !!(utils !== null && utils !== void 0 && (_utils$token = utils.token) !== null && _utils$token !== void 0 && (_utils$token$get = _utils$token.get) !== null && _utils$token$get !== void 0 && _utils$token$get.call(_utils$token));
|
|
15
|
+
};
|
|
16
|
+
var openLoginModal = function openLoginModal(params) {
|
|
17
|
+
var _ref2 = params || {},
|
|
18
|
+
callback = _ref2.callback;
|
|
19
|
+
utils.action({
|
|
20
|
+
type: 'pisell1.login',
|
|
21
|
+
data: {},
|
|
22
|
+
callback: callback
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var getUserInfo = function getUserInfo() {
|
|
26
|
+
var _utils$getStore$getSt, _utils$getStore$getSt2;
|
|
27
|
+
var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 ? void 0 : (_utils$getStore$getSt2 = _utils$getStore$getSt.global) === null || _utils$getStore$getSt2 === void 0 ? void 0 : _utils$getStore$getSt2.userInfo;
|
|
28
|
+
var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
|
|
29
|
+
return userInfo !== null && userInfo !== void 0 && userInfo.id ? userInfo : localUserInfo;
|
|
30
|
+
};
|
|
31
|
+
var contextValue = {
|
|
32
|
+
appUtils: utils,
|
|
33
|
+
isLogin: isLogin,
|
|
34
|
+
openLoginModal: openLoginModal,
|
|
35
|
+
getUserInfo: getUserInfo
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/React.createElement(CustomerContext.Provider, {
|
|
38
|
+
value: contextValue
|
|
39
|
+
}, children);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 使用步骤管理的Hook
|
|
44
|
+
* @throws {Error} 如果在StepProvider外部使用会抛出错误
|
|
45
|
+
* @returns {StepContextType} 步骤管理上下文
|
|
46
|
+
*/
|
|
47
|
+
export var useCustomer = function useCustomer() {
|
|
48
|
+
var context = React.useContext(CustomerContext);
|
|
49
|
+
if (!context) {
|
|
50
|
+
throw new Error('useCustomer must be used within a CustomerContext');
|
|
51
|
+
}
|
|
52
|
+
return context;
|
|
53
|
+
};
|
|
54
|
+
export default {
|
|
55
|
+
defaultState: defaultState
|
|
56
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EventDetailContextType {
|
|
3
|
+
detail: any;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenEventDetail: (eventItem: any) => void;
|
|
6
|
+
onCloseEventDetail: () => void;
|
|
7
|
+
onSelectEventDetail: () => void;
|
|
8
|
+
selectEventDetailBookingOptions: (v: any) => void;
|
|
9
|
+
getEventDetailSelectDate: {
|
|
10
|
+
run: (id: number, params: any) => void;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
data?: any;
|
|
13
|
+
};
|
|
14
|
+
currentBookingOption: any;
|
|
15
|
+
}
|
|
16
|
+
interface EventDetailProviderProps {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const EventDetailContext: React.Context<EventDetailContextType | undefined>;
|
|
20
|
+
export declare const EventDetailProvider: React.FC<EventDetailProviderProps>;
|
|
21
|
+
/**
|
|
22
|
+
* 使用步骤管理的Hook
|
|
23
|
+
* @throws {Error} 如果在StepProvider外部使用会抛出错误
|
|
24
|
+
* @returns {StepContextType} 步骤管理上下文
|
|
25
|
+
*/
|
|
26
|
+
export declare const useEventDetail: () => EventDetailContextType;
|
|
27
|
+
export {};
|