@pisell/private-materials 6.7.7 → 6.7.9

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 (367) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +17 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Voucher/index.js +1 -2
  12. package/es/components/booking/addons/index.js +17 -25
  13. package/es/components/booking/addons/model.d.ts +10 -1
  14. package/es/components/booking/components/footer/amount.d.ts +0 -1
  15. package/es/components/booking/components/footer/amount.js +84 -548
  16. package/es/components/booking/components/footer/index.js +56 -77
  17. package/es/components/booking/components/footer/utils.d.ts +0 -19
  18. package/es/components/booking/components/footer/utils.js +73 -194
  19. package/es/components/booking/components/voucher/index.js +7 -23
  20. package/es/components/booking/forms/model.d.ts +10 -1
  21. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  22. package/es/components/booking/hooks/useQuotation.js +1 -4
  23. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  24. package/es/components/booking/info/model.d.ts +10 -1
  25. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  26. package/es/components/booking/info/service2/utils.js +0 -1
  27. package/es/components/booking/info2/cartClientCard/index.js +6 -30
  28. package/es/components/booking/info2/index.js +1 -1
  29. package/es/components/booking/info2/service/addService/index.js +3 -2
  30. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  31. package/es/components/booking/info2/service/editNormalService/index.js +0 -6
  32. package/es/components/booking/info2/service/editService/index.js +6 -16
  33. package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
  34. package/es/components/booking/info2/service/editService/utils.js +0 -66
  35. package/es/components/booking/model.d.ts +9 -1
  36. package/es/components/booking/notes/model.d.ts +10 -1
  37. package/es/components/booking/payments/model.d.ts +10 -1
  38. package/es/components/booking/utils.d.ts +0 -1
  39. package/es/components/booking/utils.js +3 -16
  40. package/es/components/checkout/PaymentModal.d.ts +5 -13
  41. package/es/components/checkout/PaymentModal.js +252 -304
  42. package/es/components/checkout/PaymentPlugin.d.ts +3 -0
  43. package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
  44. package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
  45. package/es/components/checkout/components/AdditionalModule/index.js +12 -52
  46. package/es/components/checkout/components/AmountSummary/index.js +76 -9
  47. package/es/components/checkout/components/AmountSummary/index.less +6 -5
  48. package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
  49. package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
  50. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  51. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
  52. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
  53. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
  54. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
  55. package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
  56. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
  57. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
  58. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  59. package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
  60. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  61. package/es/components/checkout/hooks/useWalletPass.js +1 -1
  62. package/es/components/checkout/index.less +1 -1
  63. package/es/components/checkout/locales.d.ts +0 -6
  64. package/es/components/checkout/locales.js +0 -6
  65. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
  66. package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
  67. package/es/components/eftposPay/hooks.d.ts +1 -1
  68. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
  69. package/es/components/eftposPay/payo/config.js +32 -70
  70. package/es/components/eftposPay/store/index.d.ts +4 -4
  71. package/es/components/eftposPay/tyro/index.js +0 -12
  72. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  76. package/es/components/index.d.ts +1 -2
  77. package/es/components/index.js +1 -2
  78. package/es/components/list/List.js +40 -56
  79. package/es/components/list/hooks/useListState.d.ts +3 -5
  80. package/es/components/list/hooks/useListState.js +2 -17
  81. package/es/components/list/styles/header.less +3 -3
  82. package/es/components/list/utils/index.d.ts +1 -13
  83. package/es/components/list/utils/index.js +1 -43
  84. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
  85. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  86. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
  87. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
  88. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
  89. package/es/components/pay/toC/index.js +4 -7
  90. package/es/components/pay/toC/locales.d.ts +0 -3
  91. package/es/components/pay/toC/locales.js +3 -6
  92. package/es/components/pay/toC/model.d.ts +9 -1
  93. package/es/components/pay/toC/status.d.ts +0 -1
  94. package/es/components/pay/toC/status.js +0 -3
  95. package/es/components/schedules/model.d.ts +9 -1
  96. package/es/components/schedules/utils.d.ts +1 -1
  97. package/es/components/subTotal/index.js +1 -1
  98. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
  99. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
  100. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
  101. package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
  102. package/es/components/ticketBooking/components/menuBar/index.js +12 -109
  103. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  104. package/es/components/ticketBooking/components/timeBar/index.js +7 -112
  105. package/es/components/ticketBooking/components/timeBar/index.less +0 -59
  106. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
  107. package/es/components/ticketBooking/locales.d.ts +0 -6
  108. package/es/components/ticketBooking/locales.js +3 -9
  109. package/es/components/ticketBooking/utils/index.d.ts +0 -3
  110. package/es/components/ticketBooking/utils/index.js +13 -36
  111. package/es/components/wallet/Detail/index.js +2 -34
  112. package/es/components/wallet/Detail/index.less +0 -11
  113. package/es/components/wallet/Detail/locales.d.ts +0 -6
  114. package/es/components/wallet/Detail/locales.js +2 -14
  115. package/es/components/wallet/Detail/model.d.ts +13 -1
  116. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  117. package/es/components/wallet/PointCard/model.d.ts +13 -1
  118. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  119. package/es/components/wallet/Voucher/index.js +10 -11
  120. package/es/components/wallet/Voucher/model.d.ts +13 -1
  121. package/es/components/wallet/components/WalletCard.js +1 -5
  122. package/es/components/wallet/index.js +2 -4
  123. package/es/components/wallet/model.d.ts +9 -1
  124. package/es/components/wallet/serve.d.ts +0 -7
  125. package/es/hooks/usePaymentLogger.d.ts +0 -1
  126. package/es/index.d.ts +0 -4
  127. package/es/index.js +1 -5
  128. package/es/plus/clientCard/locales.js +3 -3
  129. package/es/plus/clinetSearch/index.js +30 -28
  130. package/es/plus/clinetSearch/locales.d.ts +0 -3
  131. package/es/plus/clinetSearch/locales.js +4 -7
  132. package/es/plus/clinetSearch/types.d.ts +0 -12
  133. package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
  134. package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
  135. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
  136. package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
  137. package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
  138. package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
  139. package/es/plus/walletPassGallery/index.js +3 -7
  140. package/es/plus/walletPassGallery/serve.d.ts +0 -3
  141. package/es/plus/walletPassGallery/serve.js +2 -4
  142. package/es/pro/Login2.0/index.less +8 -15
  143. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  144. package/es/pro/comprehensiveSearch/locales.js +1 -1
  145. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -45
  146. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  147. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
  148. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
  149. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
  150. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
  151. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
  152. package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
  153. package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
  154. package/es/utils/index.d.ts +1 -1
  155. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
  156. package/lib/components/booking/addons/index.js +7 -15
  157. package/lib/components/booking/addons/model.d.ts +10 -1
  158. package/lib/components/booking/components/footer/amount.d.ts +0 -1
  159. package/lib/components/booking/components/footer/amount.js +41 -293
  160. package/lib/components/booking/components/footer/index.js +11 -30
  161. package/lib/components/booking/components/footer/utils.d.ts +0 -19
  162. package/lib/components/booking/components/footer/utils.js +41 -138
  163. package/lib/components/booking/components/voucher/index.js +9 -25
  164. package/lib/components/booking/forms/model.d.ts +10 -1
  165. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  166. package/lib/components/booking/hooks/useQuotation.js +1 -2
  167. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  168. package/lib/components/booking/info/model.d.ts +10 -1
  169. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  170. package/lib/components/booking/info/service2/utils.js +0 -1
  171. package/lib/components/booking/info2/cartClientCard/index.js +5 -25
  172. package/lib/components/booking/info2/index.js +2 -7
  173. package/lib/components/booking/info2/service/addService/index.js +2 -1
  174. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  175. package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
  176. package/lib/components/booking/info2/service/editService/index.js +3 -12
  177. package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
  178. package/lib/components/booking/info2/service/editService/utils.js +3 -40
  179. package/lib/components/booking/model.d.ts +9 -1
  180. package/lib/components/booking/notes/model.d.ts +10 -1
  181. package/lib/components/booking/payments/model.d.ts +10 -1
  182. package/lib/components/booking/utils.d.ts +0 -1
  183. package/lib/components/booking/utils.js +0 -11
  184. package/lib/components/checkout/PaymentModal.d.ts +5 -13
  185. package/lib/components/checkout/PaymentModal.js +147 -190
  186. package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
  187. package/lib/components/checkout/PaymentPlugin.js +181 -0
  188. package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
  189. package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
  190. package/lib/components/checkout/components/AmountSummary/index.js +46 -5
  191. package/lib/components/checkout/components/AmountSummary/index.less +6 -5
  192. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
  193. package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
  194. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  195. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
  196. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
  197. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
  198. package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
  199. package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
  200. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
  201. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
  202. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  203. package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
  204. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  205. package/lib/components/checkout/hooks/useWalletPass.js +1 -1
  206. package/lib/components/checkout/index.less +1 -1
  207. package/lib/components/checkout/locales.d.ts +0 -6
  208. package/lib/components/checkout/locales.js +0 -6
  209. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
  210. package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
  211. package/lib/components/eftposPay/hooks.d.ts +1 -1
  212. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
  213. package/lib/components/eftposPay/payo/config.js +73 -98
  214. package/lib/components/eftposPay/store/index.d.ts +4 -4
  215. package/lib/components/eftposPay/tyro/index.js +0 -12
  216. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  217. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  218. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  219. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  220. package/lib/components/index.d.ts +1 -2
  221. package/lib/components/index.js +0 -3
  222. package/lib/components/list/List.js +16 -34
  223. package/lib/components/list/hooks/useListState.d.ts +3 -5
  224. package/lib/components/list/hooks/useListState.js +1 -14
  225. package/lib/components/list/styles/header.less +3 -3
  226. package/lib/components/list/utils/index.d.ts +1 -13
  227. package/lib/components/list/utils/index.js +0 -27
  228. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
  229. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  230. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
  231. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  232. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
  233. package/lib/components/pay/toC/index.js +1 -4
  234. package/lib/components/pay/toC/locales.d.ts +0 -3
  235. package/lib/components/pay/toC/locales.js +3 -6
  236. package/lib/components/pay/toC/model.d.ts +9 -1
  237. package/lib/components/pay/toC/status.d.ts +0 -1
  238. package/lib/components/pay/toC/status.js +0 -5
  239. package/lib/components/schedules/model.d.ts +9 -1
  240. package/lib/components/schedules/utils.d.ts +1 -1
  241. package/lib/components/subTotal/index.js +1 -1
  242. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
  243. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
  244. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
  245. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
  246. package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
  247. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  248. package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
  249. package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
  250. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
  251. package/lib/components/ticketBooking/locales.d.ts +0 -6
  252. package/lib/components/ticketBooking/locales.js +3 -9
  253. package/lib/components/ticketBooking/utils/index.d.ts +0 -3
  254. package/lib/components/ticketBooking/utils/index.js +6 -20
  255. package/lib/components/wallet/Detail/index.js +3 -31
  256. package/lib/components/wallet/Detail/index.less +0 -11
  257. package/lib/components/wallet/Detail/locales.d.ts +0 -6
  258. package/lib/components/wallet/Detail/locales.js +2 -14
  259. package/lib/components/wallet/Detail/model.d.ts +13 -1
  260. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  261. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  262. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  263. package/lib/components/wallet/Voucher/index.js +8 -8
  264. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  265. package/lib/components/wallet/components/WalletCard.js +0 -4
  266. package/lib/components/wallet/index.js +2 -2
  267. package/lib/components/wallet/model.d.ts +9 -1
  268. package/lib/components/wallet/serve.d.ts +0 -7
  269. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  270. package/lib/index.d.ts +0 -4
  271. package/lib/index.js +0 -12
  272. package/lib/plus/clientCard/locales.js +3 -3
  273. package/lib/plus/clinetSearch/index.js +8 -17
  274. package/lib/plus/clinetSearch/locales.d.ts +0 -3
  275. package/lib/plus/clinetSearch/locales.js +4 -7
  276. package/lib/plus/clinetSearch/types.d.ts +0 -12
  277. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  278. package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
  279. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
  280. package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
  281. package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
  282. package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
  283. package/lib/plus/walletPassGallery/index.js +3 -7
  284. package/lib/plus/walletPassGallery/serve.d.ts +0 -3
  285. package/lib/plus/walletPassGallery/serve.js +2 -3
  286. package/lib/pro/Login2.0/index.less +8 -15
  287. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  288. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  289. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +43 -42
  290. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  291. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
  292. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
  293. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
  294. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
  295. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
  296. package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
  297. package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
  298. package/lib/utils/index.d.ts +1 -1
  299. package/package.json +4 -4
  300. package/es/components/checkout/plugin.d.ts +0 -2
  301. package/es/components/checkout/plugin.js +0 -303
  302. package/es/components/eftposPay/payo/payment.d.ts +0 -66
  303. package/es/components/eftposPay/payo/payment.js +0 -579
  304. package/es/components/eftposPay/utils/log/index.d.ts +0 -110
  305. package/es/components/eftposPay/utils/log/index.js +0 -371
  306. package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
  307. package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
  308. package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
  309. package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
  310. package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
  311. package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
  312. package/es/components/systemSettings/registry/components/SectionList.js +0 -174
  313. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
  314. package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
  315. package/es/components/systemSettings/registry/components/index.d.ts +0 -4
  316. package/es/components/systemSettings/registry/components/index.js +0 -4
  317. package/es/components/systemSettings/registry/index.d.ts +0 -5
  318. package/es/components/systemSettings/registry/index.js +0 -1059
  319. package/es/components/systemSettings/registry/index.less +0 -410
  320. package/es/components/systemSettings/registry/locales.d.ts +0 -272
  321. package/es/components/systemSettings/registry/locales.js +0 -300
  322. package/es/components/systemSettings/registry/services.d.ts +0 -77
  323. package/es/components/systemSettings/registry/services.js +0 -472
  324. package/es/components/systemSettings/registry/types.d.ts +0 -126
  325. package/es/components/systemSettings/registry/types.js +0 -1
  326. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  327. package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
  328. package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
  329. package/es/components/systemSettings/registry/utils/validators.js +0 -44
  330. package/es/components/wallet/utils.d.ts +0 -48
  331. package/es/components/wallet/utils.js +0 -342
  332. package/lib/components/checkout/plugin.d.ts +0 -2
  333. package/lib/components/checkout/plugin.js +0 -263
  334. package/lib/components/eftposPay/payo/payment.d.ts +0 -66
  335. package/lib/components/eftposPay/payo/payment.js +0 -357
  336. package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
  337. package/lib/components/eftposPay/utils/log/index.js +0 -294
  338. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
  339. package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
  340. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
  341. package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
  342. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
  343. package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
  344. package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
  345. package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
  346. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
  347. package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
  348. package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
  349. package/lib/components/systemSettings/registry/components/index.js +0 -48
  350. package/lib/components/systemSettings/registry/index.d.ts +0 -5
  351. package/lib/components/systemSettings/registry/index.js +0 -529
  352. package/lib/components/systemSettings/registry/index.less +0 -410
  353. package/lib/components/systemSettings/registry/locales.d.ts +0 -272
  354. package/lib/components/systemSettings/registry/locales.js +0 -324
  355. package/lib/components/systemSettings/registry/services.d.ts +0 -77
  356. package/lib/components/systemSettings/registry/services.js +0 -290
  357. package/lib/components/systemSettings/registry/types.d.ts +0 -126
  358. package/lib/components/systemSettings/registry/types.js +0 -17
  359. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  360. package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
  361. package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
  362. package/lib/components/systemSettings/registry/utils/validators.js +0 -54
  363. package/lib/components/wallet/utils.d.ts +0 -48
  364. package/lib/components/wallet/utils.js +0 -287
  365. package/lowcode/payment-modal/meta.ts +0 -135
  366. package/lowcode/settings-registry/meta.ts +0 -29
  367. package/lowcode/wallet-pass-detail/meta.ts +0 -89
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const PaymentPlugin: () => React.JSX.Element;
3
+ export default PaymentPlugin;
@@ -8,153 +8,192 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
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
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
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { useEffect } from 'react';
12
- import { Drawer, Form, Input, Space } from 'antd';
13
- import { Button, BaseTranslation } from '@pisell/materials';
14
- import { locales } from '@pisell/utils';
15
- import localesData from "../locales";
11
+ import { useRef, useEffect, useState } from "react";
12
+ import { Button } from "antd";
13
+ import { CloseOutlined } from "@ant-design/icons";
14
+ import useModal from "../../hooks/useModal";
15
+ import Checkout from "./content";
16
+ import { locales } from "@pisell/utils";
17
+ import checkoutLocales from "./locales";
18
+ import useEngineContext from "../../hooks/useEngineContext";
19
+ import React from "react";
16
20
 
