@pisell/private-materials 3.3.88 → 3.3.90
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 +8 -8
- 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 +1 -0
- package/es/components/Sales/Cart/index.js +5 -1
- package/es/components/Sales/Cart/utils.d.ts +40 -0
- package/es/components/Sales/Cart/utils.js +167 -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.js +7 -1
- 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.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -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/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Services/index.js +23 -27
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
- package/es/components/appointmentBooking/deposit/index.js +4 -2
- package/es/components/appointmentBooking/index.js +14 -0
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -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 +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +3 -2
- 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/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/utilsByBooking.js +9 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- 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 +318 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
- 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 +73 -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/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.js +12 -2
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -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/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +22 -4
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- 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 +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +5 -4
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/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 +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +257 -138
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/Sales/Cart/index.js +1 -0
- package/lib/components/Sales/Cart/utils.d.ts +40 -0
- package/lib/components/Sales/Cart/utils.js +117 -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.js +2 -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.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -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/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Services/index.js +6 -11
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
- package/lib/components/appointmentBooking/deposit/index.js +4 -2
- package/lib/components/appointmentBooking/index.js +11 -0
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +2 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -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/booking/editBookingModal/type.js +17 -0
- 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 +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +2 -2
- 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/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/utilsByBooking.js +6 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- 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/eftposPay/linkly/hooks/index.js +25 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/normal.js +239 -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/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.js +11 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
- 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/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +10 -4
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- 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 +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/stepController/components/Content/index.d.ts +7 -0
- package/lib/components/stepController/components/Content/index.js +40 -0
- package/lib/components/stepController/components/Content/index.less +8 -0
- package/lib/components/stepController/components/Footer/index.d.ts +8 -0
- package/lib/components/stepController/components/Footer/index.js +49 -0
- package/lib/components/stepController/components/Footer/index.less +39 -0
- package/lib/components/stepController/components/Header/index.d.ts +20 -0
- package/lib/components/stepController/components/Header/index.js +104 -0
- package/lib/components/stepController/components/Header/index.less +21 -0
- package/lib/components/stepController/index.d.ts +5 -0
- package/lib/components/stepController/index.js +89 -0
- package/lib/components/stepController/index.less +11 -0
- package/lib/components/stepController/locales.d.ts +27 -0
- package/lib/components/stepController/locales.js +50 -0
- package/lib/components/stepController/types.d.ts +23 -0
- package/lib/components/stepController/types.js +17 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +263 -139
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/edit-booking-modal/meta.ts +53 -0
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +4 -4
|
@@ -128,6 +128,7 @@ export default {
|
|
|
128
128
|
'pisell1.text.resource-error-message-3': function pisell1TextResourceErrorMessage3(x, y, z) {
|
|
129
129
|
return "".concat(x, " is fully booked between ").concat(y, " and ").concat(z, ", but your team member can still book appointments.");
|
|
130
130
|
},
|
|
131
|
+
'pisell1.text.resource-error-message-unbound': 'This booking product is not associated with the target resource.',
|
|
131
132
|
'pisell1.text.no-addons': 'No addons',
|
|
132
133
|
'pisell1.text.no-resource': 'No resource',
|
|
133
134
|
'pisell1.text.no-payments': 'No payments',
|
|
@@ -454,6 +455,7 @@ export default {
|
|
|
454
455
|
'pisell1.text.resource-error-message-3': function pisell1TextResourceErrorMessage3(x, y, z) {
|
|
455
456
|
return "".concat(x, "\u5728").concat(y, "\u5230").concat(z, "\u4E4B\u95F4\u5DF2\u7EA6\u6EE1\uFF0C\u4F46\u60A8\u7684\u56E2\u961F\u6210\u5458\u4ECD\u7136\u53EF\u4EE5\u9884\u7EA6\u3002");
|
|
456
457
|
},
|
|
458
|
+
'pisell1.text.resource-error-message-unbound': '该预约商品未关联目标资源。',
|
|
457
459
|
'pisell2.text.flexible': "灵活",
|
|
458
460
|
'pisell2.text.order-discount': "折扣",
|
|
459
461
|
'pisell2.text.no-product-added': '未添加商品',
|
|
@@ -772,6 +774,7 @@ export default {
|
|
|
772
774
|
'pisell1.text.resource-error-message-3': function pisell1TextResourceErrorMessage3(x, y, z) {
|
|
773
775
|
return "".concat(x, "\u5728").concat(y, "\u5230").concat(z, "\u4E4B\u9593\u5DF2\u7D04\u6EFF\uFF0C\u4F46\u60A8\u7684\u5718\u968A\u6210\u54E1\u4ECD\u7136\u53EF\u4EE5\u9810\u7D04\u3002");
|
|
774
776
|
},
|
|
777
|
+
'pisell1.text.resource-error-message-unbound': '該預約商品未關聯目標資源。',
|
|
775
778
|
'pisell2.text.flexible': "靈活",
|
|
776
779
|
'pisell2.text.order-discount': "折扣",
|
|
777
780
|
'pisell2.text.no-product-added': '未添加商品',
|
|
@@ -5,7 +5,8 @@ export declare enum EftposEnum {
|
|
|
5
5
|
Tyro = "tyro",
|
|
6
6
|
/** 后端支付 - 支付 + 退款 */
|
|
7
7
|
Windcave = "windcave",
|
|
8
|
-
Stripe = "stripe"
|
|
8
|
+
Stripe = "stripe",
|
|
9
|
+
Linkly = "linkly"
|
|
9
10
|
}
|
|
10
11
|
export declare enum StatusEnum {
|
|
11
12
|
Loading = "loading",
|
|
@@ -147,6 +148,8 @@ export declare enum PayStatus {
|
|
|
147
148
|
'Success' = "200",
|
|
148
149
|
/** 未生成交易记录 */
|
|
149
150
|
'NoPay' = "4004",
|
|
151
|
+
/** 配对失效 */
|
|
152
|
+
'PairingFailure' = "606020",
|
|
150
153
|
/** 支付失败 */
|
|
151
154
|
'Unknown' = "701000",
|
|
152
155
|
/** 交易请求超时 */
|
|
@@ -3,8 +3,9 @@ export var EftposEnum = /*#__PURE__*/function (EftposEnum) {
|
|
|
3
3
|
EftposEnum["Tyro"] = "tyro";
|
|
4
4
|
EftposEnum["Windcave"] = "windcave";
|
|
5
5
|
EftposEnum["Stripe"] = "stripe";
|
|
6
|
+
EftposEnum["Linkly"] = "linkly";
|
|
6
7
|
return EftposEnum;
|
|
7
|
-
}({});
|
|
8
|
+
}({});
|
|
8
9
|
export var StatusEnum = /*#__PURE__*/function (StatusEnum) {
|
|
9
10
|
StatusEnum["Loading"] = "loading";
|
|
10
11
|
StatusEnum["Warn"] = "warn";
|
|
@@ -64,6 +65,7 @@ export var PayRouteEnum = /*#__PURE__*/function (PayRouteEnum) {
|
|
|
64
65
|
export var PayStatus = /*#__PURE__*/function (PayStatus) {
|
|
65
66
|
PayStatus["Success"] = "200";
|
|
66
67
|
PayStatus["NoPay"] = "4004";
|
|
68
|
+
PayStatus["PairingFailure"] = "606020";
|
|
67
69
|
PayStatus["Unknown"] = "701000";
|
|
68
70
|
PayStatus["Timeout"] = "701001";
|
|
69
71
|
PayStatus["PayOtherEftposFailed"] = "701003";
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo">;
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -139,6 +139,7 @@ export var useFail = function useFail(index) {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
var code = "".concat(res.code);
|
|
142
|
+
console.log('code---->>>>>>>', code);
|
|
142
143
|
if (code === PayStatus.Unknown) {
|
|
143
144
|
// 前往报错页 不可标记
|
|
144
145
|
steps[index].title = locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
|
|
@@ -224,6 +225,7 @@ export var useFail = function useFail(index) {
|
|
|
224
225
|
dispatch(updateComponent('Fail'));
|
|
225
226
|
return;
|
|
226
227
|
}
|
|
228
|
+
|
|
227
229
|
// 重新支付 最多到重新发起2次
|
|
228
230
|
ref.current += 1;
|
|
229
231
|
dispatch(updateState({
|
|
@@ -300,7 +302,7 @@ export var useFail = function useFail(index) {
|
|
|
300
302
|
}));
|
|
301
303
|
return;
|
|
302
304
|
}
|
|
303
|
-
if (code === PayStatus.UserConfigError) {
|
|
305
|
+
if (code === PayStatus.UserConfigError || code === PayStatus.PairingFailure) {
|
|
304
306
|
// 前往错误页 不可标记状态
|
|
305
307
|
steps[index].title = locales.getText('page.eftpos-pay.text.transaction.user.config.title');
|
|
306
308
|
steps[index].fail = locales.getText('page.eftpos-pay.text.transaction.user.config.text');
|
|
@@ -163,7 +163,7 @@ export default (function (props) {
|
|
|
163
163
|
}, [mode, state]);
|
|
164
164
|
useEffect(function () {
|
|
165
165
|
document.body.id = 'body';
|
|
166
|
-
console.log('初始化 ........
|
|
166
|
+
console.log('初始化 ........112218017777');
|
|
167
167
|
}, []);
|
|
168
168
|
|
|
169
169
|
// console.log('action = ', action);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { State } from '../store';
|
|
2
|
+
import { ModeEnum } from '../const';
|
|
3
|
+
export declare const getStep: (mode?: ModeEnum) => State['steps'];
|
|
4
|
+
declare const _default: (params: any) => State;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare enum EVisibleButtonType {
|
|
7
|
+
/** 取消按钮 */
|
|
8
|
+
CancelButton = "CancelButton",
|
|
9
|
+
/** 等待按钮 */
|
|
10
|
+
WaitButton = "WaitButton"
|
|
11
|
+
}
|
|
12
|
+
export declare enum LinklyActionStatus {
|
|
13
|
+
/** 空 */
|
|
14
|
+
Empty = "Empty",
|
|
15
|
+
/** 取消 */
|
|
16
|
+
Cancel = "Cancel",
|
|
17
|
+
/** 取消中 */
|
|
18
|
+
CancelWaiting = "CancelWaiting",
|
|
19
|
+
/** 签名 */
|
|
20
|
+
Signature = "Signature",
|
|
21
|
+
/** 签名等待中 */
|
|
22
|
+
SignatureWaiting = "SignatureWaiting"
|
|
23
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
var _excluded = ["order_id", "name", "symbol", "amount", "mode", "number", "pay", "device", "net", "client"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import { locales } from '@pisell/utils';
|
|
11
|
+
import { ClientEnum, EftposEnum, ModeEnum, PayRouteEnum, StatusEnum } from "../const";
|
|
12
|
+
export var getStep = function getStep() {
|
|
13
|
+
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ModeEnum.Pay;
|
|
14
|
+
return [{
|
|
15
|
+
key: Date.now(),
|
|
16
|
+
title: locales.getText('page.eftpos-pay.text.loading')(mode),
|
|
17
|
+
// 'Payment in process...',
|
|
18
|
+
text: locales.getText('page.eftpos-pay.text.waiting.processing'),
|
|
19
|
+
// 'Waiting for the processing...',
|
|
20
|
+
warn: '',
|
|
21
|
+
tip: locales.getText('page.eftpos-pay.text.processing'),
|
|
22
|
+
// 'processing...',
|
|
23
|
+
status: StatusEnum.Loading
|
|
24
|
+
}];
|
|
25
|
+
};
|
|
26
|
+
export default (function (params) {
|
|
27
|
+
var _ref = params || {
|
|
28
|
+
mode: ModeEnum.Pay
|
|
29
|
+
},
|
|
30
|
+
order_id = _ref.order_id,
|
|
31
|
+
name = _ref.name,
|
|
32
|
+
symbol = _ref.symbol,
|
|
33
|
+
amount = _ref.amount,
|
|
34
|
+
mode = _ref.mode,
|
|
35
|
+
number = _ref.number,
|
|
36
|
+
pay = _ref.pay,
|
|
37
|
+
device = _ref.device,
|
|
38
|
+
net = _ref.net,
|
|
39
|
+
client = _ref.client,
|
|
40
|
+
other = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
console.log('params =>>>>>> ', params);
|
|
42
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
43
|
+
order_id: order_id,
|
|
44
|
+
name: name,
|
|
45
|
+
symbol: symbol,
|
|
46
|
+
amount: amount,
|
|
47
|
+
mode: mode,
|
|
48
|
+
eftpos: EftposEnum.Linkly,
|
|
49
|
+
key: Date.now(),
|
|
50
|
+
step: 0,
|
|
51
|
+
type: PayRouteEnum.Step,
|
|
52
|
+
title: locales.getText('page.eftpos-pay.text.loading')(mode),
|
|
53
|
+
component: '',
|
|
54
|
+
status: StatusEnum.Loading,
|
|
55
|
+
steps: getStep(mode),
|
|
56
|
+
render: true,
|
|
57
|
+
client: client !== 'undefined' ? client : ClientEnum.Merchant,
|
|
58
|
+
warn: '',
|
|
59
|
+
custom: other || {}
|
|
60
|
+
}, typeof net !== 'undefined' ? {
|
|
61
|
+
net: net
|
|
62
|
+
} : {}), typeof number !== 'undefined' ? {
|
|
63
|
+
number: number
|
|
64
|
+
} : {}), typeof pay !== 'undefined' ? {
|
|
65
|
+
pay: pay
|
|
66
|
+
} : {}), typeof device !== 'undefined' ? {
|
|
67
|
+
device: device
|
|
68
|
+
} : {});
|
|
69
|
+
});
|
|
70
|
+
export var EVisibleButtonType = /*#__PURE__*/function (EVisibleButtonType) {
|
|
71
|
+
EVisibleButtonType["CancelButton"] = "CancelButton";
|
|
72
|
+
EVisibleButtonType["WaitButton"] = "WaitButton";
|
|
73
|
+
return EVisibleButtonType;
|
|
74
|
+
}({});
|
|
75
|
+
export var LinklyActionStatus = /*#__PURE__*/function (LinklyActionStatus) {
|
|
76
|
+
LinklyActionStatus["Empty"] = "Empty";
|
|
77
|
+
LinklyActionStatus["Cancel"] = "Cancel";
|
|
78
|
+
LinklyActionStatus["CancelWaiting"] = "CancelWaiting";
|
|
79
|
+
LinklyActionStatus["Signature"] = "Signature";
|
|
80
|
+
LinklyActionStatus["SignatureWaiting"] = "SignatureWaiting";
|
|
81
|
+
return LinklyActionStatus;
|
|
82
|
+
}({});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 支付或退款
|
|
3
|
+
* @param failAction 失败回调
|
|
4
|
+
*/
|
|
5
|
+
export declare const useLinklyPayOrRefund: (handleCheck: () => boolean) => {
|
|
6
|
+
action: {
|
|
7
|
+
pay: import("ahooks/lib/useRequest/src/types").Result<any, [data: any]>;
|
|
8
|
+
};
|
|
9
|
+
payOrRefund: (resultQuery: any, handleLinklySuccess: any) => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @title: 取消支付或退款
|
|
13
|
+
* @description: 取消支付或退款调用接口后不管成功还是失败都需要调用支付查询接口
|
|
14
|
+
*/
|
|
15
|
+
export declare const useLinklyCancel: (handleCheck: () => boolean) => {
|
|
16
|
+
action: {
|
|
17
|
+
cancel: import("ahooks/lib/useRequest/src/types").Result<any, [param: any]>;
|
|
18
|
+
};
|
|
19
|
+
linklyCancel: (resultQuery: any) => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @title: 支付或退款签名
|
|
23
|
+
* @description: 支付或退款签名调用接口后不管成功还是失败都需要调用支付查询接口
|
|
24
|
+
*/
|
|
25
|
+
export declare const useLinklySignature: (handleCheck: () => boolean) => {
|
|
26
|
+
action: {
|
|
27
|
+
signature: import("ahooks/lib/useRequest/src/types").Result<any, [param: any]>;
|
|
28
|
+
};
|
|
29
|
+
linklySignature: (status: number, resultQuery: any) => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { useRequest } from 'ahooks';
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { locales, sendWarningLog } from '@pisell/utils';
|
|
4
|
+
import { linklyPayCancelApi, linklyPayApi, linklyRefundCancelApi, linklyRefundApi, linklyPaySignatureApi, linklyRefundSignatureApi } from "../service";
|
|
5
|
+
import { useFail, useStoreRef } from "../../hooks";
|
|
6
|
+
import { ModeEnum, PayStatus, StatusEnum } from "../../const";
|
|
7
|
+
import { useDispatch, updateState, updateCustom, updateStatus } from "../../store";
|
|
8
|
+
import { LinklyActionStatus } from "../const";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 支付或退款
|
|
12
|
+
* @param failAction 失败回调
|
|
13
|
+
*/
|
|
14
|
+
export var useLinklyPayOrRefund = function useLinklyPayOrRefund(handleCheck) {
|
|
15
|
+
var dispatch = useDispatch();
|
|
16
|
+
var _useStoreRef = useStoreRef(),
|
|
17
|
+
numRef = _useStoreRef.numRef,
|
|
18
|
+
modeRef = _useStoreRef.modeRef,
|
|
19
|
+
orderIdRef = _useStoreRef.orderIdRef,
|
|
20
|
+
deviceRef = _useStoreRef.deviceRef,
|
|
21
|
+
payRef = _useStoreRef.payRef,
|
|
22
|
+
amountRef = _useStoreRef.amountRef;
|
|
23
|
+
var fail = useFail(0);
|
|
24
|
+
var failRef = useRef(fail);
|
|
25
|
+
var resultQueryRef = useRef(null);
|
|
26
|
+
var handleLinklySuccessRef = useRef(null);
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
failRef.current = fail;
|
|
29
|
+
}, [fail]);
|
|
30
|
+
var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
|
|
31
|
+
var _pay = useRequest(isPay ? linklyPayApi : linklyRefundApi, {
|
|
32
|
+
manual: true,
|
|
33
|
+
onSuccess: function onSuccess(res) {
|
|
34
|
+
_onSuccess(res);
|
|
35
|
+
},
|
|
36
|
+
onError: function onError(error) {
|
|
37
|
+
_onError(error);
|
|
38
|
+
|
|
39
|
+
// TODO: mock数据
|
|
40
|
+
// console.log('mock>>>>>>');
|
|
41
|
+
// const res = {
|
|
42
|
+
// status: true,
|
|
43
|
+
// code: 200,
|
|
44
|
+
// message: '',
|
|
45
|
+
// data: {
|
|
46
|
+
// pinpad_id: 3,
|
|
47
|
+
// is_auto_print: 0,
|
|
48
|
+
// session_id: '923d4abe-6521-43c8-915b-decde8b406bd',
|
|
49
|
+
// status: 0,
|
|
50
|
+
// response_code: '00',
|
|
51
|
+
// response_text: 'APPROVED',
|
|
52
|
+
// signature_flag: 0,
|
|
53
|
+
// },
|
|
54
|
+
// };
|
|
55
|
+
// onSuccess(res, isPay ? 'pay' : 'refund');
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
var _onSuccess = function _onSuccess(res) {
|
|
59
|
+
var _res$data;
|
|
60
|
+
console.log("linkly".concat(isPay ? 'Pay' : 'Refund', "Success---->>>>>>>"), res);
|
|
61
|
+
if (!handleCheck()) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
sendWarningLog({
|
|
65
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u63A5\u53E3\u6210\u529F"),
|
|
66
|
+
content: [{
|
|
67
|
+
key: 'response',
|
|
68
|
+
value: JSON.stringify(res)
|
|
69
|
+
}]
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// status 交易状态 0:未知,继续查询 1:成功 -1:失败 -2:交易错误
|
|
73
|
+
// signature_flag 是否弹框确认签名 0:不用签名 1:等待签名确认 2:签名取消 3:签名确认
|
|
74
|
+
var status = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status;
|
|
75
|
+
|
|
76
|
+
// 继续查询交易状态
|
|
77
|
+
if (status === 0) {
|
|
78
|
+
var _res$data2, _resultQueryRef$curre;
|
|
79
|
+
// 交易流水号
|
|
80
|
+
numRef.current = res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.session_id;
|
|
81
|
+
dispatch(updateState({
|
|
82
|
+
number: numRef.current
|
|
83
|
+
}));
|
|
84
|
+
// 需要展示取消按钮
|
|
85
|
+
dispatch(updateCustom({
|
|
86
|
+
actionStatus: LinklyActionStatus.Cancel
|
|
87
|
+
}));
|
|
88
|
+
// 调用支付查询接口
|
|
89
|
+
(_resultQueryRef$curre = resultQueryRef.current) === null || _resultQueryRef$curre === void 0 || _resultQueryRef$curre.call(resultQueryRef);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 无需展示取消按钮
|
|
94
|
+
dispatch(updateCustom({
|
|
95
|
+
actionStatus: LinklyActionStatus.Empty
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
// 交易成功
|
|
99
|
+
if (status === 1) {
|
|
100
|
+
var _handleLinklySuccessR;
|
|
101
|
+
(_handleLinklySuccessR = handleLinklySuccessRef.current) === null || _handleLinklySuccessR === void 0 || _handleLinklySuccessR.call(handleLinklySuccessRef, res);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 交易失败
|
|
106
|
+
if (status < 0) {
|
|
107
|
+
var _failRef$current;
|
|
108
|
+
// 需要特殊处理,将code码转换为支付失败code码
|
|
109
|
+
res.code = PayStatus.Unknown;
|
|
110
|
+
(_failRef$current = failRef.current) === null || _failRef$current === void 0 || _failRef$current.call(failRef, res, false);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var _onError = function _onError(error) {
|
|
114
|
+
var _failRef$current2;
|
|
115
|
+
console.log("linkly".concat(isPay ? 'Pay' : 'Refund', "Error---->>>>>>>"), error);
|
|
116
|
+
// 无网 或 已卸载 则不进行处理
|
|
117
|
+
if (!handleCheck()) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
sendWarningLog({
|
|
121
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u63A5\u53E3\u5931\u8D25"),
|
|
122
|
+
content: [{
|
|
123
|
+
key: 'error',
|
|
124
|
+
value: JSON.stringify(error)
|
|
125
|
+
}]
|
|
126
|
+
});
|
|
127
|
+
(_failRef$current2 = failRef.current) === null || _failRef$current2 === void 0 || _failRef$current2.call(failRef, error, false);
|
|
128
|
+
};
|
|
129
|
+
var payOrRefund = function payOrRefund(resultQuery, handleLinklySuccess) {
|
|
130
|
+
var _deviceRef$current, _payRef$current;
|
|
131
|
+
handleLinklySuccessRef.current = handleLinklySuccess;
|
|
132
|
+
resultQueryRef.current = resultQuery;
|
|
133
|
+
var param = {
|
|
134
|
+
// 订单id
|
|
135
|
+
order_id: orderIdRef.current,
|
|
136
|
+
// 设备id
|
|
137
|
+
pinpad_id: deviceRef === null || deviceRef === void 0 || (_deviceRef$current = deviceRef.current) === null || _deviceRef$current === void 0 || (_deviceRef$current = _deviceRef$current.metadata) === null || _deviceRef$current === void 0 ? void 0 : _deviceRef$current.linkly_pinpad_id,
|
|
138
|
+
// 交易金额, 包含选择的订单金额+手续费,订单金额+手续费=交易金额
|
|
139
|
+
amount: isPay ? (_payRef$current = payRef.current) === null || _payRef$current === void 0 ? void 0 : _payRef$current.total : amountRef.current
|
|
140
|
+
};
|
|
141
|
+
sendWarningLog({
|
|
142
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund'),
|
|
143
|
+
content: [{
|
|
144
|
+
key: 'params',
|
|
145
|
+
value: JSON.stringify(param)
|
|
146
|
+
}]
|
|
147
|
+
});
|
|
148
|
+
_pay.run(param);
|
|
149
|
+
};
|
|
150
|
+
return {
|
|
151
|
+
action: {
|
|
152
|
+
pay: _pay
|
|
153
|
+
},
|
|
154
|
+
payOrRefund: payOrRefund
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @title: 取消支付或退款
|
|
160
|
+
* @description: 取消支付或退款调用接口后不管成功还是失败都需要调用支付查询接口
|
|
161
|
+
*/
|
|
162
|
+
export var useLinklyCancel = function useLinklyCancel(handleCheck) {
|
|
163
|
+
var dispatch = useDispatch();
|
|
164
|
+
var _useStoreRef2 = useStoreRef(),
|
|
165
|
+
numRef = _useStoreRef2.numRef,
|
|
166
|
+
modeRef = _useStoreRef2.modeRef,
|
|
167
|
+
deviceRef = _useStoreRef2.deviceRef;
|
|
168
|
+
var resultQueryRef = useRef(null);
|
|
169
|
+
var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
|
|
170
|
+
var cancelAction = function cancelAction(res, type) {
|
|
171
|
+
var _resultQueryRef$curre2;
|
|
172
|
+
// 需要将按钮状态释放
|
|
173
|
+
dispatch(updateCustom({
|
|
174
|
+
buttonDisabled: false
|
|
175
|
+
}));
|
|
176
|
+
if (!handleCheck()) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (type === 'success') {
|
|
180
|
+
sendWarningLog({
|
|
181
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u53D6\u6D88\u6210\u529F"),
|
|
182
|
+
content: [{
|
|
183
|
+
key: 'response',
|
|
184
|
+
value: JSON.stringify(res)
|
|
185
|
+
}]
|
|
186
|
+
});
|
|
187
|
+
} else {
|
|
188
|
+
sendWarningLog({
|
|
189
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u53D6\u6D88\u5931\u8D25"),
|
|
190
|
+
content: [{
|
|
191
|
+
key: 'error',
|
|
192
|
+
value: JSON.stringify(res)
|
|
193
|
+
}]
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
(_resultQueryRef$curre2 = resultQueryRef.current) === null || _resultQueryRef$curre2 === void 0 || _resultQueryRef$curre2.call(resultQueryRef);
|
|
197
|
+
};
|
|
198
|
+
var _cancel = useRequest(isPay ? linklyPayCancelApi : linklyRefundCancelApi, {
|
|
199
|
+
manual: true,
|
|
200
|
+
onSuccess: function onSuccess(res) {
|
|
201
|
+
return cancelAction(res, 'success');
|
|
202
|
+
},
|
|
203
|
+
onError: function onError(error) {
|
|
204
|
+
return cancelAction(error, 'error');
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
var linklyCancel = function linklyCancel(resultQuery) {
|
|
208
|
+
var _deviceRef$current2;
|
|
209
|
+
resultQueryRef.current = resultQuery;
|
|
210
|
+
// 需要将按钮状态锁定,防止重复点击
|
|
211
|
+
dispatch(updateCustom({
|
|
212
|
+
buttonDisabled: true
|
|
213
|
+
}));
|
|
214
|
+
var param = {
|
|
215
|
+
// 设备id
|
|
216
|
+
pinpad_id: deviceRef === null || deviceRef === void 0 || (_deviceRef$current2 = deviceRef.current) === null || _deviceRef$current2 === void 0 || (_deviceRef$current2 = _deviceRef$current2.metadata) === null || _deviceRef$current2 === void 0 ? void 0 : _deviceRef$current2.linkly_pinpad_id,
|
|
217
|
+
// 交易流水号
|
|
218
|
+
session_id: numRef.current
|
|
219
|
+
};
|
|
220
|
+
sendWarningLog({
|
|
221
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u53D6\u6D88"),
|
|
222
|
+
content: [{
|
|
223
|
+
key: 'params',
|
|
224
|
+
value: JSON.stringify(param)
|
|
225
|
+
}]
|
|
226
|
+
});
|
|
227
|
+
_cancel.run(param);
|
|
228
|
+
dispatch(updateCustom({
|
|
229
|
+
actionStatus: LinklyActionStatus.CancelWaiting
|
|
230
|
+
}));
|
|
231
|
+
};
|
|
232
|
+
return {
|
|
233
|
+
action: {
|
|
234
|
+
cancel: _cancel
|
|
235
|
+
},
|
|
236
|
+
linklyCancel: linklyCancel
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @title: 支付或退款签名
|
|
242
|
+
* @description: 支付或退款签名调用接口后不管成功还是失败都需要调用支付查询接口
|
|
243
|
+
*/
|
|
244
|
+
export var useLinklySignature = function useLinklySignature(handleCheck) {
|
|
245
|
+
var dispatch = useDispatch();
|
|
246
|
+
var _useStoreRef3 = useStoreRef(),
|
|
247
|
+
numRef = _useStoreRef3.numRef,
|
|
248
|
+
modeRef = _useStoreRef3.modeRef,
|
|
249
|
+
deviceRef = _useStoreRef3.deviceRef;
|
|
250
|
+
var resultQueryRef = useRef(null);
|
|
251
|
+
var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
|
|
252
|
+
var signatureAction = function signatureAction(res, type) {
|
|
253
|
+
var _resultQueryRef$curre3;
|
|
254
|
+
console.log('signatureAction---->>>>>>>', res);
|
|
255
|
+
if (!handleCheck()) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (type === 'success') {
|
|
259
|
+
sendWarningLog({
|
|
260
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u7B7E\u540D\u6210\u529F"),
|
|
261
|
+
content: [{
|
|
262
|
+
key: 'response',
|
|
263
|
+
value: JSON.stringify(res)
|
|
264
|
+
}]
|
|
265
|
+
});
|
|
266
|
+
} else {
|
|
267
|
+
sendWarningLog({
|
|
268
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u7B7E\u540D\u5931\u8D25"),
|
|
269
|
+
content: [{
|
|
270
|
+
key: 'error',
|
|
271
|
+
value: JSON.stringify(res)
|
|
272
|
+
}]
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
(_resultQueryRef$curre3 = resultQueryRef.current) === null || _resultQueryRef$curre3 === void 0 || _resultQueryRef$curre3.call(resultQueryRef);
|
|
276
|
+
};
|
|
277
|
+
var _signature = useRequest(isPay ? linklyPaySignatureApi : linklyRefundSignatureApi, {
|
|
278
|
+
manual: true,
|
|
279
|
+
onSuccess: function onSuccess(res) {
|
|
280
|
+
return signatureAction(res, 'success');
|
|
281
|
+
},
|
|
282
|
+
onError: function onError(error) {
|
|
283
|
+
return signatureAction(error, 'error');
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
var linklySignature = function linklySignature(status, resultQuery) {
|
|
287
|
+
var _deviceRef$current3;
|
|
288
|
+
resultQueryRef.current = resultQuery;
|
|
289
|
+
var param = {
|
|
290
|
+
// 设备id
|
|
291
|
+
pinpad_id: deviceRef === null || deviceRef === void 0 || (_deviceRef$current3 = deviceRef.current) === null || _deviceRef$current3 === void 0 || (_deviceRef$current3 = _deviceRef$current3.metadata) === null || _deviceRef$current3 === void 0 ? void 0 : _deviceRef$current3.linkly_pinpad_id,
|
|
292
|
+
// 交易流水号
|
|
293
|
+
session_id: numRef.current,
|
|
294
|
+
signature_flag: status
|
|
295
|
+
};
|
|
296
|
+
dispatch(updateStatus(StatusEnum.Loading));
|
|
297
|
+
dispatch(updateState({
|
|
298
|
+
title: locales.getText('page.eftpos-pay.text.loading')(modeRef.current)
|
|
299
|
+
}));
|
|
300
|
+
dispatch(updateCustom({
|
|
301
|
+
actionStatus: LinklyActionStatus.SignatureWaiting
|
|
302
|
+
}));
|
|
303
|
+
sendWarningLog({
|
|
304
|
+
title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u7B7E\u540D"),
|
|
305
|
+
content: [{
|
|
306
|
+
key: 'params',
|
|
307
|
+
value: JSON.stringify(param)
|
|
308
|
+
}]
|
|
309
|
+
});
|
|
310
|
+
_signature.run(param);
|
|
311
|
+
};
|
|
312
|
+
return {
|
|
313
|
+
action: {
|
|
314
|
+
signature: _signature
|
|
315
|
+
},
|
|
316
|
+
linklySignature: linklySignature
|
|
317
|
+
};
|
|
318
|
+
};
|