@pisell/private-materials 6.5.27 → 6.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) 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 +146 -165
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
  13. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
  14. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  15. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  16. package/es/components/appointmentBooking/hooks.js +30 -30
  17. package/es/components/appointmentBooking/locales.d.ts +3 -0
  18. package/es/components/appointmentBooking/locales.js +9 -6
  19. package/es/components/booking/components/actionButtons/index.js +34 -20
  20. package/es/components/booking/components/customSelect/index.js +1 -1
  21. package/es/components/booking/components/footer/amount.js +25 -8
  22. package/es/components/booking/components/footer/index.js +66 -33
  23. package/es/components/booking/components/footer/utils.d.ts +7 -0
  24. package/es/components/booking/components/footer/utils.js +126 -99
  25. package/es/components/booking/components/voucher/index.js +25 -9
  26. package/es/components/booking/dashboard/serve.js +1 -6
  27. package/es/components/booking/forms/footer.js +24 -10
  28. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  29. package/es/components/booking/forms/serve.js +2 -12
  30. package/es/components/booking/hooks/useQuotation.js +69 -21
  31. package/es/components/booking/info/client/index.js +28 -13
  32. package/es/components/booking/info/client/serve.js +2 -11
  33. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  34. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  35. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  36. package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  37. package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
  38. package/es/components/booking/info/main.js +3 -2
  39. package/es/components/booking/info/model.js +5 -0
  40. package/es/components/booking/info/pet/serve.js +1 -6
  41. package/es/components/booking/info/service/Lists.d.ts +1 -1
  42. package/es/components/booking/info/service/Lists.js +10 -4
  43. package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
  44. package/es/components/booking/info/service/serve.d.ts +14 -0
  45. package/es/components/booking/info/service/serve.js +25 -18
  46. package/es/components/booking/info/service2/Group/utils.js +2 -0
  47. package/es/components/booking/info/service2/utils.d.ts +1 -33
  48. package/es/components/booking/info/service2/utils.js +92 -56
  49. package/es/components/booking/info/utils.js +5 -0
  50. package/es/components/booking/info2/cartClientCard/index.js +49 -9
  51. package/es/components/booking/info2/index.js +3 -2
  52. package/es/components/booking/info2/serve.js +1 -6
  53. package/es/components/booking/info2/service/addService/index.js +146 -89
  54. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  55. package/es/components/booking/info2/service/addService/utils.js +83 -14
  56. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  57. package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
  58. package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  59. package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
  60. package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
  61. package/es/components/booking/info2/service/editService/index.js +313 -57
  62. package/es/components/booking/info2/utilsByBooking.js +19 -14
  63. package/es/components/booking/locales.d.ts +36 -0
  64. package/es/components/booking/locales.js +48 -3
  65. package/es/components/booking/model.d.ts +4 -0
  66. package/es/components/booking/model.js +3 -0
  67. package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
  68. package/es/components/booking/utils/confirmHolderModal.js +318 -0
  69. package/es/components/booking/utils/confirmHolderModal.less +40 -0
  70. package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
  71. package/es/components/booking/utils/selectHolderModal.js +407 -0
  72. package/es/components/booking/utils.d.ts +16 -7
  73. package/es/components/booking/utils.js +26 -37
  74. package/es/components/checkout/PaymentModal.js +61 -30
  75. package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
  76. package/es/components/checkout/components/ScrollableList/index.js +0 -1
  77. package/es/components/checkout/locales.d.ts +3 -0
  78. package/es/components/checkout/locales.js +3 -0
  79. package/es/components/eftposPay/linkly/index.js +64 -2
  80. package/es/components/eftposPay/tyro/index.js +12 -0
  81. package/es/components/list/List.js +3 -0
  82. package/es/components/pay/toB/components/MX51/index.js +14 -44
  83. package/es/components/pay/toB/types/index.d.ts +0 -12
  84. package/es/components/pay/toB/types/index.js +0 -4
  85. package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
  86. package/es/components/shoppingCart/components/Cart/Product.js +6 -3
  87. package/es/components/shoppingCart/type.d.ts +1 -0
  88. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  89. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  90. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
  91. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  92. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  93. package/es/components/ticketBooking/components/addServiceVariant/addService.js +419 -794
  94. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  95. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
  96. package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  97. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  98. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  99. package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
  100. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  101. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  102. package/es/components/ticketBooking/components/timeBar/index.js +1 -4
  103. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  104. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
  105. package/es/components/ticketBooking/index.d.ts +0 -1
  106. package/es/components/ticketBooking/index.js +0 -2
  107. package/es/components/ticketBooking/serve.js +17 -119
  108. package/es/components/ticketBooking/utils/index.d.ts +7 -1
  109. package/es/components/ticketBooking/utils/index.js +44 -28
  110. package/es/hooks/useEngineContext.d.ts +0 -1
  111. package/es/hooks/useEngineContext.js +0 -7
  112. package/es/index.d.ts +4 -0
  113. package/es/index.js +5 -1
  114. package/es/plus/clientCard/locales.js +3 -3
  115. package/es/plus/clinetSearch/index.js +28 -30
  116. package/es/plus/clinetSearch/locales.d.ts +3 -0
  117. package/es/plus/clinetSearch/locales.js +7 -4
  118. package/es/plus/clinetSearch/types.d.ts +12 -0
  119. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  120. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  121. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  122. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  123. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  124. package/es/plus/contactInfo/index.d.ts +6 -0
  125. package/es/plus/contactInfo/index.js +198 -0
  126. package/es/plus/contactInfo/index.less +621 -0
  127. package/es/plus/contactInfo/locales.d.ts +15 -0
  128. package/es/plus/contactInfo/locales.js +14 -0
  129. package/es/plus/contactInfo/types.d.ts +91 -0
  130. package/es/plus/contactInfo/types.js +1 -0
  131. package/es/plus/contactInfo/utils.d.ts +7 -0
  132. package/es/plus/contactInfo/utils.js +50 -0
  133. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  134. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  135. package/es/plus/contactInfoModal/index.d.ts +41 -0
  136. package/es/plus/contactInfoModal/index.js +155 -0
  137. package/es/plus/contactInfoModal/index.less +19 -0
  138. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  139. package/es/plus/contactInfoModal/locales.js +65 -0
  140. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  141. package/es/plus/productSelect/ProductCard/index.js +1 -1
  142. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  143. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  144. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  145. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  146. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  147. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  148. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  149. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  150. package/es/plus/selectHolder/index.d.ts +7 -0
  151. package/es/plus/selectHolder/index.js +273 -0
  152. package/es/plus/selectHolder/index.less +137 -0
  153. package/es/plus/selectHolder/locales.d.ts +24 -0
  154. package/es/plus/selectHolder/locales.js +29 -0
  155. package/es/plus/selectHolder/types.d.ts +104 -0
  156. package/es/plus/selectHolder/types.js +1 -0
  157. package/es/plus/selectHolder/utils.d.ts +9 -0
  158. package/es/plus/selectHolder/utils.js +16 -0
  159. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  160. package/es/pro/comprehensiveSearch/locales.js +1 -1
  161. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  162. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
  163. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  164. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  165. package/es/pro/multiDayTimeSelect/index.js +1 -0
  166. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  167. package/es/pro/multiDayTimeSelect/types.js +1 -0
  168. package/es/pro/skuDetailModal/types.d.ts +1 -0
  169. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  170. package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
  171. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  172. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  173. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  174. package/lib/components/appointmentBooking/hooks.js +73 -35
  175. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  176. package/lib/components/appointmentBooking/locales.js +6 -3
  177. package/lib/components/booking/components/actionButtons/index.js +11 -2
  178. package/lib/components/booking/components/customSelect/index.js +1 -1
  179. package/lib/components/booking/components/footer/amount.js +23 -6
  180. package/lib/components/booking/components/footer/index.js +26 -5
  181. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  182. package/lib/components/booking/components/footer/utils.js +120 -82
  183. package/lib/components/booking/components/voucher/index.js +10 -1
  184. package/lib/components/booking/dashboard/serve.js +1 -6
  185. package/lib/components/booking/forms/footer.js +29 -11
  186. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  187. package/lib/components/booking/forms/serve.js +2 -12
  188. package/lib/components/booking/hooks/useQuotation.js +45 -13
  189. package/lib/components/booking/info/client/index.js +14 -1
  190. package/lib/components/booking/info/client/serve.js +2 -13
  191. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
  192. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  193. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  194. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  195. package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
  196. package/lib/components/booking/info/main.js +5 -4
  197. package/lib/components/booking/info/model.js +5 -0
  198. package/lib/components/booking/info/pet/serve.js +1 -6
  199. package/lib/components/booking/info/service/Lists.d.ts +1 -1
  200. package/lib/components/booking/info/service/Lists.js +5 -3
  201. package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
  202. package/lib/components/booking/info/service/serve.d.ts +14 -0
  203. package/lib/components/booking/info/service/serve.js +8 -17
  204. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  205. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  206. package/lib/components/booking/info/service2/utils.js +38 -29
  207. package/lib/components/booking/info/utils.js +4 -0
  208. package/lib/components/booking/info2/cartClientCard/index.js +34 -5
  209. package/lib/components/booking/info2/index.js +11 -5
  210. package/lib/components/booking/info2/serve.js +1 -6
  211. package/lib/components/booking/info2/service/addService/index.js +22 -3
  212. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  213. package/lib/components/booking/info2/service/addService/utils.js +48 -11
  214. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  215. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  216. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  217. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  218. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  219. package/lib/components/booking/info2/service/editService/index.js +254 -32
  220. package/lib/components/booking/info2/utilsByBooking.js +26 -19
  221. package/lib/components/booking/locales.d.ts +36 -0
  222. package/lib/components/booking/locales.js +42 -3
  223. package/lib/components/booking/model.d.ts +4 -0
  224. package/lib/components/booking/model.js +3 -0
  225. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  226. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  227. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  228. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  229. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  230. package/lib/components/booking/utils.d.ts +16 -7
  231. package/lib/components/booking/utils.js +18 -21
  232. package/lib/components/checkout/PaymentModal.js +41 -18
  233. package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
  234. package/lib/components/checkout/components/ScrollableList/index.js +0 -1
  235. package/lib/components/checkout/locales.d.ts +3 -0
  236. package/lib/components/checkout/locales.js +3 -0
  237. package/lib/components/eftposPay/linkly/index.js +31 -1
  238. package/lib/components/eftposPay/tyro/index.js +12 -0
  239. package/lib/components/list/List.js +3 -0
  240. package/lib/components/pay/toB/components/MX51/index.js +12 -37
  241. package/lib/components/pay/toB/types/index.d.ts +0 -12
  242. package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
  243. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  244. package/lib/components/shoppingCart/type.d.ts +1 -0
  245. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  246. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  247. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  248. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  249. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  250. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +279 -313
  251. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  252. package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
  253. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  254. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  255. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  256. package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
  257. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  258. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  259. package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
  260. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  261. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
  262. package/lib/components/ticketBooking/index.d.ts +0 -1
  263. package/lib/components/ticketBooking/index.js +0 -2
  264. package/lib/components/ticketBooking/serve.js +15 -117
  265. package/lib/components/ticketBooking/utils/index.d.ts +7 -1
  266. package/lib/components/ticketBooking/utils/index.js +29 -23
  267. package/lib/hooks/useEngineContext.d.ts +0 -1
  268. package/lib/hooks/useEngineContext.js +2 -10
  269. package/lib/index.d.ts +4 -0
  270. package/lib/index.js +12 -0
  271. package/lib/plus/clientCard/locales.js +3 -3
  272. package/lib/plus/clinetSearch/index.js +17 -8
  273. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  274. package/lib/plus/clinetSearch/locales.js +7 -4
  275. package/lib/plus/clinetSearch/types.d.ts +12 -0
  276. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  277. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  278. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  279. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  280. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  281. package/lib/plus/contactInfo/index.d.ts +6 -0
  282. package/lib/plus/contactInfo/index.js +226 -0
  283. package/lib/plus/contactInfo/index.less +621 -0
  284. package/lib/plus/contactInfo/locales.d.ts +15 -0
  285. package/lib/plus/contactInfo/locales.js +38 -0
  286. package/lib/plus/contactInfo/types.d.ts +91 -0
  287. package/lib/plus/contactInfo/types.js +17 -0
  288. package/lib/plus/contactInfo/utils.d.ts +7 -0
  289. package/lib/plus/contactInfo/utils.js +64 -0
  290. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  291. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  292. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  293. package/lib/plus/contactInfoModal/index.js +139 -0
  294. package/lib/plus/contactInfoModal/index.less +19 -0
  295. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  296. package/lib/plus/contactInfoModal/locales.js +89 -0
  297. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  298. package/lib/plus/productSelect/ProductCard/index.js +1 -1
  299. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  300. package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
  301. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  302. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  303. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  304. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  305. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  306. package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
  307. package/lib/plus/selectHolder/index.d.ts +7 -0
  308. package/lib/plus/selectHolder/index.js +223 -0
  309. package/lib/plus/selectHolder/index.less +137 -0
  310. package/lib/plus/selectHolder/locales.d.ts +24 -0
  311. package/lib/plus/selectHolder/locales.js +47 -0
  312. package/lib/plus/selectHolder/types.d.ts +104 -0
  313. package/lib/plus/selectHolder/types.js +17 -0
  314. package/lib/plus/selectHolder/utils.d.ts +9 -0
  315. package/lib/plus/selectHolder/utils.js +34 -0
  316. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  317. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  318. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  319. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
  320. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  321. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  322. package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
  323. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  324. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  325. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  326. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  327. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  328. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  329. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  330. package/lowcode/contact-info/meta.ts +199 -0
  331. package/lowcode/contact-info-modal/meta.ts +98 -0
  332. package/lowcode/event-select-holder/meta.ts +2 -2
  333. package/lowcode/select-holder/meta.ts +220 -0
  334. package/lowcode/select-holder/snippets.ts +41 -0
  335. package/package.json +13 -11
  336. package/es/hooks/printer.d.ts +0 -4
  337. package/es/hooks/printer.js +0 -35
  338. package/lib/hooks/printer.d.ts +0 -4
