@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
@@ -7,6 +7,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
15
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
16
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -22,7 +26,8 @@ import useEngineContext from "../../../../hooks/useEngineContext";
22
26
  import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
23
27
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
24
28
  import "./index.less";
25
- import { useMemoizedFn, useDebounceFn } from 'ahooks';
29
+ import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
30
+ import { getServiceAddons } from "./utils";
26
31
  var ShopDiscountHooks = {
27
32
  onInited: 'shopDiscount:onInited',
28
33
  onDestroy: 'shopDiscount:onDestroy',
@@ -35,10 +40,11 @@ var ShopDiscountHooks = {
35
40
  };
36
41
  var services = {};
37
42
  var VoucherCard = function VoucherCard(props) {
38
- var _context$appHelper, _state$client$value;
43
+ var _context$appHelper, _state$client$value, _state$service2;
39
44
  var context = useEngineContext();
40
45
  var state = props.state,
41
- dispatch = props.dispatch;
46
+ dispatch = props.dispatch,
47
+ source = props.source;
42
48
  var _useState = useState(false),
43
49
  _useState2 = _slicedToArray(_useState, 2),
44
50
  showDetail = _useState2[0],
@@ -53,35 +59,27 @@ var VoucherCard = function VoucherCard(props) {
53
59
  _useState6 = _slicedToArray(_useState5, 2),
54
60
  discountList = _useState6[0],
55
61
  setDisCountList = _useState6[1];
56
- var productRef = useRef(state.service.value);
62
+ var serviceValueRef = useRef(state.service.value);
63
+ var addonsValueRef = useRef(state.addons.value);
57
64
  var isBooking4Shop = useIsBooking4Shop(state);
58
65
  var shopDiscount = pisellos.getModule('shopDiscount');
59
66
  services = state.service;
60
- var availableData = useMemo(function () {
61
- if (!isBooking4Shop) return [];
62
- var shopDiscount = pisellos.getModule('shopDiscount');
63
- return discountList.filter(function (item) {
64
- return !!item.isAvailable;
65
- }).map(function (discount) {
66
- return _objectSpread(_objectSpread({}, discount), {}, {
67
- savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
68
- });
69
- });
70
- }, [discountList, isBooking4Shop]);
71
67
 
72
68
  // 设置client
73
- useEffect(function () {
69
+ useDebounceEffect(function () {
74
70
  if (isBooking4Shop) {
75
71
  shopDiscount.setCustomer(state.client.value);
76
72
  }
77
- }, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop]);
73
+ }, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop], {
74
+ wait: 200
75
+ });
78
76
 
79
77
  // 设置productList
80
78
  useEffect(function () {
81
79
  if (isBooking4Shop) {
82
- shopDiscount.setProductList(state.service.value);
80
+ shopDiscount.setProductList([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
83
81
  }
84
- }, [state.service.value, isBooking4Shop]);
82
+ }, [state.service.value, state.addons.value, isBooking4Shop]);
85
83
  var serviceMemo = useMemo(function () {
86
84
  var _ref;
87
85
  var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
@@ -89,7 +87,6 @@ var VoucherCard = function VoucherCard(props) {
89
87
  return {
90
88
  booking_id: value.booking_id,
91
89
  id: value.id,
92
- _id: value._id,
93
90
  price: value.price,
94
91
  total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
95
92
  discount_list: value.discount_list,
@@ -98,24 +95,43 @@ var VoucherCard = function VoucherCard(props) {
98
95
  });
99
96
  return val;
100
97
  }, [state.service.value]);
98
+ var addonsMemo = useMemo(function () {
99
+ var _ref2;
100
+ var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
101
+ var _value$_extend3, _value$_extend4;
102
+ return {
103
+ booking_id: value.booking_id,
104
+ id: value.id,
105
+ _id: value._id,
106
+ price: value.price,
107
+ total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
108
+ discount_list: value.discount_list,
109
+ _key: value._key,
110
+ num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
111
+ };
112
+ });
113
+ return val;
114
+ }, [state.addons.value]);
115
+ var disabled = useMemo(function () {
116
+ var _state$bookingDetail;
117
+ if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
118
+ return item.booking_id;
119
+ })) {
120
+ return true;
121
+ }
122
+ return false;
123
+ }, [state, addonsMemo, serviceMemo]);
101
124
  var _useDebounceFn = useDebounceFn(function () {
102
125
  var _state$service;
103
126
  // console.log('state.service.value1', state.service.value);
104
- if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
127
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
105
128
  return;
106
129
  }
107
130
  if (isBooking4Shop) {
108
- var val = shopDiscount.calcDiscount(state.service.value);
109
- // console.log('input: ', state.service.value);
110
- // console.log('output: ', val);
111
- productRef.current = val.productList;
112
- // console.log('val.productList', val.productList);
113
- dispatch({
114
- type: 'setService',
115
- payload: _objectSpread(_objectSpread({}, services), {}, {
116
- value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
117
- })
118
- });
131
+ var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
132
+ console.log('input: ', state.service.value);
133
+ console.log('output: ', val);
134
+ productListToValue(val.productList);
119
135
  }
120
136
  }, {
121
137
  wait: 500
@@ -125,7 +141,7 @@ var VoucherCard = function VoucherCard(props) {
125
141
  // 更新productList
126
142
  useEffect(function () {
127
143
  run();
128
- }, [JSON.stringify(serviceMemo), isBooking4Shop]);
144
+ }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
129
145
  var fn = useMemoizedFn(function (result) {
130
146
  var _result$productList;
131
147
  if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
@@ -133,18 +149,13 @@ var VoucherCard = function VoucherCard(props) {
133
149
  })) {
134
150
  return;
135
151
  }
136
- dispatch({
137
- type: 'setService',
138
- payload: _objectSpread(_objectSpread({}, services), {}, {
139
- value: result.productList
140
- })
141
- });
152
+ productListToValue(result.productList);
142
153
  });
