@pisell/private-materials 3.2.22 → 3.2.25
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 +8 -8
- package/es/components/appointmentBooking/assets/guests.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +134 -105
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +43 -21
- package/es/components/appointmentBooking/components/Cart/Item/index.less +14 -9
- package/es/components/appointmentBooking/components/Cart/index.js +3 -2
- package/es/components/appointmentBooking/components/Cart/index.less +1 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +25 -13
- package/es/components/appointmentBooking/components/Content/index.less +15 -0
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Date/index.js +50 -33
- package/es/components/appointmentBooking/components/Date/index.less +11 -0
- package/es/components/appointmentBooking/components/Footer/index.js +7 -2
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
- package/es/components/appointmentBooking/components/Guest/index.js +25 -18
- package/es/components/appointmentBooking/components/Guest/index.less +3 -3
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +50 -8
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +19 -29
- package/es/components/appointmentBooking/components/Resource/index.less +5 -1
- package/es/components/appointmentBooking/components/Services/index.js +7 -9
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +55 -35
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +38 -28
- package/es/components/appointmentBooking/context.d.ts +2 -0
- package/es/components/appointmentBooking/context.js +7 -1
- package/es/components/appointmentBooking/hooks.d.ts +49 -10
- package/es/components/appointmentBooking/hooks.js +191 -134
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +12 -8
- package/es/components/appointmentBooking/locales.d.ts +36 -0
- package/es/components/appointmentBooking/locales.js +36 -0
- package/es/components/appointmentBooking/utils.d.ts +28 -0
- package/es/components/appointmentBooking/utils.js +86 -2
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +15 -15
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.d.ts +1 -1
- package/es/components/booking/components/voucher/index.js +39 -37
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +0 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +3 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/assets/guests.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +68 -32
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +36 -13
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +14 -9
- package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
- package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +11 -7
- package/lib/components/appointmentBooking/components/Content/index.less +15 -0
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Date/index.js +80 -68
- package/lib/components/appointmentBooking/components/Date/index.less +11 -0
- package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +24 -6
- package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +31 -4
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +16 -21
- package/lib/components/appointmentBooking/components/Resource/index.less +5 -1
- package/lib/components/appointmentBooking/components/Services/index.js +9 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +33 -23
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +30 -24
- package/lib/components/appointmentBooking/context.d.ts +2 -0
- package/lib/components/appointmentBooking/context.js +4 -1
- package/lib/components/appointmentBooking/hooks.d.ts +49 -10
- package/lib/components/appointmentBooking/hooks.js +49 -50
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +11 -7
- package/lib/components/appointmentBooking/locales.d.ts +36 -0
- package/lib/components/appointmentBooking/locales.js +36 -0
- package/lib/components/appointmentBooking/utils.d.ts +28 -0
- package/lib/components/appointmentBooking/utils.js +48 -2
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +1 -15
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +1 -1
- package/lib/components/booking/components/voucher/index.js +31 -25
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +0 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -13,11 +13,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
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; }
|
|
14
14
|
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); } }
|
|
15
15
|
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); }); }; }
|
|
16
|
+
import { useState, useEffect } from 'react';
|
|
16
17
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
17
18
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
18
|
-
import { getUniqueId } from "@pisell/utils";
|
|
19
19
|
import { sortResources } from "./utils";
|
|
20
|
-
import { useState, useEffect } from 'react';
|
|
21
20
|
import { useAppointmentBookingContext } from "./context";
|
|
22
21
|
export var useAppointmentBooking = function useAppointmentBooking() {
|
|
23
22
|
var pisellOS = usePisellOS();
|
|
@@ -27,6 +26,14 @@ export var useShopDiscount = function useShopDiscount() {
|
|
|
27
26
|
var pisellOS = usePisellOS();
|
|
28
27
|
return pisellOS.getModule('shopDiscount');
|
|
29
28
|
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @title: 监听步骤发生变化
|
|
32
|
+
* @description:
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: WangHan
|
|
35
|
+
* @Date: 2025-04-15 11:11
|
|
36
|
+
*/
|
|
30
37
|
export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
31
38
|
var _appointmentBooking$s;
|
|
32
39
|
var pisellOS = usePisellOS();
|
|
@@ -34,23 +41,21 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
34
41
|
appointmentBooking = _useAppointmentBookin.appointmentBooking,
|
|
35
42
|
setCurrentStep = _useAppointmentBookin.setCurrentStep,
|
|
36
43
|
setIsLastStep = _useAppointmentBookin.setIsLastStep;
|
|
37
|
-
// const appointmentBooking = useAppointmentBooking();
|
|
38
44
|
var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList) || [];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
var getCurrentAndLastStep = function getCurrentAndLastStep() {
|
|
46
|
+
var _currentStep = appointmentBooking.getCurrentStep();
|
|
47
|
+
setCurrentStep(_currentStep);
|
|
48
|
+
setIsLastStep((_currentStep === null || _currentStep === void 0 ? void 0 : _currentStep.index) === stepList.length - 1);
|
|
49
|
+
};
|
|
43
50
|
useEffect(function () {
|
|
51
|
+
getCurrentAndLastStep();
|
|
44
52
|
pisellOS.effects.on('appointmentBooking_step:changed', /*#__PURE__*/function () {
|
|
45
53
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
46
|
-
var _currentStep;
|
|
47
54
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
48
55
|
while (1) switch (_context.prev = _context.next) {
|
|
49
56
|
case 0:
|
|
50
57
|
if (res.path === 'currentStep') {
|
|
51
|
-
|
|
52
|
-
setCurrentStep(_currentStep);
|
|
53
|
-
setIsLastStep((_currentStep === null || _currentStep === void 0 ? void 0 : _currentStep.index) === stepList.length - 1);
|
|
58
|
+
getCurrentAndLastStep();
|
|
54
59
|
}
|
|
55
60
|
case 1:
|
|
56
61
|
case "end":
|
|
@@ -64,75 +69,102 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
64
69
|
}());
|
|
65
70
|
}, []);
|
|
66
71
|
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @title: 获取商品数据
|
|
75
|
+
* @description:
|
|
76
|
+
* @return {*}
|
|
77
|
+
* @Author: WangHan
|
|
78
|
+
* @Date: 2025-04-15 11:12
|
|
79
|
+
*/
|
|
67
80
|
export var useAppointmentBookingProduct = function useAppointmentBookingProduct() {
|
|
68
81
|
var _useAppointmentBookin2 = useAppointmentBookingContext(),
|
|
69
82
|
appointmentBooking = _useAppointmentBookin2.appointmentBooking,
|
|
70
83
|
setProducts = _useAppointmentBookin2.setProducts;
|
|
71
|
-
// const [products, setProducts] = useState<any>([]);
|
|
72
84
|
var productModuleParams = appointmentBooking.otherParams.productModuleParams;
|
|
73
85
|
useEffect(function () {
|
|
74
86
|
appointmentBooking.loadProducts(productModuleParams).then(function (res) {
|
|
75
|
-
console.log(res, 'loadProductsloadProducts');
|
|
76
87
|
setProducts(res || []);
|
|
77
88
|
});
|
|
78
89
|
}, []);
|
|
79
90
|
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @title: 更新购物车数据
|
|
94
|
+
* @description:
|
|
95
|
+
* @return {*}
|
|
96
|
+
* @Author: WangHan
|
|
97
|
+
* @Date: 2025-04-15 11:12
|
|
98
|
+
*/
|
|
80
99
|
export var useAppointmentBookingCart = function useAppointmentBookingCart() {
|
|
81
|
-
var _appointmentBooking$s2;
|
|
82
100
|
var pisellOS = usePisellOS();
|
|
83
101
|
var _useAppointmentBookin3 = useAppointmentBookingContext(),
|
|
84
102
|
appointmentBooking = _useAppointmentBookin3.appointmentBooking,
|
|
85
103
|
setCarts = _useAppointmentBookin3.setCarts,
|
|
86
104
|
setSummary = _useAppointmentBookin3.setSummary;
|
|
87
|
-
var
|
|
105
|
+
var getCartAndSummary = /*#__PURE__*/function () {
|
|
106
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
107
|
+
var carts, summary;
|
|
108
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
109
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_context2.next = 2;
|
|
112
|
+
return appointmentBooking.getCart();
|
|
113
|
+
case 2:
|
|
114
|
+
carts = _context2.sent;
|
|
115
|
+
setCarts(carts || []);
|
|
116
|
+
_context2.next = 6;
|
|
117
|
+
return appointmentBooking.getSummary();
|
|
118
|
+
case 6:
|
|
119
|
+
summary = _context2.sent;
|
|
120
|
+
setSummary(summary || {});
|
|
121
|
+
console.log(carts, summary, 'appointmentBooking_cart:changed');
|
|
122
|
+
case 9:
|
|
123
|
+
case "end":
|
|
124
|
+
return _context2.stop();
|
|
125
|
+
}
|
|
126
|
+
}, _callee2);
|
|
127
|
+
}));
|
|
128
|
+
return function getCartAndSummary() {
|
|
129
|
+
return _ref2.apply(this, arguments);
|
|
130
|
+
};
|
|
131
|
+
}();
|
|
88
132
|
useEffect(function () {
|
|
89
|
-
|
|
90
|
-
pisellOS.effects.on('appointmentBooking_cart:changed', /*#__PURE__*/function () {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_context2.next = 6;
|
|
102
|
-
return appointmentBooking.getSummary();
|
|
103
|
-
case 6:
|
|
104
|
-
summary = _context2.sent;
|
|
105
|
-
setSummary(summary || {});
|
|
106
|
-
console.log(carts, summary, 'appointmentBooking_cart:changed');
|
|
107
|
-
case 9:
|
|
108
|
-
case "end":
|
|
109
|
-
return _context2.stop();
|
|
110
|
-
}
|
|
111
|
-
}, _callee2);
|
|
112
|
-
}));
|
|
113
|
-
return function (_x2) {
|
|
114
|
-
return _ref2.apply(this, arguments);
|
|
115
|
-
};
|
|
116
|
-
}());
|
|
117
|
-
appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$g = appointmentBooking.getCart) === null || _appointmentBooking$g === void 0 || _appointmentBooking$g.call(appointmentBooking).then(function (data) {
|
|
118
|
-
setCarts(data || []);
|
|
119
|
-
});
|
|
133
|
+
getCartAndSummary();
|
|
134
|
+
pisellOS.effects.on('appointmentBooking_cart:changed', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
135
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
136
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
137
|
+
case 0:
|
|
138
|
+
getCartAndSummary();
|
|
139
|
+
case 1:
|
|
140
|
+
case "end":
|
|
141
|
+
return _context3.stop();
|
|
142
|
+
}
|
|
143
|
+
}, _callee3);
|
|
144
|
+
})));
|
|
120
145
|
}, []);
|
|
121
|
-
return {
|
|
122
|
-
cart: cart
|
|
123
|
-
};
|
|
124
146
|
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @title: 获取登录状态
|
|
150
|
+
* @description:
|
|
151
|
+
* @return {*}
|
|
152
|
+
* @Author: WangHan
|
|
153
|
+
* @Date: 2025-04-15 11:14
|
|
154
|
+
*/
|
|
125
155
|
export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
|
|
126
156
|
var _utils$token, _utils$token$get;
|
|
127
157
|
var context = useEngineContext();
|
|
128
158
|
var utils = context.appHelper.utils || {};
|
|
129
159
|
var isLogin = !!(utils !== null && utils !== void 0 && (_utils$token = utils.token) !== null && _utils$token !== void 0 && (_utils$token$get = _utils$token.get) !== null && _utils$token$get !== void 0 && _utils$token$get.call(_utils$token));
|
|
130
160
|
var openLoginModal = function openLoginModal(params) {
|
|
131
|
-
var
|
|
132
|
-
callback =
|
|
161
|
+
var _ref4 = params || {},
|
|
162
|
+
callback = _ref4.callback;
|
|
133
163
|
utils.action({
|
|
134
164
|
type: 'pisell1.login',
|
|
135
|
-
data: {
|
|
165
|
+
data: {
|
|
166
|
+
type: 'plugin'
|
|
167
|
+
},
|
|
136
168
|
callback: callback
|
|
137
169
|
});
|
|
138
170
|
};
|
|
@@ -141,55 +173,77 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
|
|
|
141
173
|
openLoginModal: openLoginModal
|
|
142
174
|
};
|
|
143
175
|
};
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @title: 获取账户
|
|
179
|
+
* @description:
|
|
180
|
+
* @return {*}
|
|
181
|
+
* @Author: WangHan
|
|
182
|
+
* @Date: 2025-04-15 11:15
|
|
183
|
+
*/
|
|
144
184
|
export var useAppointmentBookingAccount = function useAppointmentBookingAccount() {
|
|
145
|
-
var _utils$getStore$getSt, _userInfo, _userInfo2, _userInfo3, _currentUserName, _userInfo4, _userInfo5;
|
|
146
185
|
var pisellOS = usePisellOS();
|
|
147
|
-
var context = useEngineContext();
|
|
148
|
-
var utils = context.appHelper.utils || {};
|
|
149
186
|
var appointmentBooking = useAppointmentBooking();
|
|
150
187
|
var _useState = useState([]),
|
|
151
188
|
_useState2 = _slicedToArray(_useState, 2),
|
|
152
189
|
accountLists = _useState2[0],
|
|
153
190
|
setAccountLists = _useState2[1];
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
191
|
+
var getAccountLists = /*#__PURE__*/function () {
|
|
192
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
193
|
+
var data;
|
|
194
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
195
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
196
|
+
case 0:
|
|
197
|
+
_context4.next = 2;
|
|
198
|
+
return appointmentBooking.getAccounts();
|
|
199
|
+
case 2:
|
|
200
|
+
data = _context4.sent;
|
|
201
|
+
console.log('appointmentBooking_accountList:changed', data);
|
|
202
|
+
setAccountLists(data || []);
|
|
203
|
+
case 5:
|
|
204
|
+
case "end":
|
|
205
|
+
return _context4.stop();
|
|
206
|
+
}
|
|
207
|
+
}, _callee4);
|
|
208
|
+
}));
|
|
209
|
+
return function getAccountLists() {
|
|
210
|
+
return _ref5.apply(this, arguments);
|
|
211
|
+
};
|
|
212
|
+
}();
|
|
163
213
|
useEffect(function () {
|
|
214
|
+
getAccountLists();
|
|
164
215
|
pisellOS.effects.on('appointmentBooking_accountList:changed', /*#__PURE__*/function () {
|
|
165
|
-
var
|
|
166
|
-
return _regeneratorRuntime().wrap(function
|
|
167
|
-
while (1) switch (
|
|
216
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(res) {
|
|
217
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
218
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
168
219
|
case 0:
|
|
169
220
|
if (res.path === 'accounts') {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
});
|
|
221
|
+
console.log('appointmentBooking_accountList:changed', res);
|
|
222
|
+
getAccountLists();
|
|
173
223
|
}
|
|
174
224
|
case 1:
|
|
175
225
|
case "end":
|
|
176
|
-
return
|
|
226
|
+
return _context5.stop();
|
|
177
227
|
}
|
|
178
|
-
},
|
|
228
|
+
}, _callee5);
|
|
179
229
|
}));
|
|
180
|
-
return function (
|
|
181
|
-
return
|
|
230
|
+
return function (_x2) {
|
|
231
|
+
return _ref6.apply(this, arguments);
|
|
182
232
|
};
|
|
183
233
|
}());
|
|
184
|
-
appointmentBooking.getAccounts().then(function (data) {
|
|
185
|
-
setAccountLists(data || []);
|
|
186
|
-
});
|
|
187
234
|
}, []);
|
|
188
235
|
return {
|
|
189
|
-
currentUser: currentUser,
|
|
190
236
|
accountLists: accountLists
|
|
191
237
|
};
|
|
192
238
|
};
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @title: 获取资源数据
|
|
242
|
+
* @description:
|
|
243
|
+
* @return {*}
|
|
244
|
+
* @Author: WangHan
|
|
245
|
+
* @Date: 2025-04-15 11:29
|
|
246
|
+
*/
|
|
193
247
|
export var useAppointmentBookingResource = function useAppointmentBookingResource() {
|
|
194
248
|
var _useAppointmentBookin4 = useAppointmentBookingContext(),
|
|
195
249
|
appointmentBooking = _useAppointmentBookin4.appointmentBooking,
|
|
@@ -197,80 +251,83 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
|
|
|
197
251
|
setTimes = _useAppointmentBookin4.setTimes,
|
|
198
252
|
setResourceOtherParams = _useAppointmentBookin4.setResourceOtherParams,
|
|
199
253
|
resourceOtherParams = _useAppointmentBookin4.resourceOtherParams;
|
|
200
|
-
var
|
|
201
|
-
resourceSort =
|
|
202
|
-
console.log(appointmentBooking, 'appointmentBooking22');
|
|
254
|
+
var _ref7 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
|
|
255
|
+
resourceSort = _ref7.resourceSort;
|
|
203
256
|
|
|
204
|
-
//
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}));
|
|
222
|
-
return function getResourceTimeSlot(_x4) {
|
|
223
|
-
return _ref6.apply(this, arguments);
|
|
257
|
+
// 设置资源列表
|
|
258
|
+
var getResourceList = function getResourceList() {
|
|
259
|
+
var _resources2;
|
|
260
|
+
var resources = appointmentBooking.getResourcesList();
|
|
261
|
+
resources = resources.map(function (item) {
|
|
262
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
263
|
+
resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
var _resources = ((_resources2 = resources) === null || _resources2 === void 0 || (_resources2 = _resources2[0]) === null || _resources2 === void 0 ? void 0 : _resources2.resources) || [];
|
|
267
|
+
var resourceCodes = _resources.map(function (item) {
|
|
268
|
+
return item.code;
|
|
269
|
+
});
|
|
270
|
+
setResources(resources || []);
|
|
271
|
+
return {
|
|
272
|
+
resources: resources,
|
|
273
|
+
resourceCodes: resourceCodes
|
|
224
274
|
};
|
|
225
|
-
}
|
|
275
|
+
};
|
|
226
276
|
|
|
227
|
-
//
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
return _regeneratorRuntime().wrap(function
|
|
232
|
-
while (1) switch (
|
|
277
|
+
// 设置时间切片
|
|
278
|
+
var getResourceTimeSlot = /*#__PURE__*/function () {
|
|
279
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(index) {
|
|
280
|
+
var _getResourceList, resourceCodes, code, data;
|
|
281
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
282
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
233
283
|
case 0:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
setResources(resources || []);
|
|
241
|
-
return _context5.abrupt("return", resources);
|
|
284
|
+
_getResourceList = getResourceList(), resourceCodes = _getResourceList.resourceCodes;
|
|
285
|
+
code = resourceCodes === null || resourceCodes === void 0 ? void 0 : resourceCodes[index || 0];
|
|
286
|
+
_context6.next = 4;
|
|
287
|
+
return appointmentBooking.getTimeSlotByAllResources(code);
|
|
242
288
|
case 4:
|
|
289
|
+
data = _context6.sent;
|
|
290
|
+
setTimes(data || []);
|
|
291
|
+
case 6:
|
|
243
292
|
case "end":
|
|
244
|
-
return
|
|
293
|
+
return _context6.stop();
|
|
245
294
|
}
|
|
246
|
-
},
|
|
295
|
+
}, _callee6);
|
|
247
296
|
}));
|
|
248
|
-
return function
|
|
249
|
-
return
|
|
297
|
+
return function getResourceTimeSlot(_x3) {
|
|
298
|
+
return _ref8.apply(this, arguments);
|
|
250
299
|
};
|
|
251
300
|
}();
|
|
252
301
|
|
|
253
302
|
// 获取自动分配
|
|
254
303
|
var autoSelectAllProductResources = /*#__PURE__*/function () {
|
|
255
|
-
var
|
|
256
|
-
var res;
|
|
257
|
-
return _regeneratorRuntime().wrap(function
|
|
258
|
-
while (1) switch (
|
|
304
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(index) {
|
|
305
|
+
var _getResourceList2, resourceCodes, code, data, res;
|
|
306
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
307
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
259
308
|
case 0:
|
|
260
|
-
|
|
309
|
+
_getResourceList2 = getResourceList(), resourceCodes = _getResourceList2.resourceCodes;
|
|
310
|
+
code = resourceCodes === null || resourceCodes === void 0 ? void 0 : resourceCodes[index || 0];
|
|
311
|
+
_context7.next = 4;
|
|
312
|
+
return appointmentBooking.getTimeSlotByAllResources(code);
|
|
313
|
+
case 4:
|
|
314
|
+
data = _context7.sent;
|
|
315
|
+
_context7.next = 7;
|
|
261
316
|
return appointmentBooking.autoSelectAllProductResources(code);
|
|
262
|
-
case
|
|
263
|
-
res =
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
317
|
+
case 7:
|
|
318
|
+
res = _context7.sent;
|
|
319
|
+
setResourceOtherParams(_objectSpread(_objectSpread(_objectSpread({}, resourceOtherParams), res), {}, {
|
|
320
|
+
resourceCodes: resourceCodes
|
|
321
|
+
}));
|
|
322
|
+
return _context7.abrupt("return", res);
|
|
323
|
+
case 10:
|
|
267
324
|
case "end":
|
|
268
|
-
return
|
|
325
|
+
return _context7.stop();
|
|
269
326
|
}
|
|
270
|
-
},
|
|
327
|
+
}, _callee7);
|
|
271
328
|
}));
|
|
272
|
-
return function autoSelectAllProductResources(
|
|
273
|
-
return
|
|
329
|
+
return function autoSelectAllProductResources(_x4) {
|
|
330
|
+
return _ref9.apply(this, arguments);
|
|
274
331
|
};
|
|
275
332
|
}();
|
|
276
333
|
return {
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import Content from "./components/Content";
|
|
3
2
|
import { isMobile, locales } from '@pisell/utils';
|
|
4
3
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
5
|
-
import "./index.less";
|
|
6
|
-
import localeTexts from "./locales";
|
|
7
4
|
import { AppointmentBookingProvider } from "./context";
|
|
8
|
-
import
|
|
5
|
+
import Content from "./components/Content";
|
|
6
|
+
import localeTexts from "./locales";
|
|
7
|
+
import { useAppointmentBooking } from "./hooks";
|
|
8
|
+
import { formatCurrentUser } from "./utils";
|
|
9
|
+
import "./index.less";
|
|
9
10
|
var AppointmentBooking = function AppointmentBooking() {
|
|
10
11
|
var _utils$storage;
|
|
11
12
|
var context = useEngineContext();
|
|
12
|
-
var appointmentBooking = useAppointmentBooking();
|
|
13
|
-
var appointmentBookingAccount = useAppointmentBookingAccount();
|
|
14
13
|
var utils = context.appHelper.utils || {};
|
|
15
14
|
locales.init(localeTexts, (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en');
|
|
15
|
+
var appointmentBooking = useAppointmentBooking();
|
|
16
|
+
var currentUser = formatCurrentUser();
|
|
16
17
|
useEffect(function () {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
appointmentBooking.getAccounts().then(function (data) {
|
|
19
|
+
if (!data.length) {
|
|
20
|
+
appointmentBooking.addAccount([currentUser]);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
19
23
|
}, []);
|
|
20
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
25
|
className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
|
|
@@ -70,11 +70,23 @@ declare const _default: {
|
|
|
70
70
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
72
|
'pisell2.appointment.booking.empty.service': string;
|
|
73
|
+
'pisell2.appointment.booking.empty.time': string;
|
|
73
74
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
74
75
|
'pisell2.appointment.add.guest': string;
|
|
75
76
|
'pisell2.appointment.edit.service': string;
|
|
76
77
|
'pisell2.appointment.remove.guest': string;
|
|
77
78
|
'pisell2.appointment.no.available.service': string;
|
|
79
|
+
'pisell2.appointment.max.guest': string;
|
|
80
|
+
'pisell2.appointment.no.available.time': string;
|
|
81
|
+
'pisell2.appointment.monday': string;
|
|
82
|
+
'pisell2.appointment.tuesday': string;
|
|
83
|
+
'pisell2.appointment.wednesday': string;
|
|
84
|
+
'pisell2.appointment.thursday': string;
|
|
85
|
+
'pisell2.appointment.friday': string;
|
|
86
|
+
'pisell2.appointment.saturday': string;
|
|
87
|
+
'pisell2.appointment.sunday': string;
|
|
88
|
+
'pisell2.appointment.any.professional': string;
|
|
89
|
+
'pisell2.appointment.for.maximum.availability': string;
|
|
78
90
|
'pisell2.text.apply': string;
|
|
79
91
|
'pisell2.text.goodpass': string;
|
|
80
92
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -156,11 +168,23 @@ declare const _default: {
|
|
|
156
168
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
157
169
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
158
170
|
'pisell2.appointment.booking.empty.service': string;
|
|
171
|
+
'pisell2.appointment.booking.empty.time': string;
|
|
159
172
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
160
173
|
'pisell2.appointment.add.guest': string;
|
|
161
174
|
'pisell2.appointment.edit.service': string;
|
|
162
175
|
'pisell2.appointment.remove.guest': string;
|
|
163
176
|
'pisell2.appointment.no.available.service': string;
|
|
177
|
+
'pisell2.appointment.max.guest': string;
|
|
178
|
+
'pisell2.appointment.no.available.time': string;
|
|
179
|
+
'pisell2.appointment.monday': string;
|
|
180
|
+
'pisell2.appointment.tuesday': string;
|
|
181
|
+
'pisell2.appointment.wednesday': string;
|
|
182
|
+
'pisell2.appointment.thursday': string;
|
|
183
|
+
'pisell2.appointment.friday': string;
|
|
184
|
+
'pisell2.appointment.saturday': string;
|
|
185
|
+
'pisell2.appointment.sunday': string;
|
|
186
|
+
'pisell2.appointment.any.professional': string;
|
|
187
|
+
'pisell2.appointment.for.maximum.availability': string;
|
|
164
188
|
'pisell2.text.apply': string;
|
|
165
189
|
'pisell2.text.goodpass': string;
|
|
166
190
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -242,11 +266,23 @@ declare const _default: {
|
|
|
242
266
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
243
267
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
244
268
|
'pisell2.appointment.booking.empty.service': string;
|
|
269
|
+
'pisell2.appointment.booking.empty.time': string;
|
|
245
270
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
246
271
|
'pisell2.appointment.add.guest': string;
|
|
247
272
|
'pisell2.appointment.edit.service': string;
|
|
248
273
|
'pisell2.appointment.remove.guest': string;
|
|
249
274
|
'pisell2.appointment.no.available.service': string;
|
|
275
|
+
'pisell2.appointment.max.guest': string;
|
|
276
|
+
'pisell2.appointment.no.available.time': string;
|
|
277
|
+
'pisell2.appointment.monday': string;
|
|
278
|
+
'pisell2.appointment.tuesday': string;
|
|
279
|
+
'pisell2.appointment.wednesday': string;
|
|
280
|
+
'pisell2.appointment.thursday': string;
|
|
281
|
+
'pisell2.appointment.friday': string;
|
|
282
|
+
'pisell2.appointment.saturday': string;
|
|
283
|
+
'pisell2.appointment.sunday': string;
|
|
284
|
+
'pisell2.appointment.any.professional': string;
|
|
285
|
+
'pisell2.appointment.for.maximum.availability': string;
|
|
250
286
|
'pisell2.text.apply': string;
|
|
251
287
|
'pisell2.text.goodpass': string;
|
|
252
288
|
'pisell2.text.goodpass.product-vouchers': string;
|