@pisell/private-materials 6.0.23 → 6.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (677) 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 +29 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +12 -27
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +18 -33
  11. package/es/businessModel/SalesModel/Sales/index.d.ts +24 -0
  12. package/es/businessModel/SalesModel/Sales/index.js +69 -0
  13. package/es/businessModel/SalesModel/hooks/index.d.ts +1 -0
  14. package/es/businessModel/SalesModel/hooks/index.js +7 -0
  15. package/es/businessModel/SalesModel/index.d.ts +4 -0
  16. package/es/businessModel/SalesModel/index.js +18 -0
  17. package/es/businessModel/index.d.ts +0 -0
  18. package/es/businessModel/index.js +0 -0
  19. package/es/components/Sales/Cart/index.d.ts +53 -0
  20. package/es/components/Sales/Cart/index.js +590 -0
  21. package/es/components/Sales/Cart/serve.d.ts +2 -0
  22. package/es/components/Sales/Cart/serve.js +11 -0
  23. package/es/components/Sales/Cart/types.d.ts +19 -0
  24. package/es/components/Sales/Cart/types.js +1 -0
  25. package/es/components/Sales/Checkout/index.d.ts +33 -0
  26. package/es/components/Sales/Checkout/index.js +152 -0
  27. package/es/components/Sales/Checkout/serve.d.ts +2 -0
  28. package/es/components/Sales/Checkout/serve.js +11 -0
  29. package/es/components/Sales/Checkout/utils.d.ts +27 -0
  30. package/es/components/Sales/Checkout/utils.js +104 -0
  31. package/es/components/Sales/Customer/index.d.ts +24 -0
  32. package/es/components/Sales/Customer/index.js +59 -0
  33. package/es/components/Sales/Event/Detail.d.ts +27 -0
  34. package/es/components/Sales/Event/Detail.js +246 -0
  35. package/es/components/Sales/Event/index.d.ts +30 -0
  36. package/es/components/Sales/Event/index.js +123 -0
  37. package/es/components/Sales/Event/serve.d.ts +26 -0
  38. package/es/components/Sales/Event/serve.js +33 -0
  39. package/es/components/Sales/Holder/index.d.ts +33 -0
  40. package/es/components/Sales/Holder/index.js +229 -0
  41. package/es/components/Sales/Holder/serve.d.ts +8 -0
  42. package/es/components/Sales/Holder/serve.js +20 -0
  43. package/es/components/Sales/Init/index.d.ts +24 -0
  44. package/es/components/Sales/Init/index.js +117 -0
  45. package/es/components/Sales/Init/serve.d.ts +3 -0
  46. package/es/components/Sales/Init/serve.js +11 -0
  47. package/es/components/Sales/Resource/index.d.ts +26 -0
  48. package/es/components/Sales/Resource/index.js +128 -0
  49. package/es/components/Sales/Resource/serve.d.ts +5 -0
  50. package/es/components/Sales/Resource/serve.js +8 -0
  51. package/es/components/Sales/Step/index.d.ts +37 -0
  52. package/es/components/Sales/Step/index.js +195 -0
  53. package/es/components/Sales/Summary/index.d.ts +25 -0
  54. package/es/components/Sales/Summary/index.js +50 -0
  55. package/es/components/Sales/Summary/serve.d.ts +0 -0
  56. package/es/components/Sales/Summary/serve.js +0 -0
  57. package/es/components/Sales/Summary/utils.d.ts +36 -0
  58. package/es/components/Sales/Summary/utils.js +63 -0
  59. package/es/components/Sales/hooks/index.d.ts +1 -0
  60. package/es/components/Sales/hooks/index.js +3 -0
  61. package/es/components/Sales/index.d.ts +20 -0
  62. package/es/components/Sales/index.js +26 -0
  63. package/es/components/Sales/utils/index.d.ts +1 -0
  64. package/es/components/Sales/utils/index.js +18 -0
  65. package/es/components/booking/components/customSelect/index.d.ts +1 -0
  66. package/es/components/booking/components/customSelect/index.js +6 -2
  67. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
  68. package/es/components/booking/components/footer/AppointmentProductModal/index.js +38 -0
  69. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  70. package/es/components/booking/components/footer/amount.js +46 -22
  71. package/es/components/booking/components/footer/index.js +116 -79
  72. package/es/components/booking/components/footer/serve.d.ts +2 -0
  73. package/es/components/booking/components/footer/serve.js +44 -0
  74. package/es/components/booking/components/footer/utils.js +280 -35
  75. package/es/components/booking/info/Provider.d.ts +0 -0
  76. package/es/components/booking/info/Provider.js +54 -0
  77. package/es/components/booking/info/addServiceVariant/index.js +8 -1
  78. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  79. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +14 -13
  80. package/es/components/booking/info/clientVariant/vertical/index.js +131 -15
  81. package/es/components/booking/info/dateRange/index.d.ts +4 -0
  82. package/es/components/booking/info/dateRange/index.js +98 -0
  83. package/es/components/booking/info/dateRange/index.less +21 -0
  84. package/es/components/booking/info/main.js +44 -28
  85. package/es/components/booking/info/model.js +3 -0
  86. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
  87. package/es/components/booking/info/pet/ChangePetModal/index.js +134 -0
  88. package/es/components/booking/info/pet/ChangePetModal/index.less +4 -0
  89. package/es/components/booking/info/pet/index.d.ts +1 -1
  90. package/es/components/booking/info/pet/index.js +93 -34
  91. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  92. package/es/components/booking/info/service/addService/index.js +195 -104
  93. package/es/components/booking/info/service/addService/index.less +13 -3
  94. package/es/components/booking/info/service/addService/utils.d.ts +12 -2
  95. package/es/components/booking/info/service/addService/utils.js +103 -26
  96. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  97. package/es/components/booking/info/service/editService/BookingList/index.d.ts +4 -0
  98. package/es/components/booking/info/service/editService/BookingList/index.js +39 -0
  99. package/es/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
  100. package/es/components/booking/info/service/editService/EditTabs/index.js +35 -0
  101. package/es/components/booking/info/service/editService/index.js +449 -141
  102. package/es/components/booking/info/service/editService/index.less +18 -13
  103. package/es/components/booking/info/service/serve.d.ts +10 -0
  104. package/es/components/booking/info/service/serve.js +28 -0
  105. package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
  106. package/es/components/booking/info/service/serviceManager/distributeDiscount.js +55 -0
  107. package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
  108. package/es/components/booking/info/service/serviceManager/index.js +281 -0
  109. package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  110. package/es/components/booking/info/service/serviceManager/utils.js +0 -0
  111. package/es/components/booking/info/service2/Group/utils.d.ts +14 -0
  112. package/es/components/booking/info/service2/Group/utils.js +146 -0
  113. package/es/components/booking/info/service2/Lists.d.ts +3 -0
  114. package/es/components/booking/info/service2/Lists.js +153 -0
  115. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
  116. package/es/components/booking/info/service2/hooks/useSelectPet.js +54 -0
  117. package/es/components/booking/info/service2/index.d.ts +6 -0
  118. package/es/components/booking/info/service2/index.js +57 -0
  119. package/es/components/booking/info/service2/status.d.ts +31 -0
  120. package/es/components/booking/info/service2/status.js +78 -0
  121. package/es/components/booking/info/service2/utils.d.ts +240 -0
  122. package/es/components/booking/info/service2/utils.js +1077 -0
  123. package/es/components/booking/info/utils.d.ts +20 -0
  124. package/es/components/booking/info/utils.js +38 -1
  125. package/es/components/booking/info2/utilsByBooking.js +0 -1
  126. package/es/components/booking/locales.d.ts +66 -0
  127. package/es/components/booking/locales.js +81 -3
  128. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  129. package/es/components/booking/materiels/holder/index.d.ts +7 -0
  130. package/es/components/booking/materiels/holder/index.js +51 -0
  131. package/es/components/booking/model.d.ts +5 -1
  132. package/es/components/booking/model.js +4 -2
  133. package/es/components/booking/utils.d.ts +12 -3
  134. package/es/components/booking/utils.js +143 -26
  135. package/es/components/eftpos/hooks.d.ts +4 -4
  136. package/es/components/eftpos/index.d.ts +1 -0
  137. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  138. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  139. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  140. package/es/components/eftposPay/component/step/index.d.ts +6 -6
  141. package/es/components/eftposPay/component/step/step.d.ts +4 -4
  142. package/es/components/eftposPay/hooks.d.ts +1 -1
  143. package/es/components/eftposPay/pay.d.ts +0 -1
  144. package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
  145. package/es/components/eftposPay/windcave/helper.d.ts +1 -1
  146. package/es/components/eventBooking/assets/alert-circle.png +0 -0
  147. package/es/components/eventBooking/assets/calendar-heart.svg +5 -0
  148. package/es/components/eventBooking/assets/compass.svg +13 -0
  149. package/es/components/eventBooking/assets/image.svg +5 -0
  150. package/es/components/eventBooking/assets/phone.svg +5 -0
  151. package/es/components/eventBooking/assets/shopping-cart.svg +10 -0
  152. package/es/components/eventBooking/components/ErrorTip/index.d.ts +3 -0
  153. package/es/components/eventBooking/components/ErrorTip/index.js +14 -0
  154. package/es/components/eventBooking/components/ErrorTip/index.less +51 -0
  155. package/es/components/eventBooking/components/OpenCard/index.d.ts +4 -0
  156. package/es/components/eventBooking/components/OpenCard/index.js +65 -0
  157. package/es/components/eventBooking/components/OpenCard/index.less +52 -0
  158. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
  159. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +274 -0
  160. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
  161. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  162. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +46 -0
  163. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  164. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +63 -0
  165. package/es/components/eventBooking/components/Provider/Cart/Item/index.less +87 -0
  166. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +3 -0
  167. package/es/components/eventBooking/components/Provider/Cart/index.js +30 -0
  168. package/es/components/eventBooking/components/Provider/Cart/index.less +2 -0
  169. package/es/components/eventBooking/components/Provider/Content/index.d.ts +4 -0
  170. package/es/components/eventBooking/components/Provider/Content/index.js +65 -0
  171. package/es/components/eventBooking/components/Provider/Content/index.less +31 -0
  172. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +3 -0
  173. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.js +34 -0
  174. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.less +17 -0
  175. package/es/components/eventBooking/components/Provider/Event/index.d.ts +3 -0
  176. package/es/components/eventBooking/components/Provider/Event/index.js +93 -0
  177. package/es/components/eventBooking/components/Provider/Event/index.less +20 -0
  178. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +3 -0
  179. package/es/components/eventBooking/components/Provider/Footer/index.js +76 -0
  180. package/es/components/eventBooking/components/Provider/Footer/index.less +64 -0
  181. package/es/components/eventBooking/components/Provider/Header/index.d.ts +4 -0
  182. package/es/components/eventBooking/components/Provider/Header/index.js +75 -0
  183. package/es/components/eventBooking/components/Provider/Header/index.less +2 -0
  184. package/es/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
  185. package/es/components/eventBooking/components/Provider/Information/index.js +178 -0
  186. package/es/components/eventBooking/components/Provider/Information/index.less +92 -0
  187. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +3 -0
  188. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.js +34 -0
  189. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
  190. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +3 -0
  191. package/es/components/eventBooking/components/Provider/OrderProductModal/index.js +27 -0
  192. package/es/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
  193. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +2 -0
  194. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +31 -0
  195. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +3 -0
  196. package/es/components/eventBooking/components/Provider/Resource/index.js +79 -0
  197. package/es/components/eventBooking/components/Provider/Resource/index.less +46 -0
  198. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +3 -0
  199. package/es/components/eventBooking/components/Provider/SelectHolderModal.js +90 -0
  200. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
  201. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +26 -0
  202. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
  203. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +10 -0
  204. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +65 -0
  205. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
  206. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +3 -0
  207. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +69 -0
  208. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
  209. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +12 -0
  210. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +152 -0
  211. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
  212. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
  213. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +20 -0
  214. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
  215. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
  216. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +38 -0
  217. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
  218. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
  219. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +28 -0
  220. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
  221. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
  222. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +269 -0
  223. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
  224. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
  225. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +256 -0
  226. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
  227. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +173 -0
  228. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
  229. package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
  230. package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.js +36 -0
  231. package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
  232. package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
  233. package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
  234. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +2 -0
  235. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +38 -0
  236. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
  237. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.js +33 -0
  238. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
  239. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +30 -0
  240. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  241. package/es/components/eventBooking/components/bookingDetailModal/index.js +337 -0
  242. package/es/components/eventBooking/components/bookingDetailModal/index.less +82 -0
  243. package/es/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
  244. package/es/components/eventBooking/components/bookingServiceList/index.js +52 -0
  245. package/es/components/eventBooking/components/bookingServiceList/index.less +6 -0
  246. package/es/components/eventBooking/components/eventCard/index.d.ts +14 -0
  247. package/es/components/eventBooking/components/eventCard/index.js +116 -0
  248. package/es/components/eventBooking/components/eventCard/index.less +81 -0
  249. package/es/components/eventBooking/components/productCard/index.d.ts +16 -0
  250. package/es/components/eventBooking/components/productCard/index.js +79 -0
  251. package/es/components/eventBooking/components/productCard/index.less +60 -0
  252. package/es/components/eventBooking/components/progressBar/index.d.ts +16 -0
  253. package/es/components/eventBooking/components/progressBar/index.js +93 -0
  254. package/es/components/eventBooking/components/progressBar/index.less +15 -0
  255. package/es/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
  256. package/es/components/eventBooking/components/resourceDisplay/index.js +148 -0
  257. package/es/components/eventBooking/components/resourceDisplay/index.less +95 -0
  258. package/es/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
  259. package/es/components/eventBooking/components/resourceUsability/index.js +44 -0
  260. package/es/components/eventBooking/components/resourceUsability/index.less +40 -0
  261. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
  262. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +37 -0
  263. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
  264. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +11 -0
  265. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +127 -0
  266. package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +13 -0
  267. package/es/components/eventBooking/components/scheduleCalendar/index.js +142 -0
  268. package/es/components/eventBooking/components/scheduleCalendar/index.less +222 -0
  269. package/es/components/eventBooking/components/selectHolder/index.d.ts +22 -0
  270. package/es/components/eventBooking/components/selectHolder/index.js +118 -0
  271. package/es/components/eventBooking/components/selectHolder/index.less +70 -0
  272. package/es/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
  273. package/es/components/eventBooking/components/timeResourceSelector/index.js +168 -0
  274. package/es/components/eventBooking/components/timeResourceSelector/index.less +74 -0
  275. package/es/components/eventBooking/index.d.ts +4 -0
  276. package/es/components/eventBooking/index.js +58 -0
  277. package/es/components/eventBooking/index.less +22 -0
  278. package/es/components/eventBooking/locales.d.ts +216 -0
  279. package/es/components/eventBooking/locales.js +251 -0
  280. package/es/components/eventBooking/mock.d.ts +627 -0
  281. package/es/components/eventBooking/mock.js +1172 -0
  282. package/es/components/eventBooking/status.d.ts +21 -0
  283. package/es/components/eventBooking/status.js +51 -0
  284. package/es/components/eventBooking/type.d.ts +17 -0
  285. package/es/components/eventBooking/type.js +1 -0
  286. package/es/components/eventBooking/utils.d.ts +45 -0
  287. package/es/components/eventBooking/utils.js +99 -0
  288. package/es/components/login/index.d.ts +1 -0
  289. package/es/components/productExtension/index.d.ts +1 -0
  290. package/es/components/shoppingCart/Provider.d.ts +3 -0
  291. package/es/components/shoppingCart/Provider.js +86 -0
  292. package/es/components/shoppingCart/components/Cart/Product.d.ts +3 -0
  293. package/es/components/shoppingCart/components/Cart/Product.js +71 -0
  294. package/es/components/shoppingCart/components/Cart/index.d.ts +3 -0
  295. package/es/components/shoppingCart/components/Cart/index.js +73 -0
  296. package/es/components/shoppingCart/components/Cart/index.less +68 -0
  297. package/es/components/shoppingCart/components/Empty/index.d.ts +4 -0
  298. package/es/components/shoppingCart/components/Empty/index.js +15 -0
  299. package/es/components/shoppingCart/components/Empty/index.less +19 -0
  300. package/es/components/shoppingCart/components/Render/index.d.ts +4 -0
  301. package/es/components/shoppingCart/components/Render/index.js +70 -0
  302. package/es/components/shoppingCart/components/Render/index.less +2 -0
  303. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
  304. package/es/components/shoppingCart/components/SelectHolderModal/index.js +132 -0
  305. package/es/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
  306. package/es/components/shoppingCart/hooks/useAddService.d.ts +2 -0
  307. package/es/components/shoppingCart/hooks/useAddService.js +23 -0
  308. package/es/components/shoppingCart/hooks/useClearCart.d.ts +2 -0
  309. package/es/components/shoppingCart/hooks/useClearCart.js +59 -0
  310. package/es/components/shoppingCart/hooks/useContext.d.ts +1 -0
  311. package/es/components/shoppingCart/hooks/useContext.js +5 -0
  312. package/es/components/shoppingCart/index.d.ts +4 -0
  313. package/es/components/shoppingCart/index.js +24 -0
  314. package/es/components/shoppingCart/locales.d.ts +33 -0
  315. package/es/components/shoppingCart/locales.js +38 -0
  316. package/es/components/shoppingCart/mock.d.ts +40 -0
  317. package/es/components/shoppingCart/mock.js +40 -0
  318. package/es/components/shoppingCart/status.d.ts +2 -0
  319. package/es/components/shoppingCart/status.js +22 -0
  320. package/es/components/shoppingCart/type.d.ts +40 -0
  321. package/es/components/shoppingCart/type.js +1 -0
  322. package/es/components/shoppingCart/utils.d.ts +63 -0
  323. package/es/components/shoppingCart/utils.js +116 -0
  324. package/es/components/tabProduct/tabs/index.less +13 -3
  325. package/es/components/taxSelect/index.d.ts +1 -0
  326. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  327. package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.js +1 -1
  328. package/es/components/workSpaceList/components/AppearanceEdit/constants.js +11 -1
  329. package/es/components/workSpaceList/components/Card/constants.js +2 -1
  330. package/es/components/workSpaceList/components/EditableString/index.js +1 -1
  331. package/es/components/workSpaceList/components/SearchBar/index.js +4 -1
  332. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.js +1 -1
  333. package/es/components/workSpaceList/components/Sort/index.js +1 -1
  334. package/es/components/workSpaceList/components/WorkspaceItem/index.js +1 -1
  335. package/es/components/workSpaceList/server.d.ts +3 -3
  336. package/es/index.d.ts +13 -0
  337. package/es/index.js +14 -1
  338. package/lib/businessModel/SalesModel/Sales/index.d.ts +24 -0
  339. package/lib/businessModel/SalesModel/Sales/index.js +104 -0
  340. package/lib/businessModel/SalesModel/hooks/index.d.ts +1 -0
  341. package/lib/businessModel/SalesModel/hooks/index.js +34 -0
  342. package/lib/businessModel/SalesModel/index.d.ts +4 -0
  343. package/lib/businessModel/SalesModel/index.js +51 -0
  344. package/lib/businessModel/index.d.ts +0 -0
  345. package/lib/businessModel/index.js +0 -0
  346. package/lib/components/Sales/Cart/index.d.ts +53 -0
  347. package/lib/components/Sales/Cart/index.js +500 -0
  348. package/lib/components/Sales/Cart/serve.d.ts +2 -0
  349. package/lib/components/Sales/Cart/serve.js +37 -0
  350. package/lib/components/Sales/Cart/types.d.ts +19 -0
  351. package/lib/components/Sales/Cart/types.js +17 -0
  352. package/lib/components/Sales/Checkout/index.d.ts +33 -0
  353. package/lib/components/Sales/Checkout/index.js +130 -0
  354. package/lib/components/Sales/Checkout/serve.d.ts +2 -0
  355. package/lib/components/Sales/Checkout/serve.js +37 -0
  356. package/lib/components/Sales/Checkout/utils.d.ts +27 -0
  357. package/lib/components/Sales/Checkout/utils.js +88 -0
  358. package/lib/components/Sales/Customer/index.d.ts +24 -0
  359. package/lib/components/Sales/Customer/index.js +90 -0
  360. package/lib/components/Sales/Event/Detail.d.ts +27 -0
  361. package/lib/components/Sales/Event/Detail.js +224 -0
  362. package/lib/components/Sales/Event/index.d.ts +30 -0
  363. package/lib/components/Sales/Event/index.js +136 -0
  364. package/lib/components/Sales/Event/serve.d.ts +26 -0
  365. package/lib/components/Sales/Event/serve.js +54 -0
  366. package/lib/components/Sales/Holder/index.d.ts +33 -0
  367. package/lib/components/Sales/Holder/index.js +210 -0
  368. package/lib/components/Sales/Holder/serve.d.ts +8 -0
  369. package/lib/components/Sales/Holder/serve.js +37 -0
  370. package/lib/components/Sales/Init/index.d.ts +24 -0
  371. package/lib/components/Sales/Init/index.js +128 -0
  372. package/lib/components/Sales/Init/serve.d.ts +3 -0
  373. package/lib/components/Sales/Init/serve.js +34 -0
  374. package/lib/components/Sales/Resource/index.d.ts +26 -0
  375. package/lib/components/Sales/Resource/index.js +133 -0
  376. package/lib/components/Sales/Resource/serve.d.ts +5 -0
  377. package/lib/components/Sales/Resource/serve.js +32 -0
  378. package/lib/components/Sales/Step/index.d.ts +37 -0
  379. package/lib/components/Sales/Step/index.js +170 -0
  380. package/lib/components/Sales/Summary/index.d.ts +25 -0
  381. package/lib/components/Sales/Summary/index.js +83 -0
  382. package/lib/components/Sales/Summary/serve.d.ts +0 -0
  383. package/lib/components/Sales/Summary/serve.js +0 -0
  384. package/lib/components/Sales/Summary/utils.d.ts +36 -0
  385. package/lib/components/Sales/Summary/utils.js +80 -0
  386. package/lib/components/Sales/hooks/index.d.ts +1 -0
  387. package/lib/components/Sales/hooks/index.js +31 -0
  388. package/lib/components/Sales/index.d.ts +20 -0
  389. package/lib/components/Sales/index.js +79 -0
  390. package/lib/components/Sales/utils/index.d.ts +1 -0
  391. package/lib/components/Sales/utils/index.js +43 -0
  392. package/lib/components/booking/components/customSelect/index.d.ts +1 -0
  393. package/lib/components/booking/components/customSelect/index.js +6 -2
  394. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
  395. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +60 -0
  396. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  397. package/lib/components/booking/components/footer/amount.js +27 -8
  398. package/lib/components/booking/components/footer/index.js +48 -55
  399. package/lib/components/booking/components/footer/serve.d.ts +2 -0
  400. package/lib/components/booking/components/footer/serve.js +12 -0
  401. package/lib/components/booking/components/footer/utils.js +168 -37
  402. package/lib/components/booking/info/Provider.d.ts +0 -0
  403. package/lib/components/booking/info/Provider.js +0 -0
  404. package/lib/components/booking/info/addServiceVariant/index.js +5 -0
  405. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  406. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +8 -7
  407. package/lib/components/booking/info/clientVariant/vertical/index.js +96 -20
  408. package/lib/components/booking/info/dateRange/index.d.ts +4 -0
  409. package/lib/components/booking/info/dateRange/index.js +111 -0
  410. package/lib/components/booking/info/dateRange/index.less +21 -0
  411. package/lib/components/booking/info/main.js +33 -22
  412. package/lib/components/booking/info/model.js +3 -0
  413. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
  414. package/lib/components/booking/info/pet/ChangePetModal/index.js +121 -0
  415. package/lib/components/booking/info/pet/ChangePetModal/index.less +4 -0
  416. package/lib/components/booking/info/pet/index.d.ts +1 -1
  417. package/lib/components/booking/info/pet/index.js +90 -44
  418. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  419. package/lib/components/booking/info/service/addService/index.js +131 -101
  420. package/lib/components/booking/info/service/addService/index.less +13 -3
  421. package/lib/components/booking/info/service/addService/utils.d.ts +12 -2
  422. package/lib/components/booking/info/service/addService/utils.js +57 -10
  423. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  424. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +4 -0
  425. package/lib/components/booking/info/service/editService/BookingList/index.js +55 -0
  426. package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
  427. package/lib/components/booking/info/service/editService/EditTabs/index.js +75 -0
  428. package/lib/components/booking/info/service/editService/index.js +446 -197
  429. package/lib/components/booking/info/service/editService/index.less +18 -13
  430. package/lib/components/booking/info/service/serve.d.ts +10 -0
  431. package/lib/components/booking/info/service/serve.js +7 -2
  432. package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
  433. package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +70 -0
  434. package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
  435. package/lib/components/booking/info/service/serviceManager/index.js +211 -0
  436. package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  437. package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
  438. package/lib/components/booking/info/service2/Group/utils.d.ts +14 -0
  439. package/lib/components/booking/info/service2/Group/utils.js +142 -0
  440. package/lib/components/booking/info/service2/Lists.d.ts +3 -0
  441. package/lib/components/booking/info/service2/Lists.js +116 -0
  442. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
  443. package/lib/components/booking/info/service2/hooks/useSelectPet.js +49 -0
  444. package/lib/components/booking/info/service2/index.d.ts +6 -0
  445. package/lib/components/booking/info/service2/index.js +75 -0
  446. package/lib/components/booking/info/service2/status.d.ts +31 -0
  447. package/lib/components/booking/info/service2/status.js +81 -0
  448. package/lib/components/booking/info/service2/utils.d.ts +240 -0
  449. package/lib/components/booking/info/service2/utils.js +686 -0
  450. package/lib/components/booking/info/utils.d.ts +20 -0
  451. package/lib/components/booking/info/utils.js +42 -1
  452. package/lib/components/booking/locales.d.ts +66 -0
  453. package/lib/components/booking/locales.js +69 -3
  454. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  455. package/lib/components/booking/materiels/holder/index.d.ts +7 -0
  456. package/lib/components/booking/materiels/holder/index.js +64 -0
  457. package/lib/components/booking/model.d.ts +5 -1
  458. package/lib/components/booking/model.js +4 -2
  459. package/lib/components/booking/utils.d.ts +12 -3
  460. package/lib/components/booking/utils.js +89 -18
  461. package/lib/components/eftpos/hooks.d.ts +4 -4
  462. package/lib/components/eftpos/index.d.ts +1 -0
  463. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  464. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  465. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  466. package/lib/components/eftposPay/component/step/index.d.ts +6 -6
  467. package/lib/components/eftposPay/component/step/step.d.ts +4 -4
  468. package/lib/components/eftposPay/hooks.d.ts +1 -1
  469. package/lib/components/eftposPay/pay.d.ts +0 -1
  470. package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
  471. package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
  472. package/lib/components/eventBooking/assets/alert-circle.png +0 -0
  473. package/lib/components/eventBooking/assets/calendar-heart.svg +5 -0
  474. package/lib/components/eventBooking/assets/compass.svg +13 -0
  475. package/lib/components/eventBooking/assets/image.svg +5 -0
  476. package/lib/components/eventBooking/assets/phone.svg +5 -0
  477. package/lib/components/eventBooking/assets/shopping-cart.svg +10 -0
  478. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +3 -0
  479. package/lib/components/eventBooking/components/ErrorTip/index.js +30 -0
  480. package/lib/components/eventBooking/components/ErrorTip/index.less +51 -0
  481. package/lib/components/eventBooking/components/OpenCard/index.d.ts +4 -0
  482. package/lib/components/eventBooking/components/OpenCard/index.js +90 -0
  483. package/lib/components/eventBooking/components/OpenCard/index.less +52 -0
  484. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
  485. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +158 -0
  486. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
  487. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  488. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +82 -0
  489. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  490. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +92 -0
  491. package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +87 -0
  492. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +3 -0
  493. package/lib/components/eventBooking/components/Provider/Cart/index.js +59 -0
  494. package/lib/components/eventBooking/components/Provider/Cart/index.less +2 -0
  495. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +4 -0
  496. package/lib/components/eventBooking/components/Provider/Content/index.js +90 -0
  497. package/lib/components/eventBooking/components/Provider/Content/index.less +31 -0
  498. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +3 -0
  499. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.js +60 -0
  500. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.less +17 -0
  501. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +3 -0
  502. package/lib/components/eventBooking/components/Provider/Event/index.js +100 -0
  503. package/lib/components/eventBooking/components/Provider/Event/index.less +20 -0
  504. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +3 -0
  505. package/lib/components/eventBooking/components/Provider/Footer/index.js +87 -0
  506. package/lib/components/eventBooking/components/Provider/Footer/index.less +64 -0
  507. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +4 -0
  508. package/lib/components/eventBooking/components/Provider/Header/index.js +80 -0
  509. package/lib/components/eventBooking/components/Provider/Header/index.less +2 -0
  510. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
  511. package/lib/components/eventBooking/components/Provider/Information/index.js +151 -0
  512. package/lib/components/eventBooking/components/Provider/Information/index.less +92 -0
  513. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +3 -0
  514. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.js +67 -0
  515. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
  516. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +3 -0
  517. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.js +57 -0
  518. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
  519. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +2 -0
  520. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +62 -0
  521. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +3 -0
  522. package/lib/components/eventBooking/components/Provider/Resource/index.js +90 -0
  523. package/lib/components/eventBooking/components/Provider/Resource/index.less +46 -0
  524. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +3 -0
  525. package/lib/components/eventBooking/components/Provider/SelectHolderModal.js +97 -0
  526. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
  527. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +55 -0
  528. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
  529. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +10 -0
  530. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +78 -0
  531. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
  532. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +3 -0
  533. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +86 -0
  534. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
  535. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +12 -0
  536. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +121 -0
  537. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
  538. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
  539. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +37 -0
  540. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
  541. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
  542. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +58 -0
  543. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
  544. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
  545. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +55 -0
  546. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
  547. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
  548. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +196 -0
  549. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
  550. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
  551. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +198 -0
  552. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
  553. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +122 -0
  554. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
  555. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
  556. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.js +70 -0
  557. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
  558. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
  559. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
  560. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +2 -0
  561. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +75 -0
  562. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
  563. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.js +66 -0
  564. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
  565. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +69 -0
  566. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  567. package/lib/components/eventBooking/components/bookingDetailModal/index.js +248 -0
  568. package/lib/components/eventBooking/components/bookingDetailModal/index.less +82 -0
  569. package/lib/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
  570. package/lib/components/eventBooking/components/bookingServiceList/index.js +79 -0
  571. package/lib/components/eventBooking/components/bookingServiceList/index.less +6 -0
  572. package/lib/components/eventBooking/components/eventCard/index.d.ts +14 -0
  573. package/lib/components/eventBooking/components/eventCard/index.js +124 -0
  574. package/lib/components/eventBooking/components/eventCard/index.less +81 -0
  575. package/lib/components/eventBooking/components/productCard/index.d.ts +16 -0
  576. package/lib/components/eventBooking/components/productCard/index.js +77 -0
  577. package/lib/components/eventBooking/components/productCard/index.less +60 -0
  578. package/lib/components/eventBooking/components/progressBar/index.d.ts +16 -0
  579. package/lib/components/eventBooking/components/progressBar/index.js +100 -0
  580. package/lib/components/eventBooking/components/progressBar/index.less +15 -0
  581. package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
  582. package/lib/components/eventBooking/components/resourceDisplay/index.js +116 -0
  583. package/lib/components/eventBooking/components/resourceDisplay/index.less +95 -0
  584. package/lib/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
  585. package/lib/components/eventBooking/components/resourceUsability/index.js +76 -0
  586. package/lib/components/eventBooking/components/resourceUsability/index.less +40 -0
  587. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
  588. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +73 -0
  589. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
  590. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +11 -0
  591. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +135 -0
  592. package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +13 -0
  593. package/lib/components/eventBooking/components/scheduleCalendar/index.js +125 -0
  594. package/lib/components/eventBooking/components/scheduleCalendar/index.less +222 -0
  595. package/lib/components/eventBooking/components/selectHolder/index.d.ts +22 -0
  596. package/lib/components/eventBooking/components/selectHolder/index.js +106 -0
  597. package/lib/components/eventBooking/components/selectHolder/index.less +70 -0
  598. package/lib/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
  599. package/lib/components/eventBooking/components/timeResourceSelector/index.js +146 -0
  600. package/lib/components/eventBooking/components/timeResourceSelector/index.less +74 -0
  601. package/lib/components/eventBooking/index.d.ts +4 -0
  602. package/lib/components/eventBooking/index.js +78 -0
  603. package/lib/components/eventBooking/index.less +22 -0
  604. package/lib/components/eventBooking/locales.d.ts +216 -0
  605. package/lib/components/eventBooking/locales.js +239 -0
  606. package/lib/components/eventBooking/mock.d.ts +627 -0
  607. package/lib/components/eventBooking/mock.js +1352 -0
  608. package/lib/components/eventBooking/status.d.ts +21 -0
  609. package/lib/components/eventBooking/status.js +70 -0
  610. package/lib/components/eventBooking/type.d.ts +17 -0
  611. package/lib/components/eventBooking/type.js +17 -0
  612. package/lib/components/eventBooking/utils.d.ts +45 -0
  613. package/lib/components/eventBooking/utils.js +90 -0
  614. package/lib/components/login/index.d.ts +1 -0
  615. package/lib/components/productExtension/index.d.ts +1 -0
  616. package/lib/components/shoppingCart/Provider.d.ts +3 -0
  617. package/lib/components/shoppingCart/Provider.js +110 -0
  618. package/lib/components/shoppingCart/components/Cart/Product.d.ts +3 -0
  619. package/lib/components/shoppingCart/components/Cart/Product.js +72 -0
  620. package/lib/components/shoppingCart/components/Cart/index.d.ts +3 -0
  621. package/lib/components/shoppingCart/components/Cart/index.js +85 -0
  622. package/lib/components/shoppingCart/components/Cart/index.less +68 -0
  623. package/lib/components/shoppingCart/components/Empty/index.d.ts +4 -0
  624. package/lib/components/shoppingCart/components/Empty/index.js +43 -0
  625. package/lib/components/shoppingCart/components/Empty/index.less +19 -0
  626. package/lib/components/shoppingCart/components/Render/index.d.ts +4 -0
  627. package/lib/components/shoppingCart/components/Render/index.js +75 -0
  628. package/lib/components/shoppingCart/components/Render/index.less +2 -0
  629. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
  630. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +124 -0
  631. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
  632. package/lib/components/shoppingCart/hooks/useAddService.d.ts +2 -0
  633. package/lib/components/shoppingCart/hooks/useAddService.js +55 -0
  634. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +2 -0
  635. package/lib/components/shoppingCart/hooks/useClearCart.js +66 -0
  636. package/lib/components/shoppingCart/hooks/useContext.d.ts +1 -0
  637. package/lib/components/shoppingCart/hooks/useContext.js +31 -0
  638. package/lib/components/shoppingCart/index.d.ts +4 -0
  639. package/lib/components/shoppingCart/index.js +60 -0
  640. package/lib/components/shoppingCart/locales.d.ts +33 -0
  641. package/lib/components/shoppingCart/locales.js +56 -0
  642. package/lib/components/shoppingCart/mock.d.ts +40 -0
  643. package/lib/components/shoppingCart/mock.js +76 -0
  644. package/lib/components/shoppingCart/status.d.ts +2 -0
  645. package/lib/components/shoppingCart/status.js +60 -0
  646. package/lib/components/shoppingCart/type.d.ts +40 -0
  647. package/lib/components/shoppingCart/type.js +17 -0
  648. package/lib/components/shoppingCart/utils.d.ts +63 -0
  649. package/lib/components/shoppingCart/utils.js +83 -0
  650. package/lib/components/tabProduct/tabs/index.less +13 -3
  651. package/lib/components/taxSelect/index.d.ts +1 -0
  652. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  653. package/lib/components/workSpaceList/components/AppearanceEdit/IconPanel.js +2 -2
  654. package/lib/components/workSpaceList/components/AppearanceEdit/constants.js +32 -12
  655. package/lib/components/workSpaceList/components/Card/constants.js +4 -3
  656. package/lib/components/workSpaceList/components/EditableString/index.js +2 -2
  657. package/lib/components/workSpaceList/components/SearchBar/index.js +8 -5
  658. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.js +2 -2
  659. package/lib/components/workSpaceList/components/Sort/index.js +2 -2
  660. package/lib/components/workSpaceList/components/WorkspaceItem/index.js +2 -2
  661. package/lib/components/workSpaceList/server.d.ts +3 -3
  662. package/lib/index.d.ts +13 -0
  663. package/lib/index.js +39 -0
  664. package/lowcode/event-booking/meta.ts +69 -0
  665. package/lowcode/event-booking-availability-calendar/meta.ts +53 -0
  666. package/lowcode/event-booking-detail-modal/meta.ts +39 -0
  667. package/lowcode/event-booking-service-list/meta.ts +77 -0
  668. package/lowcode/event-card/meta.ts +77 -0
  669. package/lowcode/event-product-card/meta.ts +79 -0
  670. package/lowcode/event-progress-bar/meta.ts +65 -0
  671. package/lowcode/event-resource-display/meta.ts +169 -0
  672. package/lowcode/event-resource-usability/meta.ts +67 -0
  673. package/lowcode/event-schedule-calendar/meta.ts +56 -0
  674. package/lowcode/event-select-holder/meta.ts +84 -0
  675. package/lowcode/event-time-resource-selector/meta.ts +69 -0
  676. package/lowcode/shopping-cart/meta.ts +98 -0
  677. package/package.json +4 -4