143
154
 
144
155
  // 监听customer变化
145
156
  useEffect(function () {
146
157
  if (!isBooking4Shop) return;
147
- pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, function (customer) {
158
+ var onScanCustomerChange = function onScanCustomerChange(customer) {
148
159
  // 更新客户
149
160
  dispatch({
150
161
  type: 'setClient',
@@ -152,22 +163,49 @@ var VoucherCard = function VoucherCard(props) {
152
163
  value: customer
153
164
  }
154
165
  });
155
- });
156
- pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
157
- pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, function (discount) {
166
+ };
167
+ var onDiscountListChange = function onDiscountListChange(discount) {
158
168
  setDisCountList(discount);
159
- });
169
+ };
170
+ pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, onScanCustomerChange);
171
+ pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
172
+ pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
160
173
  return function () {
161
174
  shopDiscount.clear();
162
- pisellos.effects.off(ShopDiscountHooks.onCustomerChange);
163
- pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
164
- pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
175
+ pisellos.effects.off(ShopDiscountHooks.onCustomerChange, onScanCustomerChange);
176
+ pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
177
+ pisellos.effects.off(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
165
178
  };
166
179
  }, [state.bookingId, isBooking4Shop, fn]);
180
+ var productListToValue = useMemoizedFn(function (list, edit) {
181
+ var _getServiceAddons = getServiceAddons(list),
182
+ serviceList = _getServiceAddons.serviceList,
183
+ addonsList = _getServiceAddons.addonsList;
184
+ serviceValueRef.current = serviceList;
185
+ addonsValueRef.current = addonsList;
186
+ var other = {};
187
+ if (edit) {
188
+ other = {
189
+ edit: true
190
+ };
191
+ }
192
+ dispatch({
193
+ type: 'setService',
194
+ payload: _objectSpread({
195
+ value: serviceList
196
+ }, other)
197
+ });
198
+ dispatch({
199
+ type: 'setAddons',
200
+ payload: _objectSpread({
201
+ value: addonsList
202
+ }, other)
203
+ });
204
+ });
167
205
 
168
206
  // apply code
