@pisell/private-materials 3.0.111 → 3.0.113

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 (396) hide show
  1. package/build/lowcode/assets-daily.json +19 -11
  2. package/build/lowcode/assets-dev.json +10 -2
  3. package/build/lowcode/assets-prod.json +19 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +18 -16
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +18 -16
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +2 -1
  13. package/es/components/booking/components/footer/index.js +1 -1
  14. package/es/components/booking/deposit/DepositItem/index.d.ts +4 -1
  15. package/es/components/booking/deposit/DepositItem/index.js +17 -6
  16. package/es/components/booking/deposit/DepositItem/index.less +36 -12
  17. package/es/components/booking/deposit/index.js +5 -2
  18. package/es/components/booking/forms/forms.d.ts +1 -1
  19. package/es/components/booking/forms/index.d.ts +1 -1
  20. package/es/components/booking/forms/model.d.ts +2 -1
  21. package/es/components/booking/index.d.ts +1 -1
  22. package/es/components/booking/info/index.d.ts +1 -1
  23. package/es/components/booking/info/model.d.ts +2 -1
  24. package/es/components/booking/info/service/editService/index.js +11 -9
  25. package/es/components/booking/locales.d.ts +12 -0
  26. package/es/components/booking/locales.js +12 -0
  27. package/es/components/booking/model.d.ts +2 -1
  28. package/es/components/booking/notes/index.d.ts +1 -1
  29. package/es/components/booking/notes/model.d.ts +2 -1
  30. package/es/components/booking/payments/index.d.ts +1 -1
  31. package/es/components/booking/payments/model.d.ts +2 -1
  32. package/es/components/index.d.ts +2 -1
  33. package/es/components/index.js +2 -1
  34. package/es/components/pay/toC/PayAmount/index.d.ts +15 -0
  35. package/es/components/pay/toC/PayAmount/index.js +25 -0
  36. package/es/components/pay/toC/PayAmount/index.less +21 -0
  37. package/es/components/pay/toC/PayCountdown/index.d.ts +15 -0
  38. package/es/components/pay/toC/PayCountdown/index.js +26 -0
  39. package/es/components/pay/toC/PayCountdown/index.less +22 -0
  40. package/es/components/pay/toC/PaymentList/index.d.ts +19 -0
  41. package/es/components/pay/toC/PaymentList/index.js +342 -0
  42. package/es/components/pay/toC/PaymentList/index.less +112 -0
  43. package/es/components/pay/toC/PaymentList/mock.d.ts +88 -0
  44. package/es/components/pay/toC/PaymentList/mock.js +128 -0
  45. package/es/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
  46. package/es/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
  47. package/es/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
  48. package/es/components/pay/toC/PaymentList/payment/cash.svg +8 -0
  49. package/es/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
  50. package/es/components/pay/toC/PaymentList/payment/custom.svg +10 -0
  51. package/es/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
  52. package/es/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
  53. package/es/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
  54. package/es/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
  55. package/es/components/pay/toC/PaymentList/serve.d.ts +26 -0
  56. package/es/components/pay/toC/PaymentList/serve.js +135 -0
  57. package/es/components/pay/toC/PaymentList/status.d.ts +4 -0
  58. package/es/components/pay/toC/PaymentList/status.js +100 -0
  59. package/es/components/pay/toC/PaymentList/utils.d.ts +10 -0
  60. package/es/components/pay/toC/PaymentList/utils.js +53 -0
  61. package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
  62. package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +113 -0
  63. package/es/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
  64. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
  65. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +74 -0
  66. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
  67. package/es/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
  68. package/es/components/pay/toC/PaymentMethods/CashManual/index.js +79 -0
  69. package/es/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
  70. package/es/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
  71. package/es/components/pay/toC/PaymentMethods/CashManual/serve.js +27 -0
  72. package/es/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
  73. package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +78 -0
  74. package/es/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
  75. package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
  76. package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.js +27 -0
  77. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
  78. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +109 -0
  79. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
  80. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
  81. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +41 -0
  82. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
  83. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +109 -0
  84. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
  85. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
  86. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +41 -0
  87. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
  88. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +65 -0
  89. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
  90. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
  91. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +36 -0
  92. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
  93. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +109 -0
  94. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
  95. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
  96. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +41 -0
  97. package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
  98. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +110 -0
  99. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
  100. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +349 -0
  101. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
  102. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
  103. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +375 -0
  104. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
  105. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
  106. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +37 -0
  107. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
  108. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +21 -0
  109. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
  110. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
  111. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +222 -0
  112. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
  113. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
  114. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +130 -0
  115. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
  116. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
  117. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +524 -0
  118. package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
  119. package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -0
  120. package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
  121. package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
  122. package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +27 -0
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  124. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +61 -0
  125. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
  126. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +121 -0
  127. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
  128. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
  129. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +33 -0
  130. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
  131. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +30 -0
  132. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
  133. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +37 -0
  134. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
  135. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +13 -0
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
  137. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +15 -0
  138. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
  139. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
  140. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  141. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +108 -0
  142. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
  143. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +113 -0
  144. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
  145. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
  146. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +96 -0
  147. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
  148. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
  149. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +33 -0
  150. package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  151. package/es/components/pay/toC/PaymentMethods/StripePay/index.js +78 -0
  152. package/es/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
  153. package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
  154. package/es/components/pay/toC/PaymentMethods/StripePay/serve.js +36 -0
  155. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
  156. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +108 -0
  157. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
  158. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
  159. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +41 -0
  160. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
  161. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +109 -0
  162. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
  163. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
  164. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +41 -0
  165. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
  166. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +142 -0
  167. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
  168. package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
  169. package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +19 -0
  170. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
  171. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +344 -0
  172. package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
  173. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
  174. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +114 -0
  175. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
  176. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +40 -0
  177. package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  178. package/es/components/pay/toC/PaymentMethods/index.js +316 -0
  179. package/es/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
  180. package/es/components/pay/toC/WalletPassBlock/index.js +72 -0
  181. package/es/components/pay/toC/WalletPassBlock/index.less +65 -0
  182. package/es/components/pay/toC/index.d.ts +3 -0
  183. package/es/components/pay/toC/index.js +647 -0
  184. package/es/components/pay/toC/index.less +22 -0
  185. package/es/components/pay/toC/locales.d.ts +208 -0
  186. package/es/components/pay/toC/locales.js +207 -0
  187. package/es/components/pay/toC/model.d.ts +35 -0
  188. package/es/components/pay/toC/model.js +43 -0
  189. package/es/components/pay/toC/payGroup.d.ts +48 -0
  190. package/es/components/pay/toC/payGroup.js +105 -0
  191. package/es/components/pay/toC/serve.d.ts +34 -0
  192. package/es/components/pay/toC/serve.js +148 -0
  193. package/es/components/pay/toC/status.d.ts +3 -0
  194. package/es/components/pay/toC/status.js +82 -0
  195. package/es/components/pay/toC/utils.d.ts +30 -0
  196. package/es/components/pay/toC/utils.js +48 -0
  197. package/es/components/schedules/index.d.ts +1 -1
  198. package/es/components/schedules/model.d.ts +2 -1
  199. package/es/index.d.ts +1 -0
  200. package/es/index.js +1 -0
  201. package/es/utils/index.d.ts +6 -5
  202. package/es/utils/index.js +28 -6
  203. package/lib/components/booking/addons/index.d.ts +1 -1
  204. package/lib/components/booking/addons/model.d.ts +2 -1
  205. package/lib/components/booking/components/footer/index.js +1 -1
  206. package/lib/components/booking/deposit/DepositItem/index.d.ts +4 -1
  207. package/lib/components/booking/deposit/DepositItem/index.js +17 -6
  208. package/lib/components/booking/deposit/DepositItem/index.less +36 -12
  209. package/lib/components/booking/deposit/index.js +5 -2
  210. package/lib/components/booking/forms/forms.d.ts +1 -1
  211. package/lib/components/booking/forms/index.d.ts +1 -1
  212. package/lib/components/booking/forms/model.d.ts +2 -1
  213. package/lib/components/booking/index.d.ts +1 -1
  214. package/lib/components/booking/info/index.d.ts +1 -1
  215. package/lib/components/booking/info/model.d.ts +2 -1
  216. package/lib/components/booking/info/service/editService/index.js +2 -0
  217. package/lib/components/booking/locales.d.ts +12 -0
  218. package/lib/components/booking/locales.js +12 -0
  219. package/lib/components/booking/model.d.ts +2 -1
  220. package/lib/components/booking/notes/index.d.ts +1 -1
  221. package/lib/components/booking/notes/model.d.ts +2 -1
  222. package/lib/components/booking/payments/index.d.ts +1 -1
  223. package/lib/components/booking/payments/model.d.ts +2 -1
  224. package/lib/components/index.d.ts +2 -1
  225. package/lib/components/index.js +5 -2
  226. package/lib/components/pay/toC/PayAmount/index.d.ts +15 -0
  227. package/lib/components/pay/toC/PayAmount/index.js +42 -0
  228. package/lib/components/pay/toC/PayAmount/index.less +21 -0
  229. package/lib/components/pay/toC/PayCountdown/index.d.ts +15 -0
  230. package/lib/components/pay/toC/PayCountdown/index.js +49 -0
  231. package/lib/components/pay/toC/PayCountdown/index.less +22 -0
  232. package/lib/components/pay/toC/PaymentList/index.d.ts +19 -0
  233. package/lib/components/pay/toC/PaymentList/index.js +256 -0
  234. package/lib/components/pay/toC/PaymentList/index.less +112 -0
  235. package/lib/components/pay/toC/PaymentList/mock.d.ts +88 -0
  236. package/lib/components/pay/toC/PaymentList/mock.js +174 -0
  237. package/lib/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
  238. package/lib/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
  239. package/lib/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
  240. package/lib/components/pay/toC/PaymentList/payment/cash.svg +8 -0
  241. package/lib/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
  242. package/lib/components/pay/toC/PaymentList/payment/custom.svg +10 -0
  243. package/lib/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
  244. package/lib/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
  245. package/lib/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
  246. package/lib/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
  247. package/lib/components/pay/toC/PaymentList/serve.d.ts +26 -0
  248. package/lib/components/pay/toC/PaymentList/serve.js +83 -0
  249. package/lib/components/pay/toC/PaymentList/status.d.ts +4 -0
  250. package/lib/components/pay/toC/PaymentList/status.js +132 -0
  251. package/lib/components/pay/toC/PaymentList/utils.d.ts +10 -0
  252. package/lib/components/pay/toC/PaymentList/utils.js +52 -0
  253. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
  254. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +96 -0
  255. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
  256. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
  257. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +68 -0
  258. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
  259. package/lib/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
  260. package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +56 -0
  261. package/lib/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
  262. package/lib/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
  263. package/lib/components/pay/toC/PaymentMethods/CashManual/serve.js +33 -0
  264. package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
  265. package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +56 -0
  266. package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
  267. package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
  268. package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.js +33 -0
  269. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
  270. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +89 -0
  271. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
  272. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
  273. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +44 -0
  274. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
  275. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +89 -0
  276. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
  277. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
  278. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +44 -0
  279. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
  280. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +61 -0
  281. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
  282. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
  283. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +43 -0
  284. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
  285. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +89 -0
  286. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
  287. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
  288. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +44 -0
  289. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
  290. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +95 -0
  291. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
  292. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +270 -0
  293. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
  294. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
  295. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +224 -0
  296. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
  297. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
  298. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +39 -0
  299. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
  300. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +52 -0
  301. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
  302. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
  303. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +139 -0
  304. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
  305. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
  306. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +80 -0
  307. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
  308. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
  309. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +336 -0
  310. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
  311. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +53 -0
  312. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
  313. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
  314. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +33 -0
  315. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  316. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +76 -0
  317. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
  318. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +107 -0
  319. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
  320. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
  321. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +30 -0
  322. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
  323. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +44 -0
  324. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
  325. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +69 -0
  326. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
  327. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +44 -0
  328. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
  329. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +48 -0
  330. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
  331. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
  332. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  333. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +124 -0
  334. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
  335. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +94 -0
  336. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
  337. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
  338. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +81 -0
  339. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
  340. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
  341. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +30 -0
  342. package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  343. package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +71 -0
  344. package/lib/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
  345. package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
  346. package/lib/components/pay/toC/PaymentMethods/StripePay/serve.js +43 -0
  347. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
  348. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +88 -0
  349. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
  350. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
  351. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +44 -0
  352. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
  353. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +87 -0
  354. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
  355. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
  356. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +44 -0
  357. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
  358. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +126 -0
  359. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
  360. package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
  361. package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +56 -0
  362. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
  363. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +284 -0
  364. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
  365. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
  366. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +54 -0
  367. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
  368. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +70 -0
  369. package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  370. package/lib/components/pay/toC/PaymentMethods/index.js +176 -0
  371. package/lib/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
  372. package/lib/components/pay/toC/WalletPassBlock/index.js +97 -0
  373. package/lib/components/pay/toC/WalletPassBlock/index.less +65 -0
  374. package/lib/components/pay/toC/index.d.ts +3 -0
  375. package/lib/components/pay/toC/index.js +366 -0
  376. package/lib/components/pay/toC/index.less +22 -0
  377. package/lib/components/pay/toC/locales.d.ts +208 -0
  378. package/lib/components/pay/toC/locales.js +231 -0
  379. package/lib/components/pay/toC/model.d.ts +35 -0
  380. package/lib/components/pay/toC/model.js +60 -0
  381. package/lib/components/pay/toC/payGroup.d.ts +48 -0
  382. package/lib/components/pay/toC/payGroup.js +77 -0
  383. package/lib/components/pay/toC/serve.d.ts +34 -0
  384. package/lib/components/pay/toC/serve.js +78 -0
  385. package/lib/components/pay/toC/status.d.ts +3 -0
  386. package/lib/components/pay/toC/status.js +92 -0
  387. package/lib/components/pay/toC/utils.d.ts +30 -0
  388. package/lib/components/pay/toC/utils.js +62 -0
  389. package/lib/components/schedules/index.d.ts +1 -1
  390. package/lib/components/schedules/model.d.ts +2 -1
  391. package/lib/index.d.ts +1 -0
  392. package/lib/index.js +3 -0
  393. package/lib/utils/index.d.ts +6 -5
  394. package/lib/utils/index.js +12 -1
  395. package/lowcode/toc-pay/meta.ts +59 -0
  396. package/package.json +4 -3
