@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,27 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ import { request } from "../../../../../utils";
6
+ export var offlinePayment = /*#__PURE__*/function () {
7
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
8
+ var _yield$request$getReq, data;
9
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
10
+ while (1) switch (_context.prev = _context.next) {
11
+ case 0:
12
+ _context.next = 2;
13
+ return request.getRequest().post("/h5/pay/order/offline-payment/".concat(values.order_id), values);
14
+ case 2:
15
+ _yield$request$getReq = _context.sent;
16
+ data = _yield$request$getReq.data;
17
+ return _context.abrupt("return", data);
18
+ case 5:
19
+ case "end":
20
+ return _context.stop();
21
+ }
22
+ }, _callee);
23
+ }));
24
+ return function offlinePayment(_x) {
25
+ return _ref.apply(this, arguments);
26
+ };
27
+ }();
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type PaymentStatusProps = {
3
+ onChange: (status: 'succeeded' | 'processing' | 'requires_payment_method' | 'error') => void;
4
+ };
5
+ declare const PaymentStatus: React.FC<PaymentStatusProps>;
6
+ export default PaymentStatus;
@@ -0,0 +1,61 @@
1
+ import React, { useEffect } from 'react';
2
+ import { useStripe } from '@stripe/react-stripe-js';
3
+ import useEngineContext from "../../../../../../../hooks/useEngineContext";
4
+ import styles from "./index.less";
5
+ var PaymentStatus = function PaymentStatus(_ref) {
6
+ var _context$appHelper;
7
+ var onChange = _ref.onChange;
8
+ var stripe = useStripe();
9
+ var context = useEngineContext();
10
+ var _ref2 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
11
+ config = _ref2.config;
12
+ useEffect(function () {
13
+ if (!stripe) {
14
+ return;
15
+ }
16
+
17
+ // Retrieve the "setup_intent_client_secret" query parameter appended to
18
+ // your return_url by Stripe.js
19
+ var clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret');
20
+
21
+ // Retrieve the SetupIntent
22
+ stripe.retrievePaymentIntent(clientSecret).then(function (_ref3) {
23
+ var paymentIntent = _ref3.paymentIntent;
24
+ // Inspect the SetupIntent `status` to indicate the status of the payment
25
+ // to your customer.
26
+ //
27
+ // Some payment methods will [immediately succeed or fail][0] upon
28
+ // confirmation, while others will first enter a `processing` state.
29
+ //
30
+ // [0]: https://stripe.com/docs/payments/payment-methods#payment-notification
31
+ console.log(paymentIntent);
32
+ switch (paymentIntent.status) {
33
+ case 'succeeded':
34
+ // Success! Your payment method has been saved.
35
+ onChange('succeeded');
36
+ break;
37
+ case 'processing':
38
+ // Processing payment details. We'll update you when processing is complete.
39
+ onChange('processing');
40
+ break;
41
+ case 'requires_payment_method':
42
+ // Redirect your user back to your payment page to attempt collecting
43
+ // Failed to process payment details. Please try another payment method.
44
+ // payment again
45
+ onChange('requires_payment_method');
46
+ break;
47
+ }
48
+ });
49
+ }, [stripe]);
50
+ return /*#__PURE__*/React.createElement("div", {
51
+ className: styles['page-loading-wrap']
52
+ }, /*#__PURE__*/React.createElement("img", {
53
+ loading: "lazy",
54
+ className: styles['logo'],
55
+ src: config.static + '/static/payment-loading.svg',
56
+ alt: ""
57
+ }), /*#__PURE__*/React.createElement("div", {
58
+ className: styles['title']
59
+ }, "\u8BF7\u7A0D\u5019"));
60
+ };
61
+ export default PaymentStatus;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const StripePayment: () => import("react").JSX.Element;
3
+ export default StripePayment;
@@ -0,0 +1,121 @@
1
+ import { useMemo } from 'react';
2
+ import { useRequest } from 'ahooks';
3
+ import NavBar from "../../../../../../NavBar";
4
+ import StripeSDK from "../../../../../../StripeSDK";
5
+ import Content from "./Content";
6
+ import { isWxApp } from "../../../../../../../utils";
7
+ import { getStripeKey } from "./serve";
8
+ import styles from "./index.less";
9
+ var StripePayment = function StripePayment() {
10
+ var _getStripeKey$data;
11
+ var history = useHistory();
12
+ //@ts-ignore
13
+ var query = history.location.query;
14
+
15
+ /**
16
+ * @title: 获取 stripe key
17
+ * @description:
18
+ * @param {*}
19
+ * @return {*}
20
+ * @Author: Wzw
21
+ * @Date: 2022-04-01 11:05
22
+ */
23
+ var _getStripeKey = useRequest(getStripeKey, {
24
+ formatResult: function formatResult(res) {
25
+ return res.data;
26
+ },
27
+ onError: function onError() {
28
+ goFinish('error');
29
+ }
30
+ });
31
+
32
+ /**
33
+ * @title: 返回订单详情
34
+ * @description:
35
+ * @param {*}
36
+ * @return {*}
37
+ * @Author: Wzw
38
+ * @Date: 2022-04-01 11:06
39
+ */
40
+ var goBack = function goBack() {
41
+ history.replace("/order/details?id=".concat(query === null || query === void 0 ? void 0 : query.order_id));
42
+ };
43
+
44
+ /**
45
+ * @title: 跳转至支付成功 | 失败页面
46
+ * @description:
47
+ * @param {*} status
48
+ * @return {*}
49
+ * @Author: Wzw
50
+ * @Date: 2022-04-01 11:06
51
+ */
52
+ var goFinish = function goFinish(status) {
53
+ if (query !== null && query !== void 0 && query.order_id) {
54
+ var _pathname = '';
55
+ // 微信环境走微信的页面
56
+ if ((query === null || query === void 0 ? void 0 : query.scene) === 'wxapp') {
57
+ if (status === 'success') {
58
+ _pathname = '/miniapp-payment/success';
59
+ } else {
60
+ _pathname = '/miniapp-payment/fail';
61
+ }
62
+ } else {
63
+ if (status === 'success') {
64
+ _pathname = '/payment-finish/success';
65
+ } else {
66
+ _pathname = '/payment-finish/fail';
67
+ }
68
+ }
69
+ history.replace("".concat(_pathname, "?order_id=").concat(query === null || query === void 0 ? void 0 : query.order_id, "&amount=").concat(query.amount, "&status=").concat(status));
70
+ } else {
71
+ history.replace('/');
72
+ }
73
+ };
74
+
75
+ /**
76
+ * @title: 支付回调
77
+ * @description:
78
+ * @param {*}
79
+ * @return {*}
80
+ * @Author: Wzw
81
+ * @Date: 2022-04-01 11:06
82
+ */
83
+ var onPaymentChange = function onPaymentChange(status) {
84
+ // 成功
85
+ if (status === 'succeeded') {
86
+ goFinish('success');
87
+ }
88
+
89
+ // 处理中
90
+ if (status === 'processing') {
91
+ goFinish('success');
92
+ }
93
+
94
+ // 失败
95
+ if (status === 'requires_payment_method') {
96
+ goFinish('error');
97
+ }
98
+
99
+ // 错误
100
+ if (status === 'error') {
101
+ goFinish('error');
102
+ }
103
+ };
104
+ var _title = useMemo(function () {
105
+ return decodeURIComponent(query.payment_method || '');
106
+ }, [query]);
107
+ return /*#__PURE__*/React.createElement("div", {
108
+ className: styles['stripe-payment-page']
109
+ }, /*#__PURE__*/React.createElement(NavBar, {
110
+ name: _title,
111
+ onChange: goBack,
112
+ bgColor: "#ffffff",
113
+ nameColor: "rgba(0,0,0,.9)",
114
+ backColor: "rgba(0,0,0,.9)"
115
+ }), isWxApp() ? null : /*#__PURE__*/React.createElement(StripeSDK, {
116
+ public_key: (_getStripeKey$data = _getStripeKey.data) === null || _getStripeKey$data === void 0 ? void 0 : _getStripeKey$data.publishable_key
117
+ }, /*#__PURE__*/React.createElement(Content, {
118
+ onChange: onPaymentChange
119
+ })));
120
+ };
121
+ export default StripePayment;
@@ -0,0 +1,35 @@
1
+ .stripe-payment-page {
2
+ background-color: #ffffff;
3
+ height: 100%;
4
+ width: 100%;
5
+ overflow-x: hidden;
6
+ overflow-y: scroll;
7
+ }
8
+
9
+ .page-loading-wrap {
10
+ position: fixed;
11
+ width: 100%;
12
+ height: calc(100% - 44px);
13
+ background-color: #ffffff;
14
+ top: 44px;
15
+ z-index: 99;
16
+ display: flex;
17
+ flex-direction: column;
18
+ align-items: center;
19
+
20
+ .logo {
21
+ margin-top: 199px;
22
+ width: 140px;
23
+ height: 140px;
24
+ }
25
+
26
+ .title {
27
+ margin-top: 20px;
28
+ font-size: 20px;
29
+ font-weight: bold;
30
+ line-height: 36px;
31
+ color: #000000;
32
+ padding: 0 20px;
33
+ text-align: center;
34
+ }
35
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @title: 获取stripe配置
3
+ * @description:
4
+ * @param {string} order_id
5
+ * @return {*}
6
+ * @Author: Wzw
7
+ * @Date: 2022-03-31 16:12
8
+ */
9
+ export declare const getStripeKey: () => Promise<any>;
@@ -0,0 +1,33 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ import { get } from "../../../../../../../utils/request";
6
+
7
+ /**
8
+ * @title: 获取stripe配置
9
+ * @description:
10
+ * @param {string} order_id
11
+ * @return {*}
12
+ * @Author: Wzw
13
+ * @Date: 2022-03-31 16:12
14
+ */
15
+ export var getStripeKey = /*#__PURE__*/function () {
16
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
17
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
18
+ while (1) switch (_context.prev = _context.next) {
19
+ case 0:
20
+ _context.next = 2;
21
+ return get("/h5/stripe/config");
22
+ case 2:
23
+ return _context.abrupt("return", _context.sent);
24
+ case 3:
25
+ case "end":
26
+ return _context.stop();
27
+ }
28
+ }, _callee);
29
+ }));
30
+ return function getStripeKey() {
31
+ return _ref.apply(this, arguments);
32
+ };
33
+ }();
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,30 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ import { dynamic } from 'react';
6
+ export default dynamic({
7
+ loader: function () {
8
+ var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9
+ var _yield$import, SDK;
10
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11
+ while (1) switch (_context.prev = _context.next) {
12
+ case 0:
13
+ _context.next = 2;
14
+ return import( /* webpackChunkName: "external_A" */"./SDK");
15
+ case 2:
16
+ _yield$import = _context.sent;
17
+ SDK = _yield$import.default;
18
+ return _context.abrupt("return", SDK);
19
+ case 5:
20
+ case "end":
21
+ return _context.stop();
22
+ }
23
+ }, _callee);
24
+ }));
25
+ function loader() {
26
+ return _loader.apply(this, arguments);
27
+ }
28
+ return loader;
29
+ }()
30
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
+ public_key: string;
4
+ client_secret?: string | undefined;
5
+ children: any;
6
+ lang?: string | undefined;
7
+ }) => React.JSX.Element;
8
+ export default StripeSDK;
@@ -0,0 +1,37 @@
1
+ import React, { useMemo } from 'react';
2
+ import { loadStripe } from '@stripe/stripe-js';
3
+ import { Elements } from '@stripe/react-stripe-js';
4
+ import useEngineContext from "../../../../../../../hooks/useEngineContext";
5
+ var StripeSDK = function StripeSDK(_ref) {
6
+ var public_key = _ref.public_key,
7
+ client_secret = _ref.client_secret,
8
+ children = _ref.children,
9
+ lang = _ref.lang;
10
+ var context = useEngineContext();
11
+ var getStore = context.appHelper.utils.getStore;
12
+ var stripePromise = loadStripe(public_key);
13
+ console.log('getState,', context);
14
+ var locale = useMemo(function () {
15
+ var _locale = 'en-US';
16
+ return lang || (_locale === 'en-US' ? 'en' : _locale === 'zh-CN' ? 'zh' : 'zh-HK');
17
+ }, []);
18
+ var options = useMemo(function () {
19
+ return {
20
+ locale: locale,
21
+ // passing the client secret obtained in step 2
22
+ clientSecret: client_secret,
23
+ // Fully customizable with appearance API.
24
+ appearance: {
25
+ theme: 'stripe',
26
+ variables: {
27
+ colorPrimary: '#0088cc'
28
+ }
29
+ }
30
+ };
31
+ }, [locale]);
32
+ return /*#__PURE__*/React.createElement(Elements, {
33
+ stripe: stripePromise,
34
+ options: options
35
+ }, children);
36
+ };
37
+ export default StripeSDK;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
+ public_key: string;
4
+ client_secret?: string | undefined;
5
+ children: any;
6
+ lang?: string | undefined;
7
+ }) => import("react").JSX.Element;
8
+ export default StripeSDK;
@@ -0,0 +1,13 @@
1
+ import SDK from "./SDK";
2
+ var StripeSDK = function StripeSDK(_ref) {
3
+ var public_key = _ref.public_key,
4
+ client_secret = _ref.client_secret,
5
+ children = _ref.children,
6
+ lang = _ref.lang;
7
+ return /*#__PURE__*/React.createElement(React.Fragment, null, public_key ? /*#__PURE__*/React.createElement(SDK, {
8
+ public_key: public_key,
9
+ client_secret: client_secret,
10
+ lang: lang
11
+ }, children) : null);
12
+ };
13
+ export default StripeSDK;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const PageLoading: () => import("react").JSX.Element;
3
+ export default PageLoading;
@@ -0,0 +1,15 @@
1
+ import cfg from "../../../../../../../../configs";
2
+ import styles from "./index.less";
3
+ import { getText } from "../../../../../../../../utils/formatMessage";
4
+ var PageLoading = function PageLoading() {
5
+ return /*#__PURE__*/React.createElement("div", {
6
+ className: styles['page-loading-wrap']
7
+ }, /*#__PURE__*/React.createElement("img", {
8
+ className: styles['logo'],
9
+ src: cfg.static + '/static/stripe_loading.gif',
10
+ alt: ""
11
+ }), /*#__PURE__*/React.createElement("div", {
12
+ className: styles['title']
13
+ }, getText('payment.text.miniapp.stripe.loading')));
14
+ };
15
+ export default PageLoading;
@@ -0,0 +1,27 @@
1
+ .page-loading-wrap {
2
+ position: fixed;
3
+ width: 100%;
4
+ height: calc(100% - 44px);
5
+ background-color: #ffffff;
6
+ top: 44px;
7
+ z-index: 99;
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: center;
11
+
12
+ .logo {
13
+ margin-top: 150px;
14
+ width: 140px;
15
+ height: 140px;
16
+ }
17
+
18
+ .title {
19
+ margin-top: 20px;
20
+ padding: 0 40px;
21
+ text-align: center;
22
+ font-size: 15px;
23
+ font-weight: bold;
24
+ line-height: 20px;
25
+ color: #353535;
26
+ }
27
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PaymentRequestForm: () => React.JSX.Element | null;
3
+ export default PaymentRequestForm;