@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
@@ -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;
@@ -18,30 +18,35 @@ import { Skeleton } from 'antd';
18
18
  import Dayjs from 'dayjs';
19
19
  import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
20
20
  Dayjs.extend(isSameOrBefore);
21
- import { weekListText } from "./state";
22
21
  import classNames from 'classnames';
22
+ import { locales, isMobile } from '@pisell/utils';
23
23
  import { CaretLeftOutlined, CaretRightOutlined } from '@ant-design/icons';
24
24
  import { useAppointmentBookingContext } from "../../context";
25
25
  import "./index.less";
26
26
  var CalendarDate = function CalendarDate(props) {
27
- var _useState = useState(),
27
+ var _useState = useState(false),
28
28
  _useState2 = _slicedToArray(_useState, 2),
29
- currentDate = _useState2[0],
30
- setCurrentDate = _useState2[1];
31
- // 生成7天的时间列表
32
- var _useState3 = useState([]),
29
+ loading = _useState2[0],
30
+ setLoading = _useState2[1];
31
+ var _useState3 = useState(),
33
32
  _useState4 = _slicedToArray(_useState3, 2),
34
- dateMonthList = _useState4[0],
35
- setDateMonthList = _useState4[1];
33
+ currentDate = _useState4[0],
34
+ setCurrentDate = _useState4[1];
35
+ // 生成7天的时间列表
36
+ var _useState5 = useState([]),
37
+ _useState6 = _slicedToArray(_useState5, 2),
38
+ dateMonthList = _useState6[0],
39
+ setDateMonthList = _useState6[1];
36
40
  // 切换的月份
37
- var _useState5 = useState(function () {
41
+ var _useState7 = useState(function () {
38
42
  return Dayjs();
39
43
  }),
40
- _useState6 = _slicedToArray(_useState5, 2),
41
- currentMonth = _useState6[0],
42
- setCurrentMonth = _useState6[1];
44
+ _useState8 = _slicedToArray(_useState7, 2),
45
+ currentMonth = _useState8[0],
46
+ setCurrentMonth = _useState8[1];
43
47
  var _useAppointmentBookin = useAppointmentBookingContext(),
44
48
  appointmentBooking = _useAppointmentBookin.appointmentBooking;
49
+ var weekListText = [locales.getText('pisell2.appointment.sunday'), locales.getText('pisell2.appointment.monday'), locales.getText('pisell2.appointment.tuesday'), locales.getText('pisell2.appointment.wednesday'), locales.getText('pisell2.appointment.thursday'), locales.getText('pisell2.appointment.friday'), locales.getText('pisell2.appointment.saturday')];
45
50
 
46
51
  // 计算开始渲染的列
47
52
  var startingColumn = 0 % 7; // 0 表示星期日
@@ -98,30 +103,36 @@ var CalendarDate = function CalendarDate(props) {
98
103
  };
99
104
  var getDates = /*#__PURE__*/function () {
100
105
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(date) {
101
- var startDate, endDate, params, data, firstAvailableDate, baseMonthData, updatedDates;
106
+ var startDate, endDate, params, data, selected, firstAvailableDate, baseMonthData, updatedDates;
102
107
  return _regeneratorRuntime().wrap(function _callee$(_context) {
103
108
  while (1) switch (_context.prev = _context.next) {
104
109
  case 0:
110
+ _context.prev = 0;
105
111
  startDate = Dayjs(date).startOf('month').format('YYYY-MM-DD');
106
112
  endDate = Dayjs(date).endOf('month').format('YYYY-MM-DD');
107
113
  params = {
108
114
  startDate: startDate,
109
115
  endDate: endDate
110
116
  };
111
- _context.next = 5;
117
+ _context.next = 6;
112
118
  return appointmentBooking.getAvailableDate(params);
113
- case 5:
119
+ case 6:
114
120
  data = _context.sent;
115
- console.log(data, params, date, date.format('YYYY-MM') === Dayjs().format('YYYY-MM'), 'wh78968');
116
-
117
- // 当前月则默认选中当前第一个可用的
118
-
119
- if (date.format('YYYY-MM') === Dayjs().format('YYYY-MM')) {
120
- firstAvailableDate = data.find(function (d) {
121
- return d.status === 'available';
122
- });
123
- setCurrentDate(firstAvailableDate === null || firstAvailableDate === void 0 ? void 0 : firstAvailableDate.date);
124
- appointmentBooking.setDateRange([firstAvailableDate]);
121
+ _context.next = 9;
122
+ return appointmentBooking.getDateRange();
123
+ case 9:
124
+ selected = _context.sent;
125
+ if ((selected === null || selected === void 0 ? void 0 : selected.length) > 0) {
126
+ setCurrentDate(selected[0].date);
127
+ } else {
128
+ // 当前月则默认选中当前第一个可用的
129
+ if (date.format('YYYY-MM') === Dayjs().format('YYYY-MM')) {
130
+ firstAvailableDate = data.find(function (d) {
131
+ return d.status === 'available';
132
+ });
133
+ setCurrentDate(firstAvailableDate === null || firstAvailableDate === void 0 ? void 0 : firstAvailableDate.date);
134
+ appointmentBooking.setDateRange([firstAvailableDate]);
135
+ }
125
136
  }
126
137
 
127
138
  // 创建基础日历数据
@@ -137,12 +148,20 @@ var CalendarDate = function CalendarDate(props) {
137
148
  }
138
149
  return day;
139
150
  });
151
+ setLoading(false);
140
152
  setDateMonthList(updatedDates);
141
- case 11:
153
+ _context.next = 21;
154
+ break;
155
+ case 17:
156
+ _context.prev = 17;
157
+ _context.t0 = _context["catch"](0);
158
+ setLoading(false);
159
+ console.log(_context.t0, 'wh978968234234');
160
+ case 21:
142
161
  case "end":
143
162
  return _context.stop();
144
163
  }
145
- }, _callee);
164
+ }, _callee, null, [[0, 17]]);
146
165
  }));