17
- // 创建本地的 getText 函数
18
- var getText = function getText(key) {
19
- // 先尝试使用 locales.getText,如果没有找到再使用本地数据
20
- var globalText = locales.getText(key);
21
- if (globalText !== key) {
22
- return globalText;
23
- }
21
+ // 添加样式来覆盖Modal的默认padding
22
+ var modalStyle = document.createElement('style');
23
+ modalStyle.textContent = "\n :where(.payment-modal-wrapper) .ant-modal .ant-modal-content,\n .payment-modal-wrapper .ant-modal .ant-modal-content,\n .payment-modal-wrapper .ant-modal-content {\n padding: 12px 36px 36px 36px !important;\n }\n";
24
+ if (!document.querySelector('.payment-modal-style')) {
25
+ modalStyle.className = 'payment-modal-style';
26
+ document.head.appendChild(modalStyle);
27
+ }
28
+ var PaymentPlugin = function PaymentPlugin() {
29
+ var _context$appHelper;
30
+ var context = useEngineContext();
31
+ var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
32
+ pisellos = _context$appHelper$ut.pisellos;
33
+ var paymentRef = useRef();
34
+ var callback = useRef();
35
+ var _useState = useState(0),
36
+ _useState2 = _slicedToArray(_useState, 2),
37
+ totalAmount = _useState2[0],
38
+ setTotalAmount = _useState2[1];
39
+ // 创建本地翻译函数,优先使用 checkout 语言包
40
+ var translation = function translation(key, fallback) {
41
+ var _checkoutLocales;
42
+ var currentLang = locales.locale || 'en';
43
+ var checkoutText = (_checkoutLocales = checkoutLocales[currentLang]) === null || _checkoutLocales === void 0 ? void 0 : _checkoutLocales[key];
44
+ if (checkoutText) {
45
+ return checkoutText;
46
+ }
24
47
 
25
- // 使用本地多语言数据
26
- var currentLocale = locales.locale || 'zh-CN'; // 默认使用中文
27
- var localeData = localesData[currentLocale] || localesData['en'] || {};
28
- return localeData[key] || key;
29
- };
30
- var GroupModal = function GroupModal(_ref) {
31
- var open = _ref.open,
32
- type = _ref.type,
33
- data = _ref.data,
34
- onOk = _ref.onOk,
35
- onCancel = _ref.onCancel;
36
- var _Form$useForm = Form.useForm(),
37
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
38
- form = _Form$useForm2[0];
48
+ // 回退到全局语言包
49
+ return locales.getText(key) || fallback;
50
+ };
51
+ var handlePaymentComplete = function handlePaymentComplete(result) {
52
+ var _callback$current;
53
+ console.log("Payment completed:", result);
54
+ (_callback$current = callback.current) === null || _callback$current === void 0 || _callback$current.call(callback, result);
55
+ hideModal(); // 支付完成后关闭弹窗
56
+ };
57
+ var handlePaymentCancel = function handlePaymentCancel() {
58
+ var _callback$current2;
59
+ console.log("Payment cancelled");
60
+ hideModal();
61
+ (_callback$current2 = callback.current) === null || _callback$current2 === void 0 || _callback$current2.call(callback, {
62
+ status: "cancelled"
63
+ });
64
+ };
39
65
 
40
- // 当模态框打开时,初始化表单数据
41
- useEffect(function () {
42
- if (open) {
43
- if (type === 'edit' && data) {
44
- form.setFieldsValue({
45
- title: data.title,
46
- code: data.code
47
- });
48
- } else {
49
- form.resetFields();
66
+ // 自定义头部组件
67
+ var CustomHeader = function CustomHeader() {
68
+ return /*#__PURE__*/React.createElement("div", {
69
+ style: {
70
+ display: "flex",
71
+ alignItems: "center",
72
+ justifyContent: "space-between",
73
+ padding: "16px 0",
74
+ marginBottom: "16px",
75
+ borderBottom: "1px solid #f0f0f0",
76
+ backgroundColor: "#fafafa",
77
+ margin: "-12px -36px 16px -36px",
78
+ // 扩展到modal边缘
79
+ paddingLeft: "36px",
80
+ paddingRight: "36px"
50
81
  }
51
- }
52
- }, [open, type, data, form]);
53
-
54
- // 处理确认
55
- var handleOk = /*#__PURE__*/function () {
56
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
57
- var values;
82
+ }, /*#__PURE__*/React.createElement("div", {
83
+ style: {
84
+ display: "flex",
85
+ alignItems: "center",
86
+ gap: "12px"
87
+ }
88
+ }, "\u786C\u4EF6\u72B6\u6001"), /*#__PURE__*/React.createElement("div", null, translation("order.total"), "\uFF1A", totalAmount), /*#__PURE__*/React.createElement("div", {
89
+ style: {
90
+ display: "flex",
91
+ alignItems: "center",
92
+ gap: "8px"
93
+ }
94
+ }, /*#__PURE__*/React.createElement(Button, {
95
+ type: "text",
96
+ size: "small",
97
+ icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
98
+ onClick: handlePaymentCancel,
99
+ style: {
100
+ color: "#8c8c8c",
101
+ border: "none",
102
+ boxShadow: "none"
103
+ }
104
+ })));
105
+ };
106
+ var _useModal = useModal({
107
+ title: null,
108
+ // 移除默认标题,使用自定义头部
109
+ children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CustomHeader, null), /*#__PURE__*/React.createElement(Checkout, {
110
+ paymentData: paymentRef.current,
111
+ moduleConfig: {
112
+ showWalletPass: true,
113
+ showCashPayment: true,
114
+ showAdditionalModule: true,
115
+ showPaymentOptions: true
116
+ },
117
+ onPaymentComplete: handlePaymentComplete,
118
+ onPaymentCancel: handlePaymentCancel,
119
+ onStatusChange: function onStatusChange(status) {
120
+ return console.log("Status changed:", status);
121
+ },
122
+ open_deposit: true // 开启押金选择功能
123
+ })),
124
+ width: 880,
125
+ // 808px 内容宽度 + 36px 左右内边距
126
+ destroyOnClose: true,
127
+ maskClosable: false,
128
+ footer: null,
129
+ // 移除默认的确定/取消按钮,让组件内部处理
130
+ closeIcon: null,
131
+ // 移除默认关闭图标,使用自定义的
132
+ onCancel: handlePaymentCancel,
133
+ wrapClassName: "payment-modal-wrapper"
134
+ }),
135
+ showModal = _useModal.showModal,
136
+ hideModal = _useModal.hideModal,
137
+ content = _useModal.content;
138
+ var onOpen = /*#__PURE__*/function () {
139
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(props) {
140
+ var checkout, _props$data, _props$data2, orderInfo;
58
141
  return _regeneratorRuntime().wrap(function _callee$(_context) {
59
142
  while (1) switch (_context.prev = _context.next) {
60
143
  case 0:
61
- _context.prev = 0;
62
- _context.next = 3;
63
- return form.validateFields();
64
- case 3:
65
- values = _context.sent;
66
- _context.next = 6;
67
- return onOk(values);
144
+ // 获取 checkout 模块并处理订单数据
145
+ checkout = pisellos.getModule("checkout");
146
+ if (!checkout) {
147
+ _context.next = 6;
148
+ break;
149
+ }
150
+ _context.next = 4;
151
+ return checkout.createLocalOrderAsync({
152
+ orderData: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.order_info,
153
+ cartSummary: (_props$data2 = props.data) === null || _props$data2 === void 0 || (_props$data2 = _props$data2.subtotal_info) === null || _props$data2 === void 0 ? void 0 : _props$data2.subTotalList,
154
+ autoPayment: true
155
+ });
156
+ case 4:
157
+ // 获取订单总金额
158
+ orderInfo = checkout.getCurrentOrderInfo();
159
+ if (orderInfo && orderInfo.totalAmount) {
160
+ setTotalAmount(orderInfo.totalAmount);
161
+ }
68
162
  case 6:
69
- form.resetFields();
70
- _context.next = 12;
71
- break;
163
+ paymentRef.current = props === null || props === void 0 ? void 0 : props.data;
164
+ callback.current = props === null || props === void 0 ? void 0 : props.callback;
165
+ showModal(); // 打开弹窗
72
166
  case 9:
73
- _context.prev = 9;
74
- _context.t0 = _context["catch"](0);
75
- console.error('Validation failed:', _context.t0);
76
- case 12:
77
167
  case "end":
78
168
  return _context.stop();
79
169
  }
80
- }, _callee, null, [[0, 9]]);
170
+ }, _callee);
81
171
  }));
