@pisell/private-materials 6.4.35 → 6.4.36

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 (407) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  16. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  17. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  18. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  19. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  20. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  21. package/es/components/booking/components/actionButtons/index.js +2 -2
  22. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  23. package/es/components/booking/components/customiseItemModal/index.js +2 -2
  24. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  25. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  26. package/es/components/booking/components/footer/index.js +48 -42
  27. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  28. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  29. package/es/components/booking/forms/footer.d.ts +0 -1
  30. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  31. package/es/components/booking/forms/single/index.d.ts +0 -1
  32. package/es/components/booking/forms/table/index.d.ts +0 -1
  33. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  34. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  35. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  36. package/es/components/booking/info/date/index.d.ts +0 -1
  37. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  38. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  39. package/es/components/booking/info/notes/index.d.ts +0 -1
  40. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  41. package/es/components/booking/info/service/like/index.d.ts +0 -1
  42. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  43. package/es/components/booking/info2/cartClientCard/index.js +1 -2
  44. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  45. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  46. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  47. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  48. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  49. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  50. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  51. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  52. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  53. package/es/components/checkout/PaymentModal.js +716 -434
  54. package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -1
  55. package/es/components/checkout/components/AdditionalModule/index.js +80 -49
  56. package/es/components/checkout/components/AdditionalModule/index.less +33 -34
  57. package/es/components/checkout/components/AdditionalModule/locales.d.ts +3 -0
  58. package/es/components/checkout/components/AdditionalModule/locales.js +7 -4
  59. package/es/components/checkout/components/AmountSummary/index.d.ts +2 -1
  60. package/es/components/checkout/components/AmountSummary/index.js +69 -31
  61. package/es/components/checkout/components/AmountSummary/index.less +27 -9
  62. package/es/components/checkout/components/CashPaymentModule/index.less +0 -2
  63. package/es/components/checkout/components/PaymentDetailModal/index.js +55 -10
  64. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -1
  65. package/es/components/checkout/components/PaymentOptionsModule/index.js +40 -25
  66. package/es/components/checkout/components/PaymentOptionsModule/index.less +11 -6
  67. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +42 -9
  68. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +512 -82
  69. package/es/components/checkout/components/PaymentResultToast/index.d.ts +2 -1
  70. package/es/components/checkout/components/PaymentResultToast/index.js +90 -35
  71. package/es/components/checkout/components/PaymentResultToast/index.less +445 -77
  72. package/es/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
  73. package/es/components/checkout/components/PaymentResultToast/utils.d.ts +26 -0
  74. package/es/components/checkout/components/PaymentResultToast/utils.js +81 -2
  75. package/es/components/checkout/components/SearchAndClientModule/index.js +17 -16
  76. package/es/components/checkout/components/SearchAndClientModule/index.less +29 -8
  77. package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +3 -1
  78. package/es/components/checkout/components/WalletPassModule/index.less +3 -3
  79. package/es/components/checkout/hooks/useWalletPass.js +1 -1
  80. package/es/components/checkout/index.d.ts +1 -1
  81. package/es/components/checkout/index.js +1 -1
  82. package/es/components/checkout/index.less +56 -38
  83. package/es/components/checkout/locales.d.ts +6 -0
  84. package/es/components/checkout/locales.js +9 -3
  85. package/es/components/checkout/payment-modal-utils.js +5 -5
  86. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +3 -3
  87. package/es/components/checkout/utils/PaymentResultToastUtils.js +111 -72
  88. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  89. package/es/components/eftpos/form/index.d.ts +0 -1
  90. package/es/components/eftpos/group/index.d.ts +0 -1
  91. package/es/components/eftpos/hooks.d.ts +0 -1
  92. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  93. package/es/components/eftpos/icon/device.d.ts +0 -1
  94. package/es/components/eftpos/index.d.ts +0 -1
  95. package/es/components/eftpos/pos.d.ts +0 -1
  96. package/es/components/eftpos/receipt/index.d.ts +0 -1
  97. package/es/components/eftposPay/amount.d.ts +0 -1
  98. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  99. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  100. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  101. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  102. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  103. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  104. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  105. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  106. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  107. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  108. package/es/components/eftposPay/pay.d.ts +0 -1
  109. package/es/components/eftposPay/payo/config.d.ts +0 -1
  110. package/es/components/eftposPay/tip.d.ts +0 -1
  111. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  112. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  113. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  114. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  115. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  116. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  117. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  118. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  119. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  120. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  121. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  122. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  123. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  124. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  125. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  126. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  127. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  128. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  129. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  130. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  131. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  132. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  133. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  134. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  135. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  136. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  137. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  138. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  139. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  140. package/es/components/login/index.d.ts +0 -1
  141. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  142. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  143. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  144. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  145. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  146. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  147. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  148. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  149. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  150. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  151. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  152. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  153. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  154. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  155. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  156. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  157. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  158. package/es/components/schedules/calendar/index.d.ts +0 -1
  159. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  160. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  161. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  162. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  163. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  164. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  165. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  166. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  167. package/es/components/schedules/products/index.d.ts +0 -1
  168. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  169. package/es/components/schedules/products/list/index.d.ts +0 -1
  170. package/es/components/schedules/resources/index.d.ts +0 -1
  171. package/es/components/schedules/resources/list/index.d.ts +0 -1
  172. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  173. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  174. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  175. package/es/components/schedules/schedules/index.d.ts +0 -1
  176. package/es/components/schedules/utils.d.ts +1 -1
  177. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  178. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  179. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  180. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  181. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  182. package/es/components/shoppingCart/index.d.ts +0 -1
  183. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -3
  184. package/es/components/ticketBooking/components/bookingDataPanel/index.js +1 -1
  185. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  186. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  187. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +1 -1
  188. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +1 -1
  189. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +1 -1
  190. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  191. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  192. package/es/plus/clientCard/index.js +3 -2
  193. package/es/plus/clientCard/index.less +3 -32
  194. package/es/plus/clientName/index.d.ts +0 -1
  195. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
  196. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
  197. package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  198. package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
  199. package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
  200. package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
  201. package/es/plus/saasRegister/components/Header.d.ts +0 -1
  202. package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
  203. package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  204. package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
  205. package/es/pro/comprehensiveSearch/components/searchSection/index.js +9 -12
  206. package/es/pro/comprehensiveSearch/components/searchSection/index.less +22 -19
  207. package/es/pro/pisellPhoneKeyboard/index.d.ts +0 -1
  208. package/es/utils/index.d.ts +1 -1
  209. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  210. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  211. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  212. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  213. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  214. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  215. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  216. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  217. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  218. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  219. package/lib/components/booking/components/actionButtons/index.js +2 -1
  220. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  221. package/lib/components/booking/components/customiseItemModal/index.js +2 -2
  222. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  223. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  224. package/lib/components/booking/components/footer/index.js +3 -0
  225. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  226. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  227. package/lib/components/booking/forms/footer.d.ts +0 -1
  228. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  229. package/lib/components/booking/forms/single/index.d.ts +0 -1
  230. package/lib/components/booking/forms/table/index.d.ts +0 -1
  231. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  232. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  233. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  234. package/lib/components/booking/info/date/index.d.ts +0 -1
  235. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  236. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  237. package/lib/components/booking/info/notes/index.d.ts +0 -1
  238. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  239. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  240. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  241. package/lib/components/booking/info2/cartClientCard/index.js +1 -2
  242. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  243. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  244. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  245. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  246. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  247. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  248. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  249. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  250. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  251. package/lib/components/checkout/PaymentModal.js +218 -93
  252. package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -1
  253. package/lib/components/checkout/components/AdditionalModule/index.js +98 -34
  254. package/lib/components/checkout/components/AdditionalModule/index.less +33 -34
  255. package/lib/components/checkout/components/AdditionalModule/locales.d.ts +3 -0
  256. package/lib/components/checkout/components/AdditionalModule/locales.js +7 -4
  257. package/lib/components/checkout/components/AmountSummary/index.d.ts +2 -1
  258. package/lib/components/checkout/components/AmountSummary/index.js +103 -47
  259. package/lib/components/checkout/components/AmountSummary/index.less +27 -9
  260. package/lib/components/checkout/components/CashPaymentModule/index.less +0 -2
  261. package/lib/components/checkout/components/PaymentDetailModal/index.js +56 -11
  262. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -1
  263. package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -8
  264. package/lib/components/checkout/components/PaymentOptionsModule/index.less +11 -6
  265. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +42 -9
  266. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +279 -73
  267. package/lib/components/checkout/components/PaymentResultToast/index.d.ts +2 -1
  268. package/lib/components/checkout/components/PaymentResultToast/index.js +69 -22
  269. package/lib/components/checkout/components/PaymentResultToast/index.less +445 -77
  270. package/lib/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
  271. package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +26 -0
  272. package/lib/components/checkout/components/PaymentResultToast/utils.js +58 -4
  273. package/lib/components/checkout/components/SearchAndClientModule/index.js +17 -15
  274. package/lib/components/checkout/components/SearchAndClientModule/index.less +29 -8
  275. package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +12 -2
  276. package/lib/components/checkout/components/WalletPassModule/index.less +3 -3
  277. package/lib/components/checkout/hooks/useWalletPass.js +2 -2
  278. package/lib/components/checkout/index.d.ts +1 -1
  279. package/lib/components/checkout/index.js +2 -0
  280. package/lib/components/checkout/index.less +56 -38
  281. package/lib/components/checkout/locales.d.ts +6 -0
  282. package/lib/components/checkout/locales.js +9 -3
  283. package/lib/components/checkout/payment-modal-utils.js +5 -5
  284. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +3 -3
  285. package/lib/components/checkout/utils/PaymentResultToastUtils.js +26 -18
  286. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  287. package/lib/components/eftpos/form/index.d.ts +0 -1
  288. package/lib/components/eftpos/group/index.d.ts +0 -1
  289. package/lib/components/eftpos/hooks.d.ts +0 -1
  290. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  291. package/lib/components/eftpos/icon/device.d.ts +0 -1
  292. package/lib/components/eftpos/index.d.ts +0 -1
  293. package/lib/components/eftpos/pos.d.ts +0 -1
  294. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  295. package/lib/components/eftposPay/amount.d.ts +0 -1
  296. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  297. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  298. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  299. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  300. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  301. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  302. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  303. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  304. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  305. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  306. package/lib/components/eftposPay/pay.d.ts +0 -1
  307. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  308. package/lib/components/eftposPay/tip.d.ts +0 -1
  309. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  310. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  311. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  312. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  313. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  314. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  315. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  316. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  317. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  318. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  319. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  320. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  321. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  322. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  323. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  324. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  325. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  326. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  327. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  328. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  329. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  330. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  331. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  332. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  333. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  334. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  335. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  336. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  337. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  338. package/lib/components/login/index.d.ts +0 -1
  339. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  340. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  341. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  342. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  343. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  344. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  345. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  346. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  347. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  348. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  349. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  350. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  351. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  352. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  353. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  354. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  355. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  356. package/lib/components/schedules/calendar/index.d.ts +0 -1
  357. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  358. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  359. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  360. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  361. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  362. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  363. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  364. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  365. package/lib/components/schedules/products/index.d.ts +0 -1
  366. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  367. package/lib/components/schedules/products/list/index.d.ts +0 -1
  368. package/lib/components/schedules/resources/index.d.ts +0 -1
  369. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  370. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  371. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  372. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  373. package/lib/components/schedules/schedules/index.d.ts +0 -1
  374. package/lib/components/schedules/utils.d.ts +1 -1
  375. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  376. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  377. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  378. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  379. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  380. package/lib/components/shoppingCart/index.d.ts +0 -1
  381. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -6
  382. package/lib/components/ticketBooking/components/bookingDataPanel/index.js +2 -2
  383. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -1
  384. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  385. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +2 -12
  386. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +2 -12
  387. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +2 -12
  388. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  389. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  390. package/lib/plus/clientCard/index.js +5 -4
  391. package/lib/plus/clientCard/index.less +3 -32
  392. package/lib/plus/clientName/index.d.ts +0 -1
  393. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
  394. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
  395. package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  396. package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
  397. package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
  398. package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
  399. package/lib/plus/saasRegister/components/Header.d.ts +0 -1
  400. package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
  401. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  402. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
  403. package/lib/pro/comprehensiveSearch/components/searchSection/index.js +6 -18
  404. package/lib/pro/comprehensiveSearch/components/searchSection/index.less +22 -19
  405. package/lib/pro/pisellPhoneKeyboard/index.d.ts +0 -1
  406. package/lib/utils/index.d.ts +1 -1
  407. package/package.json +12 -12
