@pisell/private-materials 6.7.9 → 6.8.1

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 (421) 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 +7 -7
  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 +2 -1
  12. package/es/components/booking/addons/index.js +25 -17
  13. package/es/components/booking/components/footer/amount.d.ts +1 -0
  14. package/es/components/booking/components/footer/amount.js +548 -84
  15. package/es/components/booking/components/footer/index.js +77 -56
  16. package/es/components/booking/components/footer/utils.d.ts +19 -0
  17. package/es/components/booking/components/footer/utils.js +194 -73
  18. package/es/components/booking/components/voucher/index.js +23 -7
  19. package/es/components/booking/hooks/useQuotation.js +4 -1
  20. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  21. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  22. package/es/components/booking/info/service2/utils.js +1 -0
  23. package/es/components/booking/info2/cartClientCard/index.js +30 -6
  24. package/es/components/booking/info2/index.js +1 -1
  25. package/es/components/booking/info2/service/addService/index.js +2 -3
  26. package/es/components/booking/info2/service/editNormalService/index.js +6 -0
  27. package/es/components/booking/info2/service/editService/index.js +16 -6
  28. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  29. package/es/components/booking/info2/service/editService/utils.js +66 -0
  30. package/es/components/booking/utils.d.ts +1 -0
  31. package/es/components/booking/utils.js +16 -3
  32. package/es/components/checkout/PaymentModal.d.ts +13 -5
  33. package/es/components/checkout/PaymentModal.js +304 -252
  34. package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  35. package/es/components/checkout/components/AdditionalModule/index.js +52 -12
  36. package/es/components/checkout/components/AmountSummary/index.js +9 -76
  37. package/es/components/checkout/components/AmountSummary/index.less +5 -6
  38. package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  39. package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
  40. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  41. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  42. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
  43. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  44. package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  45. package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  46. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  47. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
  48. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  49. package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
  50. package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
  51. package/es/components/checkout/index.less +1 -1
  52. package/es/components/checkout/locales.d.ts +6 -0
  53. package/es/components/checkout/locales.js +6 -0
  54. package/es/components/checkout/plugin.d.ts +2 -0
  55. package/es/components/checkout/plugin.js +303 -0
  56. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  57. package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  58. package/es/components/eftpos/hooks.d.ts +0 -1
  59. package/es/components/eftposPay/hooks.d.ts +1 -1
  60. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  61. package/es/components/eftposPay/payo/config.js +70 -32
  62. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  63. package/es/components/eftposPay/payo/payment.js +579 -0
  64. package/es/components/eftposPay/store/index.d.ts +4 -4
  65. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  66. package/es/components/eftposPay/tyro/index.js +12 -0
  67. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  68. package/es/components/eftposPay/utils/log/index.js +371 -0
  69. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  77. package/es/components/index.d.ts +2 -1
  78. package/es/components/index.js +2 -1
  79. package/es/components/list/List.js +99 -56
  80. package/es/components/list/hooks/useListState.d.ts +5 -3
  81. package/es/components/list/hooks/useListState.js +10 -2
  82. package/es/components/list/styles/base.less +4 -0
  83. package/es/components/list/styles/content.less +1 -1
  84. package/es/components/list/styles/header.less +4 -4
  85. package/es/components/list/types.d.ts +1 -0
  86. package/es/components/list/utils/index.d.ts +13 -1
  87. package/es/components/list/utils/index.js +43 -1
  88. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
  89. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  90. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  92. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  93. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  94. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  95. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  96. package/es/components/pay/toC/index.js +7 -4
  97. package/es/components/pay/toC/locales.d.ts +3 -0
  98. package/es/components/pay/toC/locales.js +6 -3
  99. package/es/components/pay/toC/status.d.ts +1 -0
  100. package/es/components/pay/toC/status.js +3 -0
  101. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  102. package/es/components/subTotal/index.js +1 -1
  103. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  104. package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
  105. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  106. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  107. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  108. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  109. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  110. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  111. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  112. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  113. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  114. package/es/components/systemSettings/registry/components/index.js +4 -0
  115. package/es/components/systemSettings/registry/index.d.ts +5 -0
  116. package/es/components/systemSettings/registry/index.js +1059 -0
  117. package/es/components/systemSettings/registry/index.less +410 -0
  118. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  119. package/es/components/systemSettings/registry/locales.js +300 -0
  120. package/es/components/systemSettings/registry/services.d.ts +77 -0
  121. package/es/components/systemSettings/registry/services.js +472 -0
  122. package/es/components/systemSettings/registry/types.d.ts +126 -0
  123. package/es/components/systemSettings/registry/types.js +1 -0
  124. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  125. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  126. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  127. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  128. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +58 -11
  129. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
  130. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
  131. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +149 -36
  132. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
  133. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  134. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  135. package/es/components/ticketBooking/components/timeBar/index.js +112 -7
  136. package/es/components/ticketBooking/components/timeBar/index.less +59 -0
  137. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
  138. package/es/components/ticketBooking/locales.d.ts +9 -0
  139. package/es/components/ticketBooking/locales.js +12 -3
  140. package/es/components/ticketBooking/utils/index.d.ts +3 -0
  141. package/es/components/ticketBooking/utils/index.js +36 -13
  142. package/es/components/wallet/Detail/index.js +34 -2
  143. package/es/components/wallet/Detail/index.less +11 -0
  144. package/es/components/wallet/Detail/locales.d.ts +6 -0
  145. package/es/components/wallet/Detail/locales.js +14 -2
  146. package/es/components/wallet/Voucher/index.js +11 -10
  147. package/es/components/wallet/components/WalletCard.js +5 -1
  148. package/es/components/wallet/index.js +4 -2
  149. package/es/components/wallet/serve.d.ts +7 -0
  150. package/es/components/wallet/utils.d.ts +48 -0
  151. package/es/components/wallet/utils.js +342 -0
  152. package/es/index.d.ts +5 -0
  153. package/es/index.js +6 -1
  154. package/es/plus/clientCard/locales.js +3 -3
  155. package/es/plus/clinetSearch/index.js +28 -30
  156. package/es/plus/clinetSearch/locales.d.ts +3 -0
  157. package/es/plus/clinetSearch/locales.js +7 -4
  158. package/es/plus/clinetSearch/types.d.ts +12 -0
  159. package/es/plus/productSelect/CategoryTabs/index.d.ts +1 -0
  160. package/es/plus/productSelect/CategoryTabs/index.js +2 -1
  161. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  162. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  163. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  164. package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
  165. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  166. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  167. package/es/plus/walletPassGallery/index.js +7 -3
  168. package/es/plus/walletPassGallery/serve.d.ts +3 -0
  169. package/es/plus/walletPassGallery/serve.js +4 -2
  170. package/es/pro/Login2.0/index.less +15 -8
  171. package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  172. package/es/pro/Selector/BatchSelectorDemo.js +470 -0
  173. package/es/pro/Selector/Selector.d.ts +5 -0
  174. package/es/pro/Selector/Selector.js +283 -0
  175. package/es/pro/Selector/SelectorGroup.d.ts +11 -0
  176. package/es/pro/Selector/SelectorGroup.js +537 -0
  177. package/es/pro/Selector/components/Card/index.d.ts +27 -0
  178. package/es/pro/Selector/components/Card/index.js +96 -0
  179. package/es/pro/Selector/components/Card/index.less +132 -0
  180. package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  181. package/es/pro/Selector/components/IntersectionObserver.js +384 -0
  182. package/es/pro/Selector/components/NumericStepper/index.d.ts +41 -0
  183. package/es/pro/Selector/components/NumericStepper/index.js +198 -0
  184. package/es/pro/Selector/components/NumericStepper/index.less +221 -0
  185. package/es/pro/Selector/components/index.d.ts +2 -0
  186. package/es/pro/Selector/components/index.js +2 -0
  187. package/es/pro/Selector/demo.d.ts +3 -0
  188. package/es/pro/Selector/demo.js +158 -0
  189. package/es/pro/Selector/hooks/useSelectionController.d.ts +42 -0
  190. package/es/pro/Selector/hooks/useSelectionController.js +414 -0
  191. package/es/pro/Selector/index.d.ts +8 -0
  192. package/es/pro/Selector/index.js +5 -0
  193. package/es/pro/Selector/locales.d.ts +42 -0
  194. package/es/pro/Selector/locales.js +80 -0
  195. package/es/pro/Selector/selector.less +3 -0
  196. package/es/pro/Selector/selectorGroup.less +8 -0
  197. package/es/pro/Selector/types.d.ts +114 -0
  198. package/es/pro/Selector/types.js +1 -0
  199. package/es/pro/Selector/utils/index.d.ts +49 -0
  200. package/es/pro/Selector/utils/index.js +229 -0
  201. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  202. package/es/pro/comprehensiveSearch/locales.js +1 -1
  203. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
  204. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  205. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
  206. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  207. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
  208. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  209. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  210. package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
  211. package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  212. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  213. package/lib/components/booking/addons/index.js +15 -7
  214. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  215. package/lib/components/booking/components/footer/amount.js +293 -41
  216. package/lib/components/booking/components/footer/index.js +30 -11
  217. package/lib/components/booking/components/footer/utils.d.ts +19 -0
  218. package/lib/components/booking/components/footer/utils.js +138 -41
  219. package/lib/components/booking/components/voucher/index.js +25 -9
  220. package/lib/components/booking/hooks/useQuotation.js +2 -1
  221. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  222. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  223. package/lib/components/booking/info/service2/utils.js +1 -0
  224. package/lib/components/booking/info2/cartClientCard/index.js +25 -5
  225. package/lib/components/booking/info2/index.js +7 -2
  226. package/lib/components/booking/info2/service/addService/index.js +1 -2
  227. package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
  228. package/lib/components/booking/info2/service/editService/index.js +12 -3
  229. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  230. package/lib/components/booking/info2/service/editService/utils.js +40 -3
  231. package/lib/components/booking/utils.d.ts +1 -0
  232. package/lib/components/booking/utils.js +11 -0
  233. package/lib/components/checkout/PaymentModal.d.ts +13 -5
  234. package/lib/components/checkout/PaymentModal.js +190 -147
  235. package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  236. package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
  237. package/lib/components/checkout/components/AmountSummary/index.js +5 -46
  238. package/lib/components/checkout/components/AmountSummary/index.less +5 -6
  239. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  240. package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
  241. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  242. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  243. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
  244. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  245. package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
  246. package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  247. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  248. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
  249. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  250. package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
  251. package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
  252. package/lib/components/checkout/index.less +1 -1
  253. package/lib/components/checkout/locales.d.ts +6 -0
  254. package/lib/components/checkout/locales.js +6 -0
  255. package/lib/components/checkout/plugin.d.ts +2 -0
  256. package/lib/components/checkout/plugin.js +263 -0
  257. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  258. package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  259. package/lib/components/eftpos/hooks.d.ts +0 -1
  260. package/lib/components/eftposPay/hooks.d.ts +1 -1
  261. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  262. package/lib/components/eftposPay/payo/config.js +98 -73
  263. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  264. package/lib/components/eftposPay/payo/payment.js +357 -0
  265. package/lib/components/eftposPay/store/index.d.ts +4 -4
  266. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  267. package/lib/components/eftposPay/tyro/index.js +12 -0
  268. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  269. package/lib/components/eftposPay/utils/log/index.js +294 -0
  270. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  271. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  272. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  273. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  274. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  275. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  276. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  277. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  278. package/lib/components/index.d.ts +2 -1
  279. package/lib/components/index.js +3 -0
  280. package/lib/components/list/List.js +58 -36
  281. package/lib/components/list/hooks/useListState.d.ts +5 -3
  282. package/lib/components/list/hooks/useListState.js +9 -1
  283. package/lib/components/list/styles/base.less +4 -0
  284. package/lib/components/list/styles/content.less +1 -1
  285. package/lib/components/list/styles/header.less +4 -4
  286. package/lib/components/list/types.d.ts +1 -0
  287. package/lib/components/list/utils/index.d.ts +13 -1
  288. package/lib/components/list/utils/index.js +27 -0
  289. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
  290. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  291. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  292. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  293. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  294. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  295. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  296. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  297. package/lib/components/pay/toC/index.js +4 -1
  298. package/lib/components/pay/toC/locales.d.ts +3 -0
  299. package/lib/components/pay/toC/locales.js +6 -3
  300. package/lib/components/pay/toC/status.d.ts +1 -0
  301. package/lib/components/pay/toC/status.js +5 -0
  302. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  303. package/lib/components/subTotal/index.js +1 -1
  304. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  305. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  306. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  307. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  308. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  309. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  310. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  311. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  312. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  313. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  314. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  315. package/lib/components/systemSettings/registry/components/index.js +48 -0
  316. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  317. package/lib/components/systemSettings/registry/index.js +529 -0
  318. package/lib/components/systemSettings/registry/index.less +410 -0
  319. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  320. package/lib/components/systemSettings/registry/locales.js +324 -0
  321. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  322. package/lib/components/systemSettings/registry/services.js +290 -0
  323. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  324. package/lib/components/systemSettings/registry/types.js +17 -0
  325. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  326. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  327. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  328. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  329. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +40 -5
  330. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
  331. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
  332. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +93 -24
  333. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
  334. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  335. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  336. package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
  337. package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
  338. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
  339. package/lib/components/ticketBooking/locales.d.ts +9 -0
  340. package/lib/components/ticketBooking/locales.js +12 -3
  341. package/lib/components/ticketBooking/utils/index.d.ts +3 -0
  342. package/lib/components/ticketBooking/utils/index.js +20 -6
  343. package/lib/components/wallet/Detail/index.js +31 -3
  344. package/lib/components/wallet/Detail/index.less +11 -0
  345. package/lib/components/wallet/Detail/locales.d.ts +6 -0
  346. package/lib/components/wallet/Detail/locales.js +14 -2
  347. package/lib/components/wallet/Voucher/index.js +8 -8
  348. package/lib/components/wallet/components/WalletCard.js +4 -0
  349. package/lib/components/wallet/index.js +2 -2
  350. package/lib/components/wallet/serve.d.ts +7 -0
  351. package/lib/components/wallet/utils.d.ts +48 -0
  352. package/lib/components/wallet/utils.js +287 -0
  353. package/lib/index.d.ts +5 -0
  354. package/lib/index.js +15 -0
  355. package/lib/plus/clientCard/locales.js +3 -3
  356. package/lib/plus/clinetSearch/index.js +17 -8
  357. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  358. package/lib/plus/clinetSearch/locales.js +7 -4
  359. package/lib/plus/clinetSearch/types.d.ts +12 -0
  360. package/lib/plus/productSelect/CategoryTabs/index.d.ts +1 -0
  361. package/lib/plus/productSelect/CategoryTabs/index.js +2 -1
  362. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  363. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  364. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  365. package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
  366. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  367. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  368. package/lib/plus/walletPassGallery/index.js +7 -3
  369. package/lib/plus/walletPassGallery/serve.d.ts +3 -0
  370. package/lib/plus/walletPassGallery/serve.js +3 -2
  371. package/lib/pro/Login2.0/index.less +15 -8
  372. package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  373. package/lib/pro/Selector/BatchSelectorDemo.js +376 -0
  374. package/lib/pro/Selector/Selector.d.ts +5 -0
  375. package/lib/pro/Selector/Selector.js +264 -0
  376. package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
  377. package/lib/pro/Selector/SelectorGroup.js +463 -0
  378. package/lib/pro/Selector/components/Card/index.d.ts +27 -0
  379. package/lib/pro/Selector/components/Card/index.js +114 -0
  380. package/lib/pro/Selector/components/Card/index.less +132 -0
  381. package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  382. package/lib/pro/Selector/components/IntersectionObserver.js +281 -0
  383. package/lib/pro/Selector/components/NumericStepper/index.d.ts +41 -0
  384. package/lib/pro/Selector/components/NumericStepper/index.js +221 -0
  385. package/lib/pro/Selector/components/NumericStepper/index.less +221 -0
  386. package/lib/pro/Selector/components/index.d.ts +2 -0
  387. package/lib/pro/Selector/components/index.js +42 -0
  388. package/lib/pro/Selector/demo.d.ts +3 -0
  389. package/lib/pro/Selector/demo.js +102 -0
  390. package/lib/pro/Selector/hooks/useSelectionController.d.ts +42 -0
  391. package/lib/pro/Selector/hooks/useSelectionController.js +338 -0
  392. package/lib/pro/Selector/index.d.ts +8 -0
  393. package/lib/pro/Selector/index.js +39 -0
  394. package/lib/pro/Selector/locales.d.ts +42 -0
  395. package/lib/pro/Selector/locales.js +80 -0
  396. package/lib/pro/Selector/selector.less +3 -0
  397. package/lib/pro/Selector/selectorGroup.less +8 -0
  398. package/lib/pro/Selector/types.d.ts +114 -0
  399. package/lib/pro/Selector/types.js +17 -0
  400. package/lib/pro/Selector/utils/index.d.ts +49 -0
  401. package/lib/pro/Selector/utils/index.js +221 -0
  402. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  403. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  404. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
  405. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  406. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
  407. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  408. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
  409. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  410. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  411. package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
  412. package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  413. package/lowcode/payment-modal/meta.ts +135 -0
  414. package/lowcode/selector/meta.ts +352 -0
  415. package/lowcode/selector.group/meta.ts +200 -0
  416. package/lowcode/settings-registry/meta.ts +29 -0
  417. package/lowcode/wallet-pass-detail/meta.ts +89 -0
  418. package/package.json +4 -4
  419. package/es/components/checkout/PaymentPlugin.d.ts +0 -3
  420. package/lib/components/checkout/PaymentPlugin.d.ts +0 -3
  421. package/lib/components/checkout/PaymentPlugin.js +0 -181
