@pisell/private-materials 3.2.22 → 3.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/assets/guests.svg +1 -0
  12. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +134 -105
  13. package/es/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
  14. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  15. package/es/components/appointmentBooking/components/Cart/Item/index.js +43 -21
  16. package/es/components/appointmentBooking/components/Cart/Item/index.less +14 -9
  17. package/es/components/appointmentBooking/components/Cart/index.js +3 -2
  18. package/es/components/appointmentBooking/components/Cart/index.less +1 -1
  19. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  20. package/es/components/appointmentBooking/components/Content/index.js +25 -13
  21. package/es/components/appointmentBooking/components/Content/index.less +15 -0
  22. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
  23. package/es/components/appointmentBooking/components/Date/index.js +50 -33
  24. package/es/components/appointmentBooking/components/Date/index.less +11 -0
  25. package/es/components/appointmentBooking/components/Footer/index.js +7 -2
  26. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  27. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
  28. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  29. package/es/components/appointmentBooking/components/Guest/index.js +25 -18
  30. package/es/components/appointmentBooking/components/Guest/index.less +3 -3
  31. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  32. package/es/components/appointmentBooking/components/Header/index.js +50 -8
  33. package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  34. package/es/components/appointmentBooking/components/Resource/index.js +19 -29
  35. package/es/components/appointmentBooking/components/Resource/index.less +5 -1
  36. package/es/components/appointmentBooking/components/Services/index.js +7 -9
  37. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  38. package/es/components/appointmentBooking/components/TimeSlicing/index.js +55 -35
  39. package/es/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
  40. package/es/components/appointmentBooking/components/Voucher/index.js +38 -28
  41. package/es/components/appointmentBooking/context.d.ts +2 -0
  42. package/es/components/appointmentBooking/context.js +7 -1
  43. package/es/components/appointmentBooking/hooks.d.ts +49 -10
  44. package/es/components/appointmentBooking/hooks.js +191 -134
  45. package/es/components/appointmentBooking/index.d.ts +0 -1
  46. package/es/components/appointmentBooking/index.js +12 -8
  47. package/es/components/appointmentBooking/locales.d.ts +36 -0
  48. package/es/components/appointmentBooking/locales.js +36 -0
  49. package/es/components/appointmentBooking/utils.d.ts +28 -0
  50. package/es/components/appointmentBooking/utils.js +86 -2
  51. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  52. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  53. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  54. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  55. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  56. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  57. package/es/components/booking/components/footer/utils.js +15 -15
  58. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  59. package/es/components/booking/components/voucher/index.d.ts +1 -1
  60. package/es/components/booking/components/voucher/index.js +39 -37
  61. package/es/components/booking/deposit/index.d.ts +0 -1
  62. package/es/components/booking/forms/single/index.d.ts +0 -1
  63. package/es/components/booking/forms/table/index.d.ts +0 -1
  64. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  65. package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
  66. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  67. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  68. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  69. package/es/components/booking/info/date/index.d.ts +0 -1
  70. package/es/components/booking/info/header/index.d.ts +0 -1
  71. package/es/components/booking/info/index.d.ts +0 -1
  72. package/es/components/booking/info/notes/index.d.ts +0 -1
  73. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  74. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  75. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  76. package/es/components/booking/info/service/like/index.d.ts +0 -1
  77. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  78. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  79. package/es/components/booking/info/service2/utils.d.ts +1 -1
  80. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  81. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  82. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  83. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  84. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  85. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  86. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  87. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  88. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  89. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  90. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  91. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  92. package/es/components/eftpos/form/index.d.ts +0 -1
  93. package/es/components/eftpos/group/index.d.ts +0 -1
  94. package/es/components/eftpos/hooks.d.ts +0 -1
  95. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  96. package/es/components/eftpos/icon/device.d.ts +0 -1
  97. package/es/components/eftpos/index.d.ts +0 -1
  98. package/es/components/eftpos/pos.d.ts +0 -1
  99. package/es/components/eftpos/receipt/index.d.ts +0 -1
  100. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  101. package/es/components/eftposPay/amount.d.ts +0 -1
  102. package/es/components/eftposPay/app.d.ts +0 -1
  103. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  104. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  105. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  106. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  107. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  108. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  109. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  110. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  111. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  112. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  113. package/es/components/eftposPay/device.d.ts +0 -1
  114. package/es/components/eftposPay/index.d.ts +0 -1
  115. package/es/components/eftposPay/pay.d.ts +0 -1
  116. package/es/components/eftposPay/payo/config.d.ts +0 -1
  117. package/es/components/eftposPay/store/index.d.ts +1 -1
  118. package/es/components/eftposPay/tip.d.ts +0 -1
  119. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  120. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  121. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  122. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  123. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  124. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  125. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  126. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  127. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  128. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  129. package/es/components/eventBooking/index.d.ts +0 -1
  130. package/es/components/login/index.d.ts +0 -1
  131. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  132. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  133. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  134. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  135. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  137. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  138. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  139. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  140. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  141. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  142. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  143. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  144. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  145. package/es/components/schedules/calendar/index.d.ts +0 -1
  146. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  147. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  148. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  149. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  150. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  151. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  152. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  153. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  154. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  155. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  156. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  157. package/es/components/schedules/products/index.d.ts +0 -1
  158. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  159. package/es/components/schedules/products/list/index.d.ts +0 -1
  160. package/es/components/schedules/resources/index.d.ts +0 -1
  161. package/es/components/schedules/resources/list/index.d.ts +0 -1
  162. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  163. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  164. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  165. package/es/components/schedules/schedules/index.d.ts +0 -1
  166. package/es/components/schedules/utils.d.ts +1 -1
  167. package/es/components/shoppingCart/components/Cart/Product.js +3 -0
  168. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  169. package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
  170. package/es/components/shoppingCart/index.d.ts +0 -1
  171. package/es/components/shoppingCart/type.d.ts +1 -0
  172. package/es/components/taxSelect/index.d.ts +0 -1
  173. package/es/utils/index.d.ts +1 -1
  174. package/lib/components/appointmentBooking/assets/guests.svg +1 -0
  175. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +68 -32
  176. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
  177. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  178. package/lib/components/appointmentBooking/components/Cart/Item/index.js +36 -13
  179. package/lib/components/appointmentBooking/components/Cart/Item/index.less +14 -9
  180. package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
  181. package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
  182. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  183. package/lib/components/appointmentBooking/components/Content/index.js +11 -7
  184. package/lib/components/appointmentBooking/components/Content/index.less +15 -0
  185. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
  186. package/lib/components/appointmentBooking/components/Date/index.js +80 -68
  187. package/lib/components/appointmentBooking/components/Date/index.less +11 -0
  188. package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
  189. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  190. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
  191. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  192. package/lib/components/appointmentBooking/components/Guest/index.js +24 -6
  193. package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
  194. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  195. package/lib/components/appointmentBooking/components/Header/index.js +31 -4
  196. package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  197. package/lib/components/appointmentBooking/components/Resource/index.js +16 -21
  198. package/lib/components/appointmentBooking/components/Resource/index.less +5 -1
  199. package/lib/components/appointmentBooking/components/Services/index.js +9 -2
  200. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  201. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +33 -23
  202. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
  203. package/lib/components/appointmentBooking/components/Voucher/index.js +30 -24
  204. package/lib/components/appointmentBooking/context.d.ts +2 -0
  205. package/lib/components/appointmentBooking/context.js +4 -1
  206. package/lib/components/appointmentBooking/hooks.d.ts +49 -10
  207. package/lib/components/appointmentBooking/hooks.js +49 -50
  208. package/lib/components/appointmentBooking/index.d.ts +0 -1
  209. package/lib/components/appointmentBooking/index.js +11 -7
  210. package/lib/components/appointmentBooking/locales.d.ts +36 -0
  211. package/lib/components/appointmentBooking/locales.js +36 -0
  212. package/lib/components/appointmentBooking/utils.d.ts +28 -0
  213. package/lib/components/appointmentBooking/utils.js +48 -2
  214. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  215. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  216. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  217. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  218. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  219. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  220. package/lib/components/booking/components/footer/utils.js +1 -15
  221. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  222. package/lib/components/booking/components/voucher/index.d.ts +1 -1
  223. package/lib/components/booking/components/voucher/index.js +31 -25
  224. package/lib/components/booking/deposit/index.d.ts +0 -1
  225. package/lib/components/booking/forms/single/index.d.ts +0 -1
  226. package/lib/components/booking/forms/table/index.d.ts +0 -1
  227. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  228. package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
  229. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  230. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  231. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  232. package/lib/components/booking/info/date/index.d.ts +0 -1
  233. package/lib/components/booking/info/header/index.d.ts +0 -1
  234. package/lib/components/booking/info/index.d.ts +0 -1
  235. package/lib/components/booking/info/notes/index.d.ts +0 -1
  236. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  237. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  238. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  239. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  240. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  241. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  242. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  243. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  244. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  245. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  246. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  247. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  248. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  249. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  250. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  251. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  252. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  253. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  254. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  255. package/lib/components/eftpos/form/index.d.ts +0 -1
  256. package/lib/components/eftpos/group/index.d.ts +0 -1
  257. package/lib/components/eftpos/hooks.d.ts +0 -1
  258. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  259. package/lib/components/eftpos/icon/device.d.ts +0 -1
  260. package/lib/components/eftpos/index.d.ts +0 -1
  261. package/lib/components/eftpos/pos.d.ts +0 -1
  262. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  263. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  264. package/lib/components/eftposPay/amount.d.ts +0 -1
  265. package/lib/components/eftposPay/app.d.ts +0 -1
  266. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  267. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  268. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  269. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  270. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  271. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  272. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  273. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  274. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  275. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  276. package/lib/components/eftposPay/device.d.ts +0 -1
  277. package/lib/components/eftposPay/index.d.ts +0 -1
  278. package/lib/components/eftposPay/pay.d.ts +0 -1
  279. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  280. package/lib/components/eftposPay/store/index.d.ts +1 -1
  281. package/lib/components/eftposPay/tip.d.ts +0 -1
  282. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  283. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  284. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  285. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  286. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  287. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  288. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  289. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  290. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  291. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  292. package/lib/components/eventBooking/index.d.ts +0 -1
  293. package/lib/components/login/index.d.ts +0 -1
  294. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  295. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  296. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  297. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  298. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  299. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  300. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  301. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  302. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  303. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  304. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  305. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  306. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  307. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  308. package/lib/components/schedules/calendar/index.d.ts +0 -1
  309. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  310. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  311. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  312. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  313. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  314. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  315. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  316. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  317. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  318. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  319. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  320. package/lib/components/schedules/products/index.d.ts +0 -1
  321. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  322. package/lib/components/schedules/products/list/index.d.ts +0 -1
  323. package/lib/components/schedules/resources/index.d.ts +0 -1
  324. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  325. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  326. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  327. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  328. package/lib/components/schedules/schedules/index.d.ts +0 -1
  329. package/lib/components/schedules/utils.d.ts +1 -1
  330. package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
  331. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  332. package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
  333. package/lib/components/shoppingCart/index.d.ts +0 -1
  334. package/lib/components/shoppingCart/type.d.ts +1 -0
  335. package/lib/components/taxSelect/index.d.ts +0 -1
  336. package/lib/utils/index.d.ts +1 -1
  337. package/package.json +4 -4
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const GuestOptionsModal: (props: any) => JSX.Element;
3
+ export default GuestOptionsModal;
@@ -0,0 +1,74 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.tsx
30
+ var InformationOptionsModal_exports = {};
31
+ __export(InformationOptionsModal_exports, {
32
+ default: () => InformationOptionsModal_default
33
+ });
34
+ module.exports = __toCommonJS(InformationOptionsModal_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_materials = require("@pisell/materials");
37
+ var import_index = require("./index.less");
38
+ var GuestOptionsModal = (props) => {
39
+ const { open, onCancel, options, onClick, holderItem } = props;
40
+ const lists = (0, import_react.useMemo)(() => {
41
+ let _options = [...options];
42
+ if (!(holderItem == null ? void 0 : holderItem.isGuest)) {
43
+ _options = _options.filter((option) => option.key !== "remove");
44
+ }
45
+ return _options;
46
+ }, [options]);
47
+ return /* @__PURE__ */ import_react.default.createElement(
48
+ import_materials.PisellModal,
49
+ {
50
+ open,
51
+ platform: "h5",
52
+ closable: true,
53
+ bodyStyle: { padding: "0 24px" },
54
+ destroyOnClose: true,
55
+ footer: null,
56
+ onCancel,
57
+ mobileModalHeight: "auto",
58
+ className: "guest-option-modal",
59
+ headerDivider: false
60
+ },
61
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "guest-options-wrap" }, lists.map((item) => {
62
+ return /* @__PURE__ */ import_react.default.createElement(
63
+ "div",
64
+ {
65
+ key: item.key,
66
+ className: `guest-options-wrap-item ${item.key === "remove" ? "remove" : ""}`,
67
+ onClick: () => onClick(item)
68
+ },
69
+ item.label
70
+ );
71
+ }))
72
+ );
73
+ };
74
+ var InformationOptionsModal_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
+ }
@@ -36,14 +36,14 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
- var import_hooks = require("../../hooks");
39
+ var import_InformationOptionsModal = __toESM(require("./components/InformationOptionsModal"));
40
40
  var import_context = require("../../context");