@@ -37,9 +37,9 @@ var import_utils = require("@pisell/utils");
37
37
  var import_locales = require("../../utils/locales");
38
38
  var import_ahooks = require("ahooks");
39
39
  var import_react_dom = require("react-dom");
40
+ var import_react_dom2 = __toESM(require("react-dom"));
40
41
  var import_locales2 = __toESM(require("./locales"));
41
42
  var import_materials = require("@pisell/materials");
42
- var import_materials2 = require("@pisell/materials");
43
43
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
44
44
  var import_noteModal = __toESM(require("../../plus/noteModal"));
45
45
  var import_SendPaymentLinkModal = __toESM(require("./components/SendPaymentLinkModal"));
@@ -55,9 +55,7 @@ var import_PaymentResultToastUtils = require("./utils/PaymentResultToastUtils");
55
55
  var import_icon = require("@pisell/icon");
56
56
  var import_styles = require("./styles");
57
57
  var import_paymentMethods = __toESM(require("../pay/toB/paymentMethods"));
58
- var import_components = require("../../pro/comprehensiveSearch/components");
59
58
  var import_SearchAndClientModule = __toESM(require("./components/SearchAndClientModule"));
60
- var import_useToast = __toESM(require("../../hooks/useToast"));
61
59
  var import_index = require("./index.less");
