@pisell/private-materials 3.2.38 → 3.3.0

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 (372) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Sales/Summary/utils.d.ts +1 -1
  8. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  9. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -114
  10. package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
  11. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
  12. package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
  13. package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  14. package/es/components/appointmentBooking/components/Cart/index.js +2 -7
  15. package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  16. package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
  17. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  18. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
  19. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  20. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  21. package/es/components/appointmentBooking/components/Content/index.js +76 -9
  22. package/es/components/appointmentBooking/components/Content/index.less +21 -0
  23. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Date/index.js +131 -38
  25. package/es/components/appointmentBooking/components/Date/index.less +1 -1
  26. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  27. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  28. package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
  29. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  30. package/es/components/appointmentBooking/components/Footer/index.js +8 -2
  31. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  32. package/es/components/appointmentBooking/components/Form/index.js +200 -0
  33. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  34. package/es/components/appointmentBooking/components/Guest/index.js +1 -1
  35. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  36. package/es/components/appointmentBooking/components/Header/index.js +53 -19
  37. package/es/components/appointmentBooking/components/Resource/index.js +67 -12
  38. package/es/components/appointmentBooking/components/Services/index.js +213 -75
  39. package/es/components/appointmentBooking/components/Services/index.less +0 -14
  40. package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
  41. package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  42. package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
  43. package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
  44. package/es/components/appointmentBooking/context.d.ts +4 -4
  45. package/es/components/appointmentBooking/context.js +42 -33
  46. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  47. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
  48. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  49. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  50. package/es/components/appointmentBooking/deposit/index.js +101 -0
  51. package/es/components/appointmentBooking/deposit/index.less +57 -0
  52. package/es/components/appointmentBooking/hooks.d.ts +29 -1
  53. package/es/components/appointmentBooking/hooks.js +382 -114
  54. package/es/components/appointmentBooking/index.d.ts +0 -1
  55. package/es/components/appointmentBooking/index.js +9 -4
  56. package/es/components/appointmentBooking/locales.d.ts +51 -3
  57. package/es/components/appointmentBooking/locales.js +58 -4
  58. package/es/components/appointmentBooking/utils.d.ts +66 -1
  59. package/es/components/appointmentBooking/utils.js +226 -33
  60. package/es/components/booking/addons/index.js +10 -6
  61. package/es/components/booking/components/footer/index.d.ts +0 -1
  62. package/es/components/booking/components/footer/index.js +90 -72
  63. package/es/components/booking/components/footer/utils.d.ts +11 -0
  64. package/es/components/booking/components/footer/utils.js +72 -44
  65. package/es/components/booking/components/voucher/index.js +22 -6
  66. package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  67. package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  68. package/es/components/booking/info/hooks/useAddHolder.js +70 -0
  69. package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  70. package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
  71. package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  72. package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
  73. package/es/components/booking/info/index.js +9 -2
  74. package/es/components/booking/info/main.js +1 -1
  75. package/es/components/booking/info/pet/index.js +18 -17
  76. package/es/components/booking/info/service/Lists.d.ts +2 -0
  77. package/es/components/booking/info/service/Lists.js +119 -0
  78. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  79. package/es/components/booking/info/service/addService/index.js +7 -5
  80. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  81. package/es/components/booking/info/service/editService/index.js +7 -5
  82. package/es/components/booking/info/service/index.js +2 -2
  83. package/es/components/booking/info/service/serviceList/index.js +1 -0
  84. package/es/components/booking/info/service/serviceManager/index.js +12 -7
  85. package/es/components/booking/info/service2/Group/utils.js +2 -1
  86. package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
  87. package/es/components/booking/info/service2/utils.d.ts +5 -4
  88. package/es/components/booking/info/service2/utils.js +356 -88
  89. package/es/components/booking/info/utils.d.ts +2 -0
  90. package/es/components/booking/info/utils.js +45 -1
  91. package/es/components/booking/info2/index.js +9 -6
  92. package/es/components/booking/info2/serve.d.ts +2 -2
  93. package/es/components/booking/info2/serve.js +8 -15
  94. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  95. package/es/components/booking/info2/service/addService/index.js +13 -8
  96. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  97. package/es/components/booking/info2/service/addService/utils.js +49 -14
  98. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  99. package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
  100. package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
  101. package/es/components/booking/info2/service/editService/index.js +4 -3
  102. package/es/components/booking/info2/service/index.js +18 -37
  103. package/es/components/booking/info2/utils.d.ts +4 -0
  104. package/es/components/booking/info2/utils.js +43 -0
  105. package/es/components/booking/info2/utilsByBooking.js +17 -4
  106. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  107. package/es/components/booking/materiels/holder/index.js +2 -2
  108. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  109. package/es/components/booking/notes/addNote/index.js +1 -1
  110. package/es/components/booking/notes/addNote/index.less +3 -0
  111. package/es/components/booking/utils.d.ts +1 -0
  112. package/es/components/booking/utils.js +20 -8
  113. package/es/components/eftposPay/amount.d.ts +1 -1
  114. package/es/components/eftposPay/device.d.ts +1 -1
  115. package/es/components/eftposPay/hooks.d.ts +1 -1
  116. package/es/components/eftposPay/store/index.d.ts +1 -1
  117. package/es/components/index.d.ts +2 -1
  118. package/es/components/index.js +2 -1
  119. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  120. package/es/components/productSelect/components/TabProduct/index.js +176 -0
  121. package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
  122. package/es/components/productSelect/components/gridLayout/index.js +28 -0
  123. package/es/components/productSelect/components/gridLayout/index.less +6 -0
  124. package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
  125. package/es/components/productSelect/components/productGroup/index.js +145 -0
  126. package/es/components/productSelect/components/productGroup/index.less +208 -0
  127. package/es/components/productSelect/hooks/useToken.d.ts +18 -0
  128. package/es/components/productSelect/hooks/useToken.js +35 -0
  129. package/es/components/productSelect/index.d.ts +23 -0
  130. package/es/components/productSelect/index.js +93 -0
  131. package/es/components/productSelect/index.less +69 -0
  132. package/es/components/productSelect/locales.d.ts +18 -0
  133. package/es/components/productSelect/locales.js +17 -0
  134. package/es/components/productSelect/mock.d.ts +134 -0
  135. package/es/components/productSelect/mock.js +202 -0
  136. package/es/components/productSelect/theme/token.d.ts +17 -0
  137. package/es/components/productSelect/theme/token.js +19 -0
  138. package/es/components/shoppingCart/Provider.d.ts +1 -1
  139. package/es/components/shoppingCart/Provider.js +3 -1
  140. package/es/components/shoppingCart/components/Cart/Product.js +15 -3
  141. package/es/components/shoppingCart/components/Cart/index.less +15 -15
  142. package/es/components/shoppingCart/components/Render/index.less +15 -0
  143. package/es/components/shoppingCart/hooks/useAddService.js +7 -1
  144. package/es/components/shoppingCart/index.d.ts +1 -2
  145. package/es/components/shoppingCart/index.js +3 -1
  146. package/es/components/shoppingCart/status.js +4 -1
  147. package/es/components/shoppingCart/type.d.ts +5 -0
  148. package/es/components/subTotal/index.d.ts +22 -0
  149. package/es/components/subTotal/index.js +234 -0
  150. package/es/components/subTotal/index.less +70 -0
  151. package/es/components/subTotal/locales.d.ts +42 -0
  152. package/es/components/subTotal/locales.js +41 -0
  153. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  154. package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
  155. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  156. package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
  157. package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  158. package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  159. package/es/components/ticketBooking/components/menuBar/index.js +54 -0
  160. package/es/components/ticketBooking/components/menuBar/index.less +84 -0
  161. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  162. package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
  163. package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
  164. package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  165. package/es/components/ticketBooking/components/timeBar/index.js +113 -0
  166. package/es/components/ticketBooking/components/timeBar/index.less +22 -0
  167. package/es/components/ticketBooking/data.d.ts +58 -0
  168. package/es/components/ticketBooking/data.js +58 -58
  169. package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  170. package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
  171. package/es/components/ticketBooking/index.d.ts +3 -3
  172. package/es/components/ticketBooking/index.js +139 -5
  173. package/es/components/ticketBooking/index.less +4 -0
  174. package/es/components/ticketBooking/locales.d.ts +144 -0
  175. package/es/components/ticketBooking/locales.js +143 -0
  176. package/es/components/ticketBooking/miniRedux.d.ts +22 -0
  177. package/es/components/ticketBooking/miniRedux.js +105 -0
  178. package/es/components/ticketBooking/serve.d.ts +282 -0
  179. package/es/components/ticketBooking/serve.js +957 -0
  180. package/es/components/ticketBooking/utils/index.d.ts +14 -0
  181. package/es/components/ticketBooking/utils/index.js +102 -0
  182. package/es/components/wallet/components/WalletCard.js +1 -1
  183. package/es/index.d.ts +3 -0
  184. package/es/index.js +4 -1
  185. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  186. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  187. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -73
  188. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
  189. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
  190. package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
  191. package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  192. package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
  193. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  194. package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
  195. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  196. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
  197. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  198. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  199. package/lib/components/appointmentBooking/components/Content/index.js +59 -5
  200. package/lib/components/appointmentBooking/components/Content/index.less +21 -0
  201. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
  202. package/lib/components/appointmentBooking/components/Date/index.js +47 -19
  203. package/lib/components/appointmentBooking/components/Date/index.less +1 -1
  204. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  205. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  206. package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
  207. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  208. package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
  209. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  210. package/lib/components/appointmentBooking/components/Form/index.js +157 -0
  211. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  212. package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
  213. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  214. package/lib/components/appointmentBooking/components/Header/index.js +31 -13
  215. package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
  216. package/lib/components/appointmentBooking/components/Services/index.js +86 -63
  217. package/lib/components/appointmentBooking/components/Services/index.less +0 -14
  218. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
  219. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  220. package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
  221. package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
  222. package/lib/components/appointmentBooking/context.d.ts +4 -4
  223. package/lib/components/appointmentBooking/context.js +15 -10
  224. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  225. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
  226. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  227. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  228. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  229. package/lib/components/appointmentBooking/deposit/index.less +57 -0
  230. package/lib/components/appointmentBooking/hooks.d.ts +29 -1
  231. package/lib/components/appointmentBooking/hooks.js +148 -22
  232. package/lib/components/appointmentBooking/index.d.ts +0 -1
  233. package/lib/components/appointmentBooking/index.js +6 -4
  234. package/lib/components/appointmentBooking/locales.d.ts +51 -3
  235. package/lib/components/appointmentBooking/locales.js +52 -4
  236. package/lib/components/appointmentBooking/utils.d.ts +66 -1
  237. package/lib/components/appointmentBooking/utils.js +158 -33
  238. package/lib/components/booking/addons/index.js +9 -5
  239. package/lib/components/booking/components/footer/index.d.ts +0 -1
  240. package/lib/components/booking/components/footer/index.js +94 -32
  241. package/lib/components/booking/components/footer/utils.d.ts +11 -0
  242. package/lib/components/booking/components/footer/utils.js +38 -14
  243. package/lib/components/booking/components/voucher/index.js +18 -2
  244. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  245. package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  246. package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
  247. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  248. package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
  249. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  250. package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
  251. package/lib/components/booking/info/index.js +5 -1
  252. package/lib/components/booking/info/main.js +1 -1
  253. package/lib/components/booking/info/pet/index.js +3 -2
  254. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  255. package/lib/components/booking/info/service/Lists.js +106 -0
  256. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  257. package/lib/components/booking/info/service/addService/index.js +6 -4
  258. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  259. package/lib/components/booking/info/service/editService/index.js +5 -3
  260. package/lib/components/booking/info/service/index.js +1 -1
  261. package/lib/components/booking/info/service/serviceList/index.js +1 -0
  262. package/lib/components/booking/info/service/serviceManager/index.js +6 -1
  263. package/lib/components/booking/info/service2/Group/utils.js +2 -1
  264. package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
  265. package/lib/components/booking/info/service2/utils.d.ts +5 -4
  266. package/lib/components/booking/info/service2/utils.js +304 -30
  267. package/lib/components/booking/info/utils.d.ts +2 -0
  268. package/lib/components/booking/info/utils.js +40 -1
  269. package/lib/components/booking/info2/index.js +6 -1
  270. package/lib/components/booking/info2/serve.d.ts +2 -2
  271. package/lib/components/booking/info2/serve.js +3 -10
  272. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  273. package/lib/components/booking/info2/service/addService/index.js +11 -6
  274. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  275. package/lib/components/booking/info2/service/addService/utils.js +50 -17
  276. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  277. package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
  278. package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
  279. package/lib/components/booking/info2/service/editService/index.js +3 -1
  280. package/lib/components/booking/info2/service/index.js +18 -28
  281. package/lib/components/booking/info2/utils.d.ts +4 -0
  282. package/lib/components/booking/info2/utils.js +65 -0
  283. package/lib/components/booking/info2/utilsByBooking.js +12 -3
  284. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  285. package/lib/components/booking/materiels/holder/index.js +2 -2
  286. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  287. package/lib/components/booking/notes/addNote/index.js +1 -1
  288. package/lib/components/booking/notes/addNote/index.less +3 -0
  289. package/lib/components/booking/utils.d.ts +1 -0
  290. package/lib/components/booking/utils.js +25 -10
  291. package/lib/components/eftposPay/amount.d.ts +1 -1
  292. package/lib/components/eftposPay/device.d.ts +1 -1
  293. package/lib/components/eftposPay/hooks.d.ts +1 -1
  294. package/lib/components/eftposPay/store/index.d.ts +1 -1
  295. package/lib/components/index.d.ts +2 -1
  296. package/lib/components/index.js +3 -0
  297. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  298. package/lib/components/productSelect/components/TabProduct/index.js +172 -0
  299. package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
  300. package/lib/components/productSelect/components/gridLayout/index.js +58 -0
  301. package/lib/components/productSelect/components/gridLayout/index.less +6 -0
  302. package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
  303. package/lib/components/productSelect/components/productGroup/index.js +122 -0
  304. package/lib/components/productSelect/components/productGroup/index.less +208 -0
  305. package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
  306. package/lib/components/productSelect/hooks/useToken.js +51 -0
  307. package/lib/components/productSelect/index.d.ts +23 -0
  308. package/lib/components/productSelect/index.js +119 -0
  309. package/lib/components/productSelect/index.less +69 -0
  310. package/lib/components/productSelect/locales.d.ts +18 -0
  311. package/lib/components/productSelect/locales.js +41 -0
  312. package/lib/components/productSelect/mock.d.ts +134 -0
  313. package/lib/components/productSelect/mock.js +276 -0
  314. package/lib/components/productSelect/theme/token.d.ts +17 -0
  315. package/lib/components/productSelect/theme/token.js +47 -0
  316. package/lib/components/shoppingCart/Provider.d.ts +1 -1
  317. package/lib/components/shoppingCart/Provider.js +3 -1
  318. package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
  319. package/lib/components/shoppingCart/components/Cart/index.less +15 -15
  320. package/lib/components/shoppingCart/components/Render/index.less +15 -0
  321. package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
  322. package/lib/components/shoppingCart/index.d.ts +1 -2
  323. package/lib/components/shoppingCart/index.js +2 -0
  324. package/lib/components/shoppingCart/status.js +4 -1
  325. package/lib/components/shoppingCart/type.d.ts +5 -0
  326. package/lib/components/subTotal/index.d.ts +22 -0
  327. package/lib/components/subTotal/index.js +175 -0
  328. package/lib/components/subTotal/index.less +70 -0
  329. package/lib/components/subTotal/locales.d.ts +42 -0
  330. package/lib/components/subTotal/locales.js +65 -0
  331. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  332. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
  333. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  334. package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
  335. package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  336. package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  337. package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
  338. package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
  339. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  340. package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
  341. package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
  342. package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  343. package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
  344. package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
  345. package/lib/components/ticketBooking/data.d.ts +58 -0
  346. package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  347. package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
  348. package/lib/components/ticketBooking/index.d.ts +3 -3
  349. package/lib/components/ticketBooking/index.js +159 -3
  350. package/lib/components/ticketBooking/index.less +4 -0
  351. package/lib/components/ticketBooking/locales.d.ts +144 -0
  352. package/lib/components/ticketBooking/locales.js +167 -0
  353. package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
  354. package/lib/components/ticketBooking/miniRedux.js +96 -0
  355. package/lib/components/ticketBooking/serve.d.ts +282 -0
  356. package/lib/components/ticketBooking/serve.js +214 -0
  357. package/lib/components/ticketBooking/utils/index.d.ts +14 -0
  358. package/lib/components/ticketBooking/utils/index.js +131 -0
  359. package/lib/components/wallet/components/WalletCard.js +1 -1
  360. package/lib/index.d.ts +3 -0
  361. package/lib/index.js +9 -0
  362. package/lowcode/appointment-deposit/meta.ts +58 -0
  363. package/lowcode/product-select/meta.ts +217 -0
  364. package/lowcode/sub-total/meta.ts +134 -0
  365. package/lowcode/ticket-booking/meta.ts +29 -0
  366. package/package.json +2 -2
  367. package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  368. package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
  369. package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
  370. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  371. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
  372. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