@@ -14,7 +14,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
14
14
  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); } }
15
15
  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); }); }; }
16
16
  import { useState, useEffect, useMemo } from 'react';
17
- import { locales } from "@pisell/utils";
17
+ import { locales } from '@pisell/utils';
18
18
  import { usePisellOS } from "../../hooks/useEngineContext";
19
19
  import useEngineContext from "../../hooks/useEngineContext";
20
20
  import { sortResources, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatHolder, Toast } from "./utils";
@@ -37,7 +37,7 @@ export var contextUtils = function contextUtils() {
37
37
 
38
38
  /**
39
39
  * @title: 监听步骤发生变化
40
- * @description:
40
+ * @description:
41
41
  * @return {*}
42
42
  * @Author: WangHan
43
43
  * @Date: 2025-04-15 11:11
@@ -143,56 +143,56 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
143
143
  var currentSelectedResources = appointmentBooking.getOtherData('current_selected_resources');
144
144
 
145
145
  // 先确定点击时的步骤,如果当前步骤是选择服务
146
- if (!isRetailTemplate && currentKey === "select-service") {
146
+ if (!isRetailTemplate && currentKey === 'select-service') {
147
147
  var _appointmentBooking$o, _stepList, _stepList2;
148
148
  var _ref3 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
149
149
  bookingProcess = _ref3.bookingProcess;
150
- var isDateSelectedFirst = bookingProcess === "date_first";
150
+ var isDateSelectedFirst = bookingProcess === 'date_first';
151
151
  var hasResourceStep = (_stepList = stepList) === null || _stepList === void 0 ? void 0 : _stepList.find(function (item) {
152
- return (item === null || item === void 0 ? void 0 : item.key) === "select-resource";
152
+ return (item === null || item === void 0 ? void 0 : item.key) === 'select-resource';
153
153
  });
154
154
  var hasSelectGuestStep = (_stepList2 = stepList) === null || _stepList2 === void 0 || (_stepList2 = _stepList2.find(function (item) {
155
- return (item === null || item === void 0 ? void 0 : item.key) === "select-guest";
155
+ return (item === null || item === void 0 ? void 0 : item.key) === 'select-guest';
156
156
  })) === null || _stepList2 === void 0 ? void 0 : _stepList2.key;
157
157
  // 判断购物车里是否全是是普通商品
158
158
  var isAllNormalProduct = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.isCartAllNormalProducts();
159
159
  if (isAllNormalProduct) {
160
- removeStep("select-resource");
161
- removeStep("select-time");
160
+ removeStep('select-resource');
161
+ removeStep('select-time');
162
162
  removeStep('fill-form');
163
163
  if (!isDateSelectedFirst) {
164
- removeStep("select-date");
164
+ removeStep('select-date');
165
165
  }
166
166
  } else if (!hasResourceStep) {
167
167
  // 如果不全是普通商品,并且还没有选择资源步骤,证明之前被删除过,要给她加回来
168
168
  // 判断当前步骤里有没有添加预约人,如果有的话则应该是在添加预约人之后添加步骤
169
- var targetKey = hasSelectGuestStep ? hasSelectGuestStep : "select-service";
169
+ var targetKey = hasSelectGuestStep ? hasSelectGuestStep : 'select-service';
170
170
  var isHasDurationProduct = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.isCartHasDurationProduct();
171
171
  // 如果购物车里有 duration 商品(目前来说,只能是纯 duration 商品)
172
172
  if (isHasDurationProduct) {
173
173
  // 如果是先选商品,则添加日期、资源、时间步骤
174
174
  if (!isDateSelectedFirst) {
175
175
  appointmentBooking.addStep({
176
- key: "select-date",
177
- description: locales.getText("pisell2.appointment.select.date")
176
+ key: 'select-date',
177
+ description: locales.getText('pisell2.appointment.select.date')
178
178
  }, targetKey);
179
- targetKey = "select-date";
179
+ targetKey = 'select-date';
180
180
  }
181
181
  // 如果是先选日期,则添加资源、时间
182
182
  appointmentBooking.addStep({
183
- key: "select-resource",
184
- description: locales.getText("pisell2.appointment.select.resource")
183
+ key: 'select-resource',
184
+ description: locales.getText('pisell2.appointment.select.resource')
185
185
  }, targetKey);
186
- targetKey = "select-resource";
186
+ targetKey = 'select-resource';
187
187
  appointmentBooking.addStep({
188
- key: "select-time",
189
- description: locales.getText("pisell2.appointment.select.time")
188
+ key: 'select-time',
189
+ description: locales.getText('pisell2.appointment.select.time')
190
190
  }, targetKey);
191
191
  } else {
192
192
  // 如果购物车里是session 商品,则只添加选择资源步骤
193
193
  appointmentBooking.addStep({
194
- key: "select-resource",
195
- description: locales.getText("pisell2.appointment.select.resource")
194
+ key: 'select-resource',
195
+ description: locales.getText('pisell2.appointment.select.resource')
196
196
  }, targetKey);
197
197
  }
198
198
  }
@@ -381,7 +381,6 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
381
381
  // // getHolders();
382
382
  // // }
383
383
  // // }
384
-
385
384
  // // 继续后续流程
386
385
  // checkHolder()
387
386
  // }
@@ -434,7 +433,7 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
434
433
 
435
434
  /**
436
435
  * @title: 获取商品数据
437
- * @description:
436
+ * @description:
438
437
  * @return {*}
439
438
  * @Author: WangHan
440
439
  * @Date: 2025-04-15 11:12
@@ -525,7 +524,7 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
525
524
 
526
525
  /**
527
526
  * @title: 更新购物车数据
528
- * @description:
527
+ * @description:
529
528
  * @return {*}
530
529
  * @Author: WangHan
531
530
  * @Date: 2025-04-15 11:12
@@ -612,7 +611,7 @@ export var useAppointmentBookingCart = function useAppointmentBookingCart() {
612
611
 
613
612
  /**
614
613
  * @title: 获取登录状态
615
- * @description:
614
+ * @description:
616
615
  * @return {*}
617
616
  * @Author: WangHan
618
617
  * @Date: 2025-04-15 11:14
@@ -640,7 +639,7 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
640
639
 
641
640
  /**
642
641
  * @title: 获取账户
643
- * @description:
642
+ * @description:
644
643
  * @return {*}
645
644
  * @Author: WangHan
646
645
  * @Date: 2025-04-15 11:15
@@ -790,7 +789,7 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
790
789
 
791
790
  /**
792
791
  * @title: 获取资源数据
793
- * @description:
792
+ * @description:
794
793
  * @return {*}
795
794
  * @Author: WangHan
796
795
  * @Date: 2025-04-15 11:29
@@ -855,7 +854,7 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
855
854
 
856
855
  /**
857
856
  * @title: 是否跳过资源选择步骤
858
- * @description:
857
+ * @description:
859
858
  * @return {*}
860
859
  * @Author: WangHan
861
860
  * @Date: 2025-04-21 11:47
@@ -937,13 +936,13 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
937
936
 
938
937
  /**
939
938
  * @title: 获取预约配置
940
- * @description:
939
+ * @description:
941
940
  * @return {*}
942
941
  * @Author: WangHan
943
942
  * @Date: 2025-04-24 18:15
944
943
  */
945
944
  export var useAppointmentBookingSetting = function useAppointmentBookingSetting() {
946
- var _appointmentBooking$o4, _appointmentBooking$o5;
945
+ var _appointmentBooking$o4, _appointmentBooking$o5, _appointmentBooking$o6;
947
946
  var utils = contextUtils();
948
947
  var _ref28 = useAppointmentBookingContext(),
949
948
  appointmentBooking = _ref28.appointmentBooking;
@@ -977,6 +976,7 @@ export var useAppointmentBookingSetting = function useAppointmentBookingSetting(
977
976
  bookingSubject: bookingSubject,
978
977
  setOtherData: setOtherData,
979
978
  getOtherData: getOtherData,
980
- formName: formName
979
+ formName: formName,
980
+ bookingSetting: (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o6 = appointmentBooking.otherParams) === null || _appointmentBooking$o6 === void 0 ? void 0 : _appointmentBooking$o6.bookingSetting) || {}
981
981
  };
982
982
  };
