@pisell/private-materials 6.5.27 → 6.6.2

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 (340) 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/serve.js +2 -12
  29. package/es/components/booking/hooks/useQuotation.js +69 -21
  30. package/es/components/booking/info/client/index.js +28 -13
  31. package/es/components/booking/info/client/serve.js +2 -11
  32. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  33. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  34. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  35. package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  36. package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
  37. package/es/components/booking/info/main.js +3 -2
  38. package/es/components/booking/info/model.js +5 -0
  39. package/es/components/booking/info/pet/serve.js +1 -6
  40. package/es/components/booking/info/service/Lists.d.ts +1 -1
  41. package/es/components/booking/info/service/Lists.js +10 -4
  42. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  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 +9 -1
  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/hooks/useWalletPass.d.ts +1 -1
  78. package/es/components/checkout/locales.d.ts +3 -0
  79. package/es/components/checkout/locales.js +3 -0
  80. package/es/components/eftposPay/linkly/index.js +64 -2
  81. package/es/components/eftposPay/tyro/index.js +12 -0
  82. package/es/components/list/List.js +3 -0
  83. package/es/components/pay/toB/components/MX51/index.js +14 -44
  84. package/es/components/pay/toB/types/index.d.ts +0 -12
  85. package/es/components/pay/toB/types/index.js +0 -4
  86. package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
  87. package/es/components/shoppingCart/components/Cart/Product.js +6 -3
  88. package/es/components/shoppingCart/type.d.ts +1 -0
  89. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  90. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  91. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
  92. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  93. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  94. package/es/components/ticketBooking/components/addServiceVariant/addService.js +421 -794
  95. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  96. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
  97. package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  98. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  99. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  100. package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
  101. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  102. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  103. package/es/components/ticketBooking/components/timeBar/index.js +1 -4
  104. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  105. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
  106. package/es/components/ticketBooking/index.d.ts +0 -1
  107. package/es/components/ticketBooking/index.js +0 -2
  108. package/es/components/ticketBooking/serve.js +17 -119
  109. package/es/components/ticketBooking/utils/index.d.ts +7 -1
  110. package/es/components/ticketBooking/utils/index.js +44 -28
  111. package/es/hooks/useEngineContext.d.ts +0 -1
  112. package/es/hooks/useEngineContext.js +0 -7
  113. package/es/index.d.ts +4 -0
  114. package/es/index.js +5 -1
  115. package/es/plus/clientCard/locales.js +3 -3
  116. package/es/plus/clinetSearch/index.js +28 -30
  117. package/es/plus/clinetSearch/locales.d.ts +3 -0
  118. package/es/plus/clinetSearch/locales.js +7 -4
  119. package/es/plus/clinetSearch/types.d.ts +12 -0
  120. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  121. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  122. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  123. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  124. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  125. package/es/plus/contactInfo/index.d.ts +6 -0
  126. package/es/plus/contactInfo/index.js +198 -0
  127. package/es/plus/contactInfo/index.less +621 -0
  128. package/es/plus/contactInfo/locales.d.ts +15 -0
  129. package/es/plus/contactInfo/locales.js +14 -0
  130. package/es/plus/contactInfo/types.d.ts +91 -0
  131. package/es/plus/contactInfo/types.js +1 -0
  132. package/es/plus/contactInfo/utils.d.ts +7 -0
  133. package/es/plus/contactInfo/utils.js +50 -0
  134. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  135. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  136. package/es/plus/contactInfoModal/index.d.ts +41 -0
  137. package/es/plus/contactInfoModal/index.js +155 -0
  138. package/es/plus/contactInfoModal/index.less +19 -0
  139. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  140. package/es/plus/contactInfoModal/locales.js +65 -0
  141. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  142. package/es/plus/productSelect/ProductCard/index.js +1 -1
  143. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  144. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  145. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  146. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  147. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  148. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  149. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  150. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  151. package/es/plus/selectHolder/index.d.ts +7 -0
  152. package/es/plus/selectHolder/index.js +273 -0
  153. package/es/plus/selectHolder/index.less +137 -0
  154. package/es/plus/selectHolder/locales.d.ts +24 -0
  155. package/es/plus/selectHolder/locales.js +29 -0
  156. package/es/plus/selectHolder/types.d.ts +104 -0
  157. package/es/plus/selectHolder/types.js +1 -0
  158. package/es/plus/selectHolder/utils.d.ts +9 -0
  159. package/es/plus/selectHolder/utils.js +16 -0
  160. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  161. package/es/pro/comprehensiveSearch/locales.js +1 -1
  162. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  163. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
  164. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  165. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  166. package/es/pro/multiDayTimeSelect/index.js +1 -0
  167. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  168. package/es/pro/multiDayTimeSelect/types.js +1 -0
  169. package/es/pro/skuDetailModal/types.d.ts +1 -0
  170. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  171. package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
  172. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  173. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  174. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  175. package/lib/components/appointmentBooking/hooks.js +73 -35
  176. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  177. package/lib/components/appointmentBooking/locales.js +6 -3
  178. package/lib/components/booking/components/actionButtons/index.js +11 -2
  179. package/lib/components/booking/components/customSelect/index.js +1 -1
  180. package/lib/components/booking/components/footer/amount.js +23 -6
  181. package/lib/components/booking/components/footer/index.js +26 -5
  182. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  183. package/lib/components/booking/components/footer/utils.js +120 -82
  184. package/lib/components/booking/components/voucher/index.js +10 -1
  185. package/lib/components/booking/dashboard/serve.js +1 -6
  186. package/lib/components/booking/forms/footer.js +29 -11
  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/addService/utils.d.ts +1 -1
  202. package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
  203. package/lib/components/booking/info/service/serve.d.ts +14 -0
  204. package/lib/components/booking/info/service/serve.js +8 -17
  205. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  206. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  207. package/lib/components/booking/info/service2/utils.js +38 -29
  208. package/lib/components/booking/info/utils.js +4 -0
  209. package/lib/components/booking/info2/cartClientCard/index.js +34 -5
  210. package/lib/components/booking/info2/index.js +11 -5
  211. package/lib/components/booking/info2/serve.js +1 -6
  212. package/lib/components/booking/info2/service/addService/index.js +22 -3
  213. package/lib/components/booking/info2/service/addService/utils.d.ts +9 -1
  214. package/lib/components/booking/info2/service/addService/utils.js +48 -11
  215. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  216. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  217. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  218. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  219. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  220. package/lib/components/booking/info2/service/editService/index.js +254 -32
  221. package/lib/components/booking/info2/utilsByBooking.js +26 -19
  222. package/lib/components/booking/locales.d.ts +36 -0
  223. package/lib/components/booking/locales.js +42 -3
  224. package/lib/components/booking/model.d.ts +4 -0
  225. package/lib/components/booking/model.js +3 -0
  226. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  227. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  228. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  229. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  230. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  231. package/lib/components/booking/utils.d.ts +16 -7
  232. package/lib/components/booking/utils.js +18 -21
  233. package/lib/components/checkout/PaymentModal.js +41 -18
  234. package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
  235. package/lib/components/checkout/components/ScrollableList/index.js +0 -1
  236. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  237. package/lib/components/checkout/locales.d.ts +3 -0
  238. package/lib/components/checkout/locales.js +3 -0
  239. package/lib/components/eftposPay/linkly/index.js +31 -1
  240. package/lib/components/eftposPay/tyro/index.js +12 -0
  241. package/lib/components/list/List.js +3 -0
  242. package/lib/components/pay/toB/components/MX51/index.js +12 -37
  243. package/lib/components/pay/toB/types/index.d.ts +0 -12
  244. package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
  245. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  246. package/lib/components/shoppingCart/type.d.ts +1 -0
  247. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  248. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  249. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  250. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  251. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  252. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +281 -313
  253. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  254. package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
  255. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  256. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  257. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  258. package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
  259. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  260. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  261. package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
  262. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  263. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
  264. package/lib/components/ticketBooking/index.d.ts +0 -1
  265. package/lib/components/ticketBooking/index.js +0 -2
  266. package/lib/components/ticketBooking/serve.js +15 -117
  267. package/lib/components/ticketBooking/utils/index.d.ts +7 -1
  268. package/lib/components/ticketBooking/utils/index.js +29 -23
  269. package/lib/hooks/useEngineContext.d.ts +0 -1
  270. package/lib/hooks/useEngineContext.js +2 -10
  271. package/lib/index.d.ts +4 -0
  272. package/lib/index.js +12 -0
  273. package/lib/plus/clientCard/locales.js +3 -3
  274. package/lib/plus/clinetSearch/index.js +17 -8
  275. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  276. package/lib/plus/clinetSearch/locales.js +7 -4
  277. package/lib/plus/clinetSearch/types.d.ts +12 -0
  278. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  279. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  280. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  281. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  282. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  283. package/lib/plus/contactInfo/index.d.ts +6 -0
  284. package/lib/plus/contactInfo/index.js +226 -0
  285. package/lib/plus/contactInfo/index.less +621 -0
  286. package/lib/plus/contactInfo/locales.d.ts +15 -0
  287. package/lib/plus/contactInfo/locales.js +38 -0
  288. package/lib/plus/contactInfo/types.d.ts +91 -0
  289. package/lib/plus/contactInfo/types.js +17 -0
  290. package/lib/plus/contactInfo/utils.d.ts +7 -0
  291. package/lib/plus/contactInfo/utils.js +64 -0
  292. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  293. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  294. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  295. package/lib/plus/contactInfoModal/index.js +139 -0
  296. package/lib/plus/contactInfoModal/index.less +19 -0
  297. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  298. package/lib/plus/contactInfoModal/locales.js +89 -0
  299. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  300. package/lib/plus/productSelect/ProductCard/index.js +1 -1
  301. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  302. package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
  303. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  304. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  305. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  306. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  307. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  308. package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
  309. package/lib/plus/selectHolder/index.d.ts +7 -0
  310. package/lib/plus/selectHolder/index.js +223 -0
  311. package/lib/plus/selectHolder/index.less +137 -0
  312. package/lib/plus/selectHolder/locales.d.ts +24 -0
  313. package/lib/plus/selectHolder/locales.js +47 -0
  314. package/lib/plus/selectHolder/types.d.ts +104 -0
  315. package/lib/plus/selectHolder/types.js +17 -0
  316. package/lib/plus/selectHolder/utils.d.ts +9 -0
  317. package/lib/plus/selectHolder/utils.js +34 -0
  318. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  319. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  320. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  321. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
  322. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  323. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  324. package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
  325. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  326. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  327. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  328. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  329. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  330. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  331. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  332. package/lowcode/contact-info/meta.ts +199 -0
  333. package/lowcode/contact-info-modal/meta.ts +98 -0
  334. package/lowcode/event-select-holder/meta.ts +2 -2
  335. package/lowcode/select-holder/meta.ts +220 -0
  336. package/lowcode/select-holder/snippets.ts +41 -0
  337. package/package.json +13 -11
  338. package/es/hooks/printer.d.ts +0 -4
  339. package/es/hooks/printer.js +0 -35
  340. package/lib/hooks/printer.d.ts +0 -4
