@pisell/private-materials 6.8.7 → 6.8.9

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 (380) 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 +19 -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/selectHolder/components/ErrorTip/index.d.ts +3 -0
  98. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  99. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  100. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  101. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  102. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  103. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  104. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  105. package/es/plus/selectHolder/index.d.ts +7 -0
  106. package/es/plus/selectHolder/index.js +273 -0
  107. package/es/plus/selectHolder/index.less +137 -0
  108. package/es/plus/selectHolder/locales.d.ts +24 -0
  109. package/es/plus/selectHolder/locales.js +29 -0
  110. package/es/plus/selectHolder/types.d.ts +104 -0
  111. package/es/plus/selectHolder/types.js +1 -0
  112. package/es/plus/selectHolder/utils.d.ts +9 -0
  113. package/es/plus/selectHolder/utils.js +16 -0
  114. package/es/plus/walletEditor/WalletEditor.js +60 -2
  115. package/es/plus/walletEditor/locales.d.ts +9 -0
  116. package/es/plus/walletEditor/locales.js +12 -3
  117. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  118. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  119. package/es/plus/walletPassGallery/index.js +223 -41
  120. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  121. package/es/plus/walletPassGallery/locales.js +29 -5
  122. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  123. package/es/plus/walletPassGallery/serve.js +59 -2
  124. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  125. package/es/plus/walletPassGallery/utils.js +342 -0
  126. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  127. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +355 -0
  128. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  129. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  130. package/es/pro/multiDayTimeSelect/index.js +1 -0
  131. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  132. package/es/pro/multiDayTimeSelect/types.js +1 -0
  133. package/es/pro/skuDetailModal/types.d.ts +1 -0
  134. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  135. package/lib/components/appointmentBooking/components/Voucher/index.js +17 -0
  136. package/lib/components/booking/addons/model.d.ts +1 -10
  137. package/lib/components/booking/components/actionButtons/index.js +11 -0
  138. package/lib/components/booking/components/footer/amount.js +23 -6
  139. package/lib/components/booking/components/footer/index.js +25 -4
  140. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  141. package/lib/components/booking/components/footer/utils.js +41 -29
  142. package/lib/components/booking/components/voucher/index.js +48 -6
  143. package/lib/components/booking/forms/model.d.ts +1 -10
  144. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  145. package/lib/components/booking/hooks/useQuotation.js +45 -13
  146. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  147. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  148. package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
  149. package/lib/components/booking/info/model.d.ts +1 -10
  150. package/lib/components/booking/info/service/Lists.d.ts +1 -1
  151. package/lib/components/booking/info/service/Lists.js +4 -2
  152. package/lib/components/booking/info/service/serve.d.ts +14 -0
  153. package/lib/components/booking/info/service/serve.js +5 -0
  154. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  155. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  156. package/lib/components/booking/info/service2/utils.js +32 -16
  157. package/lib/components/booking/info/utils.js +4 -0
  158. package/lib/components/booking/info2/cartClientCard/index.js +11 -0
  159. package/lib/components/booking/info2/service/addService/index.js +22 -2
  160. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  161. package/lib/components/booking/info2/service/addService/utils.js +47 -9
  162. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  163. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  164. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  165. package/lib/components/booking/info2/service/editService/index.js +273 -38
  166. package/lib/components/booking/info2/utilsByBooking.js +19 -8
  167. package/lib/components/booking/locales.d.ts +30 -0
  168. package/lib/components/booking/locales.js +33 -3
  169. package/lib/components/booking/model.d.ts +1 -9
  170. package/lib/components/booking/notes/model.d.ts +1 -10
  171. package/lib/components/booking/payments/model.d.ts +1 -10
  172. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  173. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  174. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  175. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  176. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  177. package/lib/components/booking/utils.d.ts +11 -3
  178. package/lib/components/booking/utils.js +15 -0
  179. package/lib/components/checkout/PaymentModal.js +5 -2
  180. package/lib/components/eftpos/hooks.d.ts +0 -1
  181. package/lib/components/eftposPay/amount.d.ts +1 -1
  182. package/lib/components/eftposPay/device.d.ts +1 -1
  183. package/lib/components/eftposPay/store/index.d.ts +2 -2
  184. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  185. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  186. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  187. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  188. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  189. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  190. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  191. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  192. package/lib/components/index.d.ts +1 -2
  193. package/lib/components/index.js +0 -3
  194. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  195. package/lib/components/pay/toC/model.d.ts +1 -9
  196. package/lib/components/schedules/model.d.ts +1 -9
  197. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  198. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  199. package/lib/components/shoppingCart/type.d.ts +1 -0
  200. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  201. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  202. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  203. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +10 -9
  204. package/lib/components/ticketBooking/components/addServiceVariant/index.js +4 -0
  205. package/lib/components/ticketBooking/components/ticketBooking/index.js +0 -16
  206. package/lib/components/ticketBooking/utils/index.d.ts +10 -2
  207. package/lib/components/ticketBooking/utils/index.js +31 -6
  208. package/lib/components/walletList/index.d.ts +0 -24
  209. package/lib/components/walletList/index.js +100 -4
  210. package/lib/components/walletList/locales.d.ts +9 -0
  211. package/lib/components/walletList/locales.js +12 -3
  212. package/lib/components/walletList/serve.d.ts +19 -0
  213. package/lib/components/walletList/serve.js +26 -3
  214. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  215. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  216. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  217. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  218. package/lib/index.d.ts +2 -1
  219. package/lib/index.js +6 -3
  220. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  221. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  222. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  223. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  224. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  225. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  226. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  227. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  228. package/lib/plus/selectHolder/index.d.ts +7 -0
  229. package/lib/plus/selectHolder/index.js +223 -0
  230. package/lib/plus/selectHolder/index.less +137 -0
  231. package/lib/plus/selectHolder/locales.d.ts +24 -0
  232. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +17 -14
  233. package/lib/plus/selectHolder/types.d.ts +104 -0
  234. package/lib/plus/selectHolder/types.js +17 -0
  235. package/lib/plus/selectHolder/utils.d.ts +9 -0
  236. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  237. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  238. package/lib/plus/walletEditor/locales.d.ts +9 -0
  239. package/lib/plus/walletEditor/locales.js +12 -3
  240. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  241. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  242. package/lib/plus/walletPassGallery/index.js +154 -27
  243. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  244. package/lib/plus/walletPassGallery/locales.js +32 -5
  245. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  246. package/lib/plus/walletPassGallery/serve.js +17 -5
  247. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  248. package/lib/plus/walletPassGallery/utils.js +287 -0
  249. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  250. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +290 -0
  251. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  252. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  253. package/lib/{components/wallet/components → pro/multiDayTimeSelect}/index.js +6 -16
  254. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  255. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  256. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  257. package/lowcode/event-select-holder/meta.ts +2 -2
  258. package/lowcode/select-holder/meta.ts +220 -0
  259. package/lowcode/select-holder/snippets.ts +41 -0
  260. package/package.json +4 -4
  261. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
  262. package/es/components/wallet/Detail/index.d.ts +0 -42
  263. package/es/components/wallet/Detail/index.js +0 -1182
  264. package/es/components/wallet/Detail/index.less +0 -386
  265. package/es/components/wallet/Detail/locales.d.ts +0 -153
  266. package/es/components/wallet/Detail/locales.js +0 -170
  267. package/es/components/wallet/Detail/model.d.ts +0 -13
  268. package/es/components/wallet/Detail/model.js +0 -22
  269. package/es/components/wallet/Detail/serve.d.ts +0 -39
  270. package/es/components/wallet/DetailContext.d.ts +0 -25
  271. package/es/components/wallet/DetailContext.js +0 -162
  272. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  273. package/es/components/wallet/DiscountCard/index.js +0 -218
  274. package/es/components/wallet/DiscountCard/index.less +0 -9
  275. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  276. package/es/components/wallet/DiscountCard/model.js +0 -22
  277. package/es/components/wallet/PointCard/index.d.ts +0 -3
  278. package/es/components/wallet/PointCard/index.js +0 -169
  279. package/es/components/wallet/PointCard/index.less +0 -9
  280. package/es/components/wallet/PointCard/model.d.ts +0 -13
  281. package/es/components/wallet/PointCard/model.js +0 -22
  282. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  283. package/es/components/wallet/RechargeableCard/index.js +0 -463
  284. package/es/components/wallet/RechargeableCard/index.less +0 -108
  285. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  286. package/es/components/wallet/RechargeableCard/model.js +0 -28
  287. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  288. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  289. package/es/components/wallet/Voucher/index.d.ts +0 -12
  290. package/es/components/wallet/Voucher/index.js +0 -131
  291. package/es/components/wallet/Voucher/index.less +0 -9
  292. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  293. package/es/components/wallet/Voucher/locales.js +0 -20
  294. package/es/components/wallet/Voucher/model.d.ts +0 -13
  295. package/es/components/wallet/Voucher/model.js +0 -22
  296. package/es/components/wallet/carouselArrow.png +0 -0
  297. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  298. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  299. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  300. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  301. package/es/components/wallet/components/UsageRules/index.js +0 -147
  302. package/es/components/wallet/components/UsageRules/index.less +0 -157
  303. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  304. package/es/components/wallet/components/WalletBar/index.js +0 -19
  305. package/es/components/wallet/components/WalletBar/index.less +0 -36
  306. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  307. package/es/components/wallet/components/WalletCard.js +0 -91
  308. package/es/components/wallet/components/index.d.ts +0 -3
  309. package/es/components/wallet/components/index.js +0 -4
  310. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
  311. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  312. package/es/components/wallet/index.d.ts +0 -10
  313. package/es/components/wallet/index.js +0 -807
  314. package/es/components/wallet/index.less +0 -151
  315. package/es/components/wallet/locales.d.ts +0 -132
  316. package/es/components/wallet/locales.js +0 -139
  317. package/es/components/wallet/model.d.ts +0 -37
  318. package/es/components/wallet/model.js +0 -86
  319. package/es/components/wallet/serve.d.ts +0 -150
  320. package/es/components/wallet/serve.js +0 -205
  321. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  322. package/es/components/wallet/utils/formatUtils.js +0 -73
  323. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
  324. package/lib/components/wallet/Detail/index.d.ts +0 -42
  325. package/lib/components/wallet/Detail/index.js +0 -874
  326. package/lib/components/wallet/Detail/index.less +0 -386
  327. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  328. package/lib/components/wallet/Detail/locales.js +0 -194
  329. package/lib/components/wallet/Detail/model.d.ts +0 -13
  330. package/lib/components/wallet/Detail/model.js +0 -43
  331. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  332. package/lib/components/wallet/Detail/serve.js +0 -44
  333. package/lib/components/wallet/DetailContext.d.ts +0 -25
  334. package/lib/components/wallet/DetailContext.js +0 -118
  335. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  336. package/lib/components/wallet/DiscountCard/index.js +0 -209
  337. package/lib/components/wallet/DiscountCard/index.less +0 -9
  338. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  339. package/lib/components/wallet/DiscountCard/model.js +0 -43
  340. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  341. package/lib/components/wallet/PointCard/index.js +0 -190
  342. package/lib/components/wallet/PointCard/index.less +0 -9
  343. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  344. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  345. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  346. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  347. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  348. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  349. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  350. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  351. package/lib/components/wallet/Voucher/index.js +0 -146
  352. package/lib/components/wallet/Voucher/index.less +0 -9
  353. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  354. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  355. package/lib/components/wallet/Voucher/model.js +0 -43
  356. package/lib/components/wallet/carouselArrow.png +0 -0
  357. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  358. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  359. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  360. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  361. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  362. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  363. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  364. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  365. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  366. package/lib/components/wallet/components/WalletCard.js +0 -97
  367. package/lib/components/wallet/components/index.d.ts +0 -3
  368. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
  369. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  370. package/lib/components/wallet/index.d.ts +0 -10
  371. package/lib/components/wallet/index.js +0 -580
  372. package/lib/components/wallet/index.less +0 -151
  373. package/lib/components/wallet/locales.d.ts +0 -132
  374. package/lib/components/wallet/locales.js +0 -163
  375. package/lib/components/wallet/model.d.ts +0 -37
  376. package/lib/components/wallet/model.js +0 -91
  377. package/lib/components/wallet/serve.d.ts +0 -150
  378. package/lib/components/wallet/serve.js +0 -85
  379. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  380. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -0,0 +1,355 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import React, { useMemo, useState, useEffect, useImperativeHandle, forwardRef } from 'react';
