@pisell/private-materials 6.1.1 → 6.2.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 (474) 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 +8 -8
  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/Sales/index.js +37 -4
  12. package/es/businessModel/SalesModel/index.d.ts +0 -1
  13. package/es/components/Sales/Cart/index.js +13 -4
  14. package/es/components/Sales/Cart/utils.d.ts +40 -0
  15. package/es/components/Sales/Cart/utils.js +171 -0
  16. package/es/components/Sales/Checkout/index.d.ts +4 -0
  17. package/es/components/Sales/Checkout/index.js +52 -8
  18. package/es/components/Sales/Checkout/serve.d.ts +13 -0
  19. package/es/components/Sales/Checkout/serve.js +16 -2
  20. package/es/components/Sales/Checkout/utils.d.ts +6 -1
  21. package/es/components/Sales/Checkout/utils.js +15 -4
  22. package/es/components/Sales/Customer/index.d.ts +1 -0
  23. package/es/components/Sales/Customer/index.js +1 -0
  24. package/es/components/Sales/Resource/index.js +2 -2
  25. package/es/components/Sales/Resource/serve.d.ts +7 -0
  26. package/es/components/Sales/Resource/serve.js +10 -0
  27. package/es/components/Sales/Summary/index.d.ts +10 -0
  28. package/es/components/Sales/Summary/index.js +17 -2
  29. package/es/components/Sales/Summary/serve.d.ts +1 -0
  30. package/es/components/Sales/Summary/serve.js +6 -0
  31. package/es/components/Sales/Summary/utils.d.ts +15 -0
  32. package/es/components/Sales/Summary/utils.js +43 -1
  33. package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  34. package/es/components/appointmentBooking/components/Content/index.js +15 -1
  35. package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  36. package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
  37. package/es/components/appointmentBooking/components/Form/index.js +1 -1
  38. package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  39. package/es/components/appointmentBooking/components/Form/utils.js +17 -15
  40. package/es/components/appointmentBooking/components/Header/index.js +2 -1
  41. package/es/components/appointmentBooking/components/Resource/index.js +1 -0
  42. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
  43. package/es/components/appointmentBooking/deposit/index.js +4 -2
  44. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  45. package/es/components/booking/components/footer/index.js +9 -33
  46. package/es/components/booking/components/footer/utils.d.ts +1 -0
  47. package/es/components/booking/components/footer/utils.js +47 -18
  48. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  49. package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  50. package/es/components/{pay/toB/store/provider.js → booking/components/reloadResourceModal/index.js} +48 -52
  51. package/es/components/booking/components/reloadResourceModal/index.less +6 -0
  52. package/es/components/booking/components/voucher/index.js +2 -2
  53. package/es/components/booking/editBookingModal/index.d.ts +5 -0
  54. package/es/components/booking/editBookingModal/index.js +386 -0
  55. package/es/components/booking/editBookingModal/index.less +8 -0
  56. package/es/components/booking/editBookingModal/locales.d.ts +21 -0
  57. package/es/components/booking/editBookingModal/locales.js +20 -0
  58. package/es/components/booking/editBookingModal/mock.d.ts +807 -0
  59. package/es/components/booking/editBookingModal/mock.js +2993 -0
  60. package/es/components/booking/editBookingModal/serve.d.ts +51 -0
  61. package/es/components/booking/editBookingModal/serve.js +288 -0
  62. package/es/components/booking/editBookingModal/type.d.ts +12 -0
  63. package/es/components/booking/editBookingModal/type.js +1 -0
  64. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  65. package/es/components/booking/editBookingModal/utils.js +157 -0
  66. package/es/components/booking/forms/table/index.d.ts +0 -1
  67. package/es/components/booking/hooks/useIsBooking4Shop.js +2 -2
  68. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  69. package/es/components/booking/info/addServiceVariant/index.js +2 -2
  70. package/es/components/booking/info/client/index.js +2 -2
  71. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  72. package/es/components/booking/info/hooks/useInfoHolder.js +8 -1
  73. package/es/components/booking/info/index.d.ts +1 -0
  74. package/es/components/booking/info/index.js +4 -5
  75. package/es/components/booking/info/model.js +5 -0
  76. package/es/components/booking/info/service/Lists.d.ts +1 -0
  77. package/es/components/booking/info/service/addService/index.js +2 -2
  78. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  79. package/es/components/booking/info/service/editService/index.js +1 -1
  80. package/es/components/booking/info/service/like/index.d.ts +0 -1
  81. package/es/components/booking/info/service/serviceManager/index.js +4 -4
  82. package/es/components/booking/info/service2/utils.js +6 -4
  83. package/es/components/booking/info/utils.js +1 -1
  84. package/es/components/booking/info2/index.js +45 -13
  85. package/es/components/booking/info2/service/addService/index.js +22 -9
  86. package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
  87. package/es/components/booking/info2/service/addService/utils.js +48 -14
  88. package/es/components/booking/info2/service/addTimeModal/index.js +32 -9
  89. package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
  90. package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
  91. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  92. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
  93. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  94. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
  95. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  96. package/es/components/booking/info2/service/editService/index.js +12 -15
  97. package/es/components/booking/info2/utils.js +13 -16
  98. package/es/components/booking/info2/utilsByBooking.js +10 -1
  99. package/es/components/booking/locales.d.ts +12 -0
  100. package/es/components/booking/locales.js +12 -0
  101. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  102. package/es/components/booking/model.d.ts +1 -0
  103. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  104. package/es/components/eftpos/form/index.d.ts +0 -1
  105. package/es/components/eftpos/group/index.d.ts +0 -1
  106. package/es/components/eftpos/hooks.d.ts +0 -1
  107. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  108. package/es/components/eftpos/icon/device.d.ts +0 -1
  109. package/es/components/eftpos/receipt/index.d.ts +0 -1
  110. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  111. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  112. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  113. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  114. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  115. package/es/components/eftposPay/const.d.ts +4 -1
  116. package/es/components/eftposPay/const.js +3 -1
  117. package/es/components/eftposPay/hooks.d.ts +1 -1
  118. package/es/components/eftposPay/hooks.js +3 -1
  119. package/es/components/eftposPay/index.js +1 -1
  120. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  121. package/es/components/eftposPay/linkly/const.js +82 -0
  122. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  123. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  124. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  125. package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
  126. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  127. package/es/components/{pay/toB/store/hooks.js → eftposPay/linkly/hooks/useTimeQuery.js} +252 -59
  128. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  129. package/es/components/eftposPay/linkly/index.js +197 -0
  130. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  131. package/es/components/eftposPay/linkly/service.js +81 -0
  132. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  133. package/es/components/eftposPay/manufacturer.js +4 -0
  134. package/es/components/eftposPay/pay.d.ts +1 -1
  135. package/es/components/eftposPay/pay.js +6 -2
  136. package/es/components/eftposPay/payo/config.js +30 -3
  137. package/es/components/eftposPay/store/index.d.ts +2 -2
  138. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  139. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +40 -19
  140. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  141. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  142. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  143. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  144. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  145. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  146. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  147. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  148. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  149. package/es/components/eventBooking/components/bookingDetailModal/index.js +22 -4
  150. package/es/components/eventBooking/index.js +21 -7
  151. package/es/components/eventBooking/locales.d.ts +24 -0
  152. package/es/components/eventBooking/locales.js +30 -6
  153. package/es/components/index.d.ts +3 -1
  154. package/es/components/index.js +3 -1
  155. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  156. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  157. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  158. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  159. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  160. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  161. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  162. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  163. package/es/components/productSelect/components/pisellPriceText/index.js +2 -3
  164. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  165. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  166. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  167. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  168. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  169. package/es/components/schedules/products/index.d.ts +0 -1
  170. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  171. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  172. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  173. package/es/components/stepController/components/Content/index.d.ts +7 -0
  174. package/es/components/stepController/components/Content/index.js +9 -0
  175. package/es/components/stepController/components/Content/index.less +8 -0
  176. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  177. package/es/components/stepController/components/Footer/index.js +15 -0
  178. package/es/components/stepController/components/Footer/index.less +39 -0
  179. package/es/components/stepController/components/Header/index.d.ts +20 -0
  180. package/es/components/stepController/components/Header/index.js +97 -0
  181. package/es/components/stepController/components/Header/index.less +21 -0
  182. package/es/components/stepController/index.d.ts +5 -0
  183. package/es/components/stepController/index.js +64 -0
  184. package/es/components/stepController/index.less +11 -0
  185. package/es/components/stepController/locales.d.ts +27 -0
  186. package/es/components/stepController/locales.js +32 -0
  187. package/es/components/stepController/types.d.ts +23 -0
  188. package/es/components/stepController/types.js +1 -0
  189. package/es/components/ticketBooking/components/addServiceVariant/addService.js +19 -9
  190. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  191. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  192. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  193. package/es/components/ticketBooking/components/ticketBooking/index.js +141 -142
  194. package/es/components/ticketBooking/index.js +4 -3
  195. package/es/components/ticketBooking/serve.d.ts +0 -1
  196. package/es/components/ticketBooking/serve.js +0 -26
  197. package/es/components/ticketBooking/utils/index.js +2 -1
  198. package/es/hooks/useWindowSize.d.ts +5 -0
  199. package/es/hooks/useWindowSize.js +26 -0
  200. package/es/index.d.ts +2 -1
  201. package/es/index.js +3 -2
  202. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  203. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  204. package/lib/components/Sales/Cart/index.js +9 -4
  205. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  206. package/lib/components/Sales/Cart/utils.js +120 -0
  207. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  208. package/lib/components/Sales/Checkout/index.js +39 -7
  209. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  210. package/lib/components/Sales/Checkout/serve.js +7 -2
  211. package/lib/components/Sales/Checkout/utils.d.ts +6 -1
  212. package/lib/components/Sales/Checkout/utils.js +7 -3
  213. package/lib/components/Sales/Customer/index.d.ts +1 -0
  214. package/lib/components/Sales/Customer/index.js +1 -0
  215. package/lib/components/Sales/Resource/index.js +1 -1
  216. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  217. package/lib/components/Sales/Resource/serve.js +9 -2
  218. package/lib/components/Sales/Summary/index.d.ts +10 -0
  219. package/lib/components/Sales/Summary/index.js +7 -1
  220. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  221. package/lib/components/Sales/Summary/serve.js +32 -0
  222. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  223. package/lib/components/Sales/Summary/utils.js +30 -1
  224. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  225. package/lib/components/appointmentBooking/components/Content/index.js +6 -1
  226. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  227. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  228. package/lib/components/appointmentBooking/components/Form/index.js +6 -1
  229. package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  230. package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
  231. package/lib/components/appointmentBooking/components/Header/index.js +1 -0
  232. package/lib/components/appointmentBooking/components/Resource/index.js +1 -0
  233. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  234. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  235. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  236. package/lib/components/booking/components/footer/index.js +4 -23
  237. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  238. package/lib/components/booking/components/footer/utils.js +27 -7
  239. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  240. package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  241. package/lib/components/booking/components/reloadResourceModal/index.js +74 -0
  242. package/lib/components/booking/components/reloadResourceModal/index.less +6 -0
  243. package/lib/components/booking/components/voucher/index.js +2 -2
  244. package/lib/components/booking/editBookingModal/index.d.ts +5 -0
  245. package/lib/components/booking/editBookingModal/index.js +363 -0
  246. package/lib/components/booking/editBookingModal/index.less +8 -0
  247. package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
  248. package/lib/components/booking/editBookingModal/locales.js +44 -0
  249. package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
  250. package/lib/components/booking/editBookingModal/mock.js +3314 -0
  251. package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
  252. package/lib/components/booking/editBookingModal/serve.js +178 -0
  253. package/lib/components/booking/editBookingModal/type.d.ts +12 -0
  254. package/lib/components/{pay/toB/store/context.js → booking/editBookingModal/type.js} +3 -18
  255. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  256. package/lib/components/booking/editBookingModal/utils.js +158 -0
  257. package/lib/components/booking/forms/table/index.d.ts +0 -1
  258. package/lib/components/booking/hooks/useIsBooking4Shop.js +2 -2
  259. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  260. package/lib/components/booking/info/addServiceVariant/index.js +3 -3
  261. package/lib/components/booking/info/client/index.js +19 -57
  262. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  263. package/lib/components/booking/info/hooks/useInfoHolder.js +6 -1
  264. package/lib/components/booking/info/index.d.ts +1 -0
  265. package/lib/components/booking/info/index.js +6 -4
  266. package/lib/components/booking/info/model.js +3 -0
  267. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  268. package/lib/components/booking/info/service/addService/index.js +3 -3
  269. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  270. package/lib/components/booking/info/service/editService/index.js +1 -0
  271. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  272. package/lib/components/booking/info/service/serviceManager/index.js +3 -3
  273. package/lib/components/booking/info/service2/utils.js +5 -4
  274. package/lib/components/booking/info/utils.js +2 -1
  275. package/lib/components/booking/info2/index.js +64 -25
  276. package/lib/components/booking/info2/service/addService/index.js +20 -7
  277. package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
  278. package/lib/components/booking/info2/service/addService/utils.js +32 -5
  279. package/lib/components/booking/info2/service/addTimeModal/index.js +26 -10
  280. package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
  281. package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
  282. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  283. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
  284. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  285. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
  286. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  287. package/lib/components/booking/info2/service/editService/index.js +25 -28
  288. package/lib/components/booking/info2/utils.js +0 -15
  289. package/lib/components/booking/info2/utilsByBooking.js +7 -1
  290. package/lib/components/booking/locales.d.ts +12 -0
  291. package/lib/components/booking/locales.js +12 -0
  292. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  293. package/lib/components/booking/model.d.ts +1 -0
  294. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  295. package/lib/components/eftpos/form/index.d.ts +0 -1
  296. package/lib/components/eftpos/group/index.d.ts +0 -1
  297. package/lib/components/eftpos/hooks.d.ts +0 -1
  298. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  299. package/lib/components/eftpos/icon/device.d.ts +0 -1
  300. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  301. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  302. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  303. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  304. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  305. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  306. package/lib/components/eftposPay/const.d.ts +4 -1
  307. package/lib/components/eftposPay/const.js +2 -0
  308. package/lib/components/eftposPay/hooks.d.ts +1 -1
  309. package/lib/components/eftposPay/hooks.js +11 -4
  310. package/lib/components/eftposPay/index.js +1 -1
  311. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  312. package/lib/components/eftposPay/linkly/const.js +102 -0
  313. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  314. package/lib/components/{pay/toB/types → eftposPay/linkly/hooks}/index.js +7 -5
  315. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  316. package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
  317. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  318. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  319. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  320. package/lib/components/eftposPay/linkly/index.js +208 -0
  321. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  322. package/lib/components/eftposPay/linkly/service.js +55 -0
  323. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  324. package/lib/components/eftposPay/manufacturer.js +6 -0
  325. package/lib/components/eftposPay/pay.d.ts +1 -1
  326. package/lib/components/eftposPay/pay.js +13 -2
  327. package/lib/components/eftposPay/payo/config.js +22 -2
  328. package/lib/components/eftposPay/store/index.d.ts +2 -2
  329. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  330. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -8
  331. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  332. package/lib/components/{pay/toB/components → eventBooking/components/Provider/Cart/Deposit}/index.js +26 -22
  333. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  334. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  335. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  336. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  337. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  338. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  339. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  340. package/lib/components/eventBooking/components/bookingDetailModal/index.js +10 -4
  341. package/lib/components/eventBooking/index.js +11 -7
  342. package/lib/components/eventBooking/locales.d.ts +24 -0
  343. package/lib/components/eventBooking/locales.js +30 -6
  344. package/lib/components/index.d.ts +3 -1
  345. package/lib/components/index.js +6 -0
  346. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  347. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  348. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  349. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  350. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  351. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  352. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  353. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  354. package/lib/components/productSelect/components/pisellPriceText/index.js +2 -8
  355. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  356. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  357. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  358. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  359. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  360. package/lib/components/schedules/products/index.d.ts +0 -1
  361. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  362. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  363. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  364. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  365. package/lib/components/{pay/toB/components/Content/Header.js → stepController/components/Content/index.js} +9 -9
  366. package/lib/components/stepController/components/Content/index.less +8 -0
  367. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  368. package/lib/components/{pay/toB/components/CardGroup → stepController/components/Footer}/index.js +17 -11
  369. package/lib/components/stepController/components/Footer/index.less +39 -0
  370. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  371. package/lib/components/stepController/components/Header/index.js +104 -0
  372. package/lib/components/stepController/components/Header/index.less +21 -0
  373. package/lib/components/stepController/index.d.ts +5 -0
  374. package/lib/components/stepController/index.js +89 -0
  375. package/lib/components/stepController/index.less +11 -0
  376. package/lib/components/stepController/locales.d.ts +27 -0
  377. package/lib/components/stepController/locales.js +50 -0
  378. package/lib/components/stepController/types.d.ts +23 -0
  379. package/lib/components/{pay/toB/store/index.js → stepController/types.js} +3 -13
  380. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +22 -11
  381. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  382. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  383. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  384. package/lib/components/ticketBooking/components/ticketBooking/index.js +147 -143
  385. package/lib/components/ticketBooking/index.js +5 -16
  386. package/lib/components/ticketBooking/serve.d.ts +0 -1
  387. package/lib/components/ticketBooking/serve.js +0 -11
  388. package/lib/components/ticketBooking/utils/index.js +2 -1
  389. package/lib/hooks/useWindowSize.d.ts +5 -0
  390. package/lib/hooks/useWindowSize.js +51 -0
  391. package/lib/index.d.ts +2 -1
  392. package/lib/index.js +6 -3
  393. package/lowcode/edit-booking-modal/meta.ts +53 -0
  394. package/lowcode/step-controller/meta.ts +88 -0
  395. package/package.json +3 -3
  396. package/es/components/pay/toB/components/Cache/index.d.ts +0 -10
  397. package/es/components/pay/toB/components/Cache/index.js +0 -94
  398. package/es/components/pay/toB/components/Cache/index.less +0 -41
  399. package/es/components/pay/toB/components/Card/index.d.ts +0 -7
  400. package/es/components/pay/toB/components/Card/index.js +0 -32
  401. package/es/components/pay/toB/components/Card/index.less +0 -26
  402. package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -7
  403. package/es/components/pay/toB/components/CardGroup/index.js +0 -22
  404. package/es/components/pay/toB/components/CardGroup/index.less +0 -18
  405. package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -6
  406. package/es/components/pay/toB/components/ConfirmedPayment/index.js +0 -67
  407. package/es/components/pay/toB/components/ConfirmedPayment/index.less +0 -69
  408. package/es/components/pay/toB/components/Content/Footer.d.ts +0 -7
  409. package/es/components/pay/toB/components/Content/Footer.js +0 -36
  410. package/es/components/pay/toB/components/Content/Header.d.ts +0 -4
  411. package/es/components/pay/toB/components/Content/Header.js +0 -12
  412. package/es/components/pay/toB/components/Content/index.d.ts +0 -4
  413. package/es/components/pay/toB/components/Content/index.js +0 -277
  414. package/es/components/pay/toB/components/Content/index.less +0 -9
  415. package/es/components/pay/toB/components/Content/utils.d.ts +0 -16
  416. package/es/components/pay/toB/components/Content/utils.js +0 -76
  417. package/es/components/pay/toB/components/index.d.ts +0 -5
  418. package/es/components/pay/toB/components/index.js +0 -5
  419. package/es/components/pay/toB/hooks.d.ts +0 -12
  420. package/es/components/pay/toB/hooks.js +0 -30
  421. package/es/components/pay/toB/index.d.ts +0 -3
  422. package/es/components/pay/toB/index.js +0 -24
  423. package/es/components/pay/toB/locales.d.ts +0 -54
  424. package/es/components/pay/toB/locales.js +0 -65
  425. package/es/components/pay/toB/store/context.d.ts +0 -3
  426. package/es/components/pay/toB/store/context.js +0 -2
  427. package/es/components/pay/toB/store/hooks.d.ts +0 -15
  428. package/es/components/pay/toB/store/index.d.ts +0 -3
  429. package/es/components/pay/toB/store/index.js +0 -3
  430. package/es/components/pay/toB/store/provider.d.ts +0 -4
  431. package/es/components/pay/toB/store/utils.d.ts +0 -13
  432. package/es/components/pay/toB/store/utils.js +0 -66
  433. package/es/components/pay/toB/types/index.d.ts +0 -1
  434. package/es/components/pay/toB/types/index.js +0 -1
  435. package/es/components/pay/toB/types/storeTypes.d.ts +0 -141
  436. package/es/components/pay/toB/types/storeTypes.js +0 -24
  437. package/lib/components/pay/toB/components/Cache/index.d.ts +0 -10
  438. package/lib/components/pay/toB/components/Cache/index.js +0 -108
  439. package/lib/components/pay/toB/components/Cache/index.less +0 -41
  440. package/lib/components/pay/toB/components/Card/index.d.ts +0 -7
  441. package/lib/components/pay/toB/components/Card/index.js +0 -66
  442. package/lib/components/pay/toB/components/Card/index.less +0 -26
  443. package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -7
  444. package/lib/components/pay/toB/components/CardGroup/index.less +0 -18
  445. package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -6
  446. package/lib/components/pay/toB/components/ConfirmedPayment/index.js +0 -77
  447. package/lib/components/pay/toB/components/ConfirmedPayment/index.less +0 -69
  448. package/lib/components/pay/toB/components/Content/Footer.d.ts +0 -7
  449. package/lib/components/pay/toB/components/Content/Footer.js +0 -63
  450. package/lib/components/pay/toB/components/Content/Header.d.ts +0 -4
  451. package/lib/components/pay/toB/components/Content/index.d.ts +0 -4
  452. package/lib/components/pay/toB/components/Content/index.js +0 -209
  453. package/lib/components/pay/toB/components/Content/index.less +0 -9
  454. package/lib/components/pay/toB/components/Content/utils.d.ts +0 -16
  455. package/lib/components/pay/toB/components/Content/utils.js +0 -91
  456. package/lib/components/pay/toB/components/index.d.ts +0 -5
  457. package/lib/components/pay/toB/hooks.d.ts +0 -12
  458. package/lib/components/pay/toB/hooks.js +0 -60
  459. package/lib/components/pay/toB/index.d.ts +0 -3
  460. package/lib/components/pay/toB/index.js +0 -54
  461. package/lib/components/pay/toB/locales.d.ts +0 -54
  462. package/lib/components/pay/toB/locales.js +0 -77
  463. package/lib/components/pay/toB/store/context.d.ts +0 -3
  464. package/lib/components/pay/toB/store/hooks.d.ts +0 -15
  465. package/lib/components/pay/toB/store/hooks.js +0 -85
  466. package/lib/components/pay/toB/store/index.d.ts +0 -3
  467. package/lib/components/pay/toB/store/provider.d.ts +0 -4
  468. package/lib/components/pay/toB/store/provider.js +0 -70
  469. package/lib/components/pay/toB/store/utils.d.ts +0 -13
  470. package/lib/components/pay/toB/store/utils.js +0 -72
  471. package/lib/components/pay/toB/types/index.d.ts +0 -1
  472. package/lib/components/pay/toB/types/storeTypes.d.ts +0 -141
  473. package/lib/components/pay/toB/types/storeTypes.js +0 -36
  474. package/lowcode/tob-pay/meta.ts +0 -44