147
166
  return function getDates(_x) {
148
167
  return _ref.apply(this, arguments);
@@ -178,9 +197,10 @@ var CalendarDate = function CalendarDate(props) {
178
197
  var currentMonthText = currentMonth.format('YYYY-MM');
179
198
  var newNextMonth = Dayjs(currentMonthText).add(1, 'month');
180
199
  setCurrentMonth(newNextMonth);
200
+ setLoading(true);
181
201
  };
182
202
  return /*#__PURE__*/React.createElement("div", {
183
- className: 'calendar-date-box'
203
+ className: "calendar-date-box ".concat(isMobile() ? 'calendar-date-mobile-box' : '')
184
204
  }, !dateMonthList.length ? /*#__PURE__*/React.createElement(Skeleton, {
185
205
  loading: true,
186
206
  active: true,
@@ -216,17 +236,14 @@ var CalendarDate = function CalendarDate(props) {
216
236
  var isCurrentMonth = Dayjs(day.date).isSame(currentMonth, 'month');
217
237
  return /*#__PURE__*/React.createElement("div", {
218
238
  key: index,
219
- className: classNames('calendar-days-items', _defineProperty(_defineProperty(_defineProperty({}, 'disabledDate', day === null || day === void 0 ? void 0 : day.disabled), 'selectDate', currentDate === date), 'other-month-days', !isCurrentMonth)),
239
+ className: classNames('calendar-days-items', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'disabledDate', day === null || day === void 0 ? void 0 : day.disabled), 'selectDate', currentDate === date), 'other-month-days', !isCurrentMonth), 'loading-item', loading)),
220
240
  onClick: function onClick() {
221
241
  if (day !== null && day !== void 0 && day.disabled) return;
222
- console.log(day, 'wh987976');
223
242
  setCurrentDate(date);
224
243
  appointmentBooking.setDateRange([day]);
225
244
  }
226
245
  }, isCurrentMonth && /*#__PURE__*/React.createElement("div", {
227
- className: classNames('day-text', {
228
- // ['day-line']: !disabled,
229
- })
246
+ className: classNames('day-text')
230
247
  }, Dayjs(day.date).format('D')));
231
248
  })))));
