@pisell/private-materials 3.0.207 → 3.0.209

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