82
- return function handleOk() {
83
- return _ref2.apply(this, arguments);
172
+ return function onOpen(_x) {
173
+ return _ref.apply(this, arguments);
84
174
  };
85
175
  }();
86
-
87
- // 处理取消
88
- var handleCancel = function handleCancel() {
89
- form.resetFields();
90
- onCancel();
176
+ var onClose = function onClose() {
177
+ hideModal();
91
178
  };
92
- var title = locales.getText(type === 'add' ? 'registry.modal.add.group' : 'registry.modal.edit.group');
93
- return /*#__PURE__*/React.createElement(Drawer, {
94
- title: title,
95
- open: open,
96
- onClose: handleCancel,
97
- width: 400,
98
- destroyOnClose: true,
99
- footer: /*#__PURE__*/React.createElement("div", {
100
- style: {
101
- textAlign: 'right'
102
- }
103
- }, /*#__PURE__*/React.createElement(Space, {
104
- size: "small"
105
- }, /*#__PURE__*/React.createElement(Button, {
106
- onClick: handleCancel
107
- }, locales.getText('registry.button.cancel')), /*#__PURE__*/React.createElement(Button, {
108
- type: "primary",
109
- onClick: handleOk
110
- }, locales.getText('registry.button.save'))))
111
- }, /*#__PURE__*/React.createElement(Form, {
112
- form: form,
113
- layout: "vertical",
114
- requiredMark: true
115
- }, /*#__PURE__*/React.createElement(Form.Item, {
116
- name: "title",
117
- label: locales.getText('registry.form.title'),
118
- rules: [{
119
- required: true,
120
- message: locales.getText('registry.message.required')
121
- }]
122
- }, /*#__PURE__*/React.createElement(BaseTranslation, {
123
- placeholder: locales.getText('registry.form.name.placeholder')
124
- })), /*#__PURE__*/React.createElement(Form.Item, {
125
- name: "code",
126
- label: locales.getText('registry.form.code'),
127
- rules: [{
128
- required: true,
129
- message: locales.getText('registry.message.required')
130
- }, {
131
- validator: function validator(_, value) {
132
- if (!value) return Promise.resolve();
133
-
134
- // 格式检查:只能包含小写字母、数字、点和下划线
135
- if (!/^[a-z0-9\._]+$/.test(value)) {
136
- return Promise.reject(new Error(getText('registry.message.code.format')));
137
- }
138
-
139
- // 开头规则检查:必须以字母开头
140
- if (!/^[a-z]/.test(value)) {
141
- return Promise.reject(new Error(getText('registry.message.code.start')));
142
- }
143
-
144
- // 结尾规则检查:不能以点或下划线结尾
145
- if (/[\._]$/.test(value)) {
146
- return Promise.reject(new Error(getText('registry.message.code.end')));
147
- }
148
179
 
149
- // 连续特殊字符检查:不能使用连续的点或下划线
150
- if (/[\.]{2,}|[\_]{2,}/.test(value)) {
151
- return Promise.reject(new Error(getText('registry.message.code.consecutive')));
152
- }
153
- return Promise.resolve();
154
- }
155
- }]
156
- }, /*#__PURE__*/React.createElement(Input, {
157
- placeholder: locales.getText('registry.form.code.placeholder')
158
- }))));
180
+ /**
181
+ * @title: 初始化, 注入插件
182
+ * @description:
183
+ * @return {*}
184
+ * @Author: zhiwei.Wang
185
+ * @Date: 2023-09-13 09:41
186
+ */
187
+ var init = function init() {
188
+ var state = {
189
+ open: onOpen,
190
+ close: onClose
191
+ };
192
+ console.log("PaymentPlugin", state);
193
+ };
194
+ useEffect(function () {
195
+ init();
196
+ }, []);
197
+ return /*#__PURE__*/React.createElement(React.Fragment, null, content);
159
198
  };