@@ -62,7 +62,7 @@ var import_ahooks = require("ahooks");
62
62
  var import_lodash = require("lodash");
63
63
  var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
64
64
  var Footer = (props) => {
65
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
65
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
66
66
  const { state, buttons, dispatch, source } = props;
67
67
  const [showDetail, setShowDetail] = (0, import_react.useState)(false);
68
68
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -467,7 +467,11 @@ var Footer = (props) => {
467
467
  (_l = (_k = state.client) == null ? void 0 : _k.value) == null ? void 0 : _l.id
468
468
  ]);
469
469
  const handleCheckoutInternal = async () => {
470
- (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
470
+ var _a2, _b2, _c2;
471
+ const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
472
+ if (isToastMode) {
473
+ (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
474
+ }
471
475
  const isNewOrder = !state.bookingId;
472
476
  if (isEdit) {
473
477
  if ((0, import_utils2.isDayBooking)(state)) {
@@ -494,18 +498,18 @@ var Footer = (props) => {
494
498
  setIsPaymentModalOpen(true);
495
499
  setCheckoutLoading(false);
496
500
  setPaymentCallback(() => (paymentResult) => {
497
- var _a2, _b2, _c2, _d2;
501
+ var _a3, _b3, _c3, _d2;
498
502
  console.log("Payment result:", paymentResult);
499
503
  setIsPaymentModalOpen(false);
500
504
  if ((paymentResult == null ? void 0 : paymentResult.status) === "success") {
501
505
  console.log("Payment completed successfully");
502
- (_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
506
+ (_b3 = (_a3 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a3.bookingTicket) == null ? void 0 : _b3.clearAllCart();
503
507
  setPaymentModalData(null);
504
508
  setPaymentCallback(null);
505
509
  } else if ((paymentResult == null ? void 0 : paymentResult.status) === "cancelled") {
506
510
  console.log("Payment cancelled");
507
511
  if (res == null ? void 0 : res.order_id) {
508
- (_d2 = (_c2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _c2.booking) == null ? void 0 : _d2.voidBooking(res.order_id);
512
+ (_d2 = (_c3 = window == null ? void 0 : window.shopApi) == null ? void 0 : _c3.booking) == null ? void 0 : _d2.voidBooking(res.order_id);
509
513
  }
510
514
  setPaymentModalData(null);
511
515
  setPaymentCallback(null);
@@ -596,8 +600,11 @@ var Footer = (props) => {
596
600
  messageShow = true,
597
601
  noSubmit = false
598
602
  }) => {
599
- var _a2, _b2, _c2, _d2, _e2;
600
- (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
603
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
604
+ const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
605
+ if (isToastMode) {
606
+ (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
607
+ }
601
608
  if ((0, import_utils2.isDayBooking)(state)) {
602
609
  const isHasDayProducts = handleDaySubmit();
603
610
  if (isHasDayProducts) return;
@@ -612,7 +619,7 @@ var Footer = (props) => {
612
619
  const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
613
620
  let saveOtherValue = {};
614
621
  if (type === "save") {
615
- saveOtherValue = await ((_a2 = state == null ? void 0 : state.onSave) == null ? void 0 : _a2.call(state, state.client)) || {};
622
+ saveOtherValue = await ((_d2 = state == null ? void 0 : state.onSave) == null ? void 0 : _d2.call(state, state.client)) || {};
616
623
  }
617
624
  try {
618
625
  let callbackData = null;
@@ -658,7 +665,7 @@ var Footer = (props) => {
658
665
  { key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
659
666
  {
660
667
  key: "店铺id",
661
- value: (_e2 = (_d2 = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
668
+ value: (_h2 = (_g2 = (_f2 = (_e2 = store == null ? void 0 : store.getState) == null ? void 0 : _e2.call(store)) == null ? void 0 : _f2.global) == null ? void 0 : _g2.globalConfig) == null ? void 0 : _h2.id
662
669
  },
663
670
  {
664
671
  key: "shopApi",
@@ -1413,8 +1420,20 @@ var Footer = (props) => {
1413
1420
  data: paymentModalData,
1414
1421
  callback: paymentCallback || void 0,
1415
1422
  setEditCartMode,
1416
- state,
1417
- dispatch,
1423
+ paymentResultDisplayMode: (_s = (_r = (_q = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _q.config) == null ? void 0 : _r.payment_setting) == null ? void 0 : _s.payment_result_display_mode,
1424
+ shopDiscount: state.shop_discount,
1425
+ client: (_t = state.client) == null ? void 0 : _t.value,
1426
+ currentTotalPrice: total.productAmount,
1427
+ onChangeShopDiscount: (discount) => {
1428
+ dispatch({
1429
+ type: "setState",
1430
+ payload: {
1431
+ shop_discount: discount
1432
+ }
1433
+ });
1434
+ },
1435
+ onChangeOrderNote: handleNoteConfirm,
1436
+ onDeleteOrderNote: handleNoteDelete,
1418
1437
  onClose: (reset) => {
1419
1438
  setIsPaymentModalOpen(false);
1420
1439
  setPaymentModalData(null);
@@ -16,6 +16,11 @@ export declare const formatProductOption: (option: any) => any;
16
16
  * @Date: 2024-02-19 09:26
17
17
  */
18
18
  export declare const formatProductBundle: (bundle: any) => any;
19
+ /**
20
+ * 获取子商品折扣信息
21
+ * @param item
22
+ */
23
+ export declare const getBundleDiscountList: (bundle: any[]) => any[];
19
24
  export interface ResourceItem {
20
25
  [key: string]: any;
21
26
  }
@@ -37,5 +42,19 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
37
42
  * @Date: 2024-12-23 12:05
38
43
  */
39
44
  export declare const formatProductPrice: (item: any) => number;
45
+ /**
46
+ * checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
47
+ * @param item
48
+ * @returns
49
+ */
50
+ export declare const formatOriginalPrice: (item: any) => number;
51
+ /**
52
+ * checkout2.0: 商品维度折扣后价格, original_price - 商品折扣金额(商品手动折扣等等)
53
+ * @param item
54
+ * @returns
55
+ */
56
+ export declare const formatSellingPrice: (item: any) => number;
57
+ export declare const getSourceProductPrice: (item: any) => number;
58
+ export declare const getMainProductSellingPrice: (item: any) => number | undefined;
40
59
  export declare const formatValues: (state: any) => any;
41
60
  export declare const checkHolderIsError: (state: any) => any;
@@ -32,10 +32,15 @@ __export(utils_exports, {
32
32
  checkHolderIsError: () => checkHolderIsError,
33
33
  checkResourcesFormat: () => checkResourcesFormat,
34
34
  checkSubResourcesCapacity: () => checkSubResourcesCapacity,
35
+ formatOriginalPrice: () => formatOriginalPrice,
35
36
  formatProductBundle: () => formatProductBundle,
36
37
  formatProductOption: () => formatProductOption,
37
38
  formatProductPrice: () => formatProductPrice,
38
- formatValues: () => formatValues
39
+ formatSellingPrice: () => formatSellingPrice,
40
+ formatValues: () => formatValues,
41
+ getBundleDiscountList: () => getBundleDiscountList,
42
+ getMainProductSellingPrice: () => getMainProductSellingPrice,
43
+ getSourceProductPrice: () => getSourceProductPrice
39
44
  });
40
45
  module.exports = __toCommonJS(utils_exports);
41
46
  var import_dayjs = __toESM(require("dayjs"));
@@ -74,10 +79,10 @@ var formatProductOption = (option) => {
74
79
  }
75
80
  return option.map((d) => {
76
81
  return {
77
- "num": d.num,
78
- "option_group_item_id": d.product_option_item_id || d.option_group_item_id,
79
- "option_group_id": d.option_group_id,
80
- "custom_add_price": Number(d == null ? void 0 : d.add_price)
82
+ num: d.num,
83
+ option_group_item_id: d.product_option_item_id || d.option_group_item_id,
84
+ option_group_id: d.option_group_id,
85
+ custom_add_price: Number(d == null ? void 0 : d.add_price)
81
86
  };
82
87
  });
83
88
  };
@@ -109,6 +114,8 @@ var formatProductBundle = (bundle) => {
109
114
  return temp + Number(item.num) * item.custom_add_price;
110
115
  }, 0);
111
116
  return {
117
+ "is_charge_tax": d.is_charge_tax,
118
+ "tax_fee": d.tax_fee,
112
119
  "bundle_group_id": d.group_id,
113
120
  "bundle_id": d.id,
114
121
  "bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
@@ -116,16 +123,42 @@ var formatProductBundle = (bundle) => {
116
123
  "num": d.num,
117
124
  "extension_id": d.extension_id,
118
125
  "extension_type": d.extension_type,
119
- "price": Number(d == null ? void 0 : d.price),
120
- // checkout 2.0 新增
126
+ "price": Number(d == null ? void 0 : d.product_price),
121
127
  "price_type": d == null ? void 0 : d.price_type,
122
- // checkout 2.0 新增
123
- "custom_price": new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
128
+ "price_type_ext": d == null ? void 0 : d.price_type_ext,
129
+ "custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
124
130
  "custom_price_type": d == null ? void 0 : d.price_type,
125
- "option": option
131
+ "option": option,
132
+ "bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
133
+ // "bundle_sum_price": d?.original_price || d?.original_total,
134
+ "metadata": {
135
+ custom_product_bundle_map_id: d._id,
136
+ // 子商品单数量附加费
137
+ "surcharge_fee": d.surcharge_fee,
138
+ // 可选,附加费均摊舍入金额
139
+ "surcharge_rounding_remainder": d.surcharge_rounding_remainder,
140
+ relation_surcharge_ids: d.relation_surcharge_ids || []
141
+ }
126
142
  };
127
143
  });
128
144
  };
145
+ var getBundleDiscountList = (bundle) => {
146
+ if (!bundle) {
147
+ return [];
148
+ }
149
+ let discountList = [];
150
+ bundle.forEach((d) => {
151
+ if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
152
+ d.discount_list.forEach((item) => {
153
+ if (item == null ? void 0 : item.id) {
154
+ item.order_discount_id = item.id;
155
+ }
156
+ });
157
+ discountList.push(...d.discount_list.filter((item) => !item.id));
158
+ }
159
+ });
160
+ return discountList;
161
+ };
129
162
  var getSubType = (item) => {
130
163
  var _a;
131
164
  const _type = (_a = item.duration) == null ? void 0 : _a.type;
@@ -213,7 +246,7 @@ var formatHolders = (state, item, values) => {
213
246
  var formatProductPrice = (item) => {
214
247
  var _a, _b, _c, _d;
215
248
  const other = (_a = item._extend) == null ? void 0 : _a.other;
216
- let price = Number((_b = item._extend) == null ? void 0 : _b.price);
249
+ let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
217
250
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
218
251
  const variant = item.variant.find(
219
252
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -257,6 +290,26 @@ var formatMetaData = (item, isMultiDayPrices) => {
257
290
  }
258
291
  return metadata;
259
292
  };
293
+ var formatProductMetadata = (item) => {
294
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
295
+ let metadata = {};
296
+ if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
297
+ metadata.main_product_attached_bundle_surcharge_fee = (_b = item._extend) == null ? void 0 : _b.surcharge_fee;
298
+ }
299
+ if ((_c = item._extend) == null ? void 0 : _c.main_product_attached_bundle_tax_fee) {
300
+ metadata.main_product_attached_bundle_tax_fee = (_d = item._extend) == null ? void 0 : _d.main_product_attached_bundle_tax_fee;
301
+ }
302
+ if ((_e = item._extend) == null ? void 0 : _e.surcharge_rounding_remainder) {
303
+ metadata.surcharge_rounding_remainder = (_f = item._extend) == null ? void 0 : _f.surcharge_rounding_remainder;
304
+ }
305
+ if ((_g = item._extend) == null ? void 0 : _g.relation_surcharge_ids) {
306
+ metadata.relation_surcharge_ids = (_h = item._extend) == null ? void 0 : _h.relation_surcharge_ids;
307
+ }
308
+ if ((_i = item._extend) == null ? void 0 : _i.unique_identification_number) {
309
+ metadata.unique_identification_number = (_j = item._extend) == null ? void 0 : _j.unique_identification_number;
310
+ }
311
+ return metadata;
312
+ };
260
313
  var getSourceProductPrice = (item) => {
261
314
  var _a, _b, _c;
262
315
  const other = (_a = item._extend) == null ? void 0 : _a.other;
@@ -271,12 +324,36 @@ var getSourceProductPrice = (item) => {
271
324
  }
272
325
  return price;
273
326
  };
327
+ var getMainProductSellingPrice = (item) => {
328
+ var _a, _b, _c, _d, _e, _f;
329
+ if (!(0, import_utils5.isNumber)((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) && !(0, import_utils5.isString)((_b = item._extend) == null ? void 0 : _b.main_product_selling_price)) {
330
+ return void 0;
331
+ }
332
+ let optionPrice = new import_decimal.default(0);
333
+ if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
334
+ optionPrice = (_e = item._extend.other) == null ? void 0 : _e.option.reduce((accumulator, currentValue) => {
335
+ const currentPrice = new import_decimal.default(currentValue.price || 0);
336
+ const currentNum = new import_decimal.default(currentValue.num || 0);
337
+ return accumulator.add(currentPrice.mul(currentNum));
338
+ }, optionPrice);
339
+ }
340
+ return new import_decimal.default((_f = item._extend) == null ? void 0 : _f.main_product_selling_price).add(optionPrice).toNumber();
341
+ };
274
342
  var formatProducts = (item, quantity) => {
275
- var _a, _b, _c, _d, _e, _f, _g;
343
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
344
+ if (item == null ? void 0 : item.discount_list) {
345
+ item == null ? void 0 : item.discount_list.forEach((d) => {
346
+ if (d == null ? void 0 : d.id) {
347
+ d.order_discount_id = d.id;
348
+ }
349
+ });
350
+ }
276
351
  const total = Number(item._extend.total);
277
352
  const origin_total = Number(item._extend.origin_total);
278
353
  const discount_amount = origin_total - total;
279
- const discount_list = (item == null ? void 0 : item.discount_list) || [];
354
+ const bundleDiscountList = getBundleDiscountList(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
355
+ const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
356
+ discount_list.push(...bundleDiscountList);
280
357
  const discount_type = discount_amount < 0 ? "change_price" : "discount";
281
358
  discount_list.forEach((d) => {
282
359
  d.metadata = {
@@ -294,22 +371,23 @@ var formatProducts = (item, quantity) => {
294
371
  "name": item.name,
295
372
  "num": quantity || item._extend.quantity,
296
373
  "price": formatProductPrice(item),
374
+ "main_product_selling_price": getMainProductSellingPrice(item) ?? formatProductPrice(item),
297
375
  "source_product_price": getSourceProductPrice(item),
298
376
  "product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
299
377
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
300
378
  "product_discount_reason": item._extend.discount_reason || "",
301
379
  "is_charge_tax": item.is_charge_tax,
302
- "note": ((_a = item._extend) == null ? void 0 : _a.note) || "",
380
+ "note": ((_c = item._extend) == null ? void 0 : _c.note) || "",
303
381
  "discountway": item._extend.discountway || "num",
304
382
  "discount_per": item._extend.discount_per,
305
383
  "discount_type": item._extend.discount_type || discount_type,
306
384
  "order_detail_id": item._extend.order_detail_id || 0,
307
- "product_bundle": formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
308
- "bundle_edit": item._extend.bundle_edit,
309
- "product_option_item": formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
310
- "product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
385
+ "product_bundle": formatProductBundle((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
386
+ "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
387
+ "product_option_item": formatProductOption((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
388
+ "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
311
389
  "discount_list": notManualDiscount,
312
- metadata: formatMetaData(item, false),
390
+ metadata: formatProductMetadata(item),
313
391
  // checkout 需求新增字段
314
392
  "calculated_original_price": formatOriginalPrice(item),
315
393
  "calculated_selling_price": formatSellingPrice(item),
@@ -372,7 +450,7 @@ var formatBookings = (data, values) => {
372
450
  let bookings = [];
373
451
  let obj = {};
374
452
  list.forEach((item) => {
375
- var _a, _b, _c, _d, _e, _f;
453
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
376
454
  if (item.isCustomItem) {
377
455
  bookings.push({
378
456
  ...item._extend,
@@ -412,26 +490,32 @@ var formatBookings = (data, values) => {
412
490
  item._extend.unique_identification_number = unique_identification_number;
413
491
  }
414
492
  const isSetGroupId = obj[(_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.groupId];
493
+ if (!((_g = item._extend) == null ? void 0 : _g.unique_identification_number)) {
494
+ const unique_identification_number = (0, import_utils5.getUniqueId)();
495
+ item._extend.unique_identification_number = unique_identification_number;
496
+ }
497
+ debugger;
415
498
  const booking = {
416
- "product": formatProducts(item),
417
- "metadata": formatMetaData(item, !isSetGroupId),
418
- "relation_products": formatRelationDetails(item._extend.relation_details),
419
- "id": item.booking_id || 0,
420
- "relation_id": item._extend.relation_id || 0,
421
- "like_status": item._extend.like_status || "common",
422
- "relation_type": item._extend.relation_type || "",
423
- "is_all": false,
424
- "schedule_id": item._extend.schedule_id || 0,
425
- "end_time": end_time,
426
- "sub_type": isDay ? "days" : getSubType(item),
427
- "select_date": start_date,
428
- "start_time": start_time,
429
- "end_date": end_date,
430
- "start_date": start_date,
431
- "duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
432
- "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
433
- "resources": formatResource(item),
434
- "note": item._extend.note,
499
+ schedule_event_id: item == null ? void 0 : item.booking_id,
500
+ product: formatProducts(item),
501
+ relation_products: formatRelationDetails(item._extend.relation_details),
502
+ id: item.booking_id || 0,
503
+ relation_id: item._extend.relation_id || 0,
504
+ like_status: item._extend.like_status || "common",
505
+ relation_type: item._extend.relation_type || "",
506
+ is_all: false,
507
+ schedule_id: item._extend.schedule_id || 0,
508
+ end_time,
509
+ sub_type: isDay ? "days" : getSubType(item),
510
+ select_date: start_date,
511
+ start_time,
512
+ end_date,
513
+ start_date,
514
+ duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
515
+ number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
516
+ resources: formatResource(item),
517
+ note: item._extend.note,
518
+ metadata: formatMetaData(item, !isSetGroupId),
435
519
  ...eventOtherParams || {},
436
520
  ...dayParams
437
521
  };
@@ -445,12 +529,20 @@ var formatBookings = (data, values) => {
445
529
  for (let i = 0; i < (item._extend.quantity || 1); i++) {
446
530
  const newItem = (0, import_lodash.cloneDeep)(item);
447
531
  newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
532
+ if (i > 0) {
533
+ newItem._extend.surcharge_rounding_remainder = void 0;
534
+ if (((_j = (_i = (_h = newItem._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle) == null ? void 0 : _j.length) > 0) {
535
+ newItem._extend.other.bundle.forEach((bundleItem) => {
536
+ bundleItem.surcharge_rounding_remainder = void 0;
537
+ });
538
+ }
539
+ }
448
540
  bookings.push({
449
541
  ...booking,
450
542
  "product": formatProducts(newItem, 1),
451
543
  "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
452
544
  "holder": getHolderByIndex(booking.holder, i),
453
- "metadata": formatMetaData(newItem)
545
+ "metadata": formatMetaData(newItem, false)
454
546
  });
455
547
  }
456
548
  });
@@ -609,8 +701,13 @@ var checkHolderIsError = (state) => {
609
701
  checkHolderIsError,
610
702
  checkResourcesFormat,
611
703
  checkSubResourcesCapacity,
704
+ formatOriginalPrice,
612
705
  formatProductBundle,
613
706
  formatProductOption,
614
707
  formatProductPrice,
615
- formatValues
708
+ formatSellingPrice,
709
+ formatValues,
710
+ getBundleDiscountList,
711
+ getMainProductSellingPrice,
712
+ getSourceProductPrice
616
713
  });
@@ -60,6 +60,8 @@ var VoucherCard = (props) => {
60
60
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
61
61
  const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
62
62
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
63
+ const stateRef = (0, import_react.useRef)(state);
64
+ stateRef.current = state;
63
65
  services = state.service;
64
66
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
65
67
  dispatch({
@@ -103,11 +105,17 @@ var VoucherCard = (props) => {
103
105
  total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
104
106
  discount_list: value.discount_list,
105
107
  origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
106
- quantity: value._extend.quantity
108
+ quantity: value._extend.quantity,
109
+ startDate: value._extend.startDate
107
110
  };
108
111
  });
109
112
  return val;
110
113
  }, [state.service.value]);
114
+ const serviceTotal = (0, import_react.useMemo)(() => {
115
+ return serviceMemo.reduce((total, item) => {
116
+ return total + (item.total || 0);
117
+ }, 0);
118
+ }, [serviceMemo]);
111
119
  const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
112
120
  if (!e.detail.code) {
113
121
  return;
@@ -155,8 +163,8 @@ var VoucherCard = (props) => {
155
163
  }
156
164
  if (isBooking4Shop) {
157
165
  const val = shopDiscount.calcDiscount([
158
- ...state.service.value,
159
- ...state.addons.value
166
+ ...stateRef.current.service.value,
167
+ ...stateRef.current.addons.value
160
168
  ]);
161
169
  console.log("input: ", state.service.value);
162
170
  console.log("output: ", val);
@@ -227,6 +235,12 @@ var VoucherCard = (props) => {
227
235
  const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
228
236
  var _a2;
229
237
  const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
238
+ const newTotal = serviceList.reduce((total, item) => {
239
+ return total + (item._extend.total || 0);
240
+ }, 0);
241
+ if (newTotal !== serviceTotal) {
242
+ edit = true;
243
+ }
230
244
  serviceValueRef.current = serviceList;
231
245
  addonsValueRef.current = addonsList;
232
246
  let other = {};
@@ -243,12 +257,14 @@ var VoucherCard = (props) => {
243
257
  }
244
258
  });
245
259
  if (!((_a2 = props == null ? void 0 : props.state) == null ? void 0 : _a2.isBookingTicket2)) {
246
- dispatch({
247
- type: "setAddons",
248
- payload: {
249
- value: addonsList,
250
- ...other
251
- }
260
+ setTimeout(() => {
261
+ dispatch({
262
+ type: "setAddons",
263
+ payload: {
264
+ value: addonsList,
265
+ ...other
266
+ }
267
+ });
252
268
  });
253
269
  }
254
270
  });
@@ -95,10 +95,11 @@ var setNewCartValue = (cartValue, newProducts) => {
95
95
  }
96
96
  const selectBundleInfo = item._extend.other.bundle.find((item2) => item2.id === bundle.id);
97
97
  const optionPrice = calculateTotalPrice((selectBundleInfo == null ? void 0 : selectBundleInfo.option) || []);
98
+ const isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
98
99
  return {
99
100
  ...bundle,
100
101
  base_price: bundleItemMap[bundle.id].base_price,
101
- price: new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
102
+ price: isEditDiscount ? bundle.price : new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
102
103
  // product_price: bundleItemMap[item.id].product_price,
103
104
  };
104
105
  });
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -378,6 +378,7 @@ var formatBundle = (bundle) => {
378
378
  num: item == null ? void 0 : item.num,
379
379
  price: item == null ? void 0 : item.price,
380
380
  total: item == null ? void 0 : item.price,
381
+ origin_total: item.original_total,
381
382
  price_type: item == null ? void 0 : item.price_type,
382
383
  bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
383
384
  bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_ahooks = require("ahooks");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
+ var import_lodash = require("lodash");
39
40
  var import_locales = __toESM(require("./locales"));
40
41
  var import_clientCard = __toESM(require("../../../../plus/clientCard"));
41
42
  var import_clinetSearch = __toESM(require("../../../../plus/clinetSearch"));
@@ -148,10 +149,34 @@ var CartClientCard = (0, import_react.forwardRef)(({
148
149
  selectCustomer(null);
149
150
  };
150
151
  const handleViewClient = (data) => {
152
+ const newSelectedCustomer = (0, import_lodash.cloneDeep)(selectedCustomer);
151
153
  state.action({
152
154
  type: "pisell1.handleOpenCustomerModal",
153
155
  data: { id: state.client.value.id },
154
156
  callback: (data2) => {
157
+ console.log("data>>>>>", data2);
158
+ const _selectedCustomer = {
159
+ ...newSelectedCustomer || {},
160
+ display_name: (data2 == null ? void 0 : data2.display_name) || "",
161
+ email: (data2 == null ? void 0 : data2.email) || "",
162
+ phone: (data2 == null ? void 0 : data2.phone) || "",
163
+ nickname: (data2 == null ? void 0 : data2.nickname) || "",
164
+ country_calling_code: (data2 == null ? void 0 : data2.country_calling_code) || "",
165
+ first_name: (data2 == null ? void 0 : data2.first_name) || "",
166
+ last_name: (data2 == null ? void 0 : data2.last_name) || "",
167
+ contacts_info: (data2 == null ? void 0 : data2.contacts_info) || null
168
+ };
169
+ selectCustomer(_selectedCustomer);
170
+ if (JSON.stringify((newSelectedCustomer == null ? void 0 : newSelectedCustomer.contacts_info) || {}) !== JSON.stringify((data2 == null ? void 0 : data2.contacts_info) || {})) {
171
+ dispatch({
172
+ type: "setContactsInfo",
173
+ payload: {
174
+ value: (data2 == null ? void 0 : data2.contacts_info) || {},
175
+ client_id: data2 == null ? void 0 : data2.id
176
+ }
177
+ });
178
+ }
179
+ handleSearchClient("");
155
180
  }
156
181
  });
157
182
  };
@@ -237,11 +262,6 @@ var CartClientCard = (0, import_react.forwardRef)(({
237
262
  (0, import_utils3.setHandleSetClient)(handleSetClient);
238
263
  }
239
264
  }, [isActive]);
240
- (0, import_react.useEffect)(() => {
241
- return () => {
242
- (0, import_utils3.setHandleSetClient)(null);
243
- };
244
- }, [isActive]);
245
265
  const tags = (0, import_react.useMemo)(() => {
246
266
  var _a2;
247
267
  if (!selectedCustomer) return;
@@ -58,9 +58,9 @@ var import_classnames = __toESM(require("classnames"));
58
58
  var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
59
59
  var import_locales2 = require("../../../utils/locales");
60
60
  var import_ahooks = require("ahooks");
61
- var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
62
61
  var import_cartClientCard = __toESM(require("./cartClientCard"));
63
62
  var import_materials = require("@pisell/materials");
63
+ var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
64
64
  var defaultModules = {
65
65
  client: 1,
66
66
  date: 1,
@@ -299,7 +299,12 @@ var Info = (0, import_model.Provider)((props) => {
299
299
  dispatch: modal.dispatch,
300
300
  source: "info"
301
301
  },
302
- /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(import_cartClientCard.default, { clientCardProps: { dropdown: dropdownProps } })) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
302
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
303
+ import_cartClientCard.default,
304
+ {
305
+ clientCardProps: { dropdown: dropdownProps }
306
+ }
307
+ )) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
303
308
  "div",
304
309
  {
305
310
  className: "booking-info-client-line-code",
@@ -243,13 +243,12 @@ var Info = (props) => {
243
243
  _extend: {
244
244
  start_date: state.date.value,
245
245
  quantity: (e == null ? void 0 : e.quantity) || 1,
246
- price: _detail.price,
247
246
  product_name: item.title,
248
247
  other
249
248
  },
250
249
  new: 1
251
250
  };
252
- console.log(cacheItem, "cacheItem", e);
251
+ cacheItem._extend.price = (0, import_utils3.getMainPrice)(cacheItem, _detail.price);
253
252
  let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
254
253
  cacheItem._extend.total = _total;
255
254
  cacheItem._extend.origin_total = _total;
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_ahooks = require("ahooks");
37
37
  var import_skuDetailModal = __toESM(require("../../../../../pro/skuDetailModal"));
38
38
  var import_model = require("../../../info/model");
39
+ var import_utils = require("../editService/utils");
39
40
  var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
40
41
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
41
42
  const modalRef = (0, import_react.useRef)(null);
@@ -62,7 +63,12 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
62
63
  const handleConfirm = (0, import_ahooks.useMemoizedFn)((data) => {
63
64
  var _a, _b;
64
65
  const newProducts = (_b = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || []) == null ? void 0 : _b.map((item) => {
66
+ var _a2, _b2;
65
67
  if (item._id == data._id) {
68
+ data = (0, import_utils.setProductPrice)(data, {
69
+ newTotal: (_a2 = data._extend) == null ? void 0 : _a2.total,
70
+ origin_total: (_b2 = data._extend) == null ? void 0 : _b2.origin_total
71
+ });
66
72
  return data;
67
73
  }
68
74
  return item;