@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
@@ -50,6 +50,7 @@ var import_WalletPassModule = __toESM(require("./components/WalletPassModule"));
50
50
  var import_PaymentOptionsModule = __toESM(require("./components/PaymentOptionsModule"));
51
51
  var import_CashPaymentModule = __toESM(require("./components/CashPaymentModule"));
52
52
  var import_AdditionalModule = __toESM(require("./components/AdditionalModule"));
53
+ var import_amount = require("../booking/components/footer/amount");
53
54
  var import_PaymentResultToast = require("./components/PaymentResultToast");
54
55
  var import_PaymentResultToastUtils = require("./utils/PaymentResultToastUtils");
55
56
  var import_icon = require("@pisell/icon");
@@ -81,6 +82,8 @@ var PaymentContent = (0, import_react.forwardRef)(
81
82
  onPaymentComplete,
82
83
  onPaymentCancel,
83
84
  onStatusChange,
85
+ dispatch,
86
+ state,
84
87
  showingCashToastRef,
85
88
  onToastClose,
86
89
  orderNote,
@@ -96,17 +99,9 @@ var PaymentContent = (0, import_react.forwardRef)(
96
99
  generateActionButtons,
97
100
  paymentResultToastConfig,
98
101
  updateOrderInfo,
99
- setCurrentEditOrderId,
100
- config,
101
- paymentResultDisplayMode,
102
- shopDiscount,
103
- client,
104
- currentTotalPrice,
105
- onChangeShopDiscount,
106
- onChangeOrderNote,
107
- onDeleteOrderNote,
108
- config: any
102
+ setCurrentEditOrderId
109
103
  }, ref) => {
104
+ var _a, _b, _c;
110
105
  const context = (0, import_useEngineContext.default)();
111
106
  const utils = context.appHelper.utils || {};
112
107
  const { pisellos, getData, pisellosAllModule, interaction } = utils;
@@ -118,18 +113,12 @@ var PaymentContent = (0, import_react.forwardRef)(
118
113
  const [balanceDueAmount, setBalanceDueAmount] = (0, import_react.useState)("");
119
114
  const [balanceDueTotalAmount, setBalanceDueTotalAmount] = (0, import_react.useState)("");
120
115
  const [recommendAmounts, setRecommendAmounts] = (0, import_react.useState)([]);
121
- const [showSplitPaymentKeyboard, setShowSplitPaymentKeyboard] = (0, import_react.useState)(false);
122
116
  const paymentMethodsRef = (0, import_react.useRef)(null);
123
117
  const [paymentMethods, setPaymentMethods] = (0, import_react.useState)([]);
124
118
  const [showCashPayment, setShowCashPayment] = (0, import_react.useState)(false);
125
119
  const [paymentOptionsTitle, setPaymentOptionsTitle] = (0, import_react.useState)(
126
120
  import_utils.locales.getText("cards.and.digitals") || "Cards & Digitals"
127
121
  );
128
- const paymentOptionList = (0, import_react.useMemo)(() => {
129
- return paymentMethods.filter(
130
- (item) => !(item.type === "app" && item.code === "EFTPOS_LINKLY") && (["custom"].includes(item.type) || import_PaymentOptionsModule.SHOW_METHODS_CODE.includes(item.code))
131
- );
132
- }, [paymentMethods]);
133
122
  const clientChangedRef = (0, import_react.useRef)(false);
134
123
  const walletPassRef = (0, import_react.useRef)(null);
135
124
  const [paymentItems, setPaymentItems] = (0, import_react.useState)([]);
@@ -160,11 +149,11 @@ var PaymentContent = (0, import_react.forwardRef)(
160
149
  };
161
150
  }, [paymentMethods]);