41
+ var import_hooks = require("../../hooks");
41
42
  var import_utils2 = require("../../utils");
42
43
  var import_index = require("./index.less");
43
44
  var Guest = () => {
44
45
  const [openOption, setOpenOption] = (0, import_react.useState)(false);
45
46
  const [holderItem, setHolderItem] = (0, import_react.useState)(null);
46
- const [removeOpen, setRemoveOpen] = (0, import_react.useState)(false);
47
47
  const { carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
48
48
  const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
49
49
  const lists = (0, import_react.useMemo)(() => {
@@ -61,6 +61,7 @@ var Guest = () => {
61
61
  }
62
62
  ];
63
63
  const handleClick = ({ key }, item) => {
64
+ console.log(key, item, "wh978967");
64
65
  if (key === "edit") {
65
66
  appointmentBooking.setActiveAccount(item.id);
66
67
  appointmentBooking.back();
@@ -98,12 +99,17 @@ var Guest = () => {
98
99
  }
99
100
  },
100
101
  placement: "bottomRight",
101
- overlayClassName: "provider-information-custom-dropdown-menu"
102
+ overlayClassName: "appointment-guest-custom-dropdown-menu"
102
103
  },
103
104
  /* @__PURE__ */ import_react.default.createElement(import_materials.Button, null, import_utils.locales.getText("pisell2.event.option"))
104
105
  );
105
106
  };
106
107
  const handleAddGuest = () => {
108
+ if (accountLists.length >= 6) {
109
+ return (0, import_materials.PisellToast)({
110
+ content: import_utils.locales.getText("pisell2.appointment.max.guest")
111
+ });
112
+ }
107
113
  const guest = {
108
114
  id: (0, import_utils.getUniqueId)(),
109
115
  username: `Guest${accountLists.length + 1}`,
@@ -113,7 +119,7 @@ var Guest = () => {
113
119
  appointmentBooking.setActiveAccount(guest.id);
114
120
  appointmentBooking.back();
115
121
  };
116
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "provider-information-wrap" }, lists == null ? void 0 : lists.map((item) => {
122
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-guest-wrap" }, lists == null ? void 0 : lists.map((item) => {
117
123
  var _a;
118
124
  return /* @__PURE__ */ import_react.default.createElement(
119
125
  import_materials.PisellCard,
@@ -133,10 +139,22 @@ var Guest = () => {
133
139
  size: "large",
134
140
  style: { width: "max-content" },
135
141
  onClick: handleAddGuest,
136
- className: "provider-information-add-button"
142
+ className: "appointment-guest-add-button"
137
143
  },
138
144
  /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-plus", style: { fontSize: "20px" } }),
139
145
  import_utils.locales.getText("pisell2.appointment.add.guest")
140
- )));
146
+ )), openOption ? /* @__PURE__ */ import_react.default.createElement(
147
+ import_InformationOptionsModal.default,
148
+ {
149
+ options,
150
+ open: openOption,
151
+ holderItem,
152
+ onCancel: () => setOpenOption(false),
153
+ onClick: (e) => {
154
+ handleClick(e, holderItem);
155
+ setOpenOption(false);
156
+ }
157
+ }
158
+ ) : null);
141
159
  };
