@pisell/private-materials 6.8.6 → 6.8.8

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 (382) 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 +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  12. package/es/components/appointmentBooking/components/Voucher/index.js +16 -0
  13. package/es/components/booking/addons/model.d.ts +1 -10
  14. package/es/components/booking/components/actionButtons/index.js +34 -16
  15. package/es/components/booking/components/footer/amount.js +25 -8
  16. package/es/components/booking/components/footer/index.js +67 -35
  17. package/es/components/booking/components/footer/utils.d.ts +7 -0
  18. package/es/components/booking/components/footer/utils.js +66 -42
  19. package/es/components/booking/components/voucher/index.js +58 -14
  20. package/es/components/booking/forms/model.d.ts +1 -10
  21. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  22. package/es/components/booking/hooks/useQuotation.js +69 -21
  23. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  24. package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  25. package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
  26. package/es/components/booking/info/model.d.ts +1 -10
  27. package/es/components/booking/info/service/Lists.d.ts +1 -1
  28. package/es/components/booking/info/service/Lists.js +8 -2
  29. package/es/components/booking/info/service/serve.d.ts +14 -0
  30. package/es/components/booking/info/service/serve.js +21 -0
  31. package/es/components/booking/info/service2/Group/utils.js +2 -0
  32. package/es/components/booking/info/service2/utils.d.ts +1 -33
  33. package/es/components/booking/info/service2/utils.js +84 -36
  34. package/es/components/booking/info/utils.js +5 -0
  35. package/es/components/booking/info2/cartClientCard/index.js +23 -5
  36. package/es/components/booking/info2/service/addService/index.js +146 -88
  37. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  38. package/es/components/booking/info2/service/addService/utils.js +78 -9
  39. package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  40. package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
  41. package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
  42. package/es/components/booking/info2/service/editService/index.js +332 -76
  43. package/es/components/booking/info2/utilsByBooking.js +14 -5
  44. package/es/components/booking/locales.d.ts +30 -0
  45. package/es/components/booking/locales.js +39 -3
  46. package/es/components/booking/model.d.ts +1 -9
  47. package/es/components/booking/notes/model.d.ts +1 -10
  48. package/es/components/booking/payments/model.d.ts +1 -10
  49. package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
  50. package/es/components/booking/utils/confirmHolderModal.js +318 -0
  51. package/es/components/booking/utils/confirmHolderModal.less +40 -0
  52. package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
  53. package/es/components/booking/utils/selectHolderModal.js +407 -0
  54. package/es/components/booking/utils.d.ts +11 -3
  55. package/es/components/booking/utils.js +24 -1
  56. package/es/components/checkout/PaymentModal.js +15 -10
  57. package/es/components/eftpos/hooks.d.ts +0 -1
  58. package/es/components/eftposPay/amount.d.ts +1 -1
  59. package/es/components/eftposPay/device.d.ts +1 -1
  60. package/es/components/eftposPay/store/index.d.ts +2 -2
  61. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  62. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  63. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  68. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  69. package/es/components/index.d.ts +1 -2
  70. package/es/components/index.js +1 -2
  71. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  72. package/es/components/pay/toC/model.d.ts +1 -9
  73. package/es/components/schedules/model.d.ts +1 -9
  74. package/es/components/shoppingCart/components/Cart/Product.js +6 -3
  75. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  76. package/es/components/shoppingCart/type.d.ts +1 -0
  77. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  78. package/es/components/{wallet/Detail/serve.js → ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js} +112 -57
  79. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  80. package/es/components/ticketBooking/components/addServiceVariant/addService.js +29 -15
  81. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -0
  82. package/es/components/ticketBooking/components/ticketBooking/index.js +14 -11
  83. package/es/components/ticketBooking/utils/index.d.ts +10 -2
  84. package/es/components/ticketBooking/utils/index.js +37 -7
  85. package/es/components/walletList/index.d.ts +0 -24
  86. package/es/components/walletList/index.js +173 -41
  87. package/es/components/walletList/locales.d.ts +9 -0
  88. package/es/components/walletList/locales.js +12 -3
  89. package/es/components/walletList/serve.d.ts +19 -0
  90. package/es/components/walletList/serve.js +94 -5
  91. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  92. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  93. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  94. package/es/hooks/usePaymentLogger.d.ts +0 -1
  95. package/es/index.d.ts +2 -1
  96. package/es/index.js +2 -1
  97. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
  98. package/es/plus/productSelect/index.js +1 -4
  99. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  100. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  101. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  102. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  103. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  104. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  105. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  106. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  107. package/es/plus/selectHolder/index.d.ts +7 -0
  108. package/es/plus/selectHolder/index.js +273 -0
  109. package/es/plus/selectHolder/index.less +137 -0
  110. package/es/plus/selectHolder/locales.d.ts +24 -0
  111. package/es/plus/selectHolder/locales.js +29 -0
  112. package/es/plus/selectHolder/types.d.ts +104 -0
  113. package/es/plus/selectHolder/types.js +1 -0
  114. package/es/plus/selectHolder/utils.d.ts +9 -0
  115. package/es/plus/selectHolder/utils.js +16 -0
  116. package/es/plus/walletEditor/WalletEditor.js +60 -2
  117. package/es/plus/walletEditor/locales.d.ts +9 -0
  118. package/es/plus/walletEditor/locales.js +12 -3
  119. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  120. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  121. package/es/plus/walletPassGallery/index.js +223 -41
  122. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  123. package/es/plus/walletPassGallery/locales.js +29 -5
  124. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  125. package/es/plus/walletPassGallery/serve.js +59 -2
  126. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  127. package/es/plus/walletPassGallery/utils.js +342 -0
  128. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  129. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +355 -0
  130. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  131. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  132. package/es/pro/multiDayTimeSelect/index.js +1 -0
  133. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  134. package/es/pro/multiDayTimeSelect/types.js +1 -0
  135. package/es/pro/skuDetailModal/types.d.ts +1 -0
  136. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  137. package/lib/components/appointmentBooking/components/Voucher/index.js +17 -0
  138. package/lib/components/booking/addons/model.d.ts +1 -10
  139. package/lib/components/booking/components/actionButtons/index.js +11 -0
  140. package/lib/components/booking/components/footer/amount.js +23 -6
  141. package/lib/components/booking/components/footer/index.js +25 -4
  142. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  143. package/lib/components/booking/components/footer/utils.js +41 -29
  144. package/lib/components/booking/components/voucher/index.js +48 -6
  145. package/lib/components/booking/forms/model.d.ts +1 -10
  146. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  147. package/lib/components/booking/hooks/useQuotation.js +45 -13
  148. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  149. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  150. package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
  151. package/lib/components/booking/info/model.d.ts +1 -10
  152. package/lib/components/booking/info/service/Lists.d.ts +1 -1
  153. package/lib/components/booking/info/service/Lists.js +4 -2
  154. package/lib/components/booking/info/service/serve.d.ts +14 -0
  155. package/lib/components/booking/info/service/serve.js +5 -0
  156. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  157. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  158. package/lib/components/booking/info/service2/utils.js +32 -16
  159. package/lib/components/booking/info/utils.js +4 -0
  160. package/lib/components/booking/info2/cartClientCard/index.js +11 -0
  161. package/lib/components/booking/info2/service/addService/index.js +22 -2
  162. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  163. package/lib/components/booking/info2/service/addService/utils.js +47 -9
  164. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  165. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  166. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  167. package/lib/components/booking/info2/service/editService/index.js +273 -38
  168. package/lib/components/booking/info2/utilsByBooking.js +19 -8
  169. package/lib/components/booking/locales.d.ts +30 -0
  170. package/lib/components/booking/locales.js +33 -3
  171. package/lib/components/booking/model.d.ts +1 -9
  172. package/lib/components/booking/notes/model.d.ts +1 -10
  173. package/lib/components/booking/payments/model.d.ts +1 -10
  174. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  175. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  176. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  177. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  178. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  179. package/lib/components/booking/utils.d.ts +11 -3
  180. package/lib/components/booking/utils.js +15 -0
  181. package/lib/components/checkout/PaymentModal.js +5 -2
  182. package/lib/components/eftpos/hooks.d.ts +0 -1
  183. package/lib/components/eftposPay/amount.d.ts +1 -1
  184. package/lib/components/eftposPay/device.d.ts +1 -1
  185. package/lib/components/eftposPay/store/index.d.ts +2 -2
  186. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  187. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  188. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  189. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  190. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  191. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  192. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  193. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  194. package/lib/components/index.d.ts +1 -2
  195. package/lib/components/index.js +0 -3
  196. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  197. package/lib/components/pay/toC/model.d.ts +1 -9
  198. package/lib/components/schedules/model.d.ts +1 -9
  199. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  200. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  201. package/lib/components/shoppingCart/type.d.ts +1 -0
  202. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  203. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  204. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  205. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +23 -9
  206. package/lib/components/ticketBooking/components/addServiceVariant/index.js +4 -0
  207. package/lib/components/ticketBooking/components/ticketBooking/index.js +0 -16
  208. package/lib/components/ticketBooking/utils/index.d.ts +10 -2
  209. package/lib/components/ticketBooking/utils/index.js +31 -6
  210. package/lib/components/walletList/index.d.ts +0 -24
  211. package/lib/components/walletList/index.js +100 -4
  212. package/lib/components/walletList/locales.d.ts +9 -0
  213. package/lib/components/walletList/locales.js +12 -3
  214. package/lib/components/walletList/serve.d.ts +19 -0
  215. package/lib/components/walletList/serve.js +26 -3
  216. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  217. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  218. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  219. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  220. package/lib/index.d.ts +2 -1
  221. package/lib/index.js +6 -3
  222. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
  223. package/lib/plus/productSelect/index.js +1 -2
  224. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  225. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  226. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  227. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  228. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  229. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  230. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  231. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  232. package/lib/plus/selectHolder/index.d.ts +7 -0
  233. package/lib/plus/selectHolder/index.js +223 -0
  234. package/lib/plus/selectHolder/index.less +137 -0
  235. package/lib/plus/selectHolder/locales.d.ts +24 -0
  236. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +17 -14
  237. package/lib/plus/selectHolder/types.d.ts +104 -0
  238. package/lib/plus/selectHolder/types.js +17 -0
  239. package/lib/plus/selectHolder/utils.d.ts +9 -0
  240. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  241. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  242. package/lib/plus/walletEditor/locales.d.ts +9 -0
  243. package/lib/plus/walletEditor/locales.js +12 -3
  244. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  245. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  246. package/lib/plus/walletPassGallery/index.js +154 -27
  247. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  248. package/lib/plus/walletPassGallery/locales.js +32 -5
  249. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  250. package/lib/plus/walletPassGallery/serve.js +17 -5
  251. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  252. package/lib/plus/walletPassGallery/utils.js +287 -0
  253. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  254. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +290 -0
  255. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  256. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  257. package/lib/{components/wallet/components → pro/multiDayTimeSelect}/index.js +6 -16
  258. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  259. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  260. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  261. package/lowcode/event-select-holder/meta.ts +2 -2
  262. package/lowcode/select-holder/meta.ts +220 -0
  263. package/lowcode/select-holder/snippets.ts +41 -0
  264. package/package.json +3 -3
  265. package/es/components/wallet/Detail/index.d.ts +0 -42
  266. package/es/components/wallet/Detail/index.js +0 -1182
  267. package/es/components/wallet/Detail/index.less +0 -386
  268. package/es/components/wallet/Detail/locales.d.ts +0 -153
  269. package/es/components/wallet/Detail/locales.js +0 -170
  270. package/es/components/wallet/Detail/model.d.ts +0 -13
  271. package/es/components/wallet/Detail/model.js +0 -22
  272. package/es/components/wallet/Detail/serve.d.ts +0 -39
  273. package/es/components/wallet/DetailContext.d.ts +0 -25
  274. package/es/components/wallet/DetailContext.js +0 -162
  275. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  276. package/es/components/wallet/DiscountCard/index.js +0 -218
  277. package/es/components/wallet/DiscountCard/index.less +0 -9
  278. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  279. package/es/components/wallet/DiscountCard/model.js +0 -22
  280. package/es/components/wallet/PointCard/index.d.ts +0 -3
  281. package/es/components/wallet/PointCard/index.js +0 -169
  282. package/es/components/wallet/PointCard/index.less +0 -9
  283. package/es/components/wallet/PointCard/model.d.ts +0 -13
  284. package/es/components/wallet/PointCard/model.js +0 -22
  285. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  286. package/es/components/wallet/RechargeableCard/index.js +0 -463
  287. package/es/components/wallet/RechargeableCard/index.less +0 -108
  288. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  289. package/es/components/wallet/RechargeableCard/model.js +0 -28
  290. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  291. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  292. package/es/components/wallet/Voucher/index.d.ts +0 -12
  293. package/es/components/wallet/Voucher/index.js +0 -131
  294. package/es/components/wallet/Voucher/index.less +0 -9
  295. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  296. package/es/components/wallet/Voucher/locales.js +0 -20
  297. package/es/components/wallet/Voucher/model.d.ts +0 -13
  298. package/es/components/wallet/Voucher/model.js +0 -22
  299. package/es/components/wallet/carouselArrow.png +0 -0
  300. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  301. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  302. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  303. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  304. package/es/components/wallet/components/UsageRules/index.js +0 -147
  305. package/es/components/wallet/components/UsageRules/index.less +0 -157
  306. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  307. package/es/components/wallet/components/WalletBar/index.js +0 -19
  308. package/es/components/wallet/components/WalletBar/index.less +0 -36
  309. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  310. package/es/components/wallet/components/WalletCard.js +0 -91
  311. package/es/components/wallet/components/index.d.ts +0 -3
  312. package/es/components/wallet/components/index.js +0 -4
  313. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
  314. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  315. package/es/components/wallet/index.d.ts +0 -10
  316. package/es/components/wallet/index.js +0 -807
  317. package/es/components/wallet/index.less +0 -151
  318. package/es/components/wallet/locales.d.ts +0 -132
  319. package/es/components/wallet/locales.js +0 -139
  320. package/es/components/wallet/model.d.ts +0 -37
  321. package/es/components/wallet/model.js +0 -86
  322. package/es/components/wallet/serve.d.ts +0 -150
  323. package/es/components/wallet/serve.js +0 -205
  324. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  325. package/es/components/wallet/utils/formatUtils.js +0 -73
  326. package/lib/components/wallet/Detail/index.d.ts +0 -42
  327. package/lib/components/wallet/Detail/index.js +0 -874
  328. package/lib/components/wallet/Detail/index.less +0 -386
  329. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  330. package/lib/components/wallet/Detail/locales.js +0 -194
  331. package/lib/components/wallet/Detail/model.d.ts +0 -13
  332. package/lib/components/wallet/Detail/model.js +0 -43
  333. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  334. package/lib/components/wallet/Detail/serve.js +0 -44
  335. package/lib/components/wallet/DetailContext.d.ts +0 -25
  336. package/lib/components/wallet/DetailContext.js +0 -118
  337. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  338. package/lib/components/wallet/DiscountCard/index.js +0 -209
  339. package/lib/components/wallet/DiscountCard/index.less +0 -9
  340. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  341. package/lib/components/wallet/DiscountCard/model.js +0 -43
  342. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  343. package/lib/components/wallet/PointCard/index.js +0 -190
  344. package/lib/components/wallet/PointCard/index.less +0 -9
  345. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  346. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  347. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  348. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  349. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  350. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  351. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  352. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  353. package/lib/components/wallet/Voucher/index.js +0 -146
  354. package/lib/components/wallet/Voucher/index.less +0 -9
  355. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  356. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  357. package/lib/components/wallet/Voucher/model.js +0 -43
  358. package/lib/components/wallet/carouselArrow.png +0 -0
  359. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  360. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  361. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  362. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  363. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  364. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  365. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  366. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  367. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  368. package/lib/components/wallet/components/WalletCard.js +0 -97
  369. package/lib/components/wallet/components/index.d.ts +0 -3
  370. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
  371. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  372. package/lib/components/wallet/index.d.ts +0 -10
  373. package/lib/components/wallet/index.js +0 -580
  374. package/lib/components/wallet/index.less +0 -151
  375. package/lib/components/wallet/locales.d.ts +0 -132
  376. package/lib/components/wallet/locales.js +0 -163
  377. package/lib/components/wallet/model.d.ts +0 -37
  378. package/lib/components/wallet/model.js +0 -91
  379. package/lib/components/wallet/serve.d.ts +0 -150
  380. package/lib/components/wallet/serve.js +0 -85
  381. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  382. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -51,6 +51,7 @@ var import_index = require("./index.less");
51
51
  var import_serve2 = require("./serve");
52
52
  var import_utils3 = require("./utils");
53
53
  var import_noteModal = __toESM(require("../../../../plus/noteModal"));
54
+ var import_confirmHolderModal = require("../../utils/confirmHolderModal");
54
55
  var import__ = require("../../../../index");
55
56
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
56
57
  var import_utils4 = require("@pisell/utils");
@@ -61,6 +62,7 @@ var import_useCustomer = require("../../../ticketBooking/hooks/pisellos/useCusto
61
62
  var import_ahooks = require("ahooks");
62
63
  var import_lodash = require("lodash");
63
64
  var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
65
+ var import_utils5 = require("../../utils");
64
66
  var Footer = (props) => {
65
67
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
66
68
  const { state, buttons, dispatch, source } = props;
@@ -600,7 +602,7 @@ var Footer = (props) => {
600
602
  messageShow = true,
601
603
  noSubmit = false
602
604
  }) => {
603
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
605
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
604
606
  const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
605
607
  if (isToastMode) {
606
608
  (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
@@ -609,6 +611,14 @@ var Footer = (props) => {
609
611
  const isHasDayProducts = handleDaySubmit();
610
612
  if (isHasDayProducts) return;
611
613
  }
614
+ debugger;
615
+ const hasUnspecifiedHolderProduct = (_d2 = state.service.value) == null ? void 0 : _d2.some((item) => {
616
+ var _a3, _b3, _c3;
617
+ return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
618
+ });
619
+ if (!(0, import_utils5.isWalkIn)((_f2 = (_e2 = state.client) == null ? void 0 : _e2.value) == null ? void 0 : _f2.id) && (0, import_utils2.getIsSubjectRequire)(state) && hasUnspecifiedHolderProduct) {
620
+ await (0, import_confirmHolderModal.showConfirmHolderModal)(state, dispatch);
621
+ }
612
622
  if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
613
623
  return;
614
624
  }
@@ -619,7 +629,7 @@ var Footer = (props) => {
619
629
  const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
620
630
  let saveOtherValue = {};
621
631
  if (type === "save") {
622
- saveOtherValue = await ((_d2 = state == null ? void 0 : state.onSave) == null ? void 0 : _d2.call(state, state.client)) || {};
632
+ saveOtherValue = await ((_g2 = state == null ? void 0 : state.onSave) == null ? void 0 : _g2.call(state, state.client)) || {};
623
633
  }
624
634
  try {
625
635
  let callbackData = null;
@@ -665,7 +675,7 @@ var Footer = (props) => {
665
675
  { key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
666
676
  {
667
677
  key: "店铺id",
668
- value: (_h2 = (_g2 = (_f2 = (_e2 = store == null ? void 0 : store.getState) == null ? void 0 : _e2.call(store)) == null ? void 0 : _f2.global) == null ? void 0 : _g2.globalConfig) == null ? void 0 : _h2.id
678
+ value: (_k2 = (_j2 = (_i2 = (_h2 = store == null ? void 0 : store.getState) == null ? void 0 : _h2.call(store)) == null ? void 0 : _i2.global) == null ? void 0 : _j2.globalConfig) == null ? void 0 : _k2.id
669
679
  },
670
680
  {
671
681
  key: "shopApi",
@@ -1251,6 +1261,8 @@ var Footer = (props) => {
1251
1261
  }
1252
1262
  };
1253
1263
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
1264
+ var _a2, _b2, _c2;
1265
+ const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
1254
1266
  dispatch({
1255
1267
  type: "setClient",
1256
1268
  payload: {
@@ -1258,6 +1270,15 @@ var Footer = (props) => {
1258
1270
  edit: true
1259
1271
  }
1260
1272
  });
1273
+ if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
1274
+ if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
1275
+ dispatch({
1276
+ type: "setService",
1277
+ payload: {
1278
+ value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
1279
+ }
1280
+ });
1281
+ }
1261
1282
  });
1262
1283
  const { selectCustomer } = (0, import_useCustomer.useCustomer)({
1263
1284
  changeCustomerToGlobalState
@@ -1452,6 +1473,6 @@ var Footer = (props) => {
1452
1473
  }
1453
1474
  }
1454
1475
  }
1455
- ));
1476
+ ), /* @__PURE__ */ import_react.default.createElement(import_confirmHolderModal.ConfirmHolderModal, null));
1456
1477
  };