@@ -51,6 +51,7 @@ var import_index = require("./index.less");
51
51
  var import_serve2 = require("./serve");
52
52
  var import_utils3 = require("./utils");
53
53
  var import_noteModal = __toESM(require("../../../../plus/noteModal"));
54
+ var import_confirmHolderModal = require("../../utils/confirmHolderModal");
54
55
  var import__ = require("../../../../index");
55
56
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
56
57
  var import_utils4 = require("@pisell/utils");
@@ -61,6 +62,7 @@ var import_useCustomer = require("../../../ticketBooking/hooks/pisellos/useCusto
61
62
  var import_ahooks = require("ahooks");
62
63
  var import_lodash = require("lodash");
63
64
  var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
65
+ var import_utils5 = require("../../utils");
64
66
  var Footer = (props) => {
65
67
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
66
68
  const { state, buttons, dispatch, source } = props;
@@ -205,7 +207,7 @@ var Footer = (props) => {
205
207
  return false;
206
208
  }, [(_h = state.addons) == null ? void 0 : _h.edit]);
207
209
  const infoEdit = (0, import_react.useMemo)(() => {
208
- var _a2, _b2, _c2, _d2, _e2, _f2;
210
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
209
211
  if (!state.bookingId) {
210
212
  return true;
211
213
  }
@@ -227,6 +229,9 @@ var Footer = (props) => {
227
229
  if ((_f2 = state.contacts) == null ? void 0 : _f2.edit) {
228
230
  return true;
229
231
  }
232
+ if ((_g2 = state.contacts_info) == null ? void 0 : _g2.edit) {
233
+ return true;
234
+ }
230
235
  return false;
231
236
  }, [state]);
232
237
  const isEdit = (0, import_react.useMemo)(() => {
@@ -593,12 +598,19 @@ var Footer = (props) => {
593
598
  messageShow = true,
594
599
  noSubmit = false
595
600
  }) => {
596
- var _a2, _b2, _c2, _d2, _e2;
601
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
597
602
  (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
598
603
  if ((0, import_utils2.isDayBooking)(state)) {
599
604
  const isHasDayProducts = handleDaySubmit();
600
605
  if (isHasDayProducts) return;
601
606
  }
607
+ const hasUnspecifiedHolderProduct = (_a2 = state.service.value) == null ? void 0 : _a2.some((item) => {
608
+ var _a3, _b3, _c3;
609
+ return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
610
+ });
611
+ if (!(0, import_utils5.isWalkIn)((_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id) && (0, import_utils2.getIsSubjectRequire)(state) && hasUnspecifiedHolderProduct) {
612
+ await (0, import_confirmHolderModal.showConfirmHolderModal)(state, dispatch);
613
+ }
602
614
  if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
603
615
  return;
604
616
  }
@@ -609,7 +621,7 @@ var Footer = (props) => {
609
621
  const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
610
622
  let saveOtherValue = {};
611
623
  if (type === "save") {
612
- saveOtherValue = await ((_a2 = state == null ? void 0 : state.onSave) == null ? void 0 : _a2.call(state, state.client)) || {};
624
+ saveOtherValue = await ((_d2 = state == null ? void 0 : state.onSave) == null ? void 0 : _d2.call(state, state.client)) || {};
613
625
  }
614
626
  try {
615
627
  let callbackData = null;
@@ -655,7 +667,7 @@ var Footer = (props) => {
655
667
  { key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
656
668
  {
657
669
  key: "店铺id",
658
- value: (_e2 = (_d2 = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
670
+ value: (_h2 = (_g2 = (_f2 = (_e2 = store == null ? void 0 : store.getState) == null ? void 0 : _e2.call(store)) == null ? void 0 : _f2.global) == null ? void 0 : _g2.globalConfig) == null ? void 0 : _h2.id
659
671
  },
660
672
  {
661
673
  key: "shopApi",
@@ -1241,6 +1253,7 @@ var Footer = (props) => {
1241
1253
  }
1242
1254
  };
1243
1255
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
1256
+ var _a2, _b2;
1244
1257
  dispatch({
1245
1258
  type: "setClient",
1246
1259
  payload: {
@@ -1248,6 +1261,14 @@ var Footer = (props) => {
1248
1261
  edit: true
1249
1262
  }
1250
1263
  });
1264
+ if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
1265
+ dispatch({
1266
+ type: "setService",
1267
+ payload: {
1268
+ value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
1269
+ }
1270
+ });
1271
+ }
1251
1272
  });
1252
1273
  const { selectCustomer } = (0, import_useCustomer.useCustomer)({
1253
1274
  changeCustomerToGlobalState
@@ -1430,6 +1451,6 @@ var Footer = (props) => {
1430
1451
  }
1431
1452
  }
1432
1453
  }
1433
- ));
1454
+ ), /* @__PURE__ */ import_react.default.createElement(import_confirmHolderModal.ConfirmHolderModal, null));
1434
1455
  };
1435
1456
  var footer_default = Footer;
@@ -37,5 +37,12 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
37
37
  * @Date: 2024-12-23 12:05
38
38
  */
39
39
  export declare const formatProductPrice: (item: any) => number;
40
+ /**
41
+ * @title: 是否包含跨日预约商品
42
+ * @description:
43
+ * @param {any} data
44
+ * @return {*}
45
+ */
46
+ export declare const getHasMultiDayProduct: (data: any) => any;
40
47
  export declare const formatValues: (state: any) => any;
41
48
  export declare const checkHolderIsError: (state: any) => any;
@@ -35,7 +35,8 @@ __export(utils_exports, {
35
35
  formatProductBundle: () => formatProductBundle,
36
36
  formatProductOption: () => formatProductOption,
37
37
  formatProductPrice: () => formatProductPrice,
38
- formatValues: () => formatValues
38
+ formatValues: () => formatValues,
39
+ getHasMultiDayProduct: () => getHasMultiDayProduct
39
40
  });
40
41
  module.exports = __toCommonJS(utils_exports);
41
42
  var import_dayjs = __toESM(require("dayjs"));
@@ -74,10 +75,10 @@ var formatProductOption = (option) => {
74
75
  }
75
76
  return option.map((d) => {
76
77
  return {
77
- "num": d.num,
78
- "option_group_item_id": d.product_option_item_id || d.option_group_item_id,
79
- "option_group_id": d.option_group_id,
80
- "custom_add_price": Number(d == null ? void 0 : d.add_price)
78
+ num: d.num,
79
+ option_group_item_id: d.product_option_item_id || d.option_group_item_id,
80
+ option_group_id: d.option_group_id,
81
+ custom_add_price: Number(d == null ? void 0 : d.add_price)
81
82
  };
82
83
  });
83
84
  };
@@ -95,7 +96,9 @@ var formatProductBundle = (bundle) => {
95
96
  return;
96
97
  }
97
98
  try {
98
- const errorBundles = bundle == null ? void 0 : bundle.filter((d) => !(d == null ? void 0 : d.group_id) || !(d == null ? void 0 : d.id) || !(d == null ? void 0 : d._bundle_product_id));
99
+ const errorBundles = bundle == null ? void 0 : bundle.filter(
100
+ (d) => !(d == null ? void 0 : d.group_id) || !(d == null ? void 0 : d.id) || !(d == null ? void 0 : d._bundle_product_id)
101
+ );
99
102
  if ((errorBundles == null ? void 0 : errorBundles.length) > 0) {
100
103
  log(errorBundles);
101
104
  }
@@ -118,7 +121,7 @@ var formatProductBundle = (bundle) => {
118
121
  // checkout 2.0 新增
119
122
  "price_type": d == null ? void 0 : d.price_type,
120
123
  // checkout 2.0 新增
121
- "custom_price": new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
124
+ "custom_price": Math.abs(new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber()).toFixed(2),
122
125
  "custom_price_type": d == null ? void 0 : d.price_type,
123
126
  "option": option
124
127
  };
@@ -179,11 +182,14 @@ var formatResource = (service) => {
179
182
  return void 0;
180
183
  }
181
184
  try {
182
- return Object.values(service._extend.resource).reduce((pre, cur) => {
183
- const newList = checkResourcesFormat(cur, service);
184
- pre = pre.concat(newList);
185
- return pre;
186
- }, []);
185
+ return Object.values(service._extend.resource).reduce(
186
+ (pre, cur) => {
187
+ const newList = checkResourcesFormat(cur, service);
188
+ pre = pre.concat(newList);
189
+ return pre;
190
+ },
191
+ []
192
+ );
187
193
  } catch (err) {
188
194
  return void 0;
189
195
  }
@@ -210,7 +216,9 @@ var formatProductPrice = (item) => {
210
216
  const other = (_a = item._extend) == null ? void 0 : _a.other;
211
217
  let price = Number((_b = item._extend) == null ? void 0 : _b.price);
212
218
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
213
- const variant = item.variant.find((d) => d.id === (other == null ? void 0 : other.product_variant_id));
219
+ const variant = item.variant.find(
220
+ (d) => d.id === (other == null ? void 0 : other.product_variant_id)
221
+ );
214
222
  if (variant) {
215
223
  price = Number(variant == null ? void 0 : variant.price) || 0;
216
224
  }
@@ -255,7 +263,9 @@ var getSourceProductPrice = (item) => {
255
263
  const other = (_a = item._extend) == null ? void 0 : _a.other;
256
264
  let price = Number((_b = item._extend) == null ? void 0 : _b.price);
257
265
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
258
- const variant = item.variant.find((d) => d.id === (other == null ? void 0 : other.product_variant_id));
266
+ const variant = item.variant.find(
267
+ (d) => d.id === (other == null ? void 0 : other.product_variant_id)
268
+ );
259
269
  if (variant) {
260
270
  price = Number(variant == null ? void 0 : variant.price) || 0;
261
271
  }
@@ -275,45 +285,49 @@ var formatProducts = (item, quantity) => {
275
285
  unique_identification_number: `${item._extend.unique_identification_number}_${d.discount.resource_id}`
276
286
  };
277
287
  });
278
- const notManualDiscount = discount_list.filter((item2) => item2.type !== "product");
288
+ const notManualDiscount = discount_list.filter(
289
+ (item2) => item2.type !== "product"
290
+ );
279
291
  if (item.isCustomItem) {
280
292
  item.product_id = 0;
281
293
  }
282
294
  return {
283
- "name": item.name,
284
- "num": quantity || item._extend.quantity,
285
- "price": formatProductPrice(item),
286
- "source_product_price": getSourceProductPrice(item),
287
- "product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
288
- "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
289
- "product_discount_reason": item._extend.discount_reason || "",
290
- "is_charge_tax": item.is_charge_tax,
291
- "note": ((_a = item._extend) == null ? void 0 : _a.note) || "",
292
- "discountway": item._extend.discountway || "num",
293
- "discount_per": item._extend.discount_per,
294
- "discount_type": item._extend.discount_type || discount_type,
295
- "order_detail_id": item._extend.order_detail_id || 0,
296
- "product_bundle": formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
297
- "bundle_edit": item._extend.bundle_edit,
298
- "product_option_item": formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
299
- "product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
300
- "discount_list": notManualDiscount,
295
+ name: item.name,
296
+ num: quantity || item._extend.quantity,
297
+ price: formatProductPrice(item),
298
+ source_product_price: getSourceProductPrice(item),
299
+ product_id: (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
300
+ discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
301
+ product_discount_reason: item._extend.discount_reason || "",
302
+ is_charge_tax: item.is_charge_tax,
303
+ note: ((_a = item._extend) == null ? void 0 : _a.note) || "",
304
+ discountway: item._extend.discountway || "num",
305
+ discount_per: item._extend.discount_per,
306
+ discount_type: item._extend.discount_type || discount_type,
307
+ order_detail_id: item._extend.order_detail_id || 0,
308
+ product_bundle: formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
309
+ bundle_edit: item._extend.bundle_edit,
310
+ product_option_item: formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
311
+ product_variant_id: ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
312
+ discount_list: notManualDiscount,
301
313
  metadata: formatMetaData(item),
302
314
  // checkout 需求新增字段
303
- "calculated_original_price": formatOriginalPrice(item),
304
- "calculated_selling_price": formatSellingPrice(item),
305
- "tax_fee": item._extend.tax_fee,
306
- "custom_deposit_data": item.custom_deposit_data
315
+ calculated_original_price: formatOriginalPrice(item),
316
+ calculated_selling_price: formatSellingPrice(item),
317
+ tax_fee: item._extend.tax_fee,
318
+ custom_deposit_data: item.custom_deposit_data
307
319
  };
308
320
  };
309
321
  var formatAppointmentProductLists = (data) => {
310
322
  var _a;
311
323
  try {
312
324
  let list = data.service.value;
313
- list = list.filter((item) => {
314
- var _a2;
315
- return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
316
- });
325
+ list = list.filter(
326
+ (item) => {
327
+ var _a2;
328
+ return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
329
+ }
330
+ );
317
331
  const groupMap = /* @__PURE__ */ new Map();
318
332
  list.forEach((item) => {
319
333
  var _a2;
@@ -323,7 +337,10 @@ var formatAppointmentProductLists = (data) => {
323
337
  }
324
338
  groupMap.get(key).push(item);
325
339
  });
326
- const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce((acc, group) => acc.concat(group), []);
340
+ const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
341
+ (acc, group) => acc.concat(group),
342
+ []
343
+ );
327
344
  return list || [];
328
345
  } catch (error) {
329
346
  }
@@ -335,6 +352,14 @@ var getHolderByIndex = (holder, index) => {
335
352
  form_record: [(_a = holder == null ? void 0 : holder.form_record) == null ? void 0 : _a[index]].filter(Boolean)
336
353
  };
337
354
  };
355
+ var getHasMultiDayProduct = (data) => {
356
+ const list = data.service.value;
357
+ const isHas = list.some((item) => {
358
+ var _a;
359
+ return (_a = item._extend) == null ? void 0 : _a.groupId;
360
+ });
361
+ return isHas;
362
+ };
338
363
  var formatBookings = (data, values) => {
339
364
  const isDay = (0, import_utils4.isDaysBooking)(data);
340
365
  const isEvent = (0, import_utils4.isEventBooking)(data);
@@ -355,7 +380,7 @@ var formatBookings = (data, values) => {
355
380
  const eventOtherParams = data.eventOtherParams;
356
381
  let bookings = [];
357
382
  list.forEach((item) => {
358
- var _a, _b, _c, _d, _e;
383
+ var _a, _b, _c, _d, _e, _f;
359
384
  if (item.isCustomItem) {
360
385
  bookings.push({
361
386
  ...item._extend,
@@ -364,6 +389,7 @@ var formatBookings = (data, values) => {
364
389
  });
365
390
  return;
366
391
  }
392
+ const isMultiDay = (_a = item._extend) == null ? void 0 : _a.groupId;
367
393
  let start_date = item._extend.startDate.format("YYYY-MM-DD");
368
394
  let end_date = item._extend.endDate.format("YYYY-MM-DD");
369
395
  let end_time = item._extend.endDate.format("HH:mm");
@@ -373,45 +399,51 @@ var formatBookings = (data, values) => {
373
399
  }
374
400
  dayParams.holder = formatHolders(data, item, values);
375
401
  if (isDay) {
376
- const startDate = ((_a = item._extend) == null ? void 0 : _a.startDate) || ((_b = item._extend) == null ? void 0 : _b.start_date);
377
- const endDate = ((_c = item._extend) == null ? void 0 : _c.endDate) || ((_d = item._extend) == null ? void 0 : _d.end_date);
378
- const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({ startDate, endDate });
402
+ const startDate = ((_b = item._extend) == null ? void 0 : _b.startDate) || ((_c = item._extend) == null ? void 0 : _c.start_date);
403
+ const endDate = ((_d = item._extend) == null ? void 0 : _d.endDate) || ((_e = item._extend) == null ? void 0 : _e.end_date);
404
+ const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
405
+ startDate,
406
+ endDate
407
+ });
379
408
  start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
380
409
  start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
381
410
  end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
382
411
  end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
383
412
  dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
384
413
  dayParams.holder = formatHolders(data, item, values);
385
- dayParams.duration = (0, import_utils3.getDays)({ _extend: { start_date: startDateTime, end_date: endDateTime } }, "minutes");
414
+ dayParams.duration = (0, import_utils3.getDays)(
415
+ { _extend: { start_date: startDateTime, end_date: endDateTime } },
416
+ "minutes"
417
+ );
386
418
  }
387
- if (!((_e = item._extend) == null ? void 0 : _e.unique_identification_number)) {
419
+ if (!((_f = item._extend) == null ? void 0 : _f.unique_identification_number)) {
388
420
  const unique_identification_number = (0, import_utils5.getUniqueId)();
389
421
  item._extend.unique_identification_number = unique_identification_number;
390
422
  }
391
423
  const booking = {
392
- "product": formatProducts(item),
393
- "metadata": formatMetaData(item),
394
- "relation_products": formatRelationDetails(item._extend.relation_details),
395
- "id": item.booking_id || 0,
396
- "relation_id": item._extend.relation_id || 0,
397
- "like_status": item._extend.like_status || "common",
398
- "relation_type": item._extend.relation_type || "",
399
- "is_all": false,
400
- "schedule_id": item._extend.schedule_id || 0,
401
- "end_time": end_time,
402
- "sub_type": isDay ? "days" : getSubType(item),
403
- "select_date": start_date,
404
- "start_time": start_time,
405
- "end_date": end_date,
406
- "start_date": start_date,
407
- "duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
408
- "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
409
- "resources": formatResource(item),
410
- "note": item._extend.note,
424
+ product: formatProducts(item),
425
+ metadata: formatMetaData(item),
426
+ relation_products: formatRelationDetails(item._extend.relation_details),
427
+ id: item.booking_id || 0,
428
+ relation_id: item._extend.relation_id || 0,
429
+ like_status: item._extend.like_status || "common",
430
+ relation_type: item._extend.relation_type || "",
431
+ is_all: false,
432
+ schedule_id: item._extend.schedule_id || 0,
433
+ end_time,
434
+ sub_type: isDay ? "days" : getSubType(item),
435
+ select_date: start_date,
436
+ start_time,
437
+ end_date,
438
+ start_date,
439
+ duration: isDay || isMultiDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
440
+ number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
441
+ resources: formatResource(item),
442
+ note: item._extend.note,
411
443
  ...eventOtherParams || {},
412
444
  ...dayParams
413
445
  };
414
- if (isDay) {
446
+ if (isDay || isMultiDay) {
415
447
  bookings.push(booking);
416
448
  return;
417
449
  }
@@ -420,10 +452,10 @@ var formatBookings = (data, values) => {
420
452
  newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
421
453
  bookings.push({
422
454
  ...booking,
423
- "product": formatProducts(newItem, 1),
424
- "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
425
- "holder": getHolderByIndex(booking.holder, i),
426
- "metadata": formatMetaData(newItem)
455
+ product: formatProducts(newItem, 1),
456
+ number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
457
+ holder: getHolderByIndex(booking.holder, i),
458
+ metadata: formatMetaData(newItem)
427
459
  });
428
460
  }
429
461
  });
@@ -485,7 +517,7 @@ var formatHolder = (state, values) => {
485
517
  return obj;
486
518
  };
487
519
  var formatValues = (state) => {
488
- var _a, _b, _c, _d, _e, _f, _g;
520
+ var _a, _b, _c, _d, _e, _f, _g, _h;
489
521
  let values = {
490
522
  type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
491
523
  platform: state.isBookingTicket2 ? "pos" : "shop",
@@ -499,6 +531,7 @@ var formatValues = (state) => {
499
531
  metadata: {}
500
532
  };
501
533
  const isDay = (0, import_utils4.isDaysBooking)(state);
534
+ const isHasMultiDay = getHasMultiDayProduct(state);
502
535
  const isEvent = (0, import_utils4.isEventBooking)(state);
503
536
  if (!state.bookingId || isDay) {
504
537
  values.shop_note = formatNote(state);
@@ -516,8 +549,11 @@ var formatValues = (state) => {
516
549
  ...customer
517
550
  };
518
551
  values.holder = formatHolder(state, values);
519
- if (isDay || isEvent) {
520
- values.relation_products = formatRelationProducts(state, isDay ? "day" : "event");
552
+ if (isEvent) {
553
+ values.relation_products = formatRelationProducts(
554
+ state,
555
+ "event"
556
+ );
521
557
  } else {
522
558
  values.relation_products = formatNormalProducts(state);
523
559
  if (!((_b = values.relation_products) == null ? void 0 : _b.length)) {
@@ -530,28 +566,29 @@ var formatValues = (state) => {
530
566
  startTime = `${startTime || "00:00"}:00`;
531
567
  values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
532
568
  }
533
- if (isDay) {
569
+ if (isDay || isHasMultiDay) {
534
570
  values.metadata.is_multiday_appointment = 1;
535
571
  }
536
572
  if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
537
573
  values.type = "virtual";
538
574
  }
575
+ values.contacts_info = ((_h = state.contacts_info) == null ? void 0 : _h.value) || null;
539
576
  return values;
540
577
  };
541
578
  var checkHolderIsError = (state) => {
542
579
  var _a, _b;
543
580
  let errorRowKey = "";
544
581
  const holderError = state.service.value.some((item) => {
545
- var _a2, _b2, _c, _d, _e, _f;
582
+ var _a2, _b2, _c, _d, _e, _f, _g;
546
583
  if ((0, import_utils4.isNormalProductByDurationSchedule)(item)) {
547
584
  return false;
548
585
  }
549
- if (item._extend.quantity === 1 && !item._extend.holder_id) {
550
- errorRowKey = (0, import_utils4.genRowKey)((_b2 = (_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.other) == null ? void 0 : _b2.rowKey);
586
+ if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_a2 = item._extend.holder_id) == null ? void 0 : _a2.length) === 0)) {
587
+ errorRowKey = (0, import_utils4.genRowKey)((_c = (_b2 = item == null ? void 0 : item._extend) == null ? void 0 : _b2.other) == null ? void 0 : _c.rowKey);
551
588
  return true;
552
589
  }
553
- if (item._extend.quantity > 1 && ((_d = (_c = item._extend) == null ? void 0 : _c.holder_id) == null ? void 0 : _d.length) !== item._extend.quantity) {
554
- errorRowKey = (0, import_utils4.genRowKey)((_f = (_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.rowKey);
590
+ if (item._extend.quantity > 1 && ((_e = (_d = item._extend) == null ? void 0 : _d.holder_id) == null ? void 0 : _e.length) !== item._extend.quantity) {
591
+ errorRowKey = (0, import_utils4.genRowKey)((_g = (_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.rowKey);
555
592
  return true;
556
593
  }
557
594
  return false;
@@ -581,5 +618,6 @@ var checkHolderIsError = (state) => {
581
618
  formatProductBundle,
582
619
  formatProductOption,
583
620
  formatProductPrice,
584
- formatValues
621
+ formatValues,
622
+ getHasMultiDayProduct
585
623
  });
@@ -62,6 +62,7 @@ var VoucherCard = (props) => {
62
62
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
63
63
  services = state.service;
64
64
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
65
+ var _a2, _b2;
65
66
  dispatch({
66
67
  type: "setClient",
67
68
  payload: {
@@ -69,6 +70,14 @@ var VoucherCard = (props) => {
69
70
  edit: true
70
71
  }
71
72
  });
73
+ if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
74
+ dispatch({
75
+ type: "setService",
76
+ payload: {
77
+ value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
78
+ }
79
+ });
80
+ }
72
81
  });
73
82
  const { selectCustomer } = (0, import_pisellos.useCustomer)({
74
83
  changeCustomerToGlobalState
@@ -163,7 +172,7 @@ var VoucherCard = (props) => {
163
172
  productListToValue(val.productList);
164
173
  }
165
174
  },
166
- { wait: 1e3 }
175
+ { wait: 500 }
167
176
  );
168
177
  (0, import_react.useEffect)(() => {
169
178
  run();
@@ -24,12 +24,7 @@ __export(serve_exports, {
24
24
  module.exports = __toCommonJS(serve_exports);
25
25
  var import_utils = require("../utils");
26
26
  var getBookingList = async (params) => {
27
- let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params, {
28
- cache: {
29
- mode: "remote_local",
30
- type: "indexDB"
31
- }
32
- });
27
+ let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params);
33
28
  return data;
34
29
  };
35
30
  // Annotate the CommonJS export names for ESM import in node:
@@ -39,31 +39,49 @@ var import_useSendModal = __toESM(require("./sendModal/useSendModal"));
39
39
  var import_sendModal = __toESM(require("./sendModal"));
40
40
  var import_utils = require("@pisell/utils");
41
41
  var Footer = ({ state, reload }) => {
42
- var _a, _b, _c, _d;
42
+ var _a, _b, _c, _d, _e;
43
43
  const { open, setOpen, handleOpen, handleValuesChange, handleOk } = (0, import_useSendModal.default)(state == null ? void 0 : state.bookingId);
44
44
  const handleReload = async () => {
45
45
  await reload();
46
46
  import_materials.message.success(import_utils.locales.getText("pisell2.text.send-form-reminder-refresh"));
47
47
  };
48
48
  const defaultValues = (0, import_react.useMemo)(() => {
49
- var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j;
49
+ var _a2, _b2;
50
+ const { email: contactsEmail, phone: contactsPhone } = ((_a2 = state.contacts_info) == null ? void 0 : _a2.value) || {};
51
+ const {
52
+ email: clientEmail,
53
+ phone: clientPhone,
54
+ country_calling_code: clientCode
55
+ } = ((_b2 = state.client) == null ? void 0 : _b2.value) || {};
56
+ let email = contactsEmail || clientEmail;
57
+ let phone = (contactsPhone == null ? void 0 : contactsPhone.phone) || clientPhone;
58
+ let code = (contactsPhone == null ? void 0 : contactsPhone.country_calling_code) || clientCode || "+61";
59
+ if (!code.startsWith("+")) {
60
+ code = `+${code}`;
61
+ }
50
62
  return {
51
- sendSms: !!((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.phone),
52
- sendEmail: !!((_d2 = (_c2 = state.client) == null ? void 0 : _c2.value) == null ? void 0 : _d2.email),
53
- email: (_f = (_e = state.client) == null ? void 0 : _e.value) == null ? void 0 : _f.email,
63
+ sendSms: !!phone,
64
+ sendEmail: !!email,
65
+ email,
54
66
  phone: {
55
- code: (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.country_calling_code,
56
- phone: (_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.phone
67
+ code,
68
+ phone
57
69
  }
58
70
  };
59
- }, [(_a = state.client) == null ? void 0 : _a.value]);
60
- if (!state.bookingId || !((_b = state == null ? void 0 : state.form) == null ? void 0 : _b.forms.length)) {
71
+ }, [(_a = state.client) == null ? void 0 : _a.value, (_b = state.contacts_info) == null ? void 0 : _b.value]);
72
+ if (!state.bookingId || !((_c = state == null ? void 0 : state.form) == null ? void 0 : _c.forms.length)) {
61
73
  return null;
62
74
  }
63
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Tooltip, { title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip") }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), /* @__PURE__ */ import_react.default.createElement(
75
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(
76
+ import_materials.Tooltip,
77
+ {
78
+ title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip")
79
+ },
80
+ /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })
81
+ ), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), open && /* @__PURE__ */ import_react.default.createElement(
64
82
  import_sendModal.default,
65
83
  {
66
- refreshKey: (_d = (_c = state.client) == null ? void 0 : _c.value) == null ? void 0 : _d.id,
84
+ refreshKey: (_e = (_d = state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id,
67
85
  open,
68
86
  onCancel: () => setOpen(false),
69
87
  onOk: handleOk,
@@ -24,18 +24,8 @@ __export(serve_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(serve_exports);
26
26
  var import_utils = require("../utils");
27
- var getFormData = async (params) => import_utils.request.getRequest().get(`/shop/form/data/v1`, params, {
28
- cache: {
29
- mode: "remote_local",
30
- type: "indexDB"
31
- }
32
- });
33
- var sendFormReminder = async (params) => import_utils.request.getRequest().post(`/shop/form/form-reminder`, params, {
34
- cache: {
35
- mode: "remote_local",
36
- type: "indexDB"
37
- }
38
- });
27
+ var getFormData = async (params) => import_utils.request.getRequest().get(`/shop/form/data/v1`, params);
28
+ var sendFormReminder = async (params) => import_utils.request.getRequest().post(`/shop/form/form-reminder`, params);
39
29
  // Annotate the CommonJS export names for ESM import in node:
40
30
  0 && (module.exports = {
41
31
  getFormData,