160
- export default GroupModal;
199
+ export default PaymentPlugin;
@@ -8,8 +8,6 @@ interface AdditionalModuleProps {
8
8
  hasOrderNote?: boolean;
9
9
  disabled?: boolean;
10
10
  showCashPayment?: boolean;
11
- isFullWidth?: boolean;
12
- showMore?: boolean;
13
11
  }
14
- declare function AdditionalModule({ orderInfo, customAmount, handleButtonClick, hasOrderNote, disabled, showCashPayment, isFullWidth, showMore }: AdditionalModuleProps): React.JSX.Element;
12
+ declare function AdditionalModule({ orderInfo, customAmount, handleButtonClick, hasOrderNote, disabled, showCashPayment, }: AdditionalModuleProps): React.JSX.Element;
15
13
  export default AdditionalModule;
@@ -18,11 +18,7 @@ function AdditionalModule(_ref) {
18
18
  _ref$disabled = _ref.disabled,
19
19
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
20
20
  _ref$showCashPayment = _ref.showCashPayment,
21
- showCashPayment = _ref$showCashPayment === void 0 ? false : _ref$showCashPayment,
22
- _ref$isFullWidth = _ref.isFullWidth,
23
- isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
24
- _ref$showMore = _ref.showMore,
25
- showMore = _ref$showMore === void 0 ? true : _ref$showMore;
21
+ showCashPayment = _ref$showCashPayment === void 0 ? false : _ref$showCashPayment;
26
22
  // 初始化国际化
27
23
  locales.init(localeTexts, getLocale());
28
24
 
@@ -31,12 +27,6 @@ function AdditionalModule(_ref) {
31
27
  key: 'send-link',
32
28
  label: locales.getText('pisell2.text.send-link'),
33
29
  icon: /*#__PURE__*/React.createElement(LinkOutlined, null)
34
- }, {
35
- key: 'print-receipt',
36
- label: locales.getText('pisell2.text.print-receipt'),
37
- icon: /*#__PURE__*/React.createElement(Icon, {
38
- type: "pisell2-printer"
39
- })
40
30
  }];