@@ -1,69 +0,0 @@
1
- .tob-pay-confirmed-payment {
2
- margin-bottom: 32px;
3
-
4
- .tob-pay-confirmed-payment-title {
5
- margin-bottom: 20px;
6
- font-size: 18px;
7
- font-weight: 500;
8
- color: #1a1a1a;
9
- }
10
-
11
- .tob-pay-confirmed-payment-list {
12
- display: flex;
13
- flex-direction: column;
14
- gap: 20px;
15
-
16
- .tob-pay-confirmed-payment-item {
17
- min-height: 80px;
18
- width: 100%;
19
- padding: 15px;
20
- display: flex;
21
- align-items: center;
22
- justify-content: space-between;
23
- flex-wrap: wrap;
24
- background: #fff;
25
- box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.16);
26
- border-radius: 4px;
27
-
28
- .tob-pay-confirmed-payment-item-left {
29
- display: flex;
30
- align-items: center;
31
- gap: 10px;
32
-
33
- .tob-pay-confirmed-payment-item-left-content {
34
- display: flex;
35
- flex-direction: column;
36
-
37
- .tob-pay-confirmed-payment-item-name {
38
- font-size: 16px;
39
- font-weight: 500;
40
- color: #1a1a1a;
41
- }
42
-
43
- .tob-pay-confirmed-payment-item-time {
44
- font-size: 14px;
45
- }
46
- }
47
- }
48
-
49
- .tob-pay-confirmed-payment-item-right {
50
- .tob-pay-confirmed-payment-item-right-info {
51
- display: flex;
52
- flex-direction: column;
53
- align-items: flex-end;
54
- }
55
-
56
- .tob-pay-confirmed-payment-item-amount {
57
- font-size: 16px;
58
- font-weight: 500;
59
- color: #1a1a1a;
60
- }
61
-
62
- .tob-pay-confirmed-payment-item-surcharge {
63
- font-size: 14px;
64
- color: #8c8c8c;
65
- }
66
- }
67
- }
68
- }
69
- }
@@ -1,7 +0,0 @@
1
- declare const ToBPayFooter: (props: {
2
- loading: boolean;
3
- submitDisabled: boolean;
4
- onCancel: () => void;
5
- onSubmit: () => void;
6
- }) => JSX.Element;
7
- export default ToBPayFooter;
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { Button } from '@pisell/materials';
3
- import { locales } from '@pisell/utils';
4
- var ToBPayFooter = function ToBPayFooter(props) {
5
- var loading = props.loading,
6
- submitDisabled = props.submitDisabled,
7
- onCancel = props.onCancel,
8
- onSubmit = props.onSubmit;
9
- return /*#__PURE__*/React.createElement("div", {
10
- style: {
11
- width: '100%',
12
- display: 'flex',
13
- gap: '20px'
14
- }
15
- }, /*#__PURE__*/React.createElement(Button, {
16
- type: "default",
17
- size: "large",
18
- onClick: onCancel,
19
- disabled: loading,
20
- style: {
21
- flex: 1,
22
- height: 50
23
- }
24
- }, locales.getText('tobPay.text.cancel')), /*#__PURE__*/React.createElement(Button, {
25
- type: "primary",
26
- size: "large",
27
- onClick: onSubmit,
28
- disabled: submitDisabled,
29
- loading: loading,
30
- style: {
31
- flex: 1,
32
- height: 50
33
- }
34
- }, locales.getText('tobPay.text.submit')));
35
- };
36
- export default ToBPayFooter;
@@ -1,4 +0,0 @@
1
- declare const ToBPayTitle: (props: {
2
- amount: number | string;
3
- }) => JSX.Element;
4
- export default ToBPayTitle;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { locales } from '@pisell/utils';
3
- var ToBPayTitle = function ToBPayTitle(props) {
4
- return /*#__PURE__*/React.createElement("div", {
5
- style: {
6
- textAlign: 'center',
7
- fontSize: '18px',
8
- fontWeight: 600
9
- }
10
- }, locales.getText('tobPay.text.waitPay'), props.amount);
11
- };
12
- export default ToBPayTitle;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const ToBPayContent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default ToBPayContent;
@@ -1,277 +0,0 @@
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 _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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
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
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
- 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); }
8
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { forwardRef, useState, useImperativeHandle, useEffect, useRef } from 'react';
12
- import { PisellModal } from '@pisell/materials';
13
- import { Spin } from 'antd';
14
- import { useNetwork } from 'ahooks';
15
- import { useEngineUtils, useSymbol } from "../../hooks";
16
- import { useOSPayment, useOSPaymentEffect, useToBPay } from "../../store";
17
- import { PayMethodCode } from "../../types";
18
- import ToBPayCardGroup from "../CardGroup";
19
- import ConfirmedPayment from "../ConfirmedPayment";
20
- import ToBPayTitle from "./Header";
21
- import ToBPayFooter from "./Footer";
22
- import ToBPayCache from "../Cache";
23
- import { handleEftposPay, isEftposPay } from "./utils";
24
- import "./index.less";
25
- var ToBPayContent = /*#__PURE__*/forwardRef(function (props, ref) {
26
- var _order$payment, _order$payment2, _modalStatus$paymetho, _modalStatus$paymetho2;
27
- var network = useNetwork();
28
- var engineUtils = useEngineUtils();
29
- var symbol = useSymbol();
30
- var osPayment = useOSPayment();
31
- var _useOSPaymentEffect = useOSPaymentEffect(),
32
- osPaymentEffectOn = _useOSPaymentEffect.osPaymentEffectOn,
33
- osPaymentEffectOff = _useOSPaymentEffect.osPaymentEffectOff;
34
- var _useToBPay = useToBPay(),
35
- order = _useToBPay.order,
36
- getPayMethodList = _useToBPay.getPayMethodList,
37
- payMethodGroupList = _useToBPay.payMethodGroupList;
38
- var _useState = useState(false),
39
- _useState2 = _slicedToArray(_useState, 2),
40
- open = _useState2[0],
41
- setOpen = _useState2[1];
42
- var _useState3 = useState({
43
- open: false,
44
- paymethod: null
45
- }),
46
- _useState4 = _slicedToArray(_useState3, 2),
47
- modalStatus = _useState4[0],
48
- setModalStatus = _useState4[1];
49
- var _useState5 = useState(false),
50
- _useState6 = _slicedToArray(_useState5, 2),
51
- submitLoading = _useState6[0],
52
- setSubmitLoading = _useState6[1];
53
- // 是否打开eftpos支付
54
- var eftposOpenRef = useRef(false);
55
- useEffect(function () {
56
- return function () {
57
- osPaymentEffectOff();
58
- };
59
- }, []);
60
- useEffect(function () {
61
- console.log('tob_pay_useEffect_network', network);
62
- if (eftposOpenRef.current) {
63
- var _engineUtils$action;
64
- engineUtils === null || engineUtils === void 0 || (_engineUtils$action = engineUtils.action) === null || _engineUtils$action === void 0 || _engineUtils$action.call(engineUtils, {
65
- type: 'pisell1.handleEftposPayNetWork',
66
- data: {
67
- network: network.online
68
- },
69
- callback: function callback() {}
70
- });
71
- }
72
- }, [network.online]);
73
- var openModal = /*#__PURE__*/function () {
74
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderInfo) {
75
- return _regeneratorRuntime().wrap(function _callee$(_context) {
76
- while (1) switch (_context.prev = _context.next) {
77
- case 0:
78
- console.log('tob_pay_open', orderInfo);
79
- // 打开支付弹窗
80
- setOpen(true);
81
- // 开启OS的支付方式列表和订单信息变化监听
82
- osPaymentEffectOn();
83
- // 推送订单信息到OS
84
- _context.next = 5;
85
- return osPayment === null || osPayment === void 0 ? void 0 : osPayment.pushOrderAsync({
86
- order_info: orderInfo || {}
87
- });
88
- case 5:
89
- // 获取支付方式列表
90
- getPayMethodList();
91
- case 6:
92
- case "end":
93
- return _context.stop();
94
- }
95
- }, _callee);
96
- }));
97
- return function openModal(_x) {
98
- return _ref.apply(this, arguments);
99
- };
100
- }();
101
- var onCloseModal = function onCloseModal() {
102
- var _osPayment$submitPayA, _props$callback;
103
- // 如果正在提交,则不可以关闭弹窗
104
- if (submitLoading) {
105
- return;
106
- }
107
- closeModalAction();
108
- osPayment === null || osPayment === void 0 || (_osPayment$submitPayA = osPayment.submitPayAsync) === null || _osPayment$submitPayA === void 0 || _osPayment$submitPayA.call(osPayment, order === null || order === void 0 ? void 0 : order.uuid);
109
- (_props$callback = props.callback) === null || _props$callback === void 0 || _props$callback.call(props, {
110
- status: 'cancel'
111
- });
112
- };
113
- var onSubmit = /*#__PURE__*/function () {
114
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
115
- var _osPayment$submitPayA2, _props$callback2, res, _props$callback3;
116
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
117
- while (1) switch (_context2.prev = _context2.next) {
118
- case 0:
119
- if (!submitLoading) {
120
- _context2.next = 2;
121
- break;
122
- }
123
- return _context2.abrupt("return");
124
- case 2:
125
- setSubmitLoading(true);
126
- _context2.prev = 3;
127
- _context2.next = 6;
128
- return osPayment === null || osPayment === void 0 || (_osPayment$submitPayA2 = osPayment.submitPayAsync) === null || _osPayment$submitPayA2 === void 0 ? void 0 : _osPayment$submitPayA2.call(osPayment, order === null || order === void 0 ? void 0 : order.uuid);
129
- case 6:
130
- res = _context2.sent;
131
- console.log('tob_pay_onSubmit_res', res);
132
- (_props$callback2 = props.callback) === null || _props$callback2 === void 0 || _props$callback2.call(props, {
133
- status: 'success',
134
- data: res === null || res === void 0 ? void 0 : res.data
135
- });
136
- closeModalAction();
137
- _context2.next = 16;
138
- break;
139
- case 12:
140
- _context2.prev = 12;
141
- _context2.t0 = _context2["catch"](3);
142
- console.log('tob_pay_onSubmit_error', _context2.t0);
143
- (_props$callback3 = props.callback) === null || _props$callback3 === void 0 || _props$callback3.call(props, {
144
- status: 'error'
145
- });
146
- case 16:
147
- _context2.prev = 16;
148
- setSubmitLoading(false);
149
- return _context2.finish(16);
150
- case 19:
151
- case "end":
152
- return _context2.stop();
153
- }
154
- }, _callee2, null, [[3, 12, 16, 19]]);
155
- }));
156
- return function onSubmit() {
157
- return _ref2.apply(this, arguments);
158
- };
159
- }();
160
- var closeModalAction = function closeModalAction() {
161
- setOpen(false);
162
- osPaymentEffectOff();
163
- };
164
-
165
- /**
166
- * @title: 暴露给父组件的接口
167
- * @description: 打开支付弹窗
168
- */
169
- useImperativeHandle(ref, function () {
170
- return {
171
- open: openModal
172
- };
173
- });
174
-
175
- /**
176
- * @title: 支付方式改变
177
- */
178
- var onChangePayMethod = function onChangePayMethod(item, type) {
179
- console.log('onChange', item, type);
180
- // 如果是现金支付
181
- if (item.code === PayMethodCode.CASHMANUAL) {
182
- setModalStatus({
183
- open: true,
184
- paymethod: item
185
- });
186
- } else if (isEftposPay(item.code)) {
187
- eftposOpenRef.current = true; // 设置eftpos支付打开状态
188
- handleEftposPay(engineUtils === null || engineUtils === void 0 ? void 0 : engineUtils.action, {
189
- order: order,
190
- payMethod: item,
191
- symbol: symbol,
192
- network: network,
193
- type: type
194
- }, function (res) {
195
- // 支付完成,关闭eftpos支付
196
- eftposOpenRef.current = false;
197
- console.log('tob_pay_onChangePayMethod_eftpos_callback', res);
198
- osPayment === null || osPayment === void 0 || osPayment.pushPaymentAsync(order === null || order === void 0 ? void 0 : order.uuid, (res === null || res === void 0 ? void 0 : res.result) || {});
199
- });
200
- }
201
- };
202
-
203
- /**
204
- * @title: 支付方式对应弹窗 取消
205
- */
206
- var onModalCancel = function onModalCancel() {
207
- setModalStatus({
208
- open: false,
209
- paymethod: null
210
- });
211
- };
212
-
213
- /**
214
- * @title: 支付方式对应弹窗 确认
215
- */
216
- var onModalConfirm = function onModalConfirm(amount) {
217
- console.log('onConfirmPay', amount);
218
- var paymethod = modalStatus.paymethod || {};
219
- osPayment === null || osPayment === void 0 || osPayment.pushPaymentAsync(order === null || order === void 0 ? void 0 : order.uuid, {
220
- amount: amount,
221
- // 当前支付方式付出去多少钱
222
- code: paymethod.code,
223
- // 支付类型code
224
- id: paymethod.id,
225
- // 支付类型id
226
- name: paymethod.name,
227
- // 支付类型name
228
- type: paymethod.type,
229
- // 支付类型type
230
- voucher_id: ''
231
- });
232
- setModalStatus({
233
- open: false,
234
- paymethod: null
235
- });
236
- };
237
- return /*#__PURE__*/React.createElement(PisellModal, {
238
- open: open,
239
- width: "65vw",
240
- maskClosable: false,
241
- bodyStyle: {
242
- padding: 0
243
- },
244
- header: true,
245
- title: /*#__PURE__*/React.createElement(ToBPayTitle, {
246
- amount: (order === null || order === void 0 ? void 0 : order.expect_amount) || '0.00'
247
- }),
248
- footer: /*#__PURE__*/React.createElement(ToBPayFooter, {
249
- onCancel: onCloseModal,
250
- onSubmit: onSubmit,
251
- submitDisabled: order !== null && order !== void 0 && (_order$payment = order.payment) !== null && _order$payment !== void 0 && _order$payment.length ? false : true,
252
- loading: submitLoading
253
- }),
254
- closable: true,
255
- onCancel: onCloseModal
256
- }, /*#__PURE__*/React.createElement(Spin, {
257
- spinning: submitLoading
258
- }, /*#__PURE__*/React.createElement("div", {
259
- className: "tob-pay-container"
260
- }, order !== null && order !== void 0 && (_order$payment2 = order.payment) !== null && _order$payment2 !== void 0 && _order$payment2.length ? /*#__PURE__*/React.createElement(ConfirmedPayment, {
261
- data: order === null || order === void 0 ? void 0 : order.payment
262
- }) : null, payMethodGroupList.map(function (item) {
263
- return /*#__PURE__*/React.createElement(ToBPayCardGroup, {
264
- key: item.title,
265
- data: item,
266
- onChange: onChangePayMethod
267
- });
268
- }), modalStatus.open && ((_modalStatus$paymetho = modalStatus.paymethod) === null || _modalStatus$paymetho === void 0 ? void 0 : _modalStatus$paymetho.code) === PayMethodCode.CASHMANUAL ? /*#__PURE__*/React.createElement(ToBPayCache, {
269
- title: ((_modalStatus$paymetho2 = modalStatus.paymethod) === null || _modalStatus$paymetho2 === void 0 ? void 0 : _modalStatus$paymetho2.name) || '',
270
- uuid: (order === null || order === void 0 ? void 0 : order.uuid) || '',
271
- expect_amount: (order === null || order === void 0 ? void 0 : order.expect_amount) || '0.00',
272
- open: modalStatus.open,
273
- onCancel: onModalCancel,
274
- onOk: onModalConfirm
275
- }) : null)));
276
- });
277
- export default ToBPayContent;
@@ -1,9 +0,0 @@
1
- .tob-pay-container {
2
- height: 100%;
3
- width: 100%;
4
- padding: 32px;
5
- display: flex;
6
- flex-direction: column;
7
- overflow-y: auto;
8
- border-radius: 16px;
9
- }
@@ -1,16 +0,0 @@
1
- import { Order, PayMethod, PayMethodCode } from '../../types';
2
- export declare const isEftposPay: (code: PayMethodCode) => boolean;
3
- /**
4
- * @title: 处理eftpos支付
5
- * @description: 处理eftpos支付
6
- * @param {any} action 引擎action
7
- * @param {any} params 参数
8
- * @param {any} successCallback 成功回调
9
- */
10
- export declare const handleEftposPay: (action: any, params: {
11
- payMethod: PayMethod;
12
- order: Order;
13
- symbol: string;
14
- network: any;
15
- type: string;
16
- }, successCallback: (res: any) => void) => void;
@@ -1,76 +0,0 @@
1
- import { PayMethodCode } from "../../types";
2
- export var isEftposPay = function isEftposPay(code) {
3
- return [PayMethodCode.EFTPOS_PAYO, PayMethodCode.EFTPOS_TYRO, PayMethodCode.EFTPOS_WINDCAVE, PayMethodCode.EFTPOS_LINKLY].includes(code);
4
- };
5
-
6
- /**
7
- * @title: 处理eftpos支付
8
- * @description: 处理eftpos支付
9
- * @param {any} action 引擎action
10
- * @param {any} params 参数
11
- * @param {any} successCallback 成功回调
12
- */
13
- export var handleEftposPay = function handleEftposPay(action, params, successCallback) {
14
- var payMethod = params.payMethod,
15
- order = params.order,
16
- symbol = params.symbol,
17
- network = params.network,
18
- type = params.type;
19
- console.log('tob_pay_handleEftposPay', params);
20
- action === null || action === void 0 || action({
21
- type: 'pisell1.handleEftposPaySource',
22
- data: 'normal',
23
- callback: function callback() {}
24
- });
25
- action === null || action === void 0 || action({
26
- type: 'pisell1.openEftposPay',
27
- data: {
28
- code: payMethod.code,
29
- terminal: {
30
- network: network.online
31
- },
32
- apiParams: {
33
- order_id: order === null || order === void 0 ? void 0 : order.id,
34
- name: (payMethod === null || payMethod === void 0 ? void 0 : payMethod.name) || '',
35
- symbol: symbol,
36
- amount: (order === null || order === void 0 ? void 0 : order.expect_amount) || '0.00'
37
- },
38
- visible: true,
39
- mode: type ? type : 'pay'
40
- },
41
- callback: function callback(_ref) {
42
- var status = _ref.status,
43
- params = _ref.params;
44
- console.log('tob_pay_openEftposPay_callback', status, params);
45
- // TODO: shop中的代码是否需要完整的搬运过来?
46
- if (status === 'success') {
47
- var result = {
48
- amount: Number(params === null || params === void 0 ? void 0 : params.amount),
49
- // 支付金额
50
- code: payMethod.code,
51
- // 支付类型code
52
- id: payMethod.id,
53
- // 支付类型id
54
- name: payMethod.name,
55
- // 支付类型name
56
- type: payMethod.type,
57
- // 支付类型type
58
- voucher_id: '',
59
- // 手续费配置信息
60
- service_charge: {
61
- percentage: params === null || params === void 0 ? void 0 : params.surPercentRate,
62
- amount: params === null || params === void 0 ? void 0 : params.surMoney
63
- },
64
- metadata: {
65
- unique_payment_number: params === null || params === void 0 ? void 0 : params.uniquePaymentNumber
66
- }
67
- };
68
- successCallback === null || successCallback === void 0 || successCallback({
69
- result: result,
70
- status: status,
71
- params: params
72
- });
73
- }
74
- }
75
- });
76
- };
@@ -1,5 +0,0 @@
1
- export { default as ToBPayContent } from './Content';
2
- export { default as ToBPayCard } from './Card';
3
- export { default as ToBPayCardGroup } from './CardGroup';
4
- export { default as ConfirmedPayment } from './ConfirmedPayment';
5
- export { default as ToBPayCache } from './Cache';
@@ -1,5 +0,0 @@
1
- export { default as ToBPayContent } from "./Content";
2
- export { default as ToBPayCard } from "./Card";
3
- export { default as ToBPayCardGroup } from "./CardGroup";
4
- export { default as ConfirmedPayment } from "./ConfirmedPayment";
5
- export { default as ToBPayCache } from "./Cache";
@@ -1,12 +0,0 @@
1
- /**
2
- * @title: 获取引擎utils
3
- */
4
- export declare const useEngineUtils: () => any;
5
- /**
6
- * @title: 获取当前的语言
7
- */
8
- export declare const useEngineLocale: () => any;
9
- /**
10
- * @title: 获取当前的货币符号
11
- */
12
- export declare const useSymbol: () => any;
@@ -1,30 +0,0 @@
1
- import useEngineContext from "../../../hooks/useEngineContext";
2
-
3
- /**
4
- * @title: 获取引擎utils
5
- */
6
- export var useEngineUtils = function useEngineUtils() {
7
- var engineContext = useEngineContext();
8
- var utils = engineContext.appHelper.utils || {};
9
- return utils;
10
- };
11
-
12
- /**
13
- * @title: 获取当前的语言
14
- */
15
- export var useEngineLocale = function useEngineLocale() {
16
- var _utils$getApp, _app$locales;
17
- var utils = useEngineUtils();
18
- var app = (utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils)) || {};
19
- var locale = (app === null || app === void 0 || (_app$locales = app.locales) === null || _app$locales === void 0 ? void 0 : _app$locales.locale) || 'en';
20
- return locale;
21
- };
22
-
23
- /**
24
- * @title: 获取当前的货币符号
25
- */
26
- export var useSymbol = function useSymbol() {
27
- var utils = useEngineUtils();
28
- var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
29
- return symbol;
30
- };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const ToBPay: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
- export default ToBPay;
@@ -1,24 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import React, { forwardRef, useImperativeHandle, useRef } from 'react';
3
- import { locales } from '@pisell/utils';
4
- import localeTexts from "./locales";
5
- import { useEngineLocale } from "./hooks";
6
- import { ToBPayProvider } from "./store";
7
- import { ToBPayContent } from "./components";
8
- var ToBPay = /*#__PURE__*/forwardRef(function (props, ref) {
9
- var toBPayRef = useRef(null);
10
- var engineLocale = useEngineLocale();
11
- // 注册多语言
12
- locales.init(localeTexts, engineLocale);
13
- useImperativeHandle(ref, function () {
14
- var _toBPayRef$current;
15
- return {
16
- open: (_toBPayRef$current = toBPayRef.current) === null || _toBPayRef$current === void 0 ? void 0 : _toBPayRef$current.open
17
- };
18
- });
19
- console.log('toBPayProps', props);
20
- return /*#__PURE__*/React.createElement(ToBPayProvider, null, /*#__PURE__*/React.createElement(ToBPayContent, _extends({}, props || {}, {
21
- ref: toBPayRef
22
- })));
23
- });
24
- export default ToBPay;