@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
@@ -35,69 +35,109 @@ module.exports = __toCommonJS(ContinueButton_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_materials = require("@pisell/materials");
38
- var import_utils2 = require("../../../../Sales/Checkout/utils");
39
38
  var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
40
39
  var import_hooks = require("../../../hooks");
41
40
  var import_context = require("../../../context");
41
+ var import_utils2 = require("../../../utils");
42
42
  var import_index = require("./index.less");
43
43
  var ContinueButton = () => {
44
+ var _a;
44
45
  const context = (0, import_useEngineContext.default)();
45
46
  const utils = context.appHelper.utils || {};
46
47
  const [loading, setLoading] = (0, import_react.useState)(false);
47
48
  const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
48
- const { currentStep, isLastStep, carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
49
- const data = {};
50
- const createBooking = {
51
- loading: false
52
- };
53
- const checkBeforeBooking = {
54
- loading: false
55
- };
56
- const handleCheckout = async () => {
57
- var _a;
58
- const value = (0, import_utils2.formatValues)(data);
59
- const result = { success: true };
60
- if (result == null ? void 0 : result.success) {
61
- } else {
62
- (0, import_materials.PisellToast)({
63
- content: ((_a = result == null ? void 0 : result.err) == null ? void 0 : _a.message) || ""
64
- });
65
- }
49
+ const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
50
+ const shopDiscount = (0, import_hooks.useShopDiscount)();
51
+ const {
52
+ currentStep,
53
+ isLastStep,
54
+ carts,
55
+ appointmentBooking,
56
+ resourceOtherParams,
57
+ summary
58
+ } = (0, import_context.useAppointmentBookingContext)();
59
+ const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
60
+ const disabled = (0, import_react.useMemo)(() => {
61
+ var _a2;
62
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
63
+ if (!carts.length) return true;
64
+ return false;
65
+ }, [
66
+ (_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key,
67
+ carts,
68
+ accountLists,
69
+ resourceOtherParams == null ? void 0 : resourceOtherParams.errorList
70
+ ]);
71
+ const clearData = () => {
72
+ appointmentBooking.destroy();
73
+ shopDiscount.destroy();
66
74
  };
67
75
  const handleNextStep = async () => {
76
+ var _a2, _b, _c, _d, _e;
68
77
  if (isLastStep) {
69
78
  setLoading(true);
70
79
  try {
71
80
  const res = await appointmentBooking.submitOrder();
72
- console.log(isLastStep, isLogin, res, "wh9896788");
73
- utils.action({
74
- type: "pisell1.payment",
75
- data: res == null ? void 0 : res.data,
76
- callback: (e) => {
77
- console.log(e, "wh9896788");
81
+ if ((summary == null ? void 0 : summary.total) > 0) {
82
+ utils.action({
83
+ type: "pisell1.payment",
84
+ data: res == null ? void 0 : res.data
85
+ });
86
+ } else {
87
+ const { order_id, total_amount } = (res == null ? void 0 : res.data) || {};
88
+ const freeResult = await appointmentBooking.getFreeProduct(order_id);
89
+ console.log(freeResult, "freeResult");
90
+ if ((_a2 = freeResult == null ? void 0 : freeResult.data) == null ? void 0 : _a2.status) {
91
+ const url = `/payment-finish/success?order_id=${order_id}&amount=${Number(
92
+ total_amount
93
+ )}`;
94
+ (_b = utils == null ? void 0 : utils.history) == null ? void 0 : _b.replace(url);
95
+ } else {
96
+ (0, import_materials.PisellToast)({
97
+ content: (_c = freeResult == null ? void 0 : freeResult.data) == null ? void 0 : _c.message
98
+ });
78
99
  }
79
- });
100
+ }
101
+ clearData();
80
102
  setLoading(false);
81
103
  } catch (error) {
82
- console.log(isLastStep, isLogin, error, "wh9896788");
83
104
  setLoading(false);
84
105
  }
85
106
  return;
86
107
  }
108
+ if (((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-resource") {
109
+ getResourceTimeSlot();
110
+ }
111
+ if (((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) === "select-time") {
112
+ }
87
113
  return appointmentBooking.next();
88
114
  };
89
115
  const handleContinue = async () => {
116
+ var _a2;
117
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
118
+ console.log(currentStep, isLastStep, isLogin, "wh9896788222");
90
119
  if (isLastStep) {
91
120
  if (!isLogin) {
92
121
  return openLoginModal({
93
122
  callback: (status) => {
123
+ var _a3, _b, _c;
124
+ const user = (_c = (_b = (_a3 = utils.store) == null ? void 0 : _a3.getState()) == null ? void 0 : _b.global) == null ? void 0 : _c.userInfo;
125
+ const currentUser = (0, import_utils2.formatCustomer)(user);
126
+ const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
94
127
  if (status === "success") {
128
+ appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
95
129
  handleNextStep();
96
130
  }
97
131
  }
98
132
  });
99
133
  }
100
134
  }
135
+ if (key === "select-resource" && (0, import_utils2.isEmptyCartsResourceId)(carts)) {
136
+ (0, import_materials.PisellToast)({
137
+ content: import_utils.locales.getText("pisell2.appointment.no.available.time")
138
+ });
139
+ return;
140
+ }
101
141
  handleNextStep();
102
142
  };
103
143
  const continueText = (0, import_react.useMemo)(() => {
@@ -107,14 +147,10 @@ var ContinueButton = () => {
107
147
  return import_utils.locales.getText("pisell2.event.close.continue");
108
148
  }
109
149
  }, [isLastStep]);
110
- const confirmLoading = (0, import_react.useMemo)(() => {
111
- if (!isLastStep) return false;
112
- return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading);
113
- }, [isLastStep, createBooking == null ? void 0 : createBooking.loading, checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading]);
114
150
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
115
151
  import_materials.Button,
116
152
  {
117
- disabled: !(carts == null ? void 0 : carts.length),
153
+ disabled,
118
154
  size: "large",
119
155
  type: "primary",
120
156
  onClick: () => handleContinue(),
@@ -41,7 +41,8 @@ var import_context = require("../../../context");
41
41
  var Total = ({ className, isFooter }) => {
42
42
  const { summary, symbolic } = (0, import_context.useAppointmentBookingContext)();
43
43
  const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = summary;
44
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `event-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
44
+ console.log(summary, "summarysummary");
45
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `appointment-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
45
46
  "div",
46
47
  {
47
48
  className: (0, import_classnames.default)("event-total", {
@@ -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;
@@ -38,38 +38,59 @@ var import_shoppingCart = __toESM(require("../../../../shoppingCart"));
38
38
  var import_ContinueButton = __toESM(require("../ContinueButton"));
39
39
  var import_hooks = require("../../../hooks");
40
40
  var import_context = require("../../../context");
41
- var import_Total = __toESM(require("./Total"));
41
+ var import_hooks2 = require("../../../hooks");
42
42
  var import_utils2 = require("../../../utils");
43
43
  var import_Voucher = __toESM(require("../../Voucher"));
44
+ var import_Total = __toESM(require("./Total"));
44
45
  var import_index = require("./index.less");
45
- var CartItem = () => {
46
+ var CartItem = ({ onConfirm }) => {
46
47
  var _a, _b;
47
48
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
48
- const appointmentBookingAccount = (0, import_hooks.useAppointmentBookingAccount)();
49
- const { carts, summary, isLastStep, currentStep, resources } = (0, import_context.useAppointmentBookingContext)();
50
- const { accountLists, currentUser } = appointmentBookingAccount;
51
- console.log(summary, carts, (0, import_utils2.formatCarts)(carts, resources), "accountLists");
49
+ const {
50
+ carts,
51
+ isLastStep,
52
+ currentStep,
53
+ resources,
54
+ setResourceOtherParams,
55
+ resourceOtherParams
56
+ } = (0, import_context.useAppointmentBookingContext)();
57
+ const { accountLists } = (0, import_hooks2.useAppointmentBookingAccount)();
58
+ const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
59
+ const currentUser = (0, import_utils2.formatCurrentUser)();
52
60
  const holderIds = (0, import_react.useMemo)(() => {
53
61
  return accountLists.map((item) => item.id);
54
62
  }, [accountLists]);
55
63
  const holders = (0, import_react.useMemo)(() => {
56
64
  return (0, import_utils2.formatHolder)(accountLists);
57
65
  }, [accountLists]);
58
- const handleClickCard = (e, type, key) => {
59
- console.log(e, type, key, "wh9988767");
66
+ const handleClickCard = (e, type, val) => {
60
67
  if (type === "note") {
61
- return appointmentBooking.updateCart(e == null ? void 0 : e._id, { products: e });
68
+ return appointmentBooking.updateCart({
69
+ _id: e == null ? void 0 : e._id,
70
+ ...val
71
+ });
62
72
  }
63
73
  if (type === "delete") {
74
+ return appointmentBooking.deleteCart(e == null ? void 0 : e._id);
64
75
  }
65
76
  if (type === "delete_holders") {
66
- return appointmentBooking.removeAccount(key);
77
+ return appointmentBooking.removeAccount(val);
78
+ }
79
+ if (type === "change_resource") {
80
+ setResourceOtherParams({
81
+ ...resourceOtherParams,
82
+ errorList: null
83
+ });
84
+ return appointmentBooking.updateCart({
85
+ _id: e == null ? void 0 : e._id,
86
+ resources: [val]
87
+ });
67
88
  }
68
89
  };
69
90
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
70
91
  "div",
71
92
  {
72
- className: `cart-item-wrap ${(0, import_utils.isMobile)() ? "cart-mobile-item-wrap" : ""}`
93
+ className: `appointment-cart-item-wrap ${(0, import_utils.isMobile)() ? "appointment-cart-mobile-item-wrap" : ""}`
73
94
  },
74
95
  /* @__PURE__ */ import_react.default.createElement("div", { className: "content" }, /* @__PURE__ */ import_react.default.createElement(
75
96
  import_shoppingCart.default,
@@ -80,7 +101,8 @@ var CartItem = () => {
80
101
  holders,
81
102
  disabledEdit: isLastStep,
82
103
  isShowChangeResource: ((_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key) === "select-resource",
83
- isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.index) < 2
104
+ isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-service",
105
+ isShowPackageNote: false
84
106
  },
85
107
  collapseParams: {
86
108
  activeKey: holderIds,
@@ -89,10 +111,11 @@ var CartItem = () => {
89
111
  platform: "h5",
90
112
  emptyText: import_utils.locales.getText("pisell2.event.empty.service"),
91
113
  isOpenGroup: !!(holderIds == null ? void 0 : holderIds.length),
114
+ isHideClearCart: true,
92
115
  onChange: (e, type, key) => handleClickCard(e, type, key)
93
116
  }
94
117
  )),
95
- /* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
118
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
96
119
  ));
97
120
  };
98
121
  var Item_default = CartItem;
@@ -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;
@@ -50,8 +50,9 @@ var Cart = ({ open, onCancel }) => {
50
50
  padding: "20px"
51
51
  },
52
52
  destroyOnClose: true,
53
- className: `event-cart-modal`,
54
- footer: null
53
+ className: `appointment-cart-modal`,
54
+ footer: null,
55
+ forceRender: true
55
56
  },
56
57
  /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflowY: "auto" } }, /* @__PURE__ */ import_react.default.createElement(import_Item.default, null))
57
58
  );
@@ -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;
@@ -42,18 +42,20 @@ var import_Date = __toESM(require("../Date"));
42
42
  var import_Resource = __toESM(require("../Resource"));
43
43
  var import_TimeSlicing = __toESM(require("../TimeSlicing"));
44
44
  var import_Guest = __toESM(require("../Guest"));
45
- var import_hooks = require("../../hooks");
46
45
  var import_context = require("../../context");
46
+ var import_hooks = require("../../hooks");
47
47
  var import_index = require("./index.less");
48
48
  var Layout = () => {
49
49
  var _a, _b, _c;
50
- const appointmentBookingStep = (0, import_hooks.useAppointmentBookingStep)();
51
- const appointmentBookingCart = (0, import_hooks.useAppointmentBookingCart)();
52
- const { currentStep } = (0, import_context.useAppointmentBookingContext)();
50
+ const { currentStep, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
51
+ (0, import_hooks.useAppointmentBookingCart)();
52
+ (0, import_hooks.useAppointmentBookingStep)();
53
53
  const [params, setParams] = (0, import_react.useState)({});
54
54
  (0, import_react.useEffect)(() => {
55
- var _a2;
56
- console.log((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key, "whcurrentStep?.step?.key");
55
+ setResourceOtherParams({
56
+ ...resourceOtherParams,
57
+ errorList: null
58
+ });
57
59
  window.scrollTo({
58
60
  top: 0,
59
61
  behavior: "smooth"
@@ -83,7 +85,9 @@ var Layout = () => {
83
85
  if ((0, import_utils.isMobile)()) {
84
86
  const header = document.querySelector(".event-progress-bar");
85
87
  const footer = document.querySelector(".pisell-section-footers-wrapper");
86
- const content = document.querySelector(".event-content-mobile-wrap");
88
+ const content = document.querySelector(
89
+ ".parallel-content-mobile-wrap"
90
+ );
87
91
  const headerHeight = ((_a2 = header == null ? void 0 : header.getBoundingClientRect()) == null ? void 0 : _a2.height) || 0;
88
92
  const footerHeight = ((_b2 = footer == null ? void 0 : footer.getBoundingClientRect()) == null ? void 0 : _b2.height) || 0;
89
93
  const windowHeight = window.innerHeight;
@@ -10,6 +10,10 @@
10
10
  width: 634px;
11
11
  // padding: 16px 0;
12
12
 
13
+ .appointment-resource-wrap {
14
+ padding: 16px 0;
15
+ }
16
+
13
17
  .booking-tab-product {
14
18
  .booking-tabs-wrap {
15
19
  top: 77px !important;
@@ -38,7 +42,18 @@
38
42
  flex: none;
39
43
  // padding: 16px 16px 0;
40
44
 
45
+ .calendar-date-box {
46
+ padding: 0 16px;
47
+ }
48
+
49
+ .appointment-resource-wrap {
50
+ padding: 16px;
51
+ }
52
+
41
53
  .booking-tab-product {
54
+ .booking-tabs-wrap {
55
+ top: 0 !important;
56
+ }
42
57
  .booking-category-list {
43
58
  padding: 0 20px;
44
59
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const CalendarDate: (props: any) => JSX.Element;
4
3
  export default CalendarDate;
@@ -36,19 +36,29 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_dayjs = __toESM(require("dayjs"));
38
38
  var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
39
- var import_state = require("./state");
40
39
  var import_classnames = __toESM(require("classnames"));
40
+ var import_utils = require("@pisell/utils");
41
41
  var import_icons = require("@ant-design/icons");
42
42
  var import_context = require("../../context");
43
43
  var import_index = require("./index.less");
44
44
  import_dayjs.default.extend(import_isSameOrBefore.default);
45
45
  var CalendarDate = (props) => {
46
+ const [loading, setLoading] = (0, import_react.useState)(false);
46
47
  const [currentDate, setCurrentDate] = (0, import_react.useState)();
47
48
  const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
48
49
  const [currentMonth, setCurrentMonth] = (0, import_react.useState)(() => {
49
50
  return (0, import_dayjs.default)();
50
51
  });
51
52
  const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
53
+ const weekListText = [
54
+ import_utils.locales.getText("pisell2.appointment.sunday"),
55
+ import_utils.locales.getText("pisell2.appointment.monday"),
56
+ import_utils.locales.getText("pisell2.appointment.tuesday"),
57
+ import_utils.locales.getText("pisell2.appointment.wednesday"),
58
+ import_utils.locales.getText("pisell2.appointment.thursday"),
59
+ import_utils.locales.getText("pisell2.appointment.friday"),
60
+ import_utils.locales.getText("pisell2.appointment.saturday")
61
+ ];
52
62
  const startingColumn = 0 % 7;
53
63
  const columns = Array.from(
54
64
  { length: 7 },
@@ -80,40 +90,44 @@ var CalendarDate = (props) => {
80
90
  return lastDate.isBefore((0, import_dayjs.default)(), "month");
81
91
  };
82
92
  const getDates = async (date) => {
83
- const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
84
- const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
85
- const params = {
86
- startDate,
87
- endDate
88
- };
89
- const data = await appointmentBooking.getAvailableDate(params);
90
- console.log(
91
- data,
92
- params,
93
- date,
94
- date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM"),
95
- "wh78968"
96
- );
97
- if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
98
- const firstAvailableDate = data.find(
99
- (d) => d.status === "available"
100
- );
101
- setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
102
- appointmentBooking.setDateRange([firstAvailableDate]);
103
- }
104
- const baseMonthData = getMonthData(date.format("YYYY-MM"));
105
- const updatedDates = baseMonthData.map((day) => {
106
- const matchedDay = data.find((d) => d.date === day.date);
107
- if (matchedDay) {
108
- return {
109
- ...day,
110
- ...matchedDay,
111
- disabled: matchedDay.status === "unavailable"
112
- };
93
+ try {
94
+ const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
95
+ const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
96
+ const params = {
97
+ startDate,
98
+ endDate
99
+ };
100
+ const data = await appointmentBooking.getAvailableDate(params);
101
+ const selected = await appointmentBooking.getDateRange();
102
+ if ((selected == null ? void 0 : selected.length) > 0) {
103
+ setCurrentDate(selected[0].date);
104
+ } else {
105
+ if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
106
+ const firstAvailableDate = data.find(
107
+ (d) => d.status === "available"
108
+ );
109
+ setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
110
+ appointmentBooking.setDateRange([firstAvailableDate]);
111
+ }
113
112
  }
114
- return day;
115
- });
116
- setDateMonthList(updatedDates);
113
+ const baseMonthData = getMonthData(date.format("YYYY-MM"));
114
+ const updatedDates = baseMonthData.map((day) => {
115
+ const matchedDay = data.find((d) => d.date === day.date);
116
+ if (matchedDay) {
117
+ return {
118
+ ...day,
119
+ ...matchedDay,
120
+ disabled: matchedDay.status === "unavailable"
121
+ };
122
+ }
123
+ return day;
124
+ });
125
+ setLoading(false);
126
+ setDateMonthList(updatedDates);
127
+ } catch (error) {
128
+ setLoading(false);
129
+ console.log(error, "wh978968234234");
130
+ }
117
131
  };
118
132
  (0, import_react.useEffect)(() => {
119
133
  getDates(currentMonth);
@@ -127,52 +141,50 @@ var CalendarDate = (props) => {
127
141
  let currentMonthText = currentMonth.format("YYYY-MM");
128
142
  let newNextMonth = (0, import_dayjs.default)(currentMonthText).add(1, "month");
129
143
  setCurrentMonth(newNextMonth);
144
+ setLoading(true);
130
145
  };
131
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-date-box" }, !dateMonthList.length ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, style: { paddingTop: "16px" } }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ import_react.default.createElement(
146
+ return /* @__PURE__ */ import_react.default.createElement(
132
147
  "div",
133
148
  {
134
- className: (0, import_classnames.default)("calendar-last-month", {
135
- ["last-month-disabled"]: lastMonthDisable()
136
- }),
137
- onClick: () => {
138
- if (lastMonthDisable()) return;
139
- lastMonth();
140
- }
149
+ className: `calendar-date-box ${(0, import_utils.isMobile)() ? "calendar-date-mobile-box" : ""}`
141
150
  },
142
- /* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
143
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, import_state.weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
144
- const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
145
- const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
146
- currentMonth,
147
- "month"
148
- );
149
- return /* @__PURE__ */ import_react.default.createElement(
151
+ !dateMonthList.length ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, style: { paddingTop: "16px" } }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ import_react.default.createElement(
150
152
  "div",
151
153
  {
152
- key: index,
153
- className: (0, import_classnames.default)("calendar-days-items", {
154
- ["disabledDate"]: day == null ? void 0 : day.disabled,
155
- // ['disabledSelect']: status === 'sold_out',
156
- ["selectDate"]: currentDate === date,
157
- ["other-month-days"]: !isCurrentMonth
154
+ className: (0, import_classnames.default)("calendar-last-month", {
155
+ ["last-month-disabled"]: lastMonthDisable()
158
156
  }),
159
157
  onClick: () => {
160
- if (day == null ? void 0 : day.disabled) return;
161
- console.log(day, "wh987976");
162
- setCurrentDate(date);
163
- appointmentBooking.setDateRange([day]);
158
+ if (lastMonthDisable()) return;
159
+ lastMonth();
164
160
  }
165
161
  },
166
- isCurrentMonth && /* @__PURE__ */ import_react.default.createElement(
162
+ /* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
163
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
164
+ const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
165
+ const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
166
+ currentMonth,
167
+ "month"
168
+ );
169
+ return /* @__PURE__ */ import_react.default.createElement(
167
170
  "div",
168
171
  {
169
- className: (0, import_classnames.default)("day-text", {
170
- // ['day-line']: !disabled,
171
- })
172
+ key: index,
173
+ className: (0, import_classnames.default)("calendar-days-items", {
174
+ ["disabledDate"]: day == null ? void 0 : day.disabled,
175
+ ["selectDate"]: currentDate === date,
176
+ ["other-month-days"]: !isCurrentMonth,
177
+ ["loading-item"]: loading
178
+ }),
179
+ onClick: () => {
180
+ if (day == null ? void 0 : day.disabled) return;
181
+ setCurrentDate(date);
182
+ appointmentBooking.setDateRange([day]);
183
+ }
172
184
  },
173
- (0, import_dayjs.default)(day.date).format("D")
174
- )
175
- );
176
- })))));
185
+ isCurrentMonth && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("day-text") }, (0, import_dayjs.default)(day.date).format("D"))
186
+ );
187
+ }))))
188
+ );
177
189
  };
178
190
  var Date_default = CalendarDate;
@@ -128,4 +128,15 @@
128
128
  background: none;
129
129
  border: none;
130
130
  }
131
+
132
+ &.loading-item {
133
+ background: #eaecf0;
134
+ cursor: not-allowed;
135
+ }
136
+ }
137
+
138
+ .calendar-date-mobile-box {
139
+ .calendar-days-items {
140
+ height: 54px;
141
+ }
131
142
  }
@@ -42,8 +42,12 @@ var import_Cart = __toESM(require("../Cart"));
42
42
  var import_Total = __toESM(require("../Cart/Item/Total"));
43
43
  var import_index = require("./index.less");
44
44
  var Footer = () => {
45
- const { carts } = (0, import_context.useAppointmentBookingContext)();
45
+ var _a;
46
+ const { carts, currentStep } = (0, import_context.useAppointmentBookingContext)();
46
47
  const [open, setOpen] = (0, import_react2.useState)(false);
48
+ (0, import_react.useEffect)(() => {
49
+ setOpen(false);
50
+ }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
47
51
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
48
52
  import_materials.SectionFooters,
49
53
  {