41
31
  var Toast = useToast();
42
32
  return /*#__PURE__*/React.createElement("div", {
@@ -45,9 +35,9 @@ function AdditionalModule(_ref) {
45
35
  className: "additional-module-title"
46
36
  }, locales.getText('pisell2.text.others')), /*#__PURE__*/React.createElement("div", {
47
37
  className: "additional-module-buttons-container"
48
- }, showCashPayment && !isFullWidth ?
38
+ }, showCashPayment ?
49
39
  /*#__PURE__*/
50
- // Grid布局模式:两行布局(显示现金支付模块且非全宽时)
40
+ // Grid布局模式:两行布局(显示现金支付模块时)
51
41
  React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
52
42
  className: "additional-module-button-row"
53
43
  }, /*#__PURE__*/React.createElement(Button, {
@@ -67,14 +57,14 @@ function AdditionalModule(_ref) {
67
57
  }))), /*#__PURE__*/React.createElement(Button, {
68
58
  className: "additional-module-button-base purple-theme",
69
59
  onClick: function onClick() {
70
- handleButtonClick('split-payment');
60
+ handleButtonClick('print-receipt');
71
61
  },
72
62
  icon: /*#__PURE__*/React.createElement(Icon, {
73
- type: "pisell2-coins-01",
63
+ type: "pisell2-printer",
74
64
  className: "additional-module-button-icon"
75
65
  }),
76
66
  size: "large"
77
- }, locales.getText('split.payment'))), /*#__PURE__*/React.createElement("div", {
67
+ }, locales.getText('pisell2.text.print-receipt'))), /*#__PURE__*/React.createElement("div", {
78
68
  className: "additional-module-button-row"
79
69
  }, /*#__PURE__*/React.createElement(Button, {
80
70
  className: "additional-module-button-base purple-theme",
@@ -96,7 +86,7 @@ function AdditionalModule(_ref) {
96
86
  icon: /*#__PURE__*/React.createElement(ClockCircleOutlined, {
97
87
  className: "additional-module-button-icon"
98
88
  })
99
- }, locales.getText('pisell2.text.save-pay-later')), showMore && /*#__PURE__*/React.createElement(Dropdown, {
89
+ }, locales.getText('pisell2.text.save-pay-later')), /*#__PURE__*/React.createElement(Dropdown, {
100
90
  menu: {
101
91
  items: moreMenuItems,
102
92
  onClick: function onClick(_ref2) {
@@ -108,12 +98,6 @@ function AdditionalModule(_ref) {
108
98
  } else {
109
99
  Toast.fail(locales.getText('pisell2.text.order-no-payment-cannot-send-link'));
110
100
  }
111
- } else if (key === 'print-receipt') {
112
- handleButtonClick('print-receipt');
113
- } else if (key === 'split-payment') {
114
- handleButtonClick('split-payment');
115
- } else if (key === 'print-receipt') {
116
- handleButtonClick('print-receipt');
117
101
  }
118
102
  }
119
103
  },
@@ -134,29 +118,9 @@ function AdditionalModule(_ref) {
134
118
  type: "pisell2-dots-vertical",
135
119
  size: 20
136
120
  })
137
- }))), !showMore && /*#__PURE__*/React.createElement("div", {
138
- className: "additional-module-button-row"
139
- }, /*#__PURE__*/React.createElement(Button, {
140
- className: "additional-module-button-base purple-theme",
141
- onClick: function onClick() {
142
- handleButtonClick('send-link');
143
- },
144
- disabled: disabled,
145
- size: "large",
146
- icon: /*#__PURE__*/React.createElement(LinkOutlined, null)
147
- }, locales.getText('pisell2.text.send-link')), /*#__PURE__*/React.createElement(Button, {
148
- className: "additional-module-button-base purple-theme",
149
- onClick: function onClick() {
150
- handleButtonClick('print-receipt');
151
- },
152
- disabled: disabled,
153
- size: "large",
154
- icon: /*#__PURE__*/React.createElement(Icon, {
155
- type: "pisell2-printer"
156
- })
157
- }, locales.getText('pisell2.text.print-receipt')))) :
121
+ })))) :
158
122
  /*#__PURE__*/
