@pisell/private-materials 3.3.76 → 3.3.78

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 (356) 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 +7 -7
  11. package/es/businessModel/SalesModel/Sales/index.js +37 -4
  12. package/es/components/Sales/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +7 -0
  14. package/es/components/Sales/Resource/serve.js +10 -0
  15. package/es/components/Sales/Summary/utils.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  18. package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
  19. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  20. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  21. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  22. package/es/components/appointmentBooking/components/Date/index.js +24 -14
  23. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  24. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  25. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  26. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  27. package/es/components/appointmentBooking/components/Header/index.js +8 -14
  28. package/es/components/appointmentBooking/components/Services/index.js +38 -36
  29. package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  30. package/es/components/appointmentBooking/components/Voucher/index.js +13 -0
  31. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  32. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +6 -7
  33. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  34. package/es/components/appointmentBooking/index.d.ts +1 -0
  35. package/es/components/appointmentBooking/index.js +14 -0
  36. package/es/components/appointmentBooking/index.less +1 -1
  37. package/es/components/appointmentBooking/locales.js +3 -3
  38. package/es/components/booking/addons/index.js +12 -3
  39. package/es/components/booking/addons/model.js +5 -0
  40. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  41. package/es/components/booking/components/TabProduct/selectProductItem/index.js +3 -1
  42. package/es/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
  43. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  44. package/es/components/booking/components/browserSelect/index.js +1 -1
  45. package/es/components/booking/components/footer/amount.js +2 -1
  46. package/es/components/booking/components/footer/index.d.ts +1 -0
  47. package/es/components/booking/components/footer/index.js +9 -3
  48. package/es/components/booking/components/footer/utils.js +74 -36
  49. package/es/components/booking/components/voucher/index.d.ts +1 -0
  50. package/es/components/booking/components/voucher/index.js +110 -66
  51. package/es/components/booking/components/voucher/utils.d.ts +4 -0
  52. package/es/components/booking/components/voucher/utils.js +15 -0
  53. package/es/components/booking/forms/footer.d.ts +1 -0
  54. package/es/components/booking/forms/model.js +5 -5
  55. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  56. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  57. package/es/components/booking/hooks/useQuotation.d.ts +1 -0
  58. package/es/components/booking/hooks/useQuotation.js +16 -1
  59. package/es/components/booking/info/client/index.js +12 -3
  60. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  61. package/es/components/booking/info/service/Lists.d.ts +1 -0
  62. package/es/components/booking/info/service/Lists.js +1 -1
  63. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  64. package/es/components/booking/info/service/addService/index.js +3 -1
  65. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  66. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  67. package/es/components/booking/info/service/like/index.js +1 -1
  68. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  69. package/es/components/booking/info/service2/utils.js +6 -2
  70. package/es/components/booking/info/utils.js +1 -1
  71. package/es/components/booking/info2/index.js +9 -4
  72. package/es/components/booking/info2/serve.d.ts +1 -1
  73. package/es/components/booking/info2/serve.js +12 -8
  74. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  75. package/es/components/booking/info2/service/addService/index.js +5 -3
  76. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  77. package/es/components/booking/info2/service/editService/index.js +5 -2
  78. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  79. package/es/components/booking/info2/utils.d.ts +1 -1
  80. package/es/components/booking/info2/utils.js +3 -2
  81. package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
  82. package/es/components/booking/info2/utilsByBooking.js +5 -3
  83. package/es/components/booking/locales.d.ts +3 -0
  84. package/es/components/booking/locales.js +6 -3
  85. package/es/components/booking/materiels/startTime/index.js +1 -1
  86. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  87. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  88. package/es/components/booking/notes/model.js +5 -5
  89. package/es/components/booking/payments/model.js +5 -5
  90. package/es/components/booking/utils.d.ts +1 -0
  91. package/es/components/booking/utils.js +4 -0
  92. package/es/components/eftposPay/amount.d.ts +1 -1
  93. package/es/components/eftposPay/device.d.ts +1 -1
  94. package/es/components/eftposPay/hooks.d.ts +1 -1
  95. package/es/components/eftposPay/store/index.d.ts +3 -3
  96. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  97. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  98. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  99. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  100. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  101. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  102. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  103. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  104. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  105. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  106. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  107. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  108. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  109. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  110. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  111. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  112. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  113. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  114. package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
  115. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  116. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  117. package/es/components/eventBooking/index.d.ts +1 -0
  118. package/es/components/eventBooking/index.js +21 -7
  119. package/es/components/eventBooking/locales.js +3 -3
  120. package/es/components/index.d.ts +2 -1
  121. package/es/components/index.js +2 -1
  122. package/es/components/listComponent/index.js +5 -5
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  124. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  125. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  126. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  127. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  128. package/es/components/productExtension/card/index.js +3 -3
  129. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  130. package/es/components/productExtension/fields/Forms/index.js +12 -12
  131. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  132. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  133. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  134. package/es/components/productExtension/server.js +2 -2
  135. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  136. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  137. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  138. package/es/components/schedules/calendar/index.js +4 -4
  139. package/es/components/schedules/calendar/serve.js +2 -2
  140. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  141. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  142. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  143. package/es/components/schedules/components/ResourceList/index.js +1 -1
  144. package/es/components/schedules/components/Search/index.js +5 -5
  145. package/es/components/schedules/model.js +5 -5
  146. package/es/components/schedules/openHours/index.js +1 -1
  147. package/es/components/schedules/openHours/serve.js +2 -2
  148. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  149. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  150. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  151. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  152. package/es/components/schedules/products/serve.js +2 -2
  153. package/es/components/schedules/products/utils.js +5 -5
  154. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  155. package/es/components/schedules/resources/detail/index.js +10 -10
  156. package/es/components/schedules/resources/list/index.js +2 -2
  157. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  158. package/es/components/schedules/resources/serve.js +2 -2
  159. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  160. package/es/components/schedules/utils.d.ts +1 -1
  161. package/es/components/schedules/utils.js +4 -4
  162. package/es/components/selectModal/index.js +2 -2
  163. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  164. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  165. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  166. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  167. package/es/components/stepController/components/Content/index.d.ts +7 -0
  168. package/es/components/stepController/components/Content/index.js +9 -0
  169. package/es/components/stepController/components/Content/index.less +8 -0
  170. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  171. package/es/components/stepController/components/Footer/index.js +15 -0
  172. package/es/components/stepController/components/Footer/index.less +39 -0
  173. package/es/components/stepController/components/Header/index.d.ts +20 -0
  174. package/es/components/stepController/components/Header/index.js +97 -0
  175. package/es/components/stepController/components/Header/index.less +21 -0
  176. package/es/components/stepController/index.d.ts +5 -0
  177. package/es/components/stepController/index.js +64 -0
  178. package/es/components/stepController/index.less +11 -0
  179. package/es/components/stepController/locales.d.ts +27 -0
  180. package/es/components/stepController/locales.js +32 -0
  181. package/es/components/stepController/types.d.ts +23 -0
  182. package/es/components/stepController/types.js +1 -0
  183. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
  184. package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -8
  185. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  186. package/es/components/ticketBooking/components/ticketBooking/index.js +124 -3
  187. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  188. package/es/components/ticketBooking/locales.d.ts +164 -146
  189. package/es/components/ticketBooking/locales.js +195 -147
  190. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  191. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  192. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  193. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  194. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  195. package/es/components/ticketBooking/utils/index.js +58 -6
  196. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  197. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  198. package/es/hooks/useComponents.js +1 -1
  199. package/es/hooks/useWindowSize.d.ts +5 -0
  200. package/es/hooks/useWindowSize.js +26 -0
  201. package/es/index.d.ts +1 -0
  202. package/es/index.js +2 -1
  203. package/es/utils/index.d.ts +1 -1
  204. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  205. package/lib/components/Sales/Resource/index.js +1 -1
  206. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  207. package/lib/components/Sales/Resource/serve.js +9 -2
  208. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  209. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  210. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  211. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -4
  212. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  213. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  214. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  215. package/lib/components/appointmentBooking/components/Date/index.js +12 -5
  216. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  217. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  218. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  219. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  220. package/lib/components/appointmentBooking/components/Header/index.js +2 -3
  221. package/lib/components/appointmentBooking/components/Services/index.js +19 -18
  222. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  223. package/lib/components/appointmentBooking/components/Voucher/index.js +9 -0
  224. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  225. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +0 -1
  226. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  227. package/lib/components/appointmentBooking/index.d.ts +1 -0
  228. package/lib/components/appointmentBooking/index.js +11 -0
  229. package/lib/components/appointmentBooking/index.less +1 -1
  230. package/lib/components/appointmentBooking/locales.js +3 -3
  231. package/lib/components/booking/addons/index.js +12 -2
  232. package/lib/components/booking/addons/model.js +3 -0
  233. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  234. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +5 -1
  235. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
  236. package/lib/components/booking/components/footer/amount.js +2 -1
  237. package/lib/components/booking/components/footer/index.d.ts +1 -0
  238. package/lib/components/booking/components/footer/index.js +10 -5
  239. package/lib/components/booking/components/footer/utils.js +48 -12
  240. package/lib/components/booking/components/voucher/index.d.ts +1 -0
  241. package/lib/components/booking/components/voucher/index.js +111 -67
  242. package/lib/components/booking/components/voucher/utils.d.ts +4 -0
  243. package/lib/components/booking/components/voucher/utils.js +43 -0
  244. package/lib/components/booking/forms/footer.d.ts +1 -0
  245. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  246. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  247. package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
  248. package/lib/components/booking/hooks/useQuotation.js +19 -1
  249. package/lib/components/booking/info/client/index.js +10 -3
  250. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  251. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  252. package/lib/components/booking/info/service/Lists.js +1 -1
  253. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  254. package/lib/components/booking/info/service/addService/index.js +2 -0
  255. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  256. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  257. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  258. package/lib/components/booking/info/service2/utils.js +3 -1
  259. package/lib/components/booking/info/utils.js +1 -3
  260. package/lib/components/booking/info2/index.js +9 -9
  261. package/lib/components/booking/info2/serve.d.ts +1 -1
  262. package/lib/components/booking/info2/serve.js +1 -1
  263. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  264. package/lib/components/booking/info2/service/addService/index.js +4 -2
  265. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  266. package/lib/components/booking/info2/service/editService/index.js +5 -2
  267. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  268. package/lib/components/booking/info2/utils.d.ts +1 -1
  269. package/lib/components/booking/info2/utils.js +2 -2
  270. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
  271. package/lib/components/booking/info2/utilsByBooking.js +3 -2
  272. package/lib/components/booking/locales.d.ts +3 -0
  273. package/lib/components/booking/locales.js +6 -3
  274. package/lib/components/booking/utils.d.ts +1 -0
  275. package/lib/components/booking/utils.js +6 -0
  276. package/lib/components/eftposPay/amount.d.ts +1 -1
  277. package/lib/components/eftposPay/device.d.ts +1 -1
  278. package/lib/components/eftposPay/hooks.d.ts +1 -1
  279. package/lib/components/eftposPay/store/index.d.ts +3 -3
  280. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  281. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  282. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  283. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  284. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  285. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  286. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  287. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  288. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  289. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  290. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  291. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  292. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  293. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  294. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  295. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  296. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  297. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  298. package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
  299. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  300. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  301. package/lib/components/eventBooking/index.d.ts +1 -0
  302. package/lib/components/eventBooking/index.js +11 -7
  303. package/lib/components/eventBooking/locales.js +3 -3
  304. package/lib/components/index.d.ts +2 -1
  305. package/lib/components/index.js +3 -0
  306. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  307. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  308. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  309. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  310. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  311. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  312. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  313. package/lib/components/schedules/utils.d.ts +1 -1
  314. package/lib/components/schedules/utils.js +1 -1
  315. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  316. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  317. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  318. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  319. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  320. package/lib/components/stepController/components/Content/index.js +40 -0
  321. package/lib/components/stepController/components/Content/index.less +8 -0
  322. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  323. package/lib/components/stepController/components/Footer/index.js +49 -0
  324. package/lib/components/stepController/components/Footer/index.less +39 -0
  325. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  326. package/lib/components/stepController/components/Header/index.js +104 -0
  327. package/lib/components/stepController/components/Header/index.less +21 -0
  328. package/lib/components/stepController/index.d.ts +5 -0
  329. package/lib/components/stepController/index.js +89 -0
  330. package/lib/components/stepController/index.less +11 -0
  331. package/lib/components/stepController/locales.d.ts +27 -0
  332. package/lib/components/stepController/locales.js +50 -0
  333. package/lib/components/stepController/types.d.ts +23 -0
  334. package/lib/components/stepController/types.js +17 -0
  335. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
  336. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +42 -5
  337. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  338. package/lib/components/ticketBooking/components/ticketBooking/index.js +124 -3
  339. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  340. package/lib/components/ticketBooking/locales.d.ts +164 -146
  341. package/lib/components/ticketBooking/locales.js +22 -4
  342. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  343. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  344. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  345. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  346. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  347. package/lib/components/ticketBooking/utils/index.js +48 -5
  348. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  349. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  350. package/lib/hooks/useWindowSize.d.ts +5 -0
  351. package/lib/hooks/useWindowSize.js +51 -0
  352. package/lib/index.d.ts +1 -0
  353. package/lib/index.js +3 -0
  354. package/lib/utils/index.d.ts +1 -1
  355. package/lowcode/step-controller/meta.ts +88 -0
  356. package/package.json +2 -2
