@pisell/private-materials 6.4.74 → 6.4.76

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.
Files changed (438) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
  18. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  19. package/es/components/booking/addons/index.js +20 -17
  20. package/es/components/booking/addons/model.d.ts +10 -1
  21. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  22. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  23. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  24. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  25. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  26. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  27. package/es/components/booking/components/footer/utils.d.ts +5 -0
  28. package/es/components/booking/components/footer/utils.js +86 -54
  29. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  30. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  31. package/es/components/booking/components/voucher/index.js +20 -6
  32. package/es/components/booking/forms/footer.d.ts +1 -0
  33. package/es/components/booking/forms/model.d.ts +10 -1
  34. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  35. package/es/components/booking/forms/single/index.d.ts +1 -0
  36. package/es/components/booking/forms/table/index.d.ts +1 -0
  37. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  38. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  39. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  40. package/es/components/booking/info/date/index.d.ts +1 -0
  41. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  42. package/es/components/booking/info/model.d.ts +10 -1
  43. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  44. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  45. package/es/components/booking/info/service/like/index.d.ts +1 -0
  46. package/es/components/booking/info/service2/utils.js +1 -0
  47. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  48. package/es/components/booking/info2/service/addService/index.js +2 -3
  49. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  50. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  51. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  52. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  53. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  54. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  55. package/es/components/booking/model.d.ts +9 -1
  56. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  57. package/es/components/booking/notes/model.d.ts +10 -1
  58. package/es/components/booking/payments/model.d.ts +10 -1
  59. package/es/components/booking/utils.d.ts +1 -0
  60. package/es/components/booking/utils.js +16 -3
  61. package/es/components/checkout/components/AdditionalModule/index.js +6 -0
  62. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  63. package/es/components/eftpos/form/index.d.ts +1 -0
  64. package/es/components/eftpos/group/index.d.ts +1 -0
  65. package/es/components/eftpos/hooks.d.ts +1 -0
  66. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  67. package/es/components/eftpos/icon/device.d.ts +1 -0
  68. package/es/components/eftpos/index.d.ts +1 -0
  69. package/es/components/eftpos/pos.d.ts +1 -0
  70. package/es/components/eftpos/receipt/index.d.ts +1 -0
  71. package/es/components/eftposPay/amount.d.ts +2 -1
  72. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  73. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  74. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  75. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  76. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  77. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  78. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  79. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  80. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  81. package/es/components/eftposPay/device.d.ts +1 -1
  82. package/es/components/eftposPay/hooks.d.ts +2 -2
  83. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  84. package/es/components/eftposPay/pay.d.ts +1 -0
  85. package/es/components/eftposPay/payo/config.d.ts +1 -0
  86. package/es/components/eftposPay/payo/config.js +70 -32
  87. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  88. package/es/components/eftposPay/payo/payment.js +579 -0
  89. package/es/components/eftposPay/store/index.d.ts +3 -3
  90. package/es/components/eftposPay/tip.d.ts +1 -0
  91. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  92. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  93. package/es/components/eftposPay/utils/log/index.js +371 -0
  94. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  95. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  96. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  97. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  98. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  99. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  100. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  101. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  102. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  103. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  104. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  105. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  106. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  107. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  108. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  109. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  110. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  111. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  112. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  113. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  114. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  115. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  116. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  117. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  118. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  119. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  120. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  121. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  122. package/es/components/login/index.d.ts +1 -0
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  124. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  125. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  126. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  127. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  128. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  129. package/es/components/pay/toC/index.js +5 -3
  130. package/es/components/pay/toC/model.d.ts +9 -1
  131. package/es/components/pay/toC/status.d.ts +1 -0
  132. package/es/components/pay/toC/status.js +3 -0
  133. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  134. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  135. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  136. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  137. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  138. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  139. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  140. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  141. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  142. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  143. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  144. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  145. package/es/components/schedules/calendar/index.d.ts +1 -0
  146. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  147. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  148. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  149. package/es/components/schedules/model.d.ts +9 -1
  150. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  151. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  152. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  153. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  154. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  155. package/es/components/schedules/products/index.d.ts +1 -0
  156. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  157. package/es/components/schedules/products/list/index.d.ts +1 -0
  158. package/es/components/schedules/resources/index.d.ts +1 -0
  159. package/es/components/schedules/resources/list/index.d.ts +1 -0
  160. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  161. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  162. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  163. package/es/components/schedules/schedules/index.d.ts +1 -0
  164. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  165. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  166. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  167. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  168. package/es/components/shoppingCart/index.d.ts +1 -0
  169. package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
  170. package/es/components/ticketBooking/utils/index.d.ts +3 -0
  171. package/es/components/ticketBooking/utils/index.js +36 -13
  172. package/es/components/wallet/Detail/index.js +34 -2
  173. package/es/components/wallet/Detail/index.less +11 -0
  174. package/es/components/wallet/Detail/locales.d.ts +6 -0
  175. package/es/components/wallet/Detail/locales.js +14 -2
  176. package/es/components/wallet/Detail/model.d.ts +13 -1
  177. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  178. package/es/components/wallet/PointCard/model.d.ts +13 -1
  179. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  180. package/es/components/wallet/Voucher/index.js +11 -10
  181. package/es/components/wallet/Voucher/model.d.ts +13 -1
  182. package/es/components/wallet/components/WalletCard.js +5 -1
  183. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  184. package/es/components/wallet/index.js +4 -2
  185. package/es/components/wallet/model.d.ts +9 -1
  186. package/es/components/wallet/serve.d.ts +7 -0
  187. package/es/components/wallet/utils.d.ts +48 -0
  188. package/es/components/wallet/utils.js +342 -0
  189. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  190. package/es/hooks/usePaymentLogger.d.ts +1 -0
  191. package/es/index.d.ts +1 -0
  192. package/es/index.js +2 -1
  193. package/es/plus/clientName/index.d.ts +1 -0
  194. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  195. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  196. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  197. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  198. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  199. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  200. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  201. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  202. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  203. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  204. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  205. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  206. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  207. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  208. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  209. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  210. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  211. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  212. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  213. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  214. package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
  215. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  216. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  217. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  218. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  219. package/es/plus/walletPassGallery/index.js +7 -3
  220. package/es/plus/walletPassGallery/serve.d.ts +3 -0
  221. package/es/plus/walletPassGallery/serve.js +4 -2
  222. package/es/pro/Login2.0/index.less +15 -8
  223. package/es/pro/pisellPaymentList/example.d.ts +1 -0
  224. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  225. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  226. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  227. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  228. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  229. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  230. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  231. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  232. package/lib/components/booking/addons/index.js +10 -7
  233. package/lib/components/booking/addons/model.d.ts +10 -1
  234. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  235. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  236. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  237. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  238. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  239. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  240. package/lib/components/booking/components/footer/utils.d.ts +5 -0
  241. package/lib/components/booking/components/footer/utils.js +53 -32
  242. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  243. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  244. package/lib/components/booking/components/voucher/index.js +21 -7
  245. package/lib/components/booking/forms/footer.d.ts +1 -0
  246. package/lib/components/booking/forms/model.d.ts +10 -1
  247. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  248. package/lib/components/booking/forms/single/index.d.ts +1 -0
  249. package/lib/components/booking/forms/table/index.d.ts +1 -0
  250. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  251. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  252. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  253. package/lib/components/booking/info/date/index.d.ts +1 -0
  254. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  255. package/lib/components/booking/info/model.d.ts +10 -1
  256. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  257. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  258. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  259. package/lib/components/booking/info/service2/utils.js +1 -0
  260. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  261. package/lib/components/booking/info2/service/addService/index.js +1 -2
  262. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  263. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  264. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  265. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  266. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  267. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  268. package/lib/components/booking/model.d.ts +9 -1
  269. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  270. package/lib/components/booking/notes/model.d.ts +10 -1
  271. package/lib/components/booking/payments/model.d.ts +10 -1
  272. package/lib/components/booking/utils.d.ts +1 -0
  273. package/lib/components/booking/utils.js +11 -0
  274. package/lib/components/checkout/components/AdditionalModule/index.js +6 -0
  275. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  276. package/lib/components/eftpos/form/index.d.ts +1 -0
  277. package/lib/components/eftpos/group/index.d.ts +1 -0
  278. package/lib/components/eftpos/hooks.d.ts +1 -0
  279. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  280. package/lib/components/eftpos/icon/device.d.ts +1 -0
  281. package/lib/components/eftpos/index.d.ts +1 -0
  282. package/lib/components/eftpos/pos.d.ts +1 -0
  283. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  284. package/lib/components/eftposPay/amount.d.ts +2 -1
  285. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  286. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  287. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  288. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  289. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  290. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  291. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  292. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  293. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  294. package/lib/components/eftposPay/device.d.ts +1 -1
  295. package/lib/components/eftposPay/hooks.d.ts +2 -2
  296. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  297. package/lib/components/eftposPay/pay.d.ts +1 -0
  298. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  299. package/lib/components/eftposPay/payo/config.js +98 -73
  300. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  301. package/lib/components/eftposPay/payo/payment.js +357 -0
  302. package/lib/components/eftposPay/store/index.d.ts +3 -3
  303. package/lib/components/eftposPay/tip.d.ts +1 -0
  304. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  305. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  306. package/lib/components/eftposPay/utils/log/index.js +294 -0
  307. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  308. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  309. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  310. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  311. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  312. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  313. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  314. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  315. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  316. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  317. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  318. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  319. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  320. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  321. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  322. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  323. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  324. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  325. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  326. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  327. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  328. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  329. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  330. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  331. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  332. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  333. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  334. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  335. package/lib/components/login/index.d.ts +1 -0
  336. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  337. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  338. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  339. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  340. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  341. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  342. package/lib/components/pay/toC/index.js +3 -1
  343. package/lib/components/pay/toC/model.d.ts +9 -1
  344. package/lib/components/pay/toC/status.d.ts +1 -0
  345. package/lib/components/pay/toC/status.js +5 -0
  346. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  347. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  348. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  349. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  350. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  351. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  352. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  353. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  354. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  355. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  356. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  357. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  358. package/lib/components/schedules/calendar/index.d.ts +1 -0
  359. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  360. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  361. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  362. package/lib/components/schedules/model.d.ts +9 -1
  363. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  364. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  365. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  366. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  367. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  368. package/lib/components/schedules/products/index.d.ts +1 -0
  369. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  370. package/lib/components/schedules/products/list/index.d.ts +1 -0
  371. package/lib/components/schedules/resources/index.d.ts +1 -0
  372. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  373. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  374. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  375. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  376. package/lib/components/schedules/schedules/index.d.ts +1 -0
  377. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  378. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  379. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  380. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  381. package/lib/components/shoppingCart/index.d.ts +1 -0
  382. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  383. package/lib/components/ticketBooking/utils/index.d.ts +3 -0
  384. package/lib/components/ticketBooking/utils/index.js +20 -6
  385. package/lib/components/wallet/Detail/index.js +31 -3
  386. package/lib/components/wallet/Detail/index.less +11 -0
  387. package/lib/components/wallet/Detail/locales.d.ts +6 -0
  388. package/lib/components/wallet/Detail/locales.js +14 -2
  389. package/lib/components/wallet/Detail/model.d.ts +13 -1
  390. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  391. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  392. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  393. package/lib/components/wallet/Voucher/index.js +8 -8
  394. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  395. package/lib/components/wallet/components/WalletCard.js +4 -0
  396. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  397. package/lib/components/wallet/index.js +2 -2
  398. package/lib/components/wallet/model.d.ts +9 -1
  399. package/lib/components/wallet/serve.d.ts +7 -0
  400. package/lib/components/wallet/utils.d.ts +48 -0
  401. package/lib/components/wallet/utils.js +287 -0
  402. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  403. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  404. package/lib/index.d.ts +1 -0
  405. package/lib/index.js +3 -0
  406. package/lib/plus/clientName/index.d.ts +1 -0
  407. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  408. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  409. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  410. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  411. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  412. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  413. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  414. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  415. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  416. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  417. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  418. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  419. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  420. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  421. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  422. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  423. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  424. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  425. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  426. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  427. package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
  428. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  429. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  430. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  431. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  432. package/lib/plus/walletPassGallery/index.js +7 -3
  433. package/lib/plus/walletPassGallery/serve.d.ts +3 -0
  434. package/lib/plus/walletPassGallery/serve.js +3 -2
  435. package/lib/pro/Login2.0/index.less +15 -8
  436. package/lib/pro/pisellPaymentList/example.d.ts +1 -0
  437. package/lowcode/wallet-pass-detail/meta.ts +89 -0
  438. package/package.json +4 -4
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -153,6 +153,7 @@ export declare const getIsOnlySession: (item: any) => boolean;
153
153
  * @Date: 2024-01-26 14:09