142
160
  var Guest_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;
@@ -33,23 +33,50 @@ __export(Header_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Header_exports);
35
35
  var import_react = __toESM(require("react"));
36
+ var import_utils = require("@pisell/utils");
36
37
  var import_progressBar = __toESM(require("../../../eventBooking/components/progressBar"));
37
38
  var import_context = require("../../context");
39
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
38
40
  var import_index = require("./index.less");
39
41
  var Header = () => {
40
42
  var _a, _b;
41
- const { currentStep, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
43
+ const { currentStep, appointmentBooking, resources } = (0, import_context.useAppointmentBookingContext)();
44
+ const context = (0, import_useEngineContext.default)();
45
+ const stepName = (0, import_react.useMemo)(() => {
46
+ var _a2, _b2, _c, _d, _e;
47
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
48
+ if (key === "select-resource") {
49
+ const name = ((_d = (_c = (_b2 = resources == null ? void 0 : resources[0]) == null ? void 0 : _b2.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.title) || "";
50
+ return import_utils.locales.getText("pisell2.event.select.category")(name);
51
+ }
52
+ return (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description;
53
+ }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, resources]);
42
54
  const handleBack = () => {
55
+ var _a2;
56
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
57
+ const types = {
58
+ "select-time": "time",
59
+ "select-resource": "resource"
60
+ };
61
+ if (types[key]) {
62
+ appointmentBooking.deleteCartItemInfo(types[key]);
63
+ }
64
+ if (key === "select-date") {
65
+ appointmentBooking.clearDateRange();
66
+ }
43
67
  appointmentBooking.back();
44
68
  };
45
69
  const handleClose = () => {
46
- appointmentBooking.close();
70
+ var _a2;
71
+ const utils = context.appHelper.utils || {};
72
+ (_a2 = utils == null ? void 0 : utils.history) == null ? void 0 : _a2.replace("/");
73
+ appointmentBooking.destroy();
47
74
  };
48
75
  return /* @__PURE__ */ import_react.default.createElement(
49
76
  import_progressBar.default,
50
77
  {
51
- title: (_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.title,
52
- description: (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.description,
78
+ title: (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.title,
79
+ description: stepName,
53
80
  showBack: (currentStep == null ? void 0 : currentStep.index) > 0,
54
81
  onBack: () => handleBack(),
55
82
  onClose: () => handleClose()
@@ -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;
@@ -38,40 +38,37 @@ var import_resourceDisplay = __toESM(require("../../../eventBooking/components/r
38
38
  var import_materials = require("@pisell/materials");
39
39
  var import_hooks = require("../../hooks");
40
40
  var import_context = require("../../context");
41
+ var import_guests = __toESM(require("../../assets/guests.svg"));
41
42
  var import_utils = require("@pisell/utils");
42
43
  var import_index = require("./index.less");
43
- var Resource = ({ onChange }) => {
44
+ var Resource = () => {
44
45
  const [selectedResource, setSelectedResource] = (0, import_react.useState)(0);
45
46
  const { appointmentBooking, resources, carts, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
46
- const {
47
- getResourceList,
48
- getResourceTimeSlot,
49
- autoSelectAllProductResources
50
- } = (0, import_hooks.useAppointmentBookingResource)();
51
- console.log(resources, carts, appointmentBooking, "lists, products");
47
+ const { getResourceList, autoSelectAllProductResources } = (0, import_hooks.useAppointmentBookingResource)();
52
48
  (0, import_react.useEffect)(() => {
53
49
  const _resources = getResourceList();
54
- autoSelectAllProductResources("resources");
50
+ autoSelectAllProductResources();
51
+ getResourceList();
55
52
  }, []);
56
53
  (0, import_react.useEffect)(() => {
57
54
  var _a;
58
- console.log(resourceOtherParams == null ? void 0 : resourceOtherParams.errorList, "errorListerrorListerrorList");
59
55
  if (((_a = resourceOtherParams == null ? void 0 : resourceOtherParams.errorList) == null ? void 0 : _a.length) > 0) {
60
- return;
56
+ return (0, import_materials.PisellToast)({
57
+ content: import_utils.locales.getText("pisell2.appointment.no.available.time")
58
+ });
61
59
  }
62
60
  }, [resourceOtherParams == null ? void 0 : resourceOtherParams.errorList]);
63
61
  const anyResource = [
64
62
  {
65
63
  id: 0,
66
- image: "https://cdn-partners-api.fresha.com/employee-avatars/processed/399178/medium/3b77991b-0ee2-4d0f-9d6f-a7501b39afcd-tempImageHYe20U.jpg",
67
- title: "Any professional",
68
- subtitle: "for maximum availability"
64
+ image: import_guests.default,
65
+ title: import_utils.locales.getText("pisell2.appointment.any.professional"),
66
+ subtitle: import_utils.locales.getText("pisell2.appointment.for.maximum.availability")
69
67
  }
70
68
  ];
71
69
  const currentResource = (0, import_react.useMemo)(() => {
72
70
  var _a, _b;
73
71
  if (resources.length && carts.length) {
74
- console.log(resources, carts, "lists, products");
75
72
  if (carts.length === 1) {
76
73
  return (_b = (_a = resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[0];
77
74
  } else {
@@ -82,18 +79,15 @@ var Resource = ({ onChange }) => {
82
79
  }
83
80
  }, [resources, carts]);
84
81
  const resourcesResult = (0, import_react.useMemo)(() => {
85
- console.log(currentResource, resources, "wh98765756");
86
82
  return anyResource.concat((currentResource == null ? void 0 : currentResource.renderList) || []);
87
83
  }, [currentResource]);
88
84
  const onClick = (e) => {
89
85
  var _a;
90
86
  setSelectedResource(e.id);
91
- console.log(currentResource, e, "whcurrentResourcecurrentResource");
92
87
  if (e.id) {
93
- getResourceTimeSlot({
94
- product: (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.product,
95
- resources: currentResource == null ? void 0 : currentResource.renderList,
96
- currentResourceId: e.id
88
+ return appointmentBooking.updateCart({
89
+ _id: (_a = carts == null ? void 0 : carts[0]) == null ? void 0 : _a._id,
90
+ resources: [e]
97
91
  });
98
92
  }
99
93
  };
@@ -111,7 +105,8 @@ var Resource = ({ onChange }) => {
111
105
  dataSource: item,
112
106
  direction: "vertical",
113
107
  children: !(item == null ? void 0 : item.image) ? (_a = item == null ? void 0 : item.title) == null ? void 0 : _a.charAt(0).toUpperCase() : null,
114
- selected: selectedResource === (item == null ? void 0 : item.id)
108
+ selected: selectedResource === (item == null ? void 0 : item.id),
109
+ className: !item.id ? "appointment-resource-guest-card" : ""
115
110
  }
116
111
  );
117
112
  },
@@ -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
  }
@@ -33,21 +33,23 @@ __export(Services_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Services_exports);
35
35
  var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
36
37
  var import_SearchLg = __toESM(require("@pisell/icon/es/SearchLg"));
37
38
  var import_utils = require("@pisell/utils");
38
39
  var import_materials = require("@pisell/materials");
39
- var import_antd = require("antd");
40
40
  var import_TabProduct = __toESM(require("../../../booking/components/TabProduct"));
41
41
  var import_utils2 = require("../../../booking/utils");
42
42
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
43
43
  var import_context = require("../../context");
44
+ var import_hooks = require("../../hooks");
44
45
  var import_index = require("./index.less");
45
46
  var Services = () => {
46
47
  const searchRef = (0, import_react.useRef)();
47
48
  const [search, setSearch] = (0, import_react.useState)("");
48
49
  const context = (0, import_useEngineContext.default)();
49
50
  const { utils } = context.appHelper || {};
50
- const { appointmentBooking, products, setProducts } = (0, import_context.useAppointmentBookingContext)();
51
+ const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
52
+ const { products, setProducts } = (0, import_context.useAppointmentBookingContext)();
51
53
  (0, import_react.useEffect)(() => {
52
54
  const { productModuleParams } = appointmentBooking.otherParams || {};
53
55
  appointmentBooking.loadProducts(productModuleParams).then((res) => {
@@ -65,6 +67,11 @@ var Services = () => {
65
67
  const resources = ((_b = (_a = data == null ? void 0 : data.origin) == null ? void 0 : _a.product_resource) == null ? void 0 : _b.resources) || [];
66
68
  const activeStatus = resources.find((item2) => item2.status === 1);
67
69
  if (!activeStatus) {
70
+ return (0, import_materials.PisellToast)({
71
+ content: import_utils.locales.getText(
72
+ "pisell2.appointment.no.available.service"
73
+ )
74
+ });
68
75
  }
69
76
  const product = {
70
77
  ...data,
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const Resource: ({ params }: any) => JSX.Element;
2
+ declare const Resource: () => JSX.Element;
3
3
  export default Resource;
@@ -34,34 +34,39 @@ __export(TimeSlicing_exports, {
34
34
  module.exports = __toCommonJS(TimeSlicing_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_materials = require("@pisell/materials");
37
+ var import_utils = require("@pisell/utils");
37
38
  var import_context = require("../../context");
39
+ var import_hooks = require("../../hooks");
38
40
  var import_index = require("./index.less");
39
- var Resource = ({ params }) => {
41
+ var Resource = () => {
40
42
  const [selectedResource, setSelectedResource] = (0, import_react.useState)("");
41
- const { times, resources, appointmentBooking, carts } = (0, import_context.useAppointmentBookingContext)();
42
- console.log(params, resources, times, "wh8765");
43
+ const { times, appointmentBooking, setSelectedTime, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
44
+ const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
45
+ (0, import_react.useEffect)(() => {
46
+ getResourceTimeSlot();
47
+ }, []);
48
+ const getAutoSelect = async (val) => {
49
+ setSelectedTime(val);
50
+ const { resourceCodes } = getResourceList();
51
+ const { errorList } = await appointmentBooking.autoSelectAllProductResources(
52
+ resourceCodes == null ? void 0 : resourceCodes[1],
53
+ val
54
+ );
55
+ const result = await appointmentBooking.submitTimeSlot(val);
56
+ console.log(errorList, result, "wh9896788");
57
+ };
58
+ (0, import_react.useEffect)(() => {
59
+ var _a;
60
+ if ((times == null ? void 0 : times.length) > 0) {
61
+ setSelectedResource((_a = times == null ? void 0 : times[0]) == null ? void 0 : _a.start_time);
62
+ getAutoSelect(times == null ? void 0 : times[0]);
63
+ }
64
+ }, [times]);
43
65
  const onClick = async (e) => {
44
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
45
66
  setSelectedResource(e == null ? void 0 : e.start_time);
46
- const data = await appointmentBooking.autoSelectResource({
47
- resourceProductData: resources == null ? void 0 : resources[0],
48
- resources: (_c = (_b = (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[1]) == null ? void 0 : _c.renderList,
49
- timeSlots: e
50
- });
51
- if (data) {
52
- const _resources = [
53
- (_g = (_f = (_e = (_d = resources == null ? void 0 : resources[0]) == null ? void 0 : _d.resources) == null ? void 0 : _e[0]) == null ? void 0 : _f.renderList) == null ? void 0 : _g[0],
54
- (_k = (_j = (_i = (_h = resources == null ? void 0 : resources[0]) == null ? void 0 : _h.resources) == null ? void 0 : _i[1]) == null ? void 0 : _j.renderList) == null ? void 0 : _k[0]
55
- ];
56
- const aa = await appointmentBooking.submitTimeSlot({
57
- resourceProductData: resources == null ? void 0 : resources[0],
58
- selectedResources: _resources,
59
- timeSlots: e
60
- });
61
- console.log(data, _resources, aa, "wh9879676");
62
- }
67
+ getAutoSelect(e);
63
68
  };
64
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, times.map((item, index) => {
69
+ return (times == null ? void 0 : times.length) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, times.map((item, index) => {
65
70
  return /* @__PURE__ */ import_react.default.createElement(
66
71
  "div",
67
72
  {
@@ -72,6 +77,11 @@ var Resource = ({ params }) => {
72
77
  /* @__PURE__ */ import_react.default.createElement("span", null, item == null ? void 0 : item.start_time),
73
78
  /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-chevron-right", className: `icon` })
74
79
  );
75
- }));
80
+ })) : /* @__PURE__ */ import_react.default.createElement(
81
+ import_materials.PisellEmpty,
82
+ {
83
+ description: import_utils.locales.getText("pisell2.appointment.booking.empty.time")
84
+ }
85
+ );
76
86
  };
77
87
  var TimeSlicing_default = Resource;
@@ -1,4 +1,5 @@
1
1
  .appointment-time-slicing-wrap {
2
+ padding-top: 20px;
2
3
  .item {
3
4
  cursor: pointer;
4
5
  padding: 25px 20px;
@@ -18,6 +19,10 @@
18
19
 
19
20
  &:hover {
20
21
  background-color: #f1f1f1;
22
+ cursor: pointer;
23
+ }
24
+ &.active {
25
+ background-color: #f1f1f1;
21
26
  }
22
27
  }
23
28
  }
@@ -40,8 +40,8 @@ var import_antd = require("antd");
40
40
  var import_utils = require("@pisell/utils");
41
41
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
42
42
  var import_materials = require("@pisell/materials");
43
- var import_icons = require("@ant-design/icons");
44
43
  var import_hooks = require("../../hooks");
44
+ var import_utils2 = require("../../utils");
45
45
  var import_voucher = require("../../../booking/components/voucher/index.less");
46
46
  var import_index = require("./index.less");
47
47
  var ShopDiscountHooks = {
@@ -65,6 +65,8 @@ var VoucherCard = (props) => {
65
65
  const [code, setCode] = (0, import_react.useState)("");
66
66
  const [discountList, setDisCountList] = (0, import_react.useState)([]);
67
67
  const productRef = (0, import_react.useRef)(products);
68
+ const { openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
69
+ const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
68
70
  const cart = (_b = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _b.cart;
69
71
  const isUserLoggedIn = (0, import_react.useMemo)(() => {
70
72
  var _a2, _b2;
@@ -79,29 +81,30 @@ var VoucherCard = (props) => {
79
81
  });
80
82
  }, [discountList]);
81
83
  (0, import_react.useEffect)(() => {
82
- const shopDiscount2 = pisellos.getModule("shopDiscount");
83
- shopDiscount2.setCustomer(currentUser);
84
- }, [currentUser.id]);
84
+ if (isUserLoggedIn) {
85
+ const shopDiscount2 = pisellos.getModule("shopDiscount");
86
+ shopDiscount2.setCustomer(currentUser);
87
+ }
88
+ }, [currentUser.id, isUserLoggedIn]);
85
89
  (0, import_react.useEffect)(() => {
86
90
  shopDiscount.setProductList(products);
87
91
  }, [products]);
88
- (0, import_react.useEffect)(() => {
89
- if (productRef.current === products) {
90
- return;
91
- }
92
- const val = shopDiscount.calcDiscount(products);
93
- console.log("input: ", products);
94
- console.log("output: ", val);
95
- productRef.current = val.productList;
92
+ const onCartChange = () => {
93
+ const products2 = cart == null ? void 0 : cart.getItems();
94
+ const val = shopDiscount.calcDiscount(products2);
96
95
  cart == null ? void 0 : cart.batchSetItems(val.productList);
97
- }, [products]);
96
+ };
98
97
  (0, import_react.useEffect)(() => {
98
+ const val = shopDiscount.getDiscountList();
99
+ setDisCountList(val);
99
100
  pisellos.effects.on(
100
101
  ShopDiscountHooks.onLoadPrepareCalcResult,
101
102
  (result) => {
102
103
  cart == null ? void 0 : cart.batchSetItems(result.productList);
103
104
  }
104
105
  );
106
+ pisellos.effects.on("appointmentBooking_cart:onAddItem", onCartChange);
107
+ pisellos.effects.on("appointmentBooking_cart:onRemoveItem", onCartChange);
105
108
  pisellos.effects.on(
106
109
  ShopDiscountHooks.onDiscountListChange,
107
110
  (discount) => {
@@ -114,6 +117,7 @@ var VoucherCard = (props) => {
114
117
  const val = await shopDiscount.scanCode(code);
115
118
  if (val == null ? void 0 : val.isAvailable) {
116
119
  cart == null ? void 0 : cart.batchSetItems(val.productList);
120
+ setCode("");
117
121
  } else {
118
122
  (0, import_materials.PisellToast)({
119
123
  content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
@@ -127,11 +131,17 @@ var VoucherCard = (props) => {
127
131
  className: "login-btn",
128
132
  onClick: () => {
129
133
  if (!action) return;
130
- action({
131
- type: "pisell1.login",
132
- data: {},
134
+ openLoginModal({
133
135
  callback: (status) => {
136
+ var _a2, _b2, _c;
137
+ const user = (_c = (_b2 = (_a2 = utils.store) == null ? void 0 : _a2.getState()) == null ? void 0 : _b2.global) == null ? void 0 : _c.userInfo;
138
+ const currentUser2 = (0, import_utils2.formatCustomer)(user);
139
+ const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
134
140
  if (status === "success") {
141
+ appointmentBooking.setLoginAccount(
142
+ meAccount == null ? void 0 : meAccount.id,
143
+ currentUser2
144
+ );
135
145
  }
136
146
  }
137
147
  });
@@ -178,7 +188,9 @@ var VoucherCard = (props) => {
178
188
  discountId: val.id,
179
189
  isSelected: val.isSelected
180
190
  });
181
- (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.cart) == null ? void 0 : _b2.batchSetItems(detail.productList);
191
+ (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.cart) == null ? void 0 : _b2.batchSetItems(
192
+ detail.productList
193
+ );
182
194
  }
183
195
  }
184
196
  ) : null,
@@ -193,13 +205,7 @@ var VoucherCard = (props) => {
193
205
  size: "small",
194
206
  placeholder: import_utils.locales.getText(
195
207
  "pisell2.text.goodpass.enter-code"
196
- ),
197
- suffix: /* @__PURE__ */ import_react.default.createElement(import_materials.PisellTooltip, { title: "" }, /* @__PURE__ */ import_react.default.createElement(
198
- import_icons.QuestionCircleOutlined,
199
- {
200
- style: { color: "rgba(0,0,0,.45)" }
201
- }
202
- ))
208
+ )
203
209
  }
204
210
  )), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
205
211
  ));
@@ -19,6 +19,8 @@ interface AppointmentBookingContextType {
19
19
  symbolic?: any;
20
20
  resourceOtherParams?: any;
21
21
  setResourceOtherParams: (val: any) => void;
22
+ selectedTime: any;
23
+ setSelectedTime: (val: any) => void;
22
24
  }
23
25
  export declare const AppointmentBookingProvider: ({ children, }: {
24
26
  children: ReactNode;
@@ -52,6 +52,7 @@ var AppointmentBookingProvider = ({
52
52
  const [isLastStep, setIsLastStep] = (0, import_react.useState)(false);
53
53
  const [carts, setCarts] = (0, import_react.useState)([]);
54
54
  const [resourceOtherParams, setResourceOtherParams] = (0, import_react.useState)({});
55
+ const [selectedTime, setSelectedTime] = (0, import_react.useState)(null);
55
56
  const { appHelper } = (0, import_useEngineContext.default)();
56
57
  const symbolic = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.getSymbolic();
57
58
  console.log(3234234, times, resources);
@@ -74,7 +75,9 @@ var AppointmentBookingProvider = ({
74
75
  appHelper,
75
76
  symbolic,
76
77
  resourceOtherParams,
77
- setResourceOtherParams
78
+ setResourceOtherParams,
79
+ selectedTime,
80
+ setSelectedTime
78
81
  };
79
82
  return /* @__PURE__ */ import_react.default.createElement(AppointmentBookingContext.Provider, { value }, children);
80
83
  };