@pisell/private-materials 3.2.22 → 3.2.25

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 (337) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/assets/guests.svg +1 -0
  12. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +134 -105
  13. package/es/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
  14. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  15. package/es/components/appointmentBooking/components/Cart/Item/index.js +43 -21
  16. package/es/components/appointmentBooking/components/Cart/Item/index.less +14 -9
  17. package/es/components/appointmentBooking/components/Cart/index.js +3 -2
  18. package/es/components/appointmentBooking/components/Cart/index.less +1 -1
  19. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  20. package/es/components/appointmentBooking/components/Content/index.js +25 -13
  21. package/es/components/appointmentBooking/components/Content/index.less +15 -0
  22. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
  23. package/es/components/appointmentBooking/components/Date/index.js +50 -33
  24. package/es/components/appointmentBooking/components/Date/index.less +11 -0
  25. package/es/components/appointmentBooking/components/Footer/index.js +7 -2
  26. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  27. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
  28. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  29. package/es/components/appointmentBooking/components/Guest/index.js +25 -18
  30. package/es/components/appointmentBooking/components/Guest/index.less +3 -3
  31. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  32. package/es/components/appointmentBooking/components/Header/index.js +50 -8
  33. package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  34. package/es/components/appointmentBooking/components/Resource/index.js +19 -29
  35. package/es/components/appointmentBooking/components/Resource/index.less +5 -1
  36. package/es/components/appointmentBooking/components/Services/index.js +7 -9
  37. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  38. package/es/components/appointmentBooking/components/TimeSlicing/index.js +55 -35
  39. package/es/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
  40. package/es/components/appointmentBooking/components/Voucher/index.js +38 -28
  41. package/es/components/appointmentBooking/context.d.ts +2 -0
  42. package/es/components/appointmentBooking/context.js +7 -1
  43. package/es/components/appointmentBooking/hooks.d.ts +49 -10
  44. package/es/components/appointmentBooking/hooks.js +191 -134
  45. package/es/components/appointmentBooking/index.d.ts +0 -1
  46. package/es/components/appointmentBooking/index.js +12 -8
  47. package/es/components/appointmentBooking/locales.d.ts +36 -0
  48. package/es/components/appointmentBooking/locales.js +36 -0
  49. package/es/components/appointmentBooking/utils.d.ts +28 -0
  50. package/es/components/appointmentBooking/utils.js +86 -2
  51. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  52. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  53. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  54. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  55. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  56. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  57. package/es/components/booking/components/footer/utils.js +15 -15
  58. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  59. package/es/components/booking/components/voucher/index.d.ts +1 -1
  60. package/es/components/booking/components/voucher/index.js +39 -37
  61. package/es/components/booking/deposit/index.d.ts +0 -1
  62. package/es/components/booking/forms/single/index.d.ts +0 -1
  63. package/es/components/booking/forms/table/index.d.ts +0 -1
  64. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  65. package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
  66. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  67. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  68. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  69. package/es/components/booking/info/date/index.d.ts +0 -1
  70. package/es/components/booking/info/header/index.d.ts +0 -1
  71. package/es/components/booking/info/index.d.ts +0 -1
  72. package/es/components/booking/info/notes/index.d.ts +0 -1
  73. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  74. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  75. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  76. package/es/components/booking/info/service/like/index.d.ts +0 -1
  77. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  78. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  79. package/es/components/booking/info/service2/utils.d.ts +1 -1
  80. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  81. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  82. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  83. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  84. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  85. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  86. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  87. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  88. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  89. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  90. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  91. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  92. package/es/components/eftpos/form/index.d.ts +0 -1
  93. package/es/components/eftpos/group/index.d.ts +0 -1
  94. package/es/components/eftpos/hooks.d.ts +0 -1
  95. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  96. package/es/components/eftpos/icon/device.d.ts +0 -1
  97. package/es/components/eftpos/index.d.ts +0 -1
  98. package/es/components/eftpos/pos.d.ts +0 -1
  99. package/es/components/eftpos/receipt/index.d.ts +0 -1
  100. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  101. package/es/components/eftposPay/amount.d.ts +0 -1
  102. package/es/components/eftposPay/app.d.ts +0 -1
  103. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  104. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  105. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  106. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  107. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  108. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  109. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  110. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  111. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  112. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  113. package/es/components/eftposPay/device.d.ts +0 -1
  114. package/es/components/eftposPay/index.d.ts +0 -1
  115. package/es/components/eftposPay/pay.d.ts +0 -1
  116. package/es/components/eftposPay/payo/config.d.ts +0 -1
  117. package/es/components/eftposPay/store/index.d.ts +1 -1
  118. package/es/components/eftposPay/tip.d.ts +0 -1
  119. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  120. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  121. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  122. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  123. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  124. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  125. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  126. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  127. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  128. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  129. package/es/components/eventBooking/index.d.ts +0 -1
  130. package/es/components/login/index.d.ts +0 -1
  131. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  132. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  133. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  134. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  135. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  137. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  138. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  139. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  140. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  141. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  142. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  143. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  144. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  145. package/es/components/schedules/calendar/index.d.ts +0 -1
  146. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  147. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  148. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  149. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  150. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  151. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  152. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  153. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  154. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  155. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  156. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  157. package/es/components/schedules/products/index.d.ts +0 -1
  158. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  159. package/es/components/schedules/products/list/index.d.ts +0 -1
  160. package/es/components/schedules/resources/index.d.ts +0 -1
  161. package/es/components/schedules/resources/list/index.d.ts +0 -1
  162. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  163. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  164. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  165. package/es/components/schedules/schedules/index.d.ts +0 -1
  166. package/es/components/schedules/utils.d.ts +1 -1
  167. package/es/components/shoppingCart/components/Cart/Product.js +3 -0
  168. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  169. package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
  170. package/es/components/shoppingCart/index.d.ts +0 -1
  171. package/es/components/shoppingCart/type.d.ts +1 -0
  172. package/es/components/taxSelect/index.d.ts +0 -1
  173. package/es/utils/index.d.ts +1 -1
  174. package/lib/components/appointmentBooking/assets/guests.svg +1 -0
  175. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +68 -32
  176. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
  177. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  178. package/lib/components/appointmentBooking/components/Cart/Item/index.js +36 -13
  179. package/lib/components/appointmentBooking/components/Cart/Item/index.less +14 -9
  180. package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
  181. package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
  182. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  183. package/lib/components/appointmentBooking/components/Content/index.js +11 -7
  184. package/lib/components/appointmentBooking/components/Content/index.less +15 -0
  185. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
  186. package/lib/components/appointmentBooking/components/Date/index.js +80 -68
  187. package/lib/components/appointmentBooking/components/Date/index.less +11 -0
  188. package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
  189. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  190. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
  191. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  192. package/lib/components/appointmentBooking/components/Guest/index.js +24 -6
  193. package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
  194. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  195. package/lib/components/appointmentBooking/components/Header/index.js +31 -4
  196. package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  197. package/lib/components/appointmentBooking/components/Resource/index.js +16 -21
  198. package/lib/components/appointmentBooking/components/Resource/index.less +5 -1
  199. package/lib/components/appointmentBooking/components/Services/index.js +9 -2
  200. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  201. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +33 -23
  202. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
  203. package/lib/components/appointmentBooking/components/Voucher/index.js +30 -24
  204. package/lib/components/appointmentBooking/context.d.ts +2 -0
  205. package/lib/components/appointmentBooking/context.js +4 -1
  206. package/lib/components/appointmentBooking/hooks.d.ts +49 -10
  207. package/lib/components/appointmentBooking/hooks.js +49 -50
  208. package/lib/components/appointmentBooking/index.d.ts +0 -1
  209. package/lib/components/appointmentBooking/index.js +11 -7
  210. package/lib/components/appointmentBooking/locales.d.ts +36 -0
  211. package/lib/components/appointmentBooking/locales.js +36 -0
  212. package/lib/components/appointmentBooking/utils.d.ts +28 -0
  213. package/lib/components/appointmentBooking/utils.js +48 -2
  214. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  215. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  216. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  217. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  218. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  219. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  220. package/lib/components/booking/components/footer/utils.js +1 -15
  221. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  222. package/lib/components/booking/components/voucher/index.d.ts +1 -1
  223. package/lib/components/booking/components/voucher/index.js +31 -25
  224. package/lib/components/booking/deposit/index.d.ts +0 -1
  225. package/lib/components/booking/forms/single/index.d.ts +0 -1
  226. package/lib/components/booking/forms/table/index.d.ts +0 -1
  227. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  228. package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
  229. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  230. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  231. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  232. package/lib/components/booking/info/date/index.d.ts +0 -1
  233. package/lib/components/booking/info/header/index.d.ts +0 -1
  234. package/lib/components/booking/info/index.d.ts +0 -1
  235. package/lib/components/booking/info/notes/index.d.ts +0 -1
  236. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  237. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  238. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  239. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  240. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  241. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  242. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  243. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  244. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  245. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  246. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  247. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  248. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  249. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  250. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  251. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  252. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  253. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  254. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  255. package/lib/components/eftpos/form/index.d.ts +0 -1
  256. package/lib/components/eftpos/group/index.d.ts +0 -1
  257. package/lib/components/eftpos/hooks.d.ts +0 -1
  258. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  259. package/lib/components/eftpos/icon/device.d.ts +0 -1
  260. package/lib/components/eftpos/index.d.ts +0 -1
  261. package/lib/components/eftpos/pos.d.ts +0 -1
  262. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  263. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  264. package/lib/components/eftposPay/amount.d.ts +0 -1
  265. package/lib/components/eftposPay/app.d.ts +0 -1
  266. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  267. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  268. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  269. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  270. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  271. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  272. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  273. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  274. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  275. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  276. package/lib/components/eftposPay/device.d.ts +0 -1
  277. package/lib/components/eftposPay/index.d.ts +0 -1
  278. package/lib/components/eftposPay/pay.d.ts +0 -1
  279. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  280. package/lib/components/eftposPay/store/index.d.ts +1 -1
  281. package/lib/components/eftposPay/tip.d.ts +0 -1
  282. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  283. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  284. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  285. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  286. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  287. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  288. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  289. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  290. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  291. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  292. package/lib/components/eventBooking/index.d.ts +0 -1
  293. package/lib/components/login/index.d.ts +0 -1
  294. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  295. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  296. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  297. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  298. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  299. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  300. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  301. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  302. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  303. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  304. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  305. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  306. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  307. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  308. package/lib/components/schedules/calendar/index.d.ts +0 -1
  309. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  310. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  311. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  312. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  313. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  314. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  315. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  316. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  317. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  318. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  319. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  320. package/lib/components/schedules/products/index.d.ts +0 -1
  321. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  322. package/lib/components/schedules/products/list/index.d.ts +0 -1
  323. package/lib/components/schedules/resources/index.d.ts +0 -1
  324. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  325. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  326. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  327. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  328. package/lib/components/schedules/schedules/index.d.ts +0 -1
  329. package/lib/components/schedules/utils.d.ts +1 -1
  330. package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
  331. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  332. package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
  333. package/lib/components/shoppingCart/index.d.ts +0 -1
  334. package/lib/components/shoppingCart/type.d.ts +1 -0
  335. package/lib/components/taxSelect/index.d.ts +0 -1
  336. package/lib/utils/index.d.ts +1 -1
  337. package/package.json +4 -4
@@ -0,0 +1 @@
1
+ <svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M30.6 18.8a1 1 0 0 1-1.4-.2A6.45 6.45 0 0 0 24 16a1 1 0 0 1 0-2 3 3 0 1 0-2.905-3.75 1 1 0 0 1-1.937-.5 5 5 0 1 1 8.217 4.939 8.5 8.5 0 0 1 3.429 2.71A1 1 0 0 1 30.6 18.8m-6.735 7.7a1 1 0 1 1-1.73 1 7.125 7.125 0 0 0-12.27 0 1 1 0 1 1-1.73-1 9 9 0 0 1 4.217-3.74 6 6 0 1 1 7.296 0 9 9 0 0 1 4.217 3.74M16 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8m-7-7a1 1 0 0 0-1-1 3 3 0 1 1 2.905-3.75 1 1 0 0 0 1.938-.5 5 5 0 1 0-8.218 4.939 8.5 8.5 0 0 0-3.425 2.71A1 1 0 1 0 2.8 18.6 6.45 6.45 0 0 1 8 16a1 1 0 0 0 1-1"></path></svg>
@@ -11,22 +11,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useMemo, useState } from 'react';
12
12
  import { locales } from '@pisell/utils';
13
13
  import { Button, PisellToast } from '@pisell/materials';