@@ -1,14 +1,20 @@
1
1
  .pisell-lowcode__booking-service-body-edit {
2
2
  padding: 24px 32px 100px !important;
3
- }
4
3
 
4
+ .pisell-lowcode__booking-service-select-date {
5
+ height: 40px;
6
+ .pisell-lowcode-picker-input > input {
7
+ font-size: 16px !important;
8
+ }
9
+ }
10
+ }
5
11
 
6
12
  .pisell-lowcode__booking-service-body-edit-footer {
7
13
  position: absolute;
8
14
  bottom: 0;
9
15
  left: 0;
10
16
  width: 100%;
11
- border-top: 1px solid #E7E8E9;
17
+ border-top: 1px solid #e7e8e9;
12
18
  padding: 20px 32px;
13
19
  display: flex;
14
20
  align-items: center;
@@ -20,8 +26,8 @@
20
26
  height: 48px;
21
27
  width: 48px;
22
28
  border-radius: 8px;
23
- border: 1px solid var(--gray-300, #D0D5DD);
24
- background: var(--base-white, #FFF);
29
+ border: 1px solid var(--gray-300, #d0d5dd);
30
+ background: var(--base-white, #fff);
25
31
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
26
32
  cursor: pointer;
27
33
  display: flex;
@@ -29,7 +35,7 @@
29
35
  justify-content: center;
30
36
 
31
37
  .pisell-lowcode__booking-service-delete-icon {
32
- color: #B42318;
38
+ color: #b42318;
33
39
  font-size: 20px;
34
40
  }
35
41
  }
@@ -46,14 +52,12 @@
46
52
  .pisell-lowcode-select-selection-item {
47
53
  .resource-option {
48
54
  padding-left: 0;
49
-
50
55
  }
51
56
  }
52
57
 
53
58
  .pisell-lowcode-select-item-option-content {
54
59
  .resource-option {
55
60
  padding-left: 0;
56
-
57
61
  }
58
62
  }
59
63
 
@@ -63,7 +67,7 @@
63
67
  gap: 8px;
64
68
 
65
69
  .resource-option-alert-icon {
66
- color: #B42318;
70
+ color: #b42318;
67
71
  cursor: pointer;
68
72
  }
69
73
  }
@@ -82,16 +86,16 @@
82
86
  justify-content: center;
83
87
  padding: 0;
84
88
 
85
- .like-resource {}
89
+ .like-resource {
90
+ }
86
91
  }
87
-
88
92
  }
89
93
 
90
94
  .current-service-info {
91
95
  min-height: 40px;
92
96
  cursor: pointer;
93
97
  background-color: #ffffff;
94
- border: 1px solid #D0D5DD;
98
+ border: 1px solid #d0d5dd;
95
99
  border-radius: 10px;
96
100
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
97
101
  overflow: hidden;
@@ -109,10 +113,11 @@
109
113
  flex: 1;
110
114
  }
111
115
 
112
- .current-service-info-change-btn {}
116
+ .current-service-info-change-btn {
117
+ }
113
118
  }