@@ -117,6 +117,7 @@ declare const _default: {
117
117
  'pisell2.text.goodpass.code-invalid-cart': string;
118
118
  'pisell2.text.goodpass.login': string;
119
119
  'pisell2.text.goodpass.login-tip': string;
120
+ 'pisell2.text.contact-info.title': string;
120
121
  };
121
122
  'zh-CN': {
122
123
  'pisell2.event.calendar.limit.unavailable': string;
@@ -236,6 +237,7 @@ declare const _default: {
236
237
  'pisell2.text.goodpass.code-invalid-cart': string;
237
238
  'pisell2.text.goodpass.login': string;
238
239
  'pisell2.text.goodpass.login-tip': string;
240
+ 'pisell2.text.contact-info.title': string;
239
241
  };
240
242
  'zh-HK': {
241
243
  'pisell2.event.calendar.limit.unavailable': string;
@@ -355,6 +357,7 @@ declare const _default: {
355
357
  'pisell2.text.goodpass.code-invalid-cart': string;
356
358
  'pisell2.text.goodpass.login': string;
357
359
  'pisell2.text.goodpass.login-tip': string;
360
+ 'pisell2.text.contact-info.title': string;
358
361
  };
359
362
  };
360
363
  export default _default;
@@ -132,9 +132,10 @@ export default {
132
132
  'pisell2.text.goodpass.code': 'Code',
133
133
  'pisell2.text.goodpass.enter-code': 'Enter Code',
134
134
  'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
135
- 'pisell2.text.goodpass.code-invalid-cart': "No eligible items in the cart",
135
+ 'pisell2.text.goodpass.code-invalid-cart': 'No eligible items in the cart',
136
136
  'pisell2.text.goodpass.login': 'Login',
137
- 'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit'
137
+ 'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit',
138
+ 'pisell2.text.contact-info.title': 'Contact info'
138
139
  },
139
140
  'zh-CN': {
140
141
  'pisell2.event.calendar.limit.unavailable': '不可预约',
@@ -269,9 +270,10 @@ export default {
269
270
  'pisell2.text.goodpass.code': '券码',
270
271
  'pisell2.text.goodpass.enter-code': '请输入券码',
271
272
  'pisell2.text.goodpass.code-invalid': '当前券码不可用',
272
- 'pisell2.text.goodpass.code-invalid-cart': "当前购物车中无可用商品",
273
+ 'pisell2.text.goodpass.code-invalid-cart': '当前购物车中无可用商品',
273
274
  'pisell2.text.goodpass.login': '登录',
274
- 'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分'
275
+ 'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分',
276
+ 'pisell2.text.contact-info.title': '联系信息'
275
277
  },
276
278
  'zh-HK': {
277
279
  'pisell2.event.calendar.limit.unavailable': '不可預約',
@@ -406,8 +408,9 @@ export default {
406
408
  'pisell2.text.goodpass.code': '券碼',
407
409
  'pisell2.text.goodpass.enter-code': '請輸入券碼',
408
410
  'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
409
- 'pisell2.text.goodpass.code-invalid-cart': "當前購物車中無可用商品",
411
+ 'pisell2.text.goodpass.code-invalid-cart': '當前購物車中無可用商品',
410
412
  'pisell2.text.goodpass.login': '登錄',
411
- 'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分'
413
+ 'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分',
414
+ 'pisell2.text.contact-info.title': '聯繫信息'
412
415
  }
413
416
  };
@@ -3,12 +3,12 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
3
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
6
7
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
8
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
9
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
10
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
12
12
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
13
  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."); }
14
14
  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); }
