@pisell/private-materials 3.3.76 → 3.3.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/Sales/index.js +37 -4
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +7 -0
- package/es/components/Sales/Resource/serve.js +10 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Date/index.js +24 -14
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.js +8 -14
- package/es/components/appointmentBooking/components/Services/index.js +38 -36
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +13 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +6 -7
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.js +14 -0
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.js +3 -3
- package/es/components/booking/addons/index.js +12 -3
- package/es/components/booking/addons/model.js +5 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +3 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/amount.js +2 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +9 -3
- package/es/components/booking/components/footer/utils.js +74 -36
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +110 -66
- package/es/components/booking/components/voucher/utils.d.ts +4 -0
- package/es/components/booking/components/voucher/utils.js +15 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.js +16 -1
- package/es/components/booking/info/client/index.js +12 -3
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/Lists.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.js +3 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +6 -2
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +9 -4
- package/es/components/booking/info2/serve.d.ts +1 -1
- package/es/components/booking/info2/serve.js +12 -8
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +5 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +5 -2
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/utils.d.ts +1 -1
- package/es/components/booking/info2/utils.js +3 -2
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/es/components/booking/info2/utilsByBooking.js +5 -3
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +4 -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/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/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
- package/es/components/eventBooking/components/Provider/Footer/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/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/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/eventBooking/index.js +21 -7
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +5 -4
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/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/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- 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/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/stepController/components/Content/index.d.ts +7 -0
- package/es/components/stepController/components/Content/index.js +9 -0
- package/es/components/stepController/components/Content/index.less +8 -0
- package/es/components/stepController/components/Footer/index.d.ts +8 -0
- package/es/components/stepController/components/Footer/index.js +15 -0
- package/es/components/stepController/components/Footer/index.less +39 -0
- package/es/components/stepController/components/Header/index.d.ts +20 -0
- package/es/components/stepController/components/Header/index.js +97 -0
- package/es/components/stepController/components/Header/index.less +21 -0
- package/es/components/stepController/index.d.ts +5 -0
- package/es/components/stepController/index.js +64 -0
- package/es/components/stepController/index.less +11 -0
- package/es/components/stepController/locales.d.ts +27 -0
- package/es/components/stepController/locales.js +32 -0
- package/es/components/stepController/types.d.ts +23 -0
- package/es/components/stepController/types.js +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -8
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +124 -3
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +58 -6
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +7 -0
- package/lib/components/Sales/Resource/serve.js +9 -2
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -4
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Date/index.js +12 -5
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.js +2 -3
- package/lib/components/appointmentBooking/components/Services/index.js +19 -18
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +9 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.js +11 -0
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.js +3 -3
- package/lib/components/booking/addons/index.js +12 -2
- package/lib/components/booking/addons/model.js +3 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.js +5 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
- package/lib/components/booking/components/footer/amount.js +2 -1
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +10 -5
- package/lib/components/booking/components/footer/utils.js +48 -12
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +111 -67
- package/lib/components/booking/components/voucher/utils.d.ts +4 -0
- package/lib/components/booking/components/voucher/utils.js +43 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.js +19 -1
- package/lib/components/booking/info/client/index.js +10 -3
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.js +2 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- 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/utils.js +3 -1
- package/lib/components/booking/info/utils.js +1 -3
- package/lib/components/booking/info2/index.js +9 -9
- package/lib/components/booking/info2/serve.d.ts +1 -1
- package/lib/components/booking/info2/serve.js +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +4 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +5 -2
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/utils.d.ts +1 -1
- package/lib/components/booking/info2/utils.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/lib/components/booking/info2/utilsByBooking.js +3 -2
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +6 -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/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/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
- package/lib/components/eventBooking/components/Provider/Footer/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/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/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/eventBooking/index.js +11 -7
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/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/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- 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/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/stepController/components/Content/index.d.ts +7 -0
- package/lib/components/stepController/components/Content/index.js +40 -0
- package/lib/components/stepController/components/Content/index.less +8 -0
- package/lib/components/stepController/components/Footer/index.d.ts +8 -0
- package/lib/components/stepController/components/Footer/index.js +49 -0
- package/lib/components/stepController/components/Footer/index.less +39 -0
- package/lib/components/stepController/components/Header/index.d.ts +20 -0
- package/lib/components/stepController/components/Header/index.js +104 -0
- package/lib/components/stepController/components/Header/index.less +21 -0
- package/lib/components/stepController/index.d.ts +5 -0
- package/lib/components/stepController/index.js +89 -0
- package/lib/components/stepController/index.less +11 -0
- package/lib/components/stepController/locales.d.ts +27 -0
- package/lib/components/stepController/locales.js +50 -0
- package/lib/components/stepController/types.d.ts +23 -0
- package/lib/components/stepController/types.js +17 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +42 -5
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +124 -3
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +48 -5
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { createContext, useRef, useState } from 'react';
|
|
14
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
14
15
|
var defaultData = {};
|
|
15
16
|
var SALES_MODEL_SESSION_STORAGE_KEY = 'shop_h5_sales_model_data';
|
|
16
17
|
export var SalesContext = /*#__PURE__*/createContext({});
|
|
@@ -26,23 +27,55 @@ export var SalesProvider = function SalesProvider(props) {
|
|
|
26
27
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
28
|
hooks = _useState4[0],
|
|
28
29
|
setHooks = _useState4[1];
|
|
30
|
+
var context = useEngineContext();
|
|
31
|
+
var utils = context.appHelper.utils || {};
|
|
29
32
|
var _setData = function _setData(newData) {
|
|
30
33
|
dataRef.current = _objectSpread(_objectSpread({}, dataRef.current), newData);
|
|
31
34
|
console.log('sales_model_newData', dataRef.current);
|
|
32
35
|
if (config !== null && config !== void 0 && config.useSessionStorage) {
|
|
33
|
-
|
|
36
|
+
setSessionStorage();
|
|
34
37
|
}
|
|
35
38
|
setData(_objectSpread({}, dataRef.current));
|
|
36
39
|
};
|
|
37
40
|
var getCurrentData = function getCurrentData() {
|
|
38
41
|
return dataRef.current;
|
|
39
42
|
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @title 设置sessionStorage
|
|
46
|
+
* @description 获取路由参数中的cacheId,并设置到sessionStorage中
|
|
47
|
+
*/
|
|
40
48
|
var setSessionStorage = function setSessionStorage() {
|
|
41
|
-
|
|
49
|
+
var _utils$getHistory, _history$location;
|
|
50
|
+
var history = (utils === null || utils === void 0 || (_utils$getHistory = utils.getHistory) === null || _utils$getHistory === void 0 ? void 0 : _utils$getHistory.call(utils)) || {};
|
|
51
|
+
var cacheId = (history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 || (_history$location = _history$location.query) === null || _history$location === void 0 ? void 0 : _history$location.cacheId) || '';
|
|
52
|
+
var sessionData = _objectSpread(_objectSpread({}, dataRef.current || {}), {}, {
|
|
53
|
+
cacheId: cacheId
|
|
54
|
+
});
|
|
55
|
+
sessionStorage.setItem("".concat(SALES_MODEL_SESSION_STORAGE_KEY), JSON.stringify(sessionData || {}));
|
|
42
56
|
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @title 获取sessionStorage
|
|
60
|
+
* @description 获取路由参数中的cacheId并与sessionStorage中的cacheId进行匹配,如果匹配成功,则返回sessionStorage中的数据
|
|
61
|
+
*/
|
|
43
62
|
var getSessionStorage = function getSessionStorage() {
|
|
44
|
-
var
|
|
45
|
-
|
|
63
|
+
var _utils$getHistory2, _history$location2;
|
|
64
|
+
var history = (utils === null || utils === void 0 || (_utils$getHistory2 = utils.getHistory) === null || _utils$getHistory2 === void 0 ? void 0 : _utils$getHistory2.call(utils)) || {};
|
|
65
|
+
var strResult = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
66
|
+
var result = strResult ? JSON.parse(strResult || '{}') : {};
|
|
67
|
+
var cacheId = (history === null || history === void 0 || (_history$location2 = history.location) === null || _history$location2 === void 0 || (_history$location2 = _history$location2.query) === null || _history$location2 === void 0 ? void 0 : _history$location2.cacheId) || '';
|
|
68
|
+
|
|
69
|
+
// cacheId 为空,且sessionStorage中cacheId也为空,则返回sessionStorage中的数据
|
|
70
|
+
if (!cacheId && !(result !== null && result !== void 0 && result.cacheId)) {
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// cacheId 不为空,需要比对sessionStorage中的cacheId与路由参数中的cacheId是否一致
|
|
75
|
+
if (cacheId && (result === null || result === void 0 ? void 0 : result.cacheId) === cacheId) {
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
return {};
|
|
46
79
|
};
|
|
47
80
|
var removeSessionStorage = function removeSessionStorage() {
|
|
48
81
|
sessionStorage.removeItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
@@ -6,7 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import React, { createContext } from 'react';
|
|
8
8
|
import { useSales } from "../../../businessModel/SalesModel";
|
|
9
|
-
import {
|
|
9
|
+
import { getSpecialResourceListApi } from "./serve";
|
|
10
10
|
import { useRequest } from 'ahooks';
|
|
11
11
|
import { useCart } from "../Cart";
|
|
12
12
|
import { getIamgeFromMedia } from "../utils";
|
|
@@ -73,7 +73,7 @@ export var ResourceProvider = function ResourceProvider(_ref) {
|
|
|
73
73
|
});
|
|
74
74
|
return renderData;
|
|
75
75
|
};
|
|
76
|
-
var getResourceList = useRequest(
|
|
76
|
+
var getResourceList = useRequest(getSpecialResourceListApi, {
|
|
77
77
|
manual: true,
|
|
78
78
|
onSuccess: function onSuccess(res) {
|
|
79
79
|
var formatData = formatResourceList(res);
|
|
@@ -3,3 +3,10 @@ export declare const getResourceListApi: (params: {
|
|
|
3
3
|
shop_id: string;
|
|
4
4
|
form_data_status: string;
|
|
5
5
|
}) => Promise<any>;
|
|
6
|
+
/**
|
|
7
|
+
* @title: 获取特殊资源列表
|
|
8
|
+
* @Author: xiangfeng.xue
|
|
9
|
+
*/
|
|
10
|
+
export declare const getSpecialResourceListApi: (params: {
|
|
11
|
+
event_item_ids?: string | number[];
|
|
12
|
+
}) => Promise<any>;
|
|
@@ -5,4 +5,14 @@ export var getResourceListApi = function getResourceListApi(params) {
|
|
|
5
5
|
return request.getRequest().get('/h5/form/data/v1', params, {
|
|
6
6
|
useCache: true
|
|
7
7
|
});
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @title: 获取特殊资源列表
|
|
12
|
+
* @Author: xiangfeng.xue
|
|
13
|
+
*/
|
|
14
|
+
export var getSpecialResourceListApi = function getSpecialResourceListApi(params) {
|
|
15
|
+
return request.getRequest().get('/h5/eventbookingv2/item/specify-resources', params, {
|
|
16
|
+
useCache: true
|
|
17
|
+
});
|
|
8
18
|
};
|
|
@@ -25,7 +25,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
25
25
|
* @return {*}
|
|
26
26
|
* @Author: xiangfeng.xue
|
|
27
27
|
*/
|
|
28
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
|
28
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
|
29
29
|
/**
|
|
30
30
|
* 计算所有价格明细
|
|
31
31
|
* @param items - 购物车商品数组
|
|
@@ -21,7 +21,7 @@ import Deposit from "../../Deposit";
|
|
|
21
21
|
import { handleAddHolder } from "../utils";
|
|
22
22
|
import "./index.less";
|
|
23
23
|
var CartItem = function CartItem(_ref) {
|
|
24
|
-
var _businessUtils$getApp, _currentStep$step, _currentStep$step2;
|
|
24
|
+
var _businessUtils$getApp, _businessUtils$getApp2, _currentStep$step, _currentStep$step2;
|
|
25
25
|
var onNext = _ref.onNext;
|
|
26
26
|
var appointmentBooking = useAppointmentBooking();
|
|
27
27
|
var _ref2 = useAppointmentBookingContext(),
|
|
@@ -83,6 +83,8 @@ var CartItem = function CartItem(_ref) {
|
|
|
83
83
|
|
|
84
84
|
// 是否安装商品券应用
|
|
85
85
|
var hasGoodPassApp = !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp = businessUtils.getAppByModal) !== null && _businessUtils$getApp !== void 0 && _businessUtils$getApp.call(businessUtils, 'goodpass'));
|
|
86
|
+
// 是否安装折扣卡应用
|
|
87
|
+
var hasDiscountCardApp = !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp2 = businessUtils.getAppByModal) !== null && _businessUtils$getApp2 !== void 0 && _businessUtils$getApp2.call(businessUtils, 'discountcard'));
|
|
86
88
|
var handleClickCard = function handleClickCard(e, type, val) {
|
|
87
89
|
console.log(e, type, val, 'handleClickCard');
|
|
88
90
|
// 更改备注
|
|
@@ -249,7 +251,7 @@ var CartItem = function CartItem(_ref) {
|
|
|
249
251
|
}
|
|
250
252
|
})), /*#__PURE__*/React.createElement("div", {
|
|
251
253
|
className: "appointment-footer"
|
|
252
|
-
}, hasGoodPassApp ? /*#__PURE__*/React.createElement(VoucherCard, {
|
|
254
|
+
}, hasGoodPassApp || hasDiscountCardApp ? /*#__PURE__*/React.createElement(VoucherCard, {
|
|
253
255
|
currentUser: currentUser,
|
|
254
256
|
products: carts
|
|
255
257
|
}) : null, /*#__PURE__*/React.createElement(Total, null), (carts === null || carts === void 0 ? void 0 : carts.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? /*#__PURE__*/React.createElement(Deposit, null) : null, /*#__PURE__*/React.createElement(ContinueButton, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.appointment-cart-item-wrap {
|
|
2
|
-
height: calc(
|
|
2
|
+
height: calc(var(--vh, 1vh) * 100 - 100px);
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
align-items: start;
|
|
41
41
|
|
|
42
|
-
>div {
|
|
42
|
+
> div {
|
|
43
43
|
display: flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
@@ -105,4 +105,4 @@
|
|
|
105
105
|
flex: none;
|
|
106
106
|
z-index: 10;
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
|
@@ -13,7 +13,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
13
|
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; }
|
|
14
14
|
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; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
import React, { useState, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
16
|
+
import React, { useState, useEffect, useMemo, forwardRef, useImperativeHandle, useRef } from 'react';
|
|
17
17
|
import { Skeleton } from 'antd';
|
|
18
18
|
import Dayjs from 'dayjs';
|
|
19
19
|
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
|
@@ -29,6 +29,7 @@ import { localeTypes } from "./state";
|
|
|
29
29
|
import "./index.less";
|
|
30
30
|
var Date = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
31
|
var _context$engine2, _Dayjs$locale;
|
|
32
|
+
var isFetchingDates = useRef(false);
|
|
32
33
|
var _useState = useState(false),
|
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
35
|
loading = _useState2[0],
|
|
@@ -223,7 +224,7 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
223
224
|
}();
|
|
224
225
|
var getDates = /*#__PURE__*/function () {
|
|
225
226
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(date) {
|
|
226
|
-
var startDate, endDate, params, data, selected, _selected$,
|
|
227
|
+
var startDate, endDate, params, data, firstAvailableDate, nextMonthDate, selected, _selected$, baseMonthData, updatedDates;
|
|
227
228
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
228
229
|
while (1) switch (_context4.prev = _context4.next) {
|
|
229
230
|
case 0:
|
|
@@ -238,19 +239,29 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
238
239
|
return getDateData(params);
|
|
239
240
|
case 6:
|
|
240
241
|
data = _context4.sent;
|
|
241
|
-
|
|
242
|
+
firstAvailableDate = (data || []).find(function (d) {
|
|
243
|
+
return d.status === 'available';
|
|
244
|
+
}); // 如果当前月没有可用日期,并且这是第一次尝试,则自动查询下一个月
|
|
245
|
+
if (!(!firstAvailableDate && !isFetchingDates.current)) {
|
|
246
|
+
_context4.next = 14;
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
isFetchingDates.current = true;
|
|
250
|
+
nextMonthDate = Dayjs(date).add(1, 'month');
|
|
251
|
+
setCurrentMonth(nextMonthDate);
|
|
252
|
+
setLoading(true);
|
|
253
|
+
return _context4.abrupt("return");
|
|
254
|
+
case 14:
|
|
255
|
+
_context4.next = 16;
|
|
242
256
|
return appointmentBooking.getDateRange();
|
|
243
|
-
case
|
|
257
|
+
case 16:
|
|
244
258
|
selected = _context4.sent;
|
|
245
259
|
console.log(data, selected, customPageId, 'getDates');
|
|
246
260
|
if ((selected === null || selected === void 0 ? void 0 : selected.length) > 0) {
|
|
247
261
|
setCurrentDate(selected === null || selected === void 0 || (_selected$ = selected[0]) === null || _selected$ === void 0 ? void 0 : _selected$.date);
|
|
248
262
|
} else if (!isDateSelectedFirst) {
|
|
249
263
|
// 当前月则默认选中当前第一个可用的
|
|
250
|
-
if (date.format('YYYY-MM') === Dayjs().format('YYYY-MM')) {
|
|
251
|
-
firstAvailableDate = (data || []).find(function (d) {
|
|
252
|
-
return d.status === 'available';
|
|
253
|
-
});
|
|
264
|
+
if (date.format('YYYY-MM') === Dayjs().format('YYYY-MM') || isFetchingDates.current) {
|
|
254
265
|
if (firstAvailableDate) {
|
|
255
266
|
setCurrentDate(firstAvailableDate === null || firstAvailableDate === void 0 ? void 0 : firstAvailableDate.date);
|
|
256
267
|
appointmentBooking.setDateRange([firstAvailableDate]);
|
|
@@ -273,19 +284,18 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
273
284
|
});
|
|
274
285
|
setLoading(false);
|
|
275
286
|
setDateMonthList(updatedDates);
|
|
276
|
-
_context4.next =
|
|
287
|
+
_context4.next = 29;
|
|
277
288
|
break;
|
|
278
|
-
case
|
|
279
|
-
_context4.prev =
|
|
289
|
+
case 25:
|
|
290
|
+
_context4.prev = 25;
|
|
280
291
|
_context4.t0 = _context4["catch"](0);
|
|
281
292
|
setLoading(false);
|
|
282
293
|
setDateMonthList([]);
|
|
283
|
-
|
|
284
|
-
case 23:
|
|
294
|
+
case 29:
|
|
285
295
|
case "end":
|
|
286
296
|
return _context4.stop();
|
|
287
297
|
}
|
|
288
|
-
}, _callee4, null, [[0,
|
|
298
|
+
}, _callee4, null, [[0, 25]]);
|
|
289
299
|
}));
|
|
290
300
|
return function getDates(_x2) {
|
|
291
301
|
return _ref4.apply(this, arguments);
|
|
@@ -71,7 +71,7 @@ var Header = function Header() {
|
|
|
71
71
|
var handleBack = /*#__PURE__*/function () {
|
|
72
72
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
73
73
|
var _currentStep$step4;
|
|
74
|
-
var key, types,
|
|
74
|
+
var key, types, form_key, booking_form, prevStepData, currentStepData, _key;
|
|
75
75
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
76
|
while (1) switch (_context.prev = _context.next) {
|
|
77
77
|
case 0:
|
|
@@ -91,19 +91,13 @@ var Header = function Header() {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// 3. 清空商品
|
|
94
|
-
if (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
_context.next = 8;
|
|
100
|
-
return checkProductType(carts === null || carts === void 0 || (_carts$ = carts[0]) === null || _carts$ === void 0 ? void 0 : _carts$.id);
|
|
101
|
-
case 8:
|
|
102
|
-
type = _context.sent;
|
|
103
|
-
if (type === 'duration') {
|
|
104
|
-
appointmentBooking.deleteCartItemInfo('time');
|
|
94
|
+
if (key === 'select-service') {
|
|
95
|
+
appointmentBooking.clearCart();
|
|
96
|
+
if (appointmentBooking.isCartHasDurationProduct()) {
|
|
97
|
+
appointmentBooking.deleteCartItemInfo('time');
|
|
98
|
+
}
|
|
105
99
|
}
|
|
106
|
-
|
|
100
|
+
|
|
107
101
|
// 4. 清理本地状态
|
|
108
102
|
if (key === 'select-time') {
|
|
109
103
|
setTimes([]);
|
|
@@ -165,7 +159,7 @@ var Header = function Header() {
|
|
|
165
159
|
// isSkip: false,
|
|
166
160
|
// });
|
|
167
161
|
// }
|
|
168
|
-
case
|
|
162
|
+
case 13:
|
|
169
163
|
case "end":
|
|
170
164
|
return _context.stop();
|
|
171
165
|
}
|
|
@@ -85,9 +85,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
85
85
|
return checkProductType(item === null || item === void 0 ? void 0 : item.id);
|
|
86
86
|
case 4:
|
|
87
87
|
type = _context2.sent;
|
|
88
|
-
|
|
89
|
-
appointmentBooking.openProductDetail(item.id);
|
|
90
|
-
}
|
|
88
|
+
appointmentBooking.openProductDetail(item.id);
|
|
91
89
|
case 6:
|
|
92
90
|
utils === null || utils === void 0 || utils.action({
|
|
93
91
|
type: 'pisell1.productDetail',
|
|
@@ -101,10 +99,17 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
101
99
|
},
|
|
102
100
|
callback: function () {
|
|
103
101
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
104
|
-
var product, session, startDate, endDate, _data$origin, resources, activeStatus, index, description;
|
|
102
|
+
var product, session, startDate, endDate, _data$origin, resources, activeStatus, index, _useAppointmentBookin4, stepList, hasResourceStep, description;
|
|
105
103
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
106
104
|
while (1) switch (_context.prev = _context.next) {
|
|
107
105
|
case 0:
|
|
106
|
+
if (!data.isCancel) {
|
|
107
|
+
_context.next = 3;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
appointmentBooking.closeProductDetail();
|
|
111
|
+
return _context.abrupt("return");
|
|
112
|
+
case 3:
|
|
108
113
|
product = _objectSpread(_objectSpread({}, data), {}, {
|
|
109
114
|
options: (data === null || data === void 0 ? void 0 : data.option) || []
|
|
110
115
|
});
|
|
@@ -112,31 +117,21 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
112
117
|
|
|
113
118
|
// 零售模版,直接加入购物车
|
|
114
119
|
if (!isRetailTemplate) {
|
|
115
|
-
_context.next =
|
|
120
|
+
_context.next = 10;
|
|
116
121
|
break;
|
|
117
122
|
}
|
|
118
123
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
119
|
-
_context.next =
|
|
124
|
+
_context.next = 8;
|
|
120
125
|
break;
|
|
121
126
|
}
|
|
122
127
|
return _context.abrupt("return");
|
|
123
|
-
case
|
|
128
|
+
case 8:
|
|
124
129
|
appointmentBooking.storeProduct(product);
|
|
125
130
|
return _context.abrupt("return");
|
|
126
|
-
case 7:
|
|
127
|
-
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
128
|
-
_context.next = 10;
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
if (type === 'session') {
|
|
132
|
-
appointmentBooking.closeProductDetail();
|
|
133
|
-
appointmentBooking.getAvailableDate();
|
|
134
|
-
}
|
|
135
|
-
return _context.abrupt("return");
|
|
136
131
|
case 10:
|
|
137
132
|
session = data === null || data === void 0 ? void 0 : data.session;
|
|
138
133
|
if (!session) {
|
|
139
|
-
_context.next =
|
|
134
|
+
_context.next = 19;
|
|
140
135
|
break;
|
|
141
136
|
}
|
|
142
137
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
|
@@ -148,45 +143,52 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
148
143
|
endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
|
|
149
144
|
}
|
|
150
145
|
});
|
|
151
|
-
|
|
152
|
-
_context.next = 18;
|
|
146
|
+
_context.next = 17;
|
|
153
147
|
return appointmentBooking.getAvailableDate({
|
|
154
148
|
startDate: startDate,
|
|
155
149
|
endDate: endDate
|
|
156
150
|
});
|
|
157
|
-
case
|
|
158
|
-
_context.next =
|
|
151
|
+
case 17:
|
|
152
|
+
_context.next = 27;
|
|
159
153
|
break;
|
|
160
|
-
case
|
|
154
|
+
case 19:
|
|
161
155
|
resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
|
|
162
156
|
activeStatus = resources.find(function (item) {
|
|
163
157
|
return item.status === 1;
|
|
164
158
|
});
|
|
165
159
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
|
166
|
-
_context.next =
|
|
160
|
+
_context.next = 23;
|
|
167
161
|
break;
|
|
168
162
|
}
|
|
169
163
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
|
170
|
-
case
|
|
164
|
+
case 23:
|
|
171
165
|
appointmentBooking.storeProduct(product);
|
|
172
|
-
// duration
|
|
166
|
+
// duration 类型的商品,要获取一下资源,在先选日期的 duration 步骤里目前只能通过这个动作拉取
|
|
173
167
|
if (!(type === 'duration')) {
|
|
174
|
-
_context.next =
|
|
168
|
+
_context.next = 27;
|
|
175
169
|
break;
|
|
176
170
|
}
|
|
177
|
-
_context.next =
|
|
171
|
+
_context.next = 27;
|
|
178
172
|
return appointmentBooking.getAvailableDate();
|
|
179
|
-
case
|
|
173
|
+
case 27:
|
|
174
|
+
appointmentBooking.closeProductDetail();
|
|
175
|
+
|
|
180
176
|
// 先选择日期流程
|
|
181
177
|
if (isDateSelectedFirst) {
|
|
182
178
|
index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
|
|
183
|
-
if (type === 'duration') {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
179
|
+
if (type === 'duration' || appointmentBooking.isCartHasDurationProduct()) {
|
|
180
|
+
_useAppointmentBookin4 = useAppointmentBookingStep(), stepList = _useAppointmentBookin4.stepList;
|
|
181
|
+
hasResourceStep = stepList === null || stepList === void 0 ? void 0 : stepList.find(function (item) {
|
|
182
|
+
return (item === null || item === void 0 ? void 0 : item.key) === "select-resource";
|
|
183
|
+
});
|
|
184
|
+
if (hasResourceStep) {
|
|
185
|
+
description = locales.getText('pisell2.appointment.select.time');
|
|
186
|
+
appointmentBooking.addStep({
|
|
187
|
+
index: index,
|
|
188
|
+
key: 'select-time',
|
|
189
|
+
description: description
|
|
190
|
+
}, 'select-resource');
|
|
191
|
+
}
|
|
190
192
|
} else {
|
|
191
193
|
removeStep('select-time');
|
|
192
194
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2
6
|
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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
7
|
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
8
|
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); }); }; }
|
|
@@ -76,6 +80,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
76
80
|
return !!item.isAvailable;
|
|
77
81
|
}).map(function (discount) {
|
|
78
82
|
return _objectSpread(_objectSpread({}, discount), {}, {
|
|
83
|
+
isDisabled: discount.isDisabled || discount.isDisabledForProductUsed,
|
|
79
84
|
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
|
|
80
85
|
});
|
|
81
86
|
});
|
|
@@ -121,6 +126,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
121
126
|
});
|
|
122
127
|
pisellos.effects.on('appointmentBooking_cart:onAddItem', onCartChange);
|
|
123
128
|
pisellos.effects.on('appointmentBooking_cart:onUpdateQuotationPrice', onCartChange);
|
|
129
|
+
pisellos.effects.on('appointmentBooking_cart:onUpdateCartItemNums', onCartChange);
|
|
124
130
|
pisellos.effects.on('appointmentBooking_cart:onRemoveItem', onCartChange);
|
|
125
131
|
pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, function (discount) {
|
|
126
132
|
console.log(discount, 'discountChange');
|
|
@@ -187,6 +193,11 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
187
193
|
}
|
|
188
194
|
}, locales.getText('pisell2.text.goodpass.login')), /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.text.goodpass.login-tip'))));
|
|
189
195
|
};
|
|
196
|
+
var mixedSort = function mixedSort(val) {
|
|
197
|
+
return _toConsumableArray(val).sort(function (a, b) {
|
|
198
|
+
return Number(b === null || b === void 0 ? void 0 : b.isSelected) - Number(a === null || a === void 0 ? void 0 : a.isSelected);
|
|
199
|
+
});
|
|
200
|
+
};
|
|
190
201
|
var renderVoucherInfo = function renderVoucherInfo() {
|
|
191
202
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
192
203
|
className: "voucher-title"
|
|
@@ -211,6 +222,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
211
222
|
width: '100%'
|
|
212
223
|
},
|
|
213
224
|
dataSource: availableData,
|
|
225
|
+
mixedSort: mixedSort,
|
|
214
226
|
onChange: function onChange(val) {
|
|
215
227
|
var detail = shopDiscount.setDiscountSelected({
|
|
216
228
|
discountId: val.id,
|
|
@@ -228,6 +240,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
228
240
|
}
|
|
229
241
|
}, locales.getText('pisell2.text.goodpass.code'), ":"), /*#__PURE__*/React.createElement(PisellInput, {
|
|
230
242
|
value: code,
|
|
243
|
+
allowClear: true,
|
|
231
244
|
onChange: function onChange(e) {
|
|
232
245
|
var _e$target;
|
|
233
246
|
setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
@@ -63,23 +63,22 @@ var DepositModal = function DepositModal(props) {
|
|
|
63
63
|
data = _yield$appointmentBoo.data;
|
|
64
64
|
setPolicy(data);
|
|
65
65
|
onChange && onChange(data);
|
|
66
|
-
_context.next =
|
|
66
|
+
_context.next = 14;
|
|
67
67
|
break;
|
|
68
68
|
case 10:
|
|
69
69
|
_context.prev = 10;
|
|
70
70
|
_context.t0 = _context["catch"](1);
|
|
71
71
|
console.log(_context.t0);
|
|
72
72
|
onChange && onChange(_context.t0);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
_context.prev = 15;
|
|
73
|
+
case 14:
|
|
74
|
+
_context.prev = 14;
|
|
76
75
|
setLoading(false);
|
|
77
|
-
return _context.finish(
|
|
78
|
-
case
|
|
76
|
+
return _context.finish(14);
|
|
77
|
+
case 17:
|
|
79
78
|
case "end":
|
|
80
79
|
return _context.stop();
|
|
81
80
|
}
|
|
82
|
-
}, _callee, null, [[1, 10,
|
|
81
|
+
}, _callee, null, [[1, 10, 14, 17]]);
|
|
83
82
|
}));
|
|
84
83
|
return function getPolicy(_x) {
|
|
85
84
|
return _ref.apply(this, arguments);
|