232
249
  };
@@ -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
  }
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React from 'react';
7
+ import React, { useEffect } from 'react';
8
8
  import { SectionFooters, Button, Badge, Image } from '@pisell/materials';
9
9
  import { useState } from 'react';
10
10
  import ContinueButton from "../Cart/ContinueButton";
@@ -14,12 +14,17 @@ import Cart from "../Cart";
14
14
  import Total from "../Cart/Item/Total";
15
15
  import "./index.less";
16
16
  var Footer = function Footer() {
17
+ var _currentStep$step;
17
18
  var _useAppointmentBookin = useAppointmentBookingContext(),
18
- carts = _useAppointmentBookin.carts;
19
+ carts = _useAppointmentBookin.carts,
20
+ currentStep = _useAppointmentBookin.currentStep;
19
21
  var _useState = useState(false),
20
22
  _useState2 = _slicedToArray(_useState, 2),
21
23
  open = _useState2[0],
22
24
  setOpen = _useState2[1];
25
+ useEffect(function () {
26
+ setOpen(false);
27
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
23
28
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionFooters, {
24
29
  className: "section-footer-wrap",
25
30
  left: /*#__PURE__*/React.createElement(Total, {
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const GuestOptionsModal: (props: any) => JSX.Element;
3
+ export default GuestOptionsModal;
@@ -0,0 +1,50 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ 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); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ import React, { useMemo } from 'react';
8
+ import { PisellModal } from '@pisell/materials';
9
+ import "./index.less";
10
+ var GuestOptionsModal = function GuestOptionsModal(props) {
11
+ var open = props.open,
12
+ onCancel = props.onCancel,
13
+ options = props.options,
14
+ _onClick = props.onClick,
15
+ holderItem = props.holderItem;
16
+ var lists = useMemo(function () {
17
+ var _options = _toConsumableArray(options);
18
+ if (!(holderItem !== null && holderItem !== void 0 && holderItem.isGuest)) {
19
+ _options = _options.filter(function (option) {
20
+ return option.key !== 'remove';
21
+ });
22
+ }
23
+ return _options;
24
+ }, [options]);
25
+ return /*#__PURE__*/React.createElement(PisellModal, {
26
+ open: open,
27
+ platform: 'h5',
28
+ closable: true,
29
+ bodyStyle: {
30
+ padding: '0 24px'
31
+ },
32
+ destroyOnClose: true,
33
+ footer: null,
34
+ onCancel: onCancel,
35
+ mobileModalHeight: 'auto',
36
+ className: 'guest-option-modal',
37
+ headerDivider: false
38
+ }, /*#__PURE__*/React.createElement("div", {
39
+ className: "guest-options-wrap"
40
+ }, lists.map(function (item) {
41
+ return /*#__PURE__*/React.createElement("div", {
42
+ key: item.key,
43
+ className: "guest-options-wrap-item ".concat(item.key === 'remove' ? 'remove' : ''),
44
+ onClick: function onClick() {
45
+ return _onClick(item);
46
+ }
47
+ }, item.label);
48
+ })));
49
+ };
50
+ export default GuestOptionsModal;
@@ -0,0 +1,28 @@
1
+ .guest-options-wrap {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 16px;
5
+ .guest-options-wrap-item {
6
+ color: var(--Gray-900, #101828);
7
+ font-size: 16px;
8
+ font-weight: 600;
9
+ line-height: 24px;
10
+ display: flex;
11
+ padding: 9px 10px;
12
+ align-items: center;
13
+ flex: 1 0 0;
14
+ }
15
+
16
+ .remove {
17
+ color: var(--Error-700, #b42318);
18
+ }
19
+ }
20
+
21
+ .guest-option-modal {
22
+ .pisell-lowcode-modal-header {
23
+ border: none;
24
+ }
25
+ .pisell-lowcode-modal-body {
26
+ height: max-content;
27
+ }
28
+ }
@@ -6,14 +6,11 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useMemo, useState } from 'react';
8
8
  import { Dropdown } from 'antd';
9
- import { Button, Iconfont, PisellCard, PisellAvatar } from '@pisell/materials';
9
+ import { Button, Iconfont, PisellCard, PisellAvatar, PisellToast } from '@pisell/materials';
10
10
  import { locales, isMobile, getUniqueId } from '@pisell/utils';
11
- // import SelectHolderModal from '../Provider/SelectHolderModal';
12
- // import InformationOptionsModal from '../Provider/InformationOptionsModal/index';
13
- // import RemoveOptionConfirmModal from '../Provider/RemoveOptionConfirmModal';
14
- import { useAppointmentBookingAccount } from "../../hooks";
11
+ import InformationOptionsModal from "./components/InformationOptionsModal";
15
12
  import { useAppointmentBookingContext } from "../../context";
16
- // import appointmentBookingAccount from '../../hooks';
13
+ import { useAppointmentBookingAccount } from "../../hooks";
17
14
  import { formatGuest } from "../../utils";
18
15
  import "./index.less";
19
16
  var Guest = function Guest() {
@@ -26,14 +23,6 @@ var Guest = function Guest() {
26
23
  _useState4 = _slicedToArray(_useState3, 2),
27
24
  holderItem = _useState4[0],
28
25
  setHolderItem = _useState4[1];
29
- // 移除确认
30
- var _useState5 = useState(false),
31
- _useState6 = _slicedToArray(_useState5, 2),
32
- removeOpen = _useState6[0],
33
- setRemoveOpen = _useState6[1];
34
-
35
- // const appointmentBooking = useAppointmentBooking();
36
- // const { products } = useAppointmentBookingCart();
37
26
  var _useAppointmentBookin = useAppointmentBookingContext(),
38
27
  carts = _useAppointmentBookin.carts,
39
28
  appointmentBooking = _useAppointmentBookin.appointmentBooking;
@@ -73,6 +62,7 @@ var Guest = function Guest() {
73
62
  */
74
63
  var handleClick = function handleClick(_ref, item) {
75
64
  var key = _ref.key;
65
+ console.log(key, item, 'wh978967');
76
66
  // 编辑holder
77
67
  if (key === 'edit') {
78
68
  appointmentBooking.setActiveAccount(item.id);
@@ -118,10 +108,16 @@ var Guest = function Guest() {
118
108
  }
119
109
  },
120
110
  placement: "bottomRight",
121
- overlayClassName: "provider-information-custom-dropdown-menu"
111
+ overlayClassName: "appointment-guest-custom-dropdown-menu"
122
112
  }, /*#__PURE__*/React.createElement(Button, null, locales.getText('pisell2.event.option')));
123
113
  };
124
114
  var handleAddGuest = function handleAddGuest() {
115
+ // 最多添加6个人
116
+ if (accountLists.length >= 6) {
117
+ return PisellToast({
118
+ content: locales.getText('pisell2.appointment.max.guest')
119
+ });
120
+ }
125
121
  var guest = {
126
122
  id: getUniqueId(),
127
123
  username: "Guest".concat(accountLists.length + 1),
@@ -132,7 +128,7 @@ var Guest = function Guest() {
132
128
  appointmentBooking.back();
133
129
  };
134
130
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
135
- className: "provider-information-wrap"
131
+ className: "appointment-guest-wrap"
136
132
  }, lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
137
133
  var _item$children;
138
134
  return /*#__PURE__*/React.createElement(PisellCard, {
@@ -158,12 +154,23 @@ var Guest = function Guest() {
158
154
  width: 'max-content'
159
155
  },
160
156
  onClick: handleAddGuest,
161
- className: "provider-information-add-button"
157
+ className: "appointment-guest-add-button"
162
158
  }, /*#__PURE__*/React.createElement(Iconfont, {
163
159
  type: "pisell2-plus",
164
160
  style: {
165
161
  fontSize: '20px'
166
162
  }
167
- }), locales.getText('pisell2.appointment.add.guest'))));
163
+ }), locales.getText('pisell2.appointment.add.guest'))), openOption ? /*#__PURE__*/React.createElement(InformationOptionsModal, {
164
+ options: options,
165
+ open: openOption,
166
+ holderItem: holderItem,
167
+ onCancel: function onCancel() {
168
+ return setOpenOption(false);
169
+ },
170
+ onClick: function onClick(e) {
171
+ handleClick(e, holderItem);
172
+ setOpenOption(false);
173
+ }
174
+ }) : null);
168
175
  };