162
151
  const handleAddCashPayment = async (result) => {
163
- var _a, _b;
152
+ var _a2, _b2;
164
153
  const cashPaymentMethod = paymentMethods.find(
165
154
  (method) => {
166
- var _a2;
167
- return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((_a2 = method.name) == null ? void 0 : _a2.toLowerCase().includes("cash"));
155
+ var _a3;
156
+ return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((_a3 = method.name) == null ? void 0 : _a3.toLowerCase().includes("cash"));
168
157
  }
169
158
  );
170
159
  logger == null ? void 0 : logger.addLog({
@@ -172,7 +161,7 @@ var PaymentContent = (0, import_react.forwardRef)(
172
161
  title: "open_till",
173
162
  metadata: {}
174
163
  });
175
- (_b = (_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.postMessageToApp) == null ? void 0 : _b.call(_a, {
164
+ (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
176
165
  module: "till",
177
166
  key: "open_till",
178
167
  data: {
@@ -185,7 +174,7 @@ var PaymentContent = (0, import_react.forwardRef)(
185
174
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
186
175
  code: cashPaymentMethod == null ? void 0 : cashPaymentMethod.code,
187
176
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
188
- custom_payment_id: cashPaymentMethod == null ? void 0 : cashPaymentMethod.id,
177
+ id: cashPaymentMethod == null ? void 0 : cashPaymentMethod.id,
189
178
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
190
179
  name: cashPaymentMethod == null ? void 0 : cashPaymentMethod.name,
191
180
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
@@ -206,7 +195,7 @@ var PaymentContent = (0, import_react.forwardRef)(
206
195
  return surcharge;
207
196
  };
208
197
  const onPaymentOptionClick = async (method) => {
209
- var _a, _b, _c, _d, _e;
198
+ var _a2, _b2, _c2, _d, _e;
210
199
  if (syncingLock) return;
211
200
  const { id, code, name, type } = method || {};
212
201
  const finalAmount = method.totalAmount ?? customAmount;
@@ -227,7 +216,7 @@ var PaymentContent = (0, import_react.forwardRef)(
227
216
  let data;
228
217
  const isSynced = await checkoutModule.isCurrentOrderSynced();
229
218
  if (!isSynced) {
230
- (_a = Toast == null ? void 0 : Toast.loading) == null ? void 0 : _a.call(Toast, "", 0);
219
+ (_a2 = Toast == null ? void 0 : Toast.loading) == null ? void 0 : _a2.call(Toast, "", 0);
231
220
  data = await checkoutModule.manualSyncOrderAsync();
232
221
  } else {
233
222
  const orderId = await checkoutModule.getCurrentOrderId();
@@ -235,7 +224,7 @@ var PaymentContent = (0, import_react.forwardRef)(
235
224
  orderId
236
225
  };
237
226
  }
238
- (_b = paymentMethodsRef.current) == null ? void 0 : _b.onPay(payType, {
227
+ (_b2 = paymentMethodsRef.current) == null ? void 0 : _b2.onPay(payType, {
239
228
  source: "normal",
240
229
  data: {
241
230
  payMethod: { id, code, name, type },
@@ -255,7 +244,7 @@ var PaymentContent = (0, import_react.forwardRef)(
255
244
  // 支付金额
256
245
  code,
257
246
  // 支付类型code
258
- custom_payment_id: id,
247
+ id,
259
248
  // 支付类型id
260
249
  name,
261
250
  // 支付类型name
@@ -297,7 +286,7 @@ var PaymentContent = (0, import_react.forwardRef)(
297
286
  percentage: (method == null ? void 0 : method.percentage) || "0"
298
287
  };
299
288
  }
300
- if (method.type === "custom" && ((_c = method.metadata) == null ? void 0 : _c.order_open_cash_drawer)) {
289
+ if (method.type === "custom" && ((_c2 = method.metadata) == null ? void 0 : _c2.order_open_cash_drawer)) {
301
290
  logger == null ? void 0 : logger.addLog({
302
291
  type: "info",
303
292
  title: "open_till",
@@ -317,7 +306,7 @@ var PaymentContent = (0, import_react.forwardRef)(
317
306
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
318
307
  code: method.code,
319
308
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
320
- custom_payment_id: method.id,
309
+ id: method.id,
321
310
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
322
311
  name: method.name,
323
312
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
@@ -330,7 +319,7 @@ var PaymentContent = (0, import_react.forwardRef)(
330
319
  }
331
320
  };
332
321
  (0, import_react.useEffect)(() => {
333
- var _a;
322
+ var _a2;
334
323
  if (checkoutModule && orderInfo && isModalOpen) {
335
324
  try {
336
325
  const currentAmount = checkoutModule.getStateAmount();
@@ -341,7 +330,7 @@ var PaymentContent = (0, import_react.forwardRef)(
341
330
  const currentNote = checkoutModule.getOrderNote();
342
331
  if (currentNote) {
343
332
  setOrderNote(currentNote);
344
- } else if ((_a = cartData == null ? void 0 : cartData.order_info) == null ? void 0 : _a.order_note) {
333
+ } else if ((_a2 = cartData == null ? void 0 : cartData.order_info) == null ? void 0 : _a2.order_note) {
345
334
  setOrderNote(cartData.order_info.order_note);
346
335
  }
347
336
  }
@@ -395,21 +384,21 @@ var PaymentContent = (0, import_react.forwardRef)(
395
384
  const unsubscribe = core.effects.on(
396
385
  CheckoutHooks.OnStateAmountChanged,
397
386
  executeIfActive(async (data) => {
398
- var _a, _b;
387
+ var _a2, _b2;
399
388
  console.log(
400
389
  `Amount changed from ${data.oldAmount} to ${data.newAmount}`
401
390
  );
402
391
  if (clientChangedRef.current) {
403
392
  clientChangedRef.current = false;
404
393
  if (data.newAmount !== data.oldAmount) {
405
- (_a = Toast == null ? void 0 : Toast.success) == null ? void 0 : _a.call(
394
+ (_a2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _a2.call(
406
395
  Toast,
407
396
  import_utils.locales.getText(
408
397
  "pisell2.checkout.client-card.tip.wallet-updated"
409
398
  )
410
399
  );
411
400
  } else {
412
- (_b = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b.call(
401
+ (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
413
402
  Toast,
414
403
  import_utils.locales.getText(
415
404
  "pisell2.checkout.client-card.tip.client-changed"
@@ -431,21 +420,23 @@ var PaymentContent = (0, import_react.forwardRef)(
431
420
  );
432
421
  const orderSubmitStartUnsubscribe = core.effects.on(
433
422
  CheckoutHooks.OnOrderSubmitStart,
434
- executeIfActive(() => {
435
- var _a;
436
- setSyncingLock(true);
437
- (_a = Toast == null ? void 0 : Toast.loading) == null ? void 0 : _a.call(Toast, "", 0);
438
- })
423
+ executeIfActive(
424
+ () => {
425
+ var _a2;
426
+ setSyncingLock(true);
427
+ (_a2 = Toast == null ? void 0 : Toast.loading) == null ? void 0 : _a2.call(Toast, "", 0);
428
+ }
429
+ )
439
430
  );
440
431
  const orderSubmitEndUnsubscribe = core.effects.on(
441
432
  CheckoutHooks.OnOrderSubmitEnd,
442
433
  executeIfActive((res) => {
443
- var _a, _b;
434
+ var _a2, _b2;
444
435
  setSyncingLock(false);
445
436
  if (res.success) {
446
- (_a = Toast == null ? void 0 : Toast.hide) == null ? void 0 : _a.call(Toast);
437
+ (_a2 = Toast == null ? void 0 : Toast.hide) == null ? void 0 : _a2.call(Toast);
447
438
  } else {
448
- (_b = Toast == null ? void 0 : Toast.hide) == null ? void 0 : _b.call(Toast);
439
+ (_b2 = Toast == null ? void 0 : Toast.hide) == null ? void 0 : _b2.call(Toast);
449
440
  if (onOrderSyncFailed) {
450
441
  onOrderSyncFailed();
451
442
  } else {
@@ -459,7 +450,7 @@ var PaymentContent = (0, import_react.forwardRef)(
459
450
  const orderPaymentAddedUnsubscribe = core.effects.on(
460
451
  CheckoutHooks.OnOrderPaymentAdded,
461
452
  executeIfActive(async (data) => {
462
- var _a, _b;
453
+ var _a2, _b2;
463
454
  console.log("orderPaymentAddedUnsubscribe>>>>", data);
464
455
  const orderInfo2 = checkoutModule.getCurrentOrderInfo();
465
456
  updateOrderInfo == null ? void 0 : updateOrderInfo(orderInfo2);
@@ -473,9 +464,9 @@ var PaymentContent = (0, import_react.forwardRef)(
473
464
  let totalAmount2 = new import_decimal.default(orderInfo2.isDeposit ? orderInfo2.depositAmount : orderInfo2.totalAmount);
474
465
  if (paymentItems2.length > 0 && paymentItems2.filter((n) => n.isSynced).some((item) => item.service_charge || item.rounding_amount)) {
475
466
  const serviceChargeTotal = paymentItems2.reduce((acc, item) => {
476
- var _a2, _b2;
477
- const chargeAmount = new import_decimal.default(((_a2 = item.service_charge) == null ? void 0 : _a2.amount) || 0);
478
- const chargePercentage = new import_decimal.default(((_b2 = item.service_charge) == null ? void 0 : _b2.percentage) || 0);
467
+ var _a3, _b3;
468
+ const chargeAmount = new import_decimal.default(((_a3 = item.service_charge) == null ? void 0 : _a3.amount) || 0);
469
+ const chargePercentage = new import_decimal.default(((_b3 = item.service_charge) == null ? void 0 : _b3.percentage) || 0);
479
470
  const itemAmount = new import_decimal.default(item.amount || 0);
480
471
  let itemServiceCharge = chargeAmount.add(chargePercentage.mul(itemAmount));
481
472
  console.log(itemServiceCharge);
@@ -484,12 +475,6 @@ var PaymentContent = (0, import_react.forwardRef)(
484
475
  totalAmount2 = totalAmount2.add(serviceChargeTotal);
485
476
  }
486
477
  console.log(totalAmount2, paymentItems2);
487
- const isToastMode = paymentResultDisplayMode !== "modal";
488
- if (!isToastMode) {
489
- autoCloseConfig.autoClose = false;
490
- autoCloseConfig.autoCloseDelay = 0;
491
- autoCloseConfig.maskClosable = false;
492
- }
493
478
  await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
494
479
  {
495
480
  paymentStatus: "partially_paid",
@@ -518,7 +503,7 @@ var PaymentContent = (0, import_react.forwardRef)(
518
503
  title: "open_till",
519
504
  metadata: {}
520
505
  });
521
- (_b = (_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.postMessageToApp) == null ? void 0 : _b.call(_a, {
506
+ (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
522
507
  module: "till",
523
508
  key: "open_till",
524
509
  data: {
@@ -582,7 +567,7 @@ var PaymentContent = (0, import_react.forwardRef)(
582
567
  [checkoutModule]
583
568
  );
584
569
  const handleWalletPassConfirmPay = async (action) => {
585
- var _a, _b;
570
+ var _a2, _b2;
586
571
  if (action === "save-without-deduct") {
587
572
  await checkoutModule.updateVoucherPaymentItemsAsync([]);
588
573
  } else if (action === "cancel") {
@@ -600,7 +585,7 @@ var PaymentContent = (0, import_react.forwardRef)(
600
585
  updateOrderInfo == null ? void 0 : updateOrderInfo(orderInfo2);
601
586
  return;
602
587
  }
603
- const responseData = (_a = result.response) == null ? void 0 : _a.data;
588
+ const responseData = (_a2 = result.response) == null ? void 0 : _a2.data;
604
589
  console.log("print_order_onOrderSynced>>>>", result);
605
590
  try {
606
591
  const params = {
@@ -609,7 +594,7 @@ var PaymentContent = (0, import_react.forwardRef)(
609
594
  data: {
610
595
  order_id: responseData.order_id,
611
596
  machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
612
- small_ticket_data: (_b = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b.small_ticket_data,
597
+ small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data,
613
598
  machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
614
599
  }
615
600
  };
@@ -654,26 +639,67 @@ var PaymentContent = (0, import_react.forwardRef)(
654
639
  return walletPassRef.current.handleSearchIdentificationCode(keyword);
655
640
  }
656
641
  }, []);
642
+ const getDataFromHost = () => {
643
+ try {
644
+ const is_price_include_tax = getData("is_price_include_tax");
645
+ const tax_rate = getData("tax_rate") || "10";
646
+ const tax_title = getData("tax_title") || "GST";
647
+ const surcharge_list = getData("surcharge_list");
648
+ const schedule_list = getData("schedule_list");
649
+ let scheduleById = {};
650
+ if (Array.isArray(schedule_list)) {
651
+ for (let item of schedule_list) {
652
+ scheduleById[item.id] = item;
653
+ }
654
+ }
655
+ return {
656
+ is_price_include_tax,
657
+ tax_rate,
658
+ tax_title,
659
+ surcharge_list,
660
+ schedule_list,
661
+ scheduleById
662
+ };
663
+ } catch (error) {
664
+ console.error(error);
665
+ return {};
666
+ }
667
+ };
668
+ const currentTotalPrice = (0, import_react.useMemo)(() => {
669
+ if (!showPriceAdjustModal) return 0;
670
+ const { ScheduleModule } = pisellosAllModule;
671
+ try {
672
+ const { productAmount } = (0, import_amount.getSumTotal)(state, {
673
+ isEdit: true,
674
+ ScheduleModule,
675
+ ...getDataFromHost()
676
+ });
677
+ return productAmount;
678
+ } catch (error) {
679
+ console.error("计算总价失败:", error);
680
+ return 0;
681
+ }
682
+ }, [state, showPriceAdjustModal]);
657
683
  const currentTotalPriceAfterDiscount = (0, import_react.useMemo)(() => {
658
- return new import_decimal.default(currentTotalPrice || 0).minus(shopDiscount || 0).toNumber();
659
- }, [shopDiscount, currentTotalPrice]);
684
+ return new import_decimal.default(currentTotalPrice).minus(state.shop_discount || 0).toNumber();
685
+ }, [state.shop_discount, currentTotalPrice]);
660
686
  const handleSelectWalletChange = (0, import_ahooks.useMemoizedFn)(
661
687
  async (select) => {
662
688
  if (walletPassDetail.isShow) {
663
689
  const voucherItems = [];
664
690
  select.forEach((item) => {
665
- var _a, _b, _c, _d;
691
+ var _a2, _b2, _c2, _d;
666
692
  const mapCode = item.code ? import_constants.WALLET_PASS_CODE_MAP[item.code] : null;
667
693
  if (mapCode && walletPassDetail.map[mapCode]) {
668
694
  voucherItems.push({
669
695
  /** 支付金额 */
670
696
  amount: item.amount,
671
697
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
672
- code: (_a = walletPassDetail.map[mapCode]) == null ? void 0 : _a.code,
698
+ code: (_a2 = walletPassDetail.map[mapCode]) == null ? void 0 : _a2.code,
673
699
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
674
- id: Number((_b = walletPassDetail.map[mapCode]) == null ? void 0 : _b.id) || 0,
700
+ id: Number((_b2 = walletPassDetail.map[mapCode]) == null ? void 0 : _b2.id) || 0,
675
701
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
676
- name: (_c = walletPassDetail.map[mapCode]) == null ? void 0 : _c.name,
702
+ name: (_c2 = walletPassDetail.map[mapCode]) == null ? void 0 : _c2.name,
677
703
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
678
704
  type: (_d = walletPassDetail.map[mapCode]) == null ? void 0 : _d.type,
679
705
  /** 代金券、充值卡、积分卡等wallet pass id */
@@ -697,7 +723,14 @@ var PaymentContent = (0, import_react.forwardRef)(
697
723
  const handlePriceAdjustConfirm = async (discountAmount) => {
698
724
  try {
699
725
  if (checkoutModule && (orderInfo == null ? void 0 : orderInfo.totalAmount)) {
700
- onChangeShopDiscount == null ? void 0 : onChangeShopDiscount(discountAmount);
726
+ if (dispatch) {
727
+ dispatch({
728
+ type: "setState",
729
+ payload: {
730
+ shop_discount: discountAmount
731
+ }
732
+ });
733
+ }
701
734
  }
702
735
  } catch (error) {
703
736
  console.error("Failed to adjust price:", error);
@@ -705,7 +738,7 @@ var PaymentContent = (0, import_react.forwardRef)(
705
738
  setShowPriceAdjustModal(false);
706
739
  };
707
740
  const handleButtonClick = async (key) => {
708
- var _a;
741
+ var _a2;
709
742
  console.log("handleButtonClick", key);
710
743
  switch (key) {
711
744
  case "order-note":
@@ -714,9 +747,6 @@ var PaymentContent = (0, import_react.forwardRef)(
714
747
  case "send-link":
715
748
  setPaymentLinkModalOpen(true);
716
749
  break;
717
- case "split-payment":
718
- setShowSplitPaymentKeyboard(true);
719
- break;
720
750
  case "print-receipt":
721
751
  let data;
722
752
  const isSynced = await checkoutModule.isCurrentOrderSynced();
@@ -771,7 +801,7 @@ var PaymentContent = (0, import_react.forwardRef)(
771
801
  setShowPriceAdjustModal(true);
772
802
  break;
773
803
  case "save-pay-later":
774
- (_a = savePayLaterHandlerRef.current) == null ? void 0 : _a.handleSavePayLaterClick();
804
+ (_a2 = savePayLaterHandlerRef.current) == null ? void 0 : _a2.handleSavePayLaterClick();
775
805
  break;
776
806
  }
777
807
  };
@@ -779,7 +809,8 @@ var PaymentContent = (0, import_react.forwardRef)(
779
809
  handleButtonClick
780
810
  }));
781
811
  const getCustomerInfo = () => {
782
- var _a;
812
+ var _a2, _b2;
813
+ const client = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
783
814
  const getValidName = (value) => {
784
815
  return value !== void 0 && value !== null && String(value).trim() !== "" ? String(value).trim() : null;
785
816
  };
@@ -789,7 +820,7 @@ var PaymentContent = (0, import_react.forwardRef)(
789
820
  id: client == null ? void 0 : client.id,
790
821
  nickname: (client == null ? void 0 : client.nickname) || import_utils.locales.getText("pisell2.checkout.customer.default-name"),
791
822
  display_name: displayName,
792
- email: (client == null ? void 0 : client.email) || ((_a = client == null ? void 0 : client.contacts) == null ? void 0 : _a.email) || ""
823
+ email: (client == null ? void 0 : client.email) || ((_b2 = client == null ? void 0 : client.contacts) == null ? void 0 : _b2.email) || ""
793
824
  };
794
825
  };
795
826
  const handleSendCustomerPaymentLink = async (data) => {
@@ -818,20 +849,19 @@ var PaymentContent = (0, import_react.forwardRef)(
818
849
  }
819
850
  };
820
851
  const searchAndClientProps = (0, import_react.useMemo)(() => {
821
- return {
822
- disabledSwitch: (config == null ? void 0 : config.disabledSwitchClient) || false
823
- };
824
- }, [paymentItems, config]);
825
- console.log(searchAndClientProps, "searchAndClientProps");
852
+ if ((paymentItems == null ? void 0 : paymentItems.length) > 0) {
853
+ return {
854
+ disabledSwitch: true
855
+ };
856
+ }
857
+ return {};
858
+ }, [paymentItems]);
826
859
  const roundingFunction = async (amount) => {
827
860
  const res = await checkoutModule.roundAmountAsync(amount);
828
861
  return res;
829
862
  };
830
863
  const handleModalClick = (0, import_react.useCallback)((event) => {
831
- const isToastMode = paymentResultDisplayMode !== "modal";
832
- if (isToastMode) {
833
- (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
834
- }
864
+ (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
835
865
  }, []);
836
866
  return /* @__PURE__ */ import_react.default.createElement(
837
867
  "div",
@@ -865,7 +895,7 @@ var PaymentContent = (0, import_react.forwardRef)(
865
895
  moduleConfig.showWalletPass && /* @__PURE__ */ import_react.default.createElement(
866
896
  import_WalletPassModule.default,
867
897
  {
868
- clientId: client == null ? void 0 : client.id,
898
+ clientId: (_b = (_a = state == null ? void 0 : state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id,
869
899
  customAmount: balanceDueAmount,
870
900
  orderInfo: orderInfo || void 0,
871
901
  ref: walletPassRef,
@@ -877,7 +907,7 @@ var PaymentContent = (0, import_react.forwardRef)(
877
907
  /* @__PURE__ */ import_react.default.createElement(
878
908
  import_AmountSummary.default,
879
909
  {
880
- amountSymbol: getData("shop_symbol"),
910
+ amountSymbol: state.amountSymbol,
881
911
  orderInfo: orderInfo || void 0,
882
912
  cartData,
883
913
  open_deposit,
@@ -885,7 +915,7 @@ var PaymentContent = (0, import_react.forwardRef)(
885
915
  balanceDueAmount,
886
916
  paymentItems,
887
917
  walletPassData,
888
- clientInfo: client,
918
+ clientInfo: (_c = state == null ? void 0 : state.client) == null ? void 0 : _c.value,
889
919
  onAmountChange: handleAmountChange,
890
920
  onDepositStatusChange: handleDepositStatusChange,
891
921
  onBalanceDueAmountClick: handleButtonClick,
@@ -903,7 +933,7 @@ var PaymentContent = (0, import_react.forwardRef)(
903
933
  {
904
934
  style: showCashPayment ? {
905
935
  gridColumn: "1",
906
- gridRow: (paymentOptionList == null ? void 0 : paymentOptionList.length) === 1 ? "span 2" : "1"
936
+ gridRow: "1"
907
937
  } : {}
908
938
  },
909
939
  /* @__PURE__ */ import_react.default.createElement(
@@ -919,24 +949,23 @@ var PaymentContent = (0, import_react.forwardRef)(
919
949
  customAmount,
920
950
  roundingFunction,
921
951
  balanceDueAmount,
922
- balanceDueTotalAmount,
923
- shortcutsSize: (paymentOptionList == null ? void 0 : paymentOptionList.length) === 3 || (paymentOptionList == null ? void 0 : paymentOptionList.length) === 1 ? "large" : "default"
952
+ balanceDueTotalAmount
924
953
  }
925
954
  )
926
955
  ),
927
- moduleConfig.showPaymentOptions && (paymentOptionList == null ? void 0 : paymentOptionList.length) > 0 && /* @__PURE__ */ import_react.default.createElement(
956
+ moduleConfig.showPaymentOptions && /* @__PURE__ */ import_react.default.createElement(
928
957
  "div",
929
958
  {
930
959
  className: showCashPayment ? "" : "payment-options-module-container",
931
960
  style: showCashPayment ? {
932
961
  gridColumn: "2",
933
- gridRow: (paymentOptionList == null ? void 0 : paymentOptionList.length) > 3 ? "1 / 3" : "1"
962
+ gridRow: "1 / 3"
934
963
  } : {}
935
964
  },
936
965
  /* @__PURE__ */ import_react.default.createElement(
937
966
  import_PaymentOptionsModule.default,
938
967
  {
939
- amountSymbol: getData("shop_symbol"),
968
+ amountSymbol: state.amountSymbol,
940
969
  orderInfo: orderInfo || void 0,
941
970
  onClick: onPaymentOptionClick,
942
971
  paymentMethods,
@@ -952,8 +981,8 @@ var PaymentContent = (0, import_react.forwardRef)(
952
981
  {
953
982
  className: showCashPayment ? "" : "additional-module-container",
954
983
  style: showCashPayment ? {
955
- gridColumn: (paymentOptionList == null ? void 0 : paymentOptionList.length) > 3 ? "1" : (paymentOptionList == null ? void 0 : paymentOptionList.length) <= 1 ? "2" : "span 2",
956
- gridRow: (paymentOptionList == null ? void 0 : paymentOptionList.length) === 0 ? "1" : "2"
984
+ gridColumn: "1",
985
+ gridRow: "2"
957
986
  } : {}
958
987
  },
959
988
  /* @__PURE__ */ import_react.default.createElement(
@@ -964,9 +993,7 @@ var PaymentContent = (0, import_react.forwardRef)(
964
993
  handleButtonClick,
965
994
  hasOrderNote: !!orderNote && orderNote.trim().length > 0,
966
995
  disabled: isOrderFree,
967
- showCashPayment,
968
- isFullWidth: !((paymentOptionList == null ? void 0 : paymentOptionList.length) > 3 || (paymentOptionList == null ? void 0 : paymentOptionList.length) <= 1),
969
- showMore: !(showCashPayment && (paymentOptionList == null ? void 0 : paymentOptionList.length) === 0)
996
+ showCashPayment
970
997
  }
971
998
  )
972
999
  )
@@ -998,7 +1025,6 @@ var PaymentContent = (0, import_react.forwardRef)(
998
1025
  open: showPriceAdjustModal,
999
1026
  onCancel: () => setShowPriceAdjustModal(false)
1000
1027
  },
1001
- tips: import_utils.locales.getText("pisell2.checkout.modal.price-adjustment-tips") || "Changing amount will update order total",
1002
1028
  selectType: "dark",
1003
1029
  originalValue: currentTotalPrice,
1004
1030
  defaultValue: currentTotalPriceAfterDiscount,
@@ -1012,43 +1038,10 @@ var PaymentContent = (0, import_react.forwardRef)(
1012
1038
  import_SavePayLaterHandler.default,
1013
1039
  {
1014
1040
  ref: savePayLaterHandlerRef,
1015
- amountSymbol: getData("shop_symbol"),
1041
+ amountSymbol: state.amountSymbol,
1016
1042
  walletPassData,
1017
1043
  onSavePayLater: handleSavePayLater
1018
1044
  }
1019
- ),
1020
- /* @__PURE__ */ import_react.default.createElement(
1021
- import_priceKeyboard.PaymentKeyboard,
1022
- {
1023
- containerProps: {
1024
- renderType: "modal",
1025
- open: showSplitPaymentKeyboard,
1026
- onCancel: () => setShowSplitPaymentKeyboard(false)
1027
- },
1028
- paymentOriginalValue: balanceDueAmount,
1029
- paymentDefaultValue: String(customAmount || 0),
1030
- enableExceedMaxAmount: false,
1031
- payment: {
1032
- enable: true
1033
- },
1034
- surcharge: {
1035
- enable: false
1036
- },
1037
- surchargeDefaultValue: {
1038
- percent: "0",
1039
- fixed: "0"
1040
- },
1041
- selectType: "light",
1042
- onChange: (value) => {
1043
- console.log(value);
1044
- },
1045
- doneText: import_utils.locales.getText("confirm") || "确认",
1046
- onPay: (args) => {
1047
- console.log(args);
1048
- setShowSplitPaymentKeyboard(false);
1049
- handleAmountChange(String(args.amount));
1050
- }
1051
- }
1052
1045
  )
1053
1046
  );
1054
1047
  }
@@ -1058,19 +1051,10 @@ var PaymentModal = ({
1058
1051
  data,
1059
1052
  callback,
1060
1053
  onClose,
1054
+ dispatch,
1055
+ state,
1061
1056
  setEditCartMode,
1062
- editOrderId,
1063
- paymentResultDisplayMode,
1064
- shopDiscount,
1065
- client,
1066
- currentTotalPrice,
1067
- onChangeShopDiscount,
1068
- onChangeOrderNote,
1069
- onDeleteOrderNote,
1070
- config = {
1071
- showHeaderCenter: true,
1072
- showHeaderRightButton: true
1073
- }
1057
+ editOrderId
1074
1058
  }) => {
1075
1059
  var _a, _b, _c, _d, _e, _f, _g, _h;
1076
1060
  const context = (0, import_useEngineContext.default)();
@@ -1084,7 +1068,6 @@ var PaymentModal = ({
1084
1068
  const [actualShowCashPayment, setActualShowCashPayment] = (0, import_react.useState)(true);
1085
1069
  const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
1086
1070
  const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
1087
- const [showCreateErrorModal, setShowCreateErrorModal] = (0, import_react.useState)(false);
1088
1071
  const [currentEditOrderId, setCurrentEditOrderId] = (0, import_react.useState)(editOrderId || 0);
1089
1072
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
1090
1073
  const Toast = (0, import_materials.useToast)();
@@ -1179,7 +1162,15 @@ var PaymentModal = ({
1179
1162
  import_utils.locales.getText("pisell2.checkout.order-note.updated-successfully")
1180
1163
  );
1181
1164
  }
1182
- onChangeOrderNote == null ? void 0 : onChangeOrderNote(noteValue);
1165
+ if (dispatch) {
1166
+ dispatch({
1167
+ type: "setNotes",
1168
+ payload: {
1169
+ orderNote: noteValue,
1170
+ edit: true
1171
+ }
1172
+ });
1173
+ }
1183
1174
  if (noteModalSource === "payment-result-toast") {
1184
1175
  console.log("Note added from payment result toast");
1185
1176
  } else if (noteModalSource === "payment-content") {
@@ -1204,7 +1195,15 @@ var PaymentModal = ({
1204
1195
  import_utils.locales.getText("pisell2.checkout.order-note.deleted-successfully")
1205
1196
  );
1206
1197
  }
1207
- onDeleteOrderNote == null ? void 0 : onDeleteOrderNote();
1198
+ if (dispatch) {
1199
+ dispatch({
1200
+ type: "setNotes",
1201
+ payload: {
1202
+ orderNote: "",
1203
+ edit: true
1204
+ }
1205
+ });
1206
+ }
1208
1207
  } catch (error) {
1209
1208
  console.error("Failed to delete order note:", error);
1210
1209
  Toast == null ? void 0 : Toast.error(
@@ -1395,7 +1394,7 @@ var PaymentModal = ({
1395
1394
  }
1396
1395
  }
1397
1396
  }
1398
- )), (config == null ? void 0 : config.showHeaderCenter) && /* @__PURE__ */ import_react.default.createElement("div", { className: "header__center" }, translation("order.total"), ":", (0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, getData("shop_symbol"))), (config == null ? void 0 : config.showHeaderRightButton) && /* @__PURE__ */ import_react.default.createElement("div", { className: "header__right" }, /* @__PURE__ */ import_react.default.createElement(
1397
+ )), /* @__PURE__ */ import_react.default.createElement("div", { className: "header__center" }, translation("order.total"), ":", (0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, state == null ? void 0 : state.amountSymbol)), /* @__PURE__ */ import_react.default.createElement("div", { className: "header__right" }, /* @__PURE__ */ import_react.default.createElement(
1399
1398
  import_antd.Button,
1400
1399
  {
1401
1400
  size: "small",
@@ -1434,15 +1433,13 @@ var PaymentModal = ({
1434
1433
  shop_wallet_pass_id
1435
1434
  });
1436
1435
  const newData = (0, import_lodash.cloneDeep)(data);
1437
- const existPayment = newData.existPayment;
1438
1436
  if (editOrderId || currentEditOrderId) {
1439
1437
  await checkout.updateLocalOrderAsync({
1440
1438
  orderId: editOrderId || currentEditOrderId,
1441
1439
  orderData: newData.order_info,
1442
1440
  cartSummary: (_a2 = newData.subtotal_info) == null ? void 0 : _a2.subTotalList,
1443
1441
  autoPayment: true,
1444
- totalInfo: newData.subtotal_info,
1445
- existPayment
1442
+ totalInfo: newData.subtotal_info
1446
1443
  });
1447
1444
  } else {
1448
1445
  logger == null ? void 0 : logger.addLog({
@@ -1556,12 +1553,6 @@ var PaymentModal = ({
1556
1553
  }));
1557
1554
  }
1558
1555
  const orderInfo3 = checkout.getCurrentOrderInfo();
1559
- const isToastMode = paymentResultDisplayMode !== "modal";
1560
- if (!isToastMode) {
1561
- autoCloseConfig.autoClose = false;
1562
- autoCloseConfig.autoCloseDelay = 0;
1563
- autoCloseConfig.maskClosable = false;
1564
- }
1565
1556
  await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
1566
1557
  {
1567
1558
  paymentStatus,
@@ -1636,7 +1627,6 @@ var PaymentModal = ({
1636
1627
  error
1637
1628
  }
1638
1629
  });
1639
- setShowCreateErrorModal(true);
1640
1630
  }
1641
1631
  };
1642
1632
  if (data) {
@@ -1658,9 +1648,10 @@ var PaymentModal = ({
1658
1648
  getData,
1659
1649
  interaction,
1660
1650
  Toast,
1651
+ state,
1661
1652
  onToastClose: handleToastClose
1662
1653
  };
1663
- const generateActionButtons = (paymentStatus, enabledAutoPrint = false) => {
1654
+ const generateActionButtons = (paymentStatus, enabledAutoPrint) => {
1664
1655
  const getClassName = (suffix) => `payment-result-toast-${suffix}`;
1665
1656
  const handleDetailsClick = async () => {
1666
1657
  var _a2;
@@ -2010,13 +2001,8 @@ var PaymentModal = ({
2010
2001
  orderInfo,
2011
2002
  onPaymentComplete: handlePaymentComplete,
2012
2003
  onPaymentCancel: handlePaymentCancel,
2013
- paymentResultDisplayMode,
2014
- shopDiscount,
2015
- client,
2016
- currentTotalPrice,
2017
- onChangeShopDiscount,
2018
- onChangeOrderNote,
2019
- onDeleteOrderNote,
2004
+ dispatch,
2005
+ state,
2020
2006
  showingCashToastRef,
2021
2007
  onToastClose: handleToastClose,
2022
2008
  orderNote,
@@ -2032,8 +2018,7 @@ var PaymentModal = ({
2032
2018
  generateActionButtons,
2033
2019
  paymentResultToastConfig,
2034
2020
  updateOrderInfo: (orderInfo2) => setOrderInfo(orderInfo2),
2035
- setCurrentEditOrderId: (orderId) => setCurrentEditOrderId(orderId),
2036
- config
2021
+ setCurrentEditOrderId: (orderId) => setCurrentEditOrderId(orderId)
2037
2022
  }
2038
2023
  )
2039
2024
  ), noteModalOpen && (0, import_react_dom.createPortal)(
@@ -2074,34 +2059,6 @@ var PaymentModal = ({
2074
2059
  },
2075
2060
  import_utils.locales.getText("retry") || "重试"
2076
2061
  ))
2077
- ), /* @__PURE__ */ import_react.default.createElement(
2078
- import_materials.PisellContainer,
2079
- {
2080
- renderType: "modal",
2081
- props: {
2082
- open: showCreateErrorModal,
2083
- title: import_utils.locales.getText("pisell2.checkout.tips"),
2084
- footer: null,
2085
- keyboard: false,
2086
- onCancel: () => {
2087
- setShowCreateErrorModal(false);
2088
- }
2089
- // 禁用关闭
2090
- }
2091
- },
2092
- /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "center", padding: "20px" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: "16px", fontSize: "16px" } }, import_utils.locales.getText("pisell2.checkout.order-create-failed")), /* @__PURE__ */ import_react.default.createElement(
2093
- import_antd.Button,
2094
- {
2095
- type: "primary",
2096
- size: "large",
2097
- onClick: () => {
2098
- setShowCreateErrorModal(false);
2099
- window.location.reload();
2100
- },
2101
- style: { width: "100%", marginTop: "80px" }
2102
- },
2103
- import_utils.locales.getText("confirm") || "确认"
2104
- ))
2105
2062
  ));
2106
2063
  };
2107
2064
  var PaymentModal_default = PaymentModal;