@@ -104,25 +104,36 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
104
104
 
105
105
  // 是相同的商品
106
106
  var isSameProduct = function isSameProduct(a, b) {
107
- var _a$_extend, _b$_extend;
108
- return ((_a$_extend = a._extend) === null || _a$_extend === void 0 || (_a$_extend = _a$_extend.other) === null || _a$_extend === void 0 ? void 0 : _a$_extend.rowKey) === ((_b$_extend = b._extend) === null || _b$_extend === void 0 || (_b$_extend = _b$_extend.other) === null || _b$_extend === void 0 ? void 0 : _b$_extend.rowKey);
107
+ var _a$_extend2, _b$_extend2;
108
+ if (isNormalProductByDurationSchedule(a) && isNormalProductByDurationSchedule(b)) {
109
+ var _a$_extend, _b$_extend;
110
+ return ((_a$_extend = a._extend) === null || _a$_extend === void 0 || (_a$_extend = _a$_extend.other) === null || _a$_extend === void 0 ? void 0 : _a$_extend.rowKey) === ((_b$_extend = b._extend) === null || _b$_extend === void 0 || (_b$_extend = _b$_extend.other) === null || _b$_extend === void 0 ? void 0 : _b$_extend.rowKey);
111
+ }
112
+ return ((_a$_extend2 = a._extend) === null || _a$_extend2 === void 0 || (_a$_extend2 = _a$_extend2.other) === null || _a$_extend2 === void 0 ? void 0 : _a$_extend2.rowKey) === ((_b$_extend2 = b._extend) === null || _b$_extend2 === void 0 || (_b$_extend2 = _b$_extend2.other) === null || _b$_extend2 === void 0 ? void 0 : _b$_extend2.rowKey) && a._serviceKey === b._serviceKey;
109
113
  };