1457
1478
  var footer_default = Footer;
@@ -56,5 +56,12 @@ export declare const formatOriginalPrice: (item: any) => number;
56
56
  export declare const formatSellingPrice: (item: any) => number;
57
57
  export declare const getSourceProductPrice: (item: any) => number;
58
58
  export declare const getMainProductSellingPrice: (item: any) => number | undefined;
59
+ /**
60
+ * @title: 是否包含跨日预约商品
61
+ * @description:
62
+ * @param {any} data
63
+ * @return {*}
64
+ */
65
+ export declare const getHasMultiDayProduct: (data: any) => any;
59
66
  export declare const formatValues: (state: any) => any;
60
67
  export declare const checkHolderIsError: (state: any) => any;
@@ -39,6 +39,7 @@ __export(utils_exports, {
39
39
  formatSellingPrice: () => formatSellingPrice,
40
40
  formatValues: () => formatValues,
41
41
  getBundleDiscountList: () => getBundleDiscountList,
42
+ getHasMultiDayProduct: () => getHasMultiDayProduct,
42
43
  getMainProductSellingPrice: () => getMainProductSellingPrice,
43
44
  getSourceProductPrice: () => getSourceProductPrice
44
45
  });
@@ -291,22 +292,22 @@ var formatMetaData = (item, isMultiDayPrices) => {
291
292
  return metadata;
292
293
  };
293
294
  var formatProductMetadata = (item) => {
294
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
295
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
295
296
  let metadata = {};
296
- if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
297
- metadata.main_product_attached_bundle_surcharge_fee = (_b = item._extend) == null ? void 0 : _b.surcharge_fee;
297
+ if (((_a = item._extend) == null ? void 0 : _a.surcharge_fee) || ((_b = item.metadata) == null ? void 0 : _b.main_product_attached_bundle_surcharge_fee)) {
298
+ metadata.main_product_attached_bundle_surcharge_fee = ((_c = item._extend) == null ? void 0 : _c.surcharge_fee) || ((_d = item.metadata) == null ? void 0 : _d.main_product_attached_bundle_surcharge_fee);
298
299
  }
299
- if ((_c = item._extend) == null ? void 0 : _c.main_product_attached_bundle_tax_fee) {
300
- metadata.main_product_attached_bundle_tax_fee = (_d = item._extend) == null ? void 0 : _d.main_product_attached_bundle_tax_fee;
300
+ if (((_e = item._extend) == null ? void 0 : _e.main_product_attached_bundle_tax_fee) || ((_f = item.metadata) == null ? void 0 : _f.main_product_attached_bundle_tax_fee)) {
301
+ metadata.main_product_attached_bundle_tax_fee = ((_g = item._extend) == null ? void 0 : _g.main_product_attached_bundle_tax_fee) || ((_h = item.metadata) == null ? void 0 : _h.main_product_attached_bundle_tax_fee);
301
302
  }
302
- if ((_e = item._extend) == null ? void 0 : _e.surcharge_rounding_remainder) {
303
- metadata.surcharge_rounding_remainder = (_f = item._extend) == null ? void 0 : _f.surcharge_rounding_remainder;
303
+ if (((_i = item._extend) == null ? void 0 : _i.surcharge_rounding_remainder) || ((_j = item.metadata) == null ? void 0 : _j.surcharge_rounding_remainder)) {
304
+ metadata.surcharge_rounding_remainder = ((_k = item._extend) == null ? void 0 : _k.surcharge_rounding_remainder) || ((_l = item.metadata) == null ? void 0 : _l.surcharge_rounding_remainder);
304
305
  }
305
- if ((_g = item._extend) == null ? void 0 : _g.relation_surcharge_ids) {
306
- metadata.relation_surcharge_ids = (_h = item._extend) == null ? void 0 : _h.relation_surcharge_ids;
306
+ if (((_m = item._extend) == null ? void 0 : _m.relation_surcharge_ids) || ((_n = item.metadata) == null ? void 0 : _n.relation_surcharge_ids)) {
307
+ metadata.relation_surcharge_ids = ((_o = item._extend) == null ? void 0 : _o.relation_surcharge_ids) || ((_p = item.metadata) == null ? void 0 : _p.relation_surcharge_ids);
307
308
  }
308
- if ((_i = item._extend) == null ? void 0 : _i.unique_identification_number) {
309
- metadata.unique_identification_number = (_j = item._extend) == null ? void 0 : _j.unique_identification_number;
309
+ if (((_q = item._extend) == null ? void 0 : _q.unique_identification_number) || ((_r = item.metadata) == null ? void 0 : _r.unique_identification_number)) {
310
+ metadata.unique_identification_number = ((_s = item._extend) == null ? void 0 : _s.unique_identification_number) || ((_t = item.metadata) == null ? void 0 : _t.unique_identification_number);
310
311
  }
311
312
  return metadata;
312
313
  };
@@ -367,6 +368,7 @@ var formatProducts = (item, quantity) => {
367
368
  if (item.isCustomItem) {
368
369
  item.product_id = 0;
369
370
  }
371
+ debugger;
370
372
  return {
371
373
  "name": item.name,
372
374
  "num": quantity || item._extend.quantity,
@@ -429,6 +431,14 @@ var getHolderByIndex = (holder, index) => {
429
431
  form_record: [(_a = holder == null ? void 0 : holder.form_record) == null ? void 0 : _a[index]].filter(Boolean)
430
432
  };
431
433
  };
434
+ var getHasMultiDayProduct = (data) => {
435
+ const list = data.service.value;
436
+ const isHas = list.some((item) => {
437
+ var _a;
438
+ return (_a = item._extend) == null ? void 0 : _a.groupId;
439
+ });
440
+ return isHas;
441
+ };
432
442
  var formatBookings = (data, values) => {
433
443
  const isDay = (0, import_utils4.isDaysBooking)(data);
434
444
  const isEvent = (0, import_utils4.isEventBooking)(data);
@@ -450,7 +460,7 @@ var formatBookings = (data, values) => {
450
460
  let bookings = [];
451
461
  let obj = {};
452
462
  list.forEach((item) => {
453
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
463
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
454
464
  if (item.isCustomItem) {
455
465
  bookings.push({
456
466
  ...item._extend,
@@ -459,6 +469,7 @@ var formatBookings = (data, values) => {
459
469
  });
460
470
  return;
461
471
  }
472
+ const isMultiDay = (_a = item._extend) == null ? void 0 : _a.groupId;
462
473
  let start_date = item._extend.startDate.format("YYYY-MM-DD");
463
474
  let end_date = item._extend.endDate.format("YYYY-MM-DD");
464
475
  let end_time = item._extend.endDate.format("HH:mm");
@@ -468,8 +479,8 @@ var formatBookings = (data, values) => {
468
479
  }
469
480
  dayParams.holder = formatHolders(data, item, values);
470
481
  if (isDay) {
471
- const startDate = ((_a = item._extend) == null ? void 0 : _a.startDate) || ((_b = item._extend) == null ? void 0 : _b.start_date);
472
- const endDate = ((_c = item._extend) == null ? void 0 : _c.endDate) || ((_d = item._extend) == null ? void 0 : _d.end_date);
482
+ const startDate = ((_b = item._extend) == null ? void 0 : _b.startDate) || ((_c = item._extend) == null ? void 0 : _c.start_date);
483
+ const endDate = ((_d = item._extend) == null ? void 0 : _d.endDate) || ((_e = item._extend) == null ? void 0 : _e.end_date);
473
484
  const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
474
485
  startDate,
475
486
  endDate
@@ -485,16 +496,15 @@ var formatBookings = (data, values) => {
485
496
  "minutes"
486
497
  );
487
498
  }
488
- if (!((_e = item._extend) == null ? void 0 : _e.unique_identification_number)) {
499
+ if (!((_f = item._extend) == null ? void 0 : _f.unique_identification_number)) {
489
500
  const unique_identification_number = (0, import_utils5.getUniqueId)();
490
501
  item._extend.unique_identification_number = unique_identification_number;
491
502
  }
492
- const isSetGroupId = obj[(_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.groupId];
493
- if (!((_g = item._extend) == null ? void 0 : _g.unique_identification_number)) {
503
+ const isSetGroupId = obj[(_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.groupId];
504
+ if (!((_h = item._extend) == null ? void 0 : _h.unique_identification_number)) {
494
505
  const unique_identification_number = (0, import_utils5.getUniqueId)();
495
506
  item._extend.unique_identification_number = unique_identification_number;
496
507
  }
497
- debugger;
498
508
  const booking = {
499
509
  schedule_event_id: item == null ? void 0 : item.booking_id,
500
510
  product: formatProducts(item),
@@ -511,7 +521,7 @@ var formatBookings = (data, values) => {
511
521
  start_time,
512
522
  end_date,
513
523
  start_date,
514
- duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
524
+ duration: isDay || isMultiDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
515
525
  number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
516
526
  resources: formatResource(item),
517
527
  note: item._extend.note,
@@ -522,7 +532,7 @@ var formatBookings = (data, values) => {
522
532
  if (!isSetGroupId) {
523
533
  obj[item._extend.groupId] = true;
524
534
  }
525
- if (isDay) {
535
+ if (isDay || isMultiDay) {
526
536
  bookings.push(booking);
527
537
  return;
528
538
  }
@@ -531,7 +541,7 @@ var formatBookings = (data, values) => {
531
541
  newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
532
542
  if (i > 0) {
533
543
  newItem._extend.surcharge_rounding_remainder = void 0;
534
- if (((_j = (_i = (_h = newItem._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle) == null ? void 0 : _j.length) > 0) {
544
+ if (((_k = (_j = (_i = newItem._extend) == null ? void 0 : _i.other) == null ? void 0 : _j.bundle) == null ? void 0 : _k.length) > 0) {
535
545
  newItem._extend.other.bundle.forEach((bundleItem) => {
536
546
  bundleItem.surcharge_rounding_remainder = void 0;
537
547
  });
@@ -618,6 +628,7 @@ var formatValues = (state) => {
618
628
  metadata: {}
619
629
  };
620
630
  const isDay = (0, import_utils4.isDaysBooking)(state);
631
+ const isHasMultiDay = getHasMultiDayProduct(state);
621
632
  const isEvent = (0, import_utils4.isEventBooking)(state);
622
633
  if (!state.bookingId || isDay) {
623
634
  values.shop_note = formatNote(state);
@@ -635,10 +646,10 @@ var formatValues = (state) => {
635
646
  ...customer
636
647
  };
637
648
  values.holder = formatHolder(state, values);
638
- if (isDay || isEvent) {
649
+ if (isEvent) {
639
650
  values.relation_products = formatRelationProducts(
640
651
  state,
641
- isDay ? "day" : "event"
652
+ "event"
642
653
  );
643
654
  } else {
644
655
  values.relation_products = formatNormalProducts(state);
@@ -652,7 +663,7 @@ var formatValues = (state) => {
652
663
  startTime = `${startTime || "00:00"}:00`;
653
664
  values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
654
665
  }
655
- if (isDay) {
666
+ if (isDay || isHasMultiDay) {
656
667
  values.metadata.is_multiday_appointment = 1;
657
668
  }
658
669
  if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
@@ -665,16 +676,16 @@ var checkHolderIsError = (state) => {
665
676
  var _a, _b;
666
677
  let errorRowKey = "";
667
678
  const holderError = state.service.value.some((item) => {
668
- var _a2, _b2, _c, _d, _e, _f;
679
+ var _a2, _b2, _c, _d, _e, _f, _g;
669
680
  if ((0, import_utils4.isNormalProductByDurationSchedule)(item)) {
670
681
  return false;
671
682
  }
672
- if (item._extend.quantity === 1 && !item._extend.holder_id) {
673
- errorRowKey = (0, import_utils4.genRowKey)((_b2 = (_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.other) == null ? void 0 : _b2.rowKey);
683
+ if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_a2 = item._extend.holder_id) == null ? void 0 : _a2.length) === 0)) {
684
+ errorRowKey = (0, import_utils4.genRowKey)((_c = (_b2 = item == null ? void 0 : item._extend) == null ? void 0 : _b2.other) == null ? void 0 : _c.rowKey);
674
685
  return true;
675
686
  }
676
- if (item._extend.quantity > 1 && ((_d = (_c = item._extend) == null ? void 0 : _c.holder_id) == null ? void 0 : _d.length) !== item._extend.quantity) {
677
- errorRowKey = (0, import_utils4.genRowKey)((_f = (_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.rowKey);
687
+ if (item._extend.quantity > 1 && ((_e = (_d = item._extend) == null ? void 0 : _d.holder_id) == null ? void 0 : _e.length) !== item._extend.quantity) {
688
+ errorRowKey = (0, import_utils4.genRowKey)((_g = (_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.rowKey);
678
689
  return true;
679
690
  }
680
691
  return false;
@@ -708,6 +719,7 @@ var checkHolderIsError = (state) => {
708
719
  formatSellingPrice,
709
720
  formatValues,
710
721
  getBundleDiscountList,
722
+ getHasMultiDayProduct,
711
723
  getMainProductSellingPrice,
712
724
  getSourceProductPrice
713
725
  });
@@ -48,7 +48,7 @@ var import_utils3 = require("../../info/clientVariant/utils");
48
48
  var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
49
49
  var services = {};
50
50
  var VoucherCard = (props) => {
51
- var _a, _b, _c, _d;
51
+ var _a, _b, _c, _d, _e;
52
52
  const context = (0, import_useEngineContext.default)();
53
53
  const { state, dispatch, source, isInModal = false } = props;
54
54
  const [showDetail, setShowDetail] = (0, import_react.useState)(isInModal ? true : false);
@@ -60,10 +60,13 @@ var VoucherCard = (props) => {
60
60
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
61
61
  const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
62
62
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
63
+ const holderChangedRef = (0, import_react.useRef)(false);
63
64
  const stateRef = (0, import_react.useRef)(state);
64
65
  stateRef.current = state;
65
66
  services = state.service;
66
67
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
68
+ var _a2, _b2, _c2;
69
+ const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
67
70
  dispatch({
68
71
  type: "setClient",
69
72
  payload: {
@@ -71,6 +74,15 @@ var VoucherCard = (props) => {
71
74
  edit: true
72
75
  }
73
76
  });
77
+ if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
78
+ if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
79
+ dispatch({
80
+ type: "setService",
81
+ payload: {
82
+ value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
83
+ }
84
+ });
85
+ }
74
86
  });
75
87
  const { selectCustomer } = (0, import_pisellos.useCustomer)({
76
88
  changeCustomerToGlobalState
@@ -97,7 +109,7 @@ var VoucherCard = (props) => {
97
109
  const serviceMemo = (0, import_react.useMemo)(() => {
98
110
  var _a2;
99
111
  const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
100
- var _a3, _b2;
112
+ var _a3, _b2, _c2;
101
113
  return {
102
114
  booking_id: value.booking_id,
103
115
  id: value.id,
@@ -106,7 +118,8 @@ var VoucherCard = (props) => {
106
118
  discount_list: value.discount_list,
107
119
  origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
108
120
  quantity: value._extend.quantity,
109
- startDate: value._extend.startDate
121
+ startDate: value._extend.startDate,
122
+ holder_id: (_c2 = value == null ? void 0 : value._extend) == null ? void 0 : _c2.holder_id
110
123
  };
111
124
  });
112
125
  return val;
@@ -146,6 +159,29 @@ var VoucherCard = (props) => {
146
159
  });
147
160
  return val;
148
161
  }, [state.addons.value]);
162
+ const holdersMemo = (0, import_react.useMemo)(() => {
163
+ var _a2;
164
+ if (isBooking4Shop) {
165
+ let list = [];
166
+ if ((_a2 = state.pet) == null ? void 0 : _a2.value) {
167
+ let entries = Object.entries(state.pet.value);
168
+ if (entries.length === 1) {
169
+ list = entries[0][1];
170
+ }
171
+ }
172
+ shopDiscount.setHolders(list);
173
+ holderChangedRef.current = true;
174
+ return list || [];
175
+ }
176
+ }, [(_c = state.pet) == null ? void 0 : _c.value, isBooking4Shop]);
177
+ (0, import_react.useEffect)(() => {
178
+ var _a2, _b2, _c2, _d2;
179
+ console.log("update booking subject", state.bookingConfig);
180
+ (_d2 = shopDiscount == null ? void 0 : shopDiscount.setBookingSubject) == null ? void 0 : _d2.call(
181
+ shopDiscount,
182
+ (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject
183
+ );
184
+ }, [state.bookingConfig]);
149
185
  const disabled = (0, import_react.useMemo)(() => {
150
186
  var _a2;
151
187
  if (["paid", "partially_paid"].includes(
@@ -158,7 +194,7 @@ var VoucherCard = (props) => {
158
194
  const { run } = (0, import_ahooks.useDebounceFn)(
159
195
  () => {
160
196
  var _a2, _b2;
161
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
197
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
162
198
  return;
163
199
  }
164
200
  if (isBooking4Shop) {
@@ -169,13 +205,19 @@ var VoucherCard = (props) => {
169
205
  console.log("input: ", state.service.value);
170
206
  console.log("output: ", val);
171
207
  productListToValue(val.productList);
208
+ holderChangedRef.current = false;
172
209
  }
173
210
  },
174
211
  { wait: 1e3 }
175
212
  );
176
213
  (0, import_react.useEffect)(() => {
177
214
  run();
178
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
215
+ }, [
216
+ JSON.stringify(serviceMemo),
217
+ JSON.stringify(addonsMemo),
218
+ JSON.stringify(holdersMemo),
219
+ isBooking4Shop
220
+ ]);
179
221
  (0, import_react.useEffect)(() => {
180
222
  if (shopDiscount) {
181
223
  const wrappedHandler = executeIfActive(fn);
@@ -328,7 +370,7 @@ var VoucherCard = (props) => {
328
370
  {
329
371
  style: { width: "100%" },
330
372
  isInModal: isInModal || false,
331
- dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
373
+ dataSource: ((_e = (_d = state.service) == null ? void 0 : _d.value) == null ? void 0 : _e.length) ? availableData : [],
332
374
  mixedSort,
333
375
  onChange: (val) => {
334
376
  const detail = shopDiscount.setDiscountSelected({
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -40,6 +40,7 @@ var import_utils2 = require("@pisell/utils");
40
40
  var import_materials = require("@pisell/materials");
41
41
  var import_serve = require("../info/service/serve");
42
42
  var import_decimal = __toESM(require("decimal.js"));
43
+ var import_dayjs = __toESM(require("dayjs"));
43
44
  var formatBundleItemMap = (product) => {
44
45
  return product.bundle_group.reduce((pre, cur) => {
45
46
  const curObj = {};
@@ -70,15 +71,19 @@ var setNewCartValue = (cartValue, newProducts) => {
70
71
  let isBundleChange = false;
71
72
  let isNotFoundBundle = false;
72
73
  const notFoundProducts = [];
74
+ const multiDayPricesCache = /* @__PURE__ */ new Map();
73
75
  const value = cartValue.map((item) => {
74
- var _a, _b, _c, _d;
75
- const newProduct = newProducts.find((newItem2) => newItem2.id === item.product_id);
76
+ var _a, _b, _c, _d, _e, _f;
77
+ const itemScheduleDate = ((_a = item._extend) == null ? void 0 : _a.startDate) ? (0, import_dayjs.default)(item._extend.startDate).format("YYYY-MM-DD") : "";
78
+ const newProduct = newProducts.find(
79
+ (newItem2) => newItem2.id === item.product_id && newItem2.schedule_date === itemScheduleDate
80
+ );
76
81
  if (!newProduct) {
77
82
  return item;
78
83
  }
79
84
  let isChangePrice = newProduct.price != item.price;
80
85
  const bundleItemMap = formatBundleItemMap(newProduct);
81
- const newBundle = (((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []).map((bundle) => {
86
+ const newBundle = (((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle) || []).map((bundle) => {
82
87
  if (!bundleItemMap[bundle.id]) {
83
88
  isNotFoundBundle = true;
84
89
  if (!notFoundProducts.some((p) => p._id === bundle._id)) {
@@ -103,6 +108,24 @@ var setNewCartValue = (cartValue, newProducts) => {
103
108
  // product_price: bundleItemMap[item.id].product_price,
104
109
  };
105
110
  });
111
+ if ((_d = item._extend) == null ? void 0 : _d.groupId) {
112
+ if (!multiDayPricesCache.has(item._extend.groupId)) {
113
+ const productPrices = newProducts.filter((p) => p.id === item.product_id);
114
+ const multiDayPrices = {};
115
+ productPrices.forEach((priceItem) => {
116
+ multiDayPrices[priceItem.schedule_date] = {
117
+ total: Number(priceItem.price),
118
+ origin_total: Number(priceItem.price),
119
+ num: 1,
120
+ quotation_id: priceItem.quotation_id || 0,
121
+ start_date: priceItem.schedule_date,
122
+ end_date: (0, import_dayjs.default)(priceItem.schedule_date).add(1, "day").format("YYYY-MM-DD")
123
+ };
124
+ });
125
+ multiDayPricesCache.set(item._extend.groupId, multiDayPrices);
126
+ }
127
+ item._extend.multiDayPrices = multiDayPricesCache.get(item._extend.groupId);
128
+ }
106
129
  if (!isChangePrice) {
107
130
  return item;
108
131
  } else {
@@ -120,7 +143,7 @@ var setNewCartValue = (cartValue, newProducts) => {
120
143
  bundle_edit: isBundleChange ? 1 : item._extend.bundle_edit,
121
144
  other: {
122
145
  ...item._extend.other,
123
- option: (_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.option,
146
+ option: (_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.option,
124
147
  bundle: newBundle
125
148
  }
126
149
  }
@@ -146,22 +169,31 @@ var useQuotation = (state, dispatch) => {
146
169
  cartValueRef.current = state.service.value;
147
170
  const getCartQuotation = async (params) => {
148
171
  if (!cartValueRef.current.length) return;
149
- const ids = cartValueRef.current.filter((item) => !item.isCustomItem).map((item) => item.product_id);
150
- if (!ids.length) return;
151
- const data = await (0, import_serve.getProductPrice)({
152
- ids,
153
- schedule_date: params == null ? void 0 : params.schedule_date,
154
- customer_id: params == null ? void 0 : params.customer_id
172
+ if (!(params == null ? void 0 : params.customer_id)) {
173
+ return;
174
+ }
175
+ const queryData = cartValueRef.current.filter((item) => !item.isCustomItem).map((item) => {
176
+ var _a2;
177
+ return {
178
+ product_id: item.product_id,
179
+ schedule_date: ((_a2 = item._extend) == null ? void 0 : _a2.startDate) ? (0, import_dayjs.default)(item._extend.startDate).format("YYYY-MM-DD") : params == null ? void 0 : params.schedule_date
180
+ // 如果没有商品日期,使用传入的默认日期
181
+ };
182
+ });
183
+ if (!queryData.length) return;
184
+ const data = await (0, import_serve.getNormalAndMultiDayProductPrice)({
185
+ customer_id: params == null ? void 0 : params.customer_id,
186
+ data: queryData
155
187
  });
156
- return data;
188
+ return data.data;
157
189
  };
158
190
  const currentDate = (0, import_react.useMemo)(() => {
159
191
  return state.date.value.format("YYYY-MM-DD");
160
192
  }, [state.date.value]);
161
193
  const updateCartQuotation = async (params) => {
162
194
  const data = await getCartQuotation(params);
163
- if (!(data == null ? void 0 : data.data)) return;
164
- const { isChange, value: newCartValue, isNotFoundBundle, notFoundProducts } = setNewCartValue(cartValueRef.current, data.data);
195
+ if (!data || !data.length) return;
196
+ const { isChange, value: newCartValue, isNotFoundBundle, notFoundProducts } = setNewCartValue(cartValueRef.current, data);
165
197
  if (isNotFoundBundle) {
166
198
  setProducts(notFoundProducts);
167
199
  setOpen(true);
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -5,5 +5,6 @@ declare const useHolderConfig: (state: any) => {
5
5
  isCustomerSubject: boolean;
6
6
  isWalkInBol: boolean;
7
7
  isShowChangeHolder: boolean;
8
+ holderType: any;
8
9
  };
9
10
  export default useHolderConfig;
@@ -25,7 +25,7 @@ module.exports = __toCommonJS(useHolderConfig_exports);
25
25
  var import_react = require("react");
26
26
  var import_utils = require("../../utils");
27
27
  var useHolderConfig = (state) => {
28
- var _a, _b, _c, _d, _e, _f;
28
+ var _a, _b, _c, _d, _e, _f, _g;
29
29
  const appointment_subject = (0, import_react.useMemo)(() => {
30
30
  var _a2, _b2, _c2;
31
31
  return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
@@ -37,10 +37,14 @@ var useHolderConfig = (state) => {
37
37
  const isFormSubject = (0, import_react.useMemo)(() => {
38
38
  return appointment_subject.type === "form";
39
39
  }, [appointment_subject.type]);
40
+ const holderType = (0, import_react.useMemo)(() => {
41
+ var _a2, _b2, _c2;
42
+ return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.holder) == null ? void 0 : _b2.form) == null ? void 0 : _c2.formType) || "minors";
43
+ }, [(_e = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _e.holder]);
40
44
  const isWalkInBol = (0, import_react.useMemo)(() => {
41
45
  var _a2, _b2;
42
46
  return (0, import_utils.isWalkIn)((_b2 = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id);
43
- }, [(_f = (_e = state == null ? void 0 : state.client) == null ? void 0 : _e.value) == null ? void 0 : _f.id]);
47
+ }, [(_g = (_f = state == null ? void 0 : state.client) == null ? void 0 : _f.value) == null ? void 0 : _g.id]);
44
48
  const isCustomerSubject = (0, import_react.useMemo)(() => {
45
49
  return appointment_subject.type === "customer";
46
50
  }, [appointment_subject.type]);
@@ -53,7 +57,8 @@ var useHolderConfig = (state) => {
53
57
  isFormSubject,
54
58
  isCustomerSubject,
55
59
  isWalkInBol,
56
- isShowChangeHolder
60
+ isShowChangeHolder,
61
+ holderType
57
62
  };
58
63
  };
59
64
  var useHolderConfig_default = useHolderConfig;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => React.JSX.Element;
2
+ declare const Lists: ({ onEdit, onChange, onAction, isParallelResource, isShowDelete, isShowAmountFooter }: any) => React.JSX.Element;
3
3
  export default Lists;
@@ -41,7 +41,7 @@ var import_useHolderConfig = __toESM(require("../hooks/useHolderConfig"));
41
41
  var import_ahooks = require("ahooks");
42
42
  var import_utils2 = require("../../info2/service/addService/utils");
43
43
  var import_useAddHolder = __toESM(require("../hooks/useAddHolder"));
44
- var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
44
+ var Lists = ({ onEdit, onChange, onAction, isParallelResource, isShowDelete = true, isShowAmountFooter = true }) => {
45
45
  var _a;
46
46
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
47
47
  const { isShowChangeHolder } = (0, import_useHolderConfig.default)(state);
@@ -85,6 +85,8 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
85
85
  return {
86
86
  hideAddBtn: state.isTerminalDayBookingPage || state.isBookingCreatePage,
87
87
  isShowNote: state.isBookingTicket2 ? true : (0, import_utils.isEventBooking)(state),
88
+ isShowDelete,
89
+ isShowAmountFooter,
88
90
  isShowPackageNote: false,
89
91
  accounts: [],
90
92
  isEdit: !!(state == null ? void 0 : state.bookingId),
@@ -109,7 +111,7 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
109
111
  const p = (0, import_utils.formatProducts)(
110
112
  ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) || [],
111
113
  state,
112
- false,
114
+ true,
113
115
  true,
114
116
  isParallelResource
115
117
  );