154
154
  */
155
155
  export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
156
+ export declare const getMainPrice: (item: any, price?: number) => number;
156
157
  export declare const getProductTotalPrice: (item: any) => number;
157
158
  /**
158
159
  * @title: 判断 duration
@@ -46,6 +46,7 @@ __export(utils_exports, {
46
46
  getIsEject: () => getIsEject,
47
47
  getIsOnlySession: () => getIsOnlySession,
48
48
  getLastServer: () => getLastServer,
49
+ getMainPrice: () => getMainPrice,
49
50
  getNowTime: () => getNowTime,
50
51
  getProductTotalPrice: () => getProductTotalPrice,
51
52
  getResourceTimeIsUsable: () => getResourceTimeIsUsable,
@@ -610,6 +611,15 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
610
611
  }
611
612
  return _extend;
612
613
  };
614
+ var getMainPrice = (item, price) => {
615
+ var _a;
616
+ let newPrice = new import_decimal.default(price || item._extend.price || 0);
617
+ let other = (_a = item._extend) == null ? void 0 : _a.other;
618
+ if (other == null ? void 0 : other.product_variant_id) {
619
+ newPrice = new import_decimal.default((other == null ? void 0 : other.price) || 0);
620
+ }
621
+ return newPrice.toNumber();
622
+ };
613
623
  var getProductTotalPrice = (item) => {
614
624
  var _a;
615
625
  let price = new import_decimal.default(item._extend.price || 0);
@@ -703,6 +713,7 @@ var getIsEdit = (state) => {
703
713
  getIsEject,
704
714
  getIsOnlySession,
705
715
  getLastServer,
716
+ getMainPrice,
706
717
  getNowTime,
707
718
  getProductTotalPrice,
708
719
  getResourceTimeIsUsable,
@@ -152,6 +152,8 @@ function AdditionalModule({
152
152
  }
153
153
  } else if (key === "split-payment") {
154
154
  handleButtonClick("split-payment");
155
+ } else if (key === "print-receipt") {
156
+ handleButtonClick("print-receipt");
155
157
  }
156
158
  }
157
159
  },
@@ -280,6 +282,10 @@ function AdditionalModule({
280
282
  )
281
283
  );
282
284
  }
285
+ } else if (key === "split-payment") {
286
+ handleButtonClick("split-payment");
287
+ } else if (key === "print-receipt") {
288
+ handleButtonClick("print-receipt");
283
289
  }
284
290
  }
285
291
  },
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
2
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 递归循环表单数据
3
4
  * @Author: hongbing.wang
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RadioGroupProps } from 'antd';
2
3
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
3
4
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos } from './const';
2
3
  /**
3
4
  * @title: tyro 设备连接
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ color }: {
2
3
  color?: string | undefined;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ color }: {
2
3
  color?: string | undefined;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos, DeviceStatus } from './const';
2
3
  import './index.less';
3
4
  interface PosProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DeviceProp } from "./const";
2
3
  interface PosProps {
3
4
  eftposName: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 自定义组件设置
3
4
  * @description: 自定义组件设置
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -8,7 +9,7 @@ import { PosProps } from './const';
8
9
  */
