@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,197 @@
|
|
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 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; }
|
3
|
+
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; }
|
4
|
+
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; }
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
|
+
import React, { useEffect, useRef } from 'react';
|
8
|
+
import { Button } from 'antd';
|
9
|
+
import { locales } from '@pisell/utils';
|
10
|
+
import { useContextData, useDispatch, updateCustom, updateState, updateNextStep } from "../store";
|
11
|
+
import { useFail, useStoreRef } from "../hooks";
|
12
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
13
|
+
import { request } from "../../../utils";
|
14
|
+
import Step from "../component/step/step";
|
15
|
+
import { StatusEnum } from "../const";
|
16
|
+
import { useLinklyCancel, useLinklyPayOrRefund, useTimeResultQuery, useLinklySignature } from "./hooks";
|
17
|
+
import { LinklyActionStatus } from "./const";
|
18
|
+
import { getPayParams } from "../helper";
|
19
|
+
var Linkly = function Linkly(_ref) {
|
20
|
+
var api = _ref.api,
|
21
|
+
onChange = _ref.onChange;
|
22
|
+
// 设置request
|
23
|
+
var context = useEngineContext();
|
24
|
+
var utils = context.appHelper.utils || {};
|
25
|
+
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
26
|
+
var _useContextData = useContextData(),
|
27
|
+
custom = _useContextData.custom,
|
28
|
+
status = _useContextData.status;
|
29
|
+
var _useStoreRef = useStoreRef(),
|
30
|
+
statusRef = _useStoreRef.statusRef,
|
31
|
+
netRef = _useStoreRef.netRef,
|
32
|
+
modeRef = _useStoreRef.modeRef,
|
33
|
+
amountRef = _useStoreRef.amountRef,
|
34
|
+
orderIdRef = _useStoreRef.orderIdRef,
|
35
|
+
numRef = _useStoreRef.numRef,
|
36
|
+
deviceRef = _useStoreRef.deviceRef,
|
37
|
+
payRef = _useStoreRef.payRef;
|
38
|
+
var dispatch = useDispatch();
|
39
|
+
var stepRef = useRef(custom === null || custom === void 0 ? void 0 : custom.step);
|
40
|
+
var fail = useFail(0);
|
41
|
+
var failRef = useRef(fail);
|
42
|
+
var initRef = useRef(false);
|
43
|
+
var controllerRef = useRef();
|
44
|
+
var unloadRef = useRef(false);
|
45
|
+
var clearRef = useRef();
|
46
|
+
|
47
|
+
// 检查是否可以继续处理接口返回结果,无网 或 已卸载 则不进行处理
|
48
|
+
var handleCheck = function handleCheck() {
|
49
|
+
return !(unloadRef.current || !netRef.current);
|
50
|
+
};
|
51
|
+
var handleLinklySuccess = function handleLinklySuccess(res) {
|
52
|
+
var resData = (res === null || res === void 0 ? void 0 : res.data) || {};
|
53
|
+
var receipt = Array.isArray(resData === null || resData === void 0 ? void 0 : resData.receipt) ? resData.receipt : [resData.receipt];
|
54
|
+
receipt = receipt.filter(function (item) {
|
55
|
+
return typeof item === 'string';
|
56
|
+
}).filter(Boolean);
|
57
|
+
dispatch(updateNextStep());
|
58
|
+
// 将所有步骤状态设为完成 resolve
|
59
|
+
dispatch(updateCustom({
|
60
|
+
card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
|
61
|
+
receipt: receipt
|
62
|
+
}));
|
63
|
+
|
64
|
+
// 更新支付状态与文案
|
65
|
+
dispatch(updateState({
|
66
|
+
status: 'success',
|
67
|
+
title: locales.getText('page.eftpos-pay.text.successful')(modeRef.current)
|
68
|
+
}));
|
69
|
+
clearRef.current = setTimeout(function () {
|
70
|
+
var _deviceRef$current;
|
71
|
+
var params = getPayParams({
|
72
|
+
mode: modeRef.current,
|
73
|
+
amount: amountRef.current,
|
74
|
+
order_id: orderIdRef.current,
|
75
|
+
number: numRef.current,
|
76
|
+
device: deviceRef.current,
|
77
|
+
pay: payRef.current,
|
78
|
+
custom: {
|
79
|
+
card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
|
80
|
+
receipt: receipt
|
81
|
+
}
|
82
|
+
}, 'success');
|
83
|
+
onChange('success', _objectSpread(_objectSpread({}, params), {}, {
|
84
|
+
receipt: (_deviceRef$current = deviceRef.current) !== null && _deviceRef$current !== void 0 && (_deviceRef$current = _deviceRef$current.setting) !== null && _deviceRef$current !== void 0 && _deviceRef$current.receipts ? [] : receipt
|
85
|
+
}));
|
86
|
+
}, 1000);
|
87
|
+
};
|
88
|
+
var _useLinklyPayOrRefund = useLinklyPayOrRefund(handleCheck),
|
89
|
+
payOrRefund = _useLinklyPayOrRefund.payOrRefund;
|
90
|
+
var _useLinklyCancel = useLinklyCancel(handleCheck),
|
91
|
+
linklyCancel = _useLinklyCancel.linklyCancel;
|
92
|
+
var _useTimeResultQuery = useTimeResultQuery(api, handleCheck, handleLinklySuccess),
|
93
|
+
resultQuery = _useTimeResultQuery.run,
|
94
|
+
stopResultQuery = _useTimeResultQuery.stop;
|
95
|
+
var _useLinklySignature = useLinklySignature(handleCheck),
|
96
|
+
linklySignature = _useLinklySignature.linklySignature;
|
97
|
+
useEffect(function () {
|
98
|
+
stepRef.current = custom === null || custom === void 0 ? void 0 : custom.step;
|
99
|
+
}, [custom === null || custom === void 0 ? void 0 : custom.step]);
|
100
|
+
useEffect(function () {
|
101
|
+
failRef.current = fail;
|
102
|
+
}, [fail]);
|
103
|
+
useEffect(function () {
|
104
|
+
if (statusRef.current === StatusEnum.Success || statusRef.current === StatusEnum.Fail) {
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
if (initRef.current) {
|
108
|
+
return;
|
109
|
+
}
|
110
|
+
initRef.current = true;
|
111
|
+
|
112
|
+
// 存在支付流水号
|
113
|
+
if (numRef.current) {
|
114
|
+
resultQuery();
|
115
|
+
return;
|
116
|
+
}
|
117
|
+
payOrRefund(resultQuery, handleLinklySuccess);
|
118
|
+
}, []);
|
119
|
+
useEffect(function () {
|
120
|
+
return function () {
|
121
|
+
var _controllerRef$curren;
|
122
|
+
(_controllerRef$curren = controllerRef.current) === null || _controllerRef$curren === void 0 || _controllerRef$curren.abort();
|
123
|
+
unloadRef.current = true;
|
124
|
+
if (clearRef.current) {
|
125
|
+
clearTimeout(clearRef.current);
|
126
|
+
}
|
127
|
+
};
|
128
|
+
}, []);
|
129
|
+
|
130
|
+
/**
|
131
|
+
* 取消支付
|
132
|
+
*/
|
133
|
+
var onCancel = function onCancel() {
|
134
|
+
stopResultQuery();
|
135
|
+
linklyCancel(resultQuery);
|
136
|
+
};
|
137
|
+
|
138
|
+
/**
|
139
|
+
* 拒绝签名
|
140
|
+
*/
|
141
|
+
var onDecline = function onDecline() {
|
142
|
+
stopResultQuery();
|
143
|
+
linklySignature(2, resultQuery);
|
144
|
+
};
|
145
|
+
|
146
|
+
/**
|
147
|
+
* 接受签名
|
148
|
+
*/
|
149
|
+
var onAccept = function onAccept() {
|
150
|
+
stopResultQuery();
|
151
|
+
linklySignature(3, resultQuery);
|
152
|
+
};
|
153
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
154
|
+
className: "pisell-lowcode__eft-pay-body"
|
155
|
+
}, ((custom === null || custom === void 0 ? void 0 : custom.list) || []).map(function (item) {
|
156
|
+
return /*#__PURE__*/React.createElement(Step, {
|
157
|
+
key: item.index,
|
158
|
+
pedding: item.pedding,
|
159
|
+
resolve: item.resolve,
|
160
|
+
reject: item.reject,
|
161
|
+
status: item.status
|
162
|
+
});
|
163
|
+
}), status === StatusEnum.Loading ? /*#__PURE__*/React.createElement("div", {
|
164
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
165
|
+
}, locales.getText('page.eftpos-pay.text.processing')) : null, status === StatusEnum.Question ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
166
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
167
|
+
}, locales.getText('page.eftpos-pay.text.receipt.again.title')), /*#__PURE__*/React.createElement("div", {
|
168
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
169
|
+
}, locales.getText('page.eftpos-pay.text.receipt.again.text'))) : null, status === StatusEnum.Success ? /*#__PURE__*/React.createElement("div", {
|
170
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
171
|
+
}, locales.getText('page.eftpos-pay.text.transaction.end')) : null), (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Cancel ? /*#__PURE__*/React.createElement("div", {
|
172
|
+
className: "pisell-lowcode__eft-pay-step-item-btns"
|
173
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
174
|
+
block: true,
|
175
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
176
|
+
onClick: onCancel,
|
177
|
+
disabled: !!(custom !== null && custom !== void 0 && custom.buttonDisabled)
|
178
|
+
}, locales.getText('page.eftpos-pay.text.cancel'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.CancelWaiting || (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.SignatureWaiting ? /*#__PURE__*/React.createElement("div", {
|
179
|
+
className: "pisell-lowcode__eft-pay-step-item-btns"
|
180
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
181
|
+
block: true,
|
182
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
183
|
+
disabled: true
|
184
|
+
}, locales.getText('page.eftpos-pay.text.leave'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Signature ? /*#__PURE__*/React.createElement("div", {
|
185
|
+
className: "pisell-lowcode__eft-pay-step-item-btns"
|
186
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
187
|
+
block: true,
|
188
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
189
|
+
onClick: onDecline
|
190
|
+
}, locales.getText('page.eftpos-pay.text.decline')), /*#__PURE__*/React.createElement(Button, {
|
191
|
+
block: true,
|
192
|
+
type: "primary",
|
193
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
194
|
+
onClick: onAccept
|
195
|
+
}, locales.getText('page.eftpos-pay.text.accept'))) : null);
|
196
|
+
};
|
197
|
+
export default Linkly;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* linkly支付接口
|
3
|
+
*/
|
4
|
+
export declare const linklyPayApi: (data: any) => Promise<any>;
|
5
|
+
/**
|
6
|
+
* 查询linkly支付结果
|
7
|
+
*/
|
8
|
+
export declare const linklyPayQueryApi: (param: any) => Promise<any>;
|
9
|
+
/**
|
10
|
+
* 取消linkly支付
|
11
|
+
*/
|
12
|
+
export declare const linklyPayCancelApi: (param: any) => Promise<any>;
|
13
|
+
/**
|
14
|
+
* linkly支付签名结果处理
|
15
|
+
*/
|
16
|
+
export declare const linklyPaySignatureApi: (param: any) => Promise<any>;
|
17
|
+
/**
|
18
|
+
* linkly退款接口
|
19
|
+
*/
|
20
|
+
export declare const linklyRefundApi: (data: any) => Promise<any>;
|
21
|
+
/**
|
22
|
+
* 查询linkly退款结果
|
23
|
+
*/
|
24
|
+
export declare const linklyRefundQueryApi: (param: any) => Promise<any>;
|
25
|
+
/**
|
26
|
+
* 取消linkly退款
|
27
|
+
*/
|
28
|
+
export declare const linklyRefundCancelApi: (param: any) => Promise<any>;
|
29
|
+
/**
|
30
|
+
* linkly退款签名结果处理
|
31
|
+
*/
|
32
|
+
export declare const linklyRefundSignatureApi: (param: any) => Promise<any>;
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { request } from "../../../utils";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* linkly支付接口
|
5
|
+
*/
|
6
|
+
export var linklyPayApi = function linklyPayApi(data) {
|
7
|
+
return request.getRequest().post('/shop/linkly/pay/apply', data, {
|
8
|
+
customMessage: true,
|
9
|
+
fullResult: true
|
10
|
+
});
|
11
|
+
};
|
12
|
+
|
13
|
+
/**
|
14
|
+
* 查询linkly支付结果
|
15
|
+
*/
|
16
|
+
export var linklyPayQueryApi = function linklyPayQueryApi(param) {
|
17
|
+
return request.getRequest().get('/shop/linkly/pay/query', param, {
|
18
|
+
customMessage: true,
|
19
|
+
fullResult: true
|
20
|
+
});
|
21
|
+
};
|
22
|
+
|
23
|
+
/**
|
24
|
+
* 取消linkly支付
|
25
|
+
*/
|
26
|
+
export var linklyPayCancelApi = function linklyPayCancelApi(param) {
|
27
|
+
return request.getRequest().post('/shop/linkly/pay/cancel', param, {
|
28
|
+
customMessage: true,
|
29
|
+
fullResult: true
|
30
|
+
});
|
31
|
+
};
|
32
|
+
|
33
|
+
/**
|
34
|
+
* linkly支付签名结果处理
|
35
|
+
*/
|
36
|
+
export var linklyPaySignatureApi = function linklyPaySignatureApi(param) {
|
37
|
+
return request.getRequest().post('/shop/linkly/pay/signature', param, {
|
38
|
+
customMessage: true,
|
39
|
+
fullResult: true
|
40
|
+
});
|
41
|
+
};
|
42
|
+
|
43
|
+
/**
|
44
|
+
* linkly退款接口
|
45
|
+
*/
|
46
|
+
export var linklyRefundApi = function linklyRefundApi(data) {
|
47
|
+
return request.getRequest().post('/shop/linkly/refund/apply', data, {
|
48
|
+
customMessage: true,
|
49
|
+
fullResult: true
|
50
|
+
});
|
51
|
+
};
|
52
|
+
|
53
|
+
/**
|
54
|
+
* 查询linkly退款结果
|
55
|
+
*/
|
56
|
+
export var linklyRefundQueryApi = function linklyRefundQueryApi(param) {
|
57
|
+
return request.getRequest().get('/shop/linkly/refund/query', param, {
|
58
|
+
customMessage: true,
|
59
|
+
fullResult: true
|
60
|
+
});
|
61
|
+
};
|
62
|
+
|
63
|
+
/**
|
64
|
+
* 取消linkly退款
|
65
|
+
*/
|
66
|
+
export var linklyRefundCancelApi = function linklyRefundCancelApi(param) {
|
67
|
+
return request.getRequest().post('/shop/linkly/refund/cancel', param, {
|
68
|
+
customMessage: true,
|
69
|
+
fullResult: true
|
70
|
+
});
|
71
|
+
};
|
72
|
+
|
73
|
+
/**
|
74
|
+
* linkly退款签名结果处理
|
75
|
+
*/
|
76
|
+
export var linklyRefundSignatureApi = function linklyRefundSignatureApi(param) {
|
77
|
+
return request.getRequest().post('/shop/linkly/refund/signature', param, {
|
78
|
+
customMessage: true,
|
79
|
+
fullResult: true
|
80
|
+
});
|
81
|
+
};
|
@@ -3,4 +3,5 @@ export { getAmonunt } from './helper';
|
|
3
3
|
export { default as Payo } from './payo';
|
4
4
|
export { default as Windcave } from './windcave/windcave';
|
5
5
|
export { default as Tyro } from './tyro';
|
6
|
+
export { default as Linkly } from './linkly';
|
6
7
|
export declare const getInitState: (type: string, params?: any) => State;
|
@@ -2,10 +2,12 @@ import { EftposEnum } from "./const";
|
|
2
2
|
import getPayoInitState from "./payo/const";
|
3
3
|
import getTyroInitState from "./tyro/const";
|
4
4
|
import getWindcaveInitState from "./windcave/const";
|
5
|
+
import getLinklyInitState from "./linkly/const";
|
5
6
|
export { getAmonunt } from "./helper";
|
6
7
|
export { default as Payo } from "./payo";
|
7
8
|
export { default as Windcave } from "./windcave/windcave";
|
8
9
|
export { default as Tyro } from "./tyro";
|
10
|
+
export { default as Linkly } from "./linkly";
|
9
11
|
export var getInitState = function getInitState(type, params) {
|
10
12
|
switch (type) {
|
11
13
|
case EftposEnum.Payo:
|
@@ -14,6 +16,8 @@ export var getInitState = function getInitState(type, params) {
|
|
14
16
|
return getWindcaveInitState(params);
|
15
17
|
case EftposEnum.Tyro:
|
16
18
|
return getTyroInitState(params);
|
19
|
+
case EftposEnum.Linkly:
|
20
|
+
return getLinklyInitState(params);
|
17
21
|
default:
|
18
22
|
throw new Error('未知的厂商类型');
|
19
23
|
}
|
@@ -6,7 +6,7 @@ import './index.less';
|
|
6
6
|
* @Author: hongbing.wang
|
7
7
|
* @Date: 2024-08-20 14:59
|
8
8
|
*/
|
9
|
-
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client }: PayProps & {
|
9
|
+
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client, }: PayProps & {
|
10
10
|
terminal: {
|
11
11
|
network: boolean;
|
12
12
|
};
|
@@ -10,7 +10,7 @@ import { getPayParams } from "./helper";
|
|
10
10
|
import Manual from "./component/manual";
|
11
11
|
import Signature from "./component/signature";
|
12
12
|
import { StatusEnum, PayRouteEnum, ClientEnum } from "./const";
|
13
|
-
import { Payo, Windcave, Tyro } from "./manufacturer";
|
13
|
+
import { Payo, Windcave, Tyro, Linkly } from "./manufacturer";
|
14
14
|
import { useContextData, useDispatch, updateStatus, backUpProduction, updateComponent, backUpFree, updateState } from "./store";
|
15
15
|
import "./index.less";
|
16
16
|
|
@@ -150,7 +150,7 @@ var Pay = function Pay(_ref) {
|
|
150
150
|
}
|
151
151
|
};
|
152
152
|
}, []);
|
153
|
-
|
153
|
+
console.log('data =>>>>>> ', data);
|
154
154
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.render ? /*#__PURE__*/React.createElement("div", {
|
155
155
|
className: "pisell-lowcode__eft-pay-box ".concat(className),
|
156
156
|
style: data.type === 'step' ? {} : {
|
@@ -178,6 +178,10 @@ var Pay = function Pay(_ref) {
|
|
178
178
|
onChange: onChange,
|
179
179
|
key: data.key,
|
180
180
|
formatAmount: formatAmount
|
181
|
+
}) : null, data.eftpos === 'linkly' ? /*#__PURE__*/React.createElement(Linkly, {
|
182
|
+
key: data.key,
|
183
|
+
api: api,
|
184
|
+
onChange: onChange
|
181
185
|
}) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
|
182
186
|
onChange: onChange,
|
183
187
|
api: api,
|
@@ -20,7 +20,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
20
20
|
/* eslint-disable @typescript-eslint/naming-convention */
|
21
21
|
import { locales } from '@pisell/utils';
|
22
22
|
import { Button } from 'antd';
|
23
|
-
import React, { useEffect, useRef } from 'react';
|
23
|
+
import React, { useEffect, useRef, useState } from 'react';
|
24
24
|
import Step from "../component/step";
|
25
25
|
import { PayStatus, StatusEnum, ModeEnum, ClientEnum } from "../const";
|
26
26
|
import { getUuid, getPayParams } from "../helper";
|
@@ -224,7 +224,22 @@ export var Action = function Action(_ref2) {
|
|
224
224
|
var dispatch = useDispatch();
|
225
225
|
var _useContextData2 = useContextData(),
|
226
226
|
mode = _useContextData2.mode,
|
227
|
-
client = _useContextData2.client
|
227
|
+
client = _useContextData2.client,
|
228
|
+
order_id = _useContextData2.order_id,
|
229
|
+
number = _useContextData2.number,
|
230
|
+
device = _useContextData2.device;
|
231
|
+
var _useState = useState(false),
|
232
|
+
_useState2 = _slicedToArray(_useState, 2),
|
233
|
+
isShowCancel = _useState2[0],
|
234
|
+
setIsShowCancel = _useState2[1];
|
235
|
+
useEffect(function () {
|
236
|
+
var timer = setTimeout(function () {
|
237
|
+
setIsShowCancel(true);
|
238
|
+
}, 30 * 1000);
|
239
|
+
return function () {
|
240
|
+
clearTimeout(timer);
|
241
|
+
};
|
242
|
+
}, []);
|
228
243
|
|
229
244
|
/**
|
230
245
|
* @title: 前往手动标记页
|
@@ -240,9 +255,21 @@ export var Action = function Action(_ref2) {
|
|
240
255
|
}));
|
241
256
|
dispatch(updateComponent('Manual', true));
|
242
257
|
};
|
258
|
+
var onCancel = function onCancel() {
|
259
|
+
onChange('fail', {
|
260
|
+
number: number,
|
261
|
+
uniquePaymentNumber: number,
|
262
|
+
device: device,
|
263
|
+
order_id: order_id
|
264
|
+
});
|
265
|
+
};
|
243
266
|
return /*#__PURE__*/React.createElement("div", {
|
244
267
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
245
|
-
}, client
|
268
|
+
}, client !== ClientEnum.Merchant && isShowCancel && /*#__PURE__*/React.createElement(Button, {
|
269
|
+
block: true,
|
270
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
271
|
+
onClick: onCancel
|
272
|
+
}, locales.getText('page.eftpos-pay.text.cancel')), client === ClientEnum.Merchant ? /*#__PURE__*/React.createElement(Button, {
|
246
273
|
block: true,
|
247
274
|
className: "pisell-lowcode__eft-pay-step-item-btn",
|
248
275
|
onClick: onManually
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
175
175
|
type: EActionTypes;
|
176
176
|
payload: {
|
177
|
-
status: "
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "refund" | "
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
|
-
eftpos?: "tyro" | "windcave" | "
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "step" | "unset" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useMemo, useState } from 'react';
|
17
17
|
import { locales } from '@pisell/utils';
|
18
18
|
import { Button, PisellToast } from '@pisell/materials';
|
19
|
-
import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer } from "../../../../../Sales";
|
19
|
+
import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer, useSummary } from "../../../../../Sales";
|
20
20
|
import { formatValues, getFormParams } from "../../../../../Sales/Checkout/utils";
|
21
21
|
import OrderProductModal from "../../OrderProductModal/index";
|
22
22
|
import EmptyHolderModal from "../../EmptyHolderModal";
|
@@ -24,6 +24,7 @@ import { getProductPrice } from "../../../../../Sales/Event/serve";
|
|
24
24
|
import { useRequest } from 'ahooks';
|
25
25
|
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
26
26
|
import "./index.less";
|
27
|
+
import { Toast } from "../../../../../appointmentBooking/utils";
|
27
28
|
var ContinueButton = function ContinueButton() {
|
28
29
|
var _context$appHelper, _cartData$cartItems;
|
29
30
|
var _useSales = useSales(),
|
@@ -43,10 +44,14 @@ var ContinueButton = function ContinueButton() {
|
|
43
44
|
onCheckout = _useCheckout.onCheckout,
|
44
45
|
createBooking = _useCheckout.createBooking,
|
45
46
|
onCheckBeforeBooking = _useCheckout.onCheckBeforeBooking,
|
46
|
-
checkBeforeBooking = _useCheckout.checkBeforeBooking
|
47
|
+
checkBeforeBooking = _useCheckout.checkBeforeBooking,
|
48
|
+
freePay = _useCheckout.freePay;
|
47
49
|
var _useCustomer = useCustomer(),
|
48
50
|
openLoginModal = _useCustomer.openLoginModal,
|
49
51
|
isLogin = _useCustomer.isLogin;
|
52
|
+
var _useSummary = useSummary(),
|
53
|
+
deposit = _useSummary.deposit,
|
54
|
+
isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy;
|
50
55
|
|
51
56
|
// 下单之前是否检测失败
|
52
57
|
var _useState = useState(false),
|
@@ -90,6 +95,7 @@ var ContinueButton = function ContinueButton() {
|
|
90
95
|
data: params,
|
91
96
|
callback: function () {
|
92
97
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
98
|
+
var _context$appHelper2;
|
93
99
|
var value, result, _result$err;
|
94
100
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
95
101
|
while (1) switch (_context.prev = _context.next) {
|
@@ -100,8 +106,13 @@ var ContinueButton = function ContinueButton() {
|
|
100
106
|
}
|
101
107
|
return _context.abrupt("return");
|
102
108
|
case 2:
|
103
|
-
value = formatValues(
|
104
|
-
|
109
|
+
value = formatValues({
|
110
|
+
state: data,
|
111
|
+
platform: context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.constants) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.platform,
|
112
|
+
excludeDisabled: false,
|
113
|
+
extra: {
|
114
|
+
relation_forms: e
|
115
|
+
}
|
105
116
|
}); // 如果检测成功,则直接下单
|
106
117
|
_context.next = 5;
|
107
118
|
return onCheckout(value);
|
@@ -384,41 +395,51 @@ var ContinueButton = function ContinueButton() {
|
|
384
395
|
*/
|
385
396
|
var handleContinue = /*#__PURE__*/function () {
|
386
397
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
387
|
-
var value, checkRes, emptyHolders;
|
398
|
+
var _context$appHelper3, _deposit$protocols, value, checkRes, emptyHolders;
|
388
399
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
389
400
|
while (1) switch (_context6.prev = _context6.next) {
|
390
401
|
case 0:
|
391
402
|
if (!isLastStep) {
|
392
|
-
_context6.next =
|
403
|
+
_context6.next = 17;
|
404
|
+
break;
|
405
|
+
}
|
406
|
+
value = formatValues({
|
407
|
+
state: data,
|
408
|
+
platform: context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.constants) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.platform
|
409
|
+
}); // 如果未同意定金政策,则提示
|
410
|
+
if (!(deposit !== null && deposit !== void 0 && deposit.hasDeposit && (deposit === null || deposit === void 0 || (_deposit$protocols = deposit.protocols) === null || _deposit$protocols === void 0 ? void 0 : _deposit$protocols.length) > 0 && !isAgreeDepositPolicy)) {
|
411
|
+
_context6.next = 5;
|
393
412
|
break;
|
394
413
|
}
|
395
|
-
|
396
|
-
_context6.
|
414
|
+
Toast(locales.getText('pisell2.appointment.deposit.agree.policy'));
|
415
|
+
return _context6.abrupt("return");
|
416
|
+
case 5:
|
417
|
+
_context6.next = 7;
|
397
418
|
return onCheckBeforeBooking(value);
|
398
|
-
case
|
419
|
+
case 7:
|
399
420
|
checkRes = _context6.sent;
|
400
421
|
if (!((checkRes === null || checkRes === void 0 ? void 0 : checkRes.result) === false)) {
|
401
|
-
_context6.next =
|
422
|
+
_context6.next = 12;
|
402
423
|
break;
|
403
424
|
}
|
404
425
|
setCheckedNumber(checkRes === null || checkRes === void 0 ? void 0 : checkRes.num);
|
405
426
|
setOpenCheckout(true);
|
406
427
|
return _context6.abrupt("return");
|
407
|
-
case
|
428
|
+
case 12:
|
408
429
|
// 验证holder是否为空
|
409
430
|
emptyHolders = getWithoutCartItemsHolderNames();
|
410
431
|
if (!((emptyHolders === null || emptyHolders === void 0 ? void 0 : emptyHolders.length) > 0)) {
|
411
|
-
_context6.next =
|
432
|
+
_context6.next = 15;
|
412
433
|
break;
|
413
434
|
}
|
414
435
|
return _context6.abrupt("return", setOpenEmptyHolder(true));
|
415
|
-
case
|
436
|
+
case 15:
|
416
437
|
// 关闭购物车弹窗
|
417
438
|
onCloseCart();
|
418
439
|
return _context6.abrupt("return", handleCheckout());
|
419
|
-
case
|
440
|
+
case 17:
|
420
441
|
if (isLogin()) {
|
421
|
-
_context6.next =
|
442
|
+
_context6.next = 20;
|
422
443
|
break;
|
423
444
|
}
|
424
445
|
onCloseCart();
|
@@ -448,9 +469,9 @@ var ContinueButton = function ContinueButton() {
|
|
448
469
|
return callback;
|
449
470
|
}()
|
450
471
|
}));
|
451
|
-
case
|
472
|
+
case 20:
|
452
473
|
handleHolder();
|
453
|
-
case
|
474
|
+
case 21:
|
454
475
|
case "end":
|
455
476
|
return _context6.stop();
|
456
477
|
}
|
@@ -487,8 +508,8 @@ var ContinueButton = function ContinueButton() {
|
|
487
508
|
*/
|
488
509
|
var confirmLoading = useMemo(function () {
|
489
510
|
if (!isLastStep) return false;
|
490
|
-
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
|
491
|
-
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
|
511
|
+
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading) || (freePay === null || freePay === void 0 ? void 0 : freePay.loading);
|
512
|
+
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading, freePay === null || freePay === void 0 ? void 0 : freePay.loading]);
|
492
513
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
493
514
|
disabled: !(cartData !== null && cartData !== void 0 && (_cartData$cartItems = cartData.cartItems) !== null && _cartData$cartItems !== void 0 && _cartData$cartItems.length),
|
494
515
|
size: "large",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useSummary } from "../../../../../Sales";
|
3
|
+
import { DepositContent } from "../../../../../appointmentBooking/components/Deposit";
|
4
|
+
var Deposit = function Deposit() {
|
5
|
+
var _useSummary = useSummary(),
|
6
|
+
deposit = _useSummary.deposit,
|
7
|
+
isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy,
|
8
|
+
setIsAgreeDepositPolicy = _useSummary.setIsAgreeDepositPolicy,
|
9
|
+
getDepositProtocol = _useSummary.getDepositProtocol;
|
10
|
+
return /*#__PURE__*/React.createElement(DepositContent, {
|
11
|
+
isAgreeDepositPolicy: !!isAgreeDepositPolicy,
|
12
|
+
setIsAgreeDepositPolicy: setIsAgreeDepositPolicy,
|
13
|
+
deposit: deposit,
|
14
|
+
depositProtocolRequest: getDepositProtocol
|
15
|
+
});
|
16
|
+
};
|
17
|
+
export default Deposit;
|