169
207
  var onScanCode = /*#__PURE__*/function () {
170
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
208
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
171
209
  var val;
172
210
  return _regeneratorRuntime().wrap(function _callee$(_context) {
173
211
  while (1) switch (_context.prev = _context.next) {
@@ -178,18 +216,11 @@ var VoucherCard = function VoucherCard(props) {
178
216
  val = _context.sent;
179
217
  console.log(val);
180
218
  if (val !== null && val !== void 0 && val.isAvailable) {
181
- productRef.current = val.productList;
182
- dispatch({
183
- type: 'setService',
184
- payload: {
185
- value: val.productList,
186
- edit: true
187
- }
188
- });
219
+ productListToValue(val.productList, true);
189
220
  setCode('');
190
221
  } else {
191
222
  PisellToast({
192
- content: locales.getText('pisell2.text.goodpass.code-invalid')
223
+ content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
193
224
  });
194
225
  }
195
226
  case 5:
@@ -199,10 +230,27 @@ var VoucherCard = function VoucherCard(props) {
199
230
  }, _callee);
200
231
  }));
201
232
  return function onScanCode() {
202
- return _ref2.apply(this, arguments);
233
+ return _ref3.apply(this, arguments);
203
234
  };
204
235
  }();
236
+ var availableData = useMemo(function () {
237
+ if (!isBooking4Shop) return [];
238
+ var shopDiscount = pisellos.getModule('shopDiscount');
239
+ return discountList.filter(function (item) {
240
+ return !!item.isAvailable;
241
+ }).map(function (discount) {
242
+ return _objectSpread(_objectSpread({}, discount), {}, {
243
+ isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
244
+ savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
245
+ });
246
+ });
247
+ }, [discountList, isBooking4Shop, disabled]);
205
248
  if (!isBooking4Shop) return null;