114
119
 
115
120
  &:hover {
116
121
  border-color: #7f56d9;
117
122
  }
118
- }
123
+ }
@@ -1 +1,11 @@
1
1
  export declare const getProductDetail: (id: string, params: any) => Promise<any>;
2
+ /**
3
+ * @title: 跨日预约获取预约商品报价单
4
+ * @description:
5
+ * @param {string} id
6
+ * @param {any} params
7
+ * @return {*}
8
+ * @Author: WangHan
9
+ * @Date: 2024-12-23 17:06
10
+ */
11
+ export declare const postMultiDay: (id: string, params: any) => Promise<any>;
@@ -18,4 +18,32 @@ export var getProductDetail = /*#__PURE__*/function () {
18
18
  return function getProductDetail(_x, _x2) {
19
19
  return _ref.apply(this, arguments);
20
20
  };
21
+ }();
22
+
23
+ /**
24
+ * @title: 跨日预约获取预约商品报价单
25
+ * @description:
26
+ * @param {string} id
27
+ * @param {any} params
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2024-12-23 17:06
31
+ */
32
+ export var postMultiDay = /*#__PURE__*/function () {
33
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id, params) {
34
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
35
+ while (1) switch (_context2.prev = _context2.next) {
36
+ case 0:
37
+ return _context2.abrupt("return", request.getRequest().post("/shop/product/multi-day/detail/".concat(id), params, {
38
+ useCache: true
39
+ }));
40
+ case 1:
41
+ case "end":
42
+ return _context2.stop();
43
+ }
44
+ }, _callee2);
45
+ }));
46
+ return function postMultiDay(_x3, _x4) {
47
+ return _ref2.apply(this, arguments);
48
+ };
21
49
  }();
@@ -0,0 +1,11 @@
1
+ interface Product {
2
+ _id: string;
3
+ _extend: {
4
+ origin_total: number;
5
+ total: number;
6
+ };
7
+ }
8
+ export declare function distributeDiscountOrIncrease(products: Product[], // 商品列表
9
+ totalAdjustment: number, // 总折扣或加价金额,可能为负数(折扣)或正数(加价)
10
+ totalPrice: number): Product[];
11
+ export {};
@@ -0,0 +1,55 @@
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
+ 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(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
+ import Decimal from 'decimal.js';
8
+ export function distributeDiscountOrIncrease(products,
9
+ // 商品列表
10
+ totalAdjustment,
11
+ // 总折扣或加价金额,可能为负数(折扣)或正数(加价)
12
+ totalPrice) {
13
+ // 总折扣
14
+ var totalAdjustmentDecimal = new Decimal(totalAdjustment);
15
+ var totalAdjustmentApplied = new Decimal(0);
16
+
17
+ // 存储调整后的商品
18
+ var adjustedProducts = [];
19
+
20
+ // 按比例分摊折扣/加价金额
21
+ products.forEach(function (product) {
22
+ // 原始价格
23
+ var productPrice = new Decimal(product._extend.origin_total);
24
+ // 按比例计算调整金额
25
+ var adjustmentAmount = productPrice.div(totalPrice).times(totalAdjustmentDecimal).toFixed(2, Decimal.ROUND_HALF_UP);
26
+
27
+ // 防止价格变负,调整均摊金额
28
+ var newPrice = productPrice.plus(adjustmentAmount).toFixed(2, Decimal.ROUND_HALF_UP);
29
+ var adjustedPrice = new Decimal(newPrice).lessThan(0) ? '0.00' : newPrice;
30
+ adjustedProducts.push(_objectSpread(_objectSpread({}, product), {}, {
31
+ _extend: _objectSpread(_objectSpread({}, product._extend), {}, {
32
+ total: parseFloat(adjustedPrice)
33
+ })
34
+ }));
35
+ totalAdjustmentApplied = totalAdjustmentApplied.plus(new Decimal(adjustmentAmount));
36
+ });
37
+ // 计算调整后的总金额
38
+ var finalTotalPrice = adjustedProducts.reduce(function (sum, product) {
39
+ return sum.plus(new Decimal(product._extend.total));
40
+ }, new Decimal(0));
41
+
42
+ // 如果总价与目标差异不为零,则调整最后一个商品价格 150 - (-10 + 140 ) = 0
43
+ var adjustmentDifference = new Decimal(totalPrice).minus(finalTotalPrice).plus(new Decimal(totalAdjustment));
44
+ if (!adjustmentDifference.isZero()) {
45
+ var lastProduct = adjustedProducts[adjustedProducts.length - 1];
46
+ var lastPrice = new Decimal(lastProduct._extend.total).plus(adjustmentDifference).toFixed(2, Decimal.ROUND_HALF_UP);
47
+
48
+ // 确保最后调整后的价格不为负数
49
+ lastPrice = new Decimal(lastPrice).lessThan(0) ? '0.00' : lastPrice;
50
+ lastProduct._extend.total = parseFloat(lastPrice);
51
+ }
52
+
53
+ // 将结果格式化为以 _id 为键的对象
54
+ return adjustedProducts;
55
+ }
@@ -0,0 +1,20 @@
1
+ export declare const useService: ({ renderMode, onEdit, state, dispatch, }: {
2
+ renderMode?: any;
3
+ onEdit?: any;
4
+ state?: any;
5
+ dispatch?: any;
6
+ }) => {
7
+ createBookingData: ({ product }: any) => Promise<any>;
8
+ editBookingData: ({ changeValues }: {
9
+ changeValues: any;
10
+ }) => Promise<any>;
11
+ createBooking: ({ booking }: {
12
+ booking: any;
13
+ }) => Promise<void>;
14
+ editBooking: ({ booking }: {
15
+ booking: any;
16
+ }) => Promise<void>;
17
+ goEditPanel: ({ booking }: {
18
+ booking: any;
19
+ }) => void;
20
+ };
@@ -0,0 +1,281 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ 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; }
4
+ 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; }
5
+ 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; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
+ import { getUniqueId } from '@pisell/utils';
11
+ import { useCallback, useMemo } from 'react';
12
+ import { deleteCacheParams, getProductTotalPrice, getServiceTimes } from "../../../utils";
13
+ import { concatBookings, createBookingItemsByGroup } from "../../service2/Group/utils";
14
+ import { isBookingProduct, isDayBookingProduct, isDaysBooking, isEventBooking } from "../../service2/utils";
15
+ import { getMultiDay, getProductExtend } from "../addService/utils";
16
+ var lock = false;
17
+ export var useService = function useService(_ref) {
18
+ var _state$service2;
19
+ var renderMode = _ref.renderMode,
20
+ onEdit = _ref.onEdit,
21
+ state = _ref.state,
22
+ dispatch = _ref.dispatch;
23
+ var holderId = useMemo(function () {
24
+ var _state$activeCartId;
25
+ return Number((state === null || state === void 0 || (_state$activeCartId = state.activeCartId) === null || _state$activeCartId === void 0 ? void 0 : _state$activeCartId[0]) || 0);
26
+ }, [state === null || state === void 0 ? void 0 : state.activeCartId]);
27
+ var isDayBookingMode = useMemo(function () {
28
+ return isDaysBooking(state);
29
+ }, [state === null || state === void 0 ? void 0 : state.renderType]);
30
+ var isEventBookingMode = useMemo(function () {
31
+ return isEventBooking(state);
32
+ }, [state === null || state === void 0 ? void 0 : state.renderType]);
33
+ var createBookingData = /*#__PURE__*/function () {
34
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
35
+ var product, _params, cacheItem, _total, _isEdit, _state$service$cacheI, _state$service;
36
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
37
+ while (1) switch (_context.prev = _context.next) {
38
+ case 0:
39
+ product = _ref2.product;
40
+ if (!lock) {
41
+ _context.next = 3;
42
+ break;
43
+ }
44
+ return _context.abrupt("return");
45
+ case 3:
46
+ lock = true;
47
+
48
+ // 2秒后解除
49
+ setTimeout(function () {
50
+ lock = false;
51
+ }, 2000);
52
+ _params = product._params;
53
+ cacheItem = _objectSpread(_objectSpread({}, product), {}, {
54
+ product_id: product.id,
55
+ _id: getUniqueId(),
56
+ _key: _params.key,
57
+ _extend: {
58
+ start_date: state.date.value,
59
+ quantity: 1,
60
+ price: product.price,
61
+ product_name: product.title,
62
+ other: JSON.parse(JSON.stringify(_params))
63
+ },
64
+ new: 1
65
+ }); // 跨日预约
66
+ if (isDayBookingMode || isEventBookingMode) {
67
+ cacheItem._extend.holder_id = holderId;
68
+ cacheItem._extend.end_date = state.date.end_date;
69
+ cacheItem._extend.sub_type = 'days';
70
+ }
71
+ _total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
72
+ cacheItem._extend.total = _total;
73
+ // 用于储存原价
74
+ cacheItem._extend.origin_total = _total;
75
+
76
+ // 是否为编辑服务时重新选择商品
77
+ _isEdit = !!state.service.cacheItem;
78
+ if (_isEdit) {
79
+ // 重新选择则沿用之前的id, 并且不是新增状态
80
+ cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
81
+ cacheItem.new = 0;
82
+ }
83
+ // 渲染到当前位置模式时,默认无资源 时间默认取顶部设置的时间
84
+ if (renderMode === 'current') {
85
+ // cacheItem._extend.resource = 0;
86
+ cacheItem.currentDefaultTime = state.date.value.format('HH:mm');
87
+ }
88
+ cacheItem._extend = getProductExtend({
89
+ cacheItem: cacheItem,
90
+ state: state
91
+ });
92
+ if (!isDayBookingMode) {
93
+ _context.next = 20;
94
+ break;
95
+ }
96
+ _context.next = 18;
97
+ return getMultiDay({
98
+ start_date: cacheItem._extend.startDate,
99
+ end_date: cacheItem._extend.endDate,
100
+ state: state,
101
+ cacheItem: cacheItem
102
+ });
103
+ case 18:
104
+ cacheItem = _context.sent;
105
+ if (isDayBookingProduct(cacheItem, state)) {
106
+ // 更换商品需要删除当前组下面的所有子预约 --待实现 在这里删除会导致如果直接返回还需要恢复
107
+ // const newList = filterItemByGroupId(cacheItem._id,state.service.value)
108
+ cacheItem = concatBookings(createBookingItemsByGroup(cacheItem));
109
+ }
110
+ case 20:
111
+ if (isEventBookingMode) {
112
+ cacheItem.autoClose = false;
113
+ } else {
114
+ // 普通商品
115
+ if (isDayBookingMode && !isDayBookingProduct(cacheItem, state)) {
116
+ cacheItem.autoClose = true;
117
+ } else {
118
+ cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.resourcesOrigin) || []).length === 1);
119
+ }
120
+ }
121
+ return _context.abrupt("return", cacheItem);
122
+ case 22:
123
+ case "end":
124
+ return _context.stop();
125
+ }
126
+ }, _callee);
127
+ }));
128
+ return function createBookingData(_x) {
129
+ return _ref3.apply(this, arguments);
130
+ };
131
+ }();
132
+ var currentResource = useCallback(function (useResource) {
133
+ var list = state.service.resources;
134
+ var item = list.find(function (d) {
135
+ return d.form_record_id == useResource;
136
+ }) || {};
137
+ return item;
138
+ }, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.resources]);
139
+ var editBookingData = /*#__PURE__*/function () {
140
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref4) {
141
+ var _resourceItem$_extend;
142
+ var changeValues, _item, _extend, _getServiceTimes, startDate, endDate, resourceItem, _ref6, relation_type, item_id, schedule_id;
143
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
144
+ while (1) switch (_context2.prev = _context2.next) {
145
+ case 0:
146
+ changeValues = _ref4.changeValues;
147
+ _item = _objectSpread(_objectSpread({}, state.service.cacheItem), {}, {
148
+ autoClose: false
149
+ });
150
+ _extend = _objectSpread(_objectSpread({}, _item._extend), changeValues); // 跨日预约商品
151
+ if (isDayBookingProduct(state.service.cacheItem, state)) {
152
+ // 更新商品数量和更新日期
153
+ _extend.quantity = 1;
154
+ _extend.startDate = _extend === null || _extend === void 0 ? void 0 : _extend.start_date;
155
+ _extend.endDate = _extend === null || _extend === void 0 ? void 0 : _extend.end_date;
156
+ } else {
157
+ _getServiceTimes = getServiceTimes({
158
+ _extend: _extend
159
+ }), startDate = _getServiceTimes.startDate, endDate = _getServiceTimes.endDate;
160
+ _extend.startDate = startDate;
161
+ _extend.endDate = endDate;
162
+ }
163
+ resourceItem = currentResource(changeValues.resource);
164
+ _ref6 = (resourceItem === null || resourceItem === void 0 || (_resourceItem$_extend = resourceItem._extend) === null || _resourceItem$_extend === void 0 ? void 0 : _resourceItem$_extend.usableTime) || {}, relation_type = _ref6.relation_type, item_id = _ref6.item_id, schedule_id = _ref6.schedule_id;
165
+ _extend.relation_type = relation_type || 'form';
166
+ _extend.relation_id = item_id || (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) || 0;
167
+ _extend.schedule_id = schedule_id || 0;
168
+ if (_extend.bundle_edit !== undefined) {
169
+ _extend.bundle_edit = 1;
170
+ }
171
+ _item._extend = _extend;
172
+ _item._time = new Date().getTime();
173
+ return _context2.abrupt("return", _item);
174
+ case 13:
175
+ case "end":
176
+ return _context2.stop();
177
+ }
178
+ }, _callee2);
179
+ }));
180
+ return function editBookingData(_x2) {
181
+ return _ref5.apply(this, arguments);
182
+ };
183
+ }();
184
+ var createBooking = /*#__PURE__*/function () {
185
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref7) {
186
+ var booking;
187
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
188
+ while (1) switch (_context3.prev = _context3.next) {
189
+ case 0:
190
+ booking = _ref7.booking;
191
+ // 目前都是预生成数据, 所以需要从编辑面板处理一圈数据再返回列表
192
+ goEditPanel({
193
+ booking: booking
194
+ });
195
+ case 2:
196
+ case "end":
197
+ return _context3.stop();
198
+ }
199
+ }, _callee3);
200
+ }));
201
+ return function createBooking(_x3) {
202
+ return _ref8.apply(this, arguments);
203
+ };
204
+ }();
205
+ var editBooking = /*#__PURE__*/function () {
206
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref9) {
207
+ var _booking$_extend;
208
+ var booking, _list, _id, groupId;
209
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
210
+ while (1) switch (_context4.prev = _context4.next) {
211
+ case 0:
212
+ booking = _ref9.booking;
213
+ _list = state.service.value;
214
+ _id = booking === null || booking === void 0 ? void 0 : booking._id;
215
+ groupId = booking === null || booking === void 0 || (_booking$_extend = booking._extend) === null || _booking$_extend === void 0 ? void 0 : _booking$_extend.groupId;
216
+ if (groupId) {
217
+ _list = _list.filter(function (d) {
218
+ var _d$_extend;
219
+ return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.groupId) !== groupId;
220
+ });
221
+ _list = _list.concat(createBookingItemsByGroup(booking, true));
222
+ } else {
223
+ // 判断是新增还是编辑
224
+ if (!_list.some(function (d) {
225
+ return d._id === _id;
226
+ })) {
227
+ // 普通商品直接返回
228
+ if (!isBookingProduct(booking === null || booking === void 0 ? void 0 : booking.extension_type) || !isDayBookingMode) {
229
+ _list.push(booking);
230
+ } else {}
231
+ } else {
232
+ _list = _list.map(function (d) {
233
+ return d._id === _id ? _objectSpread(_objectSpread({}, booking), {}, {
234
+ new: 0
235
+ }) : d;
236
+ });
237
+ }
238
+ }
239
+ deleteCacheParams();
240
+ dispatch({
241
+ type: 'setService',
242
+ payload: {
243
+ editModal: false,
244
+ addModal: false,
245
+ value: _list,
246
+ edit: true,
247
+ cacheItem: null,
248
+ changeService: false
249
+ }
250
+ });
251
+ case 7:
252
+ case "end":
253
+ return _context4.stop();
254
+ }
255
+ }, _callee4);
256
+ }));
257
+ return function editBooking(_x4) {
258
+ return _ref10.apply(this, arguments);
259
+ };
260
+ }();
261
+ var goEditPanel = function goEditPanel(_ref11) {
262
+ var booking = _ref11.booking;
263
+ dispatch({
264
+ type: 'setService',
265
+ payload: {
266
+ editModal: true,
267
+ cacheItem: booking,
268
+ addModal: !booking.autoClose,
269
+ changeService: false
270
+ }
271
+ });
272
+ onEdit(booking);
273
+ };
274
+ return {
275
+ createBookingData: createBookingData,
276
+ editBookingData: editBookingData,
277
+ createBooking: createBooking,
278
+ editBooking: editBooking,
279
+ goEditPanel: goEditPanel
280
+ };
281
+ };
@@ -0,0 +1,14 @@
1
+ export declare const getGroupTotalPrice: (items: any[]) => any;
2
+ /**
3
+ * @title: 创建一个虚拟的组
4
+ * @description:
5
+ * @param {any} items
6
+ * @return {*}
7
+ * @Author: zhiwei.Wang
8
+ */
9
+ export declare const concatBookings: (items: any[]) => any;
10
+ export declare const createBookingItemsByGroup: (item: any, isBatchEdit?: any) => any[];
11
+ export declare const isGroupBooking: (_id: any) => boolean;
12
+ export declare const getProductByGroupId: (groupId: string, items: any[]) => any[];
13
+ export declare const getGroupBooking: (groupId: string, items: any[]) => any;
14
+ export declare const filterItemByGroupId: (groupId: string, items: any[]) => any[];