@pisell/private-materials 6.1.1 → 6.2.1
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 +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/Sales/index.js +37 -4
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Cart/index.js +13 -4
- package/es/components/Sales/Cart/utils.d.ts +40 -0
- package/es/components/Sales/Cart/utils.js +171 -0
- package/es/components/Sales/Checkout/index.d.ts +4 -0
- package/es/components/Sales/Checkout/index.js +52 -8
- package/es/components/Sales/Checkout/serve.d.ts +13 -0
- package/es/components/Sales/Checkout/serve.js +16 -2
- package/es/components/Sales/Checkout/utils.d.ts +6 -1
- package/es/components/Sales/Checkout/utils.js +15 -4
- package/es/components/Sales/Customer/index.d.ts +1 -0
- package/es/components/Sales/Customer/index.js +1 -0
- 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/index.d.ts +10 -0
- package/es/components/Sales/Summary/index.js +17 -2
- package/es/components/Sales/Summary/serve.d.ts +1 -0
- package/es/components/Sales/Summary/serve.js +6 -0
- package/es/components/Sales/Summary/utils.d.ts +15 -0
- package/es/components/Sales/Summary/utils.js +43 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/es/components/appointmentBooking/components/Content/index.js +15 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
- package/es/components/appointmentBooking/components/Form/index.js +1 -1
- package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Form/utils.js +17 -15
- package/es/components/appointmentBooking/components/Header/index.js +2 -1
- package/es/components/appointmentBooking/components/Resource/index.js +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
- package/es/components/appointmentBooking/deposit/index.js +4 -2
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +9 -33
- package/es/components/booking/components/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +47 -18
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/{pay/toB/store/provider.js → booking/components/reloadResourceModal/index.js} +48 -52
- package/es/components/booking/components/reloadResourceModal/index.less +6 -0
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/editBookingModal/index.d.ts +5 -0
- package/es/components/booking/editBookingModal/index.js +386 -0
- package/es/components/booking/editBookingModal/index.less +8 -0
- package/es/components/booking/editBookingModal/locales.d.ts +21 -0
- package/es/components/booking/editBookingModal/locales.js +20 -0
- package/es/components/booking/editBookingModal/mock.d.ts +807 -0
- package/es/components/booking/editBookingModal/mock.js +2993 -0
- package/es/components/booking/editBookingModal/serve.d.ts +51 -0
- package/es/components/booking/editBookingModal/serve.js +288 -0
- package/es/components/booking/editBookingModal/type.d.ts +12 -0
- package/es/components/booking/editBookingModal/type.js +1 -0
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/editBookingModal/utils.js +157 -0
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useIsBooking4Shop.js +2 -2
- package/es/components/booking/info/addServiceVariant/index.js +2 -2
- package/es/components/booking/info/client/index.js +2 -2
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.js +8 -1
- package/es/components/booking/info/index.js +4 -5
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/index.js +2 -2
- package/es/components/booking/info/service/editService/index.js +1 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceManager/index.js +4 -4
- 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/info/service2/utils.js +6 -4
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +37 -13
- package/es/components/booking/info2/service/addService/index.js +22 -9
- package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
- package/es/components/booking/info2/service/addService/utils.js +48 -14
- package/es/components/booking/info2/service/addTimeModal/index.js +32 -9
- package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
- package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
- package/es/components/booking/info2/service/editService/index.js +12 -15
- package/es/components/booking/info2/utils.js +13 -16
- package/es/components/booking/info2/utilsByBooking.js +10 -1
- package/es/components/booking/locales.d.ts +12 -0
- package/es/components/booking/locales.js +12 -0
- 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/model.d.ts +1 -0
- 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/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.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/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/hooks.js +3 -1
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/const.js +82 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/index.js +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/{pay/toB/store/hooks.js → eftposPay/linkly/hooks/useTimeQuery.js} +252 -59
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/index.js +197 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/linkly/service.js +81 -0
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/payo/config.js +30 -3
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +40 -19
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
- 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/bookingDetailModal/index.js +22 -4
- package/es/components/eventBooking/index.js +21 -7
- package/es/components/eventBooking/locales.d.ts +24 -0
- package/es/components/eventBooking/locales.js +30 -6
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -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/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/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/productSelect/components/pisellPriceText/index.js +2 -3
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/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/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- 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.js +19 -9
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +141 -142
- package/es/components/ticketBooking/index.js +4 -3
- package/es/components/ticketBooking/serve.d.ts +0 -1
- package/es/components/ticketBooking/serve.js +0 -26
- package/es/components/ticketBooking/utils/index.js +2 -1
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Cart/index.js +9 -4
- package/lib/components/Sales/Cart/utils.d.ts +40 -0
- package/lib/components/Sales/Cart/utils.js +120 -0
- package/lib/components/Sales/Checkout/index.d.ts +4 -0
- package/lib/components/Sales/Checkout/index.js +39 -7
- package/lib/components/Sales/Checkout/serve.d.ts +13 -0
- package/lib/components/Sales/Checkout/serve.js +7 -2
- package/lib/components/Sales/Checkout/utils.d.ts +6 -1
- package/lib/components/Sales/Checkout/utils.js +7 -3
- package/lib/components/Sales/Customer/index.d.ts +1 -0
- package/lib/components/Sales/Customer/index.js +1 -0
- 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/index.d.ts +10 -0
- package/lib/components/Sales/Summary/index.js +7 -1
- package/lib/components/Sales/Summary/serve.d.ts +1 -0
- package/lib/components/Sales/Summary/serve.js +32 -0
- package/lib/components/Sales/Summary/utils.d.ts +15 -0
- package/lib/components/Sales/Summary/utils.js +30 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/lib/components/appointmentBooking/components/Content/index.js +6 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
- package/lib/components/appointmentBooking/components/Form/index.js +6 -1
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
- package/lib/components/appointmentBooking/components/Header/index.js +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
- package/lib/components/appointmentBooking/deposit/index.js +4 -2
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +4 -23
- package/lib/components/booking/components/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +27 -7
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/reloadResourceModal/index.js +74 -0
- package/lib/components/booking/components/reloadResourceModal/index.less +6 -0
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/editBookingModal/index.d.ts +5 -0
- package/lib/components/booking/editBookingModal/index.js +363 -0
- package/lib/components/booking/editBookingModal/index.less +8 -0
- package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
- package/lib/components/booking/editBookingModal/locales.js +44 -0
- package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
- package/lib/components/booking/editBookingModal/mock.js +3314 -0
- package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
- package/lib/components/booking/editBookingModal/serve.js +178 -0
- package/lib/components/booking/editBookingModal/type.d.ts +12 -0
- package/lib/components/{pay/toB/store/context.js → booking/editBookingModal/type.js} +3 -18
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/editBookingModal/utils.js +158 -0
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useIsBooking4Shop.js +2 -2
- package/lib/components/booking/info/addServiceVariant/index.js +3 -3
- package/lib/components/booking/info/client/index.js +19 -57
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.js +6 -1
- package/lib/components/booking/info/index.js +6 -4
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/service/addService/index.js +3 -3
- package/lib/components/booking/info/service/editService/index.js +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceManager/index.js +3 -3
- 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/info/service2/utils.js +5 -4
- package/lib/components/booking/info/utils.js +2 -1
- package/lib/components/booking/info2/index.js +54 -20
- package/lib/components/booking/info2/service/addService/index.js +20 -7
- package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
- package/lib/components/booking/info2/service/addService/utils.js +32 -5
- package/lib/components/booking/info2/service/addTimeModal/index.js +26 -10
- package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
- package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
- package/lib/components/booking/info2/service/editService/index.js +25 -28
- package/lib/components/booking/info2/utils.js +0 -15
- package/lib/components/booking/info2/utilsByBooking.js +7 -1
- package/lib/components/booking/locales.d.ts +12 -0
- package/lib/components/booking/locales.js +12 -0
- 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/model.d.ts +1 -0
- 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/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.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/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/hooks.js +11 -4
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/const.js +102 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/{pay/toB/types → eftposPay/linkly/hooks}/index.js +7 -5
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/index.js +208 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/linkly/service.js +55 -0
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +13 -2
- package/lib/components/eftposPay/payo/config.js +22 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -8
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
- package/lib/components/{pay/toB/components → eventBooking/components/Provider/Cart/Deposit}/index.js +26 -22
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
- 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/bookingDetailModal/index.js +10 -4
- package/lib/components/eventBooking/index.js +11 -7
- package/lib/components/eventBooking/locales.d.ts +24 -0
- package/lib/components/eventBooking/locales.js +30 -6
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- 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/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/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/productSelect/components/pisellPriceText/index.js +2 -8
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/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/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/stepController/components/Content/index.d.ts +7 -0
- package/lib/components/{pay/toB/components/Content/Header.js → stepController/components/Content/index.js} +9 -9
- package/lib/components/stepController/components/Content/index.less +8 -0
- package/lib/components/stepController/components/Footer/index.d.ts +8 -0
- package/lib/components/{pay/toB/components/CardGroup → stepController/components/Footer}/index.js +17 -11
- 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/{pay/toB/store/index.js → stepController/types.js} +3 -13
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +22 -11
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +147 -143
- package/lib/components/ticketBooking/index.js +5 -16
- package/lib/components/ticketBooking/serve.d.ts +0 -1
- package/lib/components/ticketBooking/serve.js +0 -11
- package/lib/components/ticketBooking/utils/index.js +2 -1
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/edit-booking-modal/meta.ts +53 -0
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +3 -3
- package/es/components/pay/toB/components/Cache/index.d.ts +0 -10
- package/es/components/pay/toB/components/Cache/index.js +0 -94
- package/es/components/pay/toB/components/Cache/index.less +0 -41
- package/es/components/pay/toB/components/Card/index.d.ts +0 -7
- package/es/components/pay/toB/components/Card/index.js +0 -32
- package/es/components/pay/toB/components/Card/index.less +0 -26
- package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -7
- package/es/components/pay/toB/components/CardGroup/index.js +0 -22
- package/es/components/pay/toB/components/CardGroup/index.less +0 -18
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -6
- package/es/components/pay/toB/components/ConfirmedPayment/index.js +0 -67
- package/es/components/pay/toB/components/ConfirmedPayment/index.less +0 -69
- package/es/components/pay/toB/components/Content/Footer.d.ts +0 -7
- package/es/components/pay/toB/components/Content/Footer.js +0 -36
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -4
- package/es/components/pay/toB/components/Content/Header.js +0 -12
- package/es/components/pay/toB/components/Content/index.d.ts +0 -4
- package/es/components/pay/toB/components/Content/index.js +0 -277
- package/es/components/pay/toB/components/Content/index.less +0 -9
- package/es/components/pay/toB/components/Content/utils.d.ts +0 -16
- package/es/components/pay/toB/components/Content/utils.js +0 -76
- package/es/components/pay/toB/components/index.d.ts +0 -5
- package/es/components/pay/toB/components/index.js +0 -5
- package/es/components/pay/toB/hooks.d.ts +0 -12
- package/es/components/pay/toB/hooks.js +0 -30
- package/es/components/pay/toB/index.d.ts +0 -3
- package/es/components/pay/toB/index.js +0 -24
- package/es/components/pay/toB/locales.d.ts +0 -54
- package/es/components/pay/toB/locales.js +0 -65
- package/es/components/pay/toB/store/context.d.ts +0 -3
- package/es/components/pay/toB/store/context.js +0 -2
- package/es/components/pay/toB/store/hooks.d.ts +0 -15
- package/es/components/pay/toB/store/index.d.ts +0 -3
- package/es/components/pay/toB/store/index.js +0 -3
- package/es/components/pay/toB/store/provider.d.ts +0 -4
- package/es/components/pay/toB/store/utils.d.ts +0 -13
- package/es/components/pay/toB/store/utils.js +0 -66
- package/es/components/pay/toB/types/index.d.ts +0 -1
- package/es/components/pay/toB/types/index.js +0 -1
- package/es/components/pay/toB/types/storeTypes.d.ts +0 -141
- package/es/components/pay/toB/types/storeTypes.js +0 -24
- package/lib/components/pay/toB/components/Cache/index.d.ts +0 -10
- package/lib/components/pay/toB/components/Cache/index.js +0 -108
- package/lib/components/pay/toB/components/Cache/index.less +0 -41
- package/lib/components/pay/toB/components/Card/index.d.ts +0 -7
- package/lib/components/pay/toB/components/Card/index.js +0 -66
- package/lib/components/pay/toB/components/Card/index.less +0 -26
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -7
- package/lib/components/pay/toB/components/CardGroup/index.less +0 -18
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -6
- package/lib/components/pay/toB/components/ConfirmedPayment/index.js +0 -77
- package/lib/components/pay/toB/components/ConfirmedPayment/index.less +0 -69
- package/lib/components/pay/toB/components/Content/Footer.d.ts +0 -7
- package/lib/components/pay/toB/components/Content/Footer.js +0 -63
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -4
- package/lib/components/pay/toB/components/Content/index.d.ts +0 -4
- package/lib/components/pay/toB/components/Content/index.js +0 -209
- package/lib/components/pay/toB/components/Content/index.less +0 -9
- package/lib/components/pay/toB/components/Content/utils.d.ts +0 -16
- package/lib/components/pay/toB/components/Content/utils.js +0 -91
- package/lib/components/pay/toB/components/index.d.ts +0 -5
- package/lib/components/pay/toB/hooks.d.ts +0 -12
- package/lib/components/pay/toB/hooks.js +0 -60
- package/lib/components/pay/toB/index.d.ts +0 -3
- package/lib/components/pay/toB/index.js +0 -54
- package/lib/components/pay/toB/locales.d.ts +0 -54
- package/lib/components/pay/toB/locales.js +0 -77
- package/lib/components/pay/toB/store/context.d.ts +0 -3
- package/lib/components/pay/toB/store/hooks.d.ts +0 -15
- package/lib/components/pay/toB/store/hooks.js +0 -85
- package/lib/components/pay/toB/store/index.d.ts +0 -3
- package/lib/components/pay/toB/store/provider.d.ts +0 -4
- package/lib/components/pay/toB/store/provider.js +0 -70
- package/lib/components/pay/toB/store/utils.d.ts +0 -13
- package/lib/components/pay/toB/store/utils.js +0 -72
- package/lib/components/pay/toB/types/index.d.ts +0 -1
- package/lib/components/pay/toB/types/storeTypes.d.ts +0 -141
- package/lib/components/pay/toB/types/storeTypes.js +0 -36
- package/lowcode/tob-pay/meta.ts +0 -44
@@ -0,0 +1,386 @@
|
|
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 _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
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
4
|
+
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."); }
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
6
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
11
|
+
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); }
|
12
|
+
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); } }
|
13
|
+
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); }); }; }
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
17
|
+
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; }
|
18
|
+
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; } }
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
+
import React, { useState, useMemo, useLayoutEffect, useImperativeHandle, forwardRef, useEffect } from 'react';
|
21
|
+
import { Form, Button, DatePicker } from 'antd';
|
22
|
+
import { PisellContainer, Iconfont, Spin } from '@pisell/materials';
|
23
|
+
import dayjs from 'dayjs';
|
24
|
+
import { locales } from '@pisell/utils';
|
25
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
26
|
+
import { request } from "../../../utils";
|
27
|
+
import ResourcesV2 from "../info2/service/editService/ResourcesV2";
|
28
|
+
import { formatResources } from "../info2/service/addService/utils";
|
29
|
+
import { createCacheItem, updateChildBooking } from "./serve";
|
30
|
+
import { init, updateResourceErrors } from "./serve";
|
31
|
+
import { checkResourcesFormat } from "../../booking/components/footer/utils";
|
32
|
+
import localeTexts from "./locales";
|
33
|
+
import "./index.less";
|
34
|
+
var EditBookingModal = function EditBookingModal(props, ref) {
|
35
|
+
var _useState = useState(false),
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
37
|
+
open = _useState2[0],
|
38
|
+
setOpen = _useState2[1];
|
39
|
+
var _useState3 = useState({}),
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
41
|
+
params = _useState4[0],
|
42
|
+
setParams = _useState4[1];
|
43
|
+
var _useState5 = useState(false),
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
45
|
+
loading = _useState6[0],
|
46
|
+
setLoading = _useState6[1];
|
47
|
+
var _useState7 = useState(false),
|
48
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
49
|
+
updating = _useState8[0],
|
50
|
+
setUpdating = _useState8[1];
|
51
|
+
var _useState9 = useState(null),
|
52
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
53
|
+
data = _useState10[0],
|
54
|
+
setData = _useState10[1];
|
55
|
+
var context = useEngineContext();
|
56
|
+
var _Form$useForm = Form.useForm(),
|
57
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
58
|
+
form = _Form$useForm2[0];
|
59
|
+
var useToDate = Form.useWatch('toDate', form);
|
60
|
+
var useResource = Form.useWatch('resource', form);
|
61
|
+
useImperativeHandle(ref, function () {
|
62
|
+
return {
|
63
|
+
open: function open(params) {
|
64
|
+
console.log('change', params);
|
65
|
+
setParams(params);
|
66
|
+
setOpen(true);
|
67
|
+
}
|
68
|
+
};
|
69
|
+
});
|
70
|
+
var getInitData = /*#__PURE__*/function () {
|
71
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
72
|
+
var _data$toResource;
|
73
|
+
var mockProps, _data, _initResourceVal, toResourceFormId, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx;
|
74
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
75
|
+
while (1) switch (_context.prev = _context.next) {
|
76
|
+
case 0:
|
77
|
+
mockProps = params;
|
78
|
+
_context.next = 3;
|
79
|
+
return init(mockProps);
|
80
|
+
case 3:
|
81
|
+
_data = _context.sent;
|
82
|
+
setData(_data);
|
83
|
+
|
84
|
+
// 初始预期资源(日历放置点对应的资源)
|
85
|
+
_initResourceVal = _data.childrenBooking._extend.resource; // 目标资源所在 form_id
|
86
|
+
toResourceFormId = (_data$toResource = _data.toResource) === null || _data$toResource === void 0 ? void 0 : _data$toResource.form_id; // 若 1. 起止资源不同 且2. 能通过目标资源id找到所在资源组
|
87
|
+
// 则查找放置点所对应资源信息
|
88
|
+
if (params.fromResourceId !== params.toResourceId && toResourceFormId) {
|
89
|
+
_formatResources = formatResources({
|
90
|
+
cacheItem: _data.childrenBooking,
|
91
|
+
resourcesOrigin: _data.resourcesOrigin
|
92
|
+
}), list = _formatResources.list, maps = _formatResources.maps;
|
93
|
+
currentForm = maps[toResourceFormId];
|
94
|
+
relation_id = (_data$toResource2 = _data.toResource) === null || _data$toResource2 === void 0 ? void 0 : _data$toResource2.id;
|
95
|
+
if (currentForm && relation_id) {
|
96
|
+
_targetResource = {
|
97
|
+
relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
|
98
|
+
form_id: toResourceFormId,
|
99
|
+
relation_id: relation_id,
|
100
|
+
like_status: 'common',
|
101
|
+
children: (_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 || (_currentForm$renderLi2 = _currentForm$renderLi2[relation_id]) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2.children,
|
102
|
+
metadata: _objectSpread(_objectSpread({}, (_currentForm$renderLi3 = currentForm.renderListMaps) === null || _currentForm$renderLi3 === void 0 || (_currentForm$renderLi3 = _currentForm$renderLi3[relation_id]) === null || _currentForm$renderLi3 === void 0 ? void 0 : _currentForm$renderLi3.metadata), {}, {
|
103
|
+
form_name: currentForm.title,
|
104
|
+
resource_name: (_currentForm$renderLi4 = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.main_field
|
105
|
+
})
|
106
|
+
}; // 同一类型关联多个资源
|
107
|
+
if (Array.isArray(_initResourceVal[toResourceFormId])) {
|
108
|
+
_cloned = _toConsumableArray(_initResourceVal[toResourceFormId]);
|
109
|
+
_idx = _cloned.findIndex(function (rs) {
|
110
|
+
return rs.relation_id == params.fromResourceId;
|
111
|
+
});
|
112
|
+
if (_idx !== -1) {
|
113
|
+
_cloned[_idx] = _targetResource; // 替换现有对象
|
114
|
+
} else {
|
115
|
+
_cloned.push(_targetResource); // 添加新对象
|
116
|
+
}
|
117
|
+
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, toResourceFormId, _cloned));
|
118
|
+
} else {
|
119
|
+
// 单选
|
120
|
+
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, toResourceFormId, [_targetResource]));
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
setTimeout(function () {
|
125
|
+
form.setFieldsValue({
|
126
|
+
resource: _initResourceVal,
|
127
|
+
fromDate: [dayjs("".concat(mockProps.event.start_date, " ").concat(mockProps.event.start_time)), dayjs("".concat(mockProps.event.end_date, " ").concat(mockProps.event.end_time))],
|
128
|
+
toDate: [dayjs(mockProps.toStartDate), dayjs(mockProps.toEndDate)]
|
129
|
+
});
|
130
|
+
}, 100);
|
131
|
+
case 9:
|
132
|
+
case "end":
|
133
|
+
return _context.stop();
|
134
|
+
}
|
135
|
+
}, _callee);
|
136
|
+
}));
|
137
|
+
return function getInitData(_x) {
|
138
|
+
return _ref.apply(this, arguments);
|
139
|
+
};
|
140
|
+
}();
|
141
|
+
useLayoutEffect(function () {
|
142
|
+
var _context$appHelper$ut;
|
143
|
+
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
|
144
|
+
request.setRequest(context.appHelper.utils.request);
|
145
|
+
}, []);
|
146
|
+
useEffect(function () {
|
147
|
+
if (!open) return;
|
148
|
+
getInitData(params);
|
149
|
+
}, [params, open]);
|
150
|
+
var resourceData = useMemo(function () {
|
151
|
+
if (!data) {
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
return formatResources({
|
155
|
+
cacheItem: data.childrenBooking,
|
156
|
+
resourcesOrigin: data.resourcesOrigin
|
157
|
+
});
|
158
|
+
}, [data]);
|
159
|
+
var updateResource = function updateResource(resource) {
|
160
|
+
form.setFieldsValue({
|
161
|
+
resource: resource
|
162
|
+
});
|
163
|
+
};
|
164
|
+
var originCacheItem = useMemo(function () {
|
165
|
+
if (!data) {
|
166
|
+
return null;
|
167
|
+
}
|
168
|
+
var _cacheItem = createCacheItem(data.childrenBooking, {
|
169
|
+
toDate: [data.childrenBooking._extend.start_date, data.childrenBooking._extend.end_date],
|
170
|
+
resource: data.childrenBooking._extend.resource
|
171
|
+
});
|
172
|
+
console.log('_origin_cacheItem', _cacheItem);
|
173
|
+
var _formatResources2 = formatResources({
|
174
|
+
cacheItem: _cacheItem,
|
175
|
+
resourcesOrigin: data.resourcesOrigin
|
176
|
+
}),
|
177
|
+
list = _formatResources2.list,
|
178
|
+
maps = _formatResources2.maps;
|
179
|
+
return _objectSpread(_objectSpread({}, _cacheItem), {}, {
|
180
|
+
_data: {
|
181
|
+
resources: list,
|
182
|
+
resourceMaps: maps
|
183
|
+
}
|
184
|
+
});
|
185
|
+
}, [data]);
|
186
|
+
var cacheItem = useMemo(function () {
|
187
|
+
if (!data) {
|
188
|
+
return null;
|
189
|
+
}
|
190
|
+
var _cacheItem = createCacheItem(data.childrenBooking, {
|
191
|
+
toDate: useToDate,
|
192
|
+
resource: useResource
|
193
|
+
});
|
194
|
+
console.log('_cacheItem', _cacheItem);
|
195
|
+
var _formatResources3 = formatResources({
|
196
|
+
cacheItem: _cacheItem,
|
197
|
+
resourcesOrigin: data.resourcesOrigin
|
198
|
+
}),
|
199
|
+
list = _formatResources3.list,
|
200
|
+
maps = _formatResources3.maps;
|
201
|
+
var resource = updateResourceErrors(maps, _cacheItem);
|
202
|
+
updateResource(resource);
|
203
|
+
return _objectSpread(_objectSpread({}, _cacheItem), {}, {
|
204
|
+
_data: {
|
205
|
+
resources: list,
|
206
|
+
resourceMaps: maps
|
207
|
+
}
|
208
|
+
});
|
209
|
+
}, [data, useToDate, useResource]);
|
210
|
+
var initState = function initState() {
|
211
|
+
form.resetFields();
|
212
|
+
setData(null);
|
213
|
+
setOpen(false);
|
214
|
+
};
|
215
|
+
var onCancel = function onCancel() {
|
216
|
+
initState();
|
217
|
+
props === null || props === void 0 || props.onCancel();
|
218
|
+
};
|
219
|
+
var onOk = /*#__PURE__*/function () {
|
220
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
221
|
+
var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time;
|
222
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
223
|
+
while (1) switch (_context2.prev = _context2.next) {
|
224
|
+
case 0:
|
225
|
+
values = form.getFieldsValue(); // console.log('values', values, data, cacheItem);
|
226
|
+
// return;
|
227
|
+
setUpdating(true);
|
228
|
+
_context2.prev = 2;
|
229
|
+
_data$childrenBooking = data.childrenBooking, _extend = _data$childrenBooking._extend, order_id = _data$childrenBooking.order_id;
|
230
|
+
start_date = values.toDate[0].format('YYYY-MM-DD');
|
231
|
+
start_time = values.toDate[0].format('HH:mm');
|
232
|
+
end_date = values.toDate[1].format('YYYY-MM-DD');
|
233
|
+
end_time = values.toDate[1].format('HH:mm');
|
234
|
+
_context2.next = 10;
|
235
|
+
return updateChildBooking(order_id, _objectSpread(_objectSpread({}, _extend), {}, {
|
236
|
+
resources: Object.values(values.resource).reduce(function (pre, cur) {
|
237
|
+
var newList = checkResourcesFormat(cur, cacheItem);
|
238
|
+
pre = pre.concat(newList);
|
239
|
+
return pre;
|
240
|
+
}, []),
|
241
|
+
start_date: start_date,
|
242
|
+
start_time: start_time,
|
243
|
+
end_date: end_date,
|
244
|
+
end_time: end_time,
|
245
|
+
duration: values.toDate[1].diff(values.toDate[0], 'minutes')
|
246
|
+
}));
|
247
|
+
case 10:
|
248
|
+
setOpen(false);
|
249
|
+
props === null || props === void 0 || props.onOk();
|
250
|
+
_context2.next = 17;
|
251
|
+
break;
|
252
|
+
case 14:
|
253
|
+
_context2.prev = 14;
|
254
|
+
_context2.t0 = _context2["catch"](2);
|
255
|
+
console.error(_context2.t0);
|
256
|
+
case 17:
|
257
|
+
setUpdating(false);
|
258
|
+
case 18:
|
259
|
+
case "end":
|
260
|
+
return _context2.stop();
|
261
|
+
}
|
262
|
+
}, _callee2, null, [[2, 14]]);
|
263
|
+
}));
|
264
|
+
return function onOk() {
|
265
|
+
return _ref2.apply(this, arguments);
|
266
|
+
};
|
267
|
+
}();
|
268
|
+
console.log('data', data);
|
269
|
+
return /*#__PURE__*/React.createElement(PisellContainer, {
|
270
|
+
renderType: 'modal',
|
271
|
+
props: {
|
272
|
+
title: locales.getText('pisell2.text.booking.confirm-changes'),
|
273
|
+
open: open,
|
274
|
+
cancelVisible: false,
|
275
|
+
bodyStyle: {
|
276
|
+
padding: 24
|
277
|
+
},
|
278
|
+
width: 680,
|
279
|
+
onCancel: onCancel,
|
280
|
+
okButtonProps: {},
|
281
|
+
onOk: function onOk() {},
|
282
|
+
footer: null,
|
283
|
+
className: 'pisell-edit-booking-modal'
|
284
|
+
}
|
285
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
286
|
+
spinning: !data
|
287
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
288
|
+
form: form,
|
289
|
+
layout: "vertical"
|
290
|
+
}, /*#__PURE__*/React.createElement("div", {
|
291
|
+
style: {
|
292
|
+
display: 'flex',
|
293
|
+
alignItems: 'center',
|
294
|
+
gap: 8,
|
295
|
+
color: '#1b1b1b',
|
296
|
+
fontWeight: '500'
|
297
|
+
}
|
298
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
299
|
+
type: "pisell2-copy-03",
|
300
|
+
style: {
|
301
|
+
fontSize: 16
|
302
|
+
}
|
303
|
+
}), locales.getText('pisell2.text.booking.time-change')), /*#__PURE__*/React.createElement(Form.Item, {
|
304
|
+
name: "fromDate",
|
305
|
+
label: "From"
|
306
|
+
}, /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
|
307
|
+
format: 'YYYY-MM-DD HH:mm',
|
308
|
+
showTime: true,
|
309
|
+
presets: [],
|
310
|
+
disabled: true,
|
311
|
+
style: {
|
312
|
+
width: '100%'
|
313
|
+
},
|
314
|
+
size: "large"
|
315
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
316
|
+
name: "toDate",
|
317
|
+
label: "To"
|
318
|
+
}, /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
|
319
|
+
format: 'YYYY-MM-DD HH:mm',
|
320
|
+
showTime: true,
|
321
|
+
presets: [],
|
322
|
+
style: {
|
323
|
+
width: '100%'
|
324
|
+
},
|
325
|
+
size: "large"
|
326
|
+
})), /*#__PURE__*/React.createElement("div", {
|
327
|
+
style: {
|
328
|
+
display: 'flex',
|
329
|
+
alignItems: 'center',
|
330
|
+
gap: 8,
|
331
|
+
color: '#1b1b1b',
|
332
|
+
fontWeight: '500'
|
333
|
+
}
|
334
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
335
|
+
type: "pisell2-mark",
|
336
|
+
style: {
|
337
|
+
fontSize: 16
|
338
|
+
}
|
339
|
+
}), locales.getText('pisell2.text.booking.resource-change.detail')), data ? /*#__PURE__*/React.createElement("div", {
|
340
|
+
style: {
|
341
|
+
marginTop: 16
|
342
|
+
}
|
343
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
344
|
+
name: "resource"
|
345
|
+
}, /*#__PURE__*/React.createElement(ResourcesV2, {
|
346
|
+
state: {},
|
347
|
+
resourceData: resourceData,
|
348
|
+
cacheItem: cacheItem,
|
349
|
+
getCurrentCacheItem: function getCurrentCacheItem() {
|
350
|
+
return cacheItem;
|
351
|
+
},
|
352
|
+
config: {
|
353
|
+
autoAllocation: false,
|
354
|
+
labelCol: {
|
355
|
+
span: 24
|
356
|
+
},
|
357
|
+
resourceErrorIcon: true,
|
358
|
+
disabled: false
|
359
|
+
},
|
360
|
+
originCacheItem: originCacheItem,
|
361
|
+
originValue: originCacheItem._extend.resource
|
362
|
+
}))) : null)), /*#__PURE__*/React.createElement("div", {
|
363
|
+
className: "",
|
364
|
+
style: {
|
365
|
+
display: 'flex',
|
366
|
+
gap: 12
|
367
|
+
}
|
368
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
369
|
+
onClick: onCancel,
|
370
|
+
block: true,
|
371
|
+
size: "large",
|
372
|
+
style: {
|
373
|
+
borderRadius: 20
|
374
|
+
}
|
375
|
+
}, locales.getText('pisell2.text.cancel')), /*#__PURE__*/React.createElement(Button, {
|
376
|
+
type: "primary",
|
377
|
+
onClick: onOk,
|
378
|
+
block: true,
|
379
|
+
size: "large",
|
380
|
+
loading: updating,
|
381
|
+
style: {
|
382
|
+
borderRadius: 20
|
383
|
+
}
|
384
|
+
}, locales.getText('pisell2.text.confirm'))));
|
385
|
+
};
|
386
|
+
export default /*#__PURE__*/forwardRef(EditBookingModal);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
en: {
|
3
|
+
'pisell2.text.login': string;
|
4
|
+
'pisell2.text.booking.confirm-changes': string;
|
5
|
+
'pisell2.text.booking.time-change': string;
|
6
|
+
'pisell2.text.booking.resource-change.detail': string;
|
7
|
+
};
|
8
|
+
'zh-CN': {
|
9
|
+
'pisell2.text.login': string;
|
10
|
+
'pisell2.text.booking.confirm-changes': string;
|
11
|
+
'pisell2.text.booking.time-change': string;
|
12
|
+
'pisell2.text.booking.resource-change.detail': string;
|
13
|
+
};
|
14
|
+
'zh-HK': {
|
15
|
+
'pisell2.text.login': string;
|
16
|
+
'pisell2.text.booking.confirm-changes': string;
|
17
|
+
'pisell2.text.booking.time-change': string;
|
18
|
+
'pisell2.text.booking.resource-change.detail': string;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
export default _default;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export default {
|
2
|
+
en: {
|
3
|
+
'pisell2.text.login': 'Login',
|
4
|
+
'pisell2.text.booking.confirm-changes': 'Confirm Booking Changes',
|
5
|
+
'pisell2.text.booking.time-change': 'Time Change',
|
6
|
+
'pisell2.text.booking.resource-change.detail': 'Resource Change Details'
|
7
|
+
},
|
8
|
+
'zh-CN': {
|
9
|
+
'pisell2.text.login': '登录',
|
10
|
+
'pisell2.text.booking.confirm-changes': '确认预约变更',
|
11
|
+
'pisell2.text.booking.time-change': '时间变更',
|
12
|
+
'pisell2.text.booking.resource-change.detail': '资源变更详情'
|
13
|
+
},
|
14
|
+
'zh-HK': {
|
15
|
+
'pisell2.text.login': '登录',
|
16
|
+
'pisell2.text.booking.confirm-changes': '確認預約變更',
|
17
|
+
'pisell2.text.booking.time-change': '時間變更',
|
18
|
+
'pisell2.text.booking.resource-change.detail': '資源變更詳情'
|
19
|
+
}
|
20
|
+
};
|