110
- export var addService = function addService(list, addItem) {
114
+ export var addService = function addService(list, addItem, state) {
111
115
  var value = list;
112
116
  var count;
113
- // 预约商品直接添加
114
- if (!isNormalProductByDurationSchedule(addItem)) {
117
+ // 预约商品 并且配置商品卡片不叠加 直接添加
118
+ if (!isNormalProductByDurationSchedule(addItem) && !getIsOverlayProduct(addItem, state)) {
115
119
  value.push(addItem);
116
120
  count = addItem._extend.quantity;
117
121
  } else {
118
122
  // 非预约商品判断是否相同,相同合并
119
123
  var isNotSame = true;
124
+ // 是否设置过 只追加到第一个中
125
+ var isSetCount = false;
120
126
  value = list.map(function (item) {
121
- if (isSameProduct(item, addItem)) {
127
+ // 是否商品券折扣的商品
128
+ var isGoodPassDiscountProduct = (item.discount_list || []).some(function (item) {
129
+ return item.type === 'good_pass';
130
+ });
131
+ if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct) {
122
132
  var _item$_extend, _addItem$_extend, _item$_extend2;
123
133
  isNotSame = false;
124
134
  var quantity = ((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.quantity) || 1) + ((addItem === null || addItem === void 0 || (_addItem$_extend = addItem._extend) === null || _addItem$_extend === void 0 ? void 0 : _addItem$_extend.quantity) || 1);
125
135
  count = quantity;
136
+ isSetCount = true;
126
137
  return _objectSpread(_objectSpread({}, item), {}, {
127
138
  _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
128
139
  quantity: quantity,
@@ -164,4 +175,45 @@ export var addServiceScroll = function addServiceScroll(rowKey, cacheItem) {
164
175
  }, 100);
165
176
  }
166
177
  });
178
+ };
179
+
180
+ // 获取购物车商品覆盖规则
181
+ export var getCartProductOverlay = function getCartProductOverlay(state) {
182
+ var _state$bookingConfig;
183
+ return (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.cart_product_overlay) || {
184
+ type: "product_all"
185
+ };
186
+ };
187
+
188
+ // 获取购物车商品是否覆盖
189
+ export var getIsOverlayProduct = function getIsOverlayProduct(item, state) {
190
+ var _getCartProductOverla = getCartProductOverlay(state),
191
+ type = _getCartProductOverla.type,
192
+ product_ids = _getCartProductOverla.product_ids;
193
+ if (type === 'product_all') {
194
+ return true;
195
+ }
196
+ return product_ids.includes(item.product_id || item.id);
197
+ };
198
+
199
+ // 获取购物车商品是否显示数量
200
+ export var getIsShowNumber = function getIsShowNumber(item, state) {
201
+ var isBookingTicket2 = state.isBookingTicket2;
202
+ return isNormalProductByDurationSchedule(item) || isBookingTicket2 && getIsOverlayProduct(item, state);
203
+ };
204
+
205
+ // 生成服务key
206
+ export var genServiceKey = function genServiceKey(item) {
207
+ var _item$_extend3, _item$_extend4, _item$_extend5;
208
+ var product_id = item.product_id;
209
+ var durationKey = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.duration;
210
+ var start_time = (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.start_time;
211
+ var total = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.total;
212
+ var resourceKey = '';
213
+ Object.values(item._extend.resource).forEach(function (resources) {
214
+ resources.forEach(function (resource) {
215
+ resourceKey += "".concat(resource.relation_id);
216
+ });
217
+ });
218
+ return "".concat(product_id, "-").concat(durationKey, "-").concat(resourceKey, "-").concat(start_time, "-").concat(total);
167
219
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
2
3
  import './index.less';
3
4
  interface ModalProps extends AntModalProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './../../index.less';
2
3
  declare const Search: () => JSX.Element;
3
4
  export default Search;
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
8
8
  var _utils$getComponents;
9
9
  var _ref = appHelper || {},
10
10
  utils = _ref.utils;
11
- return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
11
+ return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
12
12
  }, [components]);
13
13
  return Cpt;
14
14
  };
@@ -0,0 +1,5 @@
1
+ interface UseWindowSizeOptions {
2
+ debounceMs?: number;
3
+ }
4
+ export declare const useWindowSize: (options?: UseWindowSizeOptions) => void;
5
+ export {};
@@ -0,0 +1,26 @@
1
+ import { useEffect } from 'react';
2
+ export var useWindowSize = function useWindowSize() {
3
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4
+ var _options$debounceMs = options.debounceMs,
5
+ debounceMs = _options$debounceMs === void 0 ? 100 : _options$debounceMs;
6
+ useEffect(function () {
7
+ var timeoutId;
8
+ var setRealVH = function setRealVH() {
9
+ // window.innerHeight 会返回视口真实的高度(不包括工具栏)
10
+ var vh = window.innerHeight * 0.01;
11
+ document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
12
+ };
13
+ var debouncedHandleResize = function debouncedHandleResize() {
14
+ clearTimeout(timeoutId);
15
+ timeoutId = setTimeout(setRealVH, debounceMs);
16
+ };
17
+
18
+ // 页面加载和窗口大小变化时都重新计算
19
+ debouncedHandleResize();
20
+ window.addEventListener('resize', debouncedHandleResize);
21
+ return function () {
22
+ window.removeEventListener('resize', debouncedHandleResize);
23
+ clearTimeout(timeoutId);
24
+ };
25
+ }, [debounceMs]);
26
+ };
package/es/index.d.ts CHANGED
@@ -43,3 +43,4 @@ export { default as AppointmentBooking } from './components/appointmentBooking';
43
43
  export { default as AppointmentDeposit } from './components/appointmentBooking/deposit';
44
44
  export { default as TicketBooking } from './components/ticketBooking';
45
45
  export { default as SubTotal } from './components/subTotal';
46
+ export { default as StepController } from './components/stepController';
package/es/index.js CHANGED
@@ -46,4 +46,5 @@ export { default as ShoppingCart } from "./components/shoppingCart";
46
46
  export { default as AppointmentBooking } from "./components/appointmentBooking";
47
47
  export { default as AppointmentDeposit } from "./components/appointmentBooking/deposit";
48
48
  export { default as TicketBooking } from "./components/ticketBooking";
49
- export { default as SubTotal } from "./components/subTotal";
49
+ export { default as SubTotal } from "./components/subTotal";
50
+ export { default as StepController } from "./components/stepController";
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -35,6 +35,7 @@ __export(Sales_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(Sales_exports);
37
37
  var import_react = __toESM(require("react"));
38
+ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
38
39
  var defaultData = {};
39
40
  var SALES_MODEL_SESSION_STORAGE_KEY = "shop_h5_sales_model_data";
40
41
  var SalesContext = (0, import_react.createContext)(
@@ -45,14 +46,13 @@ var SalesProvider = (props) => {
45
46
  const dataRef = (0, import_react.useRef)({});
46
47
  const [data, setData] = (0, import_react.useState)(defaultData);
47
48
  const [hooks, setHooks] = (0, import_react.useState)(props.hooks);
49
+ const context = (0, import_useEngineContext.default)();
50
+ const utils = context.appHelper.utils || {};
48
51
  const _setData = (newData) => {
49
52
  dataRef.current = { ...dataRef.current, ...newData };
50
53
  console.log("sales_model_newData", dataRef.current);
51
54
  if (config == null ? void 0 : config.useSessionStorage) {
52
- sessionStorage.setItem(
53
- SALES_MODEL_SESSION_STORAGE_KEY,
54
- JSON.stringify(dataRef.current || {})
55
- );
55
+ setSessionStorage();
56
56
  }
57
57
  setData({ ...dataRef.current });
58
58
  };
@@ -60,14 +60,28 @@ var SalesProvider = (props) => {
60
60
  return dataRef.current;
61
61
  };
62
62
  const setSessionStorage = () => {
63
+ var _a, _b, _c;
64
+ const history = ((_a = utils == null ? void 0 : utils.getHistory) == null ? void 0 : _a.call(utils)) || {};
65
+ const cacheId = ((_c = (_b = history == null ? void 0 : history.location) == null ? void 0 : _b.query) == null ? void 0 : _c.cacheId) || "";
66
+ const sessionData = { ...dataRef.current || {}, cacheId };
63
67
  sessionStorage.setItem(
64
- SALES_MODEL_SESSION_STORAGE_KEY,
65
- JSON.stringify(dataRef.current || {})
68
+ `${SALES_MODEL_SESSION_STORAGE_KEY}`,
69
+ JSON.stringify(sessionData || {})
66
70
  );
67
71
  };
68
72
  const getSessionStorage = () => {
69
- const result = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
70
- return JSON.parse(result || "{}");
73
+ var _a, _b, _c;
74
+ const history = ((_a = utils == null ? void 0 : utils.getHistory) == null ? void 0 : _a.call(utils)) || {};
75
+ const strResult = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
76
+ const result = strResult ? JSON.parse(strResult || "{}") : {};
77
+ const cacheId = ((_c = (_b = history == null ? void 0 : history.location) == null ? void 0 : _b.query) == null ? void 0 : _c.cacheId) || "";
78
+ if (!cacheId && !(result == null ? void 0 : result.cacheId)) {
79
+ return result;
80
+ }
81
+ if (cacheId && (result == null ? void 0 : result.cacheId) === cacheId) {
82
+ return result;
83
+ }
84
+ return {};
71
85
  };
72
86
  const removeSessionStorage = () => {
73
87
  sessionStorage.removeItem(SALES_MODEL_SESSION_STORAGE_KEY);
@@ -90,7 +90,7 @@ var ResourceProvider = ({
90
90
  resourceMap.forEach((v) => renderData.push(v));
91
91
  return renderData;
92
92
  };
93
- const getResourceList = (0, import_ahooks.useRequest)(import_serve.getResourceListApi, {
93
+ const getResourceList = (0, import_ahooks.useRequest)(import_serve.getSpecialResourceListApi, {
94
94
  manual: true,
95
95
  onSuccess: (res) => {
96
96
  const formatData = formatResourceList(res);
@@ -3,3 +3,10 @@ export declare const getResourceListApi: (params: {
3
3
  shop_id: string;
4
4
  form_data_status: string;
5
5
  }) => Promise<any>;
6
+ /**
7
+ * @title: 获取特殊资源列表
8
+ * @Author: xiangfeng.xue
9
+ */
10
+ export declare const getSpecialResourceListApi: (params: {
11
+ event_item_ids?: string | number[];
12
+ }) => Promise<any>;
@@ -19,14 +19,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/components/Sales/Resource/serve.ts
20
20
  var serve_exports = {};
21
21
  __export(serve_exports, {
22
- getResourceListApi: () => getResourceListApi
22
+ getResourceListApi: () => getResourceListApi,
23
+ getSpecialResourceListApi: () => getSpecialResourceListApi
23
24
  });
24
25
  module.exports = __toCommonJS(serve_exports);
25
26
  var import_utils = require("../../../utils");
26
27
  var getResourceListApi = (params) => {
27
28
  return import_utils.request.getRequest().get("/h5/form/data/v1", params, { useCache: true });
28
29
  };
30
+ var getSpecialResourceListApi = (params) => {
31
+ return import_utils.request.getRequest().get("/h5/eventbookingv2/item/specify-resources", params, {
32
+ useCache: true
33
+ });
34
+ };
29
35
  // Annotate the CommonJS export names for ESM import in node:
30
36
  0 && (module.exports = {
31
- getResourceListApi
37
+ getResourceListApi,
38
+ getSpecialResourceListApi
32
39
  });
@@ -25,7 +25,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
25
25
  * @return {*}
26
26
  * @Author: xiangfeng.xue
27
27
  */
28
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
28
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
29
29
  /**
30
30
  * 计算所有价格明细
31
31
  * @param items - 购物车商品数组
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
4
  export default Total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: ({ onNext }: any) => JSX.Element;
3
4
  export default CartItem;
@@ -46,7 +46,7 @@ var import_Deposit = __toESM(require("../../Deposit"));
46
46
  var import_utils3 = require("../utils");
47
47
  var import_index = require("./index.less");
48
48
  var CartItem = ({ onNext }) => {
49
- var _a, _b, _c, _d;
49
+ var _a, _b, _c, _d, _e;
50
50
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
51
51
  const {
52
52
  carts,
@@ -78,6 +78,7 @@ var CartItem = ({ onNext }) => {
78
78
  return (0, import_utils2.formatHolder)(accountLists);
79
79
  }, [accountLists, isFormSubject]);
80
80
  const hasGoodPassApp = !!((_a = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a.call(businessUtils, "goodpass"));
81
+ const hasDiscountCardApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "discountcard"));
81
82
  const handleClickCard = (e, type, val) => {
82
83
  console.log(e, type, val, "handleClickCard");
83
84
  if (type === "note") {
@@ -187,8 +188,8 @@ var CartItem = ({ onNext }) => {
187
188
  hideAddBtn: false,
188
189
  holders,
189
190
  disabledEdit: isLastStep,
190
- isShowChangeResource: (_c = (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) == null ? void 0 : _c.startsWith("select-resource"),
191
- isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
191
+ isShowChangeResource: (_d = (_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) == null ? void 0 : _d.startsWith("select-resource"),
192
+ isShowDelete: ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) === "select-service",
192
193
  isShowPackageNote: false,
193
194
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
194
195
  isShowHolder: isFormSubject,
@@ -205,7 +206,7 @@ var CartItem = ({ onNext }) => {
205
206
  onChange: (e, type, key) => handleClickCard(e, type, key)
206
207
  }
207
208
  )),
208
- /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, hasGoodPassApp ? /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }) : null, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), (carts == null ? void 0 : carts.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit) ? /* @__PURE__ */ import_react.default.createElement(import_Deposit.default, null) : null, /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, { onNext }))
209
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, hasGoodPassApp || hasDiscountCardApp ? /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }) : null, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), (carts == null ? void 0 : carts.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit) ? /* @__PURE__ */ import_react.default.createElement(import_Deposit.default, null) : null, /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, { onNext }))
209
210
  ));
210
211
  };
211
212
  var Item_default = CartItem;
@@ -1,5 +1,5 @@
1
1
  .appointment-cart-item-wrap {
2
- height: calc(100vh - 100px);
2
+ height: calc(var(--vh, 1vh) * 100 - 100px);
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
 
@@ -39,7 +39,7 @@
39
39
  flex-direction: column;
40
40
  align-items: start;
41
41
 
42
- >div {
42
+ > div {
43
43
  display: flex;
44
44
  align-items: center;
45
45
  justify-content: space-between;
@@ -105,4 +105,4 @@
105
105
  flex: none;
106
106
  z-index: 10;
107
107
  }
108
- }
108
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
3
4
  export default Cart;
@@ -107,7 +107,7 @@
107
107
  margin-top: 0;
108
108
 
109
109
  .appointment-cart-item-wrap {
110
- height: calc(100vh - 16px) !important;
110
+ height: calc(var(--vh, 1vh) * 100 - 16px) !important;
111
111
  }
112
112
  }
113
113
  }
@@ -48,6 +48,7 @@ var import_index = require("./index.less");
48
48
  import_dayjs.default.extend(import_isSameOrBefore.default);
49
49
  var Date = (0, import_react.forwardRef)((props, ref) => {
50
50
  var _a, _b, _c;
51
+ const isFetchingDates = (0, import_react.useRef)(false);
51
52
  const [loading, setLoading] = (0, import_react.useState)(false);
52
53
  const [currentDate, setCurrentDate] = (0, import_react.useState)();
53
54
  const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
@@ -139,15 +140,22 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
139
140
  endDate
140
141
  };
141
142
  const data = await getDateData(params);
143
+ const firstAvailableDate = (data || []).find(
144
+ (d) => d.status === "available"
145
+ );
146
+ if (!firstAvailableDate && !isFetchingDates.current) {
147
+ isFetchingDates.current = true;
148
+ const nextMonthDate = (0, import_dayjs.default)(date).add(1, "month");
149
+ setCurrentMonth(nextMonthDate);
150
+ setLoading(true);
151
+ return;
152
+ }
142
153
  const selected = await appointmentBooking.getDateRange();
143
154
  console.log(data, selected, customPageId, "getDates");
144
155
  if ((selected == null ? void 0 : selected.length) > 0) {
145
156
  setCurrentDate((_a2 = selected == null ? void 0 : selected[0]) == null ? void 0 : _a2.date);
146
157
  } else if (!isDateSelectedFirst) {
147
- if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
148
- const firstAvailableDate = (data || []).find(
149
- (d) => d.status === "available"
150
- );
158
+ if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM") || isFetchingDates.current) {
151
159
  if (firstAvailableDate) {
152
160
  setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
153
161
  appointmentBooking.setDateRange([firstAvailableDate]);
@@ -171,7 +179,6 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
171
179
  } catch (error) {
172
180
  setLoading(false);
173
181
  setDateMonthList([]);
174
- console.log(error, "wh978968234234");
175
182
  }
176
183
  };
177
184
  (0, import_react.useEffect)(() => {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: () => JSX.Element;
3
4
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Header: () => JSX.Element;
3
4
  export default Header;
@@ -74,7 +74,7 @@ var Header = () => {
74
74
  return ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.description) || "";
75
75
  }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, currentSelectedResources]);
76
76
  const handleBack = async () => {
77
- var _a2, _b;
77
+ var _a2;
78
78
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
79
79
  const types = {
80
80
  "select-time": "time",
@@ -89,8 +89,7 @@ var Header = () => {
89
89
  }
90
90
  if (key === "select-service") {
91
91
  appointmentBooking.clearCart();
92
- const type = await checkProductType((_b = carts == null ? void 0 : carts[0]) == null ? void 0 : _b.id);
93
- if (type === "duration") {
92
+ if (appointmentBooking.isCartHasDurationProduct()) {
94
93
  appointmentBooking.deleteCartItemInfo("time");
95
94
  }
96
95
  }
@@ -74,9 +74,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
74
74
  let type = "";
75
75
  if (!isRetailTemplate) {
76
76
  type = await checkProductType(item == null ? void 0 : item.id);
77
- if (type === "session") {
78
- appointmentBooking.openProductDetail(item.id);
79
- }
77
+ appointmentBooking.openProductDetail(item.id);
80
78
  }
81
79
  utils == null ? void 0 : utils.action({
82
80
  type: "pisell1.productDetail",
@@ -86,6 +84,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
86
84
  },
87
85
  callback: async (data) => {
88
86
  var _a, _b;
87
+ if (data.isCancel) {
88
+ appointmentBooking.closeProductDetail();
89
+ return;
90
+ }
89
91
  const product = {
90
92
  ...data,
91
93
  options: (data == null ? void 0 : data.option) || []
@@ -96,13 +98,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
96
98
  appointmentBooking.storeProduct(product);
97
99
  return;
98
100
  }
99
- if (data == null ? void 0 : data.isCancel) {
100
- if (type === "session") {
101
- appointmentBooking.closeProductDetail();
102
- appointmentBooking.getAvailableDate();
103
- }
104
- return;
105
- }
106
101
  const session = data == null ? void 0 : data.session;
107
102
  if (session) {
108
103
  const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
@@ -114,7 +109,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
114
109
  endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
115
110
  }
116
111
  });
117
- appointmentBooking.closeProductDetail();
118
112
  await appointmentBooking.getAvailableDate({
119
113
  startDate,
120
114
  endDate
@@ -132,16 +126,23 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
132
126
  await appointmentBooking.getAvailableDate();
133
127
  }
134
128
  }
129
+ appointmentBooking.closeProductDetail();
135
130
  if (isDateSelectedFirst) {
136
131
  const index = (currentStep == null ? void 0 : currentStep.index) + 2;
137
- if (type === "duration") {
138
- const description = import_utils.locales.getText(
139
- "pisell2.appointment.select.time"
140
- );
141
- appointmentBooking.addStep(
142
- { index, key: "select-time", description },
143
- "select-resource"
132
+ if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
133
+ const { stepList } = (0, import_hooks.useAppointmentBookingStep)();
134
+ const hasResourceStep = stepList == null ? void 0 : stepList.find(
135
+ (item2) => (item2 == null ? void 0 : item2.key) === "select-resource"
144
136
  );
137
+ if (hasResourceStep) {
138
+ const description = import_utils.locales.getText(
139
+ "pisell2.appointment.select.time"
140
+ );
141
+ appointmentBooking.addStep(
142
+ { index, key: "select-time", description },
143
+ "select-resource"
144
+ );
145
+ }
145
146
  } else {
146
147
  removeStep("select-time");
147
148
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../booking/components/voucher/index.less';
2
3
  import './index.less';
3
4
  declare const VoucherCard: (props: any) => JSX.Element;
@@ -76,6 +76,7 @@ var VoucherCard = (props) => {
76
76
  return discountList.filter((item) => !!item.isAvailable).map((discount) => {
77
77
  return {
78
78
  ...discount,
79
+ isDisabled: discount.isDisabled || discount.isDisabledForProductUsed,
79
80
  savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
80
81
  };
81
82
  });
@@ -122,6 +123,7 @@ var VoucherCard = (props) => {
122
123
  );
123
124
  pisellos.effects.on("appointmentBooking_cart:onAddItem", onCartChange);
124
125
  pisellos.effects.on("appointmentBooking_cart:onUpdateQuotationPrice", onCartChange);
126
+ pisellos.effects.on("appointmentBooking_cart:onUpdateCartItemNums", onCartChange);
125
127
  pisellos.effects.on("appointmentBooking_cart:onRemoveItem", onCartChange);
126
128
  pisellos.effects.on(
127
129
  ShopDiscountHooks.onDiscountListChange,
@@ -169,6 +171,11 @@ var VoucherCard = (props) => {
169
171
  import_utils.locales.getText("pisell2.text.goodpass.login")
170
172
  ), /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.goodpass.login-tip"))));
171
173
  };
174
+ const mixedSort = (val) => {
175
+ return [...val].sort((a, b) => {
176
+ return Number(b == null ? void 0 : b.isSelected) - Number(a == null ? void 0 : a.isSelected);
177
+ });
178
+ };
172
179
  const renderVoucherInfo = () => {
173
180
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), /* @__PURE__ */ import_react.default.createElement(
174
181
  "span",
@@ -201,6 +208,7 @@ var VoucherCard = (props) => {
201
208
  {
202
209
  style: { width: "100%" },
203
210
  dataSource: availableData,
211
+ mixedSort,
204
212
  onChange: (val) => {
205
213
  const detail = shopDiscount.setDiscountSelected({
206
214
  discountId: val.id,
@@ -215,6 +223,7 @@ var VoucherCard = (props) => {
215
223
  import_materials.PisellInput,
216
224
  {
217
225
  value: code,
226
+ allowClear: true,
218
227
  onChange: (e) => {
219
228
  var _a2;
220
229
  setCode((_a2 = e.target) == null ? void 0 : _a2.value);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const DepositModal: (props: any) => JSX.Element;
3
4
  export default DepositModal;
@@ -63,7 +63,6 @@ var DepositModal = (props) => {
63
63
  } catch (error) {
64
64
  console.log(error);
65
65
  onChange && onChange(error);
66
- debugger;
67
66
  } finally {
68
67
  setLoading(false);
69
68
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: (props: any) => JSX.Element;
3
4
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AppointmentBooking: () => JSX.Element;
3
4
  export default AppointmentBooking;
@@ -58,6 +58,17 @@ var AppointmentBooking = () => {
58
58
  }
59
59
  });
60
60
  }, []);
61
+ (0, import_react.useEffect)(() => {
62
+ const setRealVH = () => {
63
+ const vh = window.innerHeight * 0.01;
64
+ document.documentElement.style.setProperty("--vh", `${vh}px`);
65
+ };
66
+ setRealVH();
67
+ window.addEventListener("resize", setRealVH);
68
+ return () => {
69
+ window.removeEventListener("resize", setRealVH);
70
+ };
71
+ }, []);
61
72
  return /* @__PURE__ */ import_react.default.createElement(
62
73
  "div",
63
74
  {