159
- // Flex布局模式:一行布局(不显示现金支付模块或强制全宽时)
123
+ // Flex布局模式:一行布局(不显示现金支付模块时)
160
124
  React.createElement("div", {
161
125
  className: "additional-module-button-row"
162
126
  }, /*#__PURE__*/React.createElement(Button, {
@@ -176,14 +140,14 @@ function AdditionalModule(_ref) {
176
140
  }))), /*#__PURE__*/React.createElement(Button, {
177
141
  className: "additional-module-button-base purple-theme",
178
142
  onClick: function onClick() {
179
- handleButtonClick('split-payment');
143
+ handleButtonClick('print-receipt');
180
144
  },
181
145
  size: "large",
182
146
  icon: /*#__PURE__*/React.createElement(Icon, {
183
- type: "pisell2-coins-01",
147
+ type: "pisell2-printer",
184
148
  className: "additional-module-button-icon"
185
149
  })
186
- }, locales.getText('split.payment')), /*#__PURE__*/React.createElement(Button, {
150
+ }, locales.getText('pisell2.text.print-receipt')), /*#__PURE__*/React.createElement(Button, {
187
151
  className: "additional-module-button-base purple-theme",
188
152
  onClick: function onClick() {
189
153
  handleButtonClick('manual-discount');
@@ -215,10 +179,6 @@ function AdditionalModule(_ref) {
215
179
  } else {
216
180
  Toast.fail(locales.getText('pisell2.text.order-no-payment-cannot-send-link'));
217
181
  }
218
- } else if (key === 'split-payment') {
219
- handleButtonClick('split-payment');
220
- } else if (key === 'print-receipt') {
221
- handleButtonClick('print-receipt');
222
182
  }
223
183
  }
224
184
  },
