@pisell/private-materials 6.3.78 → 6.3.80

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 (353) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +9 -9
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +9 -9
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Cart/index.d.ts +1 -1
  11. package/es/components/Sales/Cart/index.js +18 -3
  12. package/es/components/Sales/Cart/utils.d.ts +68 -0
  13. package/es/components/Sales/Checkout/utils.d.ts +41 -0
  14. package/es/components/Sales/Checkout/utils.js +57 -1
  15. package/es/components/Sales/Summary/index.d.ts +2 -0
  16. package/es/components/Sales/Summary/index.js +7 -2
  17. package/es/components/Sales/Summary/utils.d.ts +58 -0
  18. package/es/components/Sales/Summary/utils.js +57 -10
  19. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  20. package/es/components/appointmentBooking/components/Cart/Item/index.js +62 -4
  21. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  22. package/es/components/appointmentBooking/components/Deposit/index.d.ts +5 -1
  23. package/es/components/appointmentBooking/components/Deposit/index.js +9 -4
  24. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  25. package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
  26. package/es/components/appointmentBooking/index.d.ts +0 -1
  27. package/es/components/appointmentBooking/locales.d.ts +366 -0
  28. package/es/components/booking/addons/model.d.ts +10 -1
  29. package/es/components/booking/components/footer/index.d.ts +0 -1
  30. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  31. package/es/components/booking/components/tabPane/index.d.ts +4 -0
  32. package/es/components/booking/deposit/DepositItem/index.d.ts +25 -0
  33. package/es/components/booking/deposit/index.d.ts +0 -1
  34. package/es/components/booking/forms/model.d.ts +10 -1
  35. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  36. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  37. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  38. package/es/components/booking/info/clientVariant/utils.d.ts +1 -0
  39. package/es/components/booking/info/date/index.d.ts +1 -0
  40. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  41. package/es/components/booking/info/index.d.ts +0 -1
  42. package/es/components/booking/info/model.d.ts +10 -1
  43. package/es/components/booking/info/notes/index.d.ts +1 -0
  44. package/es/components/booking/info/service/Lists.d.ts +0 -1
  45. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  46. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  47. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  48. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  49. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  50. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  51. package/es/components/booking/info/service2/utils.d.ts +1 -0
  52. package/es/components/booking/info/service2/utils.js +4 -4
  53. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  54. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  55. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  56. package/es/components/booking/info2/service/editService/utils.d.ts +13 -0
  57. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  58. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  59. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  60. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  61. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  62. package/es/components/booking/model.d.ts +9 -1
  63. package/es/components/booking/notes/addNote/index.d.ts +3 -0
  64. package/es/components/booking/notes/model.d.ts +10 -1
  65. package/es/components/booking/payments/model.d.ts +10 -1
  66. package/es/components/booking/utils.d.ts +2 -2
  67. package/es/components/eftpos/const.d.ts +3 -1
  68. package/es/components/eftpos/const.js +2 -0
  69. package/es/components/eftpos/device.d.ts +3 -1
  70. package/es/components/eftpos/device.js +5 -3
  71. package/es/components/eftpos/index.js +34 -11
  72. package/es/components/eftpos/index.less +26 -1
  73. package/es/components/eftpos/locales.d.ts +3 -0
  74. package/es/components/eftpos/locales.js +3 -0
  75. package/es/components/eftpos/pos.d.ts +1 -0
  76. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +6 -0
  77. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +125 -0
  78. package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  79. package/es/components/eftposPay/aggregatePayment/index.js +3 -0
  80. package/es/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
  81. package/es/components/eftposPay/aggregatePayment/mock.js +567 -0
  82. package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  83. package/es/components/eftposPay/aggregatePayment/service.js +70 -0
  84. package/es/components/eftposPay/aggregatePayment/types.d.ts +96 -0
  85. package/es/components/eftposPay/aggregatePayment/types.js +61 -0
  86. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  87. package/es/components/eftposPay/aggregatePayment/utils/logs.js +385 -0
  88. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +132 -0
  89. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1127 -0
  90. package/es/components/eftposPay/amount.d.ts +1 -2
  91. package/es/components/eftposPay/app.d.ts +0 -1
  92. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  93. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  94. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  95. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  96. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  97. package/es/components/eftposPay/const.d.ts +189 -0
  98. package/es/components/eftposPay/const.js +2 -0
  99. package/es/components/eftposPay/device.d.ts +1 -2
  100. package/es/components/eftposPay/hooks.d.ts +36 -0
  101. package/es/components/eftposPay/hooks.js +12 -0
  102. package/es/components/eftposPay/index.d.ts +0 -1
  103. package/es/components/eftposPay/linkly/index.d.ts +0 -1
  104. package/es/components/eftposPay/linkly/index.js +1 -0
  105. package/es/components/eftposPay/locales.d.ts +330 -0
  106. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  107. package/es/components/eftposPay/manufacturer.js +4 -0
  108. package/es/components/eftposPay/mx51/Action.d.ts +6 -0
  109. package/es/components/eftposPay/mx51/Action.js +91 -0
  110. package/es/components/eftposPay/mx51/const.d.ts +5 -0
  111. package/es/components/eftposPay/mx51/const.js +69 -0
  112. package/es/components/eftposPay/mx51/index.d.ts +6 -0
  113. package/es/components/eftposPay/mx51/index.js +362 -0
  114. package/es/components/eftposPay/mx51/types.d.ts +136 -0
  115. package/es/components/eftposPay/mx51/types.js +29 -0
  116. package/es/components/eftposPay/mx51/utils.d.ts +10 -0
  117. package/es/components/eftposPay/mx51/utils.js +120 -0
  118. package/es/components/eftposPay/pay.d.ts +0 -1
  119. package/es/components/eftposPay/pay.js +7 -2
  120. package/es/components/eftposPay/store/index.d.ts +355 -0
  121. package/es/components/eftposPay/tyro/index.d.ts +9 -0
  122. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +4 -2
  123. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +4 -1
  124. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +79 -6
  125. package/es/components/eventBooking/components/Provider/Cart/Item/index.less +7 -6
  126. package/es/components/eventBooking/components/Provider/Cart/index.js +2 -7
  127. package/es/components/eventBooking/components/Provider/Content/index.less +1 -1
  128. package/es/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
  129. package/es/components/eventBooking/components/Voucher/index.js +1 -1
  130. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  131. package/es/components/eventBooking/index.d.ts +0 -1
  132. package/es/components/index.d.ts +1 -2
  133. package/es/components/index.js +1 -2
  134. package/es/components/pay/toC/PaymentList/utils.d.ts +36 -0
  135. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +2 -0
  137. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +2 -0
  138. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +2 -0
  139. package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  140. package/es/components/pay/toC/model.d.ts +40 -0
  141. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  142. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  143. package/es/components/productExtension/index.d.ts +0 -1
  144. package/es/components/ruleSetting/index.d.ts +0 -1
  145. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  146. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  147. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  148. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  149. package/es/components/schedules/products/index.d.ts +1 -0
  150. package/es/components/schedules/resources/index.d.ts +1 -0
  151. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  152. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  153. package/es/components/schedules/schedules/index.d.ts +1 -0
  154. package/es/components/shoppingCart/locales.d.ts +33 -0
  155. package/es/components/shoppingCart/type.d.ts +48 -0
  156. package/es/components/subTotal/index.d.ts +2 -0
  157. package/es/components/subTotal/index.js +42 -20
  158. package/es/components/subTotal/locales.d.ts +42 -0
  159. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  160. package/es/components/ticketBooking/locales.d.ts +174 -0
  161. package/es/hooks/useEngineContext.d.ts +10 -0
  162. package/es/hooks/useWindowSize.d.ts +5 -0
  163. package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
  164. package/es/plus/selectHolder/locales.d.ts +21 -0
  165. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
  166. package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
  167. package/es/plus/skuOptionsSelection/types.d.ts +429 -0
  168. package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
  169. package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
  170. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  171. package/es/pro/NumericStepper/index.d.ts +43 -0
  172. package/es/pro/Selector/Selector.d.ts +14 -0
  173. package/es/pro/Selector/components/Card/index.d.ts +57 -0
  174. package/es/pro/Selector/components/Indicator/index.d.ts +19 -0
  175. package/es/pro/Selector/components/LayoutContainer/index.d.ts +16 -0
  176. package/es/pro/Selector/demo.d.ts +0 -1
  177. package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
  178. package/es/pro/Selector/types.d.ts +173 -0
  179. package/es/pro/pisellNumberSelector/example.d.ts +3 -0
  180. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  181. package/lib/components/Sales/Cart/index.d.ts +1 -1
  182. package/lib/components/Sales/Cart/index.js +20 -7
  183. package/lib/components/Sales/Cart/utils.d.ts +68 -0
  184. package/lib/components/Sales/Checkout/utils.d.ts +41 -0
  185. package/lib/components/Sales/Checkout/utils.js +64 -1
  186. package/lib/components/Sales/Summary/index.d.ts +2 -0
  187. package/lib/components/Sales/Summary/index.js +8 -2
  188. package/lib/components/Sales/Summary/utils.d.ts +58 -0
  189. package/lib/components/Sales/Summary/utils.js +38 -13
  190. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  191. package/lib/components/appointmentBooking/components/Cart/Item/index.js +52 -4
  192. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  193. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +5 -1
  194. package/lib/components/appointmentBooking/components/Deposit/index.js +7 -4
  195. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  196. package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
  197. package/lib/components/appointmentBooking/index.d.ts +0 -1
  198. package/lib/components/appointmentBooking/locales.d.ts +366 -0
  199. package/lib/components/booking/addons/model.d.ts +10 -1
  200. package/lib/components/booking/components/footer/index.d.ts +0 -1
  201. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  202. package/lib/components/booking/components/tabPane/index.d.ts +4 -0
  203. package/lib/components/booking/deposit/DepositItem/index.d.ts +25 -0
  204. package/lib/components/booking/deposit/index.d.ts +0 -1
  205. package/lib/components/booking/forms/model.d.ts +10 -1
  206. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  207. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  208. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  209. package/lib/components/booking/info/clientVariant/utils.d.ts +1 -0
  210. package/lib/components/booking/info/date/index.d.ts +1 -0
  211. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  212. package/lib/components/booking/info/index.d.ts +0 -1
  213. package/lib/components/booking/info/model.d.ts +10 -1
  214. package/lib/components/booking/info/notes/index.d.ts +1 -0
  215. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  216. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  217. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  218. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  219. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  220. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  221. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  222. package/lib/components/booking/info/service2/utils.d.ts +1 -0
  223. package/lib/components/booking/info/service2/utils.js +4 -4
  224. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  225. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  226. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  227. package/lib/components/booking/info2/service/editService/utils.d.ts +13 -0
  228. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  229. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  230. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  231. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  232. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  233. package/lib/components/booking/model.d.ts +9 -1
  234. package/lib/components/booking/notes/addNote/index.d.ts +3 -0
  235. package/lib/components/booking/notes/model.d.ts +10 -1
  236. package/lib/components/booking/payments/model.d.ts +10 -1
  237. package/lib/components/booking/utils.d.ts +2 -2
  238. package/lib/components/eftpos/const.d.ts +3 -1
  239. package/lib/components/eftpos/const.js +2 -0
  240. package/lib/components/eftpos/device.d.ts +3 -1
  241. package/lib/components/eftpos/device.js +3 -3
  242. package/lib/components/eftpos/index.js +20 -5
  243. package/lib/components/eftpos/index.less +26 -1
  244. package/lib/components/eftpos/locales.d.ts +3 -0
  245. package/lib/components/eftpos/locales.js +3 -0
  246. package/lib/components/eftpos/pos.d.ts +1 -0
  247. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +6 -0
  248. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +152 -0
  249. package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  250. package/lib/components/eftposPay/aggregatePayment/index.js +32 -0
  251. package/lib/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
  252. package/lib/components/eftposPay/aggregatePayment/mock.js +679 -0
  253. package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  254. package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
  255. package/lib/components/eftposPay/aggregatePayment/types.d.ts +96 -0
  256. package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
  257. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  258. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +302 -0
  259. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +132 -0
  260. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +746 -0
  261. package/lib/components/eftposPay/amount.d.ts +1 -2
  262. package/lib/components/eftposPay/app.d.ts +0 -1
  263. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  264. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  265. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  266. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  267. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  268. package/lib/components/eftposPay/const.d.ts +189 -0
  269. package/lib/components/eftposPay/const.js +2 -0
  270. package/lib/components/eftposPay/device.d.ts +1 -2
  271. package/lib/components/eftposPay/hooks.d.ts +36 -0
  272. package/lib/components/eftposPay/hooks.js +16 -0
  273. package/lib/components/eftposPay/index.d.ts +0 -1
  274. package/lib/components/eftposPay/linkly/index.d.ts +0 -1
  275. package/lib/components/eftposPay/linkly/index.js +1 -0
  276. package/lib/components/eftposPay/locales.d.ts +330 -0
  277. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  278. package/lib/components/eftposPay/manufacturer.js +6 -0
  279. package/lib/components/eftposPay/mx51/Action.d.ts +6 -0
  280. package/lib/components/eftposPay/mx51/Action.js +127 -0
  281. package/lib/components/eftposPay/mx51/const.d.ts +5 -0
  282. package/lib/components/eftposPay/mx51/const.js +85 -0
  283. package/lib/components/eftposPay/mx51/index.d.ts +6 -0
  284. package/lib/components/eftposPay/mx51/index.js +330 -0
  285. package/lib/components/eftposPay/mx51/types.d.ts +136 -0
  286. package/lib/components/eftposPay/mx51/types.js +39 -0
  287. package/lib/components/eftposPay/mx51/utils.d.ts +10 -0
  288. package/lib/components/eftposPay/mx51/utils.js +114 -0
  289. package/lib/components/eftposPay/pay.d.ts +0 -1
  290. package/lib/components/eftposPay/pay.js +4 -2
  291. package/lib/components/eftposPay/store/index.d.ts +355 -0
  292. package/lib/components/eftposPay/tyro/index.d.ts +9 -0
  293. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +4 -2
  294. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +3 -1
  295. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +77 -5
  296. package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +7 -6
  297. package/lib/components/eventBooking/components/Provider/Cart/index.js +2 -2
  298. package/lib/components/eventBooking/components/Provider/Content/index.less +1 -1
  299. package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
  300. package/lib/components/eventBooking/components/Voucher/index.js +1 -1
  301. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  302. package/lib/components/eventBooking/index.d.ts +0 -1
  303. package/lib/components/index.d.ts +1 -2
  304. package/lib/components/index.js +0 -3
  305. package/lib/components/pay/toC/PaymentList/utils.d.ts +36 -0
  306. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  307. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +2 -0
  308. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +2 -0
  309. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +2 -0
  310. package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  311. package/lib/components/pay/toC/model.d.ts +40 -0
  312. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  313. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  314. package/lib/components/productExtension/index.d.ts +0 -1
  315. package/lib/components/ruleSetting/index.d.ts +0 -1
  316. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  317. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  318. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  319. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  320. package/lib/components/schedules/products/index.d.ts +1 -0
  321. package/lib/components/schedules/resources/index.d.ts +1 -0
  322. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  323. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  324. package/lib/components/schedules/schedules/index.d.ts +1 -0
  325. package/lib/components/shoppingCart/locales.d.ts +33 -0
  326. package/lib/components/shoppingCart/type.d.ts +48 -0
  327. package/lib/components/subTotal/index.d.ts +2 -0
  328. package/lib/components/subTotal/index.js +34 -20
  329. package/lib/components/subTotal/locales.d.ts +42 -0
  330. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  331. package/lib/components/ticketBooking/locales.d.ts +174 -0
  332. package/lib/hooks/useEngineContext.d.ts +10 -0
  333. package/lib/hooks/useWindowSize.d.ts +5 -0
  334. package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
  335. package/lib/plus/selectHolder/locales.d.ts +21 -0
  336. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
  337. package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
  338. package/lib/plus/skuOptionsSelection/types.d.ts +429 -0
  339. package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
  340. package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
  341. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  342. package/lib/pro/NumericStepper/index.d.ts +43 -0
  343. package/lib/pro/Selector/Selector.d.ts +14 -0
  344. package/lib/pro/Selector/components/Card/index.d.ts +57 -0
  345. package/lib/pro/Selector/components/Indicator/index.d.ts +19 -0
  346. package/lib/pro/Selector/components/LayoutContainer/index.d.ts +16 -0
  347. package/lib/pro/Selector/demo.d.ts +0 -1
  348. package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
  349. package/lib/pro/Selector/types.d.ts +173 -0
  350. package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
  351. package/lowcode/eco-cup-list/meta.ts +63 -0
  352. package/lowcode/eco-customer-list/meta.ts +63 -0
  353. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 将SelectorValue转换为Value
3
+ */
4
+ export declare const transformSelectorValueToValue: (selectorValue: any) => {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 将value转换为SelectorGroup需要的格式
3
+ */
4
+ export declare const transformValueToSelectorValue: (value: any, dataSource: any) => any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const RelationProduct: ({ value, onChange, }: {
3
4
  value?: string[] | undefined;
@@ -0,0 +1,43 @@
1
+ import * as React from 'react';
2
+ import './index.less';
3
+ declare global {
4
+ namespace JSX {
5
+ interface IntrinsicElements {
6
+ [elemName: string]: any;
7
+ }
8
+ }
9
+ }
10
+ export interface NumericStepperProps {
11
+ /** 当前值 */
12
+ value?: number;
13
+ /** 默认值 */
14
+ defaultValue?: number;
15
+ /** 最小值 */
16
+ min?: number;
17
+ /** 最大值 */
18
+ max?: number;
19
+ /** 步长 */
20
+ step?: number;
21
+ /** 是否禁用 */
22
+ disabled?: boolean;
23
+ /** 值变化回调 */
24
+ onChange?: (value: number) => void;
25
+ /** 自定义类名 */
26
+ className?: string;
27
+ /** 自定义样式 */
28
+ styles?: {
29
+ container?: React.CSSProperties;
30
+ };
31
+ /** 尺寸 */
32
+ size?: 'small' | 'middle' | 'large';
33
+ /** 按钮形状 */
34
+ shape?: 'round' | 'square';
35
+ /** 是否显示输入框 */
36
+ showInput?: boolean;
37
+ /** 减号按钮的自定义内容 */
38
+ minusIcon?: React.ReactNode;
39
+ /** 加号按钮的自定义内容 */
40
+ plusIcon?: React.ReactNode;
41
+ }
42
+ declare const NumericStepper: React.FC<NumericStepperProps>;
43
+ export default NumericStepper;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ItemLayout, ItemProps, PresetConfig, SelectorProps, SelectorVariant } from './types';
3
+ import './selector.less';
4
+ export declare const SelectorContext: React.Context<{
5
+ disabled?: boolean | undefined;
6
+ mode?: "multiple" | "single" | undefined;
7
+ itemLayout?: ItemLayout | undefined;
8
+ valueType?: "object" | "primitive" | undefined;
9
+ variant?: SelectorVariant | undefined;
10
+ itemProps?: ItemProps | undefined;
11
+ preset?: PresetConfig | undefined;
12
+ }>;
13
+ declare const Selector: React.ForwardRefExoticComponent<SelectorProps<import("./types").OptionKey> & React.RefAttributes<unknown>>;
14
+ export default Selector;
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type CardVariant = 'outlined' | 'borderless';
4
+ export declare type CardLayout = 'vertical' | 'horizontal';
5
+ export declare type SelectedType = 'none' | 'outlined' | 'outlined-bold' | 'filled';
6
+ export declare type ActionsPosition = 'left' | 'right';
7
+ export interface CardStyles {
8
+ container?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
9
+ content?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
10
+ actions?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
11
+ corner?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
12
+ }
13
+ export interface CardStyleProps {
14
+ selected?: boolean;
15
+ disabled?: boolean;
16
+ hoverable?: boolean;
17
+ variant?: CardVariant;
18
+ layout?: CardLayout;
19
+ }
20
+ export interface CardProps {
21
+ /** 卡片变体样式 */
22
+ variant?: CardVariant;
23
+ /** 布局方向 */
24
+ layout?: CardLayout;
25
+ /** 操作按钮区域,水平模式在右侧,垂直模式在底部 */
26
+ actions?: React.ReactNode[];
27
+ /** 水平模式下,操作按钮的位置 */
28
+ actionsPosition?: ActionsPosition;
29
+ /** 垂直模式下,右上角绝对定位展示的组件 */
30
+ corner?: React.ReactNode;
31
+ /** 子内容 */
32
+ children?: React.ReactNode;
33
+ /** 选中状态 */
34
+ selected?: boolean;
35
+ /** 禁用状态 */
36
+ disabled?: boolean;
37
+ /** 是否可悬停 */
38
+ hoverable?: boolean;
39
+ /** 点击事件 */
40
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
41
+ /** 自定义样式 */
42
+ styles?: CardStyles;
43
+ /**
44
+ * 选中时的样式类型
45
+ * - none: 无样式
46
+ * - outlined: 边框高亮
47
+ * - outlined-bold: 边框高亮 + 加粗(使用 outline 实现,不影响布局)
48
+ * - filled: 填充背景色
49
+ */
50
+ selectedType?: SelectedType;
51
+ /** 自定义类名 */
52
+ className?: string;
53
+ /** 自定义样式 */
54
+ style?: React.CSSProperties;
55
+ }
56
+ declare const Card: React.FC<CardProps>;
57
+ export default Card;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface IndicatorProps {
4
+ mode?: 'single' | 'multiple';
5
+ variant?: 'outlined' | 'filled';
6
+ defaultChecked?: boolean;
7
+ checked?: boolean;
8
+ disabled?: boolean;
9
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
10
+ className?: string;
11
+ styles?: {
12
+ container?: React.CSSProperties;
13
+ indicator?: React.CSSProperties;
14
+ };
15
+ children?: React.ReactNode;
16
+ size?: 'small' | 'middle' | 'large' | number;
17
+ }
18
+ declare const Indicator: React.FC<IndicatorProps>;
19
+ export default Indicator;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { LayoutConfig } from '../../types';
3
+ interface LayoutContainerProps {
4
+ className: string;
5
+ config: LayoutConfig | null;
6
+ children: React.ReactNode[];
7
+ }
8
+ /**
9
+ * 统一的布局容器组件
10
+ *
11
+ * 支持两种布局模式:
12
+ * 1. Custom 布局(推荐):通过 className 使用预设样式,containerStyle
13
+ * 2. Ant Design Grid 布局:基础的栅格布局,用于简单场景
14
+ */
15
+ declare function LayoutContainer({ className: containerClassName, config, children, }: LayoutContainerProps): React.ReactElement | null;
16
+ export default LayoutContainer;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectorDemo: () => JSX.Element;
3
2
  export default SelectorDemo;
@@ -0,0 +1,24 @@
1
+ import { LayoutConfig, ItemLayout, PresetConfig, SelectorVariant, SelectorProps } from '../types';
2
+ interface UsePresetPropsParams {
3
+ layout?: LayoutConfig;
4
+ mode?: 'single' | 'multiple';
5
+ preset?: PresetConfig;
6
+ itemLayout?: ItemLayout;
7
+ variant?: SelectorVariant;
8
+ indicatorProps?: SelectorProps['indicatorProps'];
9
+ }
10
+ interface UsePresetPropsResult {
11
+ layout: LayoutConfig | null;
12
+ indicatorProps: SelectorProps['indicatorProps'];
13
+ }
14
+ /**
15
+ * 根据预设配置生成 layout 和 indicatorProps
16
+ * Layout 规则:
17
+ * - 根据 variant 和 preset.variant 计算布局样式
18
+ * IndicatorProps 规则:
19
+ * 1. 当 variant='card' 且 preset.variant='2' 时,indicator 默认 variant='filled'
20
+ * 2. 当 variant='media' 时,indicator 默认 variant='filled'
21
+ * 3. 外部传入的 indicatorProps 优先级更高(会合并到预设配置中)
22
+ */
23
+ declare const usePresetProps: ({ layout, mode, preset, itemLayout, variant, indicatorProps, }: UsePresetPropsParams) => UsePresetPropsResult;
24
+ export default usePresetProps;
@@ -0,0 +1,173 @@
1
+ /// <reference types="react" />
2
+ export interface ExprRule {
3
+ [key: string]: any;
4
+ }
5
+ export interface RuleConfig {
6
+ autoValidate?: boolean;
7
+ required?: 0 | 1;
8
+ min?: number;
9
+ max?: number;
10
+ mutex?: Array<Array<OptionKey>>;
11
+ customValidator?: (value: SelectionValue) => Promise<void>;
12
+ }
13
+ export interface GroupItem {
14
+ id?: number;
15
+ title?: string;
16
+ mode?: 'single' | 'multiple';
17
+ valueType?: 'primitive' | 'object';
18
+ preserve?: boolean;
19
+ fieldNames?: {
20
+ label?: string;
21
+ value?: string;
22
+ cover?: string;
23
+ };
24
+ ruleConfig?: RuleConfig;
25
+ dataSource?: OptionItem[];
26
+ }
27
+ export interface OptionItem {
28
+ id?: number;
29
+ title?: string;
30
+ label?: string;
31
+ value?: OptionKey;
32
+ cover?: string;
33
+ groups?: GroupItem[];
34
+ disabled?: boolean;
35
+ ruleConfig?: {
36
+ min?: number;
37
+ max?: number;
38
+ };
39
+ [key: string]: any;
40
+ }
41
+ export declare type OptionKey = number | string;
42
+ /** 原始值类型:单选时为id,多选时为id[] */
43
+ export declare type SelectionValuePrimitive<T = OptionKey> = T | T[];
44
+ /** 复杂对象值类型:包含id、数量等额外信息 */
45
+ export interface SelectionValueObject<T = OptionKey> {
46
+ value?: T;
47
+ quantity?: number;
48
+ [key: string]: any;
49
+ }
50
+ /** 单选值类型 */
51
+ export declare type SelectionValueSingle<T = OptionKey> = T | SelectionValueObject<T>;
52
+ /** 多选值类型 */
53
+ export declare type SelectionValueMultiple<T = OptionKey> = T[] | SelectionValueObject<T>[];
54
+ /** 选择器值类型 */
55
+ export declare type SelectionValue<T = OptionKey> = SelectionValueSingle<T> | SelectionValueMultiple<T>;
56
+ export declare type RenderItemProps = {
57
+ dataSource: OptionItem;
58
+ actions: any;
59
+ optionItemValue?: any;
60
+ indicator: React.ReactNode;
61
+ numberSelector: React.ReactNode;
62
+ values: any;
63
+ quantityInfo: {
64
+ maxReached: boolean;
65
+ remainingCount: number;
66
+ selectedCount: number;
67
+ };
68
+ };
69
+ export declare type ItemProps = {
70
+ layout?: 'vertical' | 'horizontal';
71
+ renderContent?: (props: {
72
+ dataSource: OptionItem;
73
+ }) => React.ReactNode;
74
+ styles?: {
75
+ [key: string]: React.CSSProperties;
76
+ };
77
+ [key: string]: any;
78
+ };
79
+ export declare type LayoutType = 'antdGrid' | 'custom';
80
+ export declare type LayoutConfig = {
81
+ type?: LayoutType;
82
+ className?: string;
83
+ containerStyle?: React.CSSProperties;
84
+ columns?: number;
85
+ gutter?: number | object | Array<number>;
86
+ align?: 'top' | 'middle' | 'bottom' | 'stretch';
87
+ justify?: 'start' | 'end' | 'center' | 'space-between' | 'space-around';
88
+ wrap?: boolean;
89
+ colConfig?: {
90
+ [key: string]: any;
91
+ };
92
+ };
93
+ export interface PresetConfig {
94
+ variant?: '1' | '2' | '3' | '4' | '5';
95
+ }
96
+ export declare type ItemLayout = 'vertical' | 'horizontal';
97
+ export declare type SelectorVariant = 'default' | 'select' | 'card' | 'media';
98
+ export declare type HeaderProps = {
99
+ visible?: boolean;
100
+ style?: React.CSSProperties;
101
+ title?: {
102
+ visible?: boolean;
103
+ text?: React.ReactNode;
104
+ style?: React.CSSProperties;
105
+ };
106
+ icon?: {
107
+ visible?: boolean;
108
+ icon?: React.ReactNode;
109
+ style?: React.CSSProperties;
110
+ };
111
+ tip?: {
112
+ visible?: boolean;
113
+ text?: React.ReactNode;
114
+ style?: React.CSSProperties;
115
+ };
116
+ renderExtra?: (props: {
117
+ dataSource: OptionItem;
118
+ values: SelectionValue;
119
+ }) => React.ReactNode;
120
+ };
121
+ export interface SelectorProps<T = OptionKey> extends GroupItem {
122
+ className?: string;
123
+ value?: SelectionValue<T>;
124
+ defaultValue?: SelectionValue<T>;
125
+ onChange?: (value: SelectionValue<T>) => void;
126
+ onClear?: () => void;
127
+ disabled?: boolean;
128
+ variant?: SelectorVariant;
129
+ itemLayout?: ItemLayout;
130
+ preset?: PresetConfig;
131
+ layout?: LayoutConfig;
132
+ renderItem?: (props: RenderItemProps) => React.ReactNode;
133
+ itemProps?: ItemProps;
134
+ indicatorProps?: {
135
+ show?: boolean;
136
+ variant?: 'outlined' | 'filled';
137
+ render?: (props: {
138
+ option: OptionItem;
139
+ selected: boolean;
140
+ disabled: boolean;
141
+ actions: any;
142
+ }) => React.ReactNode;
143
+ [key: string]: any;
144
+ };
145
+ showStepper?: true | false | 'auto';
146
+ stepperProps?: {
147
+ size?: 'small' | 'middle' | 'large';
148
+ shape?: 'round' | 'square';
149
+ };
150
+ style?: React.CSSProperties;
151
+ /**
152
+ * @deprecated
153
+ */
154
+ titleProps?: HeaderProps;
155
+ headerProps?: HeaderProps;
156
+ }
157
+ export interface SelectorGroupProps {
158
+ allowedValuesPolicy?: 'relaxed' | 'strict';
159
+ className?: string;
160
+ customScrollParent?: HTMLElement | string;
161
+ dataSource: GroupItem[];
162
+ defaultValue?: Record<string, SelectionValue>;
163
+ linkageRules?: ExprRule[] | Record<string, any>;
164
+ onChange?: (values: Record<string, SelectionValue>) => void;
165
+ preserve?: boolean;
166
+ tabProps?: {
167
+ visible?: boolean;
168
+ };
169
+ style?: React.CSSProperties;
170
+ value?: Record<string, SelectionValue>;
171
+ scrollToFirstError?: boolean;
172
+ [key: string]: any;
173
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Example: React.FC;
3
+ export default Example;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
3
2
  export * from './Sales';
4
3
  export default SalesModel;
@@ -13,7 +13,7 @@ interface CartContextType {
13
13
  createCartItemFromEvent: (eventItem: any) => CartItem;
14
14
  createCartItemFromHolder: (holderItem: any) => CartItem;
15
15
  addToCart: () => void;
16
- updateCartItem: (cartItem: CartItem) => CartItem;
16
+ updateCartItem: (cartItem: CartItem, updateType?: 'deposit') => CartItem;
17
17
  deleteCartItem: (cartItem: CartItem) => void;
18
18
  clickCartItem: (cartItem: CartItem) => void;
19
19
  updateCurrentCartItem: (cartItem: Partial<CartItem>) => void;
@@ -241,10 +241,7 @@ var CartProvider = ({ children }) => {
241
241
  const endDateInfo = (_g = (_f = eventItem == null ? void 0 : eventItem.eventDetail) == null ? void 0 : _f.selectDate) == null ? void 0 : _g.endDateInfo;
242
242
  const endTime = (_j = (_i = (_h = endDateInfo == null ? void 0 : endDateInfo.times) == null ? void 0 : _h.slice(-1)) == null ? void 0 : _i[0]) == null ? void 0 : _j.end_at;
243
243
  const num = 1;
244
- const { price, totalPrice, originTotal, is_charge_tax } = (0, import_utils3.handleProductInfo)(
245
- eventDetail,
246
- num
247
- );
244
+ const { price, totalPrice, originTotal, is_charge_tax } = (0, import_utils3.handleProductInfo)(eventDetail, num);
248
245
  const transformProduct = (_temp) => {
249
246
  var _a2;
250
247
  if (!((_a2 = _temp == null ? void 0 : _temp.variant) == null ? void 0 : _a2.length)) {
@@ -305,6 +302,7 @@ var CartProvider = ({ children }) => {
305
302
  event_unique_identifier: _id
306
303
  // 传递给接口用于商品可用性检测的比对
307
304
  },
305
+ _eventDetail: eventDetail,
308
306
  _productDetail: eventDetail.productDetail,
309
307
  _productOrigin: transformProduct(
310
308
  ((_p = eventDetail == null ? void 0 : eventDetail.productDetail) == null ? void 0 : _p.origin) || bookingOptionData
@@ -337,9 +335,24 @@ var CartProvider = ({ children }) => {
337
335
  });
338
336
  }
339
337
  };
340
- const updateCartItem = (cartItem) => {
341
- const newCartItems = getCurrentData().cartData.cartItems.map(
342
- (item) => item._id === cartItem._id ? cartItem : item
338
+ const updateCartItem = (cartItem, updateType) => {
339
+ var _a, _b, _c;
340
+ let newCartItems = (_c = (_b = (_a = getCurrentData()) == null ? void 0 : _a.cartData) == null ? void 0 : _b.cartItems) == null ? void 0 : _c.map(
341
+ (item) => {
342
+ if (item._id === cartItem._id) {
343
+ const _tempCartItem = { ...cartItem || {} };
344
+ if (updateType === "deposit") {
345
+ const eventDetail = _tempCartItem == null ? void 0 : _tempCartItem._eventDetail;
346
+ if (eventDetail) {
347
+ const num = (_tempCartItem == null ? void 0 : _tempCartItem.num) || 1;
348
+ const deposit = (0, import_utils3.handleProductDeposit)(_tempCartItem, eventDetail, num);
349
+ _tempCartItem.deposit = deposit;
350
+ }
351
+ }
352
+ return _tempCartItem;
353
+ }
354
+ return item;
355
+ }
343
356
  );
344
357
  setCartData({
345
358
  cartItems: newCartItems
@@ -0,0 +1,68 @@
1
+ import Decimal from 'decimal.js';
2
+ import { ICalculatePriceParams } from './types';
3
+ export declare const handleProductInfo: (eventDetail: any, num: number) => {
4
+ price: number;
5
+ totalPrice: number;
6
+ originTotal: any;
7
+ is_charge_tax: any;
8
+ };
9
+ /**
10
+ * 获取商品价格
11
+ */
12
+ export declare const getPrice: (params: ICalculatePriceParams) => number;
13
+ /**
14
+ * 获取商品总价
15
+ * @description 当前总价计算基于商品数量为1
16
+ * @param item 商品
17
+ * @returns 商品总价
18
+ */
19
+ export declare const getTotalPrice: (params: ICalculatePriceParams) => number;
20
+ /**
21
+ * 获取商品原始总价
22
+ * @description 当前总价计算基于商品数量为1
23
+ * @param item 商品
24
+ * @returns 商品原始总价
25
+ */
26
+ export declare const getOriginTotalPrice: (params: ICalculatePriceParams) => number | undefined;
27
+ export declare const handleCartItemOrigin: (cartItem: any, eventDetail: any) => any;
28
+ export declare const formatBundleToOrigin: (bundle: any) => any;
29
+ export declare const formatOptionsToOrigin: (options: any) => any;
30
+ export declare const handleProductDeposit: (cartItem: any, eventDetail: any, num: number) => {
31
+ total: number;
32
+ protocols: any;
33
+ } | null;
34
+ /**
35
+ * 获取商品定金
36
+ * @description 定金基于商品售价来算,最终乘商品数量
37
+ * 1、如果套餐主商品有定金规则,则定金为:(套餐商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
38
+ * 2、如果套餐主商品没有定金规则,子商品有定金规则,则定金为:(套餐子商品售价 * 套餐子商品定金百分比 + 套餐子商品定金固定金额)* 商品数量,最终将所有子商品定金相加
39
+ * 3、普通商品/单规格商品/组合规则商品,定金规则:(商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
40
+ * @param params 参数
41
+ * @returns 商品定金
42
+ */
43
+ export declare const getProductDeposit: (params: {
44
+ cartItem: any;
45
+ product: any;
46
+ bundle?: any;
47
+ options?: any;
48
+ num?: number;
49
+ }) => {
50
+ total: number;
51
+ protocols: any;
52
+ } | null;
53
+ /**
54
+ * 计算商品定金
55
+ * @param params 参数
56
+ * @returns 商品定金
57
+ */
58
+ export declare const calculateProductDeposit: (params: {
59
+ depositData: {
60
+ deposit_fixed?: string;
61
+ deposit_percentage?: string;
62
+ };
63
+ total: string | number;
64
+ num: number;
65
+ }) => {
66
+ result: boolean;
67
+ depositTotal: Decimal;
68
+ };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @title: 套餐单规格信息
3
+ * @description:
4
+ * @param {any} option
5
+ * @return {*}
6
+ * @Author: zhiwei.Wang
7
+ * @Date: 2024-02-19 09:26
8
+ */
9
+ export declare const formatProductOption: (option: any) => any;
10
+ /**
11
+ * @title: 套餐信息
12
+ * @description:
13
+ * @param {any} bundle
14
+ * @return {*}
15
+ * @Author: zhiwei.Wang
16
+ * @Date: 2024-02-19 09:26
17
+ */
18
+ export declare const formatProductBundle: (bundle: any) => any;
19
+ /**
20
+ * @title: 格式化下单接口数据
21
+ * @description:
22
+ * @param {any} state saledModel数据源
23
+ * @param {boolean} excludeDisabled 是否需要排除购物车中失效商品
24
+ * @Author: xiangfeng.xue
25
+ * @Date: 2025-01-21 17:57
26
+ */
27
+ export declare const formatValues: (params: {
28
+ state: any;
29
+ platform: 'h5' | 'pc';
30
+ excludeDisabled?: boolean;
31
+ extra?: Record<string, any>;
32
+ otherValue?: Record<string, any>;
33
+ }) => any;
34
+ /**
35
+ * @title: 获取拉开表单弹窗参数
36
+ * @param state
37
+ */
38
+ export declare const getFormParams: (state: any) => {
39
+ product_id: any;
40
+ appointment_type: string;
41
+ };
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
 
19
29
  // src/components/Sales/Checkout/utils.ts
@@ -25,6 +35,7 @@ __export(utils_exports, {
25
35
  getFormParams: () => getFormParams
26
36
  });
27
37
  module.exports = __toCommonJS(utils_exports);
38
+ var import_decimal = __toESM(require("decimal.js"));
28
39
  var formatProductOption = (option) => {
29
40
  if (!option) {
30
41
  return [];
@@ -57,10 +68,62 @@ var formatProductBundle = (bundle) => {
57
68
  var formatBookings = (list) => {
58
69
  let bookings = [];
59
70
  bookings = list.map((item) => {
60
- return item._originData;
71
+ var _a, _b, _c;
72
+ const newOriginData = { ...item._originData || {} };
73
+ const product = (newOriginData == null ? void 0 : newOriginData.product) || {};
74
+ const discount_list = product == null ? void 0 : product.discount_list;
75
+ const main_product_discount = discount_list == null ? void 0 : discount_list.filter(
76
+ (d) => {
77
+ var _a2;
78
+ return !((_a2 = d.metadata) == null ? void 0 : _a2.custom_product_bundle_map_id);
79
+ }
80
+ );
81
+ if (main_product_discount == null ? void 0 : main_product_discount.length) {
82
+ product.metadata = {
83
+ product_discount_difference: handleProductDiscountDifference([
84
+ main_product_discount
85
+ ])
86
+ };
87
+ }
88
+ console.log("main_product_discount", main_product_discount);
89
+ if ((_a = product == null ? void 0 : product.product_bundle) == null ? void 0 : _a.length) {
90
+ product.product_bundle = (_c = (_b = product == null ? void 0 : product.product_bundle) == null ? void 0 : _b.map) == null ? void 0 : _c.call(_b, (v) => {
91
+ var _a2, _b2, _c2, _d;
92
+ const bundle_item_discount = [];
93
+ (_b2 = (_a2 = item == null ? void 0 : item.selectedBundle) == null ? void 0 : _a2.forEach) == null ? void 0 : _b2.call(_a2, (s) => {
94
+ if ((s == null ? void 0 : s.id) === (v == null ? void 0 : v.bundle_id) && (s == null ? void 0 : s.group_id) === (v == null ? void 0 : v.bundle_group_id) && (s == null ? void 0 : s._bundle_product_id) === (v == null ? void 0 : v.bundle_product_id)) {
95
+ bundle_item_discount.push(...(s == null ? void 0 : s.discount_list) || []);
96
+ }
97
+ });
98
+ console.log("bundle_item_discount", bundle_item_discount);
99
+ const newBundleItem = { ...v || {} };
100
+ if (bundle_item_discount == null ? void 0 : bundle_item_discount.length) {
101
+ newBundleItem.metadata = {
102
+ custom_product_bundle_map_id: (_d = (_c2 = bundle_item_discount == null ? void 0 : bundle_item_discount[0]) == null ? void 0 : _c2.metadata) == null ? void 0 : _d.custom_product_bundle_map_id,
103
+ product_discount_difference: handleProductDiscountDifference(bundle_item_discount)
104
+ };
105
+ }
106
+ return newBundleItem;
107
+ });
108
+ }
109
+ newOriginData.product = product;
110
+ return newOriginData;
61
111
  });
112
+ console.log("bookings>>>>", bookings);
62
113
  return bookings;
63
114
  };
115
+ var handleProductDiscountDifference = (discount_list) => {
116
+ const product_discount_difference = discount_list == null ? void 0 : discount_list.reduce(
117
+ (pre, cur) => {
118
+ var _a;
119
+ return pre.plus(
120
+ new import_decimal.default(((_a = cur == null ? void 0 : cur.metadata) == null ? void 0 : _a.product_discount_difference) || 0)
121
+ );
122
+ },
123
+ new import_decimal.default(0)
124
+ );
125
+ return product_discount_difference.toNumber();
126
+ };
64
127
  var formatValues = (params) => {
65
128
  var _a, _b;
66
129
  const { state, otherValue, platform, excludeDisabled, extra } = params;
@@ -7,6 +7,8 @@ interface SummaryContextType {
7
7
  taxTitle?: string;
8
8
  totalTaxFee?: string;
9
9
  isPriceIncludeTax?: 0 | 1;
10
+ taxRate?: number;
11
+ surcharge?: any;
10
12
  deposit?: {
11
13
  total: string;
12
14
  protocols: any[];