@pisell/private-materials 3.3.107 → 3.4.2

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 (283) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/businessModel/SalesModel/index.d.ts +0 -1
  12. package/es/components/Sales/Cart/index.js +9 -8
  13. package/es/components/Sales/Cart/utils.d.ts +0 -40
  14. package/es/components/Sales/Cart/utils.js +0 -167
  15. package/es/components/Sales/Checkout/index.d.ts +0 -4
  16. package/es/components/Sales/Checkout/index.js +8 -52
  17. package/es/components/Sales/Checkout/serve.d.ts +0 -13
  18. package/es/components/Sales/Checkout/serve.js +2 -16
  19. package/es/components/Sales/Checkout/utils.d.ts +6 -1
  20. package/es/components/Sales/Checkout/utils.js +8 -9
  21. package/es/components/Sales/Customer/index.d.ts +1 -0
  22. package/es/components/Sales/Customer/index.js +1 -0
  23. package/es/components/Sales/Summary/index.d.ts +0 -10
  24. package/es/components/Sales/Summary/index.js +2 -17
  25. package/es/components/Sales/Summary/serve.d.ts +0 -1
  26. package/es/components/Sales/Summary/serve.js +0 -6
  27. package/es/components/Sales/Summary/utils.d.ts +0 -15
  28. package/es/components/Sales/Summary/utils.js +1 -43
  29. package/es/components/appointmentBooking/components/Cart/Item/index.js +0 -1
  30. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  31. package/es/components/appointmentBooking/components/Content/index.js +1 -15
  32. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  33. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  34. package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
  35. package/es/components/appointmentBooking/components/Form/index.js +1 -1
  36. package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  37. package/es/components/appointmentBooking/components/Form/utils.js +17 -15
  38. package/es/components/appointmentBooking/components/Header/index.js +2 -1
  39. package/es/components/appointmentBooking/components/Resource/index.js +0 -1
  40. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  41. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
  42. package/es/components/appointmentBooking/deposit/index.js +2 -4
  43. package/es/components/appointmentBooking/index.js +0 -14
  44. package/es/components/appointmentBooking/index.less +1 -1
  45. package/es/components/booking/addons/model.d.ts +1 -10
  46. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  47. package/es/components/booking/components/browserSelect/index.js +1 -1
  48. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  49. package/es/components/booking/components/voucher/index.js +2 -2
  50. package/es/components/booking/forms/model.d.ts +1 -10
  51. package/es/components/booking/forms/model.js +5 -5
  52. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  53. package/es/components/booking/info/model.d.ts +1 -10
  54. package/es/components/booking/info/service/like/index.d.ts +0 -1
  55. package/es/components/booking/info/service/like/index.js +1 -1
  56. package/es/components/booking/info/service/serviceManager/index.js +4 -4
  57. package/es/components/booking/info2/index.js +6 -4
  58. package/es/components/booking/info2/utils.d.ts +4 -0
  59. package/es/components/booking/materiels/startTime/index.js +1 -1
  60. package/es/components/booking/model.d.ts +1 -9
  61. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  62. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  63. package/es/components/booking/notes/model.d.ts +1 -10
  64. package/es/components/booking/notes/model.js +5 -5
  65. package/es/components/booking/payments/model.d.ts +1 -10
  66. package/es/components/booking/payments/model.js +5 -5
  67. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  68. package/es/components/eftpos/form/index.d.ts +0 -1
  69. package/es/components/eftpos/group/index.d.ts +0 -1
  70. package/es/components/eftpos/hooks.d.ts +0 -1
  71. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  72. package/es/components/eftpos/icon/device.d.ts +0 -1
  73. package/es/components/eftpos/receipt/index.d.ts +0 -1
  74. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  75. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  76. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  77. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  78. package/es/components/eftposPay/const.d.ts +1 -4
  79. package/es/components/eftposPay/const.js +1 -3
  80. package/es/components/eftposPay/hooks.d.ts +1 -1
  81. package/es/components/eftposPay/hooks.js +1 -3
  82. package/es/components/eftposPay/index.js +1 -1
  83. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  84. package/es/components/eftposPay/manufacturer.js +0 -4
  85. package/es/components/eftposPay/pay.d.ts +1 -1
  86. package/es/components/eftposPay/pay.js +2 -6
  87. package/es/components/eftposPay/store/index.d.ts +1 -1
  88. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  89. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +28 -31
  90. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
  91. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  92. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  93. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  94. package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
  95. package/es/components/eventBooking/locales.d.ts +0 -24
  96. package/es/components/eventBooking/locales.js +3 -27
  97. package/es/components/listComponent/index.js +5 -5
  98. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  99. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  100. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  101. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  102. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  103. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  104. package/es/components/pay/toC/PaymentMethods/index.js +74 -26
  105. package/es/components/pay/toC/index.js +46 -14
  106. package/es/components/pay/toC/model.d.ts +1 -9
  107. package/es/components/productExtension/card/index.js +3 -3
  108. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  109. package/es/components/productExtension/fields/Forms/index.js +12 -12
  110. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  111. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  112. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  113. package/es/components/productExtension/server.js +2 -2
  114. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  115. package/es/components/schedules/calendar/index.js +4 -4
  116. package/es/components/schedules/calendar/serve.js +2 -2
  117. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  118. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  119. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  120. package/es/components/schedules/components/ResourceList/index.js +1 -1
  121. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  122. package/es/components/schedules/components/Search/index.js +5 -5
  123. package/es/components/schedules/model.d.ts +1 -9
  124. package/es/components/schedules/model.js +5 -5
  125. package/es/components/schedules/openHours/index.js +1 -1
  126. package/es/components/schedules/openHours/serve.js +2 -2
  127. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  128. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  129. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  130. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  131. package/es/components/schedules/products/serve.js +2 -2
  132. package/es/components/schedules/products/utils.js +5 -5
  133. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  134. package/es/components/schedules/resources/detail/index.js +10 -10
  135. package/es/components/schedules/resources/list/index.js +2 -2
  136. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  137. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  138. package/es/components/schedules/resources/serve.js +2 -2
  139. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  140. package/es/components/schedules/utils.d.ts +1 -1
  141. package/es/components/schedules/utils.js +4 -4
  142. package/es/components/selectModal/index.js +2 -2
  143. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  144. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  145. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  146. package/es/components/wallet/Detail/model.d.ts +1 -13
  147. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  148. package/es/components/wallet/PointCard/model.d.ts +1 -13
  149. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  150. package/es/components/wallet/Voucher/model.d.ts +1 -13
  151. package/es/components/wallet/model.d.ts +1 -9
  152. package/es/hooks/useComponents.js +1 -1
  153. package/es/utils/index.d.ts +1 -1
  154. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  155. package/lib/components/Sales/Cart/index.js +8 -5
  156. package/lib/components/Sales/Cart/utils.d.ts +0 -40
  157. package/lib/components/Sales/Cart/utils.js +0 -117
  158. package/lib/components/Sales/Checkout/index.d.ts +0 -4
  159. package/lib/components/Sales/Checkout/index.js +7 -39
  160. package/lib/components/Sales/Checkout/serve.d.ts +0 -13
  161. package/lib/components/Sales/Checkout/serve.js +2 -7
  162. package/lib/components/Sales/Checkout/utils.d.ts +6 -1
  163. package/lib/components/Sales/Checkout/utils.js +5 -5
  164. package/lib/components/Sales/Customer/index.d.ts +1 -0
  165. package/lib/components/Sales/Customer/index.js +1 -0
  166. package/lib/components/Sales/Summary/index.d.ts +0 -10
  167. package/lib/components/Sales/Summary/index.js +1 -7
  168. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  169. package/lib/components/Sales/Summary/serve.js +0 -32
  170. package/lib/components/Sales/Summary/utils.d.ts +0 -15
  171. package/lib/components/Sales/Summary/utils.js +1 -30
  172. package/lib/components/appointmentBooking/components/Cart/Item/index.js +0 -1
  173. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  174. package/lib/components/appointmentBooking/components/Content/index.js +1 -6
  175. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  176. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  177. package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
  178. package/lib/components/appointmentBooking/components/Form/index.js +6 -1
  179. package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  180. package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
  181. package/lib/components/appointmentBooking/components/Header/index.js +1 -0
  182. package/lib/components/appointmentBooking/components/Resource/index.js +0 -1
  183. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  184. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
  185. package/lib/components/appointmentBooking/deposit/index.js +2 -4
  186. package/lib/components/appointmentBooking/index.js +0 -11
  187. package/lib/components/appointmentBooking/index.less +1 -1
  188. package/lib/components/booking/addons/model.d.ts +1 -10
  189. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  190. package/lib/components/booking/components/voucher/index.js +2 -2
  191. package/lib/components/booking/forms/model.d.ts +1 -10
  192. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  193. package/lib/components/booking/info/model.d.ts +1 -10
  194. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  195. package/lib/components/booking/info/service/serviceManager/index.js +3 -3
  196. package/lib/components/booking/info2/index.js +21 -11
  197. package/lib/components/booking/info2/utils.d.ts +4 -0
  198. package/lib/components/booking/model.d.ts +1 -9
  199. package/lib/components/booking/notes/model.d.ts +1 -10
  200. package/lib/components/booking/payments/model.d.ts +1 -10
  201. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  202. package/lib/components/eftpos/form/index.d.ts +0 -1
  203. package/lib/components/eftpos/group/index.d.ts +0 -1
  204. package/lib/components/eftpos/hooks.d.ts +0 -1
  205. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  206. package/lib/components/eftpos/icon/device.d.ts +0 -1
  207. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  208. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  209. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  210. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  211. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  212. package/lib/components/eftposPay/const.d.ts +1 -4
  213. package/lib/components/eftposPay/const.js +0 -2
  214. package/lib/components/eftposPay/hooks.d.ts +1 -1
  215. package/lib/components/eftposPay/hooks.js +4 -11
  216. package/lib/components/eftposPay/index.js +1 -1
  217. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  218. package/lib/components/eftposPay/manufacturer.js +0 -6
  219. package/lib/components/eftposPay/pay.d.ts +1 -1
  220. package/lib/components/eftposPay/pay.js +2 -13
  221. package/lib/components/eftposPay/store/index.d.ts +1 -1
  222. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  223. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -21
  224. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
  225. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  226. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  227. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  228. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  229. package/lib/components/eventBooking/locales.d.ts +0 -24
  230. package/lib/components/eventBooking/locales.js +3 -27
  231. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  232. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  233. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  234. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  235. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  236. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  237. package/lib/components/pay/toC/PaymentMethods/index.js +39 -12
  238. package/lib/components/pay/toC/index.js +29 -9
  239. package/lib/components/pay/toC/model.d.ts +1 -9
  240. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  241. package/lib/components/schedules/model.d.ts +1 -9
  242. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  243. package/lib/components/schedules/utils.d.ts +1 -1
  244. package/lib/components/schedules/utils.js +1 -1
  245. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  246. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  247. package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
  248. package/lib/components/wallet/Detail/model.d.ts +1 -13
  249. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  250. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  251. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  252. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  253. package/lib/components/wallet/model.d.ts +1 -9
  254. package/lib/utils/index.d.ts +1 -1
  255. package/package.json +4 -4
  256. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  257. package/es/components/eftposPay/linkly/const.js +0 -82
  258. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  259. package/es/components/eftposPay/linkly/hooks/index.js +0 -2
  260. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  261. package/es/components/eftposPay/linkly/hooks/normal.js +0 -321
  262. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  263. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
  264. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  265. package/es/components/eftposPay/linkly/index.js +0 -197
  266. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  267. package/es/components/eftposPay/linkly/service.js +0 -81
  268. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  269. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
  270. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  271. package/lib/components/eftposPay/linkly/const.js +0 -102
  272. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  273. package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
  274. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  275. package/lib/components/eftposPay/linkly/hooks/normal.js +0 -242
  276. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  277. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
  278. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  279. package/lib/components/eftposPay/linkly/index.js +0 -208
  280. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  281. package/lib/components/eftposPay/linkly/service.js +0 -55
  282. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  283. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useMemo, useState } from 'react';
17
17
  import { locales } from '@pisell/utils';
18
18
  import { Button, PisellToast } from '@pisell/materials';
19
- import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer, useSummary } from "../../../../../Sales";
19
+ import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer } from "../../../../../Sales";
20
20
  import { formatValues, getFormParams } from "../../../../../Sales/Checkout/utils";
21
21
  import OrderProductModal from "../../OrderProductModal/index";
22
22
  import EmptyHolderModal from "../../EmptyHolderModal";
@@ -24,7 +24,6 @@ import { getProductPrice } from "../../../../../Sales/Event/serve";
24
24
  import { useRequest } from 'ahooks';
25
25
  import useEngineContext from "../../../../../../hooks/useEngineContext";
26
26
  import "./index.less";
27
- import { Toast } from "../../../../../appointmentBooking/utils";
28
27
  var ContinueButton = function ContinueButton() {
29
28
  var _context$appHelper, _cartData$cartItems;
30
29
  var _useSales = useSales(),
@@ -44,14 +43,10 @@ var ContinueButton = function ContinueButton() {
44
43
  onCheckout = _useCheckout.onCheckout,
45
44
  createBooking = _useCheckout.createBooking,
46
45
  onCheckBeforeBooking = _useCheckout.onCheckBeforeBooking,
47
- checkBeforeBooking = _useCheckout.checkBeforeBooking,
48
- freePay = _useCheckout.freePay;
46
+ checkBeforeBooking = _useCheckout.checkBeforeBooking;
49
47
  var _useCustomer = useCustomer(),
50
48
  openLoginModal = _useCustomer.openLoginModal,
51
49
  isLogin = _useCustomer.isLogin;
52
- var _useSummary = useSummary(),
53
- deposit = _useSummary.deposit,
54
- isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy;
55
50
 
56
51
  // 下单之前是否检测失败
57
52
  var _useState = useState(false),
@@ -95,6 +90,7 @@ var ContinueButton = function ContinueButton() {
95
90
  data: params,
96
91
  callback: function () {
97
92
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
93
+ var _context$appHelper2;
98
94
  var value, result, _result$err;
99
95
  return _regeneratorRuntime().wrap(function _callee$(_context) {
100
96
  while (1) switch (_context.prev = _context.next) {
@@ -105,8 +101,13 @@ var ContinueButton = function ContinueButton() {
105
101
  }
106
102
  return _context.abrupt("return");
107
103
  case 2:
108
- value = formatValues(data, false, {
109
- relation_forms: e
104
+ value = formatValues({
105
+ state: data,
106
+ platform: context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.constants) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.platform,
107
+ excludeDisabled: false,
108
+ extra: {
109
+ relation_forms: e
110
+ }
110
111
  }); // 如果检测成功,则直接下单
111
112
  _context.next = 5;
112
113
  return onCheckout(value);
@@ -389,48 +390,44 @@ var ContinueButton = function ContinueButton() {
389
390
  */
390
391
  var handleContinue = /*#__PURE__*/function () {
391
392
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
392
- var _deposit$protocols, value, checkRes, emptyHolders;
393
+ var _context$appHelper3, value, checkRes, emptyHolders;
393
394
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
394
395
  while (1) switch (_context6.prev = _context6.next) {
395
396
  case 0:
396
397
  if (!isLastStep) {
397
- _context6.next = 17;
398
- break;
399
- }
400
- value = formatValues(data); // 如果未同意定金政策,则提示
401
- if (!(deposit !== null && deposit !== void 0 && deposit.hasDeposit && (deposit === null || deposit === void 0 || (_deposit$protocols = deposit.protocols) === null || _deposit$protocols === void 0 ? void 0 : _deposit$protocols.length) > 0 && !isAgreeDepositPolicy)) {
402
- _context6.next = 5;
398
+ _context6.next = 14;
403
399
  break;
404
400
  }
405
- Toast(locales.getText('pisell2.appointment.deposit.agree.policy'));
406
- return _context6.abrupt("return");
407
- case 5:
408
- _context6.next = 7;
401
+ value = formatValues({
402
+ state: data,
403
+ platform: context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.constants) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.platform
404
+ }); // 检测商品是否可以下单
405
+ _context6.next = 4;
409
406
  return onCheckBeforeBooking(value);
410
- case 7:
407
+ case 4:
411
408
  checkRes = _context6.sent;
412
409
  if (!((checkRes === null || checkRes === void 0 ? void 0 : checkRes.result) === false)) {
413
- _context6.next = 12;
410
+ _context6.next = 9;
414
411
  break;
415
412
  }
416
413
  setCheckedNumber(checkRes === null || checkRes === void 0 ? void 0 : checkRes.num);
417
414
  setOpenCheckout(true);
418
415
  return _context6.abrupt("return");
419
- case 12:
416
+ case 9:
420
417
  // 验证holder是否为空
421
418
  emptyHolders = getWithoutCartItemsHolderNames();
422
419
  if (!((emptyHolders === null || emptyHolders === void 0 ? void 0 : emptyHolders.length) > 0)) {
423
- _context6.next = 15;
420
+ _context6.next = 12;
424
421
  break;
425
422
  }
426
423
  return _context6.abrupt("return", setOpenEmptyHolder(true));
427
- case 15:
424
+ case 12:
428
425
  // 关闭购物车弹窗
429
426
  onCloseCart();
430
427
  return _context6.abrupt("return", handleCheckout());
431
- case 17:
428
+ case 14:
432
429
  if (isLogin()) {
433
- _context6.next = 20;
430
+ _context6.next = 17;
434
431
  break;
435
432
  }
436
433
  onCloseCart();
@@ -460,9 +457,9 @@ var ContinueButton = function ContinueButton() {
460
457
  return callback;
461
458
  }()
462
459
  }));
463
- case 20:
460
+ case 17:
464
461
  handleHolder();
465
- case 21:
462
+ case 18:
466
463
  case "end":
467
464
  return _context6.stop();
468
465
  }
@@ -499,8 +496,8 @@ var ContinueButton = function ContinueButton() {
499
496
  */
500
497
  var confirmLoading = useMemo(function () {
501
498
  if (!isLastStep) return false;
502
- return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading) || (freePay === null || freePay === void 0 ? void 0 : freePay.loading);
503
- }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading, freePay === null || freePay === void 0 ? void 0 : freePay.loading]);
499
+ return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
500
+ }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
504
501
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
505
502
  disabled: !(cartData !== null && cartData !== void 0 && (_cartData$cartItems = cartData.cartItems) !== null && _cartData$cartItems !== void 0 && _cartData$cartItems.length),
506
503
  size: "large",
@@ -5,25 +5,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
5
5
  import React from 'react';
6
6
  import { locales } from '@pisell/utils';
7
7
  import { PisellText } from '@pisell/materials';
8
- import { useCart, useSummary } from "../../../../../Sales";
8
+ import { useSummary } from "../../../../../Sales";
9
9
  import useEngineContext from "../../../../../../hooks/useEngineContext";
10
10
  import "./index.less";
11
11
  import classNames from 'classnames';
12
12
  var Total = function Total(_ref) {
13
- var _context$appHelper, _context$appHelper$ge, _cartData$cartItems, _cartData$cartItems2, _context$appHelper2, _context$appHelper2$g;
13
+ var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$g;
14
14
  var className = _ref.className,
15
15
  isFooter = _ref.isFooter;
16
- var _useCart = useCart(),
17
- cartData = _useCart.cartData;
18
16
  var _useSummary = useSummary(),
19
17
  taxTitle = _useSummary.taxTitle,
20
18
  totalTaxFee = _useSummary.totalTaxFee,
21
19
  isPriceIncludeTax = _useSummary.isPriceIncludeTax,
22
- total = _useSummary.total,
23
- deposit = _useSummary.deposit;
20
+ total = _useSummary.total;
24
21
  var context = useEngineContext();
25
- console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), deposit, 'wh97978');
26
- var showDeposit = (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && (deposit === null || deposit === void 0 ? void 0 : deposit.hasDeposit);
22
+ console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), 'wh97978');
27
23
  return /*#__PURE__*/React.createElement("div", {
28
24
  className: "event-total-wrap ".concat(className)
29
25
  }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
@@ -35,8 +31,8 @@ var Total = function Total(_ref) {
35
31
  className: classNames('event-total', _defineProperty({}, ['total-gst-wrap'], !isPriceIncludeTax && Number(totalTaxFee) > 0))
36
32
  }, /*#__PURE__*/React.createElement("div", {
37
33
  className: "left"
38
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, isFooter && showDeposit ? locales.getText('pisell2.appointment.deposit') : locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
39
- value: (cartData === null || cartData === void 0 || (_cartData$cartItems2 = cartData.cartItems) === null || _cartData$cartItems2 === void 0 ? void 0 : _cartData$cartItems2.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? deposit === null || deposit === void 0 ? void 0 : deposit.total : total,
34
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
35
+ value: total,
40
36
  showCurrencySymbol: true,
41
37
  className: "event-amount"
42
38
  }) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("span", {
@@ -5,10 +5,8 @@ import { useCart, useHolder, useSummary, useStep } from "../../../../../Sales";
5
5
  import SelectHolderModal from "../../SelectHolderModal";
6
6
  import ContinueButton from "../ContinueButton";
7
7
  import Total from "./Total";
8
- import Deposit from "../Deposit";
9
8
  import "./index.less";
10
9
  var CartItem = function CartItem() {
11
- var _cartData$cartItems;
12
10
  var _useHolder = useHolder(),
13
11
  open = _useHolder.open,
14
12
  holderData = _useHolder.holderData,
@@ -19,7 +17,7 @@ var CartItem = function CartItem() {
19
17
  cartData = _useCart.cartData,
20
18
  addNoteToCartItem = _useCart.addNoteToCartItem;
21
19
  var _useSummary = useSummary(),
22
- deposit = _useSummary.deposit;
20
+ subtotal = _useSummary.subtotal;
23
21
  var _useStep = useStep(),
24
22
  isLastStep = _useStep.isLastStep;
25
23
  var handleClickCard = function handleClickCard(e, type, key) {
@@ -58,7 +56,7 @@ var CartItem = function CartItem() {
58
56
  }
59
57
  })), /*#__PURE__*/React.createElement("div", {
60
58
  className: "event-footer"
61
- }, /*#__PURE__*/React.createElement(Total, null), (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? /*#__PURE__*/React.createElement(Deposit, null) : null, /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
59
+ }, /*#__PURE__*/React.createElement(Total, null), /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
62
60
  open: open
63
61
  }));
64
62
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const DayItem: (props: any) => JSX.Element;
4
3
  export default DayItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { CalendarItemProps } from '../../../../../type';
4
3
  declare const Item: (props: CalendarItemProps) => JSX.Element;
@@ -304,9 +304,7 @@ var BookingDetailModal = function BookingDetailModal(props) {
304
304
  utils === null || utils === void 0 || utils.action({
305
305
  type: 'pisell1.productDetail',
306
306
  data: {
307
- detail: _objectSpread(_objectSpread({}, (bookingOption === null || bookingOption === void 0 ? void 0 : bookingOption._originData) || {}), {}, {
308
- open_deposit: 1
309
- }),
307
+ detail: _objectSpread({}, (bookingOption === null || bookingOption === void 0 ? void 0 : bookingOption._originData) || {}),
310
308
  isOS: false
311
309
  },
312
310
  callback: function callback(data) {
@@ -71,14 +71,6 @@ declare const _default: {
71
71
  'pisell2.event.capacity.limit.reached.tip': string;
72
72
  'pisell2.event.schedule.item.expand': string;
73
73
  'pisell2.event.schedule.item.collapse': string;
74
- 'pisell2.appointment.deposit': string;
75
- 'pisell2.appointment.deposit.agreed': string;
76
- 'pisell2.appointment.deposit.agree.policy': string;
77
- 'pisell2.appointment.deposit.and': string;
78
- 'pisell2.appointment.deposit.amount.tip1': string;
79
- 'pisell2.appointment.deposit.amount.tip2': string;
80
- 'pisell2.appointment.deposit.close': string;
81
- 'pisell2.appointment.booking.empty.data': string;
82
74
  };
83
75
  'zh-CN': {
84
76
  'pisell2.event.calendar.limit.unavailable': string;
@@ -152,14 +144,6 @@ declare const _default: {
152
144
  'pisell2.event.capacity.limit.reached.tip': string;
153
145
  'pisell2.event.schedule.item.expand': string;
154
146
  'pisell2.event.schedule.item.collapse': string;
155
- 'pisell2.appointment.deposit': string;
156
- 'pisell2.appointment.deposit.agreed': string;
157
- 'pisell2.appointment.deposit.agree.policy': string;
158
- 'pisell2.appointment.deposit.and': string;
159
- 'pisell2.appointment.deposit.amount.tip1': string;
160
- 'pisell2.appointment.deposit.amount.tip2': string;
161
- 'pisell2.appointment.deposit.close': string;
162
- 'pisell2.appointment.booking.empty.data': string;
163
147
  };
164
148
  'zh-HK': {
165
149
  'pisell2.event.calendar.limit.unavailable': string;
@@ -233,14 +217,6 @@ declare const _default: {
233
217
  'pisell2.event.capacity.limit.reached.tip': string;
234
218
  'pisell2.event.schedule.item.expand': string;
235
219
  'pisell2.event.schedule.item.collapse': string;
236
- 'pisell2.appointment.deposit': string;
237
- 'pisell2.appointment.deposit.agreed': string;
238
- 'pisell2.appointment.deposit.agree.policy': string;
239
- 'pisell2.appointment.deposit.and': string;
240
- 'pisell2.appointment.deposit.amount.tip1': string;
241
- 'pisell2.appointment.deposit.amount.tip2': string;
242
- 'pisell2.appointment.deposit.close': string;
243
- 'pisell2.appointment.booking.empty.data': string;
244
220
  };
245
221
  };
246
222
  export default _default;
@@ -82,15 +82,7 @@ export default {
82
82
  'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
83
83
  'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
84
84
  'pisell2.event.schedule.item.expand': 'See more',
85
- 'pisell2.event.schedule.item.collapse': 'See less',
86
- 'pisell2.appointment.deposit': 'Deposit',
87
- 'pisell2.appointment.deposit.agreed': 'I have read and agree to the ',
88
- 'pisell2.appointment.deposit.agree.policy': 'You need to agree the policy to proceed',
89
- 'pisell2.appointment.deposit.and': ' & ',
90
- 'pisell2.appointment.deposit.amount.tip1': ' needs to be paid as deposit.',
91
- 'pisell2.appointment.deposit.amount.tip2': ' ',
92
- 'pisell2.appointment.deposit.close': 'Close',
93
- 'pisell2.appointment.booking.empty.data': 'No data'
85
+ 'pisell2.event.schedule.item.collapse': 'See less'
94
86
  },
95
87
  'zh-CN': {
96
88
  'pisell2.event.calendar.limit.unavailable': '不可预约',
@@ -175,15 +167,7 @@ export default {
175
167
  'pisell2.event.capacity.limit.reached.title': '活动名额已满',
176
168
  'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
177
169
  'pisell2.event.schedule.item.expand': '查看更多',
178
- 'pisell2.event.schedule.item.collapse': '收起',
179
- 'pisell2.appointment.deposit': '定金',
180
- 'pisell2.appointment.deposit.agreed': '我已阅读并同意 ',
181
- 'pisell2.appointment.deposit.agree.policy': '您需要同意协议才能继续',
182
- 'pisell2.appointment.deposit.and': ' 和 ',
183
- 'pisell2.appointment.deposit.amount.tip1': '请支付 ',
184
- 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
185
- 'pisell2.appointment.deposit.close': '关闭',
186
- 'pisell2.appointment.booking.empty.data': '暂无数据'
170
+ 'pisell2.event.schedule.item.collapse': '收起'
187
171
  },
188
172
  'zh-HK': {
189
173
  'pisell2.event.calendar.limit.unavailable': '不可預約',
@@ -268,14 +252,6 @@ export default {
268
252
  'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
269
253
  'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
270
254
  'pisell2.event.schedule.item.expand': '查看更多',
271
- 'pisell2.event.schedule.item.collapse': '收起',
272
- 'pisell2.appointment.deposit': '定金',
273
- 'pisell2.appointment.deposit.agreed': '我已閱讀並同意 ',
274
- 'pisell2.appointment.deposit.agree.policy': '您需要同意協議才能繼續',
275
- 'pisell2.appointment.deposit.and': ' 和 ',
276
- 'pisell2.appointment.deposit.amount.tip1': '請支付 ',
277
- 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
278
- 'pisell2.appointment.deposit.close': '关闭',
279
- 'pisell2.appointment.booking.empty.data': '暫無數據'
255
+ 'pisell2.event.schedule.item.collapse': '收起'
280
256
  }
281
257
  };
@@ -1,9 +1,9 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
8
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const StripePayment: () => JSX.Element;
3
2
  export default StripePayment;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PageLoading: () => JSX.Element;
3
2
  export default PageLoading;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PaymentRequestForm: () => JSX.Element | null;
3
2
  export default PaymentRequestForm;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.module.less';
3
2
  declare const StripePayment: () => JSX.Element;
4
3
  export default StripePayment;
@@ -27,7 +27,7 @@ import GlobePayQrcode from "./GlobePayQrcode";
27
27
  import { walletPassPay } from "./WalletPass/serve";
28
28
  import { formatWalletPassParams } from "../utils";
29
29
  import useEngineContext from "../../../../hooks/useEngineContext";
30
- import { isJson } from "@pisell/utils";
30
+ import { isJson, sendWarningLog } from "@pisell/utils";
31
31
  var isOfflinePayment = function isOfflinePayment(type) {
32
32
  if (isCustomPayment(type)) {
33
33
  return true;
@@ -35,7 +35,7 @@ var isOfflinePayment = function isOfflinePayment(type) {
35
35
  return ['pisell.bank_deposit', 'pisell.offline_payment', 'pisell.other.cashmanual', 'pisell.custom_bank_transfer'].includes(type);
36
36
  };
37
37
  var PaymentMethods = function PaymentMethods(props, ref) {
38
- var _context$appHelper, _interaction$utils, _interaction$utils$is;
38
+ var _context$appHelper;
39
39
  var MWCreditCardRef = useRef(null);
40
40
  var SuperPayAliPayH5Ref = useRef(null);
41
41
  var StripePayRef = useRef(null);
@@ -62,15 +62,33 @@ var PaymentMethods = function PaymentMethods(props, ref) {
62
62
  case 0:
63
63
  type = _ref.type, payGroup = _ref.payGroup;
64
64
  waitAmount = (payGroup === null || payGroup === void 0 ? void 0 : payGroup.wait_amount) || 0;
65
- cards = payGroup === null || payGroup === void 0 || (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 || (_payGroup$walletPass = _payGroup$walletPass.cards) === null || _payGroup$walletPass === void 0 ? void 0 : _payGroup$walletPass.length; // 仅选择钱包 并且当前选择的支付方式是 线下支付|自定义支付|银行转账, 前置支付钱包
65
+ cards = payGroup === null || payGroup === void 0 || (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 || (_payGroup$walletPass = _payGroup$walletPass.cards) === null || _payGroup$walletPass === void 0 ? void 0 : _payGroup$walletPass.length;
66
+ sendWarningLog({
67
+ title: '支付初始化',
68
+ content: [{
69
+ key: 'type',
70
+ value: type
71
+ }, {
72
+ key: 'payGroup',
73
+ value: JSON.stringify(payGroup)
74
+ }, {
75
+ key: 'waitAmount',
76
+ value: waitAmount
77
+ }, {
78
+ key: 'cards',
79
+ value: cards
80
+ }]
81
+ });
82
+
83
+ // 仅选择钱包 并且当前选择的支付方式是 线下支付|自定义支付|银行转账, 前置支付钱包
66
84
  if (!(cards && (waitAmount <= 0 || isOfflinePayment(type)))) {
67
- _context.next = 13;
85
+ _context.next = 15;
68
86
  break;
69
87
  }
70
- _context.prev = 4;
71
- _context.next = 7;
88
+ _context.prev = 5;
89
+ _context.next = 8;
72
90
  return walletPassPay(formatWalletPassParams(payGroup));
73
- case 7:
91
+ case 8:
74
92
  // 支付成功后 清空卡片
75
93
  syncPayGroupToStorage(_objectSpread(_objectSpread({}, payGroup), {}, {
76
94
  walletPass: _objectSpread(_objectSpread({}, payGroup.walletPass), {}, {
@@ -78,11 +96,26 @@ var PaymentMethods = function PaymentMethods(props, ref) {
78
96
  paid: true
79
97
  })
80
98
  }));
81
- _context.next = 13;
99
+ _context.next = 15;
82
100
  break;
83
- case 10:
84
- _context.prev = 10;
85
- _context.t0 = _context["catch"](4);
101
+ case 11:
102
+ _context.prev = 11;
103
+ _context.t0 = _context["catch"](5);
104
+ sendWarningLog({
105
+ title: '钱包支付失败 catch',
106
+ content: [{
107
+ key: '错误信息',
108
+ value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || '未知错误'
109
+ }, {
110
+ key: '错误堆栈',
111
+ value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.stack) || '无堆栈信息'
112
+ }, {
113
+ key: '错误类型',
114
+ value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.name) || '未知错误类型'
115
+ }]
116
+ });
117
+
118
+ // 钱包支付失败时 跳转失败页面 不继续后续流程
86
119
  return _context.abrupt("return", props.payCallback({
87
120
  key: 'fail',
88
121
  data: {
@@ -91,38 +124,53 @@ var PaymentMethods = function PaymentMethods(props, ref) {
91
124
  fn: 'init'
92
125
  }
93
126
  }));
94
- case 13:
127
+ case 15:
95
128
  if (!(waitAmount <= 0)) {
96
- _context.next = 17;
129
+ _context.next = 18;
97
130
  break;
98
131
  }
99
- // 清空交易组
100
- removePayGroupFromStorage(payGroup.order_id);
101
- props.payCallback({
102
- key: 'success'
103
- });
132
+ try {
133
+ // 清空交易组
134
+ removePayGroupFromStorage(payGroup.order_id);
135
+ props.payCallback({
136
+ key: 'success'
137
+ });
138
+ } catch (err) {
139
+ sendWarningLog({
140
+ title: '跳转成功页面 catch',
141
+ content: [{
142
+ key: '错误信息',
143
+ value: (err === null || err === void 0 ? void 0 : err.message) || '未知错误'
144
+ }, {
145
+ key: '错误堆栈',
146
+ value: (err === null || err === void 0 ? void 0 : err.stack) || '无堆栈信息'
147
+ }, {
148
+ key: '错误类型',
149
+ value: (err === null || err === void 0 ? void 0 : err.name) || '未知错误类型'
150
+ }]
151
+ });
152
+ }
104
153
  return _context.abrupt("return");
105
- case 17:
106
- _context.next = 19;
154
+ case 18:
155
+ _context.next = 20;
107
156
  return onPayByType({
108
157
  type: type,
109
158
  payGroup: payGroup
110
159
  });
111
- case 19:
160
+ case 20:
112
161
  case "end":
113
162
  return _context.stop();
114
163
  }
115
- }, _callee, null, [[4, 10]]);
164
+ }, _callee, null, [[5, 11]]);
116
165
  }));
117
166
  return function init(_x) {
118
167
  return _ref2.apply(this, arguments);
119
168
  };
120
169
  }();
121
- console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils), interaction, context);
122
170
  useEffect(function () {
123
- var _interaction$utils2, _interaction$utils2$i, _interaction$utils3, _interaction$utils3$i;
124
- console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$i = _interaction$utils2.isAppEnv) === null || _interaction$utils2$i === void 0 ? void 0 : _interaction$utils2$i.call(_interaction$utils2));
125
- if (interaction !== null && interaction !== void 0 && (_interaction$utils3 = interaction.utils) !== null && _interaction$utils3 !== void 0 && (_interaction$utils3$i = _interaction$utils3.isAppEnv) !== null && _interaction$utils3$i !== void 0 && _interaction$utils3$i.call(_interaction$utils3)) {
171
+ var _interaction$utils, _interaction$utils$is, _interaction$utils2, _interaction$utils2$i;
172
+ console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils));
173
+ if (interaction !== null && interaction !== void 0 && (_interaction$utils2 = interaction.utils) !== null && _interaction$utils2 !== void 0 && (_interaction$utils2$i = _interaction$utils2.isAppEnv) !== null && _interaction$utils2$i !== void 0 && _interaction$utils2$i.call(_interaction$utils2)) {
126
174
  interaction.utils.mountFunction('global', 'paymentResult', function (strResult) {
127
175
  console.log('paymentResult', strResult);
128
176
  if (!isJson(strResult)) return;