@pisell/private-materials 6.7.9 → 6.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -4,7 +4,9 @@ import "./index.less";
4
4
  var Shortcuts = /*#__PURE__*/forwardRef(function (props, ref) {
5
5
  var presets = props.presets,
6
6
  onChange = props.onChange,
7
- disabled = props.disabled;
7
+ disabled = props.disabled,
8
+ _props$size = props.size,
9
+ size = _props$size === void 0 ? 'default' : _props$size;
8
10
  var handleItemClick = function handleItemClick(item) {
9
11
  if (disabled || item.disabled) {
10
12
  return;
@@ -32,7 +34,8 @@ var Shortcuts = /*#__PURE__*/forwardRef(function (props, ref) {
32
34
  var itemProps = {
33
35
  key: index,
34
36
  className: classNames('pisell-virtual-keyboard-shortcut', {
35
- disabled: item.disabled
37
+ disabled: item.disabled,
38
+ large: size === 'large'
36
39
  }),
37
40
  style: item.style,
38
41
  onClick: function onClick() {
@@ -28,6 +28,10 @@
28
28
  cursor: pointer;
29
29
  position: relative;
30
30
 
31
+ &.large {
32
+ height: 54px;
33
+ }
34
+
31
35
  &.disabled {
32
36
  cursor: not-allowed;
33
37
  pointer-events: none;
@@ -96,7 +96,7 @@ var VoucherCard = (props) => {
96
96
  return {
97
97
  _id: item._id,
98
98
  quantity: item.num,
99
- bundle: item._bundleOrigin,
99
+ bundle: item.bundle,
100
100
  options: item._optionsOrigin,
101
101
  product: {
102
102
  ...item._productOrigin
@@ -122,6 +122,7 @@ var VoucherCard = (props) => {
122
122
  );
123
123
  pisellos.effects.on("appointmentBooking_cart:onAddItem", onCartChange);
124
124
  pisellos.effects.on("appointmentBooking_cart:onUpdateQuotationPrice", onCartChange);
125
+ pisellos.effects.on("appointmentBooking_cart:onUpdateBookingDate", onCartChange);
125
126
  pisellos.effects.on("appointmentBooking_cart:onUpdateCartItemNums", onCartChange);
126
127
  pisellos.effects.on("appointmentBooking_cart:onRemoveItem", onCartChange);
127
128
  pisellos.effects.on(
@@ -51,23 +51,31 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
51
51
  var formatProducts = (values) => {
52
52
  let arr = [];
53
53
  arr = values.map((item) => {
54
- var _a, _b, _c, _d, _e, _f, _g;
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
55
+ const bundleDiscountList = (0, import_utils.getBundleDiscountList)(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
56
+ const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
57
+ discount_list.push(...bundleDiscountList);
55
58
  return {
56
59
  order_detail_id: item.order_detail_id || 0,
57
60
  num: item._extend.quantity,
58
61
  price: (0, import_utils.formatProductPrice)(item),
59
62
  product_id: item.id,
60
- discount_list: (item == null ? void 0 : item.discount_list) || [],
63
+ discount_list: discount_list || [],
61
64
  discount_amount: 0,
62
65
  product_discount_reason: "",
63
66
  is_charge_tax: item.is_charge_tax,
64
67
  note: "",
65
68
  discountway: "num",
66
69
  discount_type: "discount",
67
- bundle_edit: (_a = item._extend) == null ? void 0 : _a.bundle_edit,
68
- product_bundle: (0, import_utils.formatProductBundle)((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
69
- "product_option_item": (0, import_utils.formatProductOption)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
70
- "product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0
70
+ bundle_edit: (_c = item._extend) == null ? void 0 : _c.bundle_edit,
71
+ product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
72
+ "product_option_item": (0, import_utils.formatProductOption)((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
73
+ "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
74
+ "source_product_price": (0, import_utils.getSourceProductPrice)(item),
75
+ "main_product_selling_price": (0, import_utils.getMainProductSellingPrice)(item) ?? (0, import_utils.formatProductPrice)(item),
76
+ "calculated_original_price": (0, import_utils.formatOriginalPrice)(item),
77
+ "calculated_selling_price": (0, import_utils.formatSellingPrice)(item),
78
+ "tax_fee": item._extend.tax_fee
71
79
  };
72
80
  });
73
81
  return arr;
@@ -241,12 +249,12 @@ var Addons = (0, import_model.Provider)((props) => {
241
249
  isAddons: true,
242
250
  _key: e.key,
243
251
  _extend: {
244
- price: _detail.price,
245
252
  other: e,
246
253
  quantity: (e == null ? void 0 : e.quantity) || 1
247
254
  },
248
255
  quantity: (e == null ? void 0 : e.quantity) || 1
249
256
  };
257
+ product._extend.price = (0, import_utils2.getMainPrice)(product, _detail.price);
250
258
  let _total = (0, import_utils2.getProductTotalPrice)(product);
251
259
  product._extend.total = _total;
252
260
  product._extend.origin_total = _total;
@@ -33,4 +33,5 @@ export declare const getSumTotal: (state: any, options: {
33
33
  dueAmount: number;
34
34
  roundingAmount: number;
35
35
  originExpectAmount: number;
36
+ originExpectAmountWithoutDiscount: number;
36
37
  };
@@ -47,7 +47,7 @@ var getRelationDetailsTotal = (relation_details) => {
47
47
  }
48
48
  return total.toNumber();
49
49
  };
50
- var getProductExpectAmount = (state, isEdit) => {
50
+ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
51
51
  var _a, _b, _c, _d;
52
52
  let price = new import_decimal.default(0);
53
53
  let duration = new import_decimal.default(0);
@@ -59,13 +59,15 @@ var getProductExpectAmount = (state, isEdit) => {
59
59
  if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item)) {
60
60
  const quantity = new import_decimal.default(item._extend.quantity || 1);
61
61
  const itemTotal = new import_decimal.default(item._extend.total || 0);
62
- price = price.add(itemTotal.mul(quantity));
62
+ const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
63
+ price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
63
64
  const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
64
65
  duration = duration.add(_duration);
65
66
  } else {
66
67
  const quantity = new import_decimal.default(item._extend.quantity || 1);
67
68
  const itemTotal = new import_decimal.default(item._extend.total || 0);
68
- price = price.add(itemTotal.mul(quantity));
69
+ const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
70
+ price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
69
71
  const relationTotal = new import_decimal.default(getRelationDetailsTotal(
70
72
  item._extend.relation_details || []
71
73
  ));
@@ -79,7 +81,8 @@ var getProductExpectAmount = (state, isEdit) => {
79
81
  for (let item of state.addons.value) {
80
82
  const quantity = new import_decimal.default(item._extend.quantity || 1);
81
83
  const itemTotal = new import_decimal.default(item._extend.total || 0);
82
- price = price.add(itemTotal.mul(quantity));
84
+ const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
85
+ price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
83
86
  }
84
87
  }
85
88
  }
@@ -130,9 +133,10 @@ var getProductItemTax = (item, state, options) => {
130
133
  }
131
134
  }
132
135
  }
133
- return singleItemTax.times(quantity);
136
+ return singleItemTax.times(quantity).toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
134
137
  };
135
138
  var processItemsTax = (items, state, options) => {
139
+ var _a, _b, _c;
136
140
  const { tax_rate, is_price_include_tax, computed } = options;
137
141
  const { shopDiscount, productExpectAmount } = computed;
138
142
  let originTax = new import_decimal.default(0);
@@ -140,10 +144,11 @@ var processItemsTax = (items, state, options) => {
140
144
  for (let item of items) {
141
145
  const quantity = new import_decimal.default(item._extend.quantity || 1);
142
146
  const unitPrice = new import_decimal.default(item._extend.total || 0);
143
- const originalTaxPerItem = getProductItemTax(
147
+ const mainProductPrice = new import_decimal.default(getMainProductTotal(item) || 0);
148
+ let originalTaxPerItem = getProductItemTax(
144
149
  {
145
150
  ...item,
146
- total: unitPrice.toNumber(),
151
+ total: mainProductPrice.add(((_a = item._extend) == null ? void 0 : _a.surcharge_fee) || 0).toNumber(),
147
152
  quantity: 1
148
153
  },
149
154
  state,
@@ -153,19 +158,22 @@ var processItemsTax = (items, state, options) => {
153
158
  if (productExpectAmount > 0) {
154
159
  itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
155
160
  }
156
- const itemDiscountedUnitPrice = unitPrice.minus(itemDiscount);
157
- const discountedTaxPerItem = getProductItemTax(
161
+ let mainItemDiscount = new import_decimal.default(0);
162
+ if (unitPrice.greaterThan(0)) {
163
+ mainItemDiscount = mainProductPrice.dividedBy(productExpectAmount).times(shopDiscount);
164
+ }
165
+ const mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_b = item._extend) == null ? void 0 : _b.surcharge_fee) || 0);
166
+ const maxDiscountedTaxPerItem = getProductItemTax(
158
167
  {
159
168
  ...item,
160
- total: itemDiscountedUnitPrice.toNumber(),
169
+ total: mainItemDiscountedUnitPrice.toNumber(),
161
170
  price: item._extend.total,
162
171
  quantity: 1
163
172
  },
164
173
  state,
165
174
  { tax_rate, is_price_include_tax }
166
175
  );
167
- item._extend.original_tax_fee = originalTaxPerItem.toNumber();
168
- item._extend.tax_fee = discountedTaxPerItem.toNumber();
176
+ item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItem.toNumber();
169
177
  let addTimeTotalTax = new import_decimal.default(0);
170
178
  if (Array.isArray(item._extend.relation_details)) {
171
179
  for (let atItem of item._extend.relation_details) {
@@ -181,8 +189,7 @@ var processItemsTax = (items, state, options) => {
181
189
  const addTimeTaxPerItem = getProductItemTax(
182
190
  {
183
191
  ...atItem,
184
- total: _discountedTotal,
185
- // 可能包含原有数据,或前端临时数据
192
+ total: _discountedTotal.add((atItem == null ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
186
193
  quantity: atItem.product_quantity || atItem.num || 1
187
194
  },
188
195
  state,
@@ -191,8 +198,51 @@ var processItemsTax = (items, state, options) => {
191
198
  addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
192
199
  }
193
200
  }
194
- originTax = originTax.plus(originalTaxPerItem.times(quantity)).plus(addTimeTotalTax);
195
- tax = tax.plus(discountedTaxPerItem.times(quantity)).plus(addTimeTotalTax);
201
+ let bundleTotalOriginTax = new import_decimal.default(0);
202
+ let bundleTotalTax = new import_decimal.default(0);
203
+ if (Array.isArray((_c = item._extend.other) == null ? void 0 : _c.bundle)) {
204
+ for (let bundleItem of item._extend.other.bundle) {
205
+ if (getBundleItemIsOriginalPrice(bundleItem)) {
206
+ const bundleQuantity = new import_decimal.default(bundleItem.quantity || 1);
207
+ const bundleUnitPrice = new import_decimal.default(
208
+ bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
209
+ );
210
+ const bundleOriginalTaxPerItem = getProductItemTax(
211
+ {
212
+ ...bundleItem,
213
+ total: bundleUnitPrice.add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
214
+ quantity: 1
215
+ },
216
+ state,
217
+ { tax_rate, is_price_include_tax }
218
+ );
219
+ let bundleItemDiscount = new import_decimal.default(0);
220
+ if (productExpectAmount > 0) {
221
+ bundleItemDiscount = bundleUnitPrice.dividedBy(productExpectAmount).times(shopDiscount);
222
+ }
223
+ const bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0);
224
+ const bundleDiscountedTaxPerItem = getProductItemTax(
225
+ {
226
+ ...bundleItem,
227
+ total: bundleDiscountedUnitPrice.toNumber(),
228
+ quantity: 1
229
+ },
230
+ state,
231
+ { tax_rate, is_price_include_tax }
232
+ );
233
+ bundleItem.original_tax_fee = new import_decimal.default(bundleOriginalTaxPerItem).toNumber();
234
+ bundleItem.tax_fee = new import_decimal.default(bundleDiscountedTaxPerItem).toNumber();
235
+ bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
236
+ bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
237
+ }
238
+ }
239
+ }
240
+ const original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
241
+ const tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
242
+ item._extend.original_tax_fee = original_tax_fee.toNumber();
243
+ item._extend.tax_fee = tax_fee.toNumber();
244
+ originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
245
+ tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
196
246
  }
197
247
  return { originTax, tax };
198
248
  };
@@ -253,7 +303,7 @@ var isProductMatchSurchargeCondition = (item, options) => {
253
303
  }
254
304
  const isInScheduleByDate = (_a = options.ScheduleModule) == null ? void 0 : _a.isInScheduleByDate;
255
305
  const { surchargeConfig, scheduleById = {} } = options;
256
- const { startDate, other, isCustomItem } = item._extend;
306
+ const { startDate, product_id, isCustomItem } = item;
257
307
  const {
258
308
  open_product = 0,
259
309
  // 1 | 0
@@ -277,7 +327,6 @@ var isProductMatchSurchargeCondition = (item, options) => {
277
327
  if (isCustomItem) {
278
328
  isProductMatch = false;
279
329
  } else {
280
- const product_id = other == null ? void 0 : other.product_id;
281
330
  isProductMatch = available_product_ids.includes(product_id);
282
331
  }
283
332
  }
@@ -307,8 +356,71 @@ var isProductMatchSurchargeCondition = (item, options) => {
307
356
  }
308
357
  return isProductMatch && isScheduleMatch;
309
358
  };
359
+ var getBundleItemIsOriginalPrice = (item) => {
360
+ return (item == null ? void 0 : item.price_type) === "markup" && (item == null ? void 0 : item.price_type_ext) === "product_price";
361
+ };
362
+ var getBundleItemIsMarkupPrice = (item) => {
363
+ return (item == null ? void 0 : item.price_type) === "markup" && ((item == null ? void 0 : item.price_type_ext) === "" || !(item == null ? void 0 : item.price_type_ext));
364
+ };
365
+ var getBundleItemIsDiscountPrice = (item) => {
366
+ return (item == null ? void 0 : item.price_type) === "markdown" && ((item == null ? void 0 : item.price_type_ext) === "" || !(item == null ? void 0 : item.price_type_ext));
367
+ };
368
+ var getBundleItemIsMarkupOrDiscountPrice = (item) => {
369
+ return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
370
+ };
371
+ var getDiscountAmount = (discounts) => {
372
+ return (discounts || []).reduce((total, discount) => {
373
+ return total.add(new import_decimal.default(discount.amount || 0));
374
+ }, new import_decimal.default(0)).toNumber();
375
+ };
376
+ var getMainProductTotal = (item) => {
377
+ var _a, _b, _c, _d, _e, _f;
378
+ let total = new import_decimal.default(((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) ?? ((_b = item == null ? void 0 : item.metadata) == null ? void 0 : _b.main_product_selling_price) ?? item._extend.price ?? 0);
379
+ if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
380
+ total = total.add((_e = item._extend.other) == null ? void 0 : _e.option.reduce((t, option) => {
381
+ return t.add(new import_decimal.default(option.price || 0).mul(option.num || 1));
382
+ }, new import_decimal.default(0)));
383
+ }
384
+ for (let bundleItem of ((_f = item._extend.other) == null ? void 0 : _f.bundle) || []) {
385
+ if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
386
+ const discountAmount = getDiscountAmount(bundleItem.discount_list);
387
+ const bundleItemPrice = new import_decimal.default(bundleItem.bundle_selling_price ?? bundleItem.price ?? 0);
388
+ const bundleItemTotal = bundleItemPrice.minus(discountAmount);
389
+ total = total.add(bundleItemTotal);
390
+ }
391
+ }
392
+ return total.toNumber();
393
+ };
394
+ var clearSurchargeFee = (state) => {
395
+ var _a, _b;
396
+ const { service, addons } = state;
397
+ if (Array.isArray(service == null ? void 0 : service.value)) {
398
+ for (let item of service.value) {
399
+ item._extend.surcharge_fee = 0;
400
+ item._extend.relation_surcharge_ids = [];
401
+ for (let bundleItem of ((_a = item._extend.other) == null ? void 0 : _a.bundle) || []) {
402
+ bundleItem.surcharge_fee = 0;
403
+ bundleItem.relation_surcharge_ids = [];
404
+ }
405
+ for (let relationDetail of item._extend.relation_details || []) {
406
+ relationDetail.surcharge_fee = 0;
407
+ relationDetail.relation_surcharge_ids = [];
408
+ }
409
+ }
410
+ }
411
+ if (Array.isArray(addons == null ? void 0 : addons.value)) {
412
+ for (let item of addons.value) {
413
+ item._extend.surcharge_fee = 0;
414
+ item._extend.relation_surcharge_ids = [];
415
+ for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
416
+ bundleItem.surcharge_fee = 0;
417
+ bundleItem.relation_surcharge_ids = [];
418
+ }
419
+ }
420
+ }
421
+ };
310
422
  var getSurcharge = (state, options) => {
311
- var _a;
423
+ var _a, _b, _c, _d, _e;
312
424
  const { isEdit, ScheduleModule, surcharge_list, scheduleById } = options;
313
425
  const { bookingDetail, bookingId } = state;
314
426
  if (!isEdit && bookingId) {
@@ -333,6 +445,7 @@ var getSurcharge = (state, options) => {
333
445
  }
334
446
  return [];
335
447
  }
448
+ clearSurchargeFee(state);
336
449
  const { service, addons } = state;
337
450
  if (!Array.isArray(surcharge_list) || !(surcharge_list == null ? void 0 : surcharge_list.length)) return [];
338
451
  const surchargeWithAmount = [];
@@ -343,24 +456,89 @@ var getSurcharge = (state, options) => {
343
456
  fixed = "0",
344
457
  id,
345
458
  type,
346
- description
459
+ description,
460
+ open_product
347
461
  } = surchargeConfig;
348
462
  const matchedItems = [];
349
463
  if (Array.isArray(service == null ? void 0 : service.value)) {
350
464
  for (let item of service.value) {
351
- if (isProductMatchSurchargeCondition(item, {
352
- surchargeConfig,
353
- scheduleById: scheduleById || {},
354
- ScheduleModule
355
- })) {
465
+ if (isProductMatchSurchargeCondition(
466
+ {
467
+ isCustomItem: item.isCustomItem,
468
+ startDate: item._extend.startDate,
469
+ product_id: item.product_id
470
+ },
471
+ {
472
+ surchargeConfig,
473
+ scheduleById: scheduleById || {},
474
+ ScheduleModule
475
+ }
476
+ )) {
477
+ const total = getMainProductTotal(item);
478
+ const mainQuantity = item._extend.quantity || 1;
356
479
  matchedItems.push({
357
- total: Number(item._extend.total),
358
- addTimeTotal: getRelationDetailsTotal(
359
- item._extend.relation_details || []
360
- ),
361
- quantity: item._extend.quantity || 1
480
+ total,
481
+ // addTimeTotal: getRelationDetailsTotal(
482
+ // item._extend.relation_details || []
483
+ // ),
484
+ isMain: true,
485
+ quantity: mainQuantity,
486
+ item,
487
+ mainQuantity
488
+ // 主商品的mainQuantity等于自己的quantity
362
489
  });
363
490
  }
491
+ for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
492
+ if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition(
493
+ {
494
+ isCustomItem: false,
495
+ startDate: item._extend.startDate,
496
+ product_id: bundleItem._bundle_product_id
497
+ },
498
+ {
499
+ surchargeConfig,
500
+ scheduleById: scheduleById || {},
501
+ ScheduleModule
502
+ }
503
+ )) {
504
+ const mainQuantity = item._extend.quantity || 1;
505
+ matchedItems.push({
506
+ isMain: false,
507
+ total: Number(
508
+ bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
509
+ ),
510
+ quantity: bundleItem.num || bundleItem.quantity || 1,
511
+ item: bundleItem,
512
+ mainQuantity
513
+ // 子商品的mainQuantity是所属主商品的quantity
514
+ });
515
+ }
516
+ }
517
+ for (let relationDetail of item._extend.relation_details || []) {
518
+ if (isProductMatchSurchargeCondition(
519
+ {
520
+ isCustomItem: false,
521
+ startDate: item._extend.startDate,
522
+ product_id: relationDetail.product_id
523
+ },
524
+ {
525
+ surchargeConfig,
526
+ scheduleById: scheduleById || {},
527
+ ScheduleModule
528
+ }
529
+ )) {
530
+ matchedItems.push({
531
+ isMain: false,
532
+ total: Number(
533
+ (relationDetail == null ? void 0 : relationDetail.price) || ((_c = relationDetail == null ? void 0 : relationDetail.metadata) == null ? void 0 : _c.main_product_attached_bundle_selling_price)
534
+ ),
535
+ quantity: relationDetail.num || relationDetail.quantity || 1,
536
+ item: relationDetail,
537
+ mainQuantity: 1
538
+ // 加时商品不受主商品数量影响
539
+ });
540
+ }
541
+ }
364
542
  }
365
543
  }
366
544
  if (Array.isArray(addons == null ? void 0 : addons.value)) {
@@ -371,28 +549,84 @@ var getSurcharge = (state, options) => {
371
549
  ScheduleModule
372
550
  })) {
373
551
  matchedItems.push({
552
+ isMain: true,
374
553
  total: Number(item._extend.total),
375
- quantity: item._extend.quantity || 1
554
+ quantity: item._extend.quantity || 1,
555
+ item,
556
+ mainQuantity: 1
557
+ // addons独立商品,mainQuantity为1
376
558
  });
377
559
  }
378
560
  }
379
561
  }
380
562
  let finalAmount = 0;
563
+ const productCount = matchedItems.reduce((total, item) => {
564
+ if (item.isMain) {
565
+ return total + (item.quantity || 1);
566
+ } else {
567
+ return total + (item.quantity || 1) * (item.mainQuantity || 1);
568
+ }
569
+ }, 0);
570
+ let fixedTotal = new import_decimal.default(0);
571
+ let productTotalSurcharge = new import_decimal.default(0);
381
572
  if (matchedItems.length > 0) {
382
573
  let configTotal = new import_decimal.default(0);
383
- if (percentage && new import_decimal.default(percentage).gt(0)) {
574
+ if (fixed && new import_decimal.default(fixed).gt(0)) {
575
+ configTotal = configTotal.plus(fixed);
576
+ }
577
+ if (percentage && new import_decimal.default(percentage).gt(0) || fixed) {
384
578
  const percentageRate = new import_decimal.default(percentage);
385
- for (let item of matchedItems) {
579
+ for (let [index, item] of matchedItems.entries()) {
580
+ const isLast = index === matchedItems.length - 1;
386
581
  const itemPrice = new import_decimal.default(Math.max(0, item.total || 0));
387
- const itemQuantity = new import_decimal.default(item.quantity || 1);
582
+ const itemQuantity = new import_decimal.default(item.isMain ? item.quantity || 1 : item.quantity * item.mainQuantity || 1);
388
583
  const addTimeTotal = new import_decimal.default(item.addTimeTotal || 0);
389
- const itemSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
390
- configTotal = configTotal.plus(itemSurcharge);
584
+ const itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
585
+ configTotal = configTotal.plus(itemTotalSurcharge);
586
+ const itemSurcharge = itemPrice.times(percentageRate);
587
+ const fixedSurcharge = new import_decimal.default(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
588
+ const quantity = item.isMain ? item.quantity : item.quantity * item.mainQuantity;
589
+ fixedTotal = fixedTotal.plus(new import_decimal.default(fixedSurcharge).times(quantity).toNumber());
590
+ if (isLast && fixedTotal.gt(0)) {
591
+ const remaining = new import_decimal.default(fixed).minus(fixedTotal).toNumber();
592
+ if (remaining > 0) {
593
+ productTotalSurcharge = productTotalSurcharge.plus(remaining);
594
+ if (item.isMain) {
595
+ item.item._extend.surcharge_rounding_remainder = remaining;
596
+ } else {
597
+ item.item.surcharge_rounding_remainder = remaining;
598
+ }
599
+ }
600
+ }
601
+ if (open_product !== 0) {
602
+ if (item.isMain) {
603
+ const originSurchargeFee = new import_decimal.default(item.item._extend.surcharge_fee || 0);
604
+ const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
605
+ productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
606
+ item.item._extend.surcharge_fee = surchargeFee;
607
+ item.item._extend.relation_surcharge_ids = [...((_d = item.item._extend) == null ? void 0 : _d.relation_surcharge_ids) || [], id];
608
+ } else {
609
+ const originSurchargeFee = new import_decimal.default(item.item.surcharge_fee || 0);
610
+ const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
611
+ productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
612
+ item.item.surcharge_fee = surchargeFee;
613
+ item.item.relation_surcharge_ids = [...((_e = item.item) == null ? void 0 : _e.relation_surcharge_ids) || [], id];
614
+ }
615
+ }
616
+ if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
617
+ const configTotalRounded = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
618
+ if (item.isMain) {
619
+ let newRoundingRemainder = new import_decimal.default(item.item._extend.surcharge_rounding_remainder || 0);
620
+ newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
621
+ item.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
622
+ } else {
623
+ let newRoundingRemainder = new import_decimal.default(item.item.surcharge_rounding_remainder || 0);
624
+ newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
625
+ item.item.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
626
+ }
627
+ }
391
628
  }
392
629
  }
393
- if (fixed && new import_decimal.default(fixed).gt(0)) {
394
- configTotal = configTotal.plus(fixed);
395
- }
396
630
  finalAmount = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP).toNumber();
397
631
  }
398
632
  const name = surchargeConfig.name || {};
@@ -410,7 +644,10 @@ var getSurcharge = (state, options) => {
410
644
  type: "default",
411
645
  fixed,
412
646
  amount: finalAmount,
413
- percentage
647
+ percentage,
648
+ metadata: {
649
+ open_product
650
+ }
414
651
  });
415
652
  }
416
653
  return surchargeWithAmount;
@@ -520,6 +757,19 @@ var getSumTotal = (state, options) => {
520
757
  state,
521
758
  options
522
759
  });
760
+ const { productExpectAmount: productExpectAmountWithoutDiscount } = getProductExpectAmount(
761
+ state,
762
+ options.isEdit,
763
+ true
764
+ );
765
+ const originExpectAmountWithoutDiscount = getExpectAmount({
766
+ price: productExpectAmountWithoutDiscount,
767
+ tax: originTax,
768
+ surchargeAmount,
769
+ shopDiscount: 0,
770
+ state,
771
+ options
772
+ });
523
773
  const sumTotalAmount = getSumTotalAmount({ expectAmount, roundingAmount });
524
774
  const sumTotalAmountDecimal = new import_decimal.default((0, import_utils2.formatAmount)(sumTotalAmount, 2, "") || 0);
525
775
  const orderPaidAmountDecimal = new import_decimal.default(orderPaidAmount || 0);
@@ -546,7 +796,9 @@ var getSumTotal = (state, options) => {
546
796
  totalRefundAmount,
547
797
  dueAmount,
548
798
  roundingAmount,
549
- originExpectAmount
799
+ originExpectAmount,
800
+ // 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
801
+ originExpectAmountWithoutDiscount
550
802
  };
551
803
  };
552
804
  // Annotate the CommonJS export names for ESM import in node: