@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
@@ -0,0 +1,686 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/booking/info/service2/utils.ts
30
+ var utils_exports = {};
31
+ __export(utils_exports, {
32
+ disabledDate: () => disabledDate,
33
+ formItems: () => formItems,
34
+ formatActiveKey: () => formatActiveKey,
35
+ formatDateTime: () => formatDateTime,
36
+ formatDayDate: () => formatDayDate,
37
+ formatDayTime: () => formatDayTime,
38
+ formatHolderLists: () => formatHolderLists,
39
+ formatProducts: () => formatProducts,
40
+ getAppointmentService: () => getAppointmentService,
41
+ getDayProducts: () => getDayProducts,
42
+ getErrorMessage: () => getErrorMessage,
43
+ getPets: () => getPets,
44
+ getResourceItem: () => getResourceItem,
45
+ holderId: () => holderId,
46
+ initDate: () => initDate,
47
+ isAppointmentProduct: () => isAppointmentProduct,
48
+ isBookingProduct: () => isBookingProduct,
49
+ isDayBooking: () => isDayBooking,
50
+ isDayBookingProduct: () => isDayBookingProduct,
51
+ isDaysBooking: () => isDaysBooking,
52
+ isEventBooking: () => isEventBooking,
53
+ isHasDayAppointmentProduct: () => isHasDayAppointmentProduct,
54
+ isOpenDeletePet: () => isOpenDeletePet,
55
+ isTerminalDayBooking: () => isTerminalDayBooking,
56
+ updateAppointmentServicePrice: () => updateAppointmentServicePrice,
57
+ updateNormalBundlePrice: () => updateNormalBundlePrice,
58
+ updateServicePrice: () => updateServicePrice,
59
+ updateServices: () => updateServices
60
+ });
61
+ module.exports = __toCommonJS(utils_exports);
62
+ var import_mock = require("../../mock");
63
+ var import_utils = require("../../utils");
64
+ var import_utils2 = require("@pisell/utils");
65
+ var import_dayjs = __toESM(require("dayjs"));
66
+ var import_status = require("./status");
67
+ var import_serve = require("../service/serve");
68
+ var import_locales = __toESM(require("../../locales"));
69
+ var import_utils3 = require("./Group/utils");
70
+ import_utils2.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
71
+ var formatActiveKey = (lists, platform, isEdit) => {
72
+ var _a;
73
+ if (!(lists == null ? void 0 : lists.length)) return [];
74
+ if (lists.length === 1 && isEdit) {
75
+ return [];
76
+ }
77
+ if (platform === "shop") {
78
+ return [(_a = lists[lists.length - 1]) == null ? void 0 : _a.key];
79
+ }
80
+ return lists == null ? void 0 : lists.map((cart) => cart == null ? void 0 : cart.key);
81
+ };
82
+ var getResourceItem = (id, state) => {
83
+ var _a;
84
+ if (id === 0) {
85
+ return (0, import_mock.getNoResource)();
86
+ }
87
+ return (_a = state.service.resources) == null ? void 0 : _a.find((d) => d.form_record_id === id);
88
+ };
89
+ var errorTypes = {
90
+ product: import_utils2.locales.getText("pisell2.text.status.service-error-1"),
91
+ time: import_utils2.locales.getText("pisell2.text.status.service-error-2"),
92
+ maxLimit: import_utils2.locales.getText("pisell2.text.status.service-error-3"),
93
+ limit: import_utils2.locales.getText("pisell2.text.status.service-error-3")
94
+ };
95
+ var getErrorMessage = (service, resourceItem, isDay) => {
96
+ const errorList = (0, import_utils.getErrorList)(resourceItem, service, isDay);
97
+ let errorMessage = "";
98
+ if (!service.id) {
99
+ return errorList[0].label;
100
+ }
101
+ if (errorList.length) {
102
+ if (errorList.length > 1) {
103
+ errorMessage = `${errorList.length} ${import_utils2.locales.getText(
104
+ "pisell2.text.warnings"
105
+ )}`;
106
+ } else {
107
+ errorMessage = (resourceItem == null ? void 0 : resourceItem.labelText) + " " + errorTypes[errorList[0].type];
108
+ }
109
+ }
110
+ return errorMessage;
111
+ };
112
+ var formatHolderLists = (lists) => {
113
+ const isOpenGroup = true;
114
+ const _lists = lists == null ? void 0 : lists.map((item) => {
115
+ return {
116
+ ...item,
117
+ id: (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id),
118
+ key: (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id),
119
+ label: import_utils2.locales.getText("pisell2.text.cart.of")(item == null ? void 0 : item.main_field)
120
+ };
121
+ });
122
+ if (isOpenGroup) {
123
+ const defaults = [
124
+ {
125
+ key: 0,
126
+ id: 0,
127
+ label: import_utils2.locales.getText("pisell2.text.open.items"),
128
+ main_field: import_utils2.locales.getText("pisell2.text.open.items")
129
+ }
130
+ ];
131
+ return defaults.concat(_lists);
132
+ }
133
+ return _lists;
134
+ };
135
+ var getHolderLists = (state) => {
136
+ var _a, _b, _c, _d, _e, _f;
137
+ const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
138
+ const petLists = ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
139
+ const _lists = formatHolderLists(petLists);
140
+ return _lists;
141
+ };
142
+ var getHolderName = (state, id) => {
143
+ const holderLists = getHolderLists(state);
144
+ if (!holderLists.length || !id) return "";
145
+ const resource = holderLists.find((d) => (d == null ? void 0 : d.id) === id);
146
+ return resource == null ? void 0 : resource.main_field;
147
+ };
148
+ var isBookingProduct = (extension_type, bol) => {
149
+ return import_status.appointmentTypes.includes(extension_type) || bol;
150
+ };
151
+ var isDayBookingProduct = (item, state) => {
152
+ return isBookingProduct(item == null ? void 0 : item.extension_type) && state.renderType === "dayBooking";
153
+ };
154
+ var updateServices = (state, currentItem, type, other) => {
155
+ var _a;
156
+ let products = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || [];
157
+ const isGroup = (0, import_utils3.isGroupBooking)(currentItem._id);
158
+ if (type === "delete") {
159
+ let deleteIds = [];
160
+ if (isGroup) {
161
+ deleteIds = (0, import_utils3.getProductByGroupId)(currentItem._id, products);
162
+ } else {
163
+ deleteIds = [currentItem._id];
164
+ }
165
+ products = products == null ? void 0 : products.filter((item) => !deleteIds.includes(item == null ? void 0 : item._id));
166
+ }
167
+ if (type === "delete_holders") {
168
+ products = products == null ? void 0 : products.filter((item) => {
169
+ var _a2;
170
+ return ((_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.holder_id) !== other;
171
+ });
172
+ }
173
+ if (type === "update_holders") {
174
+ products = products == null ? void 0 : products.map((item) => {
175
+ var _a2;
176
+ const ids = currentItem.map((d) => d._id);
177
+ if (ids == null ? void 0 : ids.includes(item == null ? void 0 : item._id)) {
178
+ let _extend = item._extend || {};
179
+ if (Array.isArray(other)) {
180
+ _extend.holder_id = (_a2 = other.find((other2) => (other2 == null ? void 0 : other2._id) === (item == null ? void 0 : item._id))) == null ? void 0 : _a2.holder_id;
181
+ } else {
182
+ _extend.holder_id = other;
183
+ }
184
+ return item;
185
+ }
186
+ return item;
187
+ });
188
+ } else {
189
+ products = products == null ? void 0 : products.map((item) => {
190
+ let updateIds = [];
191
+ if (isGroup) {
192
+ updateIds = (0, import_utils3.getProductByGroupId)(currentItem._id, products);
193
+ } else {
194
+ updateIds = [currentItem._id];
195
+ }
196
+ if (updateIds.includes(item._id)) {
197
+ if (type === "like") {
198
+ let _extend = item._extend || {};
199
+ _extend.like_status = other == null ? void 0 : other.like_status;
200
+ } else {
201
+ item = {
202
+ ...item,
203
+ ...other
204
+ };
205
+ }
206
+ return item;
207
+ }
208
+ return item;
209
+ });
210
+ }
211
+ return products;
212
+ };
213
+ var formatBundle = (bundle) => {
214
+ if (!(bundle == null ? void 0 : bundle.length)) return [];
215
+ return bundle.map((item) => {
216
+ return {
217
+ id: item == null ? void 0 : item.id,
218
+ title: item == null ? void 0 : item.title,
219
+ num: item == null ? void 0 : item.num,
220
+ price: item == null ? void 0 : item.price,
221
+ total: item == null ? void 0 : item.price,
222
+ price_type: item == null ? void 0 : item.price_type,
223
+ bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
224
+ bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
225
+ options: formatOptions(item == null ? void 0 : item.option)
226
+ };
227
+ });
228
+ };
229
+ var formatOptions = (options) => {
230
+ if (!(options == null ? void 0 : options.length)) return [];
231
+ return options.map((item) => {
232
+ return {
233
+ id: item == null ? void 0 : item.id,
234
+ name: item == null ? void 0 : item.name,
235
+ num: item == null ? void 0 : item.num,
236
+ price: item == null ? void 0 : item.price,
237
+ total: item == null ? void 0 : item.price,
238
+ origin_total: item == null ? void 0 : item.original_price
239
+ };
240
+ });
241
+ };
242
+ var formItems = (items) => {
243
+ return items.map((d) => {
244
+ return {
245
+ ...d,
246
+ start_date: d._extend.start_date,
247
+ end_date: d._extend.end_date,
248
+ num: d == null ? void 0 : d._extend.quantity,
249
+ total: d._extend.total,
250
+ origin_total: d._extend.origin_total
251
+ };
252
+ });
253
+ };
254
+ var formatProducts = (lists, state, isRenderGroup = true) => {
255
+ if (!(lists == null ? void 0 : lists.length)) return [];
256
+ const normalList = [];
257
+ const groupList = [];
258
+ const formItem = (item) => {
259
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
260
+ const _isDayBookingProduct = isDayBookingProduct(item, state);
261
+ const clientTitle = getHolderName(state, (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.holder_id);
262
+ const options = formatOptions((_c = (_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.option);
263
+ const bundle = formatBundle((_e = (_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle);
264
+ const isNormalProduct = !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || (state == null ? void 0 : state.renderType) === "eventBooking";
265
+ let resourceItem = {};
266
+ let errorMessage = "";
267
+ if (_isDayBookingProduct) {
268
+ resourceItem = getResourceItem((_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.resource, state);
269
+ errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
270
+ }
271
+ return {
272
+ id: item == null ? void 0 : item.id,
273
+ _id: item == null ? void 0 : item._id,
274
+ name: item == null ? void 0 : item.title,
275
+ price: (_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.price,
276
+ total: (_h = item == null ? void 0 : item._extend) == null ? void 0 : _h.total,
277
+ origin_total: (_i = item == null ? void 0 : item._extend) == null ? void 0 : _i.origin_total,
278
+ num: item == null ? void 0 : item._extend.quantity,
279
+ image: item == null ? void 0 : item.cover,
280
+ isShowNote: true,
281
+ note: item == null ? void 0 : item.note,
282
+ like_status: (_j = item == null ? void 0 : item._extend) == null ? void 0 : _j.like_status,
283
+ bundle,
284
+ options,
285
+ errorMessage,
286
+ product_option_string: (_l = (_k = item == null ? void 0 : item._extend) == null ? void 0 : _k.other) == null ? void 0 : _l.product_option_string,
287
+ discount_reason: (_m = item == null ? void 0 : item._extend) == null ? void 0 : _m.discount_reason,
288
+ resource_id: isNormalProduct ? 0 : (_n = item == null ? void 0 : item._extend) == null ? void 0 : _n.resource,
289
+ relation_form_name: isNormalProduct ? "" : (resourceItem == null ? void 0 : resourceItem.labelText) || item.relation_form_name,
290
+ holder_title: clientTitle,
291
+ start_date: !isNormalProduct ? (_o = item == null ? void 0 : item._extend) == null ? void 0 : _o.start_date : "",
292
+ end_date: !isNormalProduct ? (_p = item == null ? void 0 : item._extend) == null ? void 0 : _p.end_date : "",
293
+ holder_id: ((_q = item == null ? void 0 : item._extend) == null ? void 0 : _q.holder_id) || 0,
294
+ isNormalProduct,
295
+ locale: state.locale,
296
+ symbol: state.amountSymbol,
297
+ items: isEventBooking(state) ? [] : formItems(((_r = item == null ? void 0 : item._extend) == null ? void 0 : _r.items) || []),
298
+ _origin: item
299
+ };
300
+ };
301
+ lists.forEach((item) => {
302
+ var _a;
303
+ if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
304
+ normalList.push(formItem(item));
305
+ } else {
306
+ groupList.push(item);
307
+ }
308
+ });
309
+ let groups = groupList.reduce((prev, item) => {
310
+ var _a;
311
+ const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
312
+ if (!prev[groupId]) {
313
+ prev[groupId] = [];
314
+ }
315
+ prev[groupId].push(item);
316
+ return prev;
317
+ }, {});
318
+ if (isRenderGroup) {
319
+ return Object.values(groups).map((d) => formItem((0, import_utils3.concatBookings)(d))).concat(normalList);
320
+ } else {
321
+ return lists == null ? void 0 : lists.map((item) => formItem(item));
322
+ }
323
+ };
324
+ var disabledDate = (current, position, currentDate) => {
325
+ if (!(0, import_dayjs.default)(currentDate).isValid()) return;
326
+ if (position === "start") {
327
+ return false;
328
+ }
329
+ if (position === "end" && current.endOf("day") && currentDate) {
330
+ const endDisabled = currentDate.add(8, "months").format("YYYY-MM-DD");
331
+ return (0, import_dayjs.default)(endDisabled) < current.startOf("day") || current.startOf("day") <= currentDate;
332
+ }
333
+ return current && current <= currentDate;
334
+ };
335
+ var isDayBooking = (state) => {
336
+ return (state == null ? void 0 : state.renderType) === "dayBooking" || (state == null ? void 0 : state.renderType) === "eventBooking";
337
+ };
338
+ var isDaysBooking = (state) => {
339
+ return (state == null ? void 0 : state.renderType) === "dayBooking";
340
+ };
341
+ var isEventBooking = (state) => {
342
+ return state.renderType === "eventBooking";
343
+ };
344
+ var isAppointmentProduct = (item) => {
345
+ return import_status.appointmentTypes.includes(item.extension_type);
346
+ };
347
+ var isTerminalDayBooking = (state) => {
348
+ return state.isTerminalDayBookingPage;
349
+ };
350
+ var formatDayDate = (_extend) => {
351
+ let startDate = (0, import_dayjs.default)(_extend == null ? void 0 : _extend.start_date).startOf("day");
352
+ let endDate = (0, import_dayjs.default)(_extend == null ? void 0 : _extend.end_date).startOf("day");
353
+ return {
354
+ ..._extend,
355
+ start_date: startDate,
356
+ end_date: endDate
357
+ };
358
+ };
359
+ var formatDayTime = ({ startDate, endDate }) => {
360
+ const shopOpeningTime = localStorage.getItem("shopOpeningHours") || "00:00";
361
+ let start_date = (0, import_dayjs.default)(startDate).format("YYYY-MM-DD");
362
+ let end_date = (0, import_dayjs.default)(endDate).format("YYYY-MM-DD");
363
+ const result = {
364
+ startDateTime: (0, import_dayjs.default)(`${start_date}T${shopOpeningTime}:00`),
365
+ // 结束日期根据营业日时间减去一分钟
366
+ endDateTime: (0, import_dayjs.default)(`${end_date}T${shopOpeningTime}:00`).subtract(1, "minute")
367
+ };
368
+ return result;
369
+ };
370
+ var formatDateTime = (start_date, end_date) => {
371
+ const _openingTime = (0, import_status.openingTime)();
372
+ const startDate = `${start_date} ${_openingTime}`;
373
+ let endDate = `${end_date} ${_openingTime}`;
374
+ const date = {
375
+ value: (0, import_dayjs.default)(startDate),
376
+ end_date: (0, import_dayjs.default)(endDate).subtract(1, "minute")
377
+ };
378
+ return date;
379
+ };
380
+ var initDate = () => {
381
+ const startDate = (0, import_dayjs.default)().format("YYYY-MM-DD");
382
+ let endDate = (0, import_dayjs.default)().add(1, "days").format("YYYY-MM-DD");
383
+ const date = formatDateTime(startDate, endDate);
384
+ return date;
385
+ };
386
+ var isHasDayAppointmentProduct = (state) => {
387
+ var _a, _b, _c, _d, _e, _f, _g;
388
+ const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
389
+ const services = ((_e = state.service) == null ? void 0 : _e.value) || [];
390
+ const pets = ((_g = (_f = state.pet) == null ? void 0 : _f.value) == null ? void 0 : _g[form_id]) || [];
391
+ if (!pets.length) return true;
392
+ const checkType = (extension_type) => {
393
+ if (isEventBooking(state)) {
394
+ return true;
395
+ }
396
+ return import_status.appointmentTypes.includes(extension_type);
397
+ };
398
+ const appointmentServices = services.filter((d) => checkType(d.extension_type));
399
+ if (!appointmentServices.length) return true;
400
+ let _pets = pets == null ? void 0 : pets.map((d) => {
401
+ return {
402
+ ...d,
403
+ // 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
404
+ // services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
405
+ services: services.filter((item) => {
406
+ var _a2;
407
+ return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) == d.form_record_id && checkType(item.extension_type);
408
+ })
409
+ };
410
+ });
411
+ _pets = _pets.filter((d) => !d.services.length);
412
+ return _pets.length > 0;
413
+ };
414
+ var getDayProducts = (holderId2, lists, isTerminal) => {
415
+ let _lists = lists || [];
416
+ if (!holderId2 && !isTerminal) {
417
+ _lists = _lists.filter((item) => !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type));
418
+ } else {
419
+ _lists = _lists.filter((item) => {
420
+ var _a;
421
+ return !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) && ((_a = item.duration) == null ? void 0 : _a.type) === "days";
422
+ });
423
+ }
424
+ return _lists;
425
+ };
426
+ var getPets = (state) => {
427
+ var _a, _b, _c, _d, _e, _f;
428
+ const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
429
+ const pets = ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
430
+ return pets;
431
+ };
432
+ var getAppointmentService = (state) => {
433
+ var _a;
434
+ const services = ((_a = state.service) == null ? void 0 : _a.value) || [];
435
+ let lists = services.filter((item) => import_status.appointmentTypes.includes(item.extension_type));
436
+ return lists;
437
+ };
438
+ var isOpenDeletePet = (state, newVal) => {
439
+ var _a, _b, _c, _d, _e, _f;
440
+ const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
441
+ const oldPets = ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
442
+ const newPets = (newVal == null ? void 0 : newVal[form_id]) || [];
443
+ const deletePets = oldPets.filter((item) => !newPets.some((newItem) => newItem.form_record_id === item.form_record_id));
444
+ const servicePets = deletePets.map((item) => {
445
+ var _a2, _b2;
446
+ return {
447
+ ...item,
448
+ services: (_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.filter((d) => {
449
+ var _a3;
450
+ return ((_a3 = d._extend) == null ? void 0 : _a3.holder_id) == item.form_record_id;
451
+ })
452
+ };
453
+ });
454
+ const lists = servicePets.filter((item) => {
455
+ var _a2;
456
+ return ((_a2 = item.services) == null ? void 0 : _a2.length) > 0;
457
+ });
458
+ return {
459
+ ids: lists.map((item) => item.form_record_id),
460
+ lists
461
+ };
462
+ };
463
+ var holderId = (state) => {
464
+ var _a;
465
+ return Number(((_a = state == null ? void 0 : state.activeCartId) == null ? void 0 : _a[0]) || 0);
466
+ };
467
+ function calculateTotalPrice(data) {
468
+ const _price = data == null ? void 0 : data.reduce(
469
+ (total, item) => total + ((item == null ? void 0 : item.price) || (item == null ? void 0 : item.add_price)) * item.num,
470
+ 0
471
+ );
472
+ return parseFloat(_price);
473
+ }
474
+ function updateSinglePrice(currentValue, single) {
475
+ const _single = [];
476
+ for (let index = 0; index < currentValue.length; index++) {
477
+ const item = currentValue[index];
478
+ const currentIndex = single.findIndex(
479
+ (_single2) => _single2.id === item.id
480
+ );
481
+ if (currentIndex !== -1) {
482
+ item.add_price = single[currentIndex].add_price;
483
+ item.name = single[currentIndex].name;
484
+ _single.push(item);
485
+ }
486
+ }
487
+ return _single;
488
+ }
489
+ function updateBundlePrice(currentValue, [bundle, single]) {
490
+ var _a;
491
+ const _bundle = [];
492
+ for (let index = 0; index < currentValue.length; index++) {
493
+ const item = currentValue[index];
494
+ const currentIndex = bundle.findIndex(
495
+ (_bundle2) => _bundle2.id === item.id
496
+ );
497
+ if (currentIndex !== -1 && bundle[currentIndex]) {
498
+ item.title = bundle[currentIndex].title;
499
+ item.price_type = bundle[currentIndex].price_type;
500
+ item._price = bundle[currentIndex].price;
501
+ const bundle_sum_price = parseFloat(
502
+ bundle[currentIndex].price_type === "markdown" ? bundle[currentIndex].price * -1 : bundle[currentIndex].price
503
+ ).toFixed(2);
504
+ item.price = bundle_sum_price;
505
+ item.bundle_sum_price = bundle_sum_price;
506
+ if ((_a = item == null ? void 0 : item.option) == null ? void 0 : _a.length) {
507
+ const _option = JSON.parse(JSON.stringify(item.option));
508
+ item.option = updateSinglePrice(_option, single);
509
+ let optionPrice = 0;
510
+ optionPrice = calculateTotalPrice(item.option);
511
+ const bundle_sum_price2 = (parseFloat(
512
+ bundle[currentIndex].price_type === "markdown" ? bundle[currentIndex].price * -1 : bundle[currentIndex].price
513
+ ) + optionPrice).toFixed(2);
514
+ item.price = bundle_sum_price2;
515
+ item.bundle_sum_price = bundle_sum_price2;
516
+ }
517
+ _bundle.push(item);
518
+ }
519
+ }
520
+ return _bundle;
521
+ }
522
+ function flatData(newPackageData) {
523
+ var _a, _b, _c;
524
+ let bundle = [];
525
+ let single = [];
526
+ for (const group of newPackageData) {
527
+ if ((_a = group == null ? void 0 : group.bundle_item) == null ? void 0 : _a.length) {
528
+ for (const item of group.bundle_item) {
529
+ bundle.push(item);
530
+ }
531
+ }
532
+ }
533
+ for (const bundleItem of bundle) {
534
+ if ((_b = bundleItem == null ? void 0 : bundleItem.option_group) == null ? void 0 : _b.length) {
535
+ for (const group of bundleItem.option_group) {
536
+ if ((_c = group == null ? void 0 : group.option_item) == null ? void 0 : _c.length) {
537
+ for (const item of group.option_item) {
538
+ single.push(item);
539
+ }
540
+ }
541
+ }
542
+ }
543
+ }
544
+ return [bundle, single];
545
+ }
546
+ function updateNormalBundlePrice(currentValue, newBundleData) {
547
+ const _currentValue = JSON.parse(JSON.stringify(currentValue));
548
+ const _flatData = flatData(newBundleData);
549
+ const newValue = updateBundlePrice(_currentValue, _flatData);
550
+ return newValue;
551
+ }
552
+ var normalServicePrice = async (ids, state) => {
553
+ var _a, _b, _c, _d;
554
+ const services = ((_a = state.service) == null ? void 0 : _a.value) || [];
555
+ const customerId = ((_c = (_b = state == null ? void 0 : state.client) == null ? void 0 : _b.value) == null ? void 0 : _c.id) || 0;
556
+ let data = await state.apis.getServices({
557
+ skip: 1,
558
+ num: 500,
559
+ ids,
560
+ customer_id: customerId,
561
+ open_quotation: 1,
562
+ open_bundle: 1,
563
+ with: ["bundleGroup.bundleItem", "optionGroup.optionItem"],
564
+ _config: { abort: true }
565
+ });
566
+ if (!((_d = data == null ? void 0 : data.list) == null ? void 0 : _d.length)) return;
567
+ const _lists = services.map((item) => {
568
+ var _a2, _b2, _c2, _d2;
569
+ let obj = { ...item };
570
+ if (!import_status.appointmentTypes.includes(obj.extension_type)) {
571
+ const product = data.list.find((p) => p.id === (item == null ? void 0 : item.product_id));
572
+ let _extend = (obj == null ? void 0 : obj._extend) || {};
573
+ const other = (_extend == null ? void 0 : _extend.other) || {};
574
+ if (product) {
575
+ if (((_a2 = product == null ? void 0 : product.variant) == null ? void 0 : _a2.length) && (other == null ? void 0 : other.product_variant_id)) {
576
+ const _variant = (_b2 = product == null ? void 0 : product.variant) == null ? void 0 : _b2.find((v) => v.id === (other == null ? void 0 : other.product_variant_id));
577
+ obj._extend.price = Number(_variant == null ? void 0 : _variant.price);
578
+ obj._extend.other.price = Number(_variant == null ? void 0 : _variant.price);
579
+ } else {
580
+ obj._extend.price = Number(product == null ? void 0 : product.price);
581
+ }
582
+ if (((_c2 = other == null ? void 0 : other.bundle) == null ? void 0 : _c2.length) && ((_d2 = product == null ? void 0 : product.bundle_group) == null ? void 0 : _d2.length)) {
583
+ let _bundle = updateNormalBundlePrice(other.bundle, product == null ? void 0 : product.bundle_group);
584
+ obj._extend.other = {
585
+ ...other,
586
+ bundle: _bundle
587
+ };
588
+ }
589
+ obj._extend.total = (0, import_utils.getProductTotalPrice)(obj);
590
+ obj._extend.origin_total = (0, import_utils.getProductTotalPrice)(obj);
591
+ }
592
+ }
593
+ return obj;
594
+ });
595
+ return _lists;
596
+ };
597
+ var updateAppointmentServicePrice = async (state, { start_date, end_date, product_id }) => {
598
+ var _a, _b, _c, _d, _e, _f, _g, _h;
599
+ const defaultReturn = {
600
+ multiDayPrices: [],
601
+ price: Number((_c = (_b = (_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem) == null ? void 0 : _b._extend) == null ? void 0 : _c.price) || 0
602
+ };
603
+ try {
604
+ const format = "YYYY-MM-DD";
605
+ const customer_id = ((_e = (_d = state == null ? void 0 : state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id) || 1;
606
+ const _product_id = product_id || ((_f = state.service.cacheItem) == null ? void 0 : _f.product_id) || 0;
607
+ let multi_day_price = null;
608
+ if (!product_id) {
609
+ console.log("updateAppointmentServicePrice", product_id);
610
+ return defaultReturn;
611
+ }
612
+ const startDate = (0, import_dayjs.default)(start_date).format(format);
613
+ const endDate = (0, import_dayjs.default)(end_date).subtract(1, "days").format(format);
614
+ const params = {
615
+ customer_id,
616
+ multi_day: { start: startDate, end: endDate }
617
+ };
618
+ const res = await (0, import_serve.postMultiDay)(_product_id, params);
619
+ const _prices = ((_g = res == null ? void 0 : res.data) == null ? void 0 : _g.multi_day_price) || [];
620
+ multi_day_price = _prices == null ? void 0 : _prices.map((p) => {
621
+ var _a2, _b2;
622
+ const startDate2 = (0, import_dayjs.default)((_a2 = p == null ? void 0 : p.multi_day) == null ? void 0 : _a2.start);
623
+ const endDate2 = (0, import_dayjs.default)((_b2 = p == null ? void 0 : p.multi_day) == null ? void 0 : _b2.end).add(1, "day");
624
+ let duration = (endDate2 == null ? void 0 : endDate2.diff(startDate2, "day")) || 1;
625
+ return {
626
+ total: Number(p == null ? void 0 : p.price),
627
+ origin_total: Number(p == null ? void 0 : p.price),
628
+ num: duration,
629
+ quotation_id: (p == null ? void 0 : p.quotation_id) || 0,
630
+ start_date: startDate2 == null ? void 0 : startDate2.format(format),
631
+ end_date: endDate2 == null ? void 0 : endDate2.format(format)
632
+ };
633
+ });
634
+ return {
635
+ multiDayPrices: multi_day_price,
636
+ price: Number((_h = res == null ? void 0 : res.data) == null ? void 0 : _h.price) || 0
637
+ };
638
+ } catch (error) {
639
+ console.log("updateAppointmentServicePrice", error);
640
+ }
641
+ return defaultReturn;
642
+ };
643
+ var updateServicePrice = (state) => {
644
+ var _a;
645
+ let services = ((_a = state.service) == null ? void 0 : _a.value) || [];
646
+ let normalServices = services == null ? void 0 : services.filter(
647
+ (item) => isEventBooking(state) ? true : !import_status.appointmentTypes.includes(item.extension_type)
648
+ );
649
+ let newNormalIds = normalServices == null ? void 0 : normalServices.map((item) => (item == null ? void 0 : item.product_id) || (item == null ? void 0 : item.id));
650
+ newNormalIds = [...new Set(newNormalIds)];
651
+ if (newNormalIds == null ? void 0 : newNormalIds.length) {
652
+ return normalServicePrice(newNormalIds, state);
653
+ }
654
+ return [];
655
+ };
656
+ // Annotate the CommonJS export names for ESM import in node:
657
+ 0 && (module.exports = {
658
+ disabledDate,
659
+ formItems,
660
+ formatActiveKey,
661
+ formatDateTime,
662
+ formatDayDate,
663
+ formatDayTime,
664
+ formatHolderLists,
665
+ formatProducts,
666
+ getAppointmentService,
667
+ getDayProducts,
668
+ getErrorMessage,
669
+ getPets,
670
+ getResourceItem,
671
+ holderId,
672
+ initDate,
673
+ isAppointmentProduct,
674
+ isBookingProduct,
675
+ isDayBooking,
676
+ isDayBookingProduct,
677
+ isDaysBooking,
678
+ isEventBooking,
679
+ isHasDayAppointmentProduct,
680
+ isOpenDeletePet,
681
+ isTerminalDayBooking,
682
+ updateAppointmentServicePrice,
683
+ updateNormalBundlePrice,
684
+ updateServicePrice,
685
+ updateServices
686
+ });