14
- // import {
15
- // useCart,
16
- // useHolder,
17
- // useStep,
18
- // useCheckout,
19
- // useSales,
20
- // useCustomer,
21
- // } from '../../../../../Sales';
22
- import { formatValues } from "../../../../Sales/Checkout/utils";
23
- // import OrderProductModal from '../../OrderProductModal/index';
24
- // import EmptyHolderModal from '../../EmptyHolderModal';
25
14
  import useEngineContext from "../../../../../hooks/useEngineContext";
26
- import { useAppointmentBookingLogin } from "../../../hooks";
15
+ import { useAppointmentBookingLogin, useAppointmentBookingResource, useAppointmentBookingAccount, useShopDiscount } from "../../../hooks";
27
16
  import { useAppointmentBookingContext } from "../../../context";
17
+ import { formatCustomer, isEmptyCartsResourceId } from "../../../utils";
28
18
  import "./index.less";
29
19
  var ContinueButton = function ContinueButton() {
20
+ var _currentStep$step2;
30
21
  var context = useEngineContext();
31
22
  var utils = context.appHelper.utils || {};
32
23
  var _useState = useState(false),
@@ -36,54 +27,51 @@ var ContinueButton = function ContinueButton() {
36
27
  var _useAppointmentBookin = useAppointmentBookingLogin(),
37
28
  isLogin = _useAppointmentBookin.isLogin,
38
29
  openLoginModal = _useAppointmentBookin.openLoginModal;
39
- var _useAppointmentBookin2 = useAppointmentBookingContext(),
40
- currentStep = _useAppointmentBookin2.currentStep,
41
- isLastStep = _useAppointmentBookin2.isLastStep,
42
- carts = _useAppointmentBookin2.carts,
43
- appointmentBooking = _useAppointmentBookin2.appointmentBooking;
44
- var data = {};
45
- var createBooking = {
46
- loading: false
47
- };
48
- var checkBeforeBooking = {
49
- loading: false
50
- };
30
+ var _useAppointmentBookin2 = useAppointmentBookingAccount(),
31
+ accountLists = _useAppointmentBookin2.accountLists;
32
+ var shopDiscount = useShopDiscount();
33
+ var _useAppointmentBookin3 = useAppointmentBookingContext(),
34
+ currentStep = _useAppointmentBookin3.currentStep,
35
+ isLastStep = _useAppointmentBookin3.isLastStep,
36
+ carts = _useAppointmentBookin3.carts,
37
+ appointmentBooking = _useAppointmentBookin3.appointmentBooking,
38
+ resourceOtherParams = _useAppointmentBookin3.resourceOtherParams,
39
+ summary = _useAppointmentBookin3.summary;
40
+ var _useAppointmentBookin4 = useAppointmentBookingResource(),
41
+ getResourceTimeSlot = _useAppointmentBookin4.getResourceTimeSlot,
42
+ getResourceList = _useAppointmentBookin4.getResourceList;
43
+ var disabled = useMemo(function () {
44
+ var _currentStep$step;
45
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key;
46
+ if (!carts.length) return true;
47
+
48
+ // 选择资源部分需要判断是否有不可用的资源
49
+ // if (
50
+ // key === 'select-resource' &&
51
+ // resourceOtherParams?.errorList?.length > 0
52
+ // ) {
53
+ // return true;
54
+ // }
55
+
56
+ // 如果是选择服务页面,则判断是否账户下有空的购物车
57
+ // if (key === 'select-service' && isEmptyGuest(carts, accountLists)) {
58
+ // return true;
59
+ // }
60
+
61
+ return false;
62
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key, carts, accountLists, resourceOtherParams === null || resourceOtherParams === void 0 ? void 0 : resourceOtherParams.errorList]);
51
63
 
52
64
  /**
53
- * @title: 下单
65
+ * @title: 清空数据
54
66
  * @description:
55
67
  * @return {*}
56
68
  * @Author: WangHan
57
- * @Date: 2025-02-10 17:54
69
+ * @Date: 2025-04-16 17:55
58
70
  */
59
- var handleCheckout = /*#__PURE__*/function () {
60
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
61
- var value, result, _result$err;
62
- return _regeneratorRuntime().wrap(function _callee$(_context) {
63
- while (1) switch (_context.prev = _context.next) {
64
- case 0:
65
- value = formatValues(data); // 如果检测成功,则直接下单
66
- // const result = await onCheckout(value);
67
- result = {
68
- success: true
69
- }; // 清空数据
70
- if (result !== null && result !== void 0 && result.success) {
71
- // removeSessionStorage();
72
- } else {
73
- PisellToast({
74
- content: (result === null || result === void 0 || (_result$err = result.err) === null || _result$err === void 0 ? void 0 : _result$err.message) || ''
75
- });
76
- }
77
- case 3:
78
- case "end":
79
- return _context.stop();
80
- }
81
- }, _callee);
82
- }));
83
- return function handleCheckout() {
84
- return _ref.apply(this, arguments);
85
- };
86
- }();
71
+ var clearData = function clearData() {
72
+ appointmentBooking.destroy();
73
+ shopDiscount.destroy();
74
+ };
87
75
 
88
76
  /**
89
77
  * @title: 下一步
@@ -93,50 +81,83 @@ var ContinueButton = function ContinueButton() {
93
81
  * @Date: 2025-02-08 18:57
94
82
  */
95
83
  var handleNextStep = /*#__PURE__*/function () {
96
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
97
- var res;
98
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
99
- while (1) switch (_context2.prev = _context2.next) {
84
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
85
+ var _currentStep$step3, _currentStep$step4;
86
+ var res, _freeResult$data, _ref2, order_id, total_amount, freeResult, _utils$history, url, _freeResult$data2;
87
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
88
+ while (1) switch (_context.prev = _context.next) {
100
89
  case 0:
101
90
  if (!isLastStep) {
102
- _context2.next = 16;
91
+ _context.next = 24;
103
92
  break;
104
93
  }
105
94
  setLoading(true);
106
- _context2.prev = 2;
107
- _context2.next = 5;
95
+ _context.prev = 2;
96
+ _context.next = 5;
108
97
  return appointmentBooking.submitOrder();
109
98
  case 5:
110
- res = _context2.sent;
111
- console.log(isLastStep, isLogin, res, 'wh9896788');
99
+ res = _context.sent;
100
+ if (!((summary === null || summary === void 0 ? void 0 : summary.total) > 0)) {
101
+ _context.next = 10;
102
+ break;
103
+ }
104
+ // 拉起支付弹窗
112
105
  utils.action({
113
106
  type: 'pisell1.payment',
114
- data: res === null || res === void 0 ? void 0 : res.data,
115
- callback: function callback(e) {
116
- console.log(e, 'wh9896788');
117
- // checkoutCallback.current && checkoutCallback.current(e);
118
- }
107
+ data: res === null || res === void 0 ? void 0 : res.data
119
108
  });
109
+ _context.next = 16;
110
+ break;
111
+ case 10:
112
+ // 免费领取
113
+ _ref2 = (res === null || res === void 0 ? void 0 : res.data) || {}, order_id = _ref2.order_id, total_amount = _ref2.total_amount;
114
+ _context.next = 13;
115
+ return appointmentBooking.getFreeProduct(order_id);
116
+ case 13:
117
+ freeResult = _context.sent;
118
+ console.log(freeResult, 'freeResult');
119
+ if (freeResult !== null && freeResult !== void 0 && (_freeResult$data = freeResult.data) !== null && _freeResult$data !== void 0 && _freeResult$data.status) {
120
+ url = "/payment-finish/success?order_id=".concat(order_id, "&amount=").concat(Number(total_amount));
121
+ utils === null || utils === void 0 || (_utils$history = utils.history) === null || _utils$history === void 0 || _utils$history.replace(url);
122
+ } else {
123
+ PisellToast({
124
+ content: freeResult === null || freeResult === void 0 || (_freeResult$data2 = freeResult.data) === null || _freeResult$data2 === void 0 ? void 0 : _freeResult$data2.message
125
+ });
126
+ }
127
+ case 16:
128
+ clearData();
120
129
  setLoading(false);
121
- _context2.next = 15;
130
+ _context.next = 23;
122
131
  break;
123
- case 11:
124
- _context2.prev = 11;
125
- _context2.t0 = _context2["catch"](2);
126
- console.log(isLastStep, isLogin, _context2.t0, 'wh9896788');
132
+ case 20:
133
+ _context.prev = 20;
134
+ _context.t0 = _context["catch"](2);
127
135
  setLoading(false);
128
- case 15:
129
- return _context2.abrupt("return");
130
- case 16:
131
- return _context2.abrupt("return", appointmentBooking.next());
132
- case 17:
136
+ case 23:
137
+ return _context.abrupt("return");
138
+ case 24:
139
+ if ((currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key) === 'select-resource') {
140
+ getResourceTimeSlot();
141
+ }
142
+ if ((currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key) === 'select-time') {
143
+ // getResourceTimeSlot('resources');
144
+ // const { errorList } =
145
+ // await appointmentBooking.autoSelectAllProductResources(
146
+ // 'sites',
147
+ // selectedTime
148
+ // );
149
+ // const result = await appointmentBooking.submitTimeSlot(selectedTime);
150
+ // console.log(errorList, result, 'wh9896788');
151
+ }
152
+ return _context.abrupt("return", appointmentBooking.next());
153
+ case 27:
133
154
  case "end":
134
- return _context2.stop();
155
+ return _context.stop();
135
156
  }
136
- }, _callee2, null, [[2, 11]]);
157
+ }, _callee, null, [[2, 20]]);
137
158
  }));
138
159
  return function handleNextStep() {
139
- return _ref2.apply(this, arguments);
160
+ return _ref.apply(this, arguments);
140
161
  };
141
162
  }();
142
163
 
@@ -148,32 +169,53 @@ var ContinueButton = function ContinueButton() {
148
169
  * @Date: 2025-01-16 16:30
149
170
  */
150
171
  var handleContinue = /*#__PURE__*/function () {
151
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
152
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
153
- while (1) switch (_context3.prev = _context3.next) {
172
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
173
+ var _currentStep$step5;
174
+ var key;
175
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
176
+ while (1) switch (_context2.prev = _context2.next) {
154
177
  case 0:
178
+ key = currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.key;
179
+ console.log(currentStep, isLastStep, isLogin, 'wh9896788222');
180
+ // 如果当前是确认信息页面,则到结算页面
155
181
  if (!isLastStep) {
156
- _context3.next = 3;
182
+ _context2.next = 5;
157
183
  break;
158
184
  }
159
185
  if (isLogin) {
160
- _context3.next = 3;
186
+ _context2.next = 5;
161
187
  break;
162
188
  }
163
- return _context3.abrupt("return", openLoginModal({
189
+ return _context2.abrupt("return", openLoginModal({
164
190
  callback: function callback(status) {
191
+ var _utils$store;
192
+ var user = (_utils$store = utils.store) === null || _utils$store === void 0 || (_utils$store = _utils$store.getState()) === null || _utils$store === void 0 || (_utils$store = _utils$store.global) === null || _utils$store === void 0 ? void 0 : _utils$store.userInfo;
193
+ var currentUser = formatCustomer(user);
194
+ var meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
195
+ return !(d !== null && d !== void 0 && d.isGuest);
196
+ });
165
197
  if (status === 'success') {
198
+ appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
166
199
  handleNextStep();
167
200
  }
168
201
  }
169
202
  }));
170
- case 3:
203
+ case 5:
204
+ if (!(key === 'select-resource' && isEmptyCartsResourceId(carts))) {
205
+ _context2.next = 8;
206
+ break;
207
+ }
208
+ PisellToast({
209
+ content: locales.getText('pisell2.appointment.no.available.time')
210
+ });
211
+ return _context2.abrupt("return");
212
+ case 8:
171
213
  handleNextStep();
172
- case 4:
214
+ case 9:
173
215
  case "end":
174
- return _context3.stop();
216
+ return _context2.stop();
175
217
  }
176
- }, _callee3);
218
+ }, _callee2);
177
219
  }));