62
60
  var import_constants = require("./constants");
63
61
  var import_lodash = require("lodash");
@@ -101,7 +99,7 @@ var PaymentContent = (0, import_react.forwardRef)(
101
99
  const context = (0, import_useEngineContext.default)();
102
100
  const utils = context.appHelper.utils || {};
103
101
  const { pisellos, getData, pisellosAllModule, interaction } = utils;
104
- const Toast = (0, import_useToast.default)();
102
+ const Toast = (0, import_materials.useToast)();
105
103
  const checkoutRef = (0, import_react.useRef)(null);
106
104
  const savePayLaterHandlerRef = (0, import_react.useRef)(null);
107
105
  const [customAmount, setCustomAmount] = (0, import_react.useState)("");
@@ -399,7 +397,7 @@ var PaymentContent = (0, import_react.forwardRef)(
399
397
  );
400
398
  const orderPaymentAddedUnsubscribe = core.effects.on(
401
399
  CheckoutHooks.OnOrderPaymentAdded,
402
- (data) => {
400
+ async (data) => {
403
401
  var _a2, _b2;
404
402
  console.log("orderPaymentAddedUnsubscribe>>>>", data);
405
403
  const balanceDueAmount2 = checkoutModule.getBalanceDueAmount();
@@ -409,7 +407,7 @@ var PaymentContent = (0, import_react.forwardRef)(
409
407
  false
410
408
  );
411
409
  const orderInfo2 = checkoutModule.getCurrentOrderInfo();
412
- (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
410
+ await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
413
411
  {
414
412
  paymentStatus: "partially_paid",
415
413
  orderTotalAmount: orderInfo2.totalAmount,
@@ -508,7 +506,7 @@ var PaymentContent = (0, import_react.forwardRef)(
508
506
  return;
509
507
  }
510
508
  const result = await checkoutModule.manualSyncOrderAsync();
511
- showSuccessToast == null ? void 0 : showSuccessToast(result);
509
+ await (showSuccessToast == null ? void 0 : showSuccessToast(result));
512
510
  if (result.success) {
513
511
  const responseData = (_a2 = result.response) == null ? void 0 : _a2.data;
514
512
  console.log("print_order_onOrderSynced>>>>", result);
@@ -529,6 +527,7 @@ var PaymentContent = (0, import_react.forwardRef)(
529
527
  } catch (error) {
530
528
  console.error("print_order_onOrderSynced_error>>>>", error);
531
529
  }
530
+ onPaymentCancel(true);
532
531
  }
533
532
  };
534
533
  const handleSavePayLater = (0, import_react.useCallback)(
@@ -546,7 +545,6 @@ var PaymentContent = (0, import_react.forwardRef)(
546
545
  const res = await checkoutModule.saveForLaterPaymentAsync();
547
546
  if (res.success) {
548
547
  onPaymentCancel(true);
549
- (0, import_PaymentResultToast.closePaymentResultToast)();
550
548
  }
551
549
  }
552
550
  },
@@ -787,35 +785,49 @@ var PaymentContent = (0, import_react.forwardRef)(
787
785
  const res = await checkoutModule.roundAmountAsync(amount);
788
786
  return res;
789
787
  };
788
+ const handleModalClick = (0, import_react.useCallback)((event) => {
789
+ (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
790
+ }, []);
790
791
  return /* @__PURE__ */ import_react.default.createElement(
791
792
  "div",
792
793
  {
793
794
  ref: checkoutRef,
795
+ ...{ onClick: handleModalClick },
794
796
  style: {
795
797
  ...import_styles.checkoutStyles.container,
796
798
  maxHeight: dynamicMaxHeight
797
799
  }
798
800
  },
799
801
  /* @__PURE__ */ import_react.default.createElement(
800
- import_SearchAndClientModule.default,
801
- {
802
- onClientChange: () => {
803
- clientChangedRef.current = true;
804
- },
805
- onSearch: handleSearch,
806
- ...searchAndClientProps
807
- }
808
- ),
809
- moduleConfig.showWalletPass && /* @__PURE__ */ import_react.default.createElement(
810
- import_WalletPassModule.default,
802
+ "div",
811
803
  {
812
- clientId: (_b = (_a = state == null ? void 0 : state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id,
813
- customAmount,
814
- orderInfo: orderInfo || void 0,
815
- ref: walletPassRef,
816
- paymentItems,
817
- onSelectChange: handleSelectWalletChange
818
- }
804
+ style: {
805
+ padding: "12px 16px",
806
+ border: "1px solid #d0d5dd",
807
+ borderRadius: 8
808
+ }
809
+ },
810
+ /* @__PURE__ */ import_react.default.createElement(
811
+ import_SearchAndClientModule.default,
812
+ {
813
+ onClientChange: () => {
814
+ clientChangedRef.current = true;
815
+ },
816
+ onSearch: handleSearch,
817
+ ...searchAndClientProps
818
+ }
819
+ ),
820
+ moduleConfig.showWalletPass && /* @__PURE__ */ import_react.default.createElement(
821
+ import_WalletPassModule.default,
822
+ {
823
+ clientId: (_b = (_a = state == null ? void 0 : state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id,
824
+ customAmount,
825
+ orderInfo: orderInfo || void 0,
826
+ ref: walletPassRef,
827
+ paymentItems,
828
+ onSelectChange: handleSelectWalletChange
829
+ }
830
+ )
819
831
  ),
820
832
  /* @__PURE__ */ import_react.default.createElement(
821
833
  import_AmountSummary.default,
@@ -831,6 +843,7 @@ var PaymentContent = (0, import_react.forwardRef)(
831
843
  clientInfo: (_c = state == null ? void 0 : state.client) == null ? void 0 : _c.value,
832
844
  onAmountChange: handleAmountChange,
833
845
  onDepositStatusChange: handleDepositStatusChange,
846
+ onBalanceDueAmountClick: handleButtonClick,
834
847
  onConfirm: handleWalletPassConfirmPay,
835
848
  totalAmount
836
849
  }
@@ -880,7 +893,8 @@ var PaymentContent = (0, import_react.forwardRef)(
880
893
  paymentMethods,
881
894
  customAmount,
882
895
  title: paymentOptionsTitle,
883
- disabled: isOrderFree
896
+ disabled: isOrderFree,
897
+ showCashPayment
884
898
  }
885
899
  )
886
900
  ),
@@ -946,7 +960,7 @@ var PaymentContent = (0, import_react.forwardRef)(
946
960
  ) || "Close price adjustment modal"
947
961
  }
948
962
  ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-price-adjust-container" }, /* @__PURE__ */ import_react.default.createElement(
949
- import_materials2.PisellAdjustPrice,
963
+ import_materials.PisellAdjustPrice,
950
964
  {
951
965
  selectType: "dark",
952
966
  originValue: currentTotalPrice,
@@ -994,14 +1008,14 @@ var PaymentModal = ({
994
1008
  const [actualShowCashPayment, setActualShowCashPayment] = (0, import_react.useState)(true);
995
1009
  const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
996
1010
  const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
997
- const Toast = (0, import_useToast.default)();
1011
+ const Toast = (0, import_materials.useToast)();
998
1012
  const handleRetry = async () => {
999
1013
  const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
1000
1014
  const res = await (checkoutModule == null ? void 0 : checkoutModule.manualSyncOrderAsync());
1001
1015
  console.log(res);
1002
1016
  if (res.success) {
1003
1017
  setShowRetryModal(false);
1004
- showSuccessToast == null ? void 0 : showSuccessToast(res);
1018
+ await (showSuccessToast == null ? void 0 : showSuccessToast(res));
1005
1019
  }
1006
1020
  };
1007
1021
  (0, import_react.useEffect)(() => {
@@ -1018,6 +1032,29 @@ var PaymentModal = ({
1018
1032
  window.removeEventListener("orientationchange", updateHeight);
1019
1033
  };
1020
1034
  }, []);
1035
+ (0, import_react.useEffect)(() => {
1036
+ var _a2;
1037
+ const initTillButtonData = async () => {
1038
+ var _a3, _b2;
1039
+ console.log("准备获取tillButton数据");
1040
+ try {
1041
+ const tillButtonData = await ((_b2 = (_a3 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a3.asyncDataManager) == null ? void 0 : _b2.call(_a3, {
1042
+ module: "get",
1043
+ key: "till_button"
1044
+ }));
1045
+ console.log("获取tillButton数据成功", tillButtonData);
1046
+ if (tillButtonData) {
1047
+ (0, import_PaymentResultToast.setTillButton)(tillButtonData);
1048
+ console.log("PaymentModal: tillButton data set successfully", tillButtonData);
1049
+ }
1050
+ } catch (error) {
1051
+ console.error("PaymentModal: Failed to get till_button from asyncDataManager:", error);
1052
+ }
1053
+ };
1054
+ if ((_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.asyncDataManager) {
1055
+ initTillButtonData();
1056
+ }
1057
+ }, [interaction]);
1021
1058
  const dynamicMaxHeight = (0, import_react.useMemo)(() => {
1022
1059
  if (windowHeight === 0) return "600px";
1023
1060
  const bodyTransform = getComputedStyle(document.body).transform;
@@ -1119,8 +1156,105 @@ var PaymentModal = ({
1119
1156
  const currentPaymentResultRef = import_react.default.useRef(null);
1120
1157
  const paymentContentRef = import_react.default.useRef(null);
1121
1158
  const handleOrderNoteClickFromToast = () => {
1122
- setNoteModalSource("payment-result-toast");
1123
- setNoteModalOpen(true);
1159
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
1160
+ const modalContainer = document.createElement("div");
1161
+ document.body.appendChild(modalContainer);
1162
+ const showToast = (type, message) => {
1163
+ if (Toast && Toast[type]) {
1164
+ Toast[type](message);
1165
+ } else {
1166
+ if (type === "success") {
1167
+ console.log("✅ Success:", message);
1168
+ } else {
1169
+ console.error("❌ Error:", message);
1170
+ }
1171
+ }
1172
+ };
1173
+ const handleNoteConfirm2 = async (noteValue) => {
1174
+ var _a3;
1175
+ try {
1176
+ const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
1177
+ const orderId = checkoutModule == null ? void 0 : checkoutModule.getCurrentOrderId();
1178
+ if (checkoutModule && orderId) {
1179
+ await ((_a3 = checkoutModule.editOrderNoteByOrderIdAsync) == null ? void 0 : _a3.call(checkoutModule, orderId, noteValue));
1180
+ setOrderNote(noteValue);
1181
+ showToast("success", import_utils.locales.getText("pisell2.checkout.order-note.updated-successfully"));
1182
+ }
1183
+ } catch (error) {
1184
+ console.error("Failed to update order note:", error);
1185
+ showToast("error", import_utils.locales.getText("pisell2.checkout.order-note.update-failed"));
1186
+ }
1187
+ import_react_dom2.default.unmountComponentAtNode(modalContainer);
1188
+ if (document.body.contains(modalContainer)) {
1189
+ document.body.removeChild(modalContainer);
1190
+ }
1191
+ };
1192
+ const handleNoteDelete2 = async () => {
1193
+ var _a3;
1194
+ try {
1195
+ const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
1196
+ const orderId = checkoutModule == null ? void 0 : checkoutModule.getCurrentOrderId();
1197
+ if (checkoutModule && orderId) {
1198
+ await ((_a3 = checkoutModule.editOrderNoteByOrderIdAsync) == null ? void 0 : _a3.call(checkoutModule, orderId, ""));
1199
+ setOrderNote("");
1200
+ showToast("success", import_utils.locales.getText("pisell2.checkout.order-note.deleted-successfully"));
1201
+ }
1202
+ } catch (error) {
1203
+ console.error("Failed to delete order note:", error);
1204
+ showToast("error", import_utils.locales.getText("pisell2.checkout.order-note.delete-failed"));
1205
+ }
1206
+ import_react_dom2.default.unmountComponentAtNode(modalContainer);
1207
+ if (document.body.contains(modalContainer)) {
1208
+ document.body.removeChild(modalContainer);
1209
+ }
1210
+ };
1211
+ const handleNoteCancel2 = () => {
1212
+ import_react_dom2.default.unmountComponentAtNode(modalContainer);
1213
+ if (document.body.contains(modalContainer)) {
1214
+ document.body.removeChild(modalContainer);
1215
+ }
1216
+ };
1217
+ const currentLocale = ((_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils) == null ? void 0 : _a2.getApp) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.locales) == null ? void 0 : _d2.getLocale) == null ? void 0 : _e2.call(_d2)) || ((_g2 = (_f2 = context.appHelper.utils) == null ? void 0 : _f2.storage) == null ? void 0 : _g2.get("umi_locale")) || "en";
1218
+ const EngineContextProvider = ({ children }) => {
1219
+ var _a3;
1220
+ const tempEngineContext = {
1221
+ ...context,
1222
+ engine: {
1223
+ ...context.engine,
1224
+ props: {
1225
+ ...(_a3 = context.engine) == null ? void 0 : _a3.props,
1226
+ locale: currentLocale
1227
+ }
1228
+ }
1229
+ };
1230
+ const TempContext = import_react.default.createContext(tempEngineContext);
1231
+ const originalContext = window.__injectedContext;
1232
+ window.__injectedContext = tempEngineContext;
1233
+ import_react.default.useEffect(() => {
1234
+ return () => {
1235
+ window.__injectedContext = originalContext;
1236
+ };
1237
+ }, []);
1238
+ return /* @__PURE__ */ import_react.default.createElement(TempContext.Provider, { value: tempEngineContext }, children);
1239
+ };
1240
+ import_react_dom2.default.render(
1241
+ /* @__PURE__ */ import_react.default.createElement(EngineContextProvider, null, /* @__PURE__ */ import_react.default.createElement(import_materials.ConfigProvider, { prefixCls: "pisell-lowcode", theme: {
1242
+ token: {
1243
+ colorPrimary: "#7F56DA"
1244
+ }
1245
+ } }, /* @__PURE__ */ import_react.default.createElement(
1246
+ import_noteModal.default,
1247
+ {
1248
+ open: true,
1249
+ title: import_utils.locales.getText("pisell2.text.add-order-notes"),
1250
+ value: orderNote,
1251
+ onConfirm: handleNoteConfirm2,
1252
+ onDelete: handleNoteDelete2,
1253
+ onCancel: handleNoteCancel2
1254
+ }
1255
+ ))),
1256
+ modalContainer
1257
+ );
1124
1258
  };
1125
1259
  const translation = (key, fallback) => {
1126
1260
  const umiLocale = (0, import_locales.getLocale)();
@@ -1143,11 +1277,14 @@ var PaymentModal = ({
1143
1277
  };
1144
1278
  const handleToastClose = () => {
1145
1279
  console.log(
1146
- "PaymentModal - Toast closed, executing callbacks and closing modal"
1280
+ "PaymentModal - Toast closed, executing payment completion callback"
1147
1281
  );
1148
1282
  if (currentPaymentResultRef.current) {
1149
1283
  callback == null ? void 0 : callback(currentPaymentResultRef.current);
1150
1284
  }
1285
+ };
1286
+ const handleModalClose = () => {
1287
+ console.log("PaymentModal - Modal closing independently");
1151
1288
  onClose == null ? void 0 : onClose(true);
1152
1289
  };
1153
1290
  const handlePaymentCancel = (reset) => {
@@ -1157,43 +1294,30 @@ var PaymentModal = ({
1157
1294
  checkout.cancelCurrentOrderAsync();
1158
1295
  onClose == null ? void 0 : onClose(reset || false);
1159
1296
  };
1160
- const CustomHeader = () => /* @__PURE__ */ import_react.default.createElement(
1161
- "div",
1297
+ const CustomHeader = () => /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-modal-custom-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "header__left" }, /* @__PURE__ */ import_react.default.createElement(
1298
+ import_antd.Button,
1162
1299
  {
1163
- style: {
1164
- display: "flex",
1165
- alignItems: "center",
1166
- width: "100%",
1167
- position: "relative"
1300
+ icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "pisell2-arrow-left", size: 24 }),
1301
+ size: "small",
1302
+ type: "text",
1303
+ onClick: () => {
1304
+ const checkout = pisellos.getModule("checkout");
1305
+ if (checkout.isCurrentOrderSynced()) {
1306
+ handlePaymentCancel(true);
1307
+ } else {
1308
+ handlePaymentCancel(false);
1309
+ }
1168
1310
  }
1311
+ }
1312
+ )), /* @__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(
1313
+ import_antd.Button,
1314
+ {
1315
+ size: "small",
1316
+ type: "link",
1317
+ onClick: () => handlePaymentCancel(true)
1169
1318
  },
1170
- /* @__PURE__ */ import_react.default.createElement(
1171
- "div",
1172
- {
1173
- style: {
1174
- display: "flex",
1175
- alignItems: "center",
1176
- gap: "12px",
1177
- flex: "0 0 auto"
1178
- }
1179
- },
1180
- /* @__PURE__ */ import_react.default.createElement(import_components.DeviceIconGroup, null)
1181
- ),
1182
- /* @__PURE__ */ import_react.default.createElement(
1183
- "div",
1184
- {
1185
- style: {
1186
- position: "absolute",
1187
- left: "50%",
1188
- transform: "translateX(-50%)",
1189
- fontWeight: "500"
1190
- }
1191
- },
1192
- translation("order.total"),
1193
- ":",
1194
- (0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, state == null ? void 0 : state.amountSymbol)
1195
- )
1196
- );
1319
+ import_utils.locales.getText("order.start-new-order")
1320
+ )));
1197
1321
  (0, import_react.useEffect)(() => {
1198
1322
  var _a2;
1199
1323
  if ((_a2 = data == null ? void 0 : data.order_info) == null ? void 0 : _a2.order_note) {
@@ -1246,8 +1370,8 @@ var PaymentModal = ({
1246
1370
  }
1247
1371
  unsubscribeRef.current = checkout.core.effects.on(
1248
1372
  "checkout:onOrderSynced",
1249
- (data2) => {
1250
- var _a3, _b3, _c2;
1373
+ async (data2) => {
1374
+ var _a3, _b3, _c2, _d2, _e2;
1251
1375
  const responseData = (_a3 = data2.response) == null ? void 0 : _a3.data;
1252
1376
  const paymentStatus = responseData == null ? void 0 : responseData.payment_status;
1253
1377
  if (data2.isManual) return;
@@ -1313,17 +1437,24 @@ var PaymentModal = ({
1313
1437
  paymentStatus,
1314
1438
  !!currentChangeGivenAmount
1315
1439
  );
1316
- (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
1440
+ const enabledAutoPrint = await ((_e2 = (_d2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _d2.asyncDataManager) == null ? void 0 : _e2.call(_d2, {
1441
+ module: "get",
1442
+ key: "auto_print_receipt"
1443
+ }));
1444
+ await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
1317
1445
  {
1318
1446
  paymentStatus,
1319
1447
  orderTotalAmount,
1320
1448
  gapAmount: paymentStatus === "partially_paid" ? gapAmount : currentChangeGivenAmount,
1321
1449
  failureReason,
1322
1450
  autoCloseConfig,
1323
- actionButtons: generateActionButtons(paymentStatus)
1451
+ actionButtons: generateActionButtons(paymentStatus, enabledAutoPrint)
1324
1452
  },
1325
1453
  paymentResultToastConfig
1326
1454
  );
1455
+ if (paymentStatus === "paid") {
1456
+ handleModalClose();
1457
+ }
1327
1458
  const paymentResult = {
1328
1459
  ...data2,
1329
1460
  toastInfo: {
@@ -1391,13 +1522,12 @@ var PaymentModal = ({
1391
1522
  state,
1392
1523
  onToastClose: handleToastClose
1393
1524
  };
1394
- const generateActionButtons = (paymentStatus) => {
1525
+ const generateActionButtons = (paymentStatus, enabledAutoPrint) => {
1395
1526
  const getClassName = (suffix) => `payment-result-toast-${suffix}`;
1396
1527
  const handleDetailsClick = async () => {
1397
1528
  var _a2;
1398
1529
  setTimeout(() => {
1399
1530
  (0, import_PaymentResultToast.closePaymentResultToast)();
1400
- handleToastClose();
1401
1531
  }, 0);
1402
1532
  const { isTerminal, isWebPos } = (_a2 = context.appHelper) == null ? void 0 : _a2.utils;
1403
1533
  if (isTerminal == null ? void 0 : isTerminal()) {
@@ -1414,6 +1544,9 @@ var PaymentModal = ({
1414
1544
  }
1415
1545
  };
1416
1546
  const handlePrintReceiptClick = async () => {
1547
+ setTimeout(() => {
1548
+ (0, import_PaymentResultToast.closePaymentResultToast)();
1549
+ }, 0);
1417
1550
  const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
1418
1551
  if (!checkoutModule) return;
1419
1552
  let data2;
@@ -1462,6 +1595,9 @@ var PaymentModal = ({
1462
1595
  (0, import_PaymentResultToast.closePaymentResultToast)();
1463
1596
  };
1464
1597
  const handleOrderNoteClick = () => {
1598
+ setTimeout(() => {
1599
+ (0, import_PaymentResultToast.closePaymentResultToast)();
1600
+ }, 0);
1465
1601
  console.log(import_utils.locales.getText("payment.result.actions.orderNoteClicked"));
1466
1602
  if (handleOrderNoteClickFromToast) {
1467
1603
  handleOrderNoteClickFromToast();
@@ -1474,7 +1610,7 @@ var PaymentModal = ({
1474
1610
  case "paid":
1475
1611
  return [
1476
1612
  [
1477
- {
1613
+ enabledAutoPrint ? {
1478
1614
  id: "details",
1479
1615
  buttonProps: {
1480
1616
  className: getClassName("action-button"),
@@ -1482,8 +1618,7 @@ var PaymentModal = ({
1482
1618
  icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
1483
1619
  children: import_utils.locales.getText("payment.result.details")
1484
1620
  }
1485
- },
1486
- {
1621
+ } : {
1487
1622
  id: "print",
1488
1623
  buttonProps: {
1489
1624
  className: getClassName("action-button"),
@@ -1519,21 +1654,12 @@ var PaymentModal = ({
1519
1654
  return [
1520
1655
  [
1521
1656
  {
1522
- id: "saveAsPartialPaid",
1523
- buttonProps: {
1524
- className: getClassName("action-button"),
1525
- onClick: handleSaveAsPartialPaidClick,
1526
- children: import_utils.locales.getText("payment.result.saveAsPartialPaid")
1527
- }
1528
- },
1529
- {
1530
- id: "continuePayment",
1657
+ id: "details",
1531
1658
  buttonProps: {
1532
1659
  className: getClassName("action-button"),
1533
- onClick: () => {
1534
- (0, import_PaymentResultToast.closePaymentResultToast)();
1535
- },
1536
- children: import_utils.locales.getText("payment.result.continuePayment")
1660
+ onClick: handleDetailsClick,
1661
+ icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
1662
+ children: import_utils.locales.getText("payment.result.details")
1537
1663
  }
1538
1664
  },
1539
1665
  {
@@ -1677,7 +1803,7 @@ var PaymentModal = ({
1677
1803
  paymentResultToastConfig,
1678
1804
  generateActionButtons
1679
1805
  );
1680
- return /* @__PURE__ */ import_react.default.createElement(import_PaymentResultToast.PaymentResultToastProvider, null, /* @__PURE__ */ import_react.default.createElement(
1806
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
1681
1807
  import_materials.PisellContainer,
1682
1808
  {
1683
1809
  renderType: "modal",
@@ -1691,10 +1817,9 @@ var PaymentModal = ({
1691
1817
  destroyOnClose: false,
1692
1818
  maskClosable: false,
1693
1819
  footer: null,
1694
- closeIcon: null,
1820
+ closeIcon: false,
1695
1821
  wrapClassName: `payment-modal-wrapper ${!actualShowCashPayment ? "no-cash-payment" : ""}`,
1696
1822
  size: "large",
1697
- headerDivider: false,
1698
1823
  style: {
1699
1824
  height: "auto"
1700
1825
  },
@@ -1702,7 +1827,7 @@ var PaymentModal = ({
1702
1827
  maxHeight: "100%",
1703
1828
  // 使用100%基于父元素,而不是视口的90%
1704
1829
  overflowY: "auto",
1705
- padding: 0,
1830
+ padding: 16,
1706
1831
  display: "flex",
1707
1832
  flexDirection: "column"
1708
1833
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import './index.less';
3
- import { CurrentOrderInfo } from "../../types";
3
+ import { CurrentOrderInfo } from '../../types';
4
4
  interface AdditionalModuleProps {
5
5
  orderInfo?: CurrentOrderInfo;
6
6
  customAmount?: string;