169
176
  export default Guest;
@@ -1,4 +1,4 @@
1
- .provider-information-wrap {
1
+ .appointment-guest-wrap {
2
2
  padding: 16px;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -7,7 +7,7 @@
7
7
  margin-top: 16px;
8
8
  width: 100%;
9
9
 
10
- .provider-information-add-button {
10
+ .appointment-guest-add-button {
11
11
  display: flex;
12
12
  align-items: center;
13
13
  .pisell-lowcode-image-mask-info {
@@ -64,7 +64,7 @@
64
64
  }
65
65
  }
66
66
 
67
- .provider-information-custom-dropdown-menu {
67
+ .appointment-guest-custom-dropdown-menu {
68
68
  .pisell-lowcode-dropdown-menu {
69
69
  padding: 6px;
70
70
  border-bottom: 1px solid var(--Gray-200, #eaecf0);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -1,14 +1,37 @@
1
- import React from 'react';
1
+ import React, { useMemo } from 'react';
2
+ import { locales } from '@pisell/utils';
2
3
  import ProgressBar from "../../../eventBooking/components/progressBar";
3
4
  import { useAppointmentBookingContext } from "../../context";
5
+ import useEngineContext from "../../../../hooks/useEngineContext";
4
6
  import "./index.less";
5
7
  var Header = function Header() {
6
- var _currentStep$step, _currentStep$step2;
7
- // const appointmentBooking = useAppointmentBooking();
8
- // const { currentStep } = useAppointmentBookingStep();
8
+ var _currentStep$step3, _currentStep$step5;
9
9
  var _useAppointmentBookin = useAppointmentBookingContext(),
10
10
  currentStep = _useAppointmentBookin.currentStep,
11
- appointmentBooking = _useAppointmentBookin.appointmentBooking;
11
+ appointmentBooking = _useAppointmentBookin.appointmentBooking,
12
+ resources = _useAppointmentBookin.resources;
13
+ var context = useEngineContext();
14
+
15
+ /**
16
+ * @title: 获取资源名称
17
+ * @description:
18
+ * @param {*} useMemo
19
+ * @return {*}
20
+ * @Author: WangHan
21
+ * @Date: 2025-04-15 21:37
22
+ */
23
+ var stepName = useMemo(function () {
24
+ var _currentStep$step, _currentStep$step2;
25
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key;
26
+
27
+ // 选择资源则获取资源列表的第一个名称
28
+ if (key === 'select-resource') {
29
+ var _resources$;
30
+ var name = (resources === null || resources === void 0 || (_resources$ = resources[0]) === null || _resources$ === void 0 || (_resources$ = _resources$.resources) === null || _resources$ === void 0 || (_resources$ = _resources$[0]) === null || _resources$ === void 0 ? void 0 : _resources$.title) || '';
31
+ return locales.getText('pisell2.event.select.category')(name);
32
+ }
33
+ return currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.description;
34
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key, resources]);
12
35
 
13
36
  /**
14
37
  * @title: 返回
@@ -18,6 +41,22 @@ var Header = function Header() {
18
41
  * @Date: 2025-01-18 22:28
19
42
  */
20
43
  var handleBack = function handleBack() {
44
+ var _currentStep$step4;
45
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key;
46
+
47
+ // 删除缓存
48
+ var types = {
49
+ 'select-time': 'time',
50
+ 'select-resource': 'resource'
51
+ };
52
+ if (types[key]) {
53
+ appointmentBooking.deleteCartItemInfo(types[key]);
54
+ }
55
+
56
+ // 清空选中的日期
57
+ if (key === 'select-date') {
58
+ appointmentBooking.clearDateRange();
59
+ }
21
60
  appointmentBooking.back();
22
61
  };
23
62
 
@@ -29,11 +68,14 @@ var Header = function Header() {
29
68
  * @Date: 2025-01-22 13:43
30
69
  */
31
70
  var handleClose = function handleClose() {
32
- appointmentBooking.close();
71
+ var _utils$history;
72
+ var utils = context.appHelper.utils || {};
73
+ utils === null || utils === void 0 || (_utils$history = utils.history) === null || _utils$history === void 0 || _utils$history.replace('/');
74
+ appointmentBooking.destroy();
33
75
  };
34
76
  return /*#__PURE__*/React.createElement(ProgressBar, {
35
- title: currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.title,
36
- description: currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.description,
77
+ title: currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.title,
78
+ description: stepName,
37
79
  showBack: (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) > 0,
38
80
  onBack: function onBack() {
39
81
  return handleBack();
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const Resource: ({ onChange }: any) => JSX.Element;
2
+ declare const Resource: () => JSX.Element;
3
3
  export default Resource;
@@ -7,18 +7,17 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState, useEffect, useMemo } from 'react';
8
8
  import { Skeleton } from 'antd';
9
9
  import ResourceDisplay from "../../../eventBooking/components/resourceDisplay";
10
- import { PisellCustomCheckboxGroup } from '@pisell/materials';
10
+ import { PisellCustomCheckboxGroup, PisellToast } from '@pisell/materials';
11
11
  import { useAppointmentBookingResource } from "../../hooks";
12
12
  import { useAppointmentBookingContext } from "../../context";
13
- import { isMobile } from '@pisell/utils';
13
+ import guestsImg from "../../assets/guests.svg";
14
+ import { isMobile, locales } from '@pisell/utils';
14
15
  import "./index.less";
15
- var Resource = function Resource(_ref) {
16
- var onChange = _ref.onChange;
16
+ var Resource = function Resource() {
17
17
  var _useState = useState(0),
18
18
  _useState2 = _slicedToArray(_useState, 2),
19
19
  selectedResource = _useState2[0],
20
20
  setSelectedResource = _useState2[1];
21
- // const appointmentBooking = useAppointmentBooking();
22
21
  var _useAppointmentBookin = useAppointmentBookingContext(),
23
22
  appointmentBooking = _useAppointmentBookin.appointmentBooking,
24
23
  resources = _useAppointmentBookin.resources,
@@ -26,30 +25,29 @@ var Resource = function Resource(_ref) {
26
25
  resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
27
26
  var _useAppointmentBookin2 = useAppointmentBookingResource(),
28
27
  getResourceList = _useAppointmentBookin2.getResourceList,
29
- getResourceTimeSlot = _useAppointmentBookin2.getResourceTimeSlot,
30
28
  autoSelectAllProductResources = _useAppointmentBookin2.autoSelectAllProductResources;
31
- // const { products } = useAppointmentBookingCart();
32
- console.log(resources, carts, appointmentBooking, 'lists, products');
33
29
  useEffect(function () {
34
30
  var _resources = getResourceList();
35
- autoSelectAllProductResources('resources');
31
+ autoSelectAllProductResources();
32
+ getResourceList();
36
33
  }, []);
37
34
  useEffect(function () {
38
35
  var _resourceOtherParams$;
39
- console.log(resourceOtherParams === null || resourceOtherParams === void 0 ? void 0 : resourceOtherParams.errorList, 'errorListerrorListerrorList');
36
+ // 无可用时间提示
40
37
  if ((resourceOtherParams === null || resourceOtherParams === void 0 || (_resourceOtherParams$ = resourceOtherParams.errorList) === null || _resourceOtherParams$ === void 0 ? void 0 : _resourceOtherParams$.length) > 0) {
41
- return;
38
+ return PisellToast({
39
+ content: locales.getText('pisell2.appointment.no.available.time')
40
+ });
42
41
  }
43
42
  }, [resourceOtherParams === null || resourceOtherParams === void 0 ? void 0 : resourceOtherParams.errorList]);
44
43
  var anyResource = [{
45
44
  id: 0,
46
- image: 'https://cdn-partners-api.fresha.com/employee-avatars/processed/399178/medium/3b77991b-0ee2-4d0f-9d6f-a7501b39afcd-tempImageHYe20U.jpg',
47
- title: 'Any professional',
48
- subtitle: 'for maximum availability'
45
+ image: guestsImg,
46
+ title: locales.getText('pisell2.appointment.any.professional'),
47
+ subtitle: locales.getText('pisell2.appointment.for.maximum.availability')
49
48
  }];
50
49
  var currentResource = useMemo(function () {
51
50
  if (resources.length && carts.length) {
52
- console.log(resources, carts, 'lists, products');
53
51
  if (carts.length === 1) {
54
52
  var _resources$;
55
53
  return (_resources$ = resources[0]) === null || _resources$ === void 0 || (_resources$ = _resources$.resources) === null || _resources$ === void 0 ? void 0 : _resources$[0];
@@ -61,25 +59,16 @@ var Resource = function Resource(_ref) {
61
59
  }
62
60
  }, [resources, carts]);
63
61
  var resourcesResult = useMemo(function () {
64
- console.log(currentResource, resources, 'wh98765756');
65
62
  return anyResource.concat((currentResource === null || currentResource === void 0 ? void 0 : currentResource.renderList) || []);
66
63
  }, [currentResource]);
67
64
  var _onClick = function onClick(e) {
68
65
  setSelectedResource(e.id);
69
- console.log(currentResource, e, 'whcurrentResourcecurrentResource');
70
66
  if (e.id) {
71
- var _resources$2;
72
- getResourceTimeSlot({
73
- product: resources === null || resources === void 0 || (_resources$2 = resources[0]) === null || _resources$2 === void 0 ? void 0 : _resources$2.product,
74
- resources: currentResource === null || currentResource === void 0 ? void 0 : currentResource.renderList,
75
- currentResourceId: e.id
67
+ var _carts$;
68
+ return appointmentBooking.updateCart({
69
+ _id: carts === null || carts === void 0 || (_carts$ = carts[0]) === null || _carts$ === void 0 ? void 0 : _carts$._id,
70
+ resources: [e]
76
71
  });
77
-
78
- // onChange({
79
- // times: times,
80
- // product: resources?.[0]?.product,
81
- // resources: resources[0]?.resources?.[1]?.renderList || [],
82
- // });
83
72
  }
84
73
  };
85
74
  return /*#__PURE__*/React.createElement("div", {
@@ -97,7 +86,8 @@ var Resource = function Resource(_ref) {
97
86
  dataSource: item,
98
87
  direction: "vertical",
99
88
  children: !(item !== null && item !== void 0 && item.image) ? item === null || item === void 0 || (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.charAt(0).toUpperCase() : null,
100
- selected: selectedResource === (item === null || item === void 0 ? void 0 : item.id)
89
+ selected: selectedResource === (item === null || item === void 0 ? void 0 : item.id),
90
+ className: !item.id ? 'appointment-resource-guest-card' : ''
101
91
  });
102
92
  },
103
93
  columns: isMobile() ? 2 : 3,
@@ -1,6 +1,10 @@
1
1
  .appointment-resource-wrap {
2
- padding-top: 16px;
3
2
  .pisell-lowcode-card {
4
3
  min-height: 166px !important;
5
4
  }
5
+
6
+ .appointment-resource-guest-card .pisell-lowcode-avatar-image img {
7
+ width: 50%;
8
+ height: 50%;
9
+ }
6
10
  }