@@ -67,6 +67,10 @@ var import_status = require("./status");
67
67
  var import_serve = require("../service/serve");
68
68
  var import_locales = __toESM(require("../../locales"));
69
69
  var import_utils3 = require("./Group/utils");
70
+ var import_utils4 = require("../utils");
71
+ var import_utils5 = require("../service/addService/utils");
72
+ var import_utils6 = require("../../info2/service/addService/utils");
73
+ var import_utilsByBooking = require("../../info2/utilsByBooking");
70
74
  import_utils2.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
71
75
  var formatActiveKey = (lists, platform, isEdit) => {
72
76
  var _a;
@@ -151,9 +155,128 @@ var isBookingProduct = (extension_type, bol) => {
151
155
  var isDayBookingProduct = (item, state) => {
152
156
  return isBookingProduct(item == null ? void 0 : item.extension_type) && state.renderType === "dayBooking";
153
157
  };
154
- var updateServices = (state, currentItem, type, other) => {
155
- var _a;
156
- let products = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || [];
158
+ var currentResource = (state, useResource, cacheItem) => {
159
+ const resourcesOrigin = state.service.resourcesOrigin;
160
+ const resources = (0, import_utils5.formatResources)({
161
+ cacheItem,
162
+ resourcesOrigin,
163
+ isDay: false
164
+ });
165
+ let item = resources.find((d) => d.form_record_id == useResource) || {};
166
+ return item;
167
+ };
168
+ var handleChangeHolder = (products, currentItem, other) => {
169
+ return products.map((item) => {
170
+ if (item._id === currentItem._id) {
171
+ return {
172
+ ...item,
173
+ _extend: {
174
+ ...item._extend,
175
+ holder_id: other.id
176
+ }
177
+ };
178
+ }
179
+ return item;
180
+ });
181
+ };
182
+ var handleLike = (products, currentItem, other) => {
183
+ return products.map((item) => {
184
+ var _a, _b;
185
+ if (currentItem.isParallelResource) {
186
+ if (item._id === currentItem.serviceId) {
187
+ return {
188
+ ...item,
189
+ _extend: {
190
+ ...item._extend,
191
+ resource: {
192
+ ...(_a = item._extend) == null ? void 0 : _a.resource,
193
+ [currentItem.resourceId]: (_b = item._extend) == null ? void 0 : _b.resource[currentItem.resourceId].map((item2) => ({
194
+ ...item2,
195
+ like_status: other.like_status
196
+ }))
197
+ }
198
+ }
199
+ };
200
+ }
201
+ return item;
202
+ } else {
203
+ if (item._id === currentItem._id) {
204
+ return {
205
+ ...item,
206
+ _extend: {
207
+ ...item._extend,
208
+ like_status: other.like_status
209
+ }
210
+ };
211
+ }
212
+ return item;
213
+ }
214
+ });
215
+ };
216
+ var handleChangeResource = (products, currentItem, other, state) => {
217
+ return products.map((item) => {
218
+ var _a;
219
+ const { props, value } = other || {};
220
+ const { isParallelResource, resourceId } = props || {};
221
+ if (isParallelResource) {
222
+ if (item._id === currentItem._id) {
223
+ const hasDataItem = (0, import_utils6.getProductExtend)({
224
+ cacheItem: { ...item, new: 0 },
225
+ state
226
+ });
227
+ const maps = hasDataItem._extend.resource[resourceId] ? hasDataItem._extend.resource[resourceId].reduce((pre, cur) => {
228
+ pre[cur.relation_id] = cur;
229
+ return pre;
230
+ }, {}) : {};
231
+ item._extend.resource[resourceId] = value.map((d) => {
232
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
233
+ const currentForm = ((_a2 = hasDataItem._data.resourceMaps) == null ? void 0 : _a2[resourceId]) || {};
234
+ return (
235
+ // maps[d] 为真时, 说明是之前已选择, 否则为新增的值,补充数据
236
+ maps[d] || {
237
+ relation_type: ((_c = (_b = currentForm.renderListMaps[d]) == null ? void 0 : _b.usable) == null ? void 0 : _c.relation_type) || "form",
238
+ form_id: resourceId,
239
+ relation_id: d,
240
+ like_status: "common",
241
+ // 新添加的数据补充错误信息
242
+ errors: (0, import_utilsByBooking.getErrorList)(
243
+ (_d = currentForm.renderListMaps) == null ? void 0 : _d[d],
244
+ hasDataItem
245
+ ),
246
+ children: (_f = (_e = currentForm.renderListMaps) == null ? void 0 : _e[d]) == null ? void 0 : _f.children,
247
+ metadata: {
248
+ ...(_h = (_g = currentForm.renderListMaps) == null ? void 0 : _g[d]) == null ? void 0 : _h.metadata,
249
+ form_name: currentForm.title,
250
+ resource_name: (_i = currentForm.renderListMaps[d]) == null ? void 0 : _i.main_field
251
+ }
252
+ }
253
+ );
254
+ });
255
+ }
256
+ return item;
257
+ } else {
258
+ if (item._id === currentItem._id) {
259
+ const resourceItem = currentResource(state, other.id, item);
260
+ const { relation_type, item_id, schedule_id } = ((_a = resourceItem == null ? void 0 : resourceItem._extend) == null ? void 0 : _a.usableTime) || {};
261
+ return {
262
+ ...item,
263
+ _extend: {
264
+ ...item._extend,
265
+ resource: item_id || (resourceItem == null ? void 0 : resourceItem.form_record_id) || 0,
266
+ relation_type: relation_type || "form",
267
+ relation_id: item_id || (resourceItem == null ? void 0 : resourceItem.form_record_id) || 0,
268
+ schedule_id: schedule_id || 0
269
+ }
270
+ };
271
+ }
272
+ return item;
273
+ }
274
+ });
275
+ };
276
+ var updateServices = (state, currentItem, type, other, actions) => {
277
+ var _a, _b;
278
+ if (!((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value)) return [];
279
+ let products = ((_b = state == null ? void 0 : state.service) == null ? void 0 : _b.value) || [];
157
280
  const isGroup = (0, import_utils3.isGroupBooking)(currentItem._id);
158
281
  if (type === "delete") {
159
282
  let deleteIds = [];
@@ -165,10 +288,26 @@ var updateServices = (state, currentItem, type, other) => {
165
288
  products = products == null ? void 0 : products.filter((item) => !deleteIds.includes(item == null ? void 0 : item._id));
166
289
  }
167
290
  if (type === "delete_holders") {
168
- products = products == null ? void 0 : products.filter((item) => {
169
- var _a2;
170
- return ((_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.holder_id) !== other;
171
- });
291
+ products = products == null ? void 0 : products.filter(
292
+ (item) => {
293
+ var _a2;
294
+ return ((_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.holder_id) !== other;
295
+ }
296
+ );
297
+ }
298
+ if (type === "change_holder") {
299
+ products = handleChangeHolder(products, currentItem, other);
300
+ }
301
+ if (type === "add_holder") {
302
+ actions == null ? void 0 : actions.handleAddHolder();
303
+ return products;
304
+ }
305
+ if (type === "like") {
306
+ products = handleLike(products, currentItem, other);
307
+ }
308
+ if (type === "change_resource") {
309
+ products = handleChangeResource(products, currentItem, other, state);
310
+ return products;
172
311
  }
173
312
  if (type === "update_holders") {
174
313
  products = products == null ? void 0 : products.map((item) => {
@@ -177,7 +316,9 @@ var updateServices = (state, currentItem, type, other) => {
177
316
  if (ids == null ? void 0 : ids.includes(item == null ? void 0 : item._id)) {
178
317
  let _extend = item._extend || {};
179
318
  if (Array.isArray(other)) {
180
- _extend.holder_id = (_a2 = other.find((other2) => (other2 == null ? void 0 : other2._id) === (item == null ? void 0 : item._id))) == null ? void 0 : _a2.holder_id;
319
+ _extend.holder_id = (_a2 = other.find(
320
+ (other2) => (other2 == null ? void 0 : other2._id) === (item == null ? void 0 : item._id)
321
+ )) == null ? void 0 : _a2.holder_id;
181
322
  } else {
182
323
  _extend.holder_id = other;
183
324
  }
@@ -251,7 +392,111 @@ var formItems = (items) => {
251
392
  };
252
393
  });
253
394
  };
254
- var formatProducts = (lists, state, isRenderGroup = true) => {
395
+ var formatHolders = (items) => {
396
+ return items.map((d) => {
397
+ return {
398
+ id: d == null ? void 0 : d.form_record_id,
399
+ label: d == null ? void 0 : d.main_field
400
+ };
401
+ });
402
+ };
403
+ var getErrorMessageInfo2 = (errorList) => {
404
+ let errorMessage = "";
405
+ if (errorList == null ? void 0 : errorList.length) {
406
+ if (errorList.length === 1) {
407
+ errorMessage = errorList[0].label + " " + errorTypes[errorList[0].type];
408
+ } else {
409
+ errorMessage = `${errorList.length} ${import_utils2.locales.getText(
410
+ "pisell2.text.warnings"
411
+ )}`;
412
+ }
413
+ }
414
+ return errorMessage;
415
+ };
416
+ var getAllErrorList = (item) => {
417
+ const { resourceMaps } = item._data || {};
418
+ const { resource } = item._extend || {};
419
+ const errorList = [];
420
+ Object.entries(resource).forEach(([key, value]) => {
421
+ value.forEach((val) => {
422
+ var _a;
423
+ const list = (0, import_utilsByBooking.getErrorList)((_a = resourceMaps[key]) == null ? void 0 : _a.renderListMaps[val.relation_id], item);
424
+ errorList.push(...list);
425
+ console.log(list, "list");
426
+ });
427
+ });
428
+ return errorList;
429
+ };
430
+ var mapListItems = (items) => items.map((item) => ({
431
+ id: item.id || item.form_record_id,
432
+ label: item.labelText,
433
+ isError: !item.usable
434
+ }));
435
+ var getGeneralParams = (item, state, isParallelResource) => {
436
+ var _a, _b, _c, _d, _e;
437
+ const { pet, service } = state;
438
+ const { holders = [] } = pet || {};
439
+ const parallelResourceOtherParams = {};
440
+ let multiResources;
441
+ if (isParallelResource) {
442
+ const hasDataItem = (0, import_utils6.getProductExtend)({
443
+ cacheItem: { ...item, new: 0 },
444
+ state
445
+ });
446
+ const { resourceMaps, resources } = hasDataItem._data || {};
447
+ parallelResourceOtherParams.errorMessage = getErrorMessageInfo2(getAllErrorList(hasDataItem));
448
+ multiResources = resources.map((resource) => {
449
+ var _a2, _b2;
450
+ const key = resource.form_id;
451
+ const detail = resourceMaps == null ? void 0 : resourceMaps[key];
452
+ const isMultiple = ((_a2 = detail == null ? void 0 : detail.select_type) == null ? void 0 : _a2.type) === "multiple";
453
+ const value = item._extend.resource[key];
454
+ return {
455
+ is_hide_like: isMultiple,
456
+ isParallelResource: true,
457
+ maxLength: isMultiple && detail.select_type.max,
458
+ resourceMode: isMultiple ? "multiple" : void 0,
459
+ serviceId: item._id,
460
+ resourceId: key,
461
+ _id: key,
462
+ id: (value || []).map((val) => val.relation_id),
463
+ status: ((_b2 = value == null ? void 0 : value[0]) == null ? void 0 : _b2.like_status) || "common",
464
+ lists: (detail == null ? void 0 : detail.renderList) ? mapListItems(detail == null ? void 0 : detail.renderList) : []
465
+ };
466
+ });
467
+ } else {
468
+ const { resourcesOrigin } = service || {};
469
+ const resource = (0, import_utils5.formatResources)({
470
+ cacheItem: item,
471
+ resourcesOrigin,
472
+ isDay: false
473
+ });
474
+ multiResources = [
475
+ {
476
+ _id: item._id,
477
+ id: item._extend.resource,
478
+ status: ((_a = item._extend) == null ? void 0 : _a.like_status) || "common",
479
+ lists: mapListItems(resource)
480
+ }
481
+ ];
482
+ }
483
+ return {
484
+ format: ["HH:mm", "HH:mm"],
485
+ show_time: true,
486
+ duration_type: "minutes",
487
+ // 当前可选择holder列表
488
+ holders: formatHolders(holders),
489
+ isShowAction: (0, import_utils4.isShowAddTime)(state, item),
490
+ actionText: import_utils2.locales.getText("page.booking.text.add-time"),
491
+ isMultipleResource: true,
492
+ multiResources,
493
+ holder_id: (_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.holder_id,
494
+ start_date: (_c = item == null ? void 0 : item._extend) == null ? void 0 : _c.startDate,
495
+ end_date: ((_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.endDate) || ((_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.end_date),
496
+ ...parallelResourceOtherParams
497
+ };
498
+ };
499
+ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelResource) => {
255
500
  if (!(lists == null ? void 0 : lists.length)) return [];
256
501
  const normalList = [];
257
502
  const groupList = [];
@@ -264,10 +509,11 @@ var formatProducts = (lists, state, isRenderGroup = true) => {
264
509
  const isNormalProduct = !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || (state == null ? void 0 : state.renderType) === "eventBooking";
265
510
  let resourceItem = {};
266
511
  let errorMessage = "";
267
- if (_isDayBookingProduct) {
512
+ if (_isDayBookingProduct || isGeneral) {
268
513
  resourceItem = getResourceItem((_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.resource, state);
269
514
  errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
270
515
  }
516
+ const generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
271
517
  return {
272
518
  id: item == null ? void 0 : item.id,
273
519
  _id: item == null ? void 0 : item._id,
@@ -295,6 +541,7 @@ var formatProducts = (lists, state, isRenderGroup = true) => {
295
541
  locale: state.locale,
296
542
  symbol: state.amountSymbol,
297
543
  items: isEventBooking(state) ? [] : formItems(((_r = item == null ? void 0 : item._extend) == null ? void 0 : _r.items) || []),
544
+ ...generalParams,
298
545
  _origin: item
299
546
  };
300
547
  };
@@ -315,6 +562,7 @@ var formatProducts = (lists, state, isRenderGroup = true) => {
315
562
  prev[groupId].push(item);
316
563
  return prev;
317
564
  }, {});
565
+ console.log(normalList, "normalList");
318
566
  if (isRenderGroup) {
319
567
  return Object.values(groups).map((d) => formItem((0, import_utils3.concatBookings)(d))).concat(normalList);
320
568
  } else {
@@ -363,7 +611,10 @@ var formatDayTime = ({ startDate, endDate }) => {
363
611
  const result = {
364
612
  startDateTime: (0, import_dayjs.default)(`${start_date}T${shopOpeningTime}:00`),
365
613
  // 结束日期根据营业日时间减去一分钟
366
- endDateTime: (0, import_dayjs.default)(`${end_date}T${shopOpeningTime}:00`).subtract(1, "minute")
614
+ endDateTime: (0, import_dayjs.default)(`${end_date}T${shopOpeningTime}:00`).subtract(
615
+ 1,
616
+ "minute"
617
+ )
367
618
  };
368
619
  return result;
369
620
  };
@@ -395,17 +646,21 @@ var isHasDayAppointmentProduct = (state) => {
395
646
  }
396
647
  return import_status.appointmentTypes.includes(extension_type);
397
648
  };
398
- const appointmentServices = services.filter((d) => checkType(d.extension_type));
649
+ const appointmentServices = services.filter(
650
+ (d) => checkType(d.extension_type)
651
+ );
399
652
  if (!appointmentServices.length) return true;
400
653
  let _pets = pets == null ? void 0 : pets.map((d) => {
401
654
  return {
402
655
  ...d,
403
656
  // 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
404
657
  // services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
405
- services: services.filter((item) => {
406
- var _a2;
407
- return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) == d.form_record_id && checkType(item.extension_type);
408
- })
658
+ services: services.filter(
659
+ (item) => {
660
+ var _a2;
661
+ return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) == d.form_record_id && checkType(item.extension_type);
662
+ }
663
+ )
409
664
  };
410
665
  });
411
666
  _pets = _pets.filter((d) => !d.services.length);
@@ -414,12 +669,16 @@ var isHasDayAppointmentProduct = (state) => {
414
669
  var getDayProducts = (holderId2, lists, isTerminal) => {
415
670
  let _lists = lists || [];
416
671
  if (!holderId2 && !isTerminal) {
417
- _lists = _lists.filter((item) => !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type));
672
+ _lists = _lists.filter(
673
+ (item) => !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type)
674
+ );
418
675
  } else {
419
- _lists = _lists.filter((item) => {
420
- var _a;
421
- return !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) && ((_a = item.duration) == null ? void 0 : _a.type) === "days";
422
- });
676
+ _lists = _lists.filter(
677
+ (item) => {
678
+ var _a;
679
+ return !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) && ((_a = item.duration) == null ? void 0 : _a.type) === "days";
680
+ }
681
+ );
423
682
  }
424
683
  return _lists;
425
684
  };
@@ -432,7 +691,9 @@ var getPets = (state) => {
432
691
  var getAppointmentService = (state) => {
433
692
  var _a;
434
693
  const services = ((_a = state.service) == null ? void 0 : _a.value) || [];
435
- let lists = services.filter((item) => import_status.appointmentTypes.includes(item.extension_type));
694
+ let lists = services.filter(
695
+ (item) => import_status.appointmentTypes.includes(item.extension_type)
696
+ );
436
697
  return lists;
437
698
  };
438
699
  var isOpenDeletePet = (state, newVal) => {
@@ -440,15 +701,21 @@ var isOpenDeletePet = (state, newVal) => {
440
701
  const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
441
702
  const oldPets = ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
442
703
  const newPets = (newVal == null ? void 0 : newVal[form_id]) || [];
443
- const deletePets = oldPets.filter((item) => !newPets.some((newItem) => newItem.form_record_id === item.form_record_id));
704
+ const deletePets = oldPets.filter(
705
+ (item) => !newPets.some(
706
+ (newItem) => newItem.form_record_id === item.form_record_id
707
+ )
708
+ );
444
709
  const servicePets = deletePets.map((item) => {
445
710
  var _a2, _b2;
446
711
  return {
447
712
  ...item,
448
- services: (_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.filter((d) => {
449
- var _a3;
450
- return ((_a3 = d._extend) == null ? void 0 : _a3.holder_id) == item.form_record_id;
451
- })
713
+ services: (_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.filter(
714
+ (d) => {
715
+ var _a3;
716
+ return ((_a3 = d._extend) == null ? void 0 : _a3.holder_id) == item.form_record_id;
717
+ }
718
+ )
452
719
  };
453
720
  });
454
721
  const lists = servicePets.filter((item) => {
@@ -573,14 +840,19 @@ var normalServicePrice = async (ids, state) => {
573
840
  const other = (_extend == null ? void 0 : _extend.other) || {};
574
841
  if (product) {
575
842
  if (((_a2 = product == null ? void 0 : product.variant) == null ? void 0 : _a2.length) && (other == null ? void 0 : other.product_variant_id)) {
576
- const _variant = (_b2 = product == null ? void 0 : product.variant) == null ? void 0 : _b2.find((v) => v.id === (other == null ? void 0 : other.product_variant_id));
843
+ const _variant = (_b2 = product == null ? void 0 : product.variant) == null ? void 0 : _b2.find(
844
+ (v) => v.id === (other == null ? void 0 : other.product_variant_id)
845
+ );
577
846
  obj._extend.price = Number(_variant == null ? void 0 : _variant.price);
578
847
  obj._extend.other.price = Number(_variant == null ? void 0 : _variant.price);
579
848
  } else {
580
849
  obj._extend.price = Number(product == null ? void 0 : product.price);
581
850
  }
582
851
  if (((_c2 = other == null ? void 0 : other.bundle) == null ? void 0 : _c2.length) && ((_d2 = product == null ? void 0 : product.bundle_group) == null ? void 0 : _d2.length)) {
583
- let _bundle = updateNormalBundlePrice(other.bundle, product == null ? void 0 : product.bundle_group);
852
+ let _bundle = updateNormalBundlePrice(
853
+ other.bundle,
854
+ product == null ? void 0 : product.bundle_group
855
+ );
584
856
  obj._extend.other = {
585
857
  ...other,
586
858
  bundle: _bundle
@@ -646,7 +918,9 @@ var updateServicePrice = (state) => {
646
918
  let normalServices = services == null ? void 0 : services.filter(
647
919
  (item) => isEventBooking(state) ? true : !import_status.appointmentTypes.includes(item.extension_type)
648
920
  );
649
- let newNormalIds = normalServices == null ? void 0 : normalServices.map((item) => (item == null ? void 0 : item.product_id) || (item == null ? void 0 : item.id));
921
+ let newNormalIds = normalServices == null ? void 0 : normalServices.map(
922
+ (item) => (item == null ? void 0 : item.product_id) || (item == null ? void 0 : item.id)
923
+ );
650
924
  newNormalIds = [...new Set(newNormalIds)];
651
925
  if (newNormalIds == null ? void 0 : newNormalIds.length) {
652
926
  return normalServicePrice(newNormalIds, state);
@@ -41,4 +41,6 @@ export declare const getMultiDayPrices: (data: DataEntry[]) => ResultStructure;
41
41
  * @Date: 2024-11-29 11:19
42
42
  */
43
43
  export declare const isDayBooking: (shopId: number) => boolean;
44
+ export declare const isOpenAddTime: (state: any) => boolean;
45
+ export declare const isShowAddTime: (state: any, currentService: any) => boolean;
44
46
  export {};
@@ -35,11 +35,15 @@ __export(utils_exports, {
35
35
  isBooking4Shop: () => isBooking4Shop,
36
36
  isDayBooking: () => isDayBooking,
37
37
  isInterval: () => isInterval,
38
+ isOpenAddTime: () => isOpenAddTime,
39
+ isShowAddTime: () => isShowAddTime,
38
40
  moveItemToFront: () => moveItemToFront,
39
41
  uniqueByField: () => uniqueByField
40
42
  });
41
43
  module.exports = __toCommonJS(utils_exports);
42
44
  var import_dayjs = __toESM(require("dayjs"));
45
+ var import_utils = require("../utils");
46
+ var import_utils2 = require("../info2/service/addTimeModal/utils");
43
47
  var getIsBundleOrCombination = (productDetail) => {
44
48
  var _a;
45
49
  if ((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) {
@@ -99,7 +103,7 @@ var isBooking4Shop = (shopId, renderType) => {
99
103
  if (renderType === "eventBooking") {
100
104
  return false;
101
105
  }
102
- const booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581];
106
+ const booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9];
103
107
  return booking4Shops.includes(shopId);
104
108
  };
105
109
  function generateDateRange(start, end) {
@@ -125,6 +129,39 @@ var isDayBooking = (shopId) => {
125
129
  const dayBookingShops = [9];
126
130
  return dayBookingShops.includes(shopId);
127
131
  };
132
+ var getAddTimeProducts = (state, currentService) => {
133
+ return (state.addTimeProducts || []).some(
134
+ (item) => (0, import_utils2.isUsableProduct)(item.add_time, currentService)
135
+ );
136
+ };
137
+ var isOpenAddTime = (state) => {
138
+ var _a, _b, _c;
139
+ const appointment_card = ((_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.information_tab) == null ? void 0 : _c.appointment_card) || {
140
+ quick_time: 1
141
+ };
142
+ if ((state == null ? void 0 : state.renderType) === "eventBooking") {
143
+ return false;
144
+ }
145
+ if (state == null ? void 0 : state.disabledEdit) {
146
+ return false;
147
+ }
148
+ if (appointment_card.quick_time !== 1) {
149
+ return false;
150
+ }
151
+ return true;
152
+ };
153
+ var isShowAddTime = (state, currentService) => {
154
+ if (!isOpenAddTime(state)) {
155
+ return false;
156
+ }
157
+ if ((0, import_utils.getIsEdit)(state)) {
158
+ return false;
159
+ }
160
+ if (!getAddTimeProducts(state, currentService)) {
161
+ return false;
162
+ }
163
+ return true;
164
+ };
128
165
  // Annotate the CommonJS export names for ESM import in node:
129
166
  0 && (module.exports = {
130
167
  formatServiceListByTime,
@@ -133,6 +170,8 @@ var isDayBooking = (shopId) => {
133
170
  isBooking4Shop,
134
171
  isDayBooking,
135
172
  isInterval,
173
+ isOpenAddTime,
174
+ isShowAddTime,
136
175
  moveItemToFront,
137
176
  uniqueByField
138
177
  });
@@ -74,6 +74,8 @@ var Info = (0, import_model.Provider)((props) => {
74
74
  var _a2, _b2, _c2, _d2;
75
75
  return ((_d2 = (_c2 = (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.bookingConfig) == null ? void 0 : _b2.config) == null ? void 0 : _c2.basic) == null ? void 0 : _d2.appointment_subject) || {};
76
76
  }, [(_d = (_c = (_b = (_a = modal.state) == null ? void 0 : _a.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject]);
77
+ const stateRef = (0, import_react.useRef)(globalState);
78
+ stateRef.current = globalState;
77
79
  const { createHeader, isBookingCreatePage, isBookingCreatePageCreateMode } = (0, import_useCreateBookingPageHeader.default)(globalState);
78
80
  (0, import_react.useEffect)(() => {
79
81
  document.body.id = "body";
@@ -153,6 +155,7 @@ var Info = (0, import_model.Provider)((props) => {
153
155
  modal.dispatch({
154
156
  type: "setService",
155
157
  payload: {
158
+ ...stateRef.current.service,
156
159
  resourcesOrigin: bookingResourceList.list || [],
157
160
  resourcesOriginMap: bookingResourceList.listMap
158
161
  }
@@ -161,14 +164,16 @@ var Info = (0, import_model.Provider)((props) => {
161
164
  }
162
165
  try {
163
166
  setTimeout(async () => {
167
+ var _a2;
164
168
  let data = await (0, import_serve.getResourceList)({
165
169
  date: currentDate
166
- });
170
+ }, (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.bookingId);
167
171
  data.date = currentDate;
168
172
  localStorage.setItem("bookingResourceList", JSON.stringify(data));
169
173
  modal.dispatch({
170
174
  type: "setService",
171
175
  payload: {
176
+ ...stateRef.current.service,
172
177
  resourcesOrigin: data.list || [],
173
178
  resourcesOriginMap: data.listMap
174
179
  }
@@ -1,5 +1,5 @@
1
- export declare const getResourceList: (params: any) => Promise<{
2
- list: any;
1
+ export declare const getResourceList: (params: any, bookingId?: number) => Promise<{
2
+ list: any[];
3
3
  listMap: any;
4
4
  }>;
5
5
  export declare const createBookings: (params: any) => Promise<any>;
@@ -25,17 +25,10 @@ __export(serve_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(serve_exports);
27
27
  var import_utils = require("../utils");
28
- var import_mock = require("../mock");
29
- var getResourceList = async (params) => {
28
+ var import_utils2 = require("./utils");
29
+ var getResourceList = async (params, bookingId) => {
30
30
  let { data } = await import_utils.request.getRequest().get(`/shop/schedule/resource/list`, params);
31
- const resourceList = (data || {}).concat([(0, import_mock.getNoResource2)({})]);
32
- return {
33
- list: resourceList,
34
- listMap: resourceList.reduce((prev, item) => {
35
- prev[item.id] = item;
36
- return prev;
37
- }, {})
38
- };
31
+ return (0, import_utils2.getFormatResourceListAndMap)(data, bookingId);
39
32
  };
40
33
  var createBookings = async (params) => {
41
34
  let { data } = await import_utils.request.getRequest().post(`/shop/v1.1/order/appointment`, params);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import '../../../info/service/addService/index.less';
4
3
  interface AddServiceProps {
@@ -138,8 +138,8 @@ var Info = (props) => {
138
138
  let data = await state.apis.getServices({
139
139
  skip: 1,
140
140
  num: 500,
141
- extension_type: state.renderType === "eventBooking" ? void 0 : ["product_appointment", "appointment_ticket", "service_product"],
142
- with: ["category"],
141
+ extension_type: state.renderType === "eventBooking" ? void 0 : ["product_appointment", "appointment_ticket", "service_product", "session_product", "session_ticket"],
142
+ with: ["category", "resourceRelation"],
143
143
  ids: state.renderType === "eventBooking" ? (_c2 = state.eventOtherParams) == null ? void 0 : _c2.productIds : void 0,
144
144
  open_quotation: 1,
145
145
  with_schedule: 1,
@@ -178,7 +178,8 @@ var Info = (props) => {
178
178
  }
179
179
  };
180
180
  const handleSelectProduct = (item, type) => {
181
- const isEject = type === "detail" || item.bundle_group_count > 0;
181
+ const isSession = (0, import_utils3.isSessionProduct)(item);
182
+ const isEject = type === "detail" || item.bundle_group_count > 0 || isSession;
182
183
  let lock = false;
183
184
  state.action({
184
185
  type: "pisell1.handleOpenProductModal",
@@ -187,11 +188,12 @@ var Info = (props) => {
187
188
  date: state.date.value.format("YYYY-MM-DD"),
188
189
  showConfig: {
189
190
  option: false,
190
- session: false,
191
+ session: isSession,
191
192
  variant: false,
192
193
  package: true
193
194
  },
194
- is_eject: isEject ? 1 : 0
195
+ is_eject: isEject ? 1 : 0,
196
+ isOS: isSession
195
197
  },
196
198
  callback: (e, extension_type, detail) => {
197
199
  var _a2;
@@ -203,6 +205,8 @@ var Info = (props) => {
203
205
  lock = false;
204
206
  }, 2e3);
205
207
  const _detail = detail || item;
208
+ const other = JSON.parse(JSON.stringify(e));
209
+ other.session = e.session;
206
210
  let cacheItem = {
207
211
  ..._detail,
208
212
  product_id: item.id,
@@ -213,7 +217,7 @@ var Info = (props) => {
213
217
  quantity: 1,
214
218
  price: _detail.price,
215
219
  product_name: item.title,
216
- other: JSON.parse(JSON.stringify(e))
220
+ other
217
221
  },
218
222
  new: 1
219
223
  };
@@ -312,6 +316,7 @@ var Info = (props) => {
312
316
  if (state.isBookingCreatePage) {
313
317
  return /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
314
318
  }
319
+ return null;
315
320
  if (state.renderType === "eventBooking") {
316
321
  return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
317
322
  import_addButton.default,