178
220
  return function handleContinue() {
179
221
  return _ref3.apply(this, arguments);
@@ -195,21 +237,8 @@ var ContinueButton = function ContinueButton() {
195
237
  return locales.getText('pisell2.event.close.continue');
196
238
  }
197
239
  }, [isLastStep]);
198
-
199
- /**
200
- * @title: 确认按钮loading
201
- * @description:
202
- * @param {*} useMemo
203
- * @return {*}
204
- * @Author: WangHan
205
- * @Date: 2025-01-21 23:03
206
- */
207
- var confirmLoading = useMemo(function () {
208
- if (!isLastStep) return false;
209
- return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
210
- }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
211
240
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
212
- disabled: !(carts !== null && carts !== void 0 && carts.length),
241
+ disabled: disabled,
213
242
  size: "large",
214
243
  type: "primary",
215
244
  onClick: function onClick() {
@@ -18,8 +18,9 @@ var Total = function Total(_ref) {
18
18
  totalTaxFee = summary.totalTaxFee,
19
19
  isPriceIncludeTax = summary.isPriceIncludeTax,
20
20
  total = summary.total;
21
+ console.log(summary, 'summarysummary');
21
22
  return /*#__PURE__*/React.createElement("div", {
22
- className: "event-total-wrap ".concat(className)
23
+ className: "appointment-total-wrap ".concat(className)
23
24
  }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
24
25
  className: "gst-wrap"
25
26
  }, /*#__PURE__*/React.createElement("span", null, taxTitle, isFooter ? ': ' : ''), /*#__PURE__*/React.createElement(PisellText.Amount, {
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const CartItem: () => JSX.Element;
2
+ declare const CartItem: ({ onConfirm }: any) => JSX.Element;
3
3
  export default CartItem;
@@ -1,26 +1,36 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
7
  import React, { useMemo } from 'react';
2
8
  import { isMobile, locales } from '@pisell/utils';
3
9
  import ShoppingCart from "../../../../shoppingCart";
4
10
  import ContinueButton from "../ContinueButton";
5
- import { useAppointmentBookingAccount, useAppointmentBooking } from "../../../hooks";
11
+ import { useAppointmentBooking } from "../../../hooks";
6
12
  import { useAppointmentBookingContext } from "../../../context";
7
- import Total from "./Total";
8
- import { formatHolder, formatCarts } from "../../../utils";
13
+ import { useAppointmentBookingAccount, useAppointmentBookingResource } from "../../../hooks";
14
+ import { formatHolder, formatCarts, formatCurrentUser } from "../../../utils";
9
15
  import VoucherCard from "../../Voucher";
16
+ import Total from "./Total";
10
17
  import "./index.less";
11
- var CartItem = function CartItem() {
18
+ var CartItem = function CartItem(_ref) {
12
19
  var _currentStep$step, _currentStep$step2;
20
+ var onConfirm = _ref.onConfirm;
13
21
  var appointmentBooking = useAppointmentBooking();
14
- var appointmentBookingAccount = useAppointmentBookingAccount();
15
22
  var _useAppointmentBookin = useAppointmentBookingContext(),
16
23
  carts = _useAppointmentBookin.carts,
17
- summary = _useAppointmentBookin.summary,
18
24
  isLastStep = _useAppointmentBookin.isLastStep,
19
25
  currentStep = _useAppointmentBookin.currentStep,
20
- resources = _useAppointmentBookin.resources;
21
- var accountLists = appointmentBookingAccount.accountLists,
22
- currentUser = appointmentBookingAccount.currentUser;
23
- console.log(summary, carts, formatCarts(carts, resources), 'accountLists');
26
+ resources = _useAppointmentBookin.resources,
27
+ setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
28
+ resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
29
+ var _useAppointmentBookin2 = useAppointmentBookingAccount(),
30
+ accountLists = _useAppointmentBookin2.accountLists;
31
+ var _useAppointmentBookin3 = useAppointmentBookingResource(),
32
+ getResourceList = _useAppointmentBookin3.getResourceList;
33
+ var currentUser = formatCurrentUser();
24
34
  var holderIds = useMemo(function () {
25
35
  return accountLists.map(function (item) {
26
36
  return item.id;
@@ -29,28 +39,38 @@ var CartItem = function CartItem() {
29
39
  var holders = useMemo(function () {
30
40
  return formatHolder(accountLists);
31
41
  }, [accountLists]);
32
- var handleClickCard = function handleClickCard(e, type, key) {
33
- console.log(e, type, key, 'wh9988767');
34
-
42
+ var handleClickCard = function handleClickCard(e, type, val) {
35
43
  // 更改备注
36
44
  if (type === 'note') {
37
- return appointmentBooking.updateCart(e === null || e === void 0 ? void 0 : e._id, {
38
- products: e
39
- });
45
+ return appointmentBooking.updateCart(_objectSpread({
46
+ _id: e === null || e === void 0 ? void 0 : e._id
47
+ }, val));
40
48
  }
41
49
 
42
50
  // 删除购物车下某个商品
43
51
  if (type === 'delete') {
44
- // return appointmentBooking.updateCart(e?._id, { products: e });
52
+ return appointmentBooking.deleteCart(e === null || e === void 0 ? void 0 : e._id);
45
53
  }
46
54
 
47
55
  // 删除购物车
48
56
  if (type === 'delete_holders') {
49
- return appointmentBooking.removeAccount(key);
57
+ return appointmentBooking.removeAccount(val);
58
+ }
59
+
60
+ // 更改资源
61
+ if (type === 'change_resource') {
62
+ // 清空资源分配失败数据
63
+ setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
64
+ errorList: null
65
+ }));
66
+ return appointmentBooking.updateCart({
67
+ _id: e === null || e === void 0 ? void 0 : e._id,
68
+ resources: [val]
69
+ });
50
70
  }
51
71
  };
52
72
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
53
- className: "cart-item-wrap ".concat(isMobile() ? 'cart-mobile-item-wrap' : '')
73
+ className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
54
74
  }, /*#__PURE__*/React.createElement("div", {
55
75
  className: "content"
56
76
  }, /*#__PURE__*/React.createElement(ShoppingCart, {
@@ -60,7 +80,8 @@ var CartItem = function CartItem() {
60
80
  holders: holders,
61
81
  disabledEdit: isLastStep,
62
82
  isShowChangeResource: (currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key) === 'select-resource',
63
- isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.index) < 2
83
+ isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key) === 'select-service',
84
+ isShowPackageNote: false
64
85
  },
65
86
  collapseParams: {
66
87
  activeKey: holderIds,
@@ -69,11 +90,12 @@ var CartItem = function CartItem() {
69
90
  platform: "h5",
70
91
  emptyText: locales.getText('pisell2.event.empty.service'),
71
92
  isOpenGroup: !!(holderIds !== null && holderIds !== void 0 && holderIds.length),
93
+ isHideClearCart: true,
72
94
  onChange: function onChange(e, type, key) {
73
95
  return handleClickCard(e, type, key);
74
96
  }
75
97
  })), /*#__PURE__*/React.createElement("div", {
76
- className: "event-footer"
98
+ className: "appointment-footer"
77
99
  }, /*#__PURE__*/React.createElement(VoucherCard, {
78
100
  currentUser: currentUser,
79
101
  products: carts
@@ -1,8 +1,11 @@
1
- .cart-item-wrap {
2
- height: 100%;
1
+ .appointment-cart-item-wrap {
2
+ height: calc(100vh - 100px);
3
3
  .content {
4
4
  background: #fff;
5
- padding: 20px;
5
+ padding: 0 16px;
6
+ max-height: calc(100% - 240px);
7
+ overflow-y: auto;
8
+
6
9
  .pisell-lowcode__shopping-cart-content {
7
10
  .ant-card-body {
8
11
  padding: 0;
@@ -10,9 +13,9 @@
10
13
  }
11
14
  }
12
15
 
13
- .event-footer {
16
+ .appointment-footer {
14
17
  background: #fff;
15
- padding: 20px;
18
+ padding: 10px 16px 0;
16
19
  display: flex;
17
20
  flex-direction: column;
18
21
  gap: 14px;
@@ -20,7 +23,7 @@
20
23
  }
21
24
  }
22
25
 
23
- .event-total-wrap {
26
+ .appointment-total-wrap {
24
27
  color: var(--Text-Text_1, #1b1b1b);
25
28
  font-size: 20px;
26
29
  font-weight: 600;
@@ -64,17 +67,19 @@
64
67
  }
65
68
  }
66
69
 
67
- .cart-mobile-item-wrap {
70
+ .appointment-cart-mobile-item-wrap {
68
71
  display: flex;
69
72
  flex-direction: column;
70
73
  position: relative;
74
+ height: 100%;
71
75
 
72
76
  .content {
73
77
  flex: 1;
74
78
  overflow-y: auto;
75
- padding: 0 0 140px;
79
+ padding: 0 0 210px;
80
+ max-height: 100%;
76
81
  }
77
- .event-footer {
82
+ .appointment-footer {
78
83
  z-index: 10;
79
84
  position: fixed;
80
85
  bottom: 0;
@@ -18,8 +18,9 @@ var Cart = function Cart(_ref) {
18
18
  padding: '20px'
19
19
  },
20
20
  destroyOnClose: true,
21
- className: "event-cart-modal",
22
- footer: null
21
+ className: "appointment-cart-modal",
22
+ footer: null,
23
+ forceRender: true
23
24
  }, /*#__PURE__*/React.createElement("div", {
24
25
  style: {
25
26
  flex: 1,
@@ -1,2 +1,2 @@
1
- .event-cart-modal {
1
+ .appointment-cart-modal {
2
2
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Layout: () => JSX.Element;
4
3
  export default Layout;
@@ -1,3 +1,9 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
8
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -14,30 +20,36 @@ import Date from "../Date";
14
20
  import Resource from "../Resource";
15
21
  import TimeSlicing from "../TimeSlicing";
16
22
  import Guest from "../Guest";
17
- import { useAppointmentBookingStep, useAppointmentBookingCart } from "../../hooks";
18
23
  import { useAppointmentBookingContext } from "../../context";
24
+ import { useAppointmentBookingCart, useAppointmentBookingStep } from "../../hooks";
19
25
  import "./index.less";
20
26
  var Layout = function Layout() {
21
- var _currentStep$step2, _currentStep$step4, _currentStep$step5;
22
- var appointmentBookingStep = useAppointmentBookingStep();
23
- var appointmentBookingCart = useAppointmentBookingCart();
27
+ var _currentStep$step, _currentStep$step3, _currentStep$step4;
24
28
  var _useAppointmentBookin = useAppointmentBookingContext(),
25
- currentStep = _useAppointmentBookin.currentStep;
29
+ currentStep = _useAppointmentBookin.currentStep,
30
+ setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
31
+ resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
32
+
33
+ // 不要删除
34
+ useAppointmentBookingCart();
35
+ useAppointmentBookingStep();
26
36
  var _useState = useState({}),
27
37
  _useState2 = _slicedToArray(_useState, 2),
28
38
  params = _useState2[0],
29
39
  setParams = _useState2[1];
30
40
  useEffect(function () {
31
- var _currentStep$step;
32
- console.log(currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key, 'whcurrentStep?.step?.key');
41
+ // 清空资源分配失败数据
42
+ setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
43
+ errorList: null
44
+ }));
33
45
  window.scrollTo({
34
46
  top: 0,
35
47
  behavior: 'smooth'
36
48
  });
37
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key]);
49
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
38
50
  var Com = useMemo(function () {
39
- var _currentStep$step3;
40
- var key = currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key;
51
+ var _currentStep$step2;
52
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key;
41
53
  if (!key) return null;
42
54
  var components = {
43
55
  // 选择服务
@@ -56,7 +68,7 @@ var Layout = function Layout() {
56
68
  onChange: setParams,
57
69
  params: params
58
70
  });
59
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key]);
71
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key]);
60
72
 
61
73
  /**
62
74
  * @title: 动态计算中间内容区域的高度
@@ -70,7 +82,7 @@ var Layout = function Layout() {
70
82
  var _header$getBoundingCl, _footer$getBoundingCl;
71
83
  var header = document.querySelector('.event-progress-bar');
72
84
  var footer = document.querySelector('.pisell-section-footers-wrapper');
73
- var content = document.querySelector('.event-content-mobile-wrap');
85
+ var content = document.querySelector('.parallel-content-mobile-wrap');
74
86
  var headerHeight = (header === null || header === void 0 || (_header$getBoundingCl = header.getBoundingClientRect()) === null || _header$getBoundingCl === void 0 ? void 0 : _header$getBoundingCl.height) || 0;
75
87
  var footerHeight = (footer === null || footer === void 0 || (_footer$getBoundingCl = footer.getBoundingClientRect()) === null || _footer$getBoundingCl === void 0 ? void 0 : _footer$getBoundingCl.height) || 0;
76
88
  var windowHeight = window.innerHeight;
@@ -80,7 +92,7 @@ var Layout = function Layout() {
80
92
  content.style.overflowY = 'auto';
81
93
  }
82
94
  }
83
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.key]);
95
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key]);
84
96
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement("div", {
85
97
  className: "parallel-content-wrap ".concat(isMobile() ? 'parallel-content-mobile-wrap' : '')
86
98
  }, /*#__PURE__*/React.createElement("div", {