@pisell/private-materials 3.2.9 → 3.2.11
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 +34 -14
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +6 -6
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/login/index.d.ts +1 -0
- package/es/components/parallelResourcBooking/assets/alert-circle.png +0 -0
- package/es/components/parallelResourcBooking/assets/calendar-heart.svg +5 -0
- package/es/components/parallelResourcBooking/assets/compass.svg +13 -0
- package/es/components/parallelResourcBooking/assets/image.svg +5 -0
- package/es/components/parallelResourcBooking/assets/phone.svg +5 -0
- package/es/components/parallelResourcBooking/assets/shopping-cart.svg +10 -0
- package/es/components/parallelResourcBooking/components/ErrorTip/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/ErrorTip/index.js +14 -0
- package/es/components/parallelResourcBooking/components/ErrorTip/index.less +51 -0
- package/es/components/parallelResourcBooking/components/OpenCard/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/OpenCard/index.js +65 -0
- package/es/components/parallelResourcBooking/components/OpenCard/index.less +52 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.js +274 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/Total.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/Total.js +46 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/index.js +63 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/index.less +87 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/index.js +30 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/index.less +2 -0
- package/es/components/parallelResourcBooking/components/Provider/Content/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Content/index.js +65 -0
- package/es/components/parallelResourcBooking/components/Provider/Content/index.less +31 -0
- package/es/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.js +34 -0
- package/es/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.less +17 -0
- package/es/components/parallelResourcBooking/components/Provider/Event/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Event/index.js +93 -0
- package/es/components/parallelResourcBooking/components/Provider/Event/index.less +20 -0
- package/es/components/parallelResourcBooking/components/Provider/Footer/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Footer/index.js +76 -0
- package/es/components/parallelResourcBooking/components/Provider/Footer/index.less +64 -0
- package/es/components/parallelResourcBooking/components/Provider/Header/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Header/index.js +75 -0
- package/es/components/parallelResourcBooking/components/Provider/Header/index.less +2 -0
- package/es/components/parallelResourcBooking/components/Provider/Information/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Information/index.js +178 -0
- package/es/components/parallelResourcBooking/components/Provider/Information/index.less +92 -0
- package/es/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.js +34 -0
- package/es/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.less +27 -0
- package/es/components/parallelResourcBooking/components/Provider/OrderProductModal/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/OrderProductModal/index.js +27 -0
- package/es/components/parallelResourcBooking/components/Provider/OrderProductModal/index.less +32 -0
- package/es/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.d.ts +3 -0
- package/es/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.js +31 -0
- package/es/components/parallelResourcBooking/components/Provider/Resource/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/Resource/index.js +79 -0
- package/es/components/parallelResourcBooking/components/Provider/Resource/index.less +46 -0
- package/es/components/parallelResourcBooking/components/Provider/SelectHolderModal.d.ts +3 -0
- package/es/components/parallelResourcBooking/components/Provider/SelectHolderModal.js +90 -0
- package/es/components/parallelResourcBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/Provider/SelectProduct/index.js +77 -0
- package/es/components/parallelResourcBooking/components/Provider/SelectProduct/index.less +131 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +26 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +11 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +65 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +69 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +13 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +152 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +20 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +38 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +28 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +269 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +256 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +173 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.js +36 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.less +2 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.js +38 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.js +33 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.js +30 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/index.js +337 -0
- package/es/components/parallelResourcBooking/components/bookingDetailModal/index.less +82 -0
- package/es/components/parallelResourcBooking/components/bookingServiceList/index.d.ts +17 -0
- package/es/components/parallelResourcBooking/components/bookingServiceList/index.js +52 -0
- package/es/components/parallelResourcBooking/components/bookingServiceList/index.less +6 -0
- package/es/components/parallelResourcBooking/components/eventCard/index.d.ts +14 -0
- package/es/components/parallelResourcBooking/components/eventCard/index.js +116 -0
- package/es/components/parallelResourcBooking/components/eventCard/index.less +81 -0
- package/es/components/parallelResourcBooking/components/productCard/index.d.ts +16 -0
- package/es/components/parallelResourcBooking/components/productCard/index.js +79 -0
- package/es/components/parallelResourcBooking/components/productCard/index.less +60 -0
- package/es/components/parallelResourcBooking/components/progressBar/index.d.ts +16 -0
- package/es/components/parallelResourcBooking/components/progressBar/index.js +93 -0
- package/es/components/parallelResourcBooking/components/progressBar/index.less +15 -0
- package/es/components/parallelResourcBooking/components/resourceDisplay/index.d.ts +23 -0
- package/es/components/parallelResourcBooking/components/resourceDisplay/index.js +148 -0
- package/es/components/parallelResourcBooking/components/resourceDisplay/index.less +95 -0
- package/es/components/parallelResourcBooking/components/resourceUsability/index.d.ts +12 -0
- package/es/components/parallelResourcBooking/components/resourceUsability/index.js +44 -0
- package/es/components/parallelResourcBooking/components/resourceUsability/index.less +40 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.js +37 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.js +127 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/index.d.ts +13 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/index.js +142 -0
- package/es/components/parallelResourcBooking/components/scheduleCalendar/index.less +222 -0
- package/es/components/parallelResourcBooking/components/selectHolder/index.d.ts +22 -0
- package/es/components/parallelResourcBooking/components/selectHolder/index.js +118 -0
- package/es/components/parallelResourcBooking/components/selectHolder/index.less +70 -0
- package/es/components/parallelResourcBooking/components/timeResourceSelector/index.d.ts +20 -0
- package/es/components/parallelResourcBooking/components/timeResourceSelector/index.js +168 -0
- package/es/components/parallelResourcBooking/components/timeResourceSelector/index.less +74 -0
- package/es/components/parallelResourcBooking/index.d.ts +4 -0
- package/es/components/parallelResourcBooking/index.js +58 -0
- package/es/components/parallelResourcBooking/index.less +22 -0
- package/es/components/parallelResourcBooking/locales.d.ts +216 -0
- package/es/components/parallelResourcBooking/locales.js +251 -0
- package/es/components/parallelResourcBooking/mock.d.ts +627 -0
- package/es/components/parallelResourcBooking/mock.js +1172 -0
- package/es/components/parallelResourcBooking/status.d.ts +21 -0
- package/es/components/parallelResourcBooking/status.js +51 -0
- package/es/components/parallelResourcBooking/type.d.ts +17 -0
- package/es/components/parallelResourcBooking/type.js +1 -0
- package/es/components/parallelResourcBooking/utils.d.ts +45 -0
- package/es/components/parallelResourcBooking/utils.js +99 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/parallelResourcBooking/assets/alert-circle.png +0 -0
- package/lib/components/parallelResourcBooking/assets/calendar-heart.svg +5 -0
- package/lib/components/parallelResourcBooking/assets/compass.svg +13 -0
- package/lib/components/parallelResourcBooking/assets/image.svg +5 -0
- package/lib/components/parallelResourcBooking/assets/phone.svg +5 -0
- package/lib/components/parallelResourcBooking/assets/shopping-cart.svg +10 -0
- package/lib/components/parallelResourcBooking/components/ErrorTip/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/ErrorTip/index.js +30 -0
- package/lib/components/parallelResourcBooking/components/ErrorTip/index.less +51 -0
- package/lib/components/parallelResourcBooking/components/OpenCard/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/OpenCard/index.js +90 -0
- package/lib/components/parallelResourcBooking/components/OpenCard/index.less +52 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.js +158 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/Total.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/Total.js +82 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/index.js +92 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/index.less +87 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/index.js +59 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/index.less +2 -0
- package/lib/components/parallelResourcBooking/components/Provider/Content/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Content/index.js +90 -0
- package/lib/components/parallelResourcBooking/components/Provider/Content/index.less +31 -0
- package/lib/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.js +60 -0
- package/lib/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.less +17 -0
- package/lib/components/parallelResourcBooking/components/Provider/Event/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Event/index.js +100 -0
- package/lib/components/parallelResourcBooking/components/Provider/Event/index.less +20 -0
- package/lib/components/parallelResourcBooking/components/Provider/Footer/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Footer/index.js +87 -0
- package/lib/components/parallelResourcBooking/components/Provider/Footer/index.less +64 -0
- package/lib/components/parallelResourcBooking/components/Provider/Header/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Header/index.js +80 -0
- package/lib/components/parallelResourcBooking/components/Provider/Header/index.less +2 -0
- package/lib/components/parallelResourcBooking/components/Provider/Information/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Information/index.js +151 -0
- package/lib/components/parallelResourcBooking/components/Provider/Information/index.less +92 -0
- package/lib/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.js +67 -0
- package/lib/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.less +27 -0
- package/lib/components/parallelResourcBooking/components/Provider/OrderProductModal/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/OrderProductModal/index.js +57 -0
- package/lib/components/parallelResourcBooking/components/Provider/OrderProductModal/index.less +32 -0
- package/lib/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.d.ts +3 -0
- package/lib/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.js +62 -0
- package/lib/components/parallelResourcBooking/components/Provider/Resource/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/Resource/index.js +90 -0
- package/lib/components/parallelResourcBooking/components/Provider/Resource/index.less +46 -0
- package/lib/components/parallelResourcBooking/components/Provider/SelectHolderModal.d.ts +3 -0
- package/lib/components/parallelResourcBooking/components/Provider/SelectHolderModal.js +97 -0
- package/lib/components/parallelResourcBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/Provider/SelectProduct/index.js +69 -0
- package/lib/components/parallelResourcBooking/components/Provider/SelectProduct/index.less +131 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +55 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +11 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +78 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +86 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +13 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +121 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +37 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +58 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +55 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +196 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +198 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +122 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.js +70 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.less +2 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.js +75 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.js +66 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.js +69 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/index.js +248 -0
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/index.less +82 -0
- package/lib/components/parallelResourcBooking/components/bookingServiceList/index.d.ts +17 -0
- package/lib/components/parallelResourcBooking/components/bookingServiceList/index.js +79 -0
- package/lib/components/parallelResourcBooking/components/bookingServiceList/index.less +6 -0
- package/lib/components/parallelResourcBooking/components/eventCard/index.d.ts +14 -0
- package/lib/components/parallelResourcBooking/components/eventCard/index.js +124 -0
- package/lib/components/parallelResourcBooking/components/eventCard/index.less +81 -0
- package/lib/components/parallelResourcBooking/components/productCard/index.d.ts +16 -0
- package/lib/components/parallelResourcBooking/components/productCard/index.js +77 -0
- package/lib/components/parallelResourcBooking/components/productCard/index.less +60 -0
- package/lib/components/parallelResourcBooking/components/progressBar/index.d.ts +16 -0
- package/lib/components/parallelResourcBooking/components/progressBar/index.js +100 -0
- package/lib/components/parallelResourcBooking/components/progressBar/index.less +15 -0
- package/lib/components/parallelResourcBooking/components/resourceDisplay/index.d.ts +23 -0
- package/lib/components/parallelResourcBooking/components/resourceDisplay/index.js +116 -0
- package/lib/components/parallelResourcBooking/components/resourceDisplay/index.less +95 -0
- package/lib/components/parallelResourcBooking/components/resourceUsability/index.d.ts +12 -0
- package/lib/components/parallelResourcBooking/components/resourceUsability/index.js +76 -0
- package/lib/components/parallelResourcBooking/components/resourceUsability/index.less +40 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.js +73 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.js +135 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/index.d.ts +13 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/index.js +125 -0
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/index.less +222 -0
- package/lib/components/parallelResourcBooking/components/selectHolder/index.d.ts +22 -0
- package/lib/components/parallelResourcBooking/components/selectHolder/index.js +106 -0
- package/lib/components/parallelResourcBooking/components/selectHolder/index.less +70 -0
- package/lib/components/parallelResourcBooking/components/timeResourceSelector/index.d.ts +20 -0
- package/lib/components/parallelResourcBooking/components/timeResourceSelector/index.js +146 -0
- package/lib/components/parallelResourcBooking/components/timeResourceSelector/index.less +74 -0
- package/lib/components/parallelResourcBooking/index.d.ts +4 -0
- package/lib/components/parallelResourcBooking/index.js +78 -0
- package/lib/components/parallelResourcBooking/index.less +22 -0
- package/lib/components/parallelResourcBooking/locales.d.ts +216 -0
- package/lib/components/parallelResourcBooking/locales.js +239 -0
- package/lib/components/parallelResourcBooking/mock.d.ts +627 -0
- package/lib/components/parallelResourcBooking/mock.js +1352 -0
- package/lib/components/parallelResourcBooking/status.d.ts +21 -0
- package/lib/components/parallelResourcBooking/status.js +70 -0
- package/lib/components/parallelResourcBooking/type.d.ts +17 -0
- package/lib/components/parallelResourcBooking/type.js +17 -0
- package/lib/components/parallelResourcBooking/utils.d.ts +45 -0
- package/lib/components/parallelResourcBooking/utils.js +90 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 获取包括今天的后七天日期
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {*}
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: 严文强
|
|
7
|
+
* @Date: 2024-02-01 11:00
|
|
8
|
+
*/
|
|
9
|
+
export declare const getNextSevenDaysList: (defaultDay: string) => string[];
|
|
10
|
+
/**
|
|
11
|
+
* @title: 将年月日信息只展示为天
|
|
12
|
+
* @description: 如果为今天 则返回ToDay
|
|
13
|
+
* @param {*}
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @Author: 严文强
|
|
16
|
+
* @Date: 2024-02-01 11:00
|
|
17
|
+
*/
|
|
18
|
+
export declare const ShowDayOnly: (date: string) => string;
|
|
19
|
+
/**
|
|
20
|
+
* @title: 日历星期多语言
|
|
21
|
+
* @description:
|
|
22
|
+
* @param {*}
|
|
23
|
+
* @return {*}
|
|
24
|
+
* @Author: 严文强
|
|
25
|
+
* @Date: 2024-02-01 18:42
|
|
26
|
+
*/
|
|
27
|
+
export declare const weekListText: string[];
|
|
28
|
+
/**
|
|
29
|
+
* @title: 不同状态颜色值
|
|
30
|
+
* @description:
|
|
31
|
+
* @param {*}
|
|
32
|
+
* @return {*}
|
|
33
|
+
* @Author: xiangxiang.shao
|
|
34
|
+
* @Date: 2024-02-19 11:35
|
|
35
|
+
*/
|
|
36
|
+
export declare const statusColor: {
|
|
37
|
+
call_to_book: string;
|
|
38
|
+
lots_of_space: string;
|
|
39
|
+
filling_up_fast: string;
|
|
40
|
+
sold_out: string;
|
|
41
|
+
unavailable: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* @title: 根据预约量数据判断当前状态
|
|
45
|
+
* @description:
|
|
46
|
+
* @param {*}
|
|
47
|
+
* @return {*}
|
|
48
|
+
* @Author: xiangxiang.shao
|
|
49
|
+
* @Date: 2024-02-19 11:35
|
|
50
|
+
*/
|
|
51
|
+
export declare const getStatus: (dateLimit: any, currentDate: string, cutTime: any) => {
|
|
52
|
+
status: string;
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @title: 根据当前日期以设定判断当前是否是call_to_book状态
|
|
57
|
+
* @description:
|
|
58
|
+
* @param {*}
|
|
59
|
+
* @return {*}
|
|
60
|
+
* @Author: xiangxiang.shao
|
|
61
|
+
* @Date: 2024-02-21 10:10
|
|
62
|
+
*/
|
|
63
|
+
export declare const getCallToBookStatus: (currentDate: string, dateLimitData: any, cutTime: any) => boolean;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import Dayjs from 'dayjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @title: 获取包括今天的后七天日期
|
|
5
|
+
* @description:
|
|
6
|
+
* @param {*}
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: 严文强
|
|
9
|
+
* @Date: 2024-02-01 11:00
|
|
10
|
+
*/
|
|
11
|
+
export var getNextSevenDaysList = function getNextSevenDaysList(defaultDay) {
|
|
12
|
+
// 获取当前日期
|
|
13
|
+
var currentDate = Dayjs(defaultDay);
|
|
14
|
+
// 创建一个数组来存储最近7天的日期
|
|
15
|
+
var nextSevenDays = [];
|
|
16
|
+
// 循环遍历最近7天的日期
|
|
17
|
+
for (var i = 0; i < 7; i++) {
|
|
18
|
+
// 获取当前日期的前7天
|
|
19
|
+
var previousDay = currentDate.add(i, 'day');
|
|
20
|
+
// 将日期添加到数组中
|
|
21
|
+
nextSevenDays.push(previousDay.format('YYYY-MM-DD'));
|
|
22
|
+
}
|
|
23
|
+
return nextSevenDays;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @title: 将年月日信息只展示为天
|
|
28
|
+
* @description: 如果为今天 则返回ToDay
|
|
29
|
+
* @param {*}
|
|
30
|
+
* @return {*}
|
|
31
|
+
* @Author: 严文强
|
|
32
|
+
* @Date: 2024-02-01 11:00
|
|
33
|
+
*/
|
|
34
|
+
export var ShowDayOnly = function ShowDayOnly(date) {
|
|
35
|
+
//
|
|
36
|
+
var defaultDay = Dayjs().format('YYYY-MM-DD');
|
|
37
|
+
if (date == defaultDay) {
|
|
38
|
+
return 'ToDay';
|
|
39
|
+
}
|
|
40
|
+
return Dayjs(date).format('DD');
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @title: 日历星期多语言
|
|
45
|
+
* @description:
|
|
46
|
+
* @param {*}
|
|
47
|
+
* @return {*}
|
|
48
|
+
* @Author: 严文强
|
|
49
|
+
* @Date: 2024-02-01 18:42
|
|
50
|
+
*/
|
|
51
|
+
export var weekListText = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @title: 不同状态颜色值
|
|
55
|
+
* @description:
|
|
56
|
+
* @param {*}
|
|
57
|
+
* @return {*}
|
|
58
|
+
* @Author: xiangxiang.shao
|
|
59
|
+
* @Date: 2024-02-19 11:35
|
|
60
|
+
*/
|
|
61
|
+
export var statusColor = {
|
|
62
|
+
call_to_book: '#444CE7',
|
|
63
|
+
// 请致电预订
|
|
64
|
+
lots_of_space: '#099250',
|
|
65
|
+
// 库存充足
|
|
66
|
+
filling_up_fast: '#EAAA08',
|
|
67
|
+
// 库存紧张
|
|
68
|
+
sold_out: '#D92D20',
|
|
69
|
+
// 无库存
|
|
70
|
+
unavailable: 'rgba(68, 76, 231, 0.00)' // 不可用
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @title: 根据预约量数据判断当前状态
|
|
75
|
+
* @description:
|
|
76
|
+
* @param {*}
|
|
77
|
+
* @return {*}
|
|
78
|
+
* @Author: xiangxiang.shao
|
|
79
|
+
* @Date: 2024-02-19 11:35
|
|
80
|
+
*/
|
|
81
|
+
export var getStatus = function getStatus(dateLimit, currentDate, cutTime) {
|
|
82
|
+
var status = '';
|
|
83
|
+
var disabled = false;
|
|
84
|
+
var dataItem = dateLimit[currentDate];
|
|
85
|
+
console.log(currentDate);
|
|
86
|
+
var startTime = Dayjs(cutTime === null || cutTime === void 0 ? void 0 : cutTime.shop_time).format('YYYY-MM-DD HH:mm');
|
|
87
|
+
var startDate = Dayjs(cutTime === null || cutTime === void 0 ? void 0 : cutTime.shop_time).format('YYYY-MM-DD');
|
|
88
|
+
var endTime = Dayjs(startTime).add(cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit, cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type);
|
|
89
|
+
var endDay = endTime.format('YYYY-MM-DD');
|
|
90
|
+
try {
|
|
91
|
+
// 没有当天数据, 禁止
|
|
92
|
+
if (!dataItem) {
|
|
93
|
+
return {
|
|
94
|
+
status: status,
|
|
95
|
+
disabled: true
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 如果当天 大于最早的可用时间的天 禁止
|
|
100
|
+
// if (currentDate > endDay) {
|
|
101
|
+
// return {
|
|
102
|
+
// status,
|
|
103
|
+
// disabled: true,
|
|
104
|
+
// };
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
// //如果当天 等于 最早可用时间的天, 则找times里的最早开始时间是否小于 店铺的最早可用时间
|
|
108
|
+
// if (currentDate === startDate) {
|
|
109
|
+
// let times = dataItem.times || [];
|
|
110
|
+
|
|
111
|
+
// let useable = times.find((d: any) => {
|
|
112
|
+
// return startTime < d.start_at;
|
|
113
|
+
// });
|
|
114
|
+
// if (!useable) {
|
|
115
|
+
// return {
|
|
116
|
+
// status,
|
|
117
|
+
// disabled: true,
|
|
118
|
+
// };
|
|
119
|
+
// }
|
|
120
|
+
// }
|
|
121
|
+
} catch (err) {
|
|
122
|
+
return {
|
|
123
|
+
status: status,
|
|
124
|
+
disabled: true
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (!Object.keys(dateLimit).length) {
|
|
128
|
+
return {
|
|
129
|
+
status: status,
|
|
130
|
+
disabled: true
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
var times = dataItem.times || [];
|
|
134
|
+
if (!times.length) {
|
|
135
|
+
disabled = true;
|
|
136
|
+
} else {
|
|
137
|
+
var useable = null;
|
|
138
|
+
if (cutTime.type === 'ongoing' && currentDate === startDate) {
|
|
139
|
+
var _cutTime$ongoing, _cutTime$ongoing2;
|
|
140
|
+
// 活动结束前都可以购买
|
|
141
|
+
if ((cutTime === null || cutTime === void 0 || (_cutTime$ongoing = cutTime['ongoing']) === null || _cutTime$ongoing === void 0 ? void 0 : _cutTime$ongoing.type) === 'before_end') {
|
|
142
|
+
// 在活动时间范围内 或者 在活动还没开始前可选
|
|
143
|
+
useable = times.find(function (d) {
|
|
144
|
+
return startTime >= d.start_at && startTime < d.end_at || d.start_at >= startTime;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
if ((cutTime === null || cutTime === void 0 || (_cutTime$ongoing2 = cutTime['ongoing']) === null || _cutTime$ongoing2 === void 0 ? void 0 : _cutTime$ongoing2.type) === 'after_start') {
|
|
148
|
+
// 在活动时间范围内 或者 在活动还没开始前可选
|
|
149
|
+
useable = times.find(function (d) {
|
|
150
|
+
var _cutTime$ongoing3;
|
|
151
|
+
var _endAt = Dayjs(d.start_at).add(cutTime === null || cutTime === void 0 || (_cutTime$ongoing3 = cutTime['ongoing']) === null || _cutTime$ongoing3 === void 0 ? void 0 : _cutTime$ongoing3.unit, 'minutes');
|
|
152
|
+
var _endTime = _endAt.format('YYYY-MM-DD HH:mm');
|
|
153
|
+
return startTime >= d.start_at && startTime <= _endTime || d.start_at >= startTime;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
} else {
|
|
157
|
+
useable = times.find(function (d) {
|
|
158
|
+
return startTime < d.start_at;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
if (!useable) {
|
|
162
|
+
return {
|
|
163
|
+
status: status,
|
|
164
|
+
disabled: true
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 是否含有无限制数据
|
|
169
|
+
var haveUnLimit = times.find(function (item) {
|
|
170
|
+
return item.limit === 0;
|
|
171
|
+
});
|
|
172
|
+
if (haveUnLimit) {
|
|
173
|
+
status = 'lots_of_space';
|
|
174
|
+
} else {
|
|
175
|
+
var allLimit = times.reduce(function (prev, next) {
|
|
176
|
+
return prev + next.limit;
|
|
177
|
+
}, 0);
|
|
178
|
+
var allOrderCount = times.reduce(function (prev, next) {
|
|
179
|
+
return prev + next.order_count;
|
|
180
|
+
}, 0);
|
|
181
|
+
var percent = (allLimit - allOrderCount) / allLimit;
|
|
182
|
+
if (percent > 0.5) {
|
|
183
|
+
// 库存充足
|
|
184
|
+
status = 'lots_of_space';
|
|
185
|
+
} else if (percent <= 0.5 && percent > 0) {
|
|
186
|
+
// 库存紧张
|
|
187
|
+
status = 'filling_up_fast';
|
|
188
|
+
} else if (percent <= 0) {
|
|
189
|
+
// 无库存
|
|
190
|
+
status = 'sold_out';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
status: status,
|
|
196
|
+
disabled: disabled
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @title: 根据当前日期以设定判断当前是否是call_to_book状态
|
|
202
|
+
* @description:
|
|
203
|
+
* @param {*}
|
|
204
|
+
* @return {*}
|
|
205
|
+
* @Author: xiangxiang.shao
|
|
206
|
+
* @Date: 2024-02-21 10:10
|
|
207
|
+
*/
|
|
208
|
+
export var getCallToBookStatus = function getCallToBookStatus(currentDate, dateLimitData, cutTime) {
|
|
209
|
+
var _dateLimitData$curren;
|
|
210
|
+
var timeList = ((_dateLimitData$curren = dateLimitData[currentDate]) === null || _dateLimitData$curren === void 0 ? void 0 : _dateLimitData$curren.times) || [];
|
|
211
|
+
var isShowCallToBook = false;
|
|
212
|
+
if (!currentDate || !(cutTime !== null && cutTime !== void 0 && cutTime.shop_time) || !(cutTime !== null && cutTime !== void 0 && cutTime.unit) || !(cutTime !== null && cutTime !== void 0 && cutTime.unit_type)) {
|
|
213
|
+
isShowCallToBook = false;
|
|
214
|
+
return isShowCallToBook;
|
|
215
|
+
}
|
|
216
|
+
// currentDate在当前日期和截止日期之间
|
|
217
|
+
// if (cutTime?.unit_type === 'days') {
|
|
218
|
+
// if (
|
|
219
|
+
// Dayjs(currentDate).isBefore(
|
|
220
|
+
// Dayjs(Dayjs().format('YYYY-MM-DD')).add(cutTime?.unit, 'days')
|
|
221
|
+
// )
|
|
222
|
+
// ) {
|
|
223
|
+
// isShowCallToBook = true;
|
|
224
|
+
// } else {
|
|
225
|
+
// isShowCallToBook = false;
|
|
226
|
+
// }
|
|
227
|
+
// }
|
|
228
|
+
if ((cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type) === 'hours' || (cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type) === 'minutes' || (cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type) === 'days') {
|
|
229
|
+
var startTime = Dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
230
|
+
var endTime = Dayjs(startTime).add(cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit, cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type).format('YYYY-MM-DD HH:mm:ss');
|
|
231
|
+
if (Dayjs(currentDate).isBefore(Dayjs(endTime.split(' ')[0]))) {
|
|
232
|
+
isShowCallToBook = true;
|
|
233
|
+
} else {
|
|
234
|
+
// 如果日期相等,则判断timeList是否全在时间范围内,如果全在时间范围内,则返回true
|
|
235
|
+
if (currentDate === endTime.split(' ')[0]) {
|
|
236
|
+
var _timeList$find;
|
|
237
|
+
var haveTime = timeList === null || timeList === void 0 || (_timeList$find = timeList.find) === null || _timeList$find === void 0 ? void 0 : _timeList$find.call(timeList, function (item) {
|
|
238
|
+
var end_at = "".concat(item.date, " ").concat(item.end_at);
|
|
239
|
+
// 当前时间在开始时间和结束时间之间 end_at < endTime
|
|
240
|
+
if (Dayjs(end_at).valueOf() > Dayjs(endTime).valueOf()) {
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
if (haveTime) {
|
|
245
|
+
isShowCallToBook = false;
|
|
246
|
+
} else {
|
|
247
|
+
isShowCallToBook = true;
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
isShowCallToBook = false;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// 判断开始时间和结束时间是否大于1天
|
|
254
|
+
}
|
|
255
|
+
return isShowCallToBook;
|
|
256
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { forwardRef, useImperativeHandle, useState, useRef } from 'react';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import dayjs from 'dayjs';
|
|
10
|
+
import { Iconfont } from '@pisell/materials';
|
|
11
|
+
import Status from "../CalendarDate/Status";
|
|
12
|
+
import CalendarWeek from "../CalendarDate/CalenDateWeek";
|
|
13
|
+
import CalendarDate from "../CalendarDate";
|
|
14
|
+
import { mock } from "../../../../mock";
|
|
15
|
+
import OpenCard from "../../../OpenCard";
|
|
16
|
+
// import { getProductAvailableCount } from '../../serve';
|
|
17
|
+
import "./index.less";
|
|
18
|
+
var SelectDate = function SelectDate(_ref, ref) {
|
|
19
|
+
var currentDate = _ref.currentDate,
|
|
20
|
+
detail = _ref.detail,
|
|
21
|
+
currentDateChange = _ref.currentDateChange,
|
|
22
|
+
setSurplusDisabledChange = _ref.setSurplusDisabledChange,
|
|
23
|
+
cutTime = _ref.cutTime,
|
|
24
|
+
setCutTime = _ref.setCutTime,
|
|
25
|
+
showCalendarPopup = _ref.showCalendarPopup;
|
|
26
|
+
// 缓存剩余量数据
|
|
27
|
+
var _useState = useState(mock.availability_calendar.limitData),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
dateLimitData = _useState2[0],
|
|
30
|
+
setDateLimitData = _useState2[1];
|
|
31
|
+
var calendarDateRef = useRef(null);
|
|
32
|
+
useImperativeHandle(ref, function () {
|
|
33
|
+
return {};
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// const _getProductAvailableCount = useRequest(getProductAvailableCount, {
|
|
37
|
+
// manual: true,
|
|
38
|
+
// onSuccess: (res) => {
|
|
39
|
+
// const data = res?.data || [];
|
|
40
|
+
// const dates = data?.dates || [];
|
|
41
|
+
// const dateData = { ...dateLimitData };
|
|
42
|
+
// dates.forEach((item: any) => {
|
|
43
|
+
// dateData[item.date] = item;
|
|
44
|
+
// });
|
|
45
|
+
// setDateLimitData(dateData);
|
|
46
|
+
|
|
47
|
+
// const cutTimeData = {
|
|
48
|
+
// shop_time: data?.shop_time,
|
|
49
|
+
// ...data?.cut_off_time,
|
|
50
|
+
// };
|
|
51
|
+
// setCutTime(cutTimeData);
|
|
52
|
+
// // 这里加个校验 如果当天时间不可用, 自动寻找一个可用的时间
|
|
53
|
+
// // try {
|
|
54
|
+
// // const { status, disabled } = getStatus(
|
|
55
|
+
// // dateData,
|
|
56
|
+
// // currentDate,
|
|
57
|
+
// // cutTimeData
|
|
58
|
+
// // );
|
|
59
|
+
// // if (disabled || status === 'sold_out') {
|
|
60
|
+
// // for (let key in dateData) {
|
|
61
|
+
// // const { status, disabled } = getStatus(dateData, key, cutTimeData);
|
|
62
|
+
// // if (!disabled && status !== 'sold_out') {
|
|
63
|
+
// // currentDateChange(key);
|
|
64
|
+
// // return;
|
|
65
|
+
// // }
|
|
66
|
+
// // }
|
|
67
|
+
// // }
|
|
68
|
+
// // } catch (err) {}
|
|
69
|
+
// // const { status, disabled } = getStatus(data, currentDate);
|
|
70
|
+
// // if (disabled || status === 'sold_out') {
|
|
71
|
+
// // setSurplusDisabled(true);
|
|
72
|
+
// // } else {
|
|
73
|
+
// // setSurplusDisabled(false);
|
|
74
|
+
// // }
|
|
75
|
+
// },
|
|
76
|
+
// });
|
|
77
|
+
|
|
78
|
+
// 当日是否还有剩余量,没有则不加入购物车(此处为了处理以前遗留逻辑问题)
|
|
79
|
+
// useEffect(() => {
|
|
80
|
+
// const { status, disabled } = getStatus(dateLimitData, currentDate, cutTime);
|
|
81
|
+
// const isShowCallToBook = getCallToBookStatus(
|
|
82
|
+
// currentDate,
|
|
83
|
+
// dateLimitData,
|
|
84
|
+
// cutTime
|
|
85
|
+
// );
|
|
86
|
+
// let surplusDisabledChange = false;
|
|
87
|
+
// if (
|
|
88
|
+
// disabled ||
|
|
89
|
+
// status === 'sold_out' ||
|
|
90
|
+
// isShowCallToBook
|
|
91
|
+
// // ||
|
|
92
|
+
// // _getProductAvailableCount.loading
|
|
93
|
+
// ) {
|
|
94
|
+
// surplusDisabledChange = true;
|
|
95
|
+
// } else {
|
|
96
|
+
// surplusDisabledChange = false;
|
|
97
|
+
// }
|
|
98
|
+
// setSurplusDisabledChange(surplusDisabledChange);
|
|
99
|
+
// }, [currentDate, dateLimitData, cutTime]);
|
|
100
|
+
// _getProductAvailableCount.loading,
|
|
101
|
+
|
|
102
|
+
var getLimitData = function getLimitData(start_date, end_date) {
|
|
103
|
+
// 列举start_date至end_date的全部日期
|
|
104
|
+
var _list = [];
|
|
105
|
+
var start = dayjs(start_date);
|
|
106
|
+
var end = dayjs(end_date);
|
|
107
|
+
while (start.isBefore(end)) {
|
|
108
|
+
_list.push(start.format('YYYY-MM-DD'));
|
|
109
|
+
start.add(1, 'days');
|
|
110
|
+
}
|
|
111
|
+
console.log('dateLimitData', dateLimitData);
|
|
112
|
+
console.log('_list', _list);
|
|
113
|
+
// 判断是否有全部缓存数据
|
|
114
|
+
var haveAllData = _list.find(function (item) {
|
|
115
|
+
return !dateLimitData[item];
|
|
116
|
+
});
|
|
117
|
+
if (haveAllData) {
|
|
118
|
+
// _getProductAvailableCount.run(detail.id, {
|
|
119
|
+
// start_date: start_date,
|
|
120
|
+
// end_date: end_date,
|
|
121
|
+
// });
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @title: 头部额外内容
|
|
127
|
+
* @description:
|
|
128
|
+
* @return {*}
|
|
129
|
+
* @Author: WangHan
|
|
130
|
+
* @Date: 2025-01-14 14:52
|
|
131
|
+
*/
|
|
132
|
+
var extraHeader = function extraHeader() {
|
|
133
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
onClick: function onClick(e) {
|
|
135
|
+
var _calendarDateRef$curr;
|
|
136
|
+
e.stopPropagation();
|
|
137
|
+
calendarDateRef === null || calendarDateRef === void 0 || (_calendarDateRef$curr = calendarDateRef.current) === null || _calendarDateRef$curr === void 0 || _calendarDateRef$curr.open(currentDate, detail === null || detail === void 0 ? void 0 : detail.id);
|
|
138
|
+
}
|
|
139
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
140
|
+
type: "pisell2-calendar",
|
|
141
|
+
className: classNames('calendar-icon')
|
|
142
|
+
}));
|
|
143
|
+
};
|
|
144
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(OpenCard, {
|
|
145
|
+
title: 'Select a date',
|
|
146
|
+
initOpen: true,
|
|
147
|
+
showArrow: false,
|
|
148
|
+
isClick: false,
|
|
149
|
+
extra: showCalendarPopup ? extraHeader() : null
|
|
150
|
+
}, /*#__PURE__*/React.createElement(CalendarWeek
|
|
151
|
+
// dateChange={(date) => {
|
|
152
|
+
// currentDateChange(date);
|
|
153
|
+
// }}
|
|
154
|
+
, {
|
|
155
|
+
currentDate: currentDate,
|
|
156
|
+
productId: detail === null || detail === void 0 ? void 0 : detail.id,
|
|
157
|
+
cutTime: cutTime
|
|
158
|
+
// getLimitData={getLimitData}
|
|
159
|
+
,
|
|
160
|
+
dateLimitData: dateLimitData
|
|
161
|
+
}), /*#__PURE__*/React.createElement(Status, null)), /*#__PURE__*/React.createElement(CalendarDate, {
|
|
162
|
+
ref: calendarDateRef
|
|
163
|
+
// dateChange={(date: string) => {
|
|
164
|
+
// currentDateChange(date);
|
|
165
|
+
// }}
|
|
166
|
+
,
|
|
167
|
+
cutTime: cutTime,
|
|
168
|
+
dateLimitData: dateLimitData
|
|
169
|
+
// getLimitData={getLimitData}
|
|
170
|
+
// loading={_getProductAvailableCount.loading}
|
|
171
|
+
}));
|
|
172
|
+
};
|
|
173
|
+
export default /*#__PURE__*/forwardRef(SelectDate);
|
package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface BookingAvailabilityCalendarProps {
|
|
4
|
+
showCalendarPopup?: boolean;
|
|
5
|
+
onDateChange?: (date: string) => void;
|
|
6
|
+
detail?: any;
|
|
7
|
+
currentDate?: string;
|
|
8
|
+
cutTime?: any;
|
|
9
|
+
onCurrentDateChange?: (date: string) => void;
|
|
10
|
+
onCutTimeChange?: (date: string) => void;
|
|
11
|
+
onSurplusDisabledChange?: (date: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const BookingAvailabilityCalendar: React.FC<BookingAvailabilityCalendarProps>;
|
|
14
|
+
export default BookingAvailabilityCalendar;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SelectDate from "./components/SelectDate";
|
|
3
|
+
import { mock } from "../../mock";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var BookingAvailabilityCalendar = function BookingAvailabilityCalendar(props) {
|
|
6
|
+
var _mock$availability_ca, _mock$availability_ca2, _mock$availability_ca3;
|
|
7
|
+
var showCalendarPopup = props.showCalendarPopup,
|
|
8
|
+
onDateChange = props.onDateChange,
|
|
9
|
+
_props$detail = props.detail,
|
|
10
|
+
detail = _props$detail === void 0 ? (_mock$availability_ca = mock.availability_calendar) === null || _mock$availability_ca === void 0 ? void 0 : _mock$availability_ca.detail : _props$detail,
|
|
11
|
+
_props$currentDate = props.currentDate,
|
|
12
|
+
currentDate = _props$currentDate === void 0 ? (_mock$availability_ca2 = mock.availability_calendar) === null || _mock$availability_ca2 === void 0 ? void 0 : _mock$availability_ca2.currentDate : _props$currentDate,
|
|
13
|
+
_props$cutTime = props.cutTime,
|
|
14
|
+
cutTime = _props$cutTime === void 0 ? (_mock$availability_ca3 = mock.availability_calendar) === null || _mock$availability_ca3 === void 0 ? void 0 : _mock$availability_ca3.cutTime : _props$cutTime,
|
|
15
|
+
onCurrentDateChange = props.onCurrentDateChange,
|
|
16
|
+
onCutTimeChange = props.onCutTimeChange,
|
|
17
|
+
onSurplusDisabledChange = props.onSurplusDisabledChange;
|
|
18
|
+
console.log(detail, currentDate, cutTime, 'detail, currentDate, cutTime');
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "event-booking-availability-calendar"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(SelectDate, {
|
|
22
|
+
showCalendarPopup: showCalendarPopup,
|
|
23
|
+
detail: detail,
|
|
24
|
+
currentDate: currentDate,
|
|
25
|
+
currentDateChange: function currentDateChange(date) {
|
|
26
|
+
onCurrentDateChange(date);
|
|
27
|
+
if (currentDate !== date) {
|
|
28
|
+
onDateChange(date);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setSurplusDisabledChange: onSurplusDisabledChange,
|
|
32
|
+
cutTime: cutTime,
|
|
33
|
+
setCutTime: onCutTimeChange
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
export default BookingAvailabilityCalendar;
|
package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dayjs } from "dayjs";
|
|
2
|
+
/**
|
|
3
|
+
* @title: 格式化日期
|
|
4
|
+
* @description:
|
|
5
|
+
* @param {string} date
|
|
6
|
+
* @param {string} format
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: WangHan
|
|
9
|
+
* @Date: 2025-01-14 15:19
|
|
10
|
+
*/
|
|
11
|
+
export declare const formatDate: (date: Dayjs | string, format?: string) => string;
|
|
12
|
+
/**
|
|
13
|
+
* @title: 获取列表中包含了几个月
|
|
14
|
+
* @description:
|
|
15
|
+
* @param {Dayjs} date
|
|
16
|
+
* @return {*}
|
|
17
|
+
* @Author: WangHan
|
|
18
|
+
* @Date: 2025-01-14 15:25
|
|
19
|
+
*/
|
|
20
|
+
export declare const getMonthIndex: (lists: any[]) => number[];
|
|
21
|
+
/**
|
|
22
|
+
* @title: 获取当前状态
|
|
23
|
+
* @description:
|
|
24
|
+
* @param {any} dateLimitData
|
|
25
|
+
* @param {any} item
|
|
26
|
+
* @param {any} cutTime
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: WangHan
|
|
29
|
+
* @Date: 2025-01-14 15:33
|
|
30
|
+
*/
|
|
31
|
+
export declare const getCurrentStatus: (dateLimitData: any[], item: any, cutTime: any) => {
|
|
32
|
+
currentStatus: string;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import { getStatus, getCallToBookStatus } from "./components/CalendarDate/state";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title: 格式化日期
|
|
6
|
+
* @description:
|
|
7
|
+
* @param {string} date
|
|
8
|
+
* @param {string} format
|
|
9
|
+
* @return {*}
|
|
10
|
+
* @Author: WangHan
|
|
11
|
+
* @Date: 2025-01-14 15:19
|
|
12
|
+
*/
|
|
13
|
+
export var formatDate = function formatDate(date, format) {
|
|
14
|
+
return dayjs(date).format(format || "YYYY-MM-DD");
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @title: 获取列表中包含了几个月
|
|
19
|
+
* @description:
|
|
20
|
+
* @param {Dayjs} date
|
|
21
|
+
* @return {*}
|
|
22
|
+
* @Author: WangHan
|
|
23
|
+
* @Date: 2025-01-14 15:25
|
|
24
|
+
*/
|
|
25
|
+
export var getMonthIndex = function getMonthIndex(lists) {
|
|
26
|
+
if (!lists.length) return [];
|
|
27
|
+
var arr = [0];
|
|
28
|
+
|
|
29
|
+
// 获取第一个日期的月份
|
|
30
|
+
var firstMonth = formatDate(lists[0], 'YYYY-MM');
|
|
31
|
+
|
|
32
|
+
// 遍历列表,获取每个月份,如果和第一个月份不一样,则添加到数组中
|
|
33
|
+
var index = lists.findIndex(function (item) {
|
|
34
|
+
return formatDate(item, 'YYYY-MM') !== firstMonth;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// 如果找到了,则添加到数组中
|
|
38
|
+
if (index !== -1) {
|
|
39
|
+
arr.push(index);
|
|
40
|
+
}
|
|
41
|
+
return arr;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @title: 获取当前状态
|
|
46
|
+
* @description:
|
|
47
|
+
* @param {any} dateLimitData
|
|
48
|
+
* @param {any} item
|
|
49
|
+
* @param {any} cutTime
|
|
50
|
+
* @return {*}
|
|
51
|
+
* @Author: WangHan
|
|
52
|
+
* @Date: 2025-01-14 15:33
|
|
53
|
+
*/
|
|
54
|
+
export var getCurrentStatus = function getCurrentStatus(dateLimitData, item, cutTime) {
|
|
55
|
+
var _getStatus = getStatus(dateLimitData, item, cutTime),
|
|
56
|
+
status = _getStatus.status,
|
|
57
|
+
disabled = _getStatus.disabled;
|
|
58
|
+
var isShowCallToBook = getCallToBookStatus(item, dateLimitData, cutTime);
|
|
59
|
+
|
|
60
|
+
// 在当天和cut-off time的日期之前这段日期,如果某天还存在可预约的商品,才显示Call to book。
|
|
61
|
+
var statusTypes = ['lots_of_space', 'filling_up_fast'];
|
|
62
|
+
|
|
63
|
+
// 如果显示Call to book,则状态为call_to_book,否则为status
|
|
64
|
+
var _isShowCallToBook = isShowCallToBook && statusTypes.includes(status);
|
|
65
|
+
var currentStatus = _isShowCallToBook ? 'call_to_book' : status;
|
|
66
|
+
return {
|
|
67
|
+
currentStatus: currentStatus,
|
|
68
|
+
disabled: disabled
|
|
69
|
+
};
|
|
70
|
+
};
|