@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
@@ -41,6 +41,9 @@ var import_Item = __toESM(require("../Cart/Item"));
41
41
  var import_utils2 = require("../../utils");
42
42
  var import_utils3 = require("./utils");
43
43
  var import_index = require("./index.less");
44
+ var import_ContactInfoContent = __toESM(require("../../../../plus/contactInfoModal/ContactInfoContent"));
45
+ var import_antd = require("antd");
46
+ var import_useLoginUser = __toESM(require("../../../../hooks/useLoginUser"));
44
47
  var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
45
48
  var _a, _b;
46
49
  const hasSubscribedRef = (0, import_react.useRef)(false);
@@ -49,7 +52,69 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
49
52
  const utils = (0, import_hooks.contextUtils)();
50
53
  const { pubsub } = context.appHelper.utils;
51
54
  const { appointmentBooking, summary, isAgreeDepositPolicy, setLoading } = (0, import_context.useAppointmentBookingContext)();
52
- const { isRetailTemplate } = (0, import_hooks.useAppointmentBookingSetting)();
55
+ const { isRetailTemplate, bookingSetting } = (0, import_hooks.useAppointmentBookingSetting)();
56
+ console.log(bookingSetting, "bookingSetting");
57
+ const [form] = import_antd.Form.useForm();
58
+ const userInfo = (0, import_useLoginUser.default)();
59
+ const getContactsInfo = async () => {
60
+ var _a2;
61
+ let contacts_info = null;
62
+ try {
63
+ const res = await ((_a2 = appointmentBooking == null ? void 0 : appointmentBooking.getContactInfo) == null ? void 0 : _a2.call(appointmentBooking, {
64
+ key: "contacts_info"
65
+ }));
66
+ if ((res == null ? void 0 : res.code) == 200 && (res == null ? void 0 : res.data)) {
67
+ contacts_info = res == null ? void 0 : res.data;
68
+ }
69
+ } catch (error) {
70
+ console.log("error", error);
71
+ contacts_info = null;
72
+ }
73
+ const transfromCountryCallingCode = (code) => {
74
+ if (!code) {
75
+ return "";
76
+ }
77
+ return (code == null ? void 0 : code.startsWith("+")) ? code : `+${code}`;
78
+ };
79
+ if (contacts_info) {
80
+ const { first_name, last_name, phone, email } = contacts_info || {};
81
+ form.setFieldsValue({
82
+ first_name,
83
+ last_name,
84
+ phone: {
85
+ phone: phone == null ? void 0 : phone.phone,
86
+ countryCallingCode: transfromCountryCallingCode(
87
+ phone == null ? void 0 : phone.country_calling_code
88
+ ),
89
+ countryCode: phone == null ? void 0 : phone.country_code
90
+ },
91
+ email
92
+ });
93
+ } else {
94
+ console.log("userInfo", userInfo);
95
+ const {
96
+ first_name,
97
+ last_name,
98
+ phone,
99
+ email,
100
+ country_calling_code,
101
+ country_code
102
+ } = userInfo || {};
103
+ form.setFieldsValue({
104
+ first_name,
105
+ last_name,
106
+ phone: {
107
+ phone,
108
+ countryCallingCode: transfromCountryCallingCode(country_calling_code),
109
+ countryCode: country_code
110
+ },
111
+ email
112
+ });
113
+ }
114
+ };
115
+ (0, import_react.useEffect)(() => {
116
+ getContactsInfo();
117
+ }, []);
53
118
  const goPaymentFinish = (order_id, amount) => {
54
119
  var _a2;
55
120
  const url = `/payment-finish/success?order_id=${order_id}&amount=${Number(
@@ -60,17 +125,17 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
60
125
  };
61
126
  (0, import_react.useEffect)(() => {
62
127
  if (isRetailTemplate) {
63
- handleForm();
128
+ handleForm(false);
64
129
  }
65
130
  }, [isRetailTemplate]);
66
- const handleForm = async (isSubmit) => {
131
+ const handleForm = async (isSubmit, extraData) => {
67
132
  var _a2;
68
133
  const carts = await appointmentBooking.getCart();
69
134
  const key = "isRetailFormSubmit";
70
135
  const isRetailFormSubmit = appointmentBooking.getOtherData(key);
71
136
  const callback = () => {
72
137
  if (isSubmit) {
73
- onCheckout();
138
+ onCheckout(extraData);
74
139
  }
75
140
  };
76
141
  if (isRetailFormSubmit) {
@@ -94,7 +159,7 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
94
159
  }
95
160
  });
96
161
  };
97
- const handleNext = async () => {
162
+ const handleNext = async (extraData) => {
98
163
  var _a2;
99
164
  const { deposit } = summary;
100
165
  if ((deposit == null ? void 0 : deposit.hasDeposit) && ((_a2 = deposit == null ? void 0 : deposit.protocols) == null ? void 0 : _a2.length) > 0 && !isAgreeDepositPolicy) {
@@ -102,15 +167,15 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
102
167
  }
103
168
  setLoading(true);
104
169
  if (isRetailTemplate) {
105
- handleForm(true);
170
+ handleForm(true, extraData);
106
171
  return;
107
172
  }
108
- onCheckout();
173
+ onCheckout(extraData);
109
174
  };
110
- const onCheckout = async () => {
175
+ const onCheckout = async (extraData) => {
111
176
  try {
112
177
  const { deposit } = summary;
113
- const { data } = await appointmentBooking.submitOrder();
178
+ const { data } = await appointmentBooking.submitOrder(extraData);
114
179
  const { is_deposit, deposit_amount, total_amount, order_id } = data || {};
115
180
  const _total = is_deposit ? deposit_amount : total_amount;
116
181
  if (_total > 0) {
@@ -143,8 +208,8 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
143
208
  }, 50);
144
209
  }
145
210
  };
146
- const handleSubmit = () => {
147
- var _a2, _b2, _c, _d;
211
+ const handleSubmit = async () => {
212
+ var _a2, _b2, _c, _d, _e, _f, _g;
148
213
  if ((_b2 = (_a2 = utils == null ? void 0 : utils.businessUtils) == null ? void 0 : _a2.isGuestUser) == null ? void 0 : _b2.call(_a2)) {
149
214
  if (!hasSubscribedRef.current) {
150
215
  pubsub.subscribe("bind.guest.user", handleNext);
@@ -153,7 +218,28 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
153
218
  (_d = (_c = utils == null ? void 0 : utils.businessUtils) == null ? void 0 : _c.openRegisterModal) == null ? void 0 : _d.call(_c, true);
154
219
  return;
155
220
  }
156
- handleNext();
221
+ let contacts_info = null;
222
+ try {
223
+ if (showContactInfo) {
224
+ contacts_info = await form.validateFields();
225
+ const newPhone = {
226
+ phone: ((_e = contacts_info == null ? void 0 : contacts_info.phone) == null ? void 0 : _e.phone) || "",
227
+ country_calling_code: ((_f = contacts_info == null ? void 0 : contacts_info.phone) == null ? void 0 : _f.countryCallingCode) || "",
228
+ country_code: ((_g = contacts_info == null ? void 0 : contacts_info.phone) == null ? void 0 : _g.countryCode) || ""
229
+ };
230
+ contacts_info.phone = newPhone;
231
+ if ((contacts_info == null ? void 0 : contacts_info.first_name) || (contacts_info == null ? void 0 : contacts_info.last_name)) {
232
+ contacts_info.display_name = `${(contacts_info == null ? void 0 : contacts_info.first_name) || ""} ${(contacts_info == null ? void 0 : contacts_info.last_name) || ""}`;
233
+ } else {
234
+ contacts_info.display_name = "";
235
+ }
236
+ console.log("contacts_info", contacts_info);
237
+ }
238
+ } catch (error) {
239
+ console.log("error", error);
240
+ return;
241
+ }
242
+ handleNext({ contacts_info });
157
243
  };
158
244
  (0, import_react.useEffect)(() => {
159
245
  return () => {
@@ -164,7 +250,64 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
164
250
  (0, import_react.useImperativeHandle)(ref, () => ({
165
251
  next: handleSubmit
166
252
  }));
167
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onNext: handleSubmit }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement(
253
+ const showContactInfo = (0, import_react.useMemo)(() => {
254
+ let visible = false;
255
+ const { showContactInfo: showContactInfoValue, contactInfoSetting } = bookingSetting || {};
256
+ if (showContactInfoValue === 1 || showContactInfoValue === "1") {
257
+ const { showName, showPhone, showEmail } = contactInfoSetting || {};
258
+ if ((showName === 0 || showName === "0") && (showPhone === 0 || showPhone === "0") && (showEmail === 0 || showEmail === "0")) {
259
+ visible = false;
260
+ } else {
261
+ visible = true;
262
+ }
263
+ } else {
264
+ visible = false;
265
+ }
266
+ return visible;
267
+ }, [bookingSetting == null ? void 0 : bookingSetting.showContactInfo, bookingSetting == null ? void 0 : bookingSetting.contactInfoSetting]);
268
+ const renderContactInfo = () => {
269
+ const {
270
+ emailRequired,
271
+ nameRequired,
272
+ phoneRequired,
273
+ showEmail,
274
+ showName,
275
+ showPhone
276
+ } = (bookingSetting == null ? void 0 : bookingSetting.contactInfoSetting) || {};
277
+ if (!showContactInfo) {
278
+ return null;
279
+ }
280
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-contact-info-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-contact-info-title" }, import_utils.locales.getText("pisell2.text.contact-info.title")), /* @__PURE__ */ import_react.default.createElement(
281
+ import_ContactInfoContent.default,
282
+ {
283
+ dataSource: null,
284
+ form,
285
+ config: {
286
+ first_name: {
287
+ visible: showName === 0 ? false : true,
288
+ required: nameRequired === "required" ? true : false
289
+ // 姓名默认选填
290
+ },
291
+ last_name: {
292
+ visible: showName === 0 ? false : true,
293
+ required: nameRequired === "required" ? true : false
294
+ // 姓名默认选填
295
+ },
296
+ phone: {
297
+ visible: showPhone === 0 ? false : true,
298
+ required: phoneRequired === "optional" ? false : true
299
+ // 手机号默认必填
300
+ },
301
+ email: {
302
+ visible: showEmail === 0 ? false : true,
303
+ required: emailRequired === "optional" ? false : true
304
+ // 邮箱默认选填
305
+ }
306
+ }
307
+ }
308
+ ));
309
+ };
310
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onNext: handleSubmit, renderContactInfo }) : showContactInfo ? renderContactInfo() : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement(
168
311
  "img",
169
312
  {
170
313
  src: `${config == null ? void 0 : config.awsStatic}/checkout_confirm.png`,
@@ -33,3 +33,18 @@
33
33
  }
34
34
  }
35
35
  }
36
+ .appointment-confirm-information-contact-info-wrap {
37
+ .appointment-confirm-information-contact-info-title {
38
+ color: #1b1b1b;
39
+ font-size: 20px;
40
+ font-weight: 600;
41
+ }
42
+
43
+ .pisell-contact-info-modal-content {
44
+ padding: 14px 0;
45
+ }
46
+
47
+ .pisell-lowcode-form-item {
48
+ margin-bottom: 14px;
49
+ }
50
+ }
@@ -103,4 +103,5 @@ export declare const useAppointmentBookingSetting: () => {
103
103
  setOtherData: (key: string, val: any) => any;
104
104
  getOtherData: (key: string) => any;
105
105
  formName: any;
106
+ bookingSetting: any;
106
107
  };
@@ -66,7 +66,16 @@ var contextUtils = () => {
66
66
  var useAppointmentBookingStep = () => {
67
67
  var _a, _b, _c;
68
68
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
69
- const { appointmentBooking, setCurrentStep, carts, openPolicy, setLoading, setCurrentSelectedResources, currentStepParams, setIsErrorHolder } = (0, import_context.useAppointmentBookingContext)();
69
+ const {
70
+ appointmentBooking,
71
+ setCurrentStep,
72
+ carts,
73
+ openPolicy,
74
+ setLoading,
75
+ setCurrentSelectedResources,
76
+ currentStepParams,
77
+ setIsErrorHolder
78
+ } = (0, import_context.useAppointmentBookingContext)();
70
79
  const { isRetailTemplate } = useAppointmentBookingSetting();
71
80
  const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
72
81
  const { isLogin, openLoginModal } = useAppointmentBookingLogin();
@@ -79,14 +88,11 @@ var useAppointmentBookingStep = () => {
79
88
  };
80
89
  (0, import_react.useEffect)(() => {
81
90
  getCurrentAndLastStep();
82
- pisellOS.effects.on(
83
- "appointmentBooking_step:changed",
84
- async (res) => {
85
- if (res.path === "currentStep") {
86
- getCurrentAndLastStep();
87
- }
91
+ pisellOS.effects.on("appointmentBooking_step:changed", async (res) => {
92
+ if (res.path === "currentStep") {
93
+ getCurrentAndLastStep();
88
94
  }
89
- );
95
+ });
90
96
  }, []);
91
97
  const getStepIndex = (type, skipNumber = 0) => {
92
98
  const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
@@ -105,11 +111,14 @@ var useAppointmentBookingStep = () => {
105
111
  };
106
112
  const addStep = (props, stepKey) => {
107
113
  const { index, key, description } = props;
108
- return appointmentBooking.addStep({
109
- index,
110
- key,
111
- description
112
- }, stepKey);
114
+ return appointmentBooking.addStep(
115
+ {
116
+ index,
117
+ key,
118
+ description
119
+ },
120
+ stepKey
121
+ );
113
122
  };
114
123
  const updateStep = (key, step) => {
115
124
  appointmentBooking.updateStep(key, {
@@ -159,7 +168,9 @@ var useAppointmentBookingStep = () => {
159
168
  appointmentBooking.addStep(
160
169
  {
161
170
  key: "select-resource",
162
- description: import_utils.locales.getText("pisell2.appointment.select.resource")
171
+ description: import_utils.locales.getText(
172
+ "pisell2.appointment.select.resource"
173
+ )
163
174
  },
164
175
  targetKey
165
176
  );
@@ -175,7 +186,9 @@ var useAppointmentBookingStep = () => {
175
186
  appointmentBooking.addStep(
176
187
  {
177
188
  key: "select-resource",
178
- description: import_utils.locales.getText("pisell2.appointment.select.resource")
189
+ description: import_utils.locales.getText(
190
+ "pisell2.appointment.select.resource"
191
+ )
179
192
  },
180
193
  targetKey
181
194
  );
@@ -191,13 +204,19 @@ var useAppointmentBookingStep = () => {
191
204
  }
192
205
  const capacityResult = appointmentBooking.checkMaxDurationCapacity();
193
206
  if (!capacityResult.success) {
194
- const getMessage = import_utils.locales.getText("pisell2.appointment.unuse.capacity");
207
+ const getMessage = import_utils.locales.getText(
208
+ "pisell2.appointment.unuse.capacity"
209
+ );
195
210
  const message = typeof getMessage === "function" ? getMessage(capacityResult.minAvailableCount) : getMessage;
196
211
  return (0, import_utils2.Toast)(message);
197
212
  }
198
213
  }
199
214
  if (!isRetailTemplate && (currentKey == null ? void 0 : currentKey.startsWith("select-resource"))) {
200
- const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(currentSelectedResources, appointmentBooking, utils);
215
+ const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(
216
+ currentSelectedResources,
217
+ appointmentBooking,
218
+ utils
219
+ );
201
220
  if (hasError) {
202
221
  setCurrentSelectedResources(updatedCartList);
203
222
  (0, import_utils3.scrollToFirstErrorCard)();
@@ -214,7 +233,10 @@ var useAppointmentBookingStep = () => {
214
233
  if (formId) {
215
234
  const description = import_utils.locales.getText("pisell2.appointment.fill-form");
216
235
  const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
217
- appointmentBooking.addStep({ key: formKey, description }, preKey || beforeKey);
236
+ appointmentBooking.addStep(
237
+ { key: formKey, description },
238
+ preKey || beforeKey
239
+ );
218
240
  preKey = formKey;
219
241
  } else {
220
242
  appointmentBooking.removeStep(formKey);
@@ -224,15 +246,20 @@ var useAppointmentBookingStep = () => {
224
246
  const selectedResource = (_c2 = currentSelectedResources == null ? void 0 : currentSelectedResources[0]) == null ? void 0 : _c2.currentSelectedResource;
225
247
  if (selectedResource) {
226
248
  const originRenderLists = ((_d = selectedResource == null ? void 0 : selectedResource.resourceItem) == null ? void 0 : _d.originRenderLists) || [];
227
- const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex((item) => {
228
- var _a3;
229
- return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
230
- });
249
+ const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex(
250
+ (item) => {
251
+ var _a3;
252
+ return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
253
+ }
254
+ );
231
255
  const nextResource = originRenderLists == null ? void 0 : originRenderLists[currentResourceIndex + 1];
232
256
  const resourceKey = `select-resource_@${nextResource == null ? void 0 : nextResource.form_id}-${nextResource == null ? void 0 : nextResource.code}`;
233
257
  if (nextResource) {
234
258
  const beforeKey = (_e = stepList2[stepList2.length - 2]) == null ? void 0 : _e.key;
235
- appointmentBooking.addStep({ key: resourceKey, description: "" }, beforeKey);
259
+ appointmentBooking.addStep(
260
+ { key: resourceKey, description: "" },
261
+ beforeKey
262
+ );
236
263
  } else {
237
264
  appointmentBooking.removeStep(resourceKey);
238
265
  }
@@ -255,8 +282,14 @@ var useAppointmentBookingStep = () => {
255
282
  } else {
256
283
  cartLists = carts || [];
257
284
  }
258
- const appoimentCarts = cartLists.filter((n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id)));
259
- const { hasError } = (0, import_utils2.checkAndGoNext)(isFormSubject, checkAccount, appoimentCarts);
285
+ const appoimentCarts = cartLists.filter(
286
+ (n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
287
+ );
288
+ const { hasError } = (0, import_utils2.checkAndGoNext)(
289
+ isFormSubject,
290
+ checkAccount,
291
+ appoimentCarts
292
+ );
260
293
  setIsErrorHolder(hasError);
261
294
  if (hasError) {
262
295
  return;
@@ -370,12 +403,9 @@ var useAppointmentBookingCart = () => {
370
403
  };
371
404
  (0, import_react.useEffect)(() => {
372
405
  getCartAndSummary();
373
- pisellOS.effects.on(
374
- "appointmentBooking_cart:changed",
375
- async () => {
376
- getCartAndSummary();
377
- }
378
- );
406
+ pisellOS.effects.on("appointmentBooking_cart:changed", async () => {
407
+ getCartAndSummary();
408
+ });
379
409
  }, []);
380
410
  };
381
411
  var useAppointmentBookingLogin = () => {
@@ -441,7 +471,10 @@ var useAppointmentBookingAccount = () => {
441
471
  };
442
472
  const addAccount = async (val, type) => {
443
473
  const customer = (0, import_utils2.getCustomer)(utils);
444
- const result = await appointmentBooking.addAccount(val, { type, customerId: customer == null ? void 0 : customer.id });
474
+ const result = await appointmentBooking.addAccount(val, {
475
+ type,
476
+ customerId: customer == null ? void 0 : customer.id
477
+ });
445
478
  return result;
446
479
  };
447
480
  const checkAccount = (type) => {
@@ -484,7 +517,11 @@ var useIsSkipResourceStep = () => {
484
517
  try {
485
518
  const { resources } = getResourceList();
486
519
  const accountLists = await appointmentBooking.getAccounts();
487
- const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(currentStepParams.key, resources, appointmentBooking);
520
+ const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(
521
+ currentStepParams.key,
522
+ resources,
523
+ appointmentBooking
524
+ );
488
525
  if (isSystem) {
489
526
  nextStep();
490
527
  return true;
@@ -512,7 +549,7 @@ var useIsSkipResourceStep = () => {
512
549
  return { checkSkipResourceStep };
513
550
  };
514
551
  var useAppointmentBookingSetting = () => {
515
- var _a, _b;
552
+ var _a, _b, _c;
516
553
  const utils = contextUtils();
517
554
  const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
518
555
  const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
@@ -537,7 +574,8 @@ var useAppointmentBookingSetting = () => {
537
574
  bookingSubject,
538
575
  setOtherData,
539
576
  getOtherData,
540
- formName
577
+ formName,
578
+ bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
541
579
  };
542
580
  };
543
581
  // Annotate the CommonJS export names for ESM import in node:
@@ -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;
@@ -140,7 +140,8 @@ var locales_default = {
140
140
  "pisell2.text.goodpass.code-invalid": "Current code is invalid",
141
141
  "pisell2.text.goodpass.code-invalid-cart": "No eligible items in the cart",
142
142
  "pisell2.text.goodpass.login": "Login",
143
- "pisell2.text.goodpass.login-tip": " for member benefit Or use account credit"
143
+ "pisell2.text.goodpass.login-tip": " for member benefit Or use account credit",
144
+ "pisell2.text.contact-info.title": "Contact info"
144
145
  },
145
146
  "zh-CN": {
146
147
  "pisell2.event.calendar.limit.unavailable": "不可预约",
@@ -259,7 +260,8 @@ var locales_default = {
259
260
  "pisell2.text.goodpass.code-invalid": "当前券码不可用",
260
261
  "pisell2.text.goodpass.code-invalid-cart": "当前购物车中无可用商品",
261
262
  "pisell2.text.goodpass.login": "登录",
262
- "pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分"
263
+ "pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分",
264
+ "pisell2.text.contact-info.title": "联系信息"
263
265
  },
264
266
  "zh-HK": {
265
267
  "pisell2.event.calendar.limit.unavailable": "不可預約",
@@ -378,6 +380,7 @@ var locales_default = {
378
380
  "pisell2.text.goodpass.code-invalid": "當前券碼不可用",
379
381
  "pisell2.text.goodpass.code-invalid-cart": "當前購物車中無可用商品",
380
382
  "pisell2.text.goodpass.login": "登錄",
381
- "pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分"
383
+ "pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分",
384
+ "pisell2.text.contact-info.title": "聯繫信息"
382
385
  }
383
386
  };
@@ -72,6 +72,7 @@ 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;
75
76
  dispatch({
76
77
  type: "setClient",
77
78
  payload: {
@@ -79,6 +80,14 @@ var ActionButtons = ({
79
80
  edit: true
80
81
  }
81
82
  });
83
+ if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
84
+ dispatch({
85
+ type: "setService",
86
+ payload: {
87
+ value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
88
+ }
89
+ });
90
+ }
82
91
  });
83
92
  const { selectCustomer } = (0, import_useCustomer.useCustomer)({
84
93
  changeCustomerToGlobalState
@@ -242,7 +251,8 @@ var ActionButtons = ({
242
251
  );
243
252
  };
244
253
  const handleClearAllAndReset = () => {
245
- var _a2;
254
+ var _a2, _b2;
255
+ (_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
246
256
  clearAllScanListenersTaskQueue();
247
257
  dispatch({
248
258
  type: "setService",
@@ -286,7 +296,6 @@ var ActionButtons = ({
286
296
  value: {}
287
297
  }
288
298
  });
289
- (_a2 = shopDiscount == null ? void 0 : shopDiscount.clear) == null ? void 0 : _a2.call(shopDiscount);
290
299
  setShowClearModal(false);
291
300
  Toast == null ? void 0 : Toast.success(
292
301
  createToastContent(
@@ -274,7 +274,7 @@ var CustomSelect = (props, ref) => {
274
274
  ref: searchRef,
275
275
  prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
276
276
  style: { marginTop: 16, height: 44 },
277
- placeholder: import_utils2.locales.getText("pisell2.text.search"),
277
+ placeholder: import_utils2.locales.getText("pisell2.booking.text.search-placeholder"),
278
278
  value: search,
279
279
  allowClear: true,
280
280
  onChange: (e) => {
@@ -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,16 +53,22 @@ var getProductExpectAmount = (state, isEdit) => {
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
  price = price.add(itemTotal.mul(quantity));
63
- const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
64
- duration = duration.add(_duration);
66
+ const _duration = !(0, import_utils3.isNormalProductByDurationSchedule)(item) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
67
+ if (isDay || (0, import_utils4.isMultiDayProduct)(item)) {
68
+ dayDuration = dayDuration.add(_duration);
69
+ } else {
70
+ minuteDuration = minuteDuration.add(_duration);
71
+ }
65
72
  } else {
66
73
  const quantity = new import_decimal.default(item._extend.quantity || 1);
67
74
  const itemTotal = new import_decimal.default(item._extend.total || 0);
@@ -72,6 +79,11 @@ var getProductExpectAmount = (state, isEdit) => {
72
79
  price = price.add(relationTotal);
73
80
  const itemDuration = new import_decimal.default(import_utils.flexibleObj.getValue(item._extend.duration) || 0);
74
81
  duration = duration.add(itemDuration);
82
+ if ((0, import_utils4.isMultiDayProduct)(item)) {
83
+ dayDuration = dayDuration.add(itemDuration);
84
+ } else {
85
+ minuteDuration = minuteDuration.add(itemDuration);
86
+ }
75
87
  }
76
88
  }
77
89
  }
@@ -89,18 +101,23 @@ var getProductExpectAmount = (state, isEdit) => {
89
101
  duration = services.reduce((pre, cur) => {
90
102
  var _a2;
91
103
  let current = new import_decimal.default(0);
92
- if (isDay) {
93
- const _duration = (0, import_utils3.isDayBookingProduct)(cur, state) ? new import_decimal.default(cur._extend.duration || 0) : new import_decimal.default(0);
104
+ if (isDay || (0, import_utils4.isMultiDayProduct)(cur)) {
105
+ const _duration = !(0, import_utils3.isNormalProductByDurationSchedule)(cur) ? new import_decimal.default(cur._extend.duration || 0) : new import_decimal.default(0);
94
106
  current = _duration;
95
107
  } else {
96
108
  current = new import_decimal.default(import_utils.flexibleObj.getValue(((_a2 = cur._extend) == null ? void 0 : _a2.duration) || 0) || 0);
97
109
  }
110
+ if (isDay || (0, import_utils4.isMultiDayProduct)(cur)) {
111
+ dayDuration = dayDuration.add(current);
112
+ } else {
113
+ minuteDuration = minuteDuration.add(current);
114
+ }
98
115
  return pre.add(current);
99
116
  }, new import_decimal.default(0));
100
117
  }
101
118
  return {
102
119
  productExpectAmount: price.toNumber(),
103
- duration: (0, import_utils.getDiscountTime)(duration.toNumber(), isDay)
120
+ duration: (0, import_utils.getDiscountTimeByDayMinutes)(dayDuration.toNumber(), minuteDuration.toNumber())
104
121
  };
105
122
  };
106
123
  var getProductItemTax = (item, state, options) => {