@@ -9,7 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
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
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import { useState, useEffect, useMemo } from 'react';
12
- import { Button, Dropdown } from 'antd';
12
+ import { Button, Dropdown, Popover } from 'antd';
13
13
  import { CheckCircleOutlined, PieChartOutlined } from '@ant-design/icons';
14
14
  import { Edit05 } from '@pisell/icon';
15
15
  import { PisellModal } from '@pisell/materials';
@@ -18,8 +18,7 @@ import Decimal from 'decimal.js';
18
18
  import checkoutLocales from "../../locales";
19
19
  import PaymentDetailModal from "../PaymentDetailModal";
20
20
  import PisellPriceKeyboardPopover from "../../../../pro/pisellSimplePriceKeyboardPopover";
21
- // import { PaymentKeyboard } from '../../../../pro/priceKeyboard';
22
-
21
+ import { PaymentKeyboard } from "../../../../pro/priceKeyboard";
23
22
  import "./index.less";
24
23
  import classNames from 'classnames';
25
24
  import useEngineContext from "../../../../hooks/useEngineContext";
@@ -504,12 +503,12 @@ function AmountSummary(_ref2) {
504
503
  var syncedVoucherAmount = paymentItems === null || paymentItems === void 0 ? void 0 : paymentItems.reduce(function (acc, item) {
505
504
  // 如果当前是普通支付,则减去order_payment_type不为 deposit的支付项
506
505
  // 如果当前是定金支付,则减去order_payment_type为 deposit的支付项
507
- if ((item.isSynced || item.voucher_id) && (paymentType === 'regular' && item.order_payment_type !== 'deposit' || paymentType === 'deposit' && item.order_payment_type === 'deposit')) {
506
+ if (item.isSynced && (paymentType === 'regular' && item.order_payment_type !== 'deposit' || paymentType === 'deposit' && item.order_payment_type === 'deposit')) {
508
507
  return acc.plus(item.amount).plus(Number(item.rounding_amount) > 0 ? 0 : item.rounding_amount || 0);
509
508
  }
510
509
  return acc;
511
510
  }, new Decimal(0)).toNumber();
512
- balanceDecimal = new Decimal(Math.abs(balanceDecimal.minus(new Decimal(syncedVoucherAmount)).toNumber()));
511
+ balanceDecimal = balanceDecimal.minus(syncedVoucherAmount);
513
512
  // if (walletPassData?.selectedDiscountList && walletPassData.selectedDiscountList.length > 0) {
514
513
  // walletPassData?.availableDiscountList?.forEach((discountItem: any) => {
515
514
  // discountItem.appliedProductDetails?.forEach((productDetail: any) => {
@@ -640,9 +639,8 @@ function AmountSummary(_ref2) {
640
639
  return balanceDueAmount !== customAmount && Number(balanceDueAmount) > 0 && Number(customAmount) > 0;
641
640
  }, [customAmount, balanceDueAmount]);
642
641
  var handleChangeDepositAmount = function handleChangeDepositAmount(value) {
643
- var valueStr = String(value);
644
- console.log('handleChangeDepositAmount', valueStr);
645
- checkoutModule === null || checkoutModule === void 0 || checkoutModule.setDepositAmountAsync(valueStr);
642
+ console.log('handleChangeDepositAmount', value);
643
+ checkoutModule === null || checkoutModule === void 0 || checkoutModule.setDepositAmountAsync(value);
646
644
  };
647
645
  var hasDepositPayment = useMemo(function () {
648
646
  return paymentItems === null || paymentItems === void 0 ? void 0 : paymentItems.some(function (item) {
@@ -780,7 +778,76 @@ function AmountSummary(_ref2) {
780
778
  hideDecimalForWholeNumbers: false,
781
779
  useThousandsSeparator: true,
782
780
  showCurrencySymbol: true
783
- })))), /*#__PURE__*/React.createElement(PisellModal, {
781
+ })))), !shouldShowConfirmMode() && (showCancelSplitPayment ? /*#__PURE__*/React.createElement(Button, {
782
+ className: classNames('cancel-split-payment-button'),
783
+ onClick: function onClick() {
784
+ return onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(balanceDueAmount);
785
+ }
786
+ }, getText('split.cancel') || '取消部\n分支付') : /*#__PURE__*/React.createElement(Popover, {
787
+ content: /*#__PURE__*/React.createElement("div", {
788
+ onClick: function onClick(e) {
789
+ return e.stopPropagation();
790
+ }
791
+ }, /*#__PURE__*/React.createElement(PaymentKeyboard
792
+ // 原始值:此支付阶段的待支付金额,reset时还原为此值
793
+ , {
794
+ paymentOriginalValue: balanceDueAmount,
795
+ paymentDefaultValue: String(customAmount || 0),
796
+ enableExceedMaxAmount: false,
797
+ payment: {
798
+ enable: true
799
+ },
800
+ surcharge: {
801
+ enable: false
802
+ },
803
+ surchargeDefaultValue: {
804
+ percent: '0',
805
+ fixed: '0'
806
+ },
807
+ selectType: "light",
808
+ onChange: function onChange(value) {
809
+ console.log(value);
810
+ },
811
+ doneText: getText('confirm'),
812
+ onPay: function onPay(args) {
813
+ console.log(args);
814
+ // 处理支付逻辑
815
+ setIsKeyboardVisible(false);
816
+ handleKeyboardConfirm(args.amount);
817
+ }
818
+ })),
819
+ trigger: "click",
820
+ open: isKeyboardVisible,
821
+ onOpenChange: setIsKeyboardVisible,
822
+ placement: "bottom",
823
+ overlayClassName: "payment-keyboard-popover",
824
+ arrow: true,
825
+ destroyTooltipOnHide: true
826
+ }, /*#__PURE__*/React.createElement(Button, {
827
+ className: classNames('split-payment-button')
828
+ }, getText('split.payment') || '拆分支付')))
829
+ // <PisellPriceKeyboardPopover
830
+ // value={(() => {
831
+ // try {
832
+ // return new Decimal(currentAmount || '0').toNumber();
833
+ // } catch {
834
+ // return 0;
835
+ // }
836
+ // })()}
837
+ // // onChange={handleKeyboardConfirm}
838
+ // onConfirm={handleKeyboardConfirm}
839
+ // // onCancel={handleKeyboardCancel}
840
+ // showCurrencySymbol={true}
841
+ // useThousandsSeparator={false}
842
+ // selectType="dark"
843
+ // overlayClassName="amount-summary-keyboard-popover"
844
+ // >
845
+ // {/* 右侧: 拆分支付按钮 */}
846
+ // <Button className={classNames('split-payment-button')}>
847
+ // {getText('split.payment') || '拆分支付'}
848
+ // </Button>
849
+ // </PisellPriceKeyboardPopover>
850
+ , /*#__PURE__*/React.createElement(PisellModal, {
784
851
  open: isPaymentDetailOpen,
785
852
  onCancel: handlePaymentDetailClose,
786
853
  footer: null,
@@ -226,7 +226,7 @@
226
226
  border-radius: 16px;
227
227
  padding: 0 16px 0 16px;
228
228
  color: #1a1a1a;
229
- width: 400px;
229
+ width: 350px;
230
230
  min-width: 200px;
231
231
  height: 80px;
232
232
  display: flex;
@@ -248,6 +248,7 @@
248
248
 
249
249
  .balance-due-label {
250
250
  font-size: 16px;
251
+ color: #7f56da;
251
252
  font-weight: 400;
252
253
  line-height: 1.5;
253
254
  margin-bottom: 4px;
@@ -255,7 +256,7 @@
255
256
 
256
257
  .balance-due-amount {
257
258
  font-size: 14px;
258
- font-weight: 600;
259
+ font-weight: 400;
259
260
  color: #7f56da;
260
261
  line-height: 0.75;
261
262
  text-decoration: underline;
@@ -271,13 +272,13 @@
271
272
  .pay-text {
272
273
  font-size: 16px;
273
274
  font-weight: 500;
275
+ color: #7f56da;
274
276
  letter-spacing: 0.09375em;
275
- margin-top: 12px;
276
277
  }
277
278
 
278
279
  .pay-amount {
279
- font-size: 36px;
280
- font-weight: 600;
280
+ font-size: 32px;
281
+ font-weight: 400;
281
282
  color: #1e1830;
282
283
  line-height: 0.75;
283
284
  }
@@ -15,12 +15,10 @@ export interface CashPaymentModuleProps {
15
15
  balanceDueAmount?: string;
16
16
  balanceDueTotalAmount?: string;
17
17
  syncingLock?: boolean;
18
- shortcutsSize?: 'default' | 'large';
19
18
  }
20
19
  export declare function CashPaymentModule({ amountSymbol, orderInfo, onPaymentComplete, customAmount, amountButtons, // 按钮列表,默认5个推荐金额
21
20
  disabled, // 禁用状态
22
21
  roundingFunction, balanceDueAmount, // 当前阶段剩余支付金额(定金或普通支付)
23
22
  balanceDueTotalAmount, // 完整订单剩余待付金额
24
- syncingLock, // 是否锁定
25
- shortcutsSize, }: CashPaymentModuleProps): React.JSX.Element;
23
+ syncingLock, }: CashPaymentModuleProps): React.JSX.Element;
26
24
  export default CashPaymentModule;