@@ -41,7 +41,7 @@ var createToastContent = function createToastContent(text) {
41
41
  }, text);
42
42
  };
43
43
  var ActionButtons = function ActionButtons(_ref) {
44
- var _context$appHelper, _state$service2, _state$addons2, _state$service4, _state$service6, _context$appHelper3, _state$service8, _state$addons4, _context$appHelper4, _context$appHelper4$g;
44
+ var _context$appHelper, _state$service3, _state$addons2, _state$service5, _state$service7, _context$appHelper3, _state$service9, _state$addons4, _context$appHelper4, _context$appHelper4$g;
45
45
  var state = _ref.state,
46
46
  dispatch = _ref.dispatch,
47
47
  _ref$disabled = _ref.disabled,
@@ -77,6 +77,7 @@ var ActionButtons = function ActionButtons(_ref) {
77
77
 
78
78
  // 将选中的客户数据传递给状态管理
79
79
  var changeCustomerToGlobalState = useMemoizedFn(function (value) {
80
+ var _state$service;
80
81
  dispatch({
81
82
  type: 'setClient',
82
83
  payload: {
@@ -84,6 +85,21 @@ var ActionButtons = function ActionButtons(_ref) {
84
85
  edit: true
85
86
  }
86
87
  });
88
+ if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
89
+ // 还需要清空商品内的 holder 信息
90
+ dispatch({
91
+ type: 'setService',
92
+ payload: {
93
+ value: state.service.value.map(function (item) {
94
+ return _objectSpread(_objectSpread({}, item), {}, {
95
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
96
+ holder_id: []
97
+ })
98
+ });
99
+ })
100
+ }
101
+ });
102
+ }
87
103
  });