9
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
11
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
13
  [keys: string]: unknown;
13
14
  } | undefined, other?: any) => void) | undefined;
14
15
  onClose: () => void;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 断网(客户端)提示页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './titlebar.less';
2
3
  declare enum EPopupTitleBarVariantType {
3
4
  BackTitleClose = "back-title-cancel",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  import './index.less';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 取消签名确认页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusType } from '../../const';
2
3
  declare const _default: (props: {
3
4
  status: StatusType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: (props: {
2
3
  status: string;
3
4
  pedding?: string;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
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" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -41,6 +41,7 @@ var import_const = require("../../const");
41
41
  var import_const2 = require("../const");
42
42
  var GlobalTimeout = 1e3 * 60 * 2;
43
43
  var RequestTimeout = 1e3 * 5;
44
+ var QUERY_INTERVAL = 1e3 * 2;
44
45
  var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
45
46
  const dispatch = (0, import_store.useDispatch)();
46
47
  const { numRef, modeRef, deviceRef, orderIdRef } = (0, import_hooks.useStoreRef)();
@@ -56,6 +57,7 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
56
57
  const startTimeRef = (0, import_react.useRef)(null);
57
58
  const isQueryFinishedRef = (0, import_react.useRef)(true);
58
59
  const queryIdRef = (0, import_react.useRef)(null);
60
+ const queryIntervalTimerRef = (0, import_react.useRef)(null);
59
61
  const _resultQuery = async () => {
60
62
  var _a, _b;
61
63
  if (controllerRef.current) {
@@ -107,9 +109,9 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
107
109
  console.log("交易状态为0需要继续查询");
108
110
  _log("Querying" /* Querying */, result);
109
111
  isQueryFinishedRef.current = false;
110
- setTimeout(() => {
112
+ queryIntervalTimerRef.current = setTimeout(() => {
111
113
  _resultQuery();
112
- }, 1500);
114
+ }, QUERY_INTERVAL);
113
115
  return;
114
116
  }
115
117
  if (data.status < 0) {
@@ -145,18 +147,18 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
145
147
  _log("AbortError" /* AbortError */);
146
148
  console.log("Error: 请求被取消,将继续查询");
147
149
  isQueryFinishedRef.current = false;
148
- setTimeout(() => {
150
+ queryIntervalTimerRef.current = setTimeout(() => {
149
151
  _resultQuery();
150
- }, 1500);
152
+ }, QUERY_INTERVAL);
151
153
  return;
152
154
  }
153
155
  if (!(error == null ? void 0 : error.code) || `${error.code}` === import_const.PayStatus.Timeout) {
154
156
  _log("NetworkError" /* NetworkError */);
155
157
  console.log("Error: 网关类报错,将继续查询");
156
158
  isQueryFinishedRef.current = false;
157
- setTimeout(() => {
159
+ queryIntervalTimerRef.current = setTimeout(() => {
158
160
  _resultQuery();
159
- }, 1500);
161
+ }, QUERY_INTERVAL);
160
162
  return;
161
163
  }
162
164
  _log("Error" /* Error */, error);
@@ -203,6 +205,10 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
203
205
  clearTimeout(requestTimeoutIdRef.current);
204
206
  requestTimeoutIdRef.current = null;
205
207
  }
208
+ if (queryIntervalTimerRef.current) {
209
+ clearTimeout(queryIntervalTimerRef.current);
210
+ queryIntervalTimerRef.current = null;
211
+ }
206
212
  if (controllerRef.current) {
207
213
  controllerRef.current.abort();
208
214
  controllerRef.current = null;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PayProps } from './const';
2
3
  import './index.less';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusEnum } from '../const';
2
3
  export declare const POS: ({ api, onChange, }: {
3
4
  api: {
@@ -42,6 +42,7 @@ var import_helper = require("../helper");
42
42
  var import_hooks = require("../hooks");
43
43
  var import_store = require("../store");
44
44
  var import_hooks2 = require("./hooks");
45
+ var import_payment = require("./payment");
45
46
  var POS = ({
46
47
  api,
47
48
  onChange
@@ -68,6 +69,13 @@ var POS = ({
68
69
  const initRef = (0, import_react.useRef)(false);
69
70
  const unloadRef = (0, import_react.useRef)(false);
70
71
  const [check] = (0, import_hooks2.useValidate)(1e3 * 60);
72
+ const { run: paymentRun, clean: paymentClean } = (0, import_payment.usePayment)({
73
+ payApi: api.pay,
74
+ checkApi: api.check,
75
+ shouldContinue: () => {
76
+ return !(unloadRef.current || !netRef.current);
77
+ }
78
+ });
71
79
  (0, import_react.useEffect)(() => {
72
80
  failRef.current = fail;
73
81
  }, [fail]);
@@ -126,7 +134,7 @@ var POS = ({
126
134
  );
127
135
  };
128
136
  (0, import_react.useEffect)(() => {
129
- var _a, _b;
137
+ var _a, _b, _c;
130
138
  if (statusRef.current === import_const.StatusEnum.Success || statusRef.current === import_const.StatusEnum.Fail) {
131
139
  return;
132
140
  }
@@ -145,82 +153,98 @@ var POS = ({
145
153
  })
146
154
  );
147
155
  controllerRef.current = new AbortController();
148
- const resultPromise = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay ? api.pay(
149
- {
150
- ...(custom == null ? void 0 : custom.platform) ? {
151
- operator_id: custom.operator_id,
152
- operator_type: custom.operator_type,
153
- platform: custom.platform,
154
- custom_payment_id: custom.custom_payment_id,
155
- service_charge: {
156
- amount: payRef.current.surMoney,
157
- percentage: payRef.current.surPercentRate
158
- },
159
- original_amount: payRef.current.amount
160
- } : {},
161
- order_id: orderIdRef.current,
162
- amount: payRef.current.total,
163
- card_reader_type: eftposRef.current,
164
- card_reader_id: (_a = deviceRef.current) == null ? void 0 : _a.id,
165
- number: numRef.current,
166
- pay_param_base64: encodeURIComponent(
167
- btoa(
168
- encodeURIComponent(
169
- JSON.stringify({
170
- ...dataRef.current,
171
- number: numRef.current
172
- })
173
- )
156
+ const isPay = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay;
157
+ const apiParams = isPay ? {
158
+ ...(custom == null ? void 0 : custom.platform) ? {
159
+ operator_id: custom.operator_id,
160
+ operator_type: custom.operator_type,
161
+ platform: custom.platform,
162
+ custom_payment_id: custom.custom_payment_id
163
+ } : {},
164
+ original_amount: payRef.current.amount,
165
+ service_charge: {
166
+ amount: payRef.current.surMoney,
167
+ percentage: payRef.current.surPercentRate
168
+ },
169
+ order_id: orderIdRef.current,
170
+ amount: payRef.current.total,
171
+ card_reader_type: eftposRef.current,
172
+ card_reader_id: (_a = deviceRef.current) == null ? void 0 : _a.id,
173
+ number: numRef.current,
174
+ pay_param_base64: encodeURIComponent(
175
+ btoa(
176
+ encodeURIComponent(
177
+ JSON.stringify({
178
+ ...dataRef.current,
179
+ number: numRef.current
180
+ })
174
181
  )
175
182
  )
176
- },
177
- { signal: controllerRef.current.signal }
178
- ) : api.refund(
179
- {
180
- order_id: orderIdRef.current,
181
- amount: amountRef.current,
182
- card_reader_type: eftposRef.current,
183
- card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id,
184
- number: numRef.current,
185
- pay_param_base64: encodeURIComponent(
186
- btoa(
187
- encodeURIComponent(
188
- JSON.stringify({
189
- ...dataRef.current,
190
- number: numRef.current
191
- })
192
- )
183
+ )
184
+ } : {
185
+ order_id: orderIdRef.current,
186
+ amount: amountRef.current,
187
+ card_reader_type: eftposRef.current,
188
+ card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id,
189
+ number: numRef.current,
190
+ pay_param_base64: encodeURIComponent(
191
+ btoa(
192
+ encodeURIComponent(
193
+ JSON.stringify({
194
+ ...dataRef.current,
195
+ number: numRef.current
196
+ })
193
197
  )
194
198
  )
195
- },
196
- { signal: controllerRef.current.signal }
197
- );
198
- resultPromise.then((res) => {
199
- console.log("netRef.current111 = ", netRef.current);
200
- if (unloadRef.current || !netRef.current) {
201
- return;
202
- }
203
- if (res && `${res.code}` === "200") {
204
- success(res);
205
- return;
206
- }
207
- return Promise.reject(res);
208
- }).catch((err) => {
209
- console.log(
210
- "netRef.current222 = ",
211
- netRef.current,
212
- unloadRef.current,
213
- err
214
- );
215
- if (unloadRef.current || !netRef.current) {
216
- return;
217
- }
218
- if (!(err == null ? void 0 : err.code) || `${err.code}` === import_const.PayStatus.Timeout) {
219
- checkApi();
220
- return;
221
- }
222
- failRef.current(err, true);
223
- });
199
+ )
200
+ };
201
+ if (isPay) {
202
+ paymentRun({
203
+ paymentType: import_payment.ActionType.Pay,
204
+ paymentNum: numRef.current,
205
+ orderId: orderIdRef.current,
206
+ deviceId: (_c = deviceRef.current) == null ? void 0 : _c.id,
207
+ params: apiParams,
208
+ callbacks: {
209
+ onSuccess: (res) => {
210
+ success(res);
211
+ },
212
+ onError: (err) => {
213
+ console.log("err = >>>>>", err);
214
+ failRef.current(err, true);
215
+ }
216
+ }
217
+ });
218
+ return;
219
+ } else {
220
+ const resultPromise = api.refund(apiParams, { signal: controllerRef.current.signal });
221
+ resultPromise.then((res) => {
222
+ console.log("netRef.current111 = ", netRef.current);
223
+ if (unloadRef.current || !netRef.current) {
224
+ return;
225
+ }
226
+ if (res && `${res.code}` === "200") {
227
+ success(res);
228
+ return;
229
+ }
230
+ return Promise.reject(res);
231
+ }).catch((err) => {
232
+ console.log(
233
+ "netRef.current222 = ",
234
+ netRef.current,
235
+ unloadRef.current,
236
+ err
237
+ );
238
+ if (unloadRef.current || !netRef.current) {
239
+ return;
240
+ }
241
+ if (!(err == null ? void 0 : err.code) || `${err.code}` === import_const.PayStatus.Timeout) {
242
+ checkApi();
243
+ return;
244
+ }
245
+ failRef.current(err, true);
246
+ });
247
+ }
224
248
  }, [api, check, dispatch, onChange]);
225
249
  (0, import_react.useEffect)(
226
250
  () => () => {
@@ -230,6 +254,7 @@ var POS = ({
230
254
  if (clearRef.current) {
231
255
  clearTimeout(clearRef.current);
232
256
  }
257
+ paymentClean();
233
258
  },
234
259
  []
235
260
  );
@@ -0,0 +1,66 @@
1
+ interface RunApiParams {
2
+ [key: string]: any;
3
+ }
4
+ export declare enum ActionType {
5
+ Pay = "pay",
6
+ Refund = "refund",
7
+ Query = "query"
8
+ }
9
+ interface UsePaymentOptions {
10
+ /**
11
+ * 支付接口
12
+ */
13
+ payApi: (params: RunApiParams, options?: {
14
+ signal?: AbortSignal;
15
+ }) => Promise<any>;
16
+ /**
17
+ * 退款接口
18
+ */
19
+ refundApi?: (params: RunApiParams, options?: {
20
+ signal?: AbortSignal;
21
+ }) => Promise<any>;
22
+ /**
23
+ * 查询接口
24
+ */
25
+ checkApi: (params: {
26
+ number: string;
27
+ }, options?: {
28
+ signal?: AbortSignal;
29
+ }) => Promise<any>;
30
+ /**
31
+ * 检查是否应该继续处理结果(用于处理网络断开、组件卸载等情况)
32
+ */
33
+ shouldContinue?: () => boolean;
34
+ }
35
+ interface RunParams {
36
+ /** 支付类型 */
37
+ paymentType: ActionType;
38
+ /** 支付交易号 */
39
+ paymentNum: string;
40
+ /** 订单ID */
41
+ orderId?: string | number;
42
+ /** 设备ID */
43
+ deviceId?: string | number;
44
+ /** 支付参数 */
45
+ params: RunApiParams;
46
+ /** 回调方法 */
47
+ callbacks: RunCallbacks;
48
+ }
49
+ interface RunCallbacks {
50
+ /**
51
+ * 成功回调
52
+ */
53
+ onSuccess: (res: any) => void;
54
+ /**
55
+ * 失败回调
56
+ */
57
+ onError: (error: any) => void;
58
+ }
59
+ export declare const usePayment: (options: UsePaymentOptions) => {
60
+ run: (options: RunParams) => Promise<void>;
61
+ stop: () => void;
62
+ clean: (params?: {
63
+ clearCallbacks?: boolean;
64
+ }) => void;
65
+ };
66
+ export {};