@pisell/private-materials 6.0.24 → 6.1.1

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 (1556) 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 +167 -147
  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 +603 -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 +31 -0
  24. package/es/components/Sales/Cart/types.js +1 -0
  25. package/es/components/Sales/Cart/utils.d.ts +23 -0
  26. package/es/components/Sales/Cart/utils.js +161 -0
  27. package/es/components/Sales/Checkout/index.d.ts +33 -0
  28. package/es/components/Sales/Checkout/index.js +152 -0
  29. package/es/components/Sales/Checkout/serve.d.ts +2 -0
  30. package/es/components/Sales/Checkout/serve.js +11 -0
  31. package/es/components/Sales/Checkout/utils.d.ts +35 -0
  32. package/es/components/Sales/Checkout/utils.js +126 -0
  33. package/es/components/Sales/Customer/index.d.ts +24 -0
  34. package/es/components/Sales/Customer/index.js +61 -0
  35. package/es/components/Sales/Event/Detail.d.ts +29 -0
  36. package/es/components/Sales/Event/Detail.js +293 -0
  37. package/es/components/Sales/Event/index.d.ts +30 -0
  38. package/es/components/Sales/Event/index.js +123 -0
  39. package/es/components/Sales/Event/serve.d.ts +39 -0
  40. package/es/components/Sales/Event/serve.js +58 -0
  41. package/es/components/Sales/Holder/index.d.ts +33 -0
  42. package/es/components/Sales/Holder/index.js +229 -0
  43. package/es/components/Sales/Holder/serve.d.ts +8 -0
  44. package/es/components/Sales/Holder/serve.js +20 -0
  45. package/es/components/Sales/Init/index.d.ts +25 -0
  46. package/es/components/Sales/Init/index.js +118 -0
  47. package/es/components/Sales/Init/serve.d.ts +3 -0
  48. package/es/components/Sales/Init/serve.js +11 -0
  49. package/es/components/Sales/Resource/index.d.ts +26 -0
  50. package/es/components/Sales/Resource/index.js +128 -0
  51. package/es/components/Sales/Resource/serve.d.ts +5 -0
  52. package/es/components/Sales/Resource/serve.js +8 -0
  53. package/es/components/Sales/Step/index.d.ts +39 -0
  54. package/es/components/Sales/Step/index.js +204 -0
  55. package/es/components/Sales/Summary/index.d.ts +25 -0
  56. package/es/components/Sales/Summary/index.js +50 -0
  57. package/es/components/Sales/Summary/serve.d.ts +0 -0
  58. package/es/components/Sales/Summary/serve.js +0 -0
  59. package/es/components/Sales/Summary/utils.d.ts +36 -0
  60. package/es/components/Sales/Summary/utils.js +64 -0
  61. package/es/components/Sales/hooks/index.d.ts +1 -0
  62. package/es/components/Sales/hooks/index.js +3 -0
  63. package/es/components/Sales/index.d.ts +20 -0
  64. package/es/components/Sales/index.js +26 -0
  65. package/es/components/Sales/utils/index.d.ts +1 -0
  66. package/es/components/Sales/utils/index.js +18 -0
  67. package/es/components/appointmentBooking/assets/alert-circle.png +0 -0
  68. package/es/components/appointmentBooking/assets/calendar-heart.svg +5 -0
  69. package/es/components/appointmentBooking/assets/compass.svg +13 -0
  70. package/es/components/appointmentBooking/assets/guests.svg +1 -0
  71. package/es/components/appointmentBooking/assets/image.svg +5 -0
  72. package/es/components/appointmentBooking/assets/phone.svg +5 -0
  73. package/es/components/appointmentBooking/assets/resource.svg +1 -0
  74. package/es/components/appointmentBooking/assets/shopping-cart.svg +10 -0
  75. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +7 -0
  76. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +152 -0
  77. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.less +0 -0
  78. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +3 -0
  79. package/es/components/appointmentBooking/components/Cart/Item/Total.js +45 -0
  80. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
  81. package/es/components/appointmentBooking/components/Cart/Item/index.js +261 -0
  82. package/es/components/appointmentBooking/components/Cart/Item/index.less +108 -0
  83. package/es/components/appointmentBooking/components/Cart/index.d.ts +3 -0
  84. package/es/components/appointmentBooking/components/Cart/index.js +29 -0
  85. package/es/components/appointmentBooking/components/Cart/index.less +2 -0
  86. package/es/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
  87. package/es/components/appointmentBooking/components/Cart/utils.js +170 -0
  88. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  89. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +277 -0
  90. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  91. package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  92. package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
  93. package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
  94. package/es/components/appointmentBooking/components/Content/index.js +243 -0
  95. package/es/components/appointmentBooking/components/Content/index.less +113 -0
  96. package/es/components/appointmentBooking/components/Date/index.d.ts +4 -0
  97. package/es/components/appointmentBooking/components/Date/index.js +403 -0
  98. package/es/components/appointmentBooking/components/Date/index.less +142 -0
  99. package/es/components/appointmentBooking/components/Date/state.d.ts +63 -0
  100. package/es/components/appointmentBooking/components/Date/state.js +223 -0
  101. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  102. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  103. package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
  104. package/es/components/appointmentBooking/components/Footer/index.d.ts +3 -0
  105. package/es/components/appointmentBooking/components/Footer/index.js +63 -0
  106. package/es/components/appointmentBooking/components/Footer/index.less +64 -0
  107. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  108. package/es/components/appointmentBooking/components/Form/index.js +157 -0
  109. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  110. package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  111. package/es/components/appointmentBooking/components/Form/utils.js +36 -0
  112. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  113. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
  114. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  115. package/es/components/appointmentBooking/components/Guest/index.d.ts +4 -0
  116. package/es/components/appointmentBooking/components/Guest/index.js +185 -0
  117. package/es/components/appointmentBooking/components/Guest/index.less +92 -0
  118. package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
  119. package/es/components/appointmentBooking/components/Header/index.js +199 -0
  120. package/es/components/appointmentBooking/components/Header/index.less +0 -0
  121. package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  122. package/es/components/appointmentBooking/components/Resource/index.js +285 -0
  123. package/es/components/appointmentBooking/components/Resource/index.less +10 -0
  124. package/es/components/appointmentBooking/components/Resource/utils.d.ts +5 -0
  125. package/es/components/appointmentBooking/components/Resource/utils.js +16 -0
  126. package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
  127. package/es/components/appointmentBooking/components/Services/index.js +257 -0
  128. package/es/components/appointmentBooking/components/Services/index.less +3 -0
  129. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
  130. package/es/components/appointmentBooking/components/TimeSlicing/index.js +118 -0
  131. package/es/components/appointmentBooking/components/TimeSlicing/index.less +33 -0
  132. package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  133. package/es/components/appointmentBooking/components/Voucher/index.js +267 -0
  134. package/es/components/appointmentBooking/components/Voucher/index.less +116 -0
  135. package/es/components/appointmentBooking/context.d.ts +35 -0
  136. package/es/components/appointmentBooking/context.js +241 -0
  137. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  138. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +134 -0
  139. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +18 -0
  140. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  141. package/es/components/appointmentBooking/deposit/index.js +101 -0
  142. package/es/components/appointmentBooking/deposit/index.less +57 -0
  143. package/es/components/appointmentBooking/hooks.d.ts +106 -0
  144. package/es/components/appointmentBooking/hooks.js +976 -0
  145. package/es/components/appointmentBooking/index.d.ts +3 -0
  146. package/es/components/appointmentBooking/index.js +48 -0
  147. package/es/components/appointmentBooking/index.less +23 -0
  148. package/es/components/appointmentBooking/locales.d.ts +360 -0
  149. package/es/components/appointmentBooking/locales.js +413 -0
  150. package/es/components/appointmentBooking/mock.d.ts +627 -0
  151. package/es/components/appointmentBooking/mock.js +1172 -0
  152. package/es/components/appointmentBooking/status.d.ts +21 -0
  153. package/es/components/appointmentBooking/status.js +51 -0
  154. package/es/components/appointmentBooking/type.d.ts +17 -0
  155. package/es/components/appointmentBooking/type.js +1 -0
  156. package/es/components/appointmentBooking/utils.d.ts +203 -0
  157. package/es/components/appointmentBooking/utils.js +768 -0
  158. package/es/components/booking/addons/index.js +56 -35
  159. package/es/components/booking/addons/model.js +5 -0
  160. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  161. package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
  162. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  163. package/es/components/booking/components/TabProduct/selectProductItem/index.js +3 -1
  164. package/es/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
  165. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  166. package/es/components/booking/components/browserSelect/index.js +1 -1
  167. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  168. package/es/components/booking/components/customSelect/index.d.ts +1 -0
  169. package/es/components/booking/components/customSelect/index.js +8 -2
  170. package/es/components/booking/components/drawer/index.js +4 -2
  171. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  172. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
  173. package/es/components/booking/components/footer/AppointmentProductModal/index.js +38 -0
  174. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  175. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  176. package/es/components/booking/components/footer/amount.d.ts +1 -0
  177. package/es/components/booking/components/footer/amount.js +48 -23
  178. package/es/components/booking/components/footer/index.d.ts +0 -1
  179. package/es/components/booking/components/footer/index.js +315 -174
  180. package/es/components/booking/components/footer/index.less +6 -1
  181. package/es/components/booking/components/footer/serve.d.ts +2 -0
  182. package/es/components/booking/components/footer/serve.js +44 -0
  183. package/es/components/booking/components/footer/utils.d.ts +21 -0
  184. package/es/components/booking/components/footer/utils.js +420 -53
  185. package/es/components/booking/components/voucher/index.d.ts +3 -0
  186. package/es/components/booking/components/voucher/index.js +319 -0
  187. package/es/components/booking/components/voucher/index.less +87 -0
  188. package/es/components/booking/components/voucher/utils.d.ts +4 -0
  189. package/es/components/booking/components/voucher/utils.js +15 -0
  190. package/es/components/booking/deposit/DepositItem/index.js +1 -0
  191. package/es/components/booking/deposit/index.d.ts +0 -1
  192. package/es/components/booking/deposit/index.js +5 -3
  193. package/es/components/booking/forms/footer.d.ts +6 -0
  194. package/es/components/booking/forms/footer.js +88 -0
  195. package/es/components/booking/forms/forms.d.ts +4 -0
  196. package/es/components/booking/forms/forms.js +15 -3
  197. package/es/components/booking/forms/index.d.ts +1 -1
  198. package/es/components/booking/forms/index.js +25 -20
  199. package/es/components/booking/forms/index.less +7 -0
  200. package/es/components/booking/forms/model.js +5 -5
  201. package/es/components/booking/forms/sendModal/index.d.ts +27 -0
  202. package/es/components/booking/forms/sendModal/index.js +82 -0
  203. package/es/components/booking/forms/sendModal/index.less +9 -0
  204. package/es/components/booking/forms/sendModal/useSendModal.d.ts +9 -0
  205. package/es/components/booking/forms/sendModal/useSendModal.js +79 -0
  206. package/es/components/booking/forms/serve.d.ts +9 -0
  207. package/es/components/booking/forms/serve.js +20 -0
  208. package/es/components/booking/forms/single/index.d.ts +1 -2
  209. package/es/components/booking/forms/single/index.js +83 -27
  210. package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  211. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  212. package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
  213. package/es/components/booking/hooks/useQuotation.d.ts +5 -0
  214. package/es/components/booking/hooks/useQuotation.js +266 -0
  215. package/es/components/booking/info/Provider.d.ts +0 -0
  216. package/es/components/booking/info/Provider.js +54 -0
  217. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  218. package/es/components/booking/info/addServiceVariant/index.js +10 -3
  219. package/es/components/booking/info/client/index.js +41 -9
  220. package/es/components/booking/info/client/index.less +39 -0
  221. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  222. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +10 -1
  223. package/es/components/booking/info/clientVariant/utils.d.ts +1 -0
  224. package/es/components/booking/info/clientVariant/utils.js +6 -0
  225. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  226. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +31 -15
  227. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
  228. package/es/components/booking/info/clientVariant/vertical/index.js +162 -20
  229. package/es/components/booking/info/clientVariant/vertical/index.less +18 -0
  230. package/es/components/booking/info/date/index.d.ts +0 -1
  231. package/es/components/booking/info/dateRange/index.d.ts +4 -0
  232. package/es/components/booking/info/dateRange/index.js +98 -0
  233. package/es/components/booking/info/dateRange/index.less +21 -0
  234. package/es/components/booking/info/header/index.d.ts +0 -1
  235. package/es/components/booking/info/hooks/useAddHolder.d.ts +9 -0
  236. package/es/components/booking/info/hooks/useAddHolder.js +171 -0
  237. package/es/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
  238. package/es/components/booking/info/hooks/useGetHolderList.js +48 -0
  239. package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  240. package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
  241. package/es/components/booking/info/hooks/useInfoHolder.d.ts +10 -0
  242. package/es/components/booking/info/hooks/useInfoHolder.js +62 -0
  243. package/es/components/booking/info/index.d.ts +0 -1
  244. package/es/components/booking/info/index.js +16 -2
  245. package/es/components/booking/info/main.js +45 -29
  246. package/es/components/booking/info/model.js +3 -0
  247. package/es/components/booking/info/notes/index.d.ts +0 -1
  248. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
  249. package/es/components/booking/info/pet/ChangePetModal/index.js +134 -0
  250. package/es/components/booking/info/pet/ChangePetModal/index.less +4 -0
  251. package/es/components/booking/info/pet/index.d.ts +1 -1
  252. package/es/components/booking/info/pet/index.js +199 -58
  253. package/es/components/booking/info/pet/serve.d.ts +1 -0
  254. package/es/components/booking/info/pet/serve.js +27 -0
  255. package/es/components/booking/info/service/Lists.d.ts +2 -0
  256. package/es/components/booking/info/service/Lists.js +121 -0
  257. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  258. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  259. package/es/components/booking/info/service/addService/index.js +215 -122
  260. package/es/components/booking/info/service/addService/index.less +13 -3
  261. package/es/components/booking/info/service/addService/utils.d.ts +12 -2
  262. package/es/components/booking/info/service/addService/utils.js +103 -26
  263. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  264. package/es/components/booking/info/service/editService/BookingList/index.d.ts +4 -0
  265. package/es/components/booking/info/service/editService/BookingList/index.js +39 -0
  266. package/es/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
  267. package/es/components/booking/info/service/editService/EditTabs/index.js +35 -0
  268. package/es/components/booking/info/service/editService/index.d.ts +1 -1
  269. package/es/components/booking/info/service/editService/index.js +532 -170
  270. package/es/components/booking/info/service/editService/index.less +18 -13
  271. package/es/components/booking/info/service/index.js +8 -5
  272. package/es/components/booking/info/service/like/index.js +1 -1
  273. package/es/components/booking/info/service/serve.d.ts +19 -0
  274. package/es/components/booking/info/service/serve.js +49 -0
  275. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  276. package/es/components/booking/info/service/serviceList/index.js +1 -0
  277. package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
  278. package/es/components/booking/info/service/serviceManager/distributeDiscount.js +55 -0
  279. package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
  280. package/es/components/booking/info/service/serviceManager/index.js +286 -0
  281. package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  282. package/es/components/booking/info/service/serviceManager/utils.js +0 -0
  283. package/es/components/booking/info/service2/Group/utils.d.ts +14 -0
  284. package/es/components/booking/info/service2/Group/utils.js +147 -0
  285. package/es/components/booking/info/service2/Lists.d.ts +3 -0
  286. package/es/components/booking/info/service2/Lists.js +153 -0
  287. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
  288. package/es/components/booking/info/service2/hooks/useSelectPet.js +62 -0
  289. package/es/components/booking/info/service2/index.d.ts +6 -0
  290. package/es/components/booking/info/service2/index.js +60 -0
  291. package/es/components/booking/info/service2/status.d.ts +31 -0
  292. package/es/components/booking/info/service2/status.js +78 -0
  293. package/es/components/booking/info/service2/utils.d.ts +247 -0
  294. package/es/components/booking/info/service2/utils.js +1385 -0
  295. package/es/components/booking/info/utils.d.ts +26 -0
  296. package/es/components/booking/info/utils.js +99 -1
  297. package/es/components/booking/info2/index.js +19 -11
  298. package/es/components/booking/info2/serve.d.ts +2 -2
  299. package/es/components/booking/info2/serve.js +9 -12
  300. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  301. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  302. package/es/components/booking/info2/service/addService/index.js +81 -37
  303. package/es/components/booking/info2/service/addService/utils.d.ts +20 -3
  304. package/es/components/booking/info2/service/addService/utils.js +154 -71
  305. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  306. package/es/components/booking/info2/service/addTimeModal/index.js +4 -5
  307. package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -4
  308. package/es/components/booking/info2/service/editService/Resources/index.js +26 -7
  309. package/es/components/booking/info2/service/editService/index.js +134 -35
  310. package/es/components/booking/info2/service/editService/utils.d.ts +4 -2
  311. package/es/components/booking/info2/service/editService/utils.js +18 -0
  312. package/es/components/booking/info2/service/index.js +22 -38
  313. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  314. package/es/components/booking/info2/utils.d.ts +4 -0
  315. package/es/components/booking/info2/utils.js +45 -0
  316. package/es/components/booking/info2/utilsByBooking.d.ts +2 -1
  317. package/es/components/booking/info2/utilsByBooking.js +45 -16
  318. package/es/components/booking/locales.d.ts +153 -0
  319. package/es/components/booking/locales.js +186 -3
  320. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  321. package/es/components/booking/materiels/holder/index.d.ts +7 -0
  322. package/es/components/booking/materiels/holder/index.js +51 -0
  323. package/es/components/booking/materiels/startTime/index.js +1 -1
  324. package/es/components/booking/model.d.ts +5 -1
  325. package/es/components/booking/model.js +4 -2
  326. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  327. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  328. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  329. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  330. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  331. package/es/components/booking/notes/addNote/index.js +1 -1
  332. package/es/components/booking/notes/addNote/index.less +3 -0
  333. package/es/components/booking/notes/model.js +5 -5
  334. package/es/components/booking/payments/index.js +2 -1
  335. package/es/components/booking/payments/model.js +5 -5
  336. package/es/components/booking/utils.d.ts +17 -5
  337. package/es/components/booking/utils.js +196 -34
  338. package/es/components/eftpos/hooks.d.ts +4 -4
  339. package/es/components/eftpos/pos.d.ts +0 -1
  340. package/es/components/eftposPay/amount.d.ts +1 -2
  341. package/es/components/eftposPay/app.d.ts +0 -1
  342. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  343. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  344. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  345. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  346. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  347. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  348. package/es/components/eftposPay/component/step/index.d.ts +6 -6
  349. package/es/components/eftposPay/component/step/step.d.ts +4 -4
  350. package/es/components/eftposPay/device.d.ts +1 -2
  351. package/es/components/eftposPay/hooks.d.ts +3 -3
  352. package/es/components/eftposPay/pay.d.ts +0 -1
  353. package/es/components/eftposPay/payo/config.js +14 -3
  354. package/es/components/eftposPay/payo/hooks.js +12 -1
  355. package/es/components/eftposPay/store/index.d.ts +6 -6
  356. package/es/components/eftposPay/tip.d.ts +0 -1
  357. package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
  358. package/es/components/eftposPay/windcave/helper.d.ts +1 -1
  359. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  360. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  361. package/es/components/eftposPay/windcave/windcave.js +12 -2
  362. package/es/components/eventBooking/assets/alert-circle.png +0 -0
  363. package/es/components/eventBooking/assets/calendar-heart.svg +5 -0
  364. package/es/components/eventBooking/assets/compass.svg +13 -0
  365. package/es/components/eventBooking/assets/image.svg +5 -0
  366. package/es/components/eventBooking/assets/phone.svg +5 -0
  367. package/es/components/eventBooking/assets/shopping-cart.svg +10 -0
  368. package/es/components/eventBooking/components/ErrorTip/index.d.ts +3 -0
  369. package/es/components/eventBooking/components/ErrorTip/index.js +14 -0
  370. package/es/components/eventBooking/components/ErrorTip/index.less +51 -0
  371. package/es/components/eventBooking/components/OpenCard/index.d.ts +4 -0
  372. package/es/components/eventBooking/components/OpenCard/index.js +65 -0
  373. package/es/components/eventBooking/components/OpenCard/index.less +52 -0
  374. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
  375. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +517 -0
  376. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
  377. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  378. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +46 -0
  379. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  380. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +63 -0
  381. package/es/components/eventBooking/components/Provider/Cart/Item/index.less +87 -0
  382. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +3 -0
  383. package/es/components/eventBooking/components/Provider/Cart/index.js +30 -0
  384. package/es/components/eventBooking/components/Provider/Cart/index.less +2 -0
  385. package/es/components/eventBooking/components/Provider/Content/index.d.ts +3 -0
  386. package/es/components/eventBooking/components/Provider/Content/index.js +65 -0
  387. package/es/components/eventBooking/components/Provider/Content/index.less +31 -0
  388. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +3 -0
  389. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.js +34 -0
  390. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.less +17 -0
  391. package/es/components/eventBooking/components/Provider/Event/index.d.ts +3 -0
  392. package/es/components/eventBooking/components/Provider/Event/index.js +109 -0
  393. package/es/components/eventBooking/components/Provider/Event/index.less +20 -0
  394. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +3 -0
  395. package/es/components/eventBooking/components/Provider/Footer/index.js +76 -0
  396. package/es/components/eventBooking/components/Provider/Footer/index.less +64 -0
  397. package/es/components/eventBooking/components/Provider/Header/index.d.ts +3 -0
  398. package/es/components/eventBooking/components/Provider/Header/index.js +75 -0
  399. package/es/components/eventBooking/components/Provider/Header/index.less +2 -0
  400. package/es/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
  401. package/es/components/eventBooking/components/Provider/Information/index.js +178 -0
  402. package/es/components/eventBooking/components/Provider/Information/index.less +92 -0
  403. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +3 -0
  404. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.js +34 -0
  405. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
  406. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +3 -0
  407. package/es/components/eventBooking/components/Provider/OrderProductModal/index.js +27 -0
  408. package/es/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
  409. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +2 -0
  410. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +31 -0
  411. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +3 -0
  412. package/es/components/eventBooking/components/Provider/Resource/index.js +100 -0
  413. package/es/components/eventBooking/components/Provider/Resource/index.less +46 -0
  414. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +2 -0
  415. package/es/components/eventBooking/components/Provider/SelectHolderModal.js +90 -0
  416. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
  417. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +26 -0
  418. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
  419. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +10 -0
  420. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +65 -0
  421. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +31 -0
  422. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +3 -0
  423. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +69 -0
  424. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
  425. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +12 -0
  426. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +152 -0
  427. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
  428. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
  429. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +20 -0
  430. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
  431. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
  432. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +38 -0
  433. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +86 -0
  434. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
  435. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +28 -0
  436. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
  437. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
  438. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +269 -0
  439. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
  440. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
  441. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +256 -0
  442. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
  443. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +173 -0
  444. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
  445. package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
  446. package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.js +36 -0
  447. package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
  448. package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
  449. package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
  450. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +4 -0
  451. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +60 -0
  452. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +2 -0
  453. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.js +33 -0
  454. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +2 -0
  455. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +33 -0
  456. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  457. package/es/components/eventBooking/components/bookingDetailModal/index.js +394 -0
  458. package/es/components/eventBooking/components/bookingDetailModal/index.less +82 -0
  459. package/es/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
  460. package/es/components/eventBooking/components/bookingServiceList/index.js +52 -0
  461. package/es/components/eventBooking/components/bookingServiceList/index.less +6 -0
  462. package/es/components/eventBooking/components/eventCard/index.d.ts +14 -0
  463. package/es/components/eventBooking/components/eventCard/index.js +116 -0
  464. package/es/components/eventBooking/components/eventCard/index.less +81 -0
  465. package/es/components/eventBooking/components/productCard/index.d.ts +16 -0
  466. package/es/components/eventBooking/components/productCard/index.js +79 -0
  467. package/es/components/eventBooking/components/productCard/index.less +60 -0
  468. package/es/components/eventBooking/components/progressBar/index.d.ts +16 -0
  469. package/es/components/eventBooking/components/progressBar/index.js +109 -0
  470. package/es/components/eventBooking/components/progressBar/index.less +15 -0
  471. package/es/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
  472. package/es/components/eventBooking/components/resourceDisplay/index.js +148 -0
  473. package/es/components/eventBooking/components/resourceDisplay/index.less +96 -0
  474. package/es/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
  475. package/es/components/eventBooking/components/resourceUsability/index.js +44 -0
  476. package/es/components/eventBooking/components/resourceUsability/index.less +40 -0
  477. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +9 -0
  478. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +37 -0
  479. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
  480. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
  481. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +132 -0
  482. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
  483. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +60 -0
  484. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
  485. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
  486. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +59 -0
  487. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
  488. package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +14 -0
  489. package/es/components/eventBooking/components/scheduleCalendar/index.js +151 -0
  490. package/es/components/eventBooking/components/scheduleCalendar/index.less +224 -0
  491. package/es/components/eventBooking/components/selectHolder/index.d.ts +22 -0
  492. package/es/components/eventBooking/components/selectHolder/index.js +118 -0
  493. package/es/components/eventBooking/components/selectHolder/index.less +70 -0
  494. package/es/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
  495. package/es/components/eventBooking/components/timeResourceSelector/index.js +168 -0
  496. package/es/components/eventBooking/components/timeResourceSelector/index.less +73 -0
  497. package/es/components/eventBooking/index.d.ts +3 -0
  498. package/es/components/eventBooking/index.js +58 -0
  499. package/es/components/eventBooking/index.less +22 -0
  500. package/es/components/eventBooking/locales.d.ts +222 -0
  501. package/es/components/eventBooking/locales.js +257 -0
  502. package/es/components/eventBooking/mock.d.ts +627 -0
  503. package/es/components/eventBooking/mock.js +1172 -0
  504. package/es/components/eventBooking/status.d.ts +21 -0
  505. package/es/components/eventBooking/status.js +51 -0
  506. package/es/components/eventBooking/type.d.ts +17 -0
  507. package/es/components/eventBooking/type.js +1 -0
  508. package/es/components/eventBooking/utils.d.ts +45 -0
  509. package/es/components/eventBooking/utils.js +99 -0
  510. package/es/components/index.d.ts +2 -1
  511. package/es/components/index.js +2 -1
  512. package/es/components/listComponent/index.js +5 -5
  513. package/es/components/pay/toB/components/Cache/index.d.ts +10 -0
  514. package/es/components/pay/toB/components/Cache/index.js +94 -0
  515. package/es/components/pay/toB/components/Cache/index.less +41 -0
  516. package/es/components/pay/toB/components/Card/index.d.ts +7 -0
  517. package/es/components/pay/toB/components/Card/index.js +32 -0
  518. package/es/components/pay/toB/components/Card/index.less +26 -0
  519. package/es/components/pay/toB/components/CardGroup/index.d.ts +7 -0
  520. package/es/components/pay/toB/components/CardGroup/index.js +22 -0
  521. package/es/components/pay/toB/components/CardGroup/index.less +18 -0
  522. package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +6 -0
  523. package/es/components/pay/toB/components/ConfirmedPayment/index.js +67 -0
  524. package/es/components/pay/toB/components/ConfirmedPayment/index.less +69 -0
  525. package/es/components/pay/toB/components/Content/Footer.d.ts +7 -0
  526. package/es/components/pay/toB/components/Content/Footer.js +36 -0
  527. package/es/components/pay/toB/components/Content/Header.d.ts +4 -0
  528. package/es/components/pay/toB/components/Content/Header.js +12 -0
  529. package/es/components/pay/toB/components/Content/index.d.ts +4 -0
  530. package/es/components/pay/toB/components/Content/index.js +277 -0
  531. package/es/components/pay/toB/components/Content/index.less +9 -0
  532. package/es/components/pay/toB/components/Content/utils.d.ts +16 -0
  533. package/es/components/pay/toB/components/Content/utils.js +76 -0
  534. package/es/components/pay/toB/components/index.d.ts +5 -0
  535. package/es/components/pay/toB/components/index.js +5 -0
  536. package/es/components/pay/toB/hooks.d.ts +12 -0
  537. package/es/components/pay/toB/hooks.js +30 -0
  538. package/es/components/pay/toB/index.d.ts +3 -0
  539. package/es/components/pay/toB/index.js +24 -0
  540. package/es/components/pay/toB/locales.d.ts +54 -0
  541. package/es/components/pay/toB/locales.js +65 -0
  542. package/es/components/pay/toB/store/context.d.ts +3 -0
  543. package/es/components/pay/toB/store/context.js +2 -0
  544. package/es/components/pay/toB/store/hooks.d.ts +15 -0
  545. package/es/components/pay/toB/store/hooks.js +80 -0
  546. package/es/components/pay/toB/store/index.d.ts +3 -0
  547. package/es/components/pay/toB/store/index.js +3 -0
  548. package/es/components/pay/toB/store/provider.d.ts +4 -0
  549. package/es/components/pay/toB/store/provider.js +77 -0
  550. package/es/components/pay/toB/store/utils.d.ts +13 -0
  551. package/es/components/pay/toB/store/utils.js +66 -0
  552. package/es/components/pay/toB/types/index.d.ts +1 -0
  553. package/es/components/pay/toB/types/index.js +1 -0
  554. package/es/components/pay/toB/types/storeTypes.d.ts +141 -0
  555. package/es/components/pay/toB/types/storeTypes.js +24 -0
  556. package/es/components/pay/toC/PaymentList/index.js +10 -4
  557. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  558. package/es/components/pay/toC/PaymentList/serve.js +9 -3
  559. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  560. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -13
  561. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +30 -13
  562. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
  563. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +3 -2
  564. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  565. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +73 -20
  566. package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
  567. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
  568. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
  569. package/es/components/pay/toC/PaymentMethods/index.js +29 -2
  570. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
  571. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +60 -0
  572. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
  573. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
  574. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +98 -0
  575. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
  576. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
  577. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +34 -0
  578. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
  579. package/es/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
  580. package/es/components/pay/toC/WalletPassBlock/index.js +119 -21
  581. package/es/components/pay/toC/WalletPassBlock/index.less +86 -13
  582. package/es/components/pay/toC/index.js +173 -116
  583. package/es/components/pay/toC/locales.d.ts +69 -3
  584. package/es/components/pay/toC/locales.js +132 -6
  585. package/es/components/pay/toC/model.d.ts +4 -0
  586. package/es/components/pay/toC/model.js +9 -0
  587. package/es/components/pay/toC/serve.d.ts +23 -0
  588. package/es/components/pay/toC/serve.js +36 -4
  589. package/es/components/pay/toC/utils.d.ts +9 -1
  590. package/es/components/pay/toC/utils.js +29 -3
  591. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  592. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  593. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +4 -1
  594. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  595. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  596. package/es/components/productExtension/card/index.js +3 -3
  597. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  598. package/es/components/productExtension/fields/Forms/index.js +12 -12
  599. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
  600. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
  601. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  602. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  603. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  604. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  605. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  606. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  607. package/es/components/productExtension/server.js +2 -2
  608. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  609. package/es/components/productSelect/components/TabProduct/index.js +196 -0
  610. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  611. package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
  612. package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  613. package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
  614. package/es/components/productSelect/components/gridLayout/index.js +28 -0
  615. package/es/components/productSelect/components/gridLayout/index.less +6 -0
  616. package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  617. package/es/components/productSelect/components/pisellPriceText/index.js +44 -0
  618. package/es/components/productSelect/components/productGroup/index.d.ts +38 -0
  619. package/es/components/productSelect/components/productGroup/index.js +171 -0
  620. package/es/components/productSelect/components/productGroup/index.less +227 -0
  621. package/es/components/productSelect/hooks/useToken.d.ts +18 -0
  622. package/es/components/productSelect/hooks/useToken.js +35 -0
  623. package/es/components/productSelect/index.d.ts +24 -0
  624. package/es/components/productSelect/index.js +107 -0
  625. package/es/components/productSelect/index.less +75 -0
  626. package/es/components/productSelect/locales.d.ts +18 -0
  627. package/es/components/productSelect/locales.js +17 -0
  628. package/es/components/productSelect/mock.d.ts +134 -0
  629. package/es/components/productSelect/mock.js +202 -0
  630. package/es/components/productSelect/theme/token.d.ts +17 -0
  631. package/es/components/productSelect/theme/token.js +19 -0
  632. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  633. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  634. package/es/components/schedules/calendar/index.d.ts +0 -1
  635. package/es/components/schedules/calendar/index.js +4 -4
  636. package/es/components/schedules/calendar/index.less +158 -152
  637. package/es/components/schedules/calendar/serve.js +2 -2
  638. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  639. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  640. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  641. package/es/components/schedules/components/ResourceList/index.js +1 -1
  642. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  643. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  644. package/es/components/schedules/components/Search/index.js +5 -5
  645. package/es/components/schedules/model.js +5 -5
  646. package/es/components/schedules/openHours/index.js +1 -1
  647. package/es/components/schedules/openHours/serve.js +2 -2
  648. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  649. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  650. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  651. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  652. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  653. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  654. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  655. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  656. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  657. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  658. package/es/components/schedules/products/list/index.d.ts +0 -1
  659. package/es/components/schedules/products/serve.js +2 -2
  660. package/es/components/schedules/products/utils.js +5 -5
  661. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  662. package/es/components/schedules/resources/detail/index.js +10 -10
  663. package/es/components/schedules/resources/index.d.ts +0 -1
  664. package/es/components/schedules/resources/list/index.d.ts +0 -1
  665. package/es/components/schedules/resources/list/index.js +2 -2
  666. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  667. package/es/components/schedules/resources/serve.js +2 -2
  668. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  669. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  670. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  671. package/es/components/schedules/schedules/index.d.ts +0 -1
  672. package/es/components/schedules/schedules/utils.js +1 -1
  673. package/es/components/schedules/utils.js +4 -4
  674. package/es/components/selectModal/index.js +2 -2
  675. package/es/components/shoppingCart/Provider.d.ts +3 -0
  676. package/es/components/shoppingCart/Provider.js +87 -0
  677. package/es/components/shoppingCart/components/Cart/Product.d.ts +3 -0
  678. package/es/components/shoppingCart/components/Cart/Product.js +95 -0
  679. package/es/components/shoppingCart/components/Cart/index.d.ts +3 -0
  680. package/es/components/shoppingCart/components/Cart/index.js +73 -0
  681. package/es/components/shoppingCart/components/Cart/index.less +68 -0
  682. package/es/components/shoppingCart/components/Empty/index.d.ts +4 -0
  683. package/es/components/shoppingCart/components/Empty/index.js +15 -0
  684. package/es/components/shoppingCart/components/Empty/index.less +19 -0
  685. package/es/components/shoppingCart/components/Render/index.d.ts +4 -0
  686. package/es/components/shoppingCart/components/Render/index.js +69 -0
  687. package/es/components/shoppingCart/components/Render/index.less +17 -0
  688. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
  689. package/es/components/shoppingCart/components/SelectHolderModal/index.js +132 -0
  690. package/es/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
  691. package/es/components/shoppingCart/hooks/useAddService.d.ts +2 -0
  692. package/es/components/shoppingCart/hooks/useAddService.js +29 -0
  693. package/es/components/shoppingCart/hooks/useClearCart.d.ts +2 -0
  694. package/es/components/shoppingCart/hooks/useClearCart.js +58 -0
  695. package/es/components/shoppingCart/hooks/useContext.d.ts +1 -0
  696. package/es/components/shoppingCart/hooks/useContext.js +5 -0
  697. package/es/components/shoppingCart/index.d.ts +3 -0
  698. package/es/components/shoppingCart/index.js +26 -0
  699. package/es/components/shoppingCart/locales.d.ts +33 -0
  700. package/es/components/shoppingCart/locales.js +38 -0
  701. package/es/components/shoppingCart/mock.d.ts +40 -0
  702. package/es/components/shoppingCart/mock.js +40 -0
  703. package/es/components/shoppingCart/status.d.ts +2 -0
  704. package/es/components/shoppingCart/status.js +26 -0
  705. package/es/components/shoppingCart/type.d.ts +48 -0
  706. package/es/components/shoppingCart/type.js +1 -0
  707. package/es/components/shoppingCart/utils.d.ts +63 -0
  708. package/es/components/shoppingCart/utils.js +116 -0
  709. package/es/components/subTotal/index.d.ts +22 -0
  710. package/es/components/subTotal/index.js +234 -0
  711. package/es/components/subTotal/index.less +70 -0
  712. package/es/components/subTotal/locales.d.ts +42 -0
  713. package/es/components/subTotal/locales.js +41 -0
  714. package/es/components/tabProduct/tabs/index.less +13 -3
  715. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  716. package/es/components/ticketBooking/components/addServiceVariant/addService.js +508 -0
  717. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +7 -0
  718. package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
  719. package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  720. package/es/components/ticketBooking/components/menuBar/index.d.ts +4 -0
  721. package/es/components/ticketBooking/components/menuBar/index.js +54 -0
  722. package/es/components/ticketBooking/components/menuBar/index.less +83 -0
  723. package/es/components/ticketBooking/components/notAvailable/index.d.ts +3 -0
  724. package/es/components/ticketBooking/components/notAvailable/index.js +39 -0
  725. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  726. package/es/components/ticketBooking/components/ticketBooking/index.js +955 -0
  727. package/es/components/ticketBooking/components/ticketBooking/index.less +16 -0
  728. package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
  729. package/es/components/ticketBooking/components/timeBar/index.js +115 -0
  730. package/es/components/ticketBooking/components/timeBar/index.less +22 -0
  731. package/es/components/ticketBooking/data.d.ts +58 -0
  732. package/es/components/ticketBooking/data.js +82 -0
  733. package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  734. package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
  735. package/es/components/ticketBooking/index.d.ts +7 -0
  736. package/es/components/ticketBooking/index.js +156 -0
  737. package/es/components/ticketBooking/index.less +4 -0
  738. package/es/components/ticketBooking/locales.d.ts +171 -0
  739. package/es/components/ticketBooking/locales.js +206 -0
  740. package/es/components/ticketBooking/miniRedux.d.ts +22 -0
  741. package/es/components/ticketBooking/miniRedux.js +105 -0
  742. package/es/components/ticketBooking/serve.d.ts +288 -0
  743. package/es/components/ticketBooking/serve.js +1016 -0
  744. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  745. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  746. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  747. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  748. package/es/components/ticketBooking/utils/index.d.ts +23 -0
  749. package/es/components/ticketBooking/utils/index.js +219 -0
  750. package/es/components/wallet/Detail/index.js +21 -15
  751. package/es/components/wallet/DiscountCard/index.less +0 -1
  752. package/es/components/wallet/PointCard/index.less +0 -1
  753. package/es/components/wallet/RechargeableCard/index.less +5 -9
  754. package/es/components/wallet/Voucher/index.js +1 -0
  755. package/es/components/wallet/Voucher/index.less +0 -1
  756. package/es/components/wallet/components/WalletCard.js +2 -2
  757. package/es/components/wallet/index.js +66 -6
  758. package/es/components/wallet/index.less +0 -4
  759. package/es/components/wallet/locales.d.ts +3 -0
  760. package/es/components/wallet/locales.js +3 -0
  761. package/es/components/wallet/model.d.ts +1 -1
  762. package/es/components/wallet/utils/formatUtils.js +1 -1
  763. package/es/components/walletList/index.js +60 -8
  764. package/es/components/walletList/index.less +17 -15
  765. package/es/components/walletList/locales.d.ts +18 -0
  766. package/es/components/walletList/locales.js +17 -0
  767. package/es/components/walletList/serve.d.ts +8 -0
  768. package/es/components/walletList/serve.js +38 -0
  769. package/es/components/walletList/status.d.ts +38 -0
  770. package/es/components/walletList/status.js +47 -0
  771. package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.js +1 -1
  772. package/es/components/workSpaceList/components/AppearanceEdit/constants.js +1 -11
  773. package/es/components/workSpaceList/components/Card/constants.js +1 -2
  774. package/es/components/workSpaceList/components/EditableString/index.js +1 -1
  775. package/es/components/workSpaceList/components/SearchBar/index.js +1 -4
  776. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.js +1 -1
  777. package/es/components/workSpaceList/components/Sort/index.js +1 -1
  778. package/es/components/workSpaceList/components/WorkspaceItem/index.js +1 -1
  779. package/es/components/workSpaceList/server.d.ts +3 -3
  780. package/es/hooks/useComponents.js +1 -1
  781. package/es/hooks/useEngineContext.d.ts +1 -0
  782. package/es/hooks/useEngineContext.js +7 -0
  783. package/es/hooks/useLocale.d.ts +2 -0
  784. package/es/hooks/useLocale.js +7 -0
  785. package/es/hooks/useLoginUser.d.ts +2 -0
  786. package/es/hooks/useLoginUser.js +19 -0
  787. package/es/index.d.ts +18 -0
  788. package/es/index.js +19 -1
  789. package/es/utils/date.d.ts +11 -0
  790. package/es/utils/date.js +49 -0
  791. package/es/utils/tasks/index.d.ts +16 -0
  792. package/es/utils/tasks/index.js +114 -0
  793. package/es/utils/tasks/type.d.ts +4 -0
  794. package/es/utils/tasks/type.js +1 -0
  795. package/lib/businessModel/SalesModel/Sales/index.d.ts +24 -0
  796. package/lib/businessModel/SalesModel/Sales/index.js +104 -0
  797. package/lib/businessModel/SalesModel/hooks/index.d.ts +1 -0
  798. package/lib/businessModel/SalesModel/hooks/index.js +34 -0
  799. package/lib/businessModel/SalesModel/index.d.ts +4 -0
  800. package/lib/businessModel/SalesModel/index.js +51 -0
  801. package/lib/businessModel/index.d.ts +0 -0
  802. package/lib/businessModel/index.js +0 -0
  803. package/lib/components/Sales/Cart/index.d.ts +53 -0
  804. package/lib/components/Sales/Cart/index.js +512 -0
  805. package/lib/components/Sales/Cart/serve.d.ts +2 -0
  806. package/lib/components/Sales/Cart/serve.js +37 -0
  807. package/lib/components/Sales/Cart/types.d.ts +31 -0
  808. package/lib/components/Sales/Cart/types.js +17 -0
  809. package/lib/components/Sales/Cart/utils.d.ts +23 -0
  810. package/lib/components/Sales/Cart/utils.js +149 -0
  811. package/lib/components/Sales/Checkout/index.d.ts +33 -0
  812. package/lib/components/Sales/Checkout/index.js +130 -0
  813. package/lib/components/Sales/Checkout/serve.d.ts +2 -0
  814. package/lib/components/Sales/Checkout/serve.js +37 -0
  815. package/lib/components/Sales/Checkout/utils.d.ts +35 -0
  816. package/lib/components/Sales/Checkout/utils.js +102 -0
  817. package/lib/components/Sales/Customer/index.d.ts +24 -0
  818. package/lib/components/Sales/Customer/index.js +92 -0
  819. package/lib/components/Sales/Event/Detail.d.ts +29 -0
  820. package/lib/components/Sales/Event/Detail.js +252 -0
  821. package/lib/components/Sales/Event/index.d.ts +30 -0
  822. package/lib/components/Sales/Event/index.js +132 -0
  823. package/lib/components/Sales/Event/serve.d.ts +39 -0
  824. package/lib/components/Sales/Event/serve.js +57 -0
  825. package/lib/components/Sales/Holder/index.d.ts +33 -0
  826. package/lib/components/Sales/Holder/index.js +210 -0
  827. package/lib/components/Sales/Holder/serve.d.ts +8 -0
  828. package/lib/components/Sales/Holder/serve.js +37 -0
  829. package/lib/components/Sales/Init/index.d.ts +25 -0
  830. package/lib/components/Sales/Init/index.js +129 -0
  831. package/lib/components/Sales/Init/serve.d.ts +3 -0
  832. package/lib/components/Sales/Init/serve.js +34 -0
  833. package/lib/components/Sales/Resource/index.d.ts +26 -0
  834. package/lib/components/Sales/Resource/index.js +133 -0
  835. package/lib/components/Sales/Resource/serve.d.ts +5 -0
  836. package/lib/components/Sales/Resource/serve.js +32 -0
  837. package/lib/components/Sales/Step/index.d.ts +39 -0
  838. package/lib/components/Sales/Step/index.js +179 -0
  839. package/lib/components/Sales/Summary/index.d.ts +25 -0
  840. package/lib/components/Sales/Summary/index.js +83 -0
  841. package/lib/components/Sales/Summary/serve.d.ts +0 -0
  842. package/lib/components/Sales/Summary/serve.js +0 -0
  843. package/lib/components/Sales/Summary/utils.d.ts +36 -0
  844. package/lib/components/Sales/Summary/utils.js +81 -0
  845. package/lib/components/Sales/hooks/index.d.ts +1 -0
  846. package/lib/components/Sales/hooks/index.js +31 -0
  847. package/lib/components/Sales/index.d.ts +20 -0
  848. package/lib/components/Sales/index.js +79 -0
  849. package/lib/components/Sales/utils/index.d.ts +1 -0
  850. package/lib/components/Sales/utils/index.js +43 -0
  851. package/lib/components/appointmentBooking/assets/alert-circle.png +0 -0
  852. package/lib/components/appointmentBooking/assets/calendar-heart.svg +5 -0
  853. package/lib/components/appointmentBooking/assets/compass.svg +13 -0
  854. package/lib/components/appointmentBooking/assets/guests.svg +1 -0
  855. package/lib/components/appointmentBooking/assets/image.svg +5 -0
  856. package/lib/components/appointmentBooking/assets/phone.svg +5 -0
  857. package/lib/components/appointmentBooking/assets/resource.svg +1 -0
  858. package/lib/components/appointmentBooking/assets/shopping-cart.svg +10 -0
  859. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +7 -0
  860. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +113 -0
  861. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.less +0 -0
  862. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +3 -0
  863. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +79 -0
  864. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
  865. package/lib/components/appointmentBooking/components/Cart/Item/index.js +212 -0
  866. package/lib/components/appointmentBooking/components/Cart/Item/index.less +108 -0
  867. package/lib/components/appointmentBooking/components/Cart/index.d.ts +3 -0
  868. package/lib/components/appointmentBooking/components/Cart/index.js +60 -0
  869. package/lib/components/appointmentBooking/components/Cart/index.less +2 -0
  870. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
  871. package/lib/components/appointmentBooking/components/Cart/utils.js +125 -0
  872. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  873. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +155 -0
  874. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  875. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  876. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
  877. package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
  878. package/lib/components/appointmentBooking/components/Content/index.js +221 -0
  879. package/lib/components/appointmentBooking/components/Content/index.less +113 -0
  880. package/lib/components/appointmentBooking/components/Date/index.d.ts +4 -0
  881. package/lib/components/appointmentBooking/components/Date/index.js +247 -0
  882. package/lib/components/appointmentBooking/components/Date/index.less +142 -0
  883. package/lib/components/appointmentBooking/components/Date/state.d.ts +63 -0
  884. package/lib/components/appointmentBooking/components/Date/state.js +202 -0
  885. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  886. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  887. package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
  888. package/lib/components/appointmentBooking/components/Footer/index.d.ts +3 -0
  889. package/lib/components/appointmentBooking/components/Footer/index.js +78 -0
  890. package/lib/components/appointmentBooking/components/Footer/index.less +64 -0
  891. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  892. package/lib/components/appointmentBooking/components/Form/index.js +127 -0
  893. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  894. package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  895. package/lib/components/appointmentBooking/components/Form/utils.js +49 -0
  896. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  897. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
  898. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  899. package/lib/components/appointmentBooking/components/Guest/index.d.ts +4 -0
  900. package/lib/components/appointmentBooking/components/Guest/index.js +166 -0
  901. package/lib/components/appointmentBooking/components/Guest/index.less +92 -0
  902. package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
  903. package/lib/components/appointmentBooking/components/Header/index.js +151 -0
  904. package/lib/components/appointmentBooking/components/Header/index.less +0 -0
  905. package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  906. package/lib/components/appointmentBooking/components/Resource/index.js +225 -0
  907. package/lib/components/appointmentBooking/components/Resource/index.less +10 -0
  908. package/lib/components/appointmentBooking/components/Resource/utils.d.ts +5 -0
  909. package/lib/components/appointmentBooking/components/Resource/utils.js +36 -0
  910. package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
  911. package/lib/components/appointmentBooking/components/Services/index.js +193 -0
  912. package/lib/components/appointmentBooking/components/Services/index.less +3 -0
  913. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
  914. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +102 -0
  915. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +33 -0
  916. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  917. package/lib/components/appointmentBooking/components/Voucher/index.js +241 -0
  918. package/lib/components/appointmentBooking/components/Voucher/index.less +116 -0
  919. package/lib/components/appointmentBooking/context.d.ts +35 -0
  920. package/lib/components/appointmentBooking/context.js +192 -0
  921. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  922. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +131 -0
  923. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +18 -0
  924. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  925. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  926. package/lib/components/appointmentBooking/deposit/index.less +57 -0
  927. package/lib/components/appointmentBooking/hooks.d.ts +106 -0
  928. package/lib/components/appointmentBooking/hooks.js +559 -0
  929. package/lib/components/appointmentBooking/index.d.ts +3 -0
  930. package/lib/components/appointmentBooking/index.js +80 -0
  931. package/lib/components/appointmentBooking/index.less +23 -0
  932. package/lib/components/appointmentBooking/locales.d.ts +360 -0
  933. package/lib/components/appointmentBooking/locales.js +383 -0
  934. package/lib/components/appointmentBooking/mock.d.ts +627 -0
  935. package/lib/components/appointmentBooking/mock.js +1352 -0
  936. package/lib/components/appointmentBooking/status.d.ts +21 -0
  937. package/lib/components/appointmentBooking/status.js +70 -0
  938. package/lib/components/appointmentBooking/type.d.ts +17 -0
  939. package/lib/components/appointmentBooking/type.js +17 -0
  940. package/lib/components/appointmentBooking/utils.d.ts +203 -0
  941. package/lib/components/appointmentBooking/utils.js +519 -0
  942. package/lib/components/booking/addons/index.js +53 -31
  943. package/lib/components/booking/addons/model.js +3 -0
  944. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  945. package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
  946. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  947. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +5 -1
  948. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
  949. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  950. package/lib/components/booking/components/customSelect/index.d.ts +1 -0
  951. package/lib/components/booking/components/customSelect/index.js +8 -2
  952. package/lib/components/booking/components/drawer/index.js +2 -2
  953. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  954. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
  955. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +60 -0
  956. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  957. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  958. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  959. package/lib/components/booking/components/footer/amount.js +30 -8
  960. package/lib/components/booking/components/footer/index.d.ts +0 -1
  961. package/lib/components/booking/components/footer/index.js +248 -118
  962. package/lib/components/booking/components/footer/index.less +6 -1
  963. package/lib/components/booking/components/footer/serve.d.ts +2 -0
  964. package/lib/components/booking/components/footer/serve.js +12 -0
  965. package/lib/components/booking/components/footer/utils.d.ts +21 -0
  966. package/lib/components/booking/components/footer/utils.js +274 -51
  967. package/lib/components/booking/components/voucher/index.d.ts +3 -0
  968. package/lib/components/booking/components/voucher/index.js +305 -0
  969. package/lib/components/booking/components/voucher/index.less +87 -0
  970. package/lib/components/booking/components/voucher/utils.d.ts +4 -0
  971. package/lib/components/booking/components/voucher/utils.js +43 -0
  972. package/lib/components/booking/deposit/DepositItem/index.js +1 -0
  973. package/lib/components/booking/deposit/index.d.ts +0 -1
  974. package/lib/components/booking/deposit/index.js +5 -3
  975. package/lib/components/booking/forms/footer.d.ts +6 -0
  976. package/lib/components/booking/forms/footer.js +81 -0
  977. package/lib/components/booking/forms/forms.d.ts +4 -0
  978. package/lib/components/booking/forms/forms.js +13 -3
  979. package/lib/components/booking/forms/index.d.ts +1 -1
  980. package/lib/components/booking/forms/index.js +4 -2
  981. package/lib/components/booking/forms/index.less +7 -0
  982. package/lib/components/booking/forms/sendModal/index.d.ts +27 -0
  983. package/lib/components/booking/forms/sendModal/index.js +128 -0
  984. package/lib/components/booking/forms/sendModal/index.less +9 -0
  985. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +9 -0
  986. package/lib/components/booking/forms/sendModal/useSendModal.js +70 -0
  987. package/lib/components/booking/forms/serve.d.ts +9 -0
  988. package/lib/components/booking/forms/serve.js +5 -2
  989. package/lib/components/booking/forms/single/index.d.ts +1 -2
  990. package/lib/components/booking/forms/single/index.js +35 -1
  991. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  992. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  993. package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
  994. package/lib/components/booking/hooks/useQuotation.d.ts +5 -0
  995. package/lib/components/booking/hooks/useQuotation.js +214 -0
  996. package/lib/components/booking/info/Provider.d.ts +0 -0
  997. package/lib/components/booking/info/Provider.js +0 -0
  998. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  999. package/lib/components/booking/info/addServiceVariant/index.js +8 -3
  1000. package/lib/components/booking/info/client/index.js +72 -8
  1001. package/lib/components/booking/info/client/index.less +39 -0
  1002. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  1003. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +8 -1
  1004. package/lib/components/booking/info/clientVariant/utils.d.ts +1 -0
  1005. package/lib/components/booking/info/clientVariant/utils.js +34 -0
  1006. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  1007. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +19 -10
  1008. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
  1009. package/lib/components/booking/info/clientVariant/vertical/index.js +123 -22
  1010. package/lib/components/booking/info/clientVariant/vertical/index.less +18 -0
  1011. package/lib/components/booking/info/date/index.d.ts +0 -1
  1012. package/lib/components/booking/info/dateRange/index.d.ts +4 -0
  1013. package/lib/components/booking/info/dateRange/index.js +111 -0
  1014. package/lib/components/booking/info/dateRange/index.less +21 -0
  1015. package/lib/components/booking/info/header/index.d.ts +0 -1
  1016. package/lib/components/booking/info/hooks/useAddHolder.d.ts +9 -0
  1017. package/lib/components/booking/info/hooks/useAddHolder.js +145 -0
  1018. package/lib/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
  1019. package/lib/components/booking/info/hooks/useGetHolderList.js +61 -0
  1020. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  1021. package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
  1022. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +10 -0
  1023. package/lib/components/booking/info/hooks/useInfoHolder.js +87 -0
  1024. package/lib/components/booking/info/index.d.ts +0 -1
  1025. package/lib/components/booking/info/index.js +9 -5
  1026. package/lib/components/booking/info/main.js +34 -23
  1027. package/lib/components/booking/info/model.js +3 -0
  1028. package/lib/components/booking/info/notes/index.d.ts +0 -1
  1029. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
  1030. package/lib/components/booking/info/pet/ChangePetModal/index.js +121 -0
  1031. package/lib/components/booking/info/pet/ChangePetModal/index.less +4 -0
  1032. package/lib/components/booking/info/pet/index.d.ts +1 -1
  1033. package/lib/components/booking/info/pet/index.js +155 -55
  1034. package/lib/components/booking/info/pet/serve.d.ts +1 -0
  1035. package/lib/components/booking/info/pet/serve.js +33 -0
  1036. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  1037. package/lib/components/booking/info/service/Lists.js +120 -0
  1038. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  1039. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  1040. package/lib/components/booking/info/service/addService/index.js +148 -115
  1041. package/lib/components/booking/info/service/addService/index.less +13 -3
  1042. package/lib/components/booking/info/service/addService/utils.d.ts +12 -2
  1043. package/lib/components/booking/info/service/addService/utils.js +57 -10
  1044. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  1045. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +4 -0
  1046. package/lib/components/booking/info/service/editService/BookingList/index.js +55 -0
  1047. package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
  1048. package/lib/components/booking/info/service/editService/EditTabs/index.js +75 -0
  1049. package/lib/components/booking/info/service/editService/index.d.ts +1 -1
  1050. package/lib/components/booking/info/service/editService/index.js +500 -207
  1051. package/lib/components/booking/info/service/editService/index.less +18 -13
  1052. package/lib/components/booking/info/service/index.js +5 -3
  1053. package/lib/components/booking/info/service/serve.d.ts +19 -0
  1054. package/lib/components/booking/info/service/serve.js +10 -2
  1055. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  1056. package/lib/components/booking/info/service/serviceList/index.js +1 -0
  1057. package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
  1058. package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +70 -0
  1059. package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
  1060. package/lib/components/booking/info/service/serviceManager/index.js +216 -0
  1061. package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  1062. package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
  1063. package/lib/components/booking/info/service2/Group/utils.d.ts +14 -0
  1064. package/lib/components/booking/info/service2/Group/utils.js +143 -0
  1065. package/lib/components/booking/info/service2/Lists.d.ts +3 -0
  1066. package/lib/components/booking/info/service2/Lists.js +116 -0
  1067. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
  1068. package/lib/components/booking/info/service2/hooks/useSelectPet.js +56 -0
  1069. package/lib/components/booking/info/service2/index.d.ts +6 -0
  1070. package/lib/components/booking/info/service2/index.js +77 -0
  1071. package/lib/components/booking/info/service2/status.d.ts +31 -0
  1072. package/lib/components/booking/info/service2/status.js +81 -0
  1073. package/lib/components/booking/info/service2/utils.d.ts +247 -0
  1074. package/lib/components/booking/info/service2/utils.js +998 -0
  1075. package/lib/components/booking/info/utils.d.ts +26 -0
  1076. package/lib/components/booking/info/utils.js +137 -1
  1077. package/lib/components/booking/info2/index.js +12 -4
  1078. package/lib/components/booking/info2/serve.d.ts +2 -2
  1079. package/lib/components/booking/info2/serve.js +3 -10
  1080. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  1081. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  1082. package/lib/components/booking/info2/service/addService/index.js +68 -37
  1083. package/lib/components/booking/info2/service/addService/utils.d.ts +20 -3
  1084. package/lib/components/booking/info2/service/addService/utils.js +108 -27
  1085. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  1086. package/lib/components/booking/info2/service/addTimeModal/index.js +5 -6
  1087. package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +1 -2
  1088. package/lib/components/booking/info2/service/editService/Resources/index.js +21 -4
  1089. package/lib/components/booking/info2/service/editService/index.js +152 -51
  1090. package/lib/components/booking/info2/service/editService/utils.d.ts +4 -2
  1091. package/lib/components/booking/info2/service/editService/utils.js +48 -0
  1092. package/lib/components/booking/info2/service/index.js +20 -28
  1093. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  1094. package/lib/components/booking/info2/utils.d.ts +4 -0
  1095. package/lib/components/booking/info2/utils.js +66 -0
  1096. package/lib/components/booking/info2/utilsByBooking.d.ts +2 -1
  1097. package/lib/components/booking/info2/utilsByBooking.js +29 -14
  1098. package/lib/components/booking/locales.d.ts +153 -0
  1099. package/lib/components/booking/locales.js +174 -3
  1100. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  1101. package/lib/components/booking/materiels/holder/index.d.ts +7 -0
  1102. package/lib/components/booking/materiels/holder/index.js +64 -0
  1103. package/lib/components/booking/model.d.ts +5 -1
  1104. package/lib/components/booking/model.js +4 -2
  1105. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  1106. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  1107. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  1108. package/lib/components/booking/notes/addNote/index.js +1 -1
  1109. package/lib/components/booking/notes/addNote/index.less +3 -0
  1110. package/lib/components/booking/payments/index.js +2 -2
  1111. package/lib/components/booking/utils.d.ts +17 -5
  1112. package/lib/components/booking/utils.js +141 -25
  1113. package/lib/components/eftpos/hooks.d.ts +4 -4
  1114. package/lib/components/eftpos/pos.d.ts +0 -1
  1115. package/lib/components/eftposPay/amount.d.ts +1 -2
  1116. package/lib/components/eftposPay/app.d.ts +0 -1
  1117. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  1118. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  1119. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  1120. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  1121. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  1122. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  1123. package/lib/components/eftposPay/component/step/index.d.ts +6 -6
  1124. package/lib/components/eftposPay/component/step/step.d.ts +4 -4
  1125. package/lib/components/eftposPay/device.d.ts +1 -2
  1126. package/lib/components/eftposPay/hooks.d.ts +3 -3
  1127. package/lib/components/eftposPay/pay.d.ts +0 -1
  1128. package/lib/components/eftposPay/payo/config.js +12 -1
  1129. package/lib/components/eftposPay/payo/hooks.js +10 -0
  1130. package/lib/components/eftposPay/store/index.d.ts +6 -6
  1131. package/lib/components/eftposPay/tip.d.ts +0 -1
  1132. package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
  1133. package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
  1134. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  1135. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  1136. package/lib/components/eftposPay/windcave/windcave.js +11 -0
  1137. package/lib/components/eventBooking/assets/alert-circle.png +0 -0
  1138. package/lib/components/eventBooking/assets/calendar-heart.svg +5 -0
  1139. package/lib/components/eventBooking/assets/compass.svg +13 -0
  1140. package/lib/components/eventBooking/assets/image.svg +5 -0
  1141. package/lib/components/eventBooking/assets/phone.svg +5 -0
  1142. package/lib/components/eventBooking/assets/shopping-cart.svg +10 -0
  1143. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +3 -0
  1144. package/lib/components/eventBooking/components/ErrorTip/index.js +30 -0
  1145. package/lib/components/eventBooking/components/ErrorTip/index.less +51 -0
  1146. package/lib/components/eventBooking/components/OpenCard/index.d.ts +4 -0
  1147. package/lib/components/eventBooking/components/OpenCard/index.js +90 -0
  1148. package/lib/components/eventBooking/components/OpenCard/index.less +52 -0
  1149. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
  1150. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +295 -0
  1151. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
  1152. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  1153. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +82 -0
  1154. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  1155. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +92 -0
  1156. package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +87 -0
  1157. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +3 -0
  1158. package/lib/components/eventBooking/components/Provider/Cart/index.js +59 -0
  1159. package/lib/components/eventBooking/components/Provider/Cart/index.less +2 -0
  1160. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +3 -0
  1161. package/lib/components/eventBooking/components/Provider/Content/index.js +90 -0
  1162. package/lib/components/eventBooking/components/Provider/Content/index.less +31 -0
  1163. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +3 -0
  1164. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.js +60 -0
  1165. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.less +17 -0
  1166. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +3 -0
  1167. package/lib/components/eventBooking/components/Provider/Event/index.js +112 -0
  1168. package/lib/components/eventBooking/components/Provider/Event/index.less +20 -0
  1169. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +3 -0
  1170. package/lib/components/eventBooking/components/Provider/Footer/index.js +87 -0
  1171. package/lib/components/eventBooking/components/Provider/Footer/index.less +64 -0
  1172. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +3 -0
  1173. package/lib/components/eventBooking/components/Provider/Header/index.js +80 -0
  1174. package/lib/components/eventBooking/components/Provider/Header/index.less +2 -0
  1175. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
  1176. package/lib/components/eventBooking/components/Provider/Information/index.js +151 -0
  1177. package/lib/components/eventBooking/components/Provider/Information/index.less +92 -0
  1178. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +3 -0
  1179. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.js +67 -0
  1180. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
  1181. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +3 -0
  1182. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.js +57 -0
  1183. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
  1184. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +2 -0
  1185. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +62 -0
  1186. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +3 -0
  1187. package/lib/components/eventBooking/components/Provider/Resource/index.js +103 -0
  1188. package/lib/components/eventBooking/components/Provider/Resource/index.less +46 -0
  1189. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +2 -0
  1190. package/lib/components/eventBooking/components/Provider/SelectHolderModal.js +97 -0
  1191. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
  1192. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +55 -0
  1193. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
  1194. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +10 -0
  1195. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +78 -0
  1196. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +31 -0
  1197. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +3 -0
  1198. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +86 -0
  1199. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
  1200. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +12 -0
  1201. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +121 -0
  1202. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
  1203. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
  1204. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +37 -0
  1205. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
  1206. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
  1207. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +58 -0
  1208. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +86 -0
  1209. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
  1210. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +55 -0
  1211. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
  1212. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
  1213. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +196 -0
  1214. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
  1215. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
  1216. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +198 -0
  1217. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
  1218. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +122 -0
  1219. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
  1220. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
  1221. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.js +70 -0
  1222. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
  1223. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
  1224. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
  1225. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +4 -0
  1226. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +90 -0
  1227. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +2 -0
  1228. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.js +66 -0
  1229. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +2 -0
  1230. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +71 -0
  1231. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  1232. package/lib/components/eventBooking/components/bookingDetailModal/index.js +303 -0
  1233. package/lib/components/eventBooking/components/bookingDetailModal/index.less +82 -0
  1234. package/lib/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
  1235. package/lib/components/eventBooking/components/bookingServiceList/index.js +79 -0
  1236. package/lib/components/eventBooking/components/bookingServiceList/index.less +6 -0
  1237. package/lib/components/eventBooking/components/eventCard/index.d.ts +14 -0
  1238. package/lib/components/eventBooking/components/eventCard/index.js +124 -0
  1239. package/lib/components/eventBooking/components/eventCard/index.less +81 -0
  1240. package/lib/components/eventBooking/components/productCard/index.d.ts +16 -0
  1241. package/lib/components/eventBooking/components/productCard/index.js +77 -0
  1242. package/lib/components/eventBooking/components/productCard/index.less +60 -0
  1243. package/lib/components/eventBooking/components/progressBar/index.d.ts +16 -0
  1244. package/lib/components/eventBooking/components/progressBar/index.js +115 -0
  1245. package/lib/components/eventBooking/components/progressBar/index.less +15 -0
  1246. package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
  1247. package/lib/components/eventBooking/components/resourceDisplay/index.js +116 -0
  1248. package/lib/components/eventBooking/components/resourceDisplay/index.less +96 -0
  1249. package/lib/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
  1250. package/lib/components/eventBooking/components/resourceUsability/index.js +76 -0
  1251. package/lib/components/eventBooking/components/resourceUsability/index.less +40 -0
  1252. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +9 -0
  1253. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +73 -0
  1254. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
  1255. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
  1256. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +136 -0
  1257. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
  1258. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +75 -0
  1259. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
  1260. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
  1261. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +64 -0
  1262. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
  1263. package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +14 -0
  1264. package/lib/components/eventBooking/components/scheduleCalendar/index.js +131 -0
  1265. package/lib/components/eventBooking/components/scheduleCalendar/index.less +224 -0
  1266. package/lib/components/eventBooking/components/selectHolder/index.d.ts +22 -0
  1267. package/lib/components/eventBooking/components/selectHolder/index.js +106 -0
  1268. package/lib/components/eventBooking/components/selectHolder/index.less +70 -0
  1269. package/lib/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
  1270. package/lib/components/eventBooking/components/timeResourceSelector/index.js +146 -0
  1271. package/lib/components/eventBooking/components/timeResourceSelector/index.less +73 -0
  1272. package/lib/components/eventBooking/index.d.ts +3 -0
  1273. package/lib/components/eventBooking/index.js +78 -0
  1274. package/lib/components/eventBooking/index.less +22 -0
  1275. package/lib/components/eventBooking/locales.d.ts +222 -0
  1276. package/lib/components/eventBooking/locales.js +245 -0
  1277. package/lib/components/eventBooking/mock.d.ts +627 -0
  1278. package/lib/components/eventBooking/mock.js +1352 -0
  1279. package/lib/components/eventBooking/status.d.ts +21 -0
  1280. package/lib/components/eventBooking/status.js +70 -0
  1281. package/lib/components/eventBooking/type.d.ts +17 -0
  1282. package/lib/components/eventBooking/type.js +17 -0
  1283. package/lib/components/eventBooking/utils.d.ts +45 -0
  1284. package/lib/components/eventBooking/utils.js +92 -0
  1285. package/lib/components/index.d.ts +2 -1
  1286. package/lib/components/index.js +3 -0
  1287. package/lib/components/pay/toB/components/Cache/index.d.ts +10 -0
  1288. package/lib/components/pay/toB/components/Cache/index.js +108 -0
  1289. package/lib/components/pay/toB/components/Cache/index.less +41 -0
  1290. package/lib/components/pay/toB/components/Card/index.d.ts +7 -0
  1291. package/lib/components/pay/toB/components/Card/index.js +66 -0
  1292. package/lib/components/pay/toB/components/Card/index.less +26 -0
  1293. package/lib/components/pay/toB/components/CardGroup/index.d.ts +7 -0
  1294. package/lib/components/pay/toB/components/CardGroup/index.js +43 -0
  1295. package/lib/components/pay/toB/components/CardGroup/index.less +18 -0
  1296. package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +6 -0
  1297. package/lib/components/pay/toB/components/ConfirmedPayment/index.js +77 -0
  1298. package/lib/components/pay/toB/components/ConfirmedPayment/index.less +69 -0
  1299. package/lib/components/pay/toB/components/Content/Footer.d.ts +7 -0
  1300. package/lib/components/pay/toB/components/Content/Footer.js +63 -0
  1301. package/lib/components/pay/toB/components/Content/Header.d.ts +4 -0
  1302. package/lib/components/pay/toB/components/Content/Header.js +40 -0
  1303. package/lib/components/pay/toB/components/Content/index.d.ts +4 -0
  1304. package/lib/components/pay/toB/components/Content/index.js +209 -0
  1305. package/lib/components/pay/toB/components/Content/index.less +9 -0
  1306. package/lib/components/pay/toB/components/Content/utils.d.ts +16 -0
  1307. package/lib/components/pay/toB/components/Content/utils.js +91 -0
  1308. package/lib/components/pay/toB/components/index.d.ts +5 -0
  1309. package/lib/components/pay/toB/components/index.js +51 -0
  1310. package/lib/components/pay/toB/hooks.d.ts +12 -0
  1311. package/lib/components/pay/toB/hooks.js +60 -0
  1312. package/lib/components/pay/toB/index.d.ts +3 -0
  1313. package/lib/components/pay/toB/index.js +54 -0
  1314. package/lib/components/pay/toB/locales.d.ts +54 -0
  1315. package/lib/components/pay/toB/locales.js +77 -0
  1316. package/lib/components/pay/toB/store/context.d.ts +3 -0
  1317. package/lib/components/pay/toB/store/context.js +32 -0
  1318. package/lib/components/pay/toB/store/hooks.d.ts +15 -0
  1319. package/lib/components/pay/toB/store/hooks.js +85 -0
  1320. package/lib/components/pay/toB/store/index.d.ts +3 -0
  1321. package/lib/components/pay/toB/store/index.js +27 -0
  1322. package/lib/components/pay/toB/store/provider.d.ts +4 -0
  1323. package/lib/components/pay/toB/store/provider.js +70 -0
  1324. package/lib/components/pay/toB/store/utils.d.ts +13 -0
  1325. package/lib/components/pay/toB/store/utils.js +72 -0
  1326. package/lib/components/pay/toB/types/index.d.ts +1 -0
  1327. package/lib/components/pay/toB/types/index.js +23 -0
  1328. package/lib/components/pay/toB/types/storeTypes.d.ts +141 -0
  1329. package/lib/components/pay/toB/types/storeTypes.js +36 -0
  1330. package/lib/components/pay/toC/PaymentList/index.js +11 -6
  1331. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  1332. package/lib/components/pay/toC/PaymentList/serve.js +6 -3
  1333. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  1334. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +10 -1
  1335. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +10 -1
  1336. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
  1337. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +2 -2
  1338. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  1339. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +52 -11
  1340. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
  1341. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
  1342. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
  1343. package/lib/components/pay/toC/PaymentMethods/index.js +30 -6
  1344. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
  1345. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +87 -0
  1346. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
  1347. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
  1348. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +103 -0
  1349. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
  1350. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
  1351. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +52 -0
  1352. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
  1353. package/lib/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
  1354. package/lib/components/pay/toC/WalletPassBlock/index.js +115 -20
  1355. package/lib/components/pay/toC/WalletPassBlock/index.less +86 -13
  1356. package/lib/components/pay/toC/index.js +55 -22
  1357. package/lib/components/pay/toC/locales.d.ts +69 -3
  1358. package/lib/components/pay/toC/locales.js +72 -6
  1359. package/lib/components/pay/toC/model.d.ts +4 -0
  1360. package/lib/components/pay/toC/model.js +10 -0
  1361. package/lib/components/pay/toC/serve.d.ts +23 -0
  1362. package/lib/components/pay/toC/serve.js +13 -7
  1363. package/lib/components/pay/toC/utils.d.ts +9 -1
  1364. package/lib/components/pay/toC/utils.js +23 -3
  1365. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  1366. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  1367. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +4 -1
  1368. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  1369. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  1370. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
  1371. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
  1372. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  1373. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  1374. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  1375. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  1376. package/lib/components/productSelect/components/TabProduct/index.js +189 -0
  1377. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  1378. package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
  1379. package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  1380. package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
  1381. package/lib/components/productSelect/components/gridLayout/index.js +58 -0
  1382. package/lib/components/productSelect/components/gridLayout/index.less +6 -0
  1383. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  1384. package/lib/components/productSelect/components/pisellPriceText/index.js +78 -0
  1385. package/lib/components/productSelect/components/productGroup/index.d.ts +38 -0
  1386. package/lib/components/productSelect/components/productGroup/index.js +144 -0
  1387. package/lib/components/productSelect/components/productGroup/index.less +227 -0
  1388. package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
  1389. package/lib/components/productSelect/hooks/useToken.js +51 -0
  1390. package/lib/components/productSelect/index.d.ts +24 -0
  1391. package/lib/components/productSelect/index.js +133 -0
  1392. package/lib/components/productSelect/index.less +75 -0
  1393. package/lib/components/productSelect/locales.d.ts +18 -0
  1394. package/lib/components/productSelect/locales.js +41 -0
  1395. package/lib/components/productSelect/mock.d.ts +134 -0
  1396. package/lib/components/productSelect/mock.js +276 -0
  1397. package/lib/components/productSelect/theme/token.d.ts +17 -0
  1398. package/lib/components/productSelect/theme/token.js +47 -0
  1399. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  1400. package/lib/components/schedules/calendar/index.d.ts +0 -1
  1401. package/lib/components/schedules/calendar/index.less +158 -152
  1402. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  1403. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  1404. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  1405. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  1406. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  1407. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  1408. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  1409. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  1410. package/lib/components/schedules/products/list/index.d.ts +0 -1
  1411. package/lib/components/schedules/resources/index.d.ts +0 -1
  1412. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  1413. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  1414. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  1415. package/lib/components/schedules/schedules/index.d.ts +0 -1
  1416. package/lib/components/schedules/schedules/utils.js +1 -1
  1417. package/lib/components/schedules/utils.js +1 -1
  1418. package/lib/components/shoppingCart/Provider.d.ts +3 -0
  1419. package/lib/components/shoppingCart/Provider.js +111 -0
  1420. package/lib/components/shoppingCart/components/Cart/Product.d.ts +3 -0
  1421. package/lib/components/shoppingCart/components/Cart/Product.js +104 -0
  1422. package/lib/components/shoppingCart/components/Cart/index.d.ts +3 -0
  1423. package/lib/components/shoppingCart/components/Cart/index.js +85 -0
  1424. package/lib/components/shoppingCart/components/Cart/index.less +68 -0
  1425. package/lib/components/shoppingCart/components/Empty/index.d.ts +4 -0
  1426. package/lib/components/shoppingCart/components/Empty/index.js +43 -0
  1427. package/lib/components/shoppingCart/components/Empty/index.less +19 -0
  1428. package/lib/components/shoppingCart/components/Render/index.d.ts +4 -0
  1429. package/lib/components/shoppingCart/components/Render/index.js +74 -0
  1430. package/lib/components/shoppingCart/components/Render/index.less +17 -0
  1431. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
  1432. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +124 -0
  1433. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
  1434. package/lib/components/shoppingCart/hooks/useAddService.d.ts +2 -0
  1435. package/lib/components/shoppingCart/hooks/useAddService.js +54 -0
  1436. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +2 -0
  1437. package/lib/components/shoppingCart/hooks/useClearCart.js +66 -0
  1438. package/lib/components/shoppingCart/hooks/useContext.d.ts +1 -0
  1439. package/lib/components/shoppingCart/hooks/useContext.js +31 -0
  1440. package/lib/components/shoppingCart/index.d.ts +3 -0
  1441. package/lib/components/shoppingCart/index.js +62 -0
  1442. package/lib/components/shoppingCart/locales.d.ts +33 -0
  1443. package/lib/components/shoppingCart/locales.js +56 -0
  1444. package/lib/components/shoppingCart/mock.d.ts +40 -0
  1445. package/lib/components/shoppingCart/mock.js +76 -0
  1446. package/lib/components/shoppingCart/status.d.ts +2 -0
  1447. package/lib/components/shoppingCart/status.js +64 -0
  1448. package/lib/components/shoppingCart/type.d.ts +48 -0
  1449. package/lib/components/shoppingCart/type.js +17 -0
  1450. package/lib/components/shoppingCart/utils.d.ts +63 -0
  1451. package/lib/components/shoppingCart/utils.js +83 -0
  1452. package/lib/components/subTotal/index.d.ts +22 -0
  1453. package/lib/components/subTotal/index.js +175 -0
  1454. package/lib/components/subTotal/index.less +70 -0
  1455. package/lib/components/subTotal/locales.d.ts +42 -0
  1456. package/lib/components/subTotal/locales.js +65 -0
  1457. package/lib/components/tabProduct/tabs/index.less +13 -3
  1458. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  1459. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +432 -0
  1460. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +7 -0
  1461. package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
  1462. package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  1463. package/lib/components/ticketBooking/components/menuBar/index.d.ts +4 -0
  1464. package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
  1465. package/lib/components/ticketBooking/components/menuBar/index.less +83 -0
  1466. package/lib/components/ticketBooking/components/notAvailable/index.d.ts +3 -0
  1467. package/lib/components/ticketBooking/components/notAvailable/index.js +61 -0
  1468. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  1469. package/lib/components/ticketBooking/components/ticketBooking/index.js +910 -0
  1470. package/lib/components/ticketBooking/components/ticketBooking/index.less +16 -0
  1471. package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
  1472. package/lib/components/ticketBooking/components/timeBar/index.js +149 -0
  1473. package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
  1474. package/lib/components/ticketBooking/data.d.ts +58 -0
  1475. package/lib/components/ticketBooking/data.js +0 -0
  1476. package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  1477. package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
  1478. package/lib/components/ticketBooking/index.d.ts +7 -0
  1479. package/lib/components/ticketBooking/index.js +206 -0
  1480. package/lib/components/ticketBooking/index.less +4 -0
  1481. package/lib/components/ticketBooking/locales.d.ts +171 -0
  1482. package/lib/components/ticketBooking/locales.js +194 -0
  1483. package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
  1484. package/lib/components/ticketBooking/miniRedux.js +96 -0
  1485. package/lib/components/ticketBooking/serve.d.ts +288 -0
  1486. package/lib/components/ticketBooking/serve.js +235 -0
  1487. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  1488. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  1489. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  1490. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  1491. package/lib/components/ticketBooking/utils/index.d.ts +23 -0
  1492. package/lib/components/ticketBooking/utils/index.js +239 -0
  1493. package/lib/components/wallet/Detail/index.js +7 -2
  1494. package/lib/components/wallet/DiscountCard/index.less +0 -1
  1495. package/lib/components/wallet/PointCard/index.less +0 -1
  1496. package/lib/components/wallet/RechargeableCard/index.less +5 -9
  1497. package/lib/components/wallet/Voucher/index.js +1 -0
  1498. package/lib/components/wallet/Voucher/index.less +0 -1
  1499. package/lib/components/wallet/components/WalletCard.js +2 -2
  1500. package/lib/components/wallet/index.js +41 -2
  1501. package/lib/components/wallet/index.less +0 -4
  1502. package/lib/components/wallet/locales.d.ts +3 -0
  1503. package/lib/components/wallet/locales.js +3 -0
  1504. package/lib/components/wallet/model.d.ts +1 -1
  1505. package/lib/components/wallet/utils/formatUtils.js +1 -1
  1506. package/lib/components/walletList/index.js +48 -16
  1507. package/lib/components/walletList/index.less +17 -15
  1508. package/lib/components/walletList/locales.d.ts +18 -0
  1509. package/lib/components/walletList/locales.js +41 -0
  1510. package/lib/components/walletList/serve.d.ts +8 -0
  1511. package/lib/components/walletList/serve.js +15 -2
  1512. package/lib/components/walletList/status.d.ts +38 -0
  1513. package/lib/components/walletList/status.js +66 -0
  1514. package/lib/components/workSpaceList/components/AppearanceEdit/IconPanel.js +2 -2
  1515. package/lib/components/workSpaceList/components/AppearanceEdit/constants.js +12 -32
  1516. package/lib/components/workSpaceList/components/Card/constants.js +3 -4
  1517. package/lib/components/workSpaceList/components/EditableString/index.js +2 -2
  1518. package/lib/components/workSpaceList/components/SearchBar/index.js +5 -8
  1519. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.js +2 -2
  1520. package/lib/components/workSpaceList/components/Sort/index.js +2 -2
  1521. package/lib/components/workSpaceList/components/WorkspaceItem/index.js +2 -2
  1522. package/lib/components/workSpaceList/server.d.ts +3 -3
  1523. package/lib/hooks/useEngineContext.d.ts +1 -0
  1524. package/lib/hooks/useEngineContext.js +14 -1
  1525. package/lib/hooks/useLocale.d.ts +2 -0
  1526. package/lib/hooks/useLocale.js +41 -0
  1527. package/lib/hooks/useLoginUser.d.ts +2 -0
  1528. package/lib/hooks/useLoginUser.js +50 -0
  1529. package/lib/index.d.ts +18 -0
  1530. package/lib/index.js +54 -0
  1531. package/lib/utils/date.d.ts +11 -0
  1532. package/lib/utils/date.js +57 -0
  1533. package/lib/utils/tasks/index.d.ts +16 -0
  1534. package/lib/utils/tasks/index.js +63 -0
  1535. package/lib/utils/tasks/type.d.ts +4 -0
  1536. package/lib/utils/tasks/type.js +17 -0
  1537. package/lowcode/appointment-deposit/meta.ts +58 -0
  1538. package/lowcode/event-booking/meta.ts +69 -0
  1539. package/lowcode/event-booking-availability-calendar/meta.ts +53 -0
  1540. package/lowcode/event-booking-detail-modal/meta.ts +39 -0
  1541. package/lowcode/event-booking-service-list/meta.ts +77 -0
  1542. package/lowcode/event-card/meta.ts +77 -0
  1543. package/lowcode/event-product-card/meta.ts +79 -0
  1544. package/lowcode/event-progress-bar/meta.ts +65 -0
  1545. package/lowcode/event-resource-display/meta.ts +169 -0
  1546. package/lowcode/event-resource-usability/meta.ts +67 -0
  1547. package/lowcode/event-schedule-calendar/meta.ts +56 -0
  1548. package/lowcode/event-select-holder/meta.ts +84 -0
  1549. package/lowcode/event-time-resource-selector/meta.ts +69 -0
  1550. package/lowcode/parallel-resource-booking/meta.ts +69 -0
  1551. package/lowcode/product-select/meta.ts +201 -0
  1552. package/lowcode/shopping-cart/meta.ts +98 -0
  1553. package/lowcode/sub-total/meta.ts +134 -0
  1554. package/lowcode/ticket-booking/meta.ts +55 -0
  1555. package/lowcode/tob-pay/meta.ts +44 -0
  1556. package/package.json +4 -4
@@ -0,0 +1,1385 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
6
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
7
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
20
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
+ import { getNoResource } from "../../mock";
22
+ import { getErrorList, getProductTotalPrice } from "../../utils";
23
+ import { isArr, locales } from '@pisell/utils';
24
+ import dayjs from 'dayjs';
25
+ import { appointmentTypes, openingTime } from "./status";
26
+ import { postMultiDay } from "../service/serve";
27
+ import localeTexts from "../../locales";
28
+ import { concatBookings, isGroupBooking, getProductByGroupId } from "./Group/utils";
29
+ import { isShowAddTime } from "../utils";
30
+ import { formatResources } from "../service/addService/utils";
31
+ import { getProductExtend } from "../../info2/service/addService/utils";
32
+ import { getErrorList as getErrorListInfo2 } from "../../info2/utilsByBooking";
33
+ import { getRelationDetailsTotal } from "../../components/footer/amount";
34
+ locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
35
+ export var formatActiveKey = function formatActiveKey(lists, platform, isEdit) {
36
+ if (!(lists !== null && lists !== void 0 && lists.length)) return [];
37
+
38
+ // 编辑时,必须有两个holder, 避免闪动问题
39
+ if (lists.length === 1 && isEdit) {
40
+ return [];
41
+ }
42
+ // 管理端默认打开最后一个holder
43
+ if (platform === 'shop') {
44
+ var _lists2;
45
+ return [(_lists2 = lists[lists.length - 1]) === null || _lists2 === void 0 ? void 0 : _lists2.key];
46
+ }
47
+
48
+ // 其他端默认打开所有
49
+ return lists === null || lists === void 0 ? void 0 : lists.map(function (cart) {
50
+ return cart === null || cart === void 0 ? void 0 : cart.key;
51
+ });
52
+ };
53
+
54
+ /**
55
+ * @title: 获取资源名称
56
+ * @description:
57
+ * @param {any} id
58
+ * @param {any} state
59
+ * @return {*}
60
+ * @Author: WangHan
61
+ * @Date: 2024-11-29 18:02
62
+ */
63
+ export var getResourceItem = function getResourceItem(id, state) {
64
+ var _state$service$resour;
65
+ if (id === 0) {
66
+ return getNoResource();
67
+ }
68
+ return (_state$service$resour = state.service.resources) === null || _state$service$resour === void 0 ? void 0 : _state$service$resour.find(function (d) {
69
+ return d.form_record_id === id;
70
+ });
71
+ };
72
+ var errorTypes = {
73
+ product: locales.getText('pisell2.text.status.service-error-1'),
74
+ time: locales.getText('pisell2.text.status.service-error-2'),
75
+ maxLimit: locales.getText('pisell2.text.status.service-error-3'),
76
+ limit: locales.getText('pisell2.text.status.service-error-3')
77
+ };
78
+
79
+ /**
80
+ * @title: 错误提示
81
+ * @description:
82
+ * @param {any} service
83
+ * @param {any} resourceItem
84
+ * @return {*}
85
+ * @Author: WangHan
86
+ * @Date: 2024-11-29 18:41
87
+ */
88
+ export var getErrorMessage = function getErrorMessage(service, resourceItem, isDay) {
89
+ var errorList = getErrorList(resourceItem, service, isDay);
90
+ var errorMessage = '';
91
+ if (!service.id) {
92
+ return errorList[0].label;
93
+ }
94
+ if (errorList.length) {
95
+ if (errorList.length > 1) {
96
+ errorMessage = "".concat(errorList.length, " ").concat(locales.getText('pisell2.text.warnings'));
97
+ } else {
98
+ errorMessage = (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.labelText) + ' ' + errorTypes[errorList[0].type];
99
+ }
100
+ }
101
+ return errorMessage;
102
+ };
103
+
104
+ /**
105
+ * @title: 格式化主体列表
106
+ * @description:
107
+ * @param {any} lists
108
+ * @param {boolean} isOpenGroup
109
+ * @return {*}
110
+ * @Author: WangHan
111
+ * @Date: 2024-12-04 11:27
112
+ */
113
+ export var formatHolderLists = function formatHolderLists(lists) {
114
+ var isOpenGroup = true;
115
+ var _lists = lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
116
+ return _objectSpread(_objectSpread({}, item), {}, {
117
+ id: (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id),
118
+ key: (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id),
119
+ label: locales.getText('pisell2.text.cart.of')(item === null || item === void 0 ? void 0 : item.main_field)
120
+ });
121
+ });
122
+
123
+ // 开启了分组并且是管理端,则增加open items分组
124
+ if (isOpenGroup) {
125
+ var defaults = [{
126
+ key: 0,
127
+ id: 0,
128
+ label: locales.getText('pisell2.text.open.items'),
129
+ main_field: locales.getText('pisell2.text.open.items')
130
+ }];
131
+ return defaults.concat(_lists);
132
+ }
133
+ return _lists;
134
+ };
135
+
136
+ /**
137
+ * @title: pets数据加 open items
138
+ * @description:
139
+ * @param {any} state
140
+ * @return {*}
141
+ * @Author: WangHan
142
+ * @Date: 2024-12-03 11:40
143
+ */
144
+ var getHolderLists = function getHolderLists(state) {
145
+ var _state$bookingConfig, _state$pet;
146
+ var form_id = (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id) || 0;
147
+ var petLists = (state === null || state === void 0 || (_state$pet = state.pet) === null || _state$pet === void 0 || (_state$pet = _state$pet.value) === null || _state$pet === void 0 ? void 0 : _state$pet[form_id]) || [];
148
+ var _lists = formatHolderLists(petLists);
149
+ return _lists;
150
+ };
151
+
152
+ /**
153
+ * @title: 获取pet名称
154
+ * @description:
155
+ * @param {any} state
156
+ * @param {number} id
157
+ * @return {*}
158
+ * @Author: WangHan
159
+ * @Date: 2024-12-03 11:42
160
+ */
161
+ var getHolderName = function getHolderName(state, id) {
162
+ var holderLists = getHolderLists(state);
163
+ if (!holderLists.length || !id) return '';
164
+ var resource = holderLists.find(function (d) {
165
+ return (d === null || d === void 0 ? void 0 : d.id) === id;
166
+ });
167
+ return resource === null || resource === void 0 ? void 0 : resource.main_field;
168
+ };
169
+ export var isBookingProduct = function isBookingProduct(extension_type, bol) {
170
+ return appointmentTypes.includes(extension_type) || bol;
171
+ };
172
+
173
+ /**
174
+ * @title: 是否是预约商品
175
+ * @description:
176
+ * @return {*}
177
+ * @Author: WangHan
178
+ * @Date: 2024-12-06 11:24
179
+ */
180
+ export var isDayBookingProduct = function isDayBookingProduct(item, state) {
181
+ return isBookingProduct(item === null || item === void 0 ? void 0 : item.extension_type) && state.renderType === 'dayBooking';
182
+ };
183
+ var currentResource = function currentResource(state, useResource, cacheItem) {
184
+ var resourcesOrigin = state.service.resourcesOrigin;
185
+ var resources = formatResources({
186
+ cacheItem: cacheItem,
187
+ resourcesOrigin: resourcesOrigin,
188
+ isDay: false
189
+ });
190
+ var item = resources.find(function (d) {
191
+ return d.form_record_id == useResource;
192
+ }) || {};
193
+ return item;
194
+ };
195
+
196
+ // 更新holder
197
+ export var handleChangeHolder = function handleChangeHolder(products, currentItem, other) {
198
+ return products.map(function (item) {
199
+ if (item._id === currentItem._id) {
200
+ return _objectSpread(_objectSpread({}, item), {}, {
201
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
202
+ holder_id: isArr(other) ? other.map(function (item) {
203
+ return item.id;
204
+ }) : item._extend.quantity > 1 ? [other.id] : other.id
205
+ })
206
+ });
207
+ }
208
+ return item;
209
+ });
210
+ };
211
+
212
+ // 添加holder
213
+ var handleAddHolder = function handleAddHolder() {};
214
+ var handleLike = function handleLike(products, currentItem, other) {
215
+ return products.map(function (item) {
216
+ if (currentItem.isParallelResource) {
217
+ if (item._id === currentItem.serviceId) {
218
+ var _item$_extend, _item$_extend2;
219
+ return _objectSpread(_objectSpread({}, item), {}, {
220
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
221
+ resource: _objectSpread(_objectSpread({}, (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.resource), {}, _defineProperty({}, currentItem.resourceId, (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.resource[currentItem.resourceId].map(function (item) {
222
+ return _objectSpread(_objectSpread({}, item), {}, {
223
+ like_status: other.like_status
224
+ });
225
+ })))
226
+ })
227
+ });
228
+ }
229
+ return item;
230
+ } else {
231
+ if (item._id === currentItem._id) {
232
+ return _objectSpread(_objectSpread({}, item), {}, {
233
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
234
+ like_status: other.like_status
235
+ })
236
+ });
237
+ }
238
+ return item;
239
+ }
240
+ });
241
+ };
242
+
243
+ // 更新资源
244
+ var handleChangeResource = function handleChangeResource(products, currentItem, other, state) {
245
+ return products.map(function (item) {
246
+ var _ref = other || {},
247
+ props = _ref.props,
248
+ value = _ref.value;
249
+ var _ref2 = props || {},
250
+ isParallelResource = _ref2.isParallelResource,
251
+ resourceId = _ref2.resourceId;
252
+ if (isParallelResource) {
253
+ if (item._id === currentItem._id) {
254
+ var hasDataItem = getProductExtend({
255
+ cacheItem: _objectSpread(_objectSpread({}, item), {}, {
256
+ new: 0
257
+ }),
258
+ state: state
259
+ });
260
+ var maps = hasDataItem._extend.resource[resourceId] ? hasDataItem._extend.resource[resourceId].reduce(function (pre, cur) {
261
+ pre[cur.relation_id] = cur;
262
+ return pre;
263
+ }, {}) : {};
264
+ item._extend.resource[resourceId] = value.map(function (d) {
265
+ var _hasDataItem$_data$re, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _currentForm$renderLi5;
266
+ var currentForm = ((_hasDataItem$_data$re = hasDataItem._data.resourceMaps) === null || _hasDataItem$_data$re === void 0 ? void 0 : _hasDataItem$_data$re[resourceId]) || {};
267
+ return (
268
+ // maps[d] 为真时, 说明是之前已选择, 否则为新增的值,补充数据
269
+ maps[d] || {
270
+ relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[d]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
271
+ form_id: resourceId,
272
+ relation_id: d,
273
+ like_status: 'common',
274
+ // 新添加的数据补充错误信息
275
+ errors: getErrorListInfo2((_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2[d], hasDataItem),
276
+ children: (_currentForm$renderLi3 = currentForm.renderListMaps) === null || _currentForm$renderLi3 === void 0 || (_currentForm$renderLi3 = _currentForm$renderLi3[d]) === null || _currentForm$renderLi3 === void 0 ? void 0 : _currentForm$renderLi3.children,
277
+ metadata: _objectSpread(_objectSpread({}, (_currentForm$renderLi4 = currentForm.renderListMaps) === null || _currentForm$renderLi4 === void 0 || (_currentForm$renderLi4 = _currentForm$renderLi4[d]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.metadata), {}, {
278
+ form_name: currentForm.title,
279
+ resource_name: (_currentForm$renderLi5 = currentForm.renderListMaps[d]) === null || _currentForm$renderLi5 === void 0 ? void 0 : _currentForm$renderLi5.main_field
280
+ })
281
+ }
282
+ );
283
+ });
284
+ }
285
+ return item;
286
+ } else {
287
+ if (item._id === currentItem._id) {
288
+ var _resourceItem$_extend;
289
+ var resourceItem = currentResource(state, other.id, item);
290
+ var _ref3 = (resourceItem === null || resourceItem === void 0 || (_resourceItem$_extend = resourceItem._extend) === null || _resourceItem$_extend === void 0 ? void 0 : _resourceItem$_extend.usableTime) || {},
291
+ relation_type = _ref3.relation_type,
292
+ item_id = _ref3.item_id,
293
+ schedule_id = _ref3.schedule_id;
294
+ return _objectSpread(_objectSpread({}, item), {}, {
295
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
296
+ resource: item_id || (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) || 0,
297
+ relation_type: relation_type || 'form',
298
+ relation_id: item_id || (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) || 0,
299
+ schedule_id: schedule_id || 0
300
+ })
301
+ });
302
+ }
303
+ return item;
304
+ }
305
+ });
306
+ };
307
+
308
+ /**
309
+ * @title: 更新商品数据
310
+ * @description:
311
+ * @param {any} state
312
+ * @param currentItem
313
+ * @param {string} type
314
+ * @param {any} other
315
+ * @param actions
316
+ * @return {*}
317
+ * @Author: WangHan
318
+ * @Date: 2025-01-03 15:00
319
+ */
320
+ export var updateServices = function updateServices(state, currentItem, type, other, actions) {
321
+ var _state$service, _state$service2;
322
+ if (!(state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && _state$service.value)) return [];
323
+ var products = (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || [];
324
+ // currentItem 可能是单个 也可能是数组
325
+ var isGroup = isGroupBooking(currentItem._id);
326
+ // 删除
327
+ if (type === 'delete') {
328
+ var _products;
329
+ var deleteIds = [];
330
+ if (isGroup) {
331
+ // 删除分组
332
+ deleteIds = getProductByGroupId(currentItem._id, products);
333
+ } else {
334
+ // 删除单个
335
+ deleteIds = [currentItem._id];
336
+ }
337
+ products = (_products = products) === null || _products === void 0 ? void 0 : _products.filter(function (item) {
338
+ return !deleteIds.includes(item === null || item === void 0 ? void 0 : item._id);
339
+ });
340
+ }
341
+
342
+ // 删除购物车
343
+ if (type === 'delete_holders') {
344
+ var _products2;
345
+ products = (_products2 = products) === null || _products2 === void 0 ? void 0 : _products2.filter(function (item) {
346
+ var _item$_extend3;
347
+ return (item === null || item === void 0 || (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.holder_id) !== other;
348
+ });
349
+ }
350
+
351
+ // 更新holder
352
+ if (type === 'change_holder') {
353
+ products = handleChangeHolder(products, currentItem, other);
354
+ return products;
355
+ }
356
+ if (type === 'add_holder') {
357
+ var _actions$handleAddHol;
358
+ actions === null || actions === void 0 || (_actions$handleAddHol = actions.handleAddHolder) === null || _actions$handleAddHol === void 0 || _actions$handleAddHol.call(actions, products, currentItem);
359
+ return products;
360
+ }
361
+ if (type === 'like') {
362
+ products = handleLike(products, currentItem, other);
363
+ }
364
+ if (type === 'change_resource') {
365
+ products = handleChangeResource(products, currentItem, other, state);
366
+ return products;
367
+ }
368
+
369
+ // 更新商品的holder_id
370
+ if (type === 'update_holders') {
371
+ var _products3;
372
+ products = (_products3 = products) === null || _products3 === void 0 ? void 0 : _products3.map(function (item) {
373
+ var ids = currentItem.map(function (d) {
374
+ return d._id;
375
+ });
376
+ if (ids !== null && ids !== void 0 && ids.includes(item === null || item === void 0 ? void 0 : item._id)) {
377
+ var _extend = item._extend || {};
378
+ // 数组的话则是批量更新
379
+ if (Array.isArray(other)) {
380
+ var _other$find;
381
+ _extend.holder_id = (_other$find = other.find(function (other) {
382
+ return (other === null || other === void 0 ? void 0 : other._id) === (item === null || item === void 0 ? void 0 : item._id);
383
+ })) === null || _other$find === void 0 ? void 0 : _other$find.holder_id;
384
+ } else {
385
+ _extend.holder_id = other;
386
+ }
387
+ return item;
388
+ }
389
+ return item;
390
+ });
391
+ } else {
392
+ var _products4;
393
+ // 更新数据
394
+ products = (_products4 = products) === null || _products4 === void 0 ? void 0 : _products4.map(function (item) {
395
+ var updateIds = [];
396
+ if (isGroup) {
397
+ // 更新分组
398
+ updateIds = getProductByGroupId(currentItem._id, products);
399
+ } else {
400
+ // 更新单个
401
+ updateIds = [currentItem._id];
402
+ }
403
+ if (updateIds.includes(item._id)) {
404
+ if (type === 'like') {
405
+ var _extend = item._extend || {};
406
+ _extend.like_status = other === null || other === void 0 ? void 0 : other.like_status;
407
+ } else {
408
+ item = _objectSpread(_objectSpread({}, item), other);
409
+ }
410
+ return item;
411
+ }
412
+ return item;
413
+ });
414
+ }
415
+ return products;
416
+ };
417
+
418
+ /**
419
+ * @title: 格式化套餐
420
+ * @description:
421
+ * @param {any} bundle
422
+ * @return {*}
423
+ * @Author: WangHan
424
+ * @Date: 2025-01-03 00:03
425
+ */
426
+ var formatBundle = function formatBundle(bundle) {
427
+ if (!(bundle !== null && bundle !== void 0 && bundle.length)) return [];
428
+ return bundle.map(function (item) {
429
+ return {
430
+ id: item === null || item === void 0 ? void 0 : item.id,
431
+ title: item === null || item === void 0 ? void 0 : item.title,
432
+ num: item === null || item === void 0 ? void 0 : item.num,
433
+ price: item === null || item === void 0 ? void 0 : item.price,
434
+ total: item === null || item === void 0 ? void 0 : item.price,
435
+ price_type: item === null || item === void 0 ? void 0 : item.price_type,
436
+ bundle_sum_price: item === null || item === void 0 ? void 0 : item.bundle_sum_price,
437
+ bundle_sum_type: item === null || item === void 0 ? void 0 : item.bundle_sum_type,
438
+ options: formatOptions(item === null || item === void 0 ? void 0 : item.option)
439
+ };
440
+ });
441
+ };
442
+
443
+ /**
444
+ * @title: 格式化单规格
445
+ * @description:
446
+ * @param {any} options
447
+ * @return {*}
448
+ * @Author: WangHan
449
+ * @Date: 2025-01-02 23:58
450
+ */
451
+ var formatOptions = function formatOptions(options) {
452
+ if (!(options !== null && options !== void 0 && options.length)) return [];
453
+ return options.map(function (item) {
454
+ return {
455
+ id: item === null || item === void 0 ? void 0 : item.id,
456
+ name: item === null || item === void 0 ? void 0 : item.name,
457
+ num: item === null || item === void 0 ? void 0 : item.num,
458
+ price: item === null || item === void 0 ? void 0 : item.price,
459
+ total: item === null || item === void 0 ? void 0 : item.price,
460
+ origin_total: item === null || item === void 0 ? void 0 : item.original_price
461
+ };
462
+ });
463
+ };
464
+ export var formItems = function formItems(items) {
465
+ return items.map(function (d) {
466
+ return _objectSpread(_objectSpread({}, d), {}, {
467
+ start_date: d._extend.start_date,
468
+ end_date: d._extend.end_date,
469
+ num: d === null || d === void 0 ? void 0 : d._extend.quantity,
470
+ total: d._extend.total,
471
+ origin_total: d._extend.origin_total
472
+ });
473
+ });
474
+ };
475
+ var formatHolders = function formatHolders(items) {
476
+ return items.map(function (d) {
477
+ return {
478
+ id: d === null || d === void 0 ? void 0 : d.form_record_id,
479
+ label: d === null || d === void 0 ? void 0 : d.main_field
480
+ };
481
+ });
482
+ };
483
+ var getErrorMessageInfo2 = function getErrorMessageInfo2(errorList) {
484
+ var errorMessage = '';
485
+ if (errorList !== null && errorList !== void 0 && errorList.length) {
486
+ if (errorList.length === 1) {
487
+ errorMessage = errorList[0].label + ' ' + errorTypes[errorList[0].type];
488
+ } else {
489
+ errorMessage = "".concat(errorList.length, " ").concat(locales.getText('pisell2.text.warnings'));
490
+ }
491
+ }
492
+ return errorMessage;
493
+ };
494
+ var getAllErrorList = function getAllErrorList(item) {
495
+ var _ref4 = item._data || {},
496
+ resourceMaps = _ref4.resourceMaps;
497
+ var _ref5 = item._extend || {},
498
+ resource = _ref5.resource;
499
+ var errorList = [];
500
+ Object.entries(resource).forEach(function (_ref6) {
501
+ var _ref7 = _slicedToArray(_ref6, 2),
502
+ key = _ref7[0],
503
+ value = _ref7[1];
504
+ value.forEach(function (val) {
505
+ var _resourceMaps$key;
506
+ var list = getErrorListInfo2((_resourceMaps$key = resourceMaps[key]) === null || _resourceMaps$key === void 0 ? void 0 : _resourceMaps$key.renderListMaps[val.relation_id], item);
507
+ errorList.push.apply(errorList, _toConsumableArray(list));
508
+ console.log(list, 'list');
509
+ });
510
+ });
511
+ return errorList;
512
+ };
513
+ var mapListItems = function mapListItems(items) {
514
+ return items.map(function (item) {
515
+ return {
516
+ id: item.id || item.form_record_id,
517
+ label: item.labelText,
518
+ isError: !item.usable
519
+ };
520
+ });
521
+ };
522
+
523
+ // 获取主体表单是否必填
524
+ export var getIsSubjectRequire = function getIsSubjectRequire(state) {
525
+ var _state$bookingConfig2, _state$bookingConfig3;
526
+ return (state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.appointment_subject) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.type) === 'form' && (state === null || state === void 0 || (_state$bookingConfig3 = state.bookingConfig) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.config) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.basic) === null || _state$bookingConfig3 === void 0 ? void 0 : _state$bookingConfig3.subject_require) === 'require';
527
+ };
528
+
529
+ // 非预约商品 通过时长和日程判断是否是普通商品
530
+ export var isNormalProductByDurationSchedule = function isNormalProductByDurationSchedule(item) {
531
+ var _item$schedules, _item$scheduleIds;
532
+ return !(item !== null && item !== void 0 && item.duration) && !(item !== null && item !== void 0 && (_item$schedules = item.schedules) !== null && _item$schedules !== void 0 && _item$schedules.length) && !((_item$scheduleIds = item['schedule.ids']) !== null && _item$scheduleIds !== void 0 && _item$scheduleIds.length);
533
+ };
534
+
535
+ // 是否全部是普通商品
536
+ export var isAllNormalProduct = function isAllNormalProduct(items) {
537
+ return items.every(function (item) {
538
+ return isNormalProductByDurationSchedule(item);
539
+ });
540
+ };
541
+ export var isAllNormalProductByState = function isAllNormalProductByState(state) {
542
+ return isAllNormalProduct(state.service.value);
543
+ };
544
+ var getGeneralParams = function getGeneralParams(item, state, isParallelResource) {
545
+ var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9;
546
+ var pet = state.pet,
547
+ service = state.service;
548
+ var _ref8 = pet || {},
549
+ _ref8$holders = _ref8.holders,
550
+ holders = _ref8$holders === void 0 ? [] : _ref8$holders,
551
+ formData = _ref8.formData;
552
+ var parallelResourceOtherParams = {};
553
+ var multiResources;
554
+ if (isParallelResource) {
555
+ var hasDataItem = getProductExtend({
556
+ cacheItem: _objectSpread(_objectSpread({}, item), {}, {
557
+ new: 0
558
+ }),
559
+ state: state
560
+ });
561
+ var _ref9 = hasDataItem._data || {},
562
+ resourceMaps = _ref9.resourceMaps,
563
+ resources = _ref9.resources;
564
+ parallelResourceOtherParams.errorMessage = getErrorMessageInfo2(getAllErrorList(hasDataItem));
565
+ multiResources = resources.map(function (resource) {
566
+ var _detail$select_type, _value$;
567
+ var key = resource.form_id;
568
+ var detail = resourceMaps === null || resourceMaps === void 0 ? void 0 : resourceMaps[key];
569
+ var isMultiple = (detail === null || detail === void 0 || (_detail$select_type = detail.select_type) === null || _detail$select_type === void 0 ? void 0 : _detail$select_type.type) === 'multiple';
570
+ var value = item._extend.resource[key];
571
+ return {
572
+ is_hide_like: isMultiple,
573
+ isParallelResource: true,
574
+ maxLength: isMultiple && detail.select_type.max,
575
+ resourceMode: isMultiple ? 'multiple' : undefined,
576
+ serviceId: item._id,
577
+ resourceId: key,
578
+ _id: key,
579
+ id: (value || []).map(function (val) {
580
+ return val.relation_id;
581
+ }),
582
+ status: (value === null || value === void 0 || (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.like_status) || 'common',
583
+ lists: detail !== null && detail !== void 0 && detail.renderList ? mapListItems(detail === null || detail === void 0 ? void 0 : detail.renderList) : [],
584
+ disabled: state.disabledEdit || state.disableEventBookingEdit
585
+ };
586
+ });
587
+ } else {
588
+ var _item$_extend4;
589
+ var _ref10 = service || {},
590
+ resourcesOrigin = _ref10.resourcesOrigin;
591
+ var resource = formatResources({
592
+ cacheItem: item,
593
+ resourcesOrigin: resourcesOrigin,
594
+ isDay: false
595
+ });
596
+ multiResources = [{
597
+ _id: item._id,
598
+ id: item._extend.resource,
599
+ status: ((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.like_status) || 'common',
600
+ lists: mapListItems(resource)
601
+ }];
602
+ }
603
+ var isNormalProduct = isNormalProductByDurationSchedule(item);
604
+ return _objectSpread({
605
+ format: ['HH:mm', 'HH:mm'],
606
+ show_time: true,
607
+ duration_type: 'minutes',
608
+ // 当前可选择holder列表
609
+ holders: formatHolders(holders),
610
+ isShowChangeHolder: !isNormalProduct,
611
+ isShowAction: isShowAddTime(state, item),
612
+ actionText: locales.getText('page.booking.text.add-time'),
613
+ isMultipleResource: true,
614
+ multiResources: multiResources,
615
+ holderMaxCount: item === null || item === void 0 ? void 0 : item._extend.quantity,
616
+ holderMode: (item === null || item === void 0 ? void 0 : item._extend.quantity) > 1 ? 'multiple' : undefined,
617
+ isErrorHolder: getIsSubjectRequire(state),
618
+ addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
619
+ holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
620
+ start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate : "",
621
+ end_date: !isNormalProduct ? (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date) : "",
622
+ rowKey: "rowKey-".concat(item === null || item === void 0 || (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 || (_item$_extend9 = _item$_extend9.other) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.rowKey)
623
+ }, parallelResourceOtherParams);
624
+ };
625
+ var calcAddTimeTotalPrice = function calcAddTimeTotalPrice(total, addTimeProducts) {
626
+ return (Number(total) || 0) + getRelationDetailsTotal(addTimeProducts || []);
627
+ };
628
+
629
+ /**
630
+ * @title: 格式化商品数据
631
+ * @description:
632
+ * @param {any} lists
633
+ * @return {*}
634
+ * @Author: WangHan
635
+ * @Date: 2024-11-29 17:36
636
+ */
637
+ export var formatProducts = function formatProducts(lists, state) {
638
+ var isRenderGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
639
+ var isGeneral = arguments.length > 3 ? arguments[3] : undefined;
640
+ var isParallelResource = arguments.length > 4 ? arguments[4] : undefined;
641
+ if (!(lists !== null && lists !== void 0 && lists.length)) return [];
642
+ var normalList = [];
643
+ var groupList = [];
644
+ var formItem = function formItem(item) {
645
+ var _item$_extend10, _item$_extend11, _item$_extend12, _item$_extend14, _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20, _item$_extend21, _item$_extend22, _resourceItem, _item$_extend23, _item$_extend24, _item$_extend25, _item$_extend26, _item$_extend27;
646
+ var _isDayBookingProduct = isDayBookingProduct(item, state);
647
+ var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.holder_id);
648
+ var options = formatOptions(item === null || item === void 0 || (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.option);
649
+ var bundle = formatBundle(item === null || item === void 0 || (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.bundle);
650
+ // 是否是普通商品
651
+ var isNormalProduct = !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
652
+ var resourceItem = {};
653
+ var errorMessage = '';
654
+ if (_isDayBookingProduct || isGeneral) {
655
+ var _item$_extend13;
656
+ resourceItem = getResourceItem(item === null || item === void 0 || (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.resource, state);
657
+ errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
658
+ }
659
+ var generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
660
+ return _objectSpread(_objectSpread({
661
+ id: item === null || item === void 0 ? void 0 : item.id,
662
+ _id: item === null || item === void 0 ? void 0 : item._id,
663
+ name: item === null || item === void 0 ? void 0 : item.title,
664
+ price: item === null || item === void 0 || (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.price,
665
+ total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.total, item === null || item === void 0 || (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.relation_details),
666
+ origin_total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.origin_total, item === null || item === void 0 || (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.relation_details),
667
+ num: item === null || item === void 0 ? void 0 : item._extend.quantity,
668
+ image: item === null || item === void 0 ? void 0 : item.cover,
669
+ isShowNote: true,
670
+ note: item === null || item === void 0 ? void 0 : item.note,
671
+ like_status: item === null || item === void 0 || (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.like_status,
672
+ bundle: bundle,
673
+ options: options,
674
+ errorMessage: errorMessage,
675
+ product_option_string: item === null || item === void 0 || (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.product_option_string,
676
+ discount_reason: item === null || item === void 0 || (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.discount_reason,
677
+ resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.resource,
678
+ relation_form_name: isNormalProduct ? '' : ((_resourceItem = resourceItem) === null || _resourceItem === void 0 ? void 0 : _resourceItem.labelText) || item.relation_form_name,
679
+ holder_title: clientTitle,
680
+ start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.start_date : '',
681
+ end_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.end_date : '',
682
+ holder_id: (item === null || item === void 0 || (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.holder_id) || 0,
683
+ isNormalProduct: isNormalProduct,
684
+ locale: state.locale,
685
+ symbol: state.amountSymbol,
686
+ relation_products: (item === null || item === void 0 || (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.relation_details) || [],
687
+ items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.items) || [])
688
+ }, generalParams), {}, {
689
+ _origin: item
690
+ });
691
+ };
692
+
693
+ // 将商品分为组商品和非组商品
694
+ lists.forEach(function (item) {
695
+ var _item$_extend28;
696
+ if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
697
+ normalList.push(formItem(item));
698
+ } else {
699
+ groupList.push(item);
700
+ }
701
+ });
702
+
703
+ // 根据item._extend.groupId 进行分组
704
+ var groups = groupList.reduce(function (prev, item) {
705
+ var _item$_extend29;
706
+ var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
707
+ if (!prev[groupId]) {
708
+ prev[groupId] = [];
709
+ }
710
+ prev[groupId].push(item);
711
+ return prev;
712
+ }, {});
713
+ console.log(normalList, 'normalList');
714
+ if (isRenderGroup) {
715
+ return Object.values(groups).map(function (d) {
716
+ return formItem(concatBookings(d));
717
+ }).concat(normalList);
718
+ } else {
719
+ return lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
720
+ return formItem(item);
721
+ });
722
+ }
723
+ };
724
+
725
+ /**
726
+ * @title: 禁用日期
727
+ * @description:
728
+ * @param {any} current
729
+ * @param {string} position
730
+ * @param {any} startDate
731
+ * @return {*}
732
+ * @Author: WangHan
733
+ * @Date: 2024-12-03 17:51
734
+ */
735
+ export var disabledDate = function disabledDate(current, position, currentDate) {
736
+ if (!dayjs(currentDate).isValid()) return;
737
+ if (position === 'start') {
738
+ return false;
739
+ }
740
+ if (position === 'end' && current.endOf('day') && currentDate) {
741
+ // 结束日期最大 = 开始日期 + 8个月
742
+ var endDisabled = currentDate.add(8, 'months').format('YYYY-MM-DD');
743
+ return dayjs(endDisabled) < current.startOf('day') || current.startOf('day') <= currentDate;
744
+ }
745
+ return current && current <= currentDate;
746
+ };
747
+
748
+ /**
749
+ * @title: 是否是跨日预约
750
+ * @description:
751
+ * @param {any} state
752
+ * @return {*}
753
+ * @Author: WangHan
754
+ * @Date: 2024-12-04 09:49
755
+ */
756
+ export var isDayBooking = function isDayBooking(state) {
757
+ return (state === null || state === void 0 ? void 0 : state.renderType) === 'dayBooking' || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
758
+ };
759
+ export var isDaysBooking = function isDaysBooking(state) {
760
+ return (state === null || state === void 0 ? void 0 : state.renderType) === 'dayBooking';
761
+ };
762
+ export var isEventBooking = function isEventBooking(state) {
763
+ return state.renderType === 'eventBooking';
764
+ };
765
+ export var isAppointmentProduct = function isAppointmentProduct(item) {
766
+ return appointmentTypes.includes(item.extension_type);
767
+ };
768
+ /**
769
+ * @title: 是否是terminal上的跨日预约
770
+ * @description:
771
+ * @param {any} state
772
+ * @return {*}
773
+ * @Author: WangHan
774
+ * @Date: 2024-12-04 15:31
775
+ */
776
+ export var isTerminalDayBooking = function isTerminalDayBooking(state) {
777
+ return state.isTerminalDayBookingPage;
778
+ };
779
+ export var formatDayDate = function formatDayDate(_extend) {
780
+ // 默认选择的日期
781
+ var startDate = dayjs(_extend === null || _extend === void 0 ? void 0 : _extend.start_date).startOf('day');
782
+ var endDate = dayjs(_extend === null || _extend === void 0 ? void 0 : _extend.end_date).startOf('day');
783
+ return _objectSpread(_objectSpread({}, _extend), {}, {
784
+ start_date: startDate,
785
+ end_date: endDate
786
+ });
787
+ };
788
+
789
+ /**
790
+ * @title: 根据营业日时间格式化时间
791
+ * @description:
792
+ * @param {any} state
793
+ * @return {*}
794
+ * @Author: WangHan
795
+ * @Date: 2024-12-04 12:07
796
+ */
797
+ export var formatDayTime = function formatDayTime(_ref11) {
798
+ var startDate = _ref11.startDate,
799
+ endDate = _ref11.endDate;
800
+ // 营业日时间
801
+ var shopOpeningTime = localStorage.getItem('shopOpeningHours') || '00:00';
802
+
803
+ // 默认选择的日期
804
+ var start_date = dayjs(startDate).format('YYYY-MM-DD');
805
+ var end_date = dayjs(endDate).format('YYYY-MM-DD');
806
+
807
+ // 更新后的日期
808
+ var result = {
809
+ startDateTime: dayjs("".concat(start_date, "T").concat(shopOpeningTime, ":00")),
810
+ // 结束日期根据营业日时间减去一分钟
811
+ endDateTime: dayjs("".concat(end_date, "T").concat(shopOpeningTime, ":00")).subtract(1, 'minute')
812
+ };
813
+ return result;
814
+ };
815
+ export var formatDateTime = function formatDateTime(start_date, end_date) {
816
+ var _openingTime = openingTime();
817
+
818
+ // 开始时间 + 营业日时间
819
+ var startDate = "".concat(start_date, " ").concat(_openingTime);
820
+ var endDate = "".concat(end_date, " ").concat(_openingTime);
821
+ var date = {
822
+ value: dayjs(startDate),
823
+ end_date: dayjs(endDate).subtract(1, 'minute')
824
+ };
825
+ return date;
826
+ };
827
+
828
+ /**
829
+ * @title: 初始化日期
830
+ * @description:
831
+ * @return {*}
832
+ * @Author: WangHan
833
+ * @Date: 2024-12-06 17:24
834
+ */
835
+ export var initDate = function initDate() {
836
+ var startDate = dayjs().format('YYYY-MM-DD');
837
+ var endDate = dayjs().add(1, 'days').format('YYYY-MM-DD');
838
+ var date = formatDateTime(startDate, endDate);
839
+ return date;
840
+ };
841
+
842
+ /**
843
+ * @title: 是否有预约商品
844
+ * @description:
845
+ * @return {*}
846
+ * @Author: WangHan
847
+ * @Date: 2024-12-12 15:47
848
+ */
849
+ export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(state) {
850
+ var _state$bookingConfig4, _state$service3, _state$pet2;
851
+ var form_id = (state === null || state === void 0 || (_state$bookingConfig4 = state.bookingConfig) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.config) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.basic) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.appointment_subject) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.form_id) || 0;
852
+ var services = ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value) || [];
853
+ var pets = ((_state$pet2 = state.pet) === null || _state$pet2 === void 0 || (_state$pet2 = _state$pet2.value) === null || _state$pet2 === void 0 ? void 0 : _state$pet2[form_id]) || [];
854
+
855
+ // 没选择表单,则直接提示
856
+ if (!pets.length) return true;
857
+ var checkType = function checkType(extension_type) {
858
+ if (isEventBooking(state)) {
859
+ return true;
860
+ }
861
+ return appointmentTypes.includes(extension_type);
862
+ };
863
+
864
+ // 没有任何一个预约商品则提示
865
+ var appointmentServices = services.filter(function (d) {
866
+ return checkType(d.extension_type);
867
+ });
868
+ if (!appointmentServices.length) return true;
869
+ var _pets = pets === null || pets === void 0 ? void 0 : pets.map(function (d) {
870
+ // const holderProducts = services.filter((d: any) => d._extend?.holder_id == d.form_record_id)
871
+
872
+ return _objectSpread(_objectSpread({}, d), {}, {
873
+ // 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
874
+ // services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
875
+ services: services.filter(function (item) {
876
+ var _item$_extend30;
877
+ return ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.holder_id) == d.form_record_id && checkType(item.extension_type);
878
+ })
879
+ });
880
+ });
881
+ _pets = _pets.filter(function (d) {
882
+ return !d.services.length;
883
+ });
884
+ return _pets.length > 0;
885
+ };
886
+
887
+ /**
888
+ * @title: 过滤出如果是预约商品,则只获取跨日的预约商品
889
+ * @description:
890
+ * @param {any} lists
891
+ * @return {*}
892
+ * @Author: WangHan
893
+ * @Date: 2024-12-13 16:44
894
+ */
895
+ export var getDayProducts = function getDayProducts(holderId, lists, isTerminal) {
896
+ var _lists = lists || [];
897
+
898
+ // 普通商品列表, terminal进入页面直接获取了商品列表数据,所以选择了表单之后不会再次触发该方法
899
+ if (!holderId && !isTerminal) {
900
+ _lists = _lists.filter(function (item) {
901
+ return !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type);
902
+ });
903
+ } else {
904
+ // 普通商品 + 跨日预约商品列表
905
+ _lists = _lists.filter(function (item) {
906
+ var _item$duration;
907
+ return !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) && ((_item$duration = item.duration) === null || _item$duration === void 0 ? void 0 : _item$duration.type) === 'days';
908
+ });
909
+ }
910
+ return _lists;
911
+ };
912
+
913
+ /**
914
+ * @title: 格式化表单数据
915
+ * @description:
916
+ * @param {any} state
917
+ * @return {*}
918
+ * @Author: WangHan
919
+ * @Date: 2024-12-30 22:19
920
+ */
921
+ export var getPets = function getPets(state) {
922
+ var _state$bookingConfig5, _state$pet3;
923
+ var form_id = (state === null || state === void 0 || (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.basic) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.appointment_subject) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.form_id) || 0;
924
+ var pets = (state === null || state === void 0 || (_state$pet3 = state.pet) === null || _state$pet3 === void 0 || (_state$pet3 = _state$pet3.value) === null || _state$pet3 === void 0 ? void 0 : _state$pet3[form_id]) || [];
925
+ return pets;
926
+ };
927
+
928
+ /**
929
+ * @title: 得出预约商品
930
+ * @description:
931
+ * @param {any} state
932
+ * @return {*}
933
+ * @Author: WangHan
934
+ * @Date: 2024-12-30 22:26
935
+ */
936
+ export var getAppointmentService = function getAppointmentService(state) {
937
+ var _state$service4;
938
+ var services = ((_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.value) || [];
939
+ var lists = services.filter(function (item) {
940
+ return appointmentTypes.includes(item.extension_type);
941
+ });
942
+ return lists;
943
+ };
944
+
945
+ /**
946
+ * @title: 判断是否打开删除宠物弹窗
947
+ * @description:
948
+ * @param {any} state
949
+ * @param {any} newVal
950
+ * @return {*}
951
+ * @Author: WangHan
952
+ * @Date: 2024-12-16 16:12
953
+ */
954
+ export var isOpenDeletePet = function isOpenDeletePet(state, newVal) {
955
+ var _state$bookingConfig6, _state$pet4;
956
+ var form_id = (state === null || state === void 0 || (_state$bookingConfig6 = state.bookingConfig) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.config) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.basic) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.appointment_subject) === null || _state$bookingConfig6 === void 0 ? void 0 : _state$bookingConfig6.form_id) || 0;
957
+ var oldPets = (state === null || state === void 0 || (_state$pet4 = state.pet) === null || _state$pet4 === void 0 || (_state$pet4 = _state$pet4.value) === null || _state$pet4 === void 0 ? void 0 : _state$pet4[form_id]) || [];
958
+ var newPets = (newVal === null || newVal === void 0 ? void 0 : newVal[form_id]) || [];
959
+
960
+ // 被删除的表单
961
+ var deletePets = oldPets.filter(function (item) {
962
+ return !newPets.some(function (newItem) {
963
+ return newItem.form_record_id === item.form_record_id;
964
+ });
965
+ });
966
+
967
+ // 被删除的表单中是否有预约商品
968
+ var servicePets = deletePets.map(function (item) {
969
+ var _state$service5;
970
+ return _objectSpread(_objectSpread({}, item), {}, {
971
+ services: (_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.value) === null || _state$service5 === void 0 ? void 0 : _state$service5.filter(function (d) {
972
+ var _d$_extend;
973
+ return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.holder_id) == item.form_record_id;
974
+ })
975
+ });
976
+ });
977
+
978
+ // 查找被删除的表单中是否有对应的商品数据
979
+ var lists = servicePets.filter(function (item) {
980
+ var _item$services;
981
+ return ((_item$services = item.services) === null || _item$services === void 0 ? void 0 : _item$services.length) > 0;
982
+ });
983
+ return {
984
+ ids: lists.map(function (item) {
985
+ return item.form_record_id;
986
+ }),
987
+ lists: lists
988
+ };
989
+ };
990
+
991
+ /**
992
+ * @title: 当前选中的表单id
993
+ * @description:
994
+ * @param {any} state
995
+ * @return {*}
996
+ * @Author: WangHan
997
+ * @Date: 2024-12-17 14:40
998
+ */
999
+ export var holderId = function holderId(state) {
1000
+ var _state$activeCartId;
1001
+ return Number((state === null || state === void 0 || (_state$activeCartId = state.activeCartId) === null || _state$activeCartId === void 0 ? void 0 : _state$activeCartId[0]) || 0);
1002
+ };
1003
+
1004
+ /**
1005
+ * @title: 计算总价
1006
+ * @description:
1007
+ * @param {any} data
1008
+ * @return {*}
1009
+ * @Author: WangHan
1010
+ * @Date: 2024-12-31 15:18
1011
+ */
1012
+ function calculateTotalPrice(data) {
1013
+ var _price = data === null || data === void 0 ? void 0 : data.reduce(function (total, item) {
1014
+ return total + ((item === null || item === void 0 ? void 0 : item.price) || (item === null || item === void 0 ? void 0 : item.add_price)) * item.num;
1015
+ }, 0);
1016
+ return parseFloat(_price);
1017
+ }
1018
+
1019
+ /**
1020
+ * @title: 更新单规格价格
1021
+ * @description:
1022
+ * @param {any} currentValue
1023
+ * @param {any} single
1024
+ * @return {*}
1025
+ * @Author: WangHan
1026
+ * @Date: 2024-12-31 15:18
1027
+ */
1028
+ function updateSinglePrice(currentValue, single) {
1029
+ var _single = [];
1030
+ var _loop = function _loop() {
1031
+ var item = currentValue[index];
1032
+ var currentIndex = single.findIndex(function (_single) {
1033
+ return _single.id === item.id;
1034
+ });
1035
+ if (currentIndex !== -1) {
1036
+ item.add_price = single[currentIndex].add_price;
1037
+ item.name = single[currentIndex].name;
1038
+ _single.push(item);
1039
+ }
1040
+ };
1041
+ for (var index = 0; index < currentValue.length; index++) {
1042
+ _loop();
1043
+ }
1044
+ return _single;
1045
+ }
1046
+
1047
+ /**
1048
+ * @title: 更新套餐价格
1049
+ * @description:
1050
+ * @param {any} currentValue
1051
+ * @param {any} param2
1052
+ * @return {*}
1053
+ * @Author: WangHan
1054
+ * @Date: 2024-12-31 15:17
1055
+ */
1056
+ function updateBundlePrice(currentValue, _ref12) {
1057
+ var _ref13 = _slicedToArray(_ref12, 2),
1058
+ bundle = _ref13[0],
1059
+ single = _ref13[1];
1060
+ var _bundle = [];
1061
+ var _loop2 = function _loop2() {
1062
+ var item = currentValue[index];
1063
+ var currentIndex = bundle.findIndex(function (_bundle) {
1064
+ return _bundle.id === item.id;
1065
+ });
1066
+ if (currentIndex !== -1 && bundle[currentIndex]) {
1067
+ var _item$option;
1068
+ // currentValue.splice(index, 1);
1069
+ item.title = bundle[currentIndex].title;
1070
+ item.price_type = bundle[currentIndex].price_type;
1071
+ item._price = bundle[currentIndex].price;
1072
+ var bundle_sum_price = parseFloat(bundle[currentIndex].price_type === 'markdown' ? bundle[currentIndex].price * -1 : bundle[currentIndex].price).toFixed(2);
1073
+ item.price = bundle_sum_price;
1074
+ item.bundle_sum_price = bundle_sum_price;
1075
+ // 如果有单规格
1076
+ if (item !== null && item !== void 0 && (_item$option = item.option) !== null && _item$option !== void 0 && _item$option.length) {
1077
+ var _option = JSON.parse(JSON.stringify(item.option));
1078
+ item.option = updateSinglePrice(_option, single);
1079
+ var optionPrice = 0;
1080
+ optionPrice = calculateTotalPrice(item.option);
1081
+ var _bundle_sum_price = (parseFloat(bundle[currentIndex].price_type === 'markdown' ? bundle[currentIndex].price * -1 : bundle[currentIndex].price) + optionPrice).toFixed(2);
1082
+ item.price = _bundle_sum_price;
1083
+ item.bundle_sum_price = _bundle_sum_price;
1084
+ }
1085
+ _bundle.push(item);
1086
+ }
1087
+ };
1088
+ for (var index = 0; index < currentValue.length; index++) {
1089
+ _loop2();
1090
+ }
1091
+ return _bundle;
1092
+ }
1093
+
1094
+ /**
1095
+ * @title: 平铺套餐数据
1096
+ * @description:
1097
+ * @param {any} newPackageData
1098
+ * @return {*}
1099
+ * @Author: WangHan
1100
+ * @Date: 2024-12-31 15:17
1101
+ */
1102
+ function flatData(newPackageData) {
1103
+ var bundle = [];
1104
+ var single = [];
1105
+ // 获取所有的套餐
1106
+ var _iterator = _createForOfIteratorHelper(newPackageData),
1107
+ _step;
1108
+ try {
1109
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1110
+ var _group$bundle_item;
1111
+ var _group = _step.value;
1112
+ if (_group !== null && _group !== void 0 && (_group$bundle_item = _group.bundle_item) !== null && _group$bundle_item !== void 0 && _group$bundle_item.length) {
1113
+ var _iterator4 = _createForOfIteratorHelper(_group.bundle_item),
1114
+ _step4;
1115
+ try {
1116
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
1117
+ var _item = _step4.value;
1118
+ bundle.push(_item);
1119
+ }
1120
+ } catch (err) {
1121
+ _iterator4.e(err);
1122
+ } finally {
1123
+ _iterator4.f();
1124
+ }
1125
+ }
1126
+ }
1127
+
1128
+ // 获取到所有的规格
1129
+ } catch (err) {
1130
+ _iterator.e(err);
1131
+ } finally {
1132
+ _iterator.f();
1133
+ }
1134
+ for (var _i = 0, _bundle2 = bundle; _i < _bundle2.length; _i++) {
1135
+ var _bundleItem$option_gr;
1136
+ var bundleItem = _bundle2[_i];
1137
+ if (bundleItem !== null && bundleItem !== void 0 && (_bundleItem$option_gr = bundleItem.option_group) !== null && _bundleItem$option_gr !== void 0 && _bundleItem$option_gr.length) {
1138
+ var _iterator2 = _createForOfIteratorHelper(bundleItem.option_group),
1139
+ _step2;
1140
+ try {
1141
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1142
+ var _group$option_item;
1143
+ var group = _step2.value;
1144
+ if (group !== null && group !== void 0 && (_group$option_item = group.option_item) !== null && _group$option_item !== void 0 && _group$option_item.length) {
1145
+ var _iterator3 = _createForOfIteratorHelper(group.option_item),
1146
+ _step3;
1147
+ try {
1148
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1149
+ var item = _step3.value;
1150
+ single.push(item);
1151
+ }
1152
+ } catch (err) {
1153
+ _iterator3.e(err);
1154
+ } finally {
1155
+ _iterator3.f();
1156
+ }
1157
+ }
1158
+ }
1159
+ } catch (err) {
1160
+ _iterator2.e(err);
1161
+ } finally {
1162
+ _iterator2.f();
1163
+ }
1164
+ }
1165
+ }
1166
+ return [bundle, single];
1167
+ }
1168
+
1169
+ /**
1170
+ * @title: 更新套餐的价格
1171
+ * @description:
1172
+ * @param {any} currentValue
1173
+ * @param {any} newBundleData
1174
+ * @return {*}
1175
+ * @Author: WangHan
1176
+ * @Date: 2024-12-31 15:16
1177
+ */
1178
+ export function updateNormalBundlePrice(currentValue, newBundleData) {
1179
+ var _currentValue = JSON.parse(JSON.stringify(currentValue));
1180
+ var _flatData = flatData(newBundleData);
1181
+ var newValue = updateBundlePrice(_currentValue, _flatData);
1182
+ return newValue;
1183
+ }
1184
+
1185
+ /**
1186
+ * @title: 更新普通商品价格
1187
+ * @description:
1188
+ * @param {any} ids
1189
+ * @param {any} state
1190
+ * @return {*}
1191
+ * @Author: WangHan
1192
+ * @Date: 2024-12-31 15:15
1193
+ */
1194
+ var normalServicePrice = /*#__PURE__*/function () {
1195
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ids, state) {
1196
+ var _state$service6, _state$client, _data$list;
1197
+ var services, customerId, data, _lists;
1198
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1199
+ while (1) switch (_context.prev = _context.next) {
1200
+ case 0:
1201
+ services = ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : _state$service6.value) || [];
1202
+ customerId = (state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id) || 0;
1203
+ _context.next = 4;
1204
+ return state.apis.getServices({
1205
+ skip: 1,
1206
+ num: 500,
1207
+ ids: ids,
1208
+ customer_id: customerId,
1209
+ open_quotation: 1,
1210
+ open_bundle: 1,
1211
+ with: ['bundleGroup.bundleItem', 'optionGroup.optionItem'],
1212
+ _config: {
1213
+ abort: true
1214
+ }
1215
+ });
1216
+ case 4:
1217
+ data = _context.sent;
1218
+ if (data !== null && data !== void 0 && (_data$list = data.list) !== null && _data$list !== void 0 && _data$list.length) {
1219
+ _context.next = 7;
1220
+ break;
1221
+ }
1222
+ return _context.abrupt("return");
1223
+ case 7:
1224
+ _lists = services.map(function (item) {
1225
+ var obj = _objectSpread({}, item);
1226
+ if (!appointmentTypes.includes(obj.extension_type)) {
1227
+ // 在商品列表中根据商品id找到对应的商品数据
1228
+ var product = data.list.find(function (p) {
1229
+ return p.id === (item === null || item === void 0 ? void 0 : item.product_id);
1230
+ });
1231
+ var _extend = (obj === null || obj === void 0 ? void 0 : obj._extend) || {};
1232
+ var other = (_extend === null || _extend === void 0 ? void 0 : _extend.other) || {};
1233
+ if (product) {
1234
+ var _product$variant, _other$bundle, _product$bundle_group;
1235
+ // 如果有多规格的话则更新价格为多规格的价格
1236
+ if (product !== null && product !== void 0 && (_product$variant = product.variant) !== null && _product$variant !== void 0 && _product$variant.length && other !== null && other !== void 0 && other.product_variant_id) {
1237
+ var _product$variant2;
1238
+ var _variant = product === null || product === void 0 || (_product$variant2 = product.variant) === null || _product$variant2 === void 0 ? void 0 : _product$variant2.find(function (v) {
1239
+ return v.id === (other === null || other === void 0 ? void 0 : other.product_variant_id);
1240
+ });
1241
+ obj._extend.price = Number(_variant === null || _variant === void 0 ? void 0 : _variant.price);
1242
+ obj._extend.other.price = Number(_variant === null || _variant === void 0 ? void 0 : _variant.price);
1243
+ } else {
1244
+ obj._extend.price = Number(product === null || product === void 0 ? void 0 : product.price);
1245
+ }
1246
+
1247
+ // 更新套餐的价格
1248
+ if (other !== null && other !== void 0 && (_other$bundle = other.bundle) !== null && _other$bundle !== void 0 && _other$bundle.length && product !== null && product !== void 0 && (_product$bundle_group = product.bundle_group) !== null && _product$bundle_group !== void 0 && _product$bundle_group.length) {
1249
+ var _bundle = updateNormalBundlePrice(other.bundle, product === null || product === void 0 ? void 0 : product.bundle_group);
1250
+ obj._extend.other = _objectSpread(_objectSpread({}, other), {}, {
1251
+ bundle: _bundle
1252
+ });
1253
+ }
1254
+
1255
+ // 更新总计
1256
+ obj._extend.total = getProductTotalPrice(obj);
1257
+ obj._extend.origin_total = getProductTotalPrice(obj);
1258
+ }
1259
+ }
1260
+ return obj;
1261
+ });
1262
+ return _context.abrupt("return", _lists);
1263
+ case 9:
1264
+ case "end":
1265
+ return _context.stop();
1266
+ }
1267
+ }, _callee);
1268
+ }));
1269
+ return function normalServicePrice(_x, _x2) {
1270
+ return _ref14.apply(this, arguments);
1271
+ };
1272
+ }();
1273
+
1274
+ /**
1275
+ * @title: 更新预约商品报价单
1276
+ * @description:
1277
+ * @param {any} state
1278
+ * @param {any} cacheItem
1279
+ * @return {*}
1280
+ * @Author: WangHan
1281
+ * @Date: 2024-12-25 16:41
1282
+ */
1283
+ export var updateAppointmentServicePrice = /*#__PURE__*/function () {
1284
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(state, _ref15) {
1285
+ var _state$service7;
1286
+ var start_date, end_date, product_id, defaultReturn, _state$client2, _state$service$cacheI, _res$data, _res$data2, format, customer_id, _product_id, multi_day_price, startDate, endDate, params, res, _prices;
1287
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1288
+ while (1) switch (_context2.prev = _context2.next) {
1289
+ case 0:
1290
+ start_date = _ref15.start_date, end_date = _ref15.end_date, product_id = _ref15.product_id;
1291
+ defaultReturn = {
1292
+ multiDayPrices: [],
1293
+ price: Number(state === null || state === void 0 || (_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 ? void 0 : _state$service7.price) || 0
1294
+ };
1295
+ _context2.prev = 2;
1296
+ format = 'YYYY-MM-DD';
1297
+ customer_id = (state === null || state === void 0 || (_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id) || 1;
1298
+ _product_id = product_id || ((_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI.product_id) || 0;
1299
+ multi_day_price = null;
1300
+ if (product_id) {
1301
+ _context2.next = 10;
1302
+ break;
1303
+ }
1304
+ console.log('updateAppointmentServicePrice', product_id);
1305
+ return _context2.abrupt("return", defaultReturn);
1306
+ case 10:
1307
+ startDate = dayjs(start_date).format(format);
1308
+ endDate = dayjs(end_date).subtract(1, 'days').format(format);
1309
+ params = {
1310
+ customer_id: customer_id,
1311
+ multi_day: {
1312
+ start: startDate,
1313
+ end: endDate
1314
+ }
1315
+ };
1316
+ _context2.next = 15;
1317
+ return postMultiDay(_product_id, params);
1318
+ case 15:
1319
+ res = _context2.sent;
1320
+ _prices = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.multi_day_price) || []; // 如果接口返回的有报价单,则分割商品数据
1321
+ multi_day_price = _prices === null || _prices === void 0 ? void 0 : _prices.map(function (p) {
1322
+ var _p$multi_day, _p$multi_day2;
1323
+ var startDate = dayjs(p === null || p === void 0 || (_p$multi_day = p.multi_day) === null || _p$multi_day === void 0 ? void 0 : _p$multi_day.start);
1324
+ // 将返回的结束日期+1天,(前端计算得出的两个日期之间的天数是按照中间的间隔来计算的,而后端返回的报价单的日期是按照当天来计算的)
1325
+ var endDate = dayjs(p === null || p === void 0 || (_p$multi_day2 = p.multi_day) === null || _p$multi_day2 === void 0 ? void 0 : _p$multi_day2.end).add(1, 'day');
1326
+ var duration = (endDate === null || endDate === void 0 ? void 0 : endDate.diff(startDate, 'day')) || 1;
1327
+ return {
1328
+ total: Number(p === null || p === void 0 ? void 0 : p.price),
1329
+ origin_total: Number(p === null || p === void 0 ? void 0 : p.price),
1330
+ num: duration,
1331
+ quotation_id: (p === null || p === void 0 ? void 0 : p.quotation_id) || 0,
1332
+ start_date: startDate === null || startDate === void 0 ? void 0 : startDate.format(format),
1333
+ end_date: endDate === null || endDate === void 0 ? void 0 : endDate.format(format)
1334
+ };
1335
+ });
1336
+ return _context2.abrupt("return", {
1337
+ multiDayPrices: multi_day_price,
1338
+ price: Number(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.price) || 0
1339
+ });
1340
+ case 21:
1341
+ _context2.prev = 21;
1342
+ _context2.t0 = _context2["catch"](2);
1343
+ console.log('updateAppointmentServicePrice', _context2.t0);
1344
+ case 24:
1345
+ return _context2.abrupt("return", defaultReturn);
1346
+ case 25:
1347
+ case "end":
1348
+ return _context2.stop();
1349
+ }
1350
+ }, _callee2, null, [[2, 21]]);
1351
+ }));
1352
+ return function updateAppointmentServicePrice(_x3, _x4) {
1353
+ return _ref16.apply(this, arguments);
1354
+ };
1355
+ }();
1356
+
1357
+ /**
1358
+ * @title: 更新普通商品报价单价格
1359
+ * @description:
1360
+ * @param {any} state
1361
+ * @return {*}
1362
+ * @Author: WangHan
1363
+ * @Date: 2024-12-24 11:32
1364
+ */
1365
+ export var updateServicePrice = function updateServicePrice(state) {
1366
+ var _state$service8, _newNormalIds;
1367
+ var services = ((_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : _state$service8.value) || [];
1368
+
1369
+ // 普通商品
1370
+ var normalServices = services === null || services === void 0 ? void 0 : services.filter(function (item) {
1371
+ return isEventBooking(state) ? true : !appointmentTypes.includes(item.extension_type);
1372
+ });
1373
+
1374
+ // 普通商品ids去重
1375
+ var newNormalIds = normalServices === null || normalServices === void 0 ? void 0 : normalServices.map(function (item) {
1376
+ return (item === null || item === void 0 ? void 0 : item.product_id) || (item === null || item === void 0 ? void 0 : item.id);
1377
+ });
1378
+
1379
+ // ids去重
1380
+ newNormalIds = _toConsumableArray(new Set(newNormalIds));
1381
+ if ((_newNormalIds = newNormalIds) !== null && _newNormalIds !== void 0 && _newNormalIds.length) {
1382
+ return normalServicePrice(newNormalIds, state);
1383
+ }
1384
+ return [];
1385
+ };