12
+ import { CalendarOutlined } from '@ant-design/icons';
13
+ import dayjs from 'dayjs';
14
+ import { DatePicker, Page } from '@pisell/materials';
15
+ import { Select, Form } from 'antd';
16
+ import { locales } from '@pisell/utils';
17
+ import { disabledDate } from "../../components/booking/info/dateRange";
18
+ import "./MultiDayTimeSelect.less";
19
+
20
+ // 类型断言以支持RangePicker
21
+ var RangePicker = DatePicker.RangePicker;
22
+ var MultiDayTimeSelect = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
+ var _ref$maxDays = _ref.maxDays,
24
+ maxDays = _ref$maxDays === void 0 ? 30 : _ref$maxDays,
25
+ defaultStartDate = _ref.defaultStartDate,
26
+ _ref$separateStartEnd = _ref.separateStartEnd,
27
+ separateStartEnd = _ref$separateStartEnd === void 0 ? false : _ref$separateStartEnd,
28
+ value = _ref.value,
29
+ onChange = _ref.onChange,
30
+ _ref$locale = _ref.locale,
31
+ locale = _ref$locale === void 0 ? 'en' : _ref$locale,
32
+ _ref$disabled = _ref.disabled,
33
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
34
+ startDateLabel = _ref.startDateLabel,
35
+ endDateLabel = _ref.endDateLabel,
36
+ durationLabel = _ref.durationLabel;
37
+ var _Form$useForm = Form.useForm(),
38
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
39
+ form = _Form$useForm2[0];
40
+ var _useState = useState(null),
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ internalValue = _useState2[0],
43
+ setInternalValue = _useState2[1];
44
+
45
+ // 暴露方法给父组件
46
+ useImperativeHandle(ref, function () {
47
+ return {
48
+ validate: function () {
49
+ var _validate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
50
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
51
+ while (1) switch (_context.prev = _context.next) {
52
+ case 0:
53
+ _context.next = 2;
54
+ return form.validateFields();
55
+ case 2:
56
+ case "end":
57
+ return _context.stop();
58
+ }
59
+ }, _callee);
60
+ }));
61
+ function validate() {
62
+ return _validate.apply(this, arguments);
63
+ }
64
+ return validate;
65
+ }(),
66
+ getValue: function getValue() {
67
+ return internalValue;
68
+ }
69
+ };
70
+ });
71
+
72
+ // 格式化日期显示
73
+ var formatLocale = useMemo(function () {
74
+ var isEn = locale === 'en' || locale === 'en-US';
75
+ return isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
76
+ }, [locale]);
77
+
78
+ // 生成时长选项(1-maxDays天),如果当前选中值超过maxDays,追加一个禁用的选项
79
+ var durationOptions = useMemo(function () {
80
+ var options = [];
81
+ for (var i = 1; i <= maxDays; i++) {
82
+ options.push({
83
+ label: "".concat(i, " ").concat(i === 1 ? locale === 'en' ? 'day' : '天' : locale === 'en' ? 'days' : '天'),
84
+ value: i
85
+ });
86
+ }
87
+ // 如果当前选中的duration超过maxDays,追加一个禁用的选项用于显示
88
+ var currentDuration = internalValue === null || internalValue === void 0 ? void 0 : internalValue.duration;
89
+ if (currentDuration && currentDuration > maxDays) {
90
+ options.push({
91
+ label: "".concat(currentDuration, " ").concat(currentDuration === 1 ? locale === 'en' ? 'day' : '天' : locale === 'en' ? 'days' : '天'),
92
+ value: currentDuration,
93
+ disabled: true
94
+ });
95
+ }
96
+ return options;
97
+ }, [maxDays, locale, internalValue === null || internalValue === void 0 ? void 0 : internalValue.duration]);
98
+
99
+ // 初始化内部值
100
+ useEffect(function () {
101
+ if (value) {
102
+ setInternalValue(value);
103
+ form.setFieldsValue({
104
+ dateRange: separateStartEnd ? undefined : [value.startDate, value.endDate],
105
+ startDate: separateStartEnd ? value.startDate : undefined,
106
+ endDate: separateStartEnd ? value.endDate : undefined,
107
+ duration: value.duration
108
+ });
109
+ } else {
110
+ var startDate = defaultStartDate || dayjs();
111
+ var endDate = startDate.add(1, 'day');
112
+ var initialValue = {
113
+ startDate: startDate,
114
+ endDate: endDate,
115
+ duration: 1
116
+ };
117
+ setInternalValue(initialValue);
118
+ form.setFieldsValue({
119
+ dateRange: separateStartEnd ? undefined : [startDate, endDate],
120
+ startDate: separateStartEnd ? startDate : undefined,
121
+ endDate: separateStartEnd ? endDate : undefined,
122
+ duration: 1
123
+ });
124
+ onChange === null || onChange === void 0 || onChange(initialValue);
125
+ }
126
+ }, [value, defaultStartDate, separateStartEnd, form, onChange]);
127
+
128
+ // 更新值并触发onChange
129
+ var updateValue = function updateValue(newValue) {
130
+ setInternalValue(newValue);
131
+ onChange === null || onChange === void 0 || onChange(newValue);
132
+ };
133
+
134
+ // 处理日期范围变化(RangePicker模式)
135
+ var handleDateRangeChange = function handleDateRangeChange(dates) {
136
+ if (dates && dates[0] && dates[1]) {
137
+ var days = dates[1].diff(dates[0], 'day');
138
+ var finalEndDate = dates[1];
139
+ var finalDuration = days;
140
+
141
+ // 如果超过maxDays,调整为开始日期+maxDays,但保留结束日期的时间
142
+ // if (days > maxDays) {
143
+ // // 获取结束日期的时间部分(时、分、秒、毫秒)
144
+ // const endTime = {
145
+ // hour: dates[1].hour(),
146
+ // minute: dates[1].minute(),
147
+ // second: dates[1].second(),
148
+ // millisecond: dates[1].millisecond(),
149
+ // };
150
+ // // 计算最大结束日期(开始日期 + maxDays)
151
+ // finalEndDate = dates[0].add(maxDays, 'day');
152
+ // // 应用结束日期的时间
153
+ // finalEndDate = finalEndDate
154
+ // .hour(endTime.hour)
155
+ // .minute(endTime.minute)
156
+ // .second(endTime.second)
157
+ // .millisecond(endTime.millisecond);
158
+ // finalDuration = maxDays;
159
+ // }
160
+
161
+ if (days > 0) {
162
+ var newValue = {
163
+ startDate: dates[0],
164
+ endDate: finalEndDate,
165
+ duration: finalDuration
166
+ };
167
+ updateValue(newValue);
168
+ form.setFieldsValue({
169
+ dateRange: [dates[0], finalEndDate],
170
+ duration: finalDuration
171
+ });
172
+ }
173
+ }
174
+ };
175
+
176
+ // 处理开始日期变化(分离模式)
177
+ var handleStartDateChange = function handleStartDateChange(date) {
178
+ if (date && internalValue) {
179
+ var currentEndDate = internalValue.endDate;
180
+ // 获取当前结束日期的时间部分(时、分、秒、毫秒)
181
+ var endTime = {
182
+ hour: currentEndDate.hour(),
183
+ minute: currentEndDate.minute(),
184
+ second: currentEndDate.second(),
185
+ millisecond: currentEndDate.millisecond()
186
+ };
187
+
188
+ // 确定使用的时长(不超过maxDays)
189
+ var targetDuration = Math.min(internalValue.duration, maxDays);
190
+
191
+ // 计算新的结束日期(开始日期 + 目标时长)
192
+ var newEndDate = date.add(targetDuration, 'day');
193
+
194
+ // 应用结束日期的时间
195
+ var finalEndDate = newEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
196
+ var newValue = {
197
+ startDate: date,
198
+ endDate: finalEndDate,
199
+ duration: targetDuration
200
+ };
201
+ updateValue(newValue);
202
+ form.setFieldsValue({
203
+ endDate: finalEndDate,
204
+ duration: targetDuration
205
+ });
206
+ }
207
+ };
208
+
209
+ // 处理结束日期变化(分离模式)
210
+ var handleEndDateChange = function handleEndDateChange(date) {
211
+ if (date && internalValue) {
212
+ var days = date.diff(internalValue.startDate, 'day');
213
+ if (days > 0) {
214
+ var newValue = {
215
+ startDate: internalValue.startDate,
216
+ endDate: date,
217
+ duration: days
218
+ };
219
+ updateValue(newValue);
220
+ form.setFieldsValue({
221
+ endDate: date,
222
+ duration: days
223
+ });
224
+ }
225
+ }
226
+ };
227
+
228
+ // 处理时长变化
229
+ var handleDurationChange = function handleDurationChange(durationValue) {
230
+ if (internalValue) {
231
+ var newEndDate = internalValue.startDate.add(durationValue, 'day');
232
+ var newValue = {
233
+ startDate: internalValue.startDate,
234
+ endDate: newEndDate,
235
+ duration: durationValue
236
+ };
237
+ updateValue(newValue);
238
+ if (separateStartEnd) {
239
+ form.setFieldsValue({
240
+ endDate: newEndDate
241
+ });
242
+ } else {
243
+ form.setFieldsValue({
244
+ dateRange: [internalValue.startDate, newEndDate]
245
+ });
246
+ }
247
+ }
248
+ };
249
+ return /*#__PURE__*/React.createElement(Form, {
250
+ form: form,
251
+ layout: "vertical",
252
+ className: "multi-day-time-select-form"
253
+ }, separateStartEnd ? /*#__PURE__*/React.createElement("div", {
254
+ className: "multi-day-time-select-row"
255
+ }, /*#__PURE__*/React.createElement(Form.Item, {
256
+ label: startDateLabel || locales.getText('pisell2.text.start_date'),
257
+ name: "startDate",
258
+ rules: [{
259
+ required: true,
260
+ message: startDateLabel || locales.getText('pisell2.text.start_date')
261
+ }],
262
+ style: {
263
+ flex: 1
264
+ }
265
+ }, /*#__PURE__*/React.createElement(DatePicker, {
266
+ inputReadOnly: true,
267
+ allowClear: false,
268
+ size: "large",
269
+ style: {
270
+ width: '100%',
271
+ padding: 0
272
+ },
273
+ suffixIcon: /*#__PURE__*/React.createElement(CalendarOutlined, null),
274
+ value: internalValue === null || internalValue === void 0 ? void 0 : internalValue.startDate,
275
+ onChange: handleStartDateChange,
276
+ format: formatLocale,
277
+ isHideCustomSelect: true,
278
+ disabled: disabled
279
+ })), /*#__PURE__*/React.createElement(Form.Item, {
280
+ label: endDateLabel || locales.getText('pisell2.text.end_date'),
281
+ name: "endDate",
282
+ rules: [{
283
+ required: true,
284
+ message: endDateLabel || locales.getText('pisell2.text.end_date')
285
+ }],
286
+ style: {
287
+ flex: 1
288
+ }
289
+ }, /*#__PURE__*/React.createElement(DatePicker, {
290
+ inputReadOnly: true,
291
+ allowClear: false,
292
+ size: "large",
293
+ style: {
294
+ width: '100%',
295
+ padding: 0
296
+ },
297
+ suffixIcon: /*#__PURE__*/React.createElement(CalendarOutlined, null),
298
+ value: internalValue === null || internalValue === void 0 ? void 0 : internalValue.endDate,
299
+ onChange: handleEndDateChange,
300
+ format: formatLocale,
301
+ isHideCustomSelect: true,
302
+ disabled: disabled,
303
+ disabledDate: function disabledDate(current) {
304
+ if (internalValue !== null && internalValue !== void 0 && internalValue.startDate) {
305
+ return current.isSameOrBefore(internalValue.startDate, 'day');
306
+ }
307
+ return false;
308
+ }
309
+ }))) : /*#__PURE__*/React.createElement("div", {
310
+ className: "multi-day-time-select-row"
311
+ }, /*#__PURE__*/React.createElement(Form.Item, {
312
+ label: startDateLabel || locales.getText('pisell2.text.start_date'),
313
+ name: "dateRange",
314
+ rules: [{
315
+ required: true,
316
+ message: startDateLabel || locales.getText('pisell2.text.start_date')
317
+ }],
318
+ style: {
319
+ flex: 1
320
+ }
321
+ }, /*#__PURE__*/React.createElement(Page, {
322
+ isRenderPisellConfigProvider: false
323
+ }, /*#__PURE__*/React.createElement(RangePicker, {
324
+ inputReadOnly: true,
325
+ allowClear: false,
326
+ size: "large",
327
+ style: {
328
+ width: '100%',
329
+ padding: 0
330
+ },
331
+ suffixIcon: /*#__PURE__*/React.createElement(CalendarOutlined, null),
332
+ value: internalValue ? [internalValue.startDate, internalValue.endDate] : null,
333
+ onChange: handleDateRangeChange,
334
+ format: formatLocale,
335
+ isHideCustomSelect: true,
336
+ endDateDays: 1,
337
+ disabled: disabled,
338
+ disabledDate: disabledDate
339
+ })))), /*#__PURE__*/React.createElement(Form.Item, {
340
+ label: durationLabel || locales.getText('pisell2.text.duration'),
341
+ name: "duration",
342
+ rules: [{
343
+ required: true,
344
+ message: durationLabel || locales.getText('pisell2.text.duration')
345
+ }]
346
+ }, /*#__PURE__*/React.createElement(Select, {
347
+ size: "large",
348
+ value: internalValue === null || internalValue === void 0 ? void 0 : internalValue.duration,
349
+ onChange: handleDurationChange,
350
+ options: durationOptions,
351
+ disabled: disabled
352
+ })));
353
+ });
354
+ MultiDayTimeSelect.displayName = 'MultiDayTimeSelect';
355
+ export default MultiDayTimeSelect;
@@ -0,0 +1,8 @@
1
+ .multi-day-time-select-form {
2
+ margin-top: 12px;
3
+ .multi-day-time-select-row {
4
+ display: flex;
5
+ gap: 16px;
6
+ }
7
+ }
8
+
@@ -0,0 +1,3 @@
1
+ export { default } from './MultiDayTimeSelect';
2
+ export type { MultiDayTimeSelectRef } from './MultiDayTimeSelect';
3
+ export type { MultiDayTimeSelectProps, MultiDayTimeSelectValue } from './types';
@@ -0,0 +1 @@
1
+ export { default } from "./MultiDayTimeSelect";
@@ -0,0 +1,28 @@
1
+ import { Dayjs } from 'dayjs';
2
+ export interface MultiDayTimeSelectValue {
3
+ startDate: Dayjs;
4
+ endDate: Dayjs;
5
+ duration: number;
6
+ }
7
+ export interface MultiDayTimeSelectProps {
8
+ /** 最大天数,默认30天 */
9
+ maxDays?: number;
10
+ /** 默认开始时间 */
11
+ defaultStartDate?: Dayjs;
12
+ /** 开始时间和结束时间是否分离,false使用RangePicker,true使用两个独立的DatePicker */
13
+ separateStartEnd?: boolean;
14
+ /** 受控值 */
15
+ value?: MultiDayTimeSelectValue;
16
+ /** 值变化回调 */
17
+ onChange?: (value: MultiDayTimeSelectValue) => void;
18
+ /** 语言环境 */
19
+ locale?: string;
20
+ /** 是否禁用 */
21
+ disabled?: boolean;
22
+ /** 开始日期标签 */
23
+ startDateLabel?: string;
24
+ /** 结束日期标签 */
25
+ endDateLabel?: string;
26
+ /** 时长标签 */
27
+ durationLabel?: string;
28
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -330,6 +330,7 @@ export interface ProductData {
330
330
  _data: DataObj;
331
331
  autoClose: boolean;
332
332
  _serviceKey: string;
333
+ _holderKey: string;
333
334
  discount_list: DiscountItem[];
334
335
  }
335
336
  export declare type SkuDetailModalData = ProductData;
@@ -193,6 +193,7 @@ var CartItem = ({ onNext, renderContactInfo }) => {
193
193
  disabledEdit: isLastStep,
194
194
  isShowChangeResource: (_d = (_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) == null ? void 0 : _d.startsWith("select-resource"),
195
195
  isShowDelete: ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) === "select-service",
196
+ isShowAmountFooter: true,
196
197
  isShowPackageNote: false,
197
198
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
198
199
  isShowHolder: isFormSubject,
@@ -107,10 +107,27 @@ var VoucherCard = (props) => {
107
107
  (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.batchUpdateCart) == null ? void 0 : _a2.call(appointmentBooking, items);
108
108
  };
109
109
  const onCartChange = () => {
110
+ var _a2, _b2, _c;
110
111
  const products2 = cart == null ? void 0 : cart.getItems();
112
+ (_c = shopDiscount == null ? void 0 : shopDiscount.setBookingSubject) == null ? void 0 : _c.call(
113
+ shopDiscount,
114
+ (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a2.bookingSetting) == null ? void 0 : _b2.bookingSubject
115
+ );
111
116
  const val = shopDiscount.calcDiscount(products2);
112
117
  batchUpdateCart(val.productList);
113
118
  };
119
+ const stringifiedHolders = (0, import_react.useMemo)(() => {
120
+ let _ret;
121
+ try {
122
+ _ret = JSON.stringify(products.map((item) => (item == null ? void 0 : item.holder_id) || ""));
123
+ } catch (error) {
124
+ _ret = "";
125
+ }
126
+ return _ret;
127
+ }, [products]);
128
+ (0, import_react.useEffect)(() => {
129
+ onCartChange();
130
+ }, [stringifiedHolders]);
114
131
  (0, import_react.useEffect)(() => {
115
132
  const val = shopDiscount.getDiscountList();
116
133
  setDisCountList(val);
@@ -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;
@@ -72,6 +72,8 @@ var ActionButtons = ({
72
72
  const { ScheduleModule } = pisellosAllModule;
73
73
  const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
74
74
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
75
+ var _a2, _b2, _c2;
76
+ const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
75
77
  dispatch({
76
78
  type: "setClient",
77
79
  payload: {
@@ -79,6 +81,15 @@ var ActionButtons = ({
79
81
  edit: true
80
82
  }
81
83
  });
84
+ if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
85
+ if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
86
+ dispatch({
87
+ type: "setService",
88
+ payload: {
89
+ value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
90
+ }
91
+ });
92
+ }
82
93
  });
83
94
  const { selectCustomer } = (0, import_useCustomer.useCustomer)({
84
95
  changeCustomerToGlobalState
@@ -38,6 +38,7 @@ var import_utils = require("../../utils");
38
38
  var import_utils2 = require("@pisell/utils");
39
39
  var import_decimal = __toESM(require("decimal.js"));
40
40
  var import_utils3 = require("../../info/service2/utils");
41
+ var import_utils4 = require("../../info2/service/addService/utils");
41
42
  var getRelationDetailsTotal = (relation_details) => {
42
43
  let total = new import_decimal.default(0);
43
44
  for (let item of relation_details) {
@@ -52,17 +53,23 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
52
53
  let price = new import_decimal.default(0);
53
54
  let duration = new import_decimal.default(0);
54
55
  const isDay = (0, import_utils3.isDayBooking)(state);
56
+ let dayDuration = new import_decimal.default(0);
57
+ let minuteDuration = new import_decimal.default(0);
55
58
  if (isEdit) {
56
59
  if ((state == null ? void 0 : state.service) || (state == null ? void 0 : state.addons)) {
57
60
  if (Array.isArray((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value)) {
58
61
  for (let item of state.service.value) {
59
- if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item)) {
62
+ if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item) || (0, import_utils4.isMultiDayProduct)(item)) {
60
63
  const quantity = new import_decimal.default(item._extend.quantity || 1);
61
64
  const itemTotal = new import_decimal.default(item._extend.total || 0);
62
65
  const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
63
66
  price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
64
- const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
65
- duration = duration.add(_duration);
67
+ const _duration = !(0, import_utils3.isNormalProductByDurationSchedule)(item) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
68
+ if (isDay || (0, import_utils4.isMultiDayProduct)(item)) {
69
+ dayDuration = dayDuration.add(_duration);
70
+ } else {
71
+ minuteDuration = minuteDuration.add(_duration);
72
+ }
66
73
  } else {
67
74
  const quantity = new import_decimal.default(item._extend.quantity || 1);
68
75
  const itemTotal = new import_decimal.default(item._extend.total || 0);
@@ -74,6 +81,11 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
74
81
  price = price.add(relationTotal);
75
82
  const itemDuration = new import_decimal.default(import_utils.flexibleObj.getValue(item._extend.duration) || 0);
76
83
  duration = duration.add(itemDuration);
84
+ if ((0, import_utils4.isMultiDayProduct)(item)) {
85
+ dayDuration = dayDuration.add(itemDuration);
86
+ } else {
87
+ minuteDuration = minuteDuration.add(itemDuration);
88
+ }
77
89
  }
78
90
  }
79
91
  }
@@ -92,18 +104,23 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
92
104
  duration = services.reduce((pre, cur) => {
93
105
  var _a2;
94
106
  let current = new import_decimal.default(0);
95
- if (isDay) {
96
- const _duration = (0, import_utils3.isDayBookingProduct)(cur, state) ? new import_decimal.default(cur._extend.duration || 0) : new import_decimal.default(0);
107
+ if (isDay || (0, import_utils4.isMultiDayProduct)(cur)) {
108
+ const _duration = !(0, import_utils3.isNormalProductByDurationSchedule)(cur) ? new import_decimal.default(cur._extend.duration || 0) : new import_decimal.default(0);
97
109
  current = _duration;
98
110
  } else {
99
111
  current = new import_decimal.default(import_utils.flexibleObj.getValue(((_a2 = cur._extend) == null ? void 0 : _a2.duration) || 0) || 0);
100
112
  }
113
+ if (isDay || (0, import_utils4.isMultiDayProduct)(cur)) {
114
+ dayDuration = dayDuration.add(current);
115
+ } else {
116
+ minuteDuration = minuteDuration.add(current);
117
+ }
101
118
  return pre.add(current);
102
119
  }, new import_decimal.default(0));
103
120
  }
104
121
  return {
105
122
  productExpectAmount: price.toNumber(),
106
- duration: (0, import_utils.getDiscountTime)(duration.toNumber(), isDay)
123
+ duration: (0, import_utils.getDiscountTimeByDayMinutes)(dayDuration.toNumber(), minuteDuration.toNumber())
107
124
  };
108
125
  };
109
126
  var getProductItemTax = (item, state, options) => {