@@ -0,0 +1,366 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pay/toC/index.tsx
30
+ var toC_exports = {};
31
+ __export(toC_exports, {
32
+ default: () => toC_default
33
+ });
34
+ module.exports = __toCommonJS(toC_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_decimal = require("decimal.js");
37
+ var import_ahooks = require("ahooks");
38
+ var import_materials = require("@pisell/materials");
39
+ var import_utils = require("@pisell/utils");
40
+ var import_PayCountdown = __toESM(require("./PayCountdown"));
41
+ var import_PayAmount = __toESM(require("./PayAmount"));
42
+ var import_WalletPassBlock = __toESM(require("./WalletPassBlock"));
43
+ var import_PaymentList = __toESM(require("./PaymentList"));
44
+ var import_PaymentMethods = __toESM(require("./PaymentMethods"));
45
+ var import_serve = require("./serve");
46
+ var import_model = require("./model");
47
+ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
48
+ var import_utils2 = require("../../../utils");
49
+ var import_payGroup = require("./payGroup");
50
+ var import_locales = __toESM(require("./locales"));
51
+ var import_index = require("./index.less");
52
+ var ToCPay = (props, ref) => {
53
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
54
+ const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
55
+ const paymentListRef = (0, import_react.useRef)();
56
+ const paymentMethodsRef = (0, import_react.useRef)();
57
+ const [loading, setLoading] = (0, import_react.useState)(true);
58
+ const [submitLoading, setSubmitLoading] = (0, import_react.useState)(false);
59
+ const [open, setOpen] = (0, import_react.useState)(false);
60
+ const [renderType, setRenderType] = (0, import_react.useState)("modal");
61
+ const context = (0, import_useEngineContext.default)();
62
+ const [showInformation, setShowInformation] = (0, import_react.useState)(false);
63
+ const utils = context.appHelper.utils || {};
64
+ const dvaStore = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.getStore) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.getState();
65
+ const customer_id = (_i = (_h = (_g = (_f = (_e = (_d = context.appHelper.utils) == null ? void 0 : _d.getStore()) == null ? void 0 : _e.getState) == null ? void 0 : _f.call(_e)) == null ? void 0 : _g.global) == null ? void 0 : _h.userInfo) == null ? void 0 : _i.id;
66
+ import_utils.locales.init(import_locales.default, ((_j = dvaStore.core) == null ? void 0 : _j.translateLocale) || "en");
67
+ import_utils2.request.setRequest(utils == null ? void 0 : utils.request);
68
+ const _initStore = (initProps) => {
69
+ var _a2, _b2, _c2, _d2;
70
+ dispatch({
71
+ type: "init",
72
+ payload: {
73
+ ...initProps,
74
+ status: "init",
75
+ // 将支付回调储存在store, 方便其他模块调用
76
+ payCallback: props.callback,
77
+ history: (_a2 = context.appHelper.utils) == null ? void 0 : _a2.history,
78
+ // 支付组
79
+ payGroup: {
80
+ order_id: (_b2 = initProps == null ? void 0 : initProps.order) == null ? void 0 : _b2.order_id,
81
+ total_amount: (_c2 = initProps == null ? void 0 : initProps.order) == null ? void 0 : _c2.amount,
82
+ // 原订单信息
83
+ _order: initProps == null ? void 0 : initProps.order,
84
+ payment_group_id: (_d2 = initProps == null ? void 0 : initProps.order) == null ? void 0 : _d2.payment_group_id
85
+ }
86
+ }
87
+ });
88
+ };
89
+ const init = async (initProps) => {
90
+ const { renderType: renderType2 } = initProps;
91
+ setRenderType(renderType2 ?? "modal");
92
+ setOpen(true);
93
+ setSubmitLoading(false);
94
+ setLoading(true);
95
+ _initStore(initProps);
96
+ (0, import_payGroup.removePayGroupFromStorage)(initProps.order.order_id);
97
+ await _getPaymentsAndWalletPass(initProps.order);
98
+ };
99
+ const _getPaymentsAndWalletPass = async (order) => {
100
+ var _a2, _b2;
101
+ try {
102
+ const data = await (0, import_serve.getPaymentsAndWalletPass)({
103
+ order_id: order.order_id,
104
+ total_amount: order.amount,
105
+ sale_channel: order.sale_channel || "online-store"
106
+ });
107
+ const {
108
+ remain_amount = 0,
109
+ wallet_pass_recommend_list,
110
+ wallet_pass_amount,
111
+ payment_list,
112
+ walletPass
113
+ } = data || {};
114
+ dispatch({
115
+ type: "setPayGroup",
116
+ payload: {
117
+ ...state.payGroup,
118
+ // 支付方式没有walletPass时walletPass设置null
119
+ walletPass: walletPass ? {
120
+ ...(_a2 = state.payGroup) == null ? void 0 : _a2.walletPass,
121
+ ...walletPass,
122
+ amount: wallet_pass_amount,
123
+ cards: wallet_pass_recommend_list
124
+ } : null,
125
+ total_amount: order.amount,
126
+ wait_amount: remain_amount
127
+ }
128
+ });
129
+ await ((_b2 = paymentListRef.current) == null ? void 0 : _b2.init(payment_list));
130
+ setTimeout(() => {
131
+ setLoading(false);
132
+ }, 100);
133
+ } catch (err) {
134
+ console.log("err", err);
135
+ payCallback({ key: "fail", data: {} });
136
+ }
137
+ };
138
+ const handlePaymentByType = async (type, payGroup) => {
139
+ var _a2, _b2, _c2;
140
+ setSubmitLoading(true);
141
+ await ((_c2 = paymentMethodsRef.current) == null ? void 0 : _c2.onPay({
142
+ type: type || ((_b2 = (_a2 = state.payGroup) == null ? void 0 : _a2.otherPayment) == null ? void 0 : _b2.service),
143
+ payGroup: payGroup || state.payGroup
144
+ }));
145
+ setSubmitLoading(false);
146
+ };
147
+ const paymentInit = async (newOrderId) => {
148
+ var _a2, _b2;
149
+ const orderId = newOrderId || ((_a2 = state.payGroup) == null ? void 0 : _a2.order_id);
150
+ setSubmitLoading(true);
151
+ try {
152
+ const data = await (0, import_serve.getPaymentInit)({
153
+ order_id: orderId,
154
+ amount: (_b2 = state.payGroup) == null ? void 0 : _b2.total_amount
155
+ });
156
+ dispatch({
157
+ type: "setPayGroup",
158
+ payload: {
159
+ order_id: orderId,
160
+ total_amount: data.amount,
161
+ payment_group_id: data.payment_group_id,
162
+ payment_priority: data.payment_priority
163
+ }
164
+ });
165
+ return {
166
+ ...state.payGroup,
167
+ order_id: orderId,
168
+ total_amount: data.amount,
169
+ payment_group_id: data.payment_group_id,
170
+ payment_priority: data.payment_priority
171
+ };
172
+ } catch (err) {
173
+ setSubmitLoading(false);
174
+ payCallback({ key: "fail", data: {} });
175
+ }
176
+ };
177
+ const waitAmount = (0, import_react.useMemo)(() => {
178
+ var _a2;
179
+ return ((_a2 = state.payGroup) == null ? void 0 : _a2.wait_amount) || 0;
180
+ }, [(_k = state.payGroup) == null ? void 0 : _k.wait_amount]);
181
+ const isWalletPassPay = (0, import_react.useMemo)(() => {
182
+ var _a2, _b2, _c2;
183
+ const isWalletPass = (_c2 = (_b2 = (_a2 = state.payGroup) == null ? void 0 : _a2.walletPass) == null ? void 0 : _b2.cards) == null ? void 0 : _c2.length;
184
+ return waitAmount <= 0 && isWalletPass;
185
+ }, [state.payGroup, waitAmount]);
186
+ const isDisabled = (0, import_react.useMemo)(() => {
187
+ var _a2, _b2;
188
+ if (waitAmount > 0) {
189
+ const isOtherPayment = (_b2 = (_a2 = state.payGroup) == null ? void 0 : _a2.otherPayment) == null ? void 0 : _b2.service;
190
+ return !isOtherPayment;
191
+ } else {
192
+ return !isWalletPassPay;
193
+ }
194
+ }, [state.payGroup, waitAmount, isWalletPassPay]);
195
+ const onSubmit = async (newOrderId) => {
196
+ var _a2;
197
+ let newPayGroup = state.payGroup;
198
+ if (!((_a2 = state.payGroup) == null ? void 0 : _a2.payment_group_id)) {
199
+ newPayGroup = await paymentInit(newOrderId);
200
+ }
201
+ handlePaymentByType(void 0, newPayGroup);
202
+ };
203
+ const paymentTypeChange = (payload) => {
204
+ dispatch({
205
+ type: "setPayGroup",
206
+ payload: {
207
+ otherPayment: payload
208
+ }
209
+ });
210
+ };
211
+ const okText = (0, import_react.useMemo)(() => {
212
+ var _a2, _b2, _c2, _d2;
213
+ let current = (_a2 = state.payGroup) == null ? void 0 : _a2.otherPayment;
214
+ if (((_b2 = state.payGroup) == null ? void 0 : _b2.wait_amount) == 0) {
215
+ return import_utils.locales.getText("tocPay.text.submit");
216
+ }
217
+ if (current == null ? void 0 : current.surcharge) {
218
+ return /* @__PURE__ */ import_react.default.createElement("span", { className: "" }, import_utils.locales.getText("tocPay.text.pay"), " ", /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: ((_c2 = state.payGroup) == null ? void 0 : _c2.wait_amount) || 0 }), " +", import_utils.locales.getText("tocPay.text.surcharge"));
219
+ } else {
220
+ return /* @__PURE__ */ import_react.default.createElement("span", { className: "" }, import_utils.locales.getText("tocPay.text.pay"), " ", /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: ((_d2 = state.payGroup) == null ? void 0 : _d2.wait_amount) || 0 }));
221
+ }
222
+ }, [state.payGroup]);
223
+ const payCallback = async (res) => {
224
+ var _a2;
225
+ if (res.key === "cancel") {
226
+ setOpen(false);
227
+ }
228
+ (_a2 = props.callback) == null ? void 0 : _a2.call(props, res);
229
+ };
230
+ const onCancel = () => {
231
+ var _a2;
232
+ (0, import_payGroup.removePayGroupFromStorage)((_a2 = state.payGroup) == null ? void 0 : _a2.order_id);
233
+ setShowInformation(false);
234
+ setOpen(false);
235
+ payCallback({
236
+ key: "cancel",
237
+ data: {}
238
+ });
239
+ };
240
+ (0, import_ahooks.useUpdateEffect)(() => {
241
+ var _a2, _b2;
242
+ (_b2 = paymentListRef.current) == null ? void 0 : _b2.calculateSurcharge(
243
+ ((_a2 = state.payGroup) == null ? void 0 : _a2.wait_amount) || 0
244
+ );
245
+ }, [(_l = state.payGroup) == null ? void 0 : _l.wait_amount]);
246
+ (0, import_react.useImperativeHandle)(ref, () => {
247
+ return {
248
+ init,
249
+ payCallback,
250
+ onSubmit
251
+ };
252
+ });
253
+ const renderPaymentListTitle = () => {
254
+ var _a2, _b2;
255
+ if (waitAmount == 0) {
256
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "custom-payment-list-title" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("tocPay.text.clickSubmitToComplete")), /* @__PURE__ */ import_react.default.createElement("div", { className: "custom-payment-list-title-desc" }, import_utils.locales.getText("tocPay.text.noExtraPayNeeded")));
257
+ }
258
+ if (((_a2 = state.payGroup) == null ? void 0 : _a2.total_amount) !== waitAmount) {
259
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "custom-payment-list-title" }, import_utils.locales.getText("tocPay.text.continuePayment"), " ", /* @__PURE__ */ import_react.default.createElement(
260
+ import_materials.PisellText.Amount,
261
+ {
262
+ className: "custom-payment-list-title-price",
263
+ value: ((_b2 = state.payGroup) == null ? void 0 : _b2.wait_amount) || 0
264
+ }
265
+ ));
266
+ }
267
+ return import_utils.locales.getText("tocPay.text.paymentMethod");
268
+ };
269
+ const onWalletPassChange = (0, import_ahooks.useMemoizedFn)(
270
+ (walletPass) => {
271
+ var _a2, _b2;
272
+ const _waitAmount = new import_decimal.Decimal(String(((_a2 = state.payGroup) == null ? void 0 : _a2.total_amount) || 0)).minus(new import_decimal.Decimal(String(walletPass.amount || 0))).toNumber();
273
+ dispatch({
274
+ type: "setPayGroup",
275
+ payload: {
276
+ walletPass: {
277
+ ...(_b2 = state.payGroup) == null ? void 0 : _b2.walletPass,
278
+ ...walletPass
279
+ },
280
+ wait_amount: _waitAmount
281
+ }
282
+ });
283
+ }
284
+ );
285
+ return /* @__PURE__ */ import_react.default.createElement(
286
+ import_materials.PisellContainer,
287
+ {
288
+ renderType,
289
+ props: {
290
+ forceRender: true,
291
+ title: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("tocPay.text.checkout")),
292
+ open,
293
+ cancelVisible: false,
294
+ okText,
295
+ bodyStyle: {
296
+ padding: 24
297
+ },
298
+ onCancel: () => {
299
+ setShowInformation(true);
300
+ },
301
+ okButtonProps: {
302
+ disabled: isDisabled,
303
+ loading: submitLoading,
304
+ className: "toc-pay-submit-btn"
305
+ },
306
+ onOk: () => {
307
+ onSubmit();
308
+ }
309
+ }
310
+ },
311
+ /* @__PURE__ */ import_react.default.createElement(
312
+ import_materials.PisellModal.Information,
313
+ {
314
+ open: showInformation,
315
+ title: import_utils.locales.getText("tocPay.text.prompt"),
316
+ describe: import_utils.locales.getText("tocPay.text.confirmLeave"),
317
+ okText: import_utils.locales.getText("tocPay.text.continuePay"),
318
+ cancelText: import_utils.locales.getText("tocPay.text.leave"),
319
+ closable: true,
320
+ cancelButtonProps: {
321
+ onClick: () => {
322
+ onCancel();
323
+ }
324
+ },
325
+ maskClosable: false,
326
+ onCancel: () => {
327
+ setShowInformation(false);
328
+ },
329
+ onOk: () => {
330
+ setShowInformation(false);
331
+ }
332
+ }
333
+ ),
334
+ /* @__PURE__ */ import_react.default.createElement(
335
+ import_materials.PisellLoading,
336
+ {
337
+ loading,
338
+ mask: true
339
+ },
340
+ ((_m = state.order) == null ? void 0 : _m.countdown) && /* @__PURE__ */ import_react.default.createElement(import_PayCountdown.default, { time: (_n = state.order) == null ? void 0 : _n.countdown }),
341
+ /* @__PURE__ */ import_react.default.createElement(import_PayAmount.default, { amount: ((_o = state.payGroup) == null ? void 0 : _o.total_amount) || 0 }),
342
+ ((_p = state.payGroup) == null ? void 0 : _p.walletPass) && /* @__PURE__ */ import_react.default.createElement(
343
+ import_WalletPassBlock.default,
344
+ {
345
+ customer_id,
346
+ payGroup: state.payGroup,
347
+ onWalletPassChange
348
+ }
349
+ ),
350
+ /* @__PURE__ */ import_react.default.createElement(
351
+ import_PaymentList.default,
352
+ {
353
+ ref: paymentListRef,
354
+ handlePayment: () => {
355
+ handlePaymentByType();
356
+ },
357
+ paymentTypeChange,
358
+ hide: ((_q = state.payGroup) == null ? void 0 : _q.wait_amount) == 0,
359
+ renderTitle: renderPaymentListTitle
360
+ }
361
+ )
362
+ ),
363
+ /* @__PURE__ */ import_react.default.createElement(import_PaymentMethods.default, { ref: paymentMethodsRef, payCallback })
364
+ );
365
+ };
366
+ var toC_default = (0, import_model.Provider)((0, import_react.forwardRef)(ToCPay));
@@ -0,0 +1,22 @@
1
+ .custom-payment-list-title {
2
+ .custom-payment-list-title-price {
3
+ color: var(--theme-color);
4
+ ;
5
+ }
6
+
7
+
8
+ .custom-payment-list-title-desc {
9
+ color: var(--Gray-700, #344054);
10
+ font-size: 16px;
11
+ font-style: normal;
12
+ font-weight: 400;
13
+ line-height: 24px;
14
+ }
15
+ }
16
+
17
+ .toc-pay-submit-btn {
18
+ color: var(--Base-White, #FFF);
19
+ font-size: 16px;
20
+ font-style: normal;
21
+ font-weight: 600;
22
+ }
@@ -0,0 +1,208 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'tocPay.text.checkout': string;
4
+ 'tocPay.text.total': string;
5
+ 'tocPay.text.completePaymentIn': string;
6
+ 'tocPay.text.paymentInstruction': string;
7
+ 'tocPay.text.serviceCharge': string;
8
+ 'tocPay.text.noAvailablePaymentMethods': string;
9
+ 'tocPay.text.paymentMethod': string;
10
+ 'tocPay.text.connectingApplePay': string;
11
+ 'tocPay.text.connectingGooglePay': string;
12
+ 'tocPay.text.enterName': string;
13
+ 'tocPay.text.enterValidName': string;
14
+ 'tocPay.text.enterCardNumber': string;
15
+ 'tocPay.text.enterValidCardNumber': string;
16
+ 'tocPay.text.enterExpirationDate': string;
17
+ 'tocPay.text.enterCVV': string;
18
+ 'tocPay.text.enterValidCVV': string;
19
+ 'tocPay.text.addCard': string;
20
+ 'tocPay.text.creditorDebitCard': string;
21
+ 'tocPay.text.addCreditOrDebitCard': string;
22
+ 'tocPay.text.cardNumber': string;
23
+ 'tocPay.text.incorrectCardNumber': string;
24
+ 'tocPay.text.expiration': string;
25
+ 'tocPay.text.incorrectExpiryDate': string;
26
+ 'tocPay.text.securityCode': string;
27
+ 'tocPay.text.incorrectSecurityCode': string;
28
+ 'tocPay.text.cardholderName': string;
29
+ 'tocPay.text.enterEnglishName': string;
30
+ 'tocPay.text.incorrectName': string;
31
+ 'tocPay.text.saveCardForNextTime': string;
32
+ 'tocPay.text.secureBankInfo': string;
33
+ 'tocPay.text.pay': string;
34
+ 'tocPay.text.surcharge': string;
35
+ 'tocPay.text.done': string;
36
+ 'tocPay.text.manageCard': string;
37
+ 'tocPay.text.waitingForBankVerification': string;
38
+ 'tocPay.text.redirectingToAlipay': string;
39
+ 'tocPay.text.redirectingToPaypal': string;
40
+ 'tocPay.text.redirectingToWeChatPay': string;
41
+ 'tocPay.text.submit': string;
42
+ 'tocPay.text.clickSubmitToComplete': string;
43
+ 'tocPay.text.noExtraPayNeeded': string;
44
+ 'tocPay.text.continuePayment': string;
45
+ 'tocPay.text.prompt': string;
46
+ 'tocPay.text.confirmLeave': string;
47
+ 'tocPay.text.continuePay': string;
48
+ 'tocPay.text.leave': string;
49
+ 'tocPay.text.getParamsFail': string;
50
+ 'tocPay.text.walletPass': string;
51
+ 'tocPay.text.searchResult': string;
52
+ 'tocPay.text.select': string;
53
+ 'tocPay.text.couponCodesAdded': string;
54
+ 'tocPay.text.redeem': string;
55
+ 'tocPay.text.howToPay': string;
56
+ 'tocPay.text.congrats': string;
57
+ 'tocPay.text.creditHaveBeen': string;
58
+ 'tocPay.text.walletPassCodesTitle': string;
59
+ 'tocPay.text.scanBarQrCode': string;
60
+ 'tocPay.text.enterCodes': string;
61
+ 'tocPay.text.searchDescribe': string;
62
+ 'tocPay.text.walletPassEmpty': string;
63
+ 'tocPay.text.walletPassDisabled': string;
64
+ 'tocPay.text.walletPassPermanent': string;
65
+ 'tocPay.text.walletPassCompleteTitle': string;
66
+ 'tocPay.text.walletPassNoExtraPay': string;
67
+ 'tocPay.text.walletCanPay': string;
68
+ 'tocPay.text.paymentInstructions': string;
69
+ 'tocPay.text.walletSearchEmpty': string;
70
+ };
71
+ 'zh-CN': {
72
+ 'tocPay.text.checkout': string;
73
+ 'tocPay.text.total': string;
74
+ 'tocPay.text.completePaymentIn': string;
75
+ 'tocPay.text.paymentInstructions': string;
76
+ 'tocPay.text.serviceCharge': string;
77
+ 'tocPay.text.noAvailablePaymentMethods': string;
78
+ 'tocPay.text.paymentMethod': string;
79
+ 'tocPay.text.connectingApplePay': string;
80
+ 'tocPay.text.connectingGooglePay': string;
81
+ 'tocPay.text.enterName': string;
82
+ 'tocPay.text.enterValidName': string;
83
+ 'tocPay.text.enterCardNumber': string;
84
+ 'tocPay.text.enterValidCardNumber': string;
85
+ 'tocPay.text.enterExpirationDate': string;
86
+ 'tocPay.text.enterCVV': string;
87
+ 'tocPay.text.enterValidCVV': string;
88
+ 'tocPay.text.addCard': string;
89
+ 'tocPay.text.creditorDebitCard': string;
90
+ 'tocPay.text.addCreditOrDebitCard': string;
91
+ 'tocPay.text.cardNumber': string;
92
+ 'tocPay.text.incorrectCardNumber': string;
93
+ 'tocPay.text.expiration': string;
94
+ 'tocPay.text.incorrectExpiryDate': string;
95
+ 'tocPay.text.securityCode': string;
96
+ 'tocPay.text.incorrectSecurityCode': string;
97
+ 'tocPay.text.cardholderName': string;
98
+ 'tocPay.text.enterEnglishName': string;
99
+ 'tocPay.text.incorrectName': string;
100
+ 'tocPay.text.saveCardForNextTime': string;
101
+ 'tocPay.text.secureBankInfo': string;
102
+ 'tocPay.text.pay': string;
103
+ 'tocPay.text.surcharge': string;
104
+ 'tocPay.text.done': string;
105
+ 'tocPay.text.manageCard': string;
106
+ 'tocPay.text.waitingForBankVerification': string;
107
+ 'tocPay.text.redirectingToAlipay': string;
108
+ 'tocPay.text.redirectingToPaypal': string;
109
+ 'tocPay.text.redirectingToWeChatPay': string;
110
+ 'tocPay.text.submit': string;
111
+ 'tocPay.text.clickSubmitToComplete': string;
112
+ 'tocPay.text.noExtraPayNeeded': string;
113
+ 'tocPay.text.continuePayment': string;
114
+ 'tocPay.text.prompt': string;
115
+ 'tocPay.text.confirmLeave': string;
116
+ 'tocPay.text.continuePay': string;
117
+ 'tocPay.text.leave': string;
118
+ 'tocPay.text.getParamsFail': string;
119
+ 'tocPay.text.walletPass': string;
120
+ 'tocPay.text.searchResult': string;
121
+ 'tocPay.text.select': string;
122
+ 'tocPay.text.couponCodesAdded': string;
123
+ 'tocPay.text.redeem': string;
124
+ 'tocPay.text.howToPay': string;
125
+ 'tocPay.text.congrats': string;
126
+ 'tocPay.text.creditHaveBeen': string;
127
+ 'tocPay.text.walletPassCodesTitle': string;
128
+ 'tocPay.text.scanBarQrCode': string;
129
+ 'tocPay.text.enterCodes': string;
130
+ 'tocPay.text.searchDescribe': string;
131
+ 'tocPay.text.walletPassEmpty': string;
132
+ 'tocPay.text.walletPassDisabled': string;
133
+ 'tocPay.text.walletPassPermanent': string;
134
+ 'tocPay.text.walletPassCompleteTitle': string;
135
+ 'tocPay.text.walletPassNoExtraPay': string;
136
+ 'tocPay.text.walletCanPay': string;
137
+ 'tocPay.text.walletSearchEmpty': string;
138
+ };
139
+ 'zh-HK': {
140
+ 'tocPay.text.checkout': string;
141
+ 'tocPay.text.total': string;
142
+ 'tocPay.text.completePaymentIn': string;
143
+ 'tocPay.text.paymentInstructions': string;
144
+ 'tocPay.text.serviceCharge': string;
145
+ 'tocPay.text.noAvailablePaymentMethods': string;
146
+ 'tocPay.text.paymentMethod': string;
147
+ 'tocPay.text.connectingApplePay': string;
148
+ 'tocPay.text.connectingGooglePay': string;
149
+ 'tocPay.text.enterName': string;
150
+ 'tocPay.text.enterValidName': string;
151
+ 'tocPay.text.enterCardNumber': string;
152
+ 'tocPay.text.enterValidCardNumber': string;
153
+ 'tocPay.text.enterExpirationDate': string;
154
+ 'tocPay.text.enterCVV': string;
155
+ 'tocPay.text.enterValidCVV': string;
156
+ 'tocPay.text.addCard': string;
157
+ 'tocPay.text.creditorDebitCard': string;
158
+ 'tocPay.text.addCreditOrDebitCard': string;
159
+ 'tocPay.text.cardNumber': string;
160
+ 'tocPay.text.incorrectCardNumber': string;
161
+ 'tocPay.text.expiration': string;
162
+ 'tocPay.text.incorrectExpiryDate': string;
163
+ 'tocPay.text.securityCode': string;
164
+ 'tocPay.text.incorrectSecurityCode': string;
165
+ 'tocPay.text.cardholderName': string;
166
+ 'tocPay.text.enterEnglishName': string;
167
+ 'tocPay.text.incorrectName': string;
168
+ 'tocPay.text.saveCardForNextTime': string;
169
+ 'tocPay.text.secureBankInfo': string;
170
+ 'tocPay.text.pay': string;
171
+ 'tocPay.text.surcharge': string;
172
+ 'tocPay.text.done': string;
173
+ 'tocPay.text.manageCard': string;
174
+ 'tocPay.text.waitingForBankVerification': string;
175
+ 'tocPay.text.redirectingToAlipay': string;
176
+ 'tocPay.text.redirectingToPaypal': string;
177
+ 'tocPay.text.redirectingToWeChatPay': string;
178
+ 'tocPay.text.submit': string;
179
+ 'tocPay.text.clickSubmitToComplete': string;
180
+ 'tocPay.text.noExtraPayNeeded': string;
181
+ 'tocPay.text.continuePayment': string;
182
+ 'tocPay.text.prompt': string;
183
+ 'tocPay.text.confirmLeave': string;
184
+ 'tocPay.text.continuePay': string;
185
+ 'tocPay.text.leave': string;
186
+ 'tocPay.text.getParamsFail': string;
187
+ 'tocPay.text.walletPass': string;
188
+ 'tocPay.text.searchResult': string;
189
+ 'tocPay.text.select': string;
190
+ 'tocPay.text.couponCodesAdded': string;
191
+ 'tocPay.text.redeem': string;
192
+ 'tocPay.text.howToPay': string;
193
+ 'tocPay.text.congrats': string;
194
+ 'tocPay.text.creditHaveBeen': string;
195
+ 'tocPay.text.walletPassCodesTitle': string;
196
+ 'tocPay.text.scanBarQrCode': string;
197
+ 'tocPay.text.enterCodes': string;
198
+ 'tocPay.text.searchDescribe': string;
199
+ 'tocPay.text.walletPassEmpty': string;
200
+ 'tocPay.text.walletPassDisabled': string;
201
+ 'tocPay.text.walletPassPermanent': string;
202
+ 'tocPay.text.walletPassCompleteTitle': string;
203
+ 'tocPay.text.walletPassNoExtraPay': string;
204
+ 'tocPay.text.walletCanPay': string;
205
+ 'tocPay.text.walletSearchEmpty': string;
206
+ };
207
+ };
208
+ export default _default;