249
+ var mixedSort = function mixedSort(val) {
250
+ return _toConsumableArray(val).sort(function (a, b) {
251
+ return Number(b === null || b === void 0 ? void 0 : b.isSelected) - Number(a === null || a === void 0 ? void 0 : a.isSelected);
252
+ });
253
+ };
206
254
  return /*#__PURE__*/React.createElement("div", {
207
255
  className: "pisell-lowcode__booking-footer-voucher-container"
208
256
  }, /*#__PURE__*/React.createElement("div", {
@@ -227,7 +275,8 @@ var VoucherCard = function VoucherCard(props) {
227
275
  style: {
228
276
  width: '100%'
229
277
  },
230
- dataSource: availableData,
278
+ dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
279
+ mixedSort: mixedSort,
231
280
  onChange: function onChange(val) {
232
281
  var shopDiscount = pisellos.getModule('shopDiscount');
233
282
  var detail = shopDiscount.setDiscountSelected({
@@ -235,13 +284,7 @@ var VoucherCard = function VoucherCard(props) {
235
284
  isSelected: val.isSelected
236
285
  });
237
286
  console.log('setDiscountSelected:', detail);
238
- dispatch({
239
- type: 'setService',
240
- payload: {
241
- edit: true,
242
- value: detail.productList
243
- }
244
- });
287
+ productListToValue(detail.productList, true);
245
288
  }
246
289
  }) : null, /*#__PURE__*/React.createElement("div", {
247
290
  className: "voucher-code-input-wrapper"
@@ -258,6 +301,7 @@ var VoucherCard = function VoucherCard(props) {
258
301
  setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
259
302
  },
260
303
  size: "small",
304
+ allowClear: true,
261
305
  placeholder: locales.getText('pisell2.text.goodpass.enter-code')
262
306
  // suffix={
263
307
  // <PisellTooltip title="">
@@ -0,0 +1,4 @@
1
+ export declare const getServiceAddons: (list: any[]) => {
2
+ serviceList: any[];
3
+ addonsList: any[];
4
+ };
@@ -0,0 +1,15 @@
1
+ export var getServiceAddons = function getServiceAddons(list) {
2
+ var serviceList = [];
3
+ var addonsList = [];
4
+ list.forEach(function (item) {
5
+ if (item.isAddons) {
6
+ addonsList.push(item);
7
+ } else {
8
+ serviceList.push(item);
9
+ }
10
+ });
11
+ return {
12
+ serviceList: serviceList,
13
+ addonsList: addonsList
14
+ };
15
+ };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface FooterProps {
2
3
  state: any;
3
4
  reload: () => void;
@@ -1,9 +1,9 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { miniRedux } from "@pisell/utils";
8
8
  var defaultState = {};
9
9
  var _miniRedux = miniRedux({
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SendModalValues } from './index';
2
3
  declare const useSendModal: (bookingId?: number) => {
3
4
  open: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
2
3
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ export declare const calculateTotalPrice: (data: any) => number;
1
2
  declare const useQuotation: (state: any, dispatch: any) => {
2
3
  dom: JSX.Element;
3
4
  };
@@ -19,6 +19,7 @@ import useEngineContext from "../../../../es/hooks/useEngineContext";
19
19
  import { locales } from "@pisell/utils";
20
20
  import { PisellModal } from "@pisell/materials";
21
21
  import { getProductPrice } from "../info/service/serve";
22
+ import Decimal from 'decimal.js';
22
23
  var formatBundleItemMap = function formatBundleItemMap(product) {
23
24
  return product.bundle_group.reduce(function (pre, cur) {
24
25
  var curObj = {};
@@ -28,6 +29,13 @@ var formatBundleItemMap = function formatBundleItemMap(product) {
28
29
  return _objectSpread(_objectSpread({}, pre), curObj);
29
30
  }, {});
30
31
  };
32
+ export var calculateTotalPrice = function calculateTotalPrice(data) {
33
+ var _price = data.reduce(function (total, item) {
34
+ var _price = (item === null || item === void 0 ? void 0 : item.price) || (item === null || item === void 0 ? void 0 : item.add_price);
35
+ return total + _price * item.num;
36
+ }, 0);
37
+ return parseFloat(_price);
38
+ };
31
39
  var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
32
40
  if (!newProducts.length) {
33
41
  return {
@@ -70,9 +78,16 @@ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
70
78
  isChangePrice = true;
71
79
  isBundleChange = true;
72
80
  }
81
+ if (bundleItemMap[bundle.id].price_type === 'markdown') {
82
+ bundleItemMap[bundle.id].price = new Decimal(bundleItemMap[bundle.id].price || 0).mul(-1).toNumber();
83
+ }
84
+ var selectBundleInfo = item._extend.other.bundle.find(function (item) {
85
+ return item.id === bundle.id;
86
+ });
87
+ var optionPrice = calculateTotalPrice((selectBundleInfo === null || selectBundleInfo === void 0 ? void 0 : selectBundleInfo.option) || []);
73
88
  return _objectSpread(_objectSpread({}, bundle), {}, {
74
89
  base_price: bundleItemMap[bundle.id].base_price,
75
- price: bundleItemMap[bundle.id].price
90
+ price: new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
76
91
  // product_price: bundleItemMap[item.id].product_price,
77
92
  });
78
93
  });
@@ -33,6 +33,7 @@ import { isWalkIn as getIsWalkIn } from "../../utils";
33
33
  import { getFranchiseeCustomerInfo, getFranchiseeCustomerList } from "./serve";
34
34
  import { useMemoizedFn } from 'ahooks';
35
35
  import { getWaiverTitle } from "../clientVariant/utils";
36
+ import useGetHolderList from "../hooks/useGetHolderList";
36
37
  var isLoadClient = false;
37
38
  var Client = function Client() {
38
39
  var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
@@ -52,6 +53,7 @@ var Client = function Client() {
52
53
  _useState6 = _slicedToArray(_useState5, 2),
53
54
  franchiseeLoading = _useState6[0],
54
55
  setFranchiseeLoading = _useState6[1];
56
+ var getHolders = useGetHolderList(state, dispatch);
55
57
  var _useState7 = useState({
56
58
  skip: 1,
57
59
  num: 10,
@@ -281,6 +283,7 @@ var Client = function Client() {
281
283
  if (data) {
282
284
  handleSelectClient([data]);
283
285
  }
286
+ getHolders();
284
287
  getClients(_objectSpread(_objectSpread({}, state.client.clientsParams), {}, {
285
288
  search: '',
286
289
  customer_id: data === null || data === void 0 ? void 0 : data.id,
@@ -298,14 +301,20 @@ var Client = function Client() {
298
301
  showAcceptsMarketing: false
299
302
  },
300
303
  callback: function callback(customer_id, params) {
301
- var _params$, _params$2, _state$client2;
304
+ var _state$client2, _state$client2$map, _params$, _params$2, _state$client3;
305
+ var waiverForm = ((_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.clients) === null || _state$client2 === void 0 || (_state$client2 = _state$client2[0].waiver_form) === null || _state$client2 === void 0 || (_state$client2$map = _state$client2.map) === null || _state$client2$map === void 0 ? void 0 : _state$client2$map.call(_state$client2, function (item) {
306
+ return _objectSpread(_objectSpread({}, item), {}, {
307
+ is_filled: 0
308
+ });
309
+ })) || [];
302
310
  // 创建后本地数据处理到数组
303
311
  dispatch({
304
312
  type: 'setClient',
305
313
  payload: {
306
314
  clients: [].concat(_toConsumableArray(params !== null && params !== void 0 && (_params$ = params[0]) !== null && _params$ !== void 0 && _params$.customer ? [_objectSpread(_objectSpread({}, params === null || params === void 0 || (_params$2 = params[0]) === null || _params$2 === void 0 ? void 0 : _params$2.customer), {}, {
307
- id: customer_id
308
- })] : []), _toConsumableArray(((_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : _state$client2.clients) || []))
315
+ id: customer_id,
316
+ waiver_form: waiverForm
317
+ })] : []), _toConsumableArray(((_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.clients) || []))
309
318
  }
310
319
  });
311
320
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -92,7 +92,7 @@ var Lists = function Lists(_ref) {
92
92
  isShowChangeHolder: isShowChangeHolder,
93
93
  isShowChangeResource: true,
94
94
  isShowAddHolderButton: true,
95
- isShowEditProduct: true
95
+ isShowEditProduct: !state.isBookingCreatePage
96
96
  };
97
97
  }, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
98
98
  return /*#__PURE__*/React.createElement(CartContext.Provider, {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import './index.less';
3
4
  interface AddServiceProps {
@@ -28,7 +28,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
28
28
  import TabProduct from "../../../components/TabProduct";
29
29
  import AddButton from "../../../components/addButton";
30
30
  import Drawer from "../../../components/drawer";
31
- import { formatProductListByCategory, getIsEject, isSessionProduct, request } from "../../../utils";
31
+ import { formatProductListByCategory, getIsEject, getIsOnlySession, isSessionProduct, request } from "../../../utils";
32
32
  import DateRange from "../../dateRange";
33
33
  import { Context } from "../../model";
34
34
  import { appointmentTypes, inputDateCol } from "../../service2/status";
@@ -311,6 +311,7 @@ var Info = function Info(props) {
311
311
  var isSession = isSessionProduct(item);
312
312
  // 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
313
313
  var isEject = getIsEject(item, type);
314
+ var isOnlySession = getIsOnlySession(item);
314
315
 
315
316
  // 跨日预约开启单规格 组合规格 套餐
316
317
  if (isDay) {
@@ -328,6 +329,7 @@ var Info = function Info(props) {
328
329
  package: true
329
330
  },
330
331
  is_eject: isEject ? 1 : 0,
332
+ isOnlySession: isOnlySession,
331
333
  customer_id: customerId,
332
334
  isOS: isSession
333
335
  },
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -19,7 +19,7 @@ var Like = function Like(_ref) {
19
19
  }
20
20
  e.preventDefault();
21
21
  e.stopPropagation();
22
- onChange === null || onChange === void 0 ? void 0 : onChange(status === "like" ? "common" : "like");
22
+ onChange === null || onChange === void 0 || onChange(status === "like" ? "common" : "like");
23
23
  }
24
24
  });
25
25
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
21
  import { getNoResource } from "../../mock";
22
22
  import { getErrorList, getProductTotalPrice } from "../../utils";
23
- import { locales } from '@pisell/utils';
23
+ import { isArr, locales } from '@pisell/utils';
24
24
  import dayjs from 'dayjs';
25
25
  import { appointmentTypes, openingTime } from "./status";
26
26
  import { postMultiDay } from "../service/serve";
@@ -199,7 +199,9 @@ export var handleChangeHolder = function handleChangeHolder(products, currentIte
199
199
  if (item._id === currentItem._id) {
200
200
  return _objectSpread(_objectSpread({}, item), {}, {
201
201
  _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
202
- holder_id: other.id
202
+ holder_id: isArr(other) ? other.map(function (item) {
203
+ return item.id;
204
+ }) : item._extend.quantity > 1 ? [other.id] : other.id
203
205
  })
204
206
  });
205
207
  }
@@ -610,6 +612,8 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
610
612
  actionText: locales.getText('page.booking.text.add-time'),
611
613
  isMultipleResource: true,
612
614
  multiResources: multiResources,
615
+ holderMaxCount: item === null || item === void 0 ? void 0 : item._extend.quantity,
616
+ holderMode: (item === null || item === void 0 ? void 0 : item._extend.quantity) > 1 ? 'multiple' : undefined,
613
617
  isErrorHolder: getIsSubjectRequire(state),
614
618
  addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
615
619
  holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
95
95
  if (renderType === 'eventBooking') {
96
96
  return false;
97
97
  }
98
- var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988, 8872, 6930];
98
+ var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
99
99
  return booking4Shops.includes(shopId);
100
100
  };
101
101
  function generateDateRange(start, end) {
@@ -31,6 +31,7 @@ import { Skeleton } from 'antd';
31
31
  import classNames from 'classnames';
32
32
  import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
33
33
  import { getLocale } from "../../../utils/locales";
34
+ import { useDebounceEffect } from "ahooks";
34
35
  var defaultModules = {
35
36
  client: 1,
36
37
  date: 1,
@@ -164,7 +165,7 @@ var Info = Provider(function (props) {
164
165
  try {
165
166
  // 同步最新数据用, 增加延迟为了不和getProduct接口冲突
166
167
  setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
167
- var _stateRef$current;
168
+ var _stateRef$current, _stateRef$current$map;
168
169
  var data;
169
170
  return _regeneratorRuntime().wrap(function _callee$(_context) {
170
171
  while (1) switch (_context.prev = _context.next) {
@@ -172,7 +173,9 @@ var Info = Provider(function (props) {
172
173
  _context.next = 2;
173
174
  return getResourceList({
174
175
  date: currentDate
175
- }, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.bookingId);
176
+ }, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.service) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.value) === null || _stateRef$current === void 0 || (_stateRef$current$map = _stateRef$current.map) === null || _stateRef$current$map === void 0 ? void 0 : _stateRef$current$map.call(_stateRef$current, function (item) {
177
+ return item === null || item === void 0 ? void 0 : item.booking_id;
178
+ }));
176
179
  case 2:
177
180
  data = _context.sent;
178
181
  data.date = currentDate;
@@ -203,13 +206,15 @@ var Info = Provider(function (props) {
203
206
  return _ref.apply(this, arguments);
204
207
  };
205
208
  }();
206
- useEffect(function () {
209
+ useDebounceEffect(function () {
207
210
  // setTimeout(() => {
208
211
  if (currentDate) {
209
212
  getResourcesData();
210
213
  }
211
214
  // }, 20);
212
- }, [currentDate]);
215
+ }, [currentDate], {
216
+ wait: 300
217
+ });
213
218
  return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, _defineProperty(_defineProperty({
214
219
  style: style,
215
220
  header: header,
@@ -1,4 +1,4 @@
1
- export declare const getResourceList: (params: any, bookingId?: number) => Promise<{
1
+ export declare const getResourceList: (params: any, bookingId?: number[]) => Promise<{
2
2
  list: any[];
3
3
  listMap: any;
4
4
  }>;