88
104
  var _useCustomer = useCustomer({
89
105
  changeCustomerToGlobalState: changeCustomerToGlobalState
@@ -155,9 +171,9 @@ var ActionButtons = function ActionButtons(_ref) {
155
171
 
156
172
  // 检查是否有购物车内容
157
173
  var hasCartItems = useMemo(function () {
158
- var _state$service, _state$addons;
159
- return ((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 || (_state$service = _state$service.value) === null || _state$service === void 0 ? void 0 : _state$service.length) || 0) + ((state === null || state === void 0 || (_state$addons = state.addons) === null || _state$addons === void 0 || (_state$addons = _state$addons.value) === null || _state$addons === void 0 ? void 0 : _state$addons.length) || 0) > 0;
160
- }, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value, state === null || state === void 0 || (_state$addons2 = state.addons) === null || _state$addons2 === void 0 ? void 0 : _state$addons2.value]);
174
+ var _state$service2, _state$addons;
175
+ return ((state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 || (_state$service2 = _state$service2.value) === null || _state$service2 === void 0 ? void 0 : _state$service2.length) || 0) + ((state === null || state === void 0 || (_state$addons = state.addons) === null || _state$addons === void 0 || (_state$addons = _state$addons.value) === null || _state$addons === void 0 ? void 0 : _state$addons.length) || 0) > 0;
176
+ }, [state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value, state === null || state === void 0 || (_state$addons2 = state.addons) === null || _state$addons2 === void 0 ? void 0 : _state$addons2.value]);
161
177
 
162
178
  // 检查是否禁用编辑
163
179
  var isDisabledEdit = useMemo(function () {
@@ -194,8 +210,8 @@ var ActionButtons = function ActionButtons(_ref) {
194
210
  // 计算已使用的券数量
195
211
  var usedVouchersCount = useMemo(function () {
196
212
  try {
197
- var _state$service3;
198
- if (!((_state$service3 = state.service) !== null && _state$service3 !== void 0 && (_state$service3 = _state$service3.value) !== null && _state$service3 !== void 0 && _state$service3.length)) {
213
+ var _state$service4;
214
+ if (!((_state$service4 = state.service) !== null && _state$service4 !== void 0 && (_state$service4 = _state$service4.value) !== null && _state$service4 !== void 0 && _state$service4.length)) {
199
215
  return 0;
200
216
  }
201
217
  // 直接从全局折扣券列表中计算被选中的数量,避免重复计数
@@ -206,14 +222,14 @@ var ActionButtons = function ActionButtons(_ref) {
206
222
  console.error('计算已使用券数量失败:', error);
207
223
  return 0;
208
224
  }
209
- }, [discountList, (_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.value]);
225
+ }, [discountList, (_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : _state$service5.value]);
210
226
 
211
227
  // 判断是否有券可用但手动取消使用(显示红色感叹号)
212
228
  var shouldShowWarning = useMemo(function () {
213
229
  try {
214
- var _state$service5;
230
+ var _state$service6;
215
231
  // 条件:购物车不为空 && discountList 长度大于 0,且没有 isSelected 的优惠券,且有 isManualSelect 的优惠券
216
- return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.value) === null || _state$service5 === void 0 ? void 0 : _state$service5.length) > 0 && discountList.length > 0 && !discountList.some(function (discount) {
232
+ return ((_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.value) === null || _state$service6 === void 0 ? void 0 : _state$service6.length) > 0 && discountList.length > 0 && !discountList.some(function (discount) {
217
233
  return discount.isSelected;
218
234
  }) && discountList.some(function (discount) {
219
235
  return discount.isManualSelect;
@@ -222,7 +238,7 @@ var ActionButtons = function ActionButtons(_ref) {
222
238
  console.error('判断警告状态失败:', error);
223
239
  return false;
224
240
  }
225
- }, [discountList, (_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : _state$service6.value]);
241
+ }, [discountList, (_state$service7 = state.service) === null || _state$service7 === void 0 ? void 0 : _state$service7.value]);
226
242
 
227
243
  // 监听折扣券列表变化
228
244
  useEffect(function () {
@@ -290,8 +306,8 @@ var ActionButtons = function ActionButtons(_ref) {
290
306
 
291
307
  // 清空所有内容并重置购物车
292
308
  var handleClearAllAndReset = function handleClearAllAndReset() {
293
- var _shopDiscount$clear;
294
- // (window as any)?.shopApi?.bookingTicket?.clearAllCart();
309
+ var _window;
310
+ (_window = window) === null || _window === void 0 || (_window = _window.shopApi) === null || _window === void 0 || (_window = _window.bookingTicket) === null || _window === void 0 || _window.clearAllCart();
295
311
  clearAllScanListenersTaskQueue();
296
312
  // 清空服务项目
297
313
  dispatch({
@@ -358,8 +374,6 @@ var ActionButtons = function ActionButtons(_ref) {
358
374
  // TODO: 如果需要重置更多信息,可以在这里添加
359
375
  // 比如重置优惠券、表单数据、宠物信息等
360
376
 
361
- // 清空商品券
362
- shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$clear = shopDiscount.clear) === null || _shopDiscount$clear === void 0 || _shopDiscount$clear.call(shopDiscount);
363
377
  setShowClearModal(false);
364
378
  Toast === null || Toast === void 0 || Toast.success(createToastContent(locales.getText('pisell2.action-buttons.clear-success')));
365
379
  };
@@ -375,8 +389,8 @@ var ActionButtons = function ActionButtons(_ref) {
375
389
 
376
390
  // 商品清空后,重置折扣信息
377
391
  useEffect(function () {
378
- var _state$service7, _state$addons3;
379
- if (((_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.value) === null || _state$service7 === void 0 ? void 0 : _state$service7.length) === 0 && ((_state$addons3 = state.addons) === null || _state$addons3 === void 0 || (_state$addons3 = _state$addons3.value) === null || _state$addons3 === void 0 ? void 0 : _state$addons3.length) === 0) {
392
+ var _state$service8, _state$addons3;
393
+ if (((_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.value) === null || _state$service8 === void 0 ? void 0 : _state$service8.length) === 0 && ((_state$addons3 = state.addons) === null || _state$addons3 === void 0 || (_state$addons3 = _state$addons3.value) === null || _state$addons3 === void 0 ? void 0 : _state$addons3.length) === 0) {
380
394
  dispatch({
381
395
  type: 'setState',
382
396
  payload: {
@@ -384,7 +398,7 @@ var ActionButtons = function ActionButtons(_ref) {
384
398
  }
385
399
  });
386
400
  }
387
- }, [(_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : _state$service8.value, (_state$addons4 = state.addons) === null || _state$addons4 === void 0 ? void 0 : _state$addons4.value]);
401
+ }, [(_state$service9 = state.service) === null || _state$service9 === void 0 ? void 0 : _state$service9.value, (_state$addons4 = state.addons) === null || _state$addons4 === void 0 ? void 0 : _state$addons4.value]);
388
402
 
389
403
  // 处理价格调整完成
390
404
  var handlePriceAdjustConfirm = function handlePriceAdjustConfirm(discountAmount) {
@@ -413,7 +427,7 @@ var ActionButtons = function ActionButtons(_ref) {
413
427
 
414
428
  // 处理自定义商品保存
415
429
  var handleCustomiseItemSave = function handleCustomiseItemSave(data) {
416
- var _state$service9;
430
+ var _state$service10;
417
431
  console.log('保存自定义商品:', data);
418
432
 
419
433
  // 创建自定义商品项,按照标准商品结构
@@ -457,7 +471,7 @@ var ActionButtons = function ActionButtons(_ref) {
457
471
  };
458
472
 
459
473
  // 添加到购物车(使用 service 来存储自定义商品)
460
- var currentServices = (state === null || state === void 0 || (_state$service9 = state.service) === null || _state$service9 === void 0 ? void 0 : _state$service9.value) || [];
474
+ var currentServices = (state === null || state === void 0 || (_state$service10 = state.service) === null || _state$service10 === void 0 ? void 0 : _state$service10.value) || [];
461
475
 
462
476
  // 直接添加自定义商品,不检查重复
463
477
  var updatedServices = [customItem].concat(_toConsumableArray(currentServices));
@@ -424,7 +424,7 @@ var CustomSelect = function CustomSelect(props, ref) {
424
424
  marginTop: 16,
425
425
  height: 44
426
426
  },
427
- placeholder: locales.getText('pisell2.text.search'),
427
+ placeholder: locales.getText('pisell2.booking.text.search-placeholder'),
428
428
  value: search,
429
429
  allowClear: true,
430
430
  onChange: function onChange(e) {
@@ -7,10 +7,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
7
7
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
8
8
  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); }
9
9
  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; }
10
- import { getDiscountTime, flexibleObj } from "../../utils";
10
+ import { flexibleObj, getDiscountTimeByDayMinutes } from "../../utils";
11
11
  import { formatAmount } from '@pisell/utils';
12
12
  import Decimal from 'decimal.js';
13
- import { isDayBooking, isDayBookingProduct, isNormalProductByDurationSchedule } from "../../info/service2/utils";
13
+ import { isDayBooking, isNormalProductByDurationSchedule } from "../../info/service2/utils";
14
+ import { isMultiDayProduct } from "../../info2/service/addService/utils";
14
15
  export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_details) {
15
16
  var total = new Decimal(0);
16
17
  var _iterator = _createForOfIteratorHelper(relation_details),
@@ -39,6 +40,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
39
40
  var duration = new Decimal(0);
40
41
  // 是否是跨日预约
41
42
  var isDay = isDayBooking(state);
43
+ var dayDuration = new Decimal(0);
44
+ var minuteDuration = new Decimal(0);
42
45
  if (isEdit) {
43
46
  // 计算总价 服务 和 附加商品
44
47
  if (state !== null && state !== void 0 && state.service || state !== null && state !== void 0 && state.addons) {
@@ -51,14 +54,18 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
51
54
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
52
55
  var item = _step2.value;
53
56
  // 跨日预约
54
- if (isDay || isNormalProductByDurationSchedule(item)) {
57
+ if (isDay || isNormalProductByDurationSchedule(item) || isMultiDayProduct(item)) {
55
58
  var quantity = new Decimal(item._extend.quantity || 1);
56
59
  var itemTotal = new Decimal(item._extend.total || 0);
57
60
  price = price.add(itemTotal.mul(quantity));
58
61
 
59
62
  // 普通商品不能加到时长上
60
- var _duration = isDayBookingProduct(item, state) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
61
- duration = duration.add(_duration);
63
+ var _duration = !isNormalProductByDurationSchedule(item) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
64
+ if (isDay || isMultiDayProduct(item)) {
65
+ dayDuration = dayDuration.add(_duration);
66
+ } else {
67
+ minuteDuration = minuteDuration.add(_duration);
68
+ }
62
69
  } else {
63
70
  var _quantity = new Decimal(item._extend.quantity || 1);
64
71
  var _itemTotal = new Decimal(item._extend.total || 0);
@@ -69,6 +76,11 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
69
76
  price = price.add(relationTotal);
70
77
  var itemDuration = new Decimal(flexibleObj.getValue(item._extend.duration) || 0);
71
78
  duration = duration.add(itemDuration);
79
+ if (isMultiDayProduct(item)) {
80
+ dayDuration = dayDuration.add(itemDuration);
81
+ } else {
82
+ minuteDuration = minuteDuration.add(itemDuration);
83
+ }
72
84
  }
73
85
  }
74
86
  } catch (err) {
@@ -102,20 +114,25 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
102
114
  var services = (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || [];
103
115
  duration = services.reduce(function (pre, cur) {
104
116
  var current = new Decimal(0);
105
- if (isDay) {
117
+ if (isDay || isMultiDayProduct(cur)) {
106
118
  // 普通商品不能加到时长上
107
- var _duration2 = isDayBookingProduct(cur, state) ? new Decimal(cur._extend.duration || 0) : new Decimal(0);
119
+ var _duration2 = !isNormalProductByDurationSchedule(cur) ? new Decimal(cur._extend.duration || 0) : new Decimal(0);
108
120
  current = _duration2;
109
121
  } else {
110
122
  var _cur$_extend;
111
123
  current = new Decimal(flexibleObj.getValue(((_cur$_extend = cur._extend) === null || _cur$_extend === void 0 ? void 0 : _cur$_extend.duration) || 0) || 0);
112
124
  }
125
+ if (isDay || isMultiDayProduct(cur)) {
126
+ dayDuration = dayDuration.add(current);
127
+ } else {
128
+ minuteDuration = minuteDuration.add(current);
129
+ }
113
130
  return pre.add(current);
114
131
  }, new Decimal(0));
115
132
  }
116
133
  return {
117
134
  productExpectAmount: price.toNumber(),
118
- duration: getDiscountTime(duration.toNumber(), isDay)
135
+ duration: getDiscountTimeByDayMinutes(dayDuration.toNumber(), minuteDuration.toNumber())
119
136
  };
120
137
  };
121
138
  var getProductItemTax = function getProductItemTax(item, state, options) {