@pisell/private-materials 3.2.23 → 3.2.26

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 (347) 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 +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +85 -35
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  14. package/es/components/appointmentBooking/components/Cart/Item/index.js +14 -10
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +15 -6
  16. package/es/components/appointmentBooking/components/Cart/index.js +3 -2
  17. package/es/components/appointmentBooking/components/Cart/index.less +1 -1
  18. package/es/components/appointmentBooking/components/Content/index.js +14 -2
  19. package/es/components/appointmentBooking/components/Content/index.less +15 -0
  20. package/es/components/appointmentBooking/components/Date/index.js +2 -2
  21. package/es/components/appointmentBooking/components/Date/index.less +6 -0
  22. package/es/components/appointmentBooking/components/Footer/index.js +7 -2
  23. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  24. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
  25. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  26. package/es/components/appointmentBooking/components/Guest/index.js +24 -4
  27. package/es/components/appointmentBooking/components/Guest/index.less +3 -3
  28. package/es/components/appointmentBooking/components/Header/index.js +9 -1
  29. package/es/components/appointmentBooking/components/Resource/index.js +6 -24
  30. package/es/components/appointmentBooking/components/Resource/index.less +0 -1
  31. package/es/components/appointmentBooking/components/Services/index.js +1 -14
  32. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  33. package/es/components/appointmentBooking/components/TimeSlicing/index.js +22 -17
  34. package/es/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
  35. package/es/components/appointmentBooking/components/Voucher/index.js +10 -10
  36. package/es/components/appointmentBooking/hooks.d.ts +6 -3
  37. package/es/components/appointmentBooking/hooks.js +52 -32
  38. package/es/components/appointmentBooking/index.js +8 -9
  39. package/es/components/appointmentBooking/locales.d.ts +6 -0
  40. package/es/components/appointmentBooking/locales.js +6 -0
  41. package/es/components/appointmentBooking/utils.d.ts +9 -0
  42. package/es/components/appointmentBooking/utils.js +18 -1
  43. package/es/components/booking/addons/index.js +7 -5
  44. package/es/components/booking/addons/model.d.ts +1 -10
  45. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  46. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  47. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  48. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  49. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  50. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  51. package/es/components/booking/components/footer/utils.js +8 -5
  52. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  53. package/es/components/booking/components/voucher/index.js +11 -10
  54. package/es/components/booking/forms/footer.d.ts +6 -0
  55. package/es/components/booking/forms/footer.js +88 -0
  56. package/es/components/booking/forms/index.d.ts +1 -1
  57. package/es/components/booking/forms/index.js +25 -20
  58. package/es/components/booking/forms/index.less +7 -0
  59. package/es/components/booking/forms/model.d.ts +1 -10
  60. package/es/components/booking/forms/sendModal/index.d.ts +27 -0
  61. package/es/components/booking/forms/sendModal/index.js +82 -0
  62. package/es/components/booking/forms/sendModal/index.less +9 -0
  63. package/es/components/booking/forms/sendModal/useSendModal.d.ts +9 -0
  64. package/es/components/booking/forms/sendModal/useSendModal.js +79 -0
  65. package/es/components/booking/forms/serve.d.ts +9 -0
  66. package/es/components/booking/forms/serve.js +20 -0
  67. package/es/components/booking/forms/table/index.d.ts +0 -1
  68. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  69. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  70. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  71. package/es/components/booking/info/date/index.d.ts +0 -1
  72. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  73. package/es/components/booking/info/model.d.ts +1 -10
  74. package/es/components/booking/info/notes/index.d.ts +0 -1
  75. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  76. package/es/components/booking/info/service/addService/index.js +3 -3
  77. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  78. package/es/components/booking/info/service/editService/index.js +71 -51
  79. package/es/components/booking/info/service/like/index.d.ts +0 -1
  80. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  81. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  82. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  83. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  84. package/es/components/booking/info2/service/addService/index.js +3 -2
  85. package/es/components/booking/info2/service/addService/utils.js +57 -5
  86. package/es/components/booking/info2/service/editService/Resources/index.js +20 -2
  87. package/es/components/booking/info2/service/editService/index.js +5 -3
  88. package/es/components/booking/info2/service/editService/utils.d.ts +4 -2
  89. package/es/components/booking/info2/service/editService/utils.js +18 -0
  90. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  91. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  92. package/es/components/booking/locales.d.ts +39 -0
  93. package/es/components/booking/locales.js +39 -0
  94. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  95. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  96. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  97. package/es/components/booking/model.d.ts +1 -9
  98. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  99. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  100. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  101. package/es/components/booking/notes/model.d.ts +1 -10
  102. package/es/components/booking/payments/model.d.ts +1 -10
  103. package/es/components/booking/utils.d.ts +2 -2
  104. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  105. package/es/components/eftpos/group/index.d.ts +0 -1
  106. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  107. package/es/components/eftpos/icon/device.d.ts +0 -1
  108. package/es/components/eftpos/receipt/index.d.ts +0 -1
  109. package/es/components/eftposPay/amount.d.ts +1 -2
  110. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  111. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  112. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  113. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  114. package/es/components/eftposPay/device.d.ts +1 -2
  115. package/es/components/eftposPay/hooks.d.ts +1 -1
  116. package/es/components/eftposPay/payo/config.d.ts +0 -1
  117. package/es/components/eftposPay/store/index.d.ts +4 -4
  118. package/es/components/eftposPay/tip.d.ts +0 -1
  119. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  120. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  121. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  122. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  123. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  124. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  125. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  126. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  127. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  128. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  129. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  130. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  131. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  132. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  133. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  134. package/es/components/login/index.d.ts +0 -1
  135. package/es/components/pay/toC/PaymentList/serve.js +2 -2
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  137. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  138. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  139. package/es/components/pay/toC/model.d.ts +1 -9
  140. package/es/components/pay/toC/serve.js +2 -2
  141. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  142. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  143. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  144. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +4 -1
  145. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  146. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  147. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  148. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  149. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  150. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  151. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  152. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  153. package/es/components/schedules/calendar/index.d.ts +0 -1
  154. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  155. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  156. package/es/components/schedules/model.d.ts +1 -9
  157. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  158. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  159. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  160. package/es/components/schedules/products/list/index.d.ts +0 -1
  161. package/es/components/schedules/resources/list/index.d.ts +0 -1
  162. package/es/components/schedules/utils.d.ts +1 -1
  163. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  164. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  165. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  166. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  167. package/es/components/shoppingCart/index.d.ts +0 -1
  168. package/es/components/wallet/Detail/model.d.ts +1 -13
  169. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  170. package/es/components/wallet/PointCard/model.d.ts +1 -13
  171. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  172. package/es/components/wallet/Voucher/model.d.ts +1 -13
  173. package/es/components/wallet/model.d.ts +1 -9
  174. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  175. package/es/utils/index.d.ts +1 -1
  176. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +44 -18
  177. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
  178. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  179. package/lib/components/appointmentBooking/components/Cart/Item/index.js +16 -6
  180. package/lib/components/appointmentBooking/components/Cart/Item/index.less +15 -6
  181. package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
  182. package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
  183. package/lib/components/appointmentBooking/components/Content/index.js +8 -2
  184. package/lib/components/appointmentBooking/components/Content/index.less +15 -0
  185. package/lib/components/appointmentBooking/components/Date/index.js +34 -28
  186. package/lib/components/appointmentBooking/components/Date/index.less +6 -0
  187. package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
  188. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
  189. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
  190. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
  191. package/lib/components/appointmentBooking/components/Guest/index.js +21 -4
  192. package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
  193. package/lib/components/appointmentBooking/components/Header/index.js +9 -1
  194. package/lib/components/appointmentBooking/components/Resource/index.js +4 -8
  195. package/lib/components/appointmentBooking/components/Resource/index.less +0 -1
  196. package/lib/components/appointmentBooking/components/Services/index.js +0 -12
  197. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  198. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +12 -4
  199. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
  200. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -8
  201. package/lib/components/appointmentBooking/hooks.d.ts +6 -3
  202. package/lib/components/appointmentBooking/hooks.js +26 -14
  203. package/lib/components/appointmentBooking/index.js +7 -7
  204. package/lib/components/appointmentBooking/locales.d.ts +6 -0
  205. package/lib/components/appointmentBooking/locales.js +6 -0
  206. package/lib/components/appointmentBooking/utils.d.ts +9 -0
  207. package/lib/components/appointmentBooking/utils.js +9 -1
  208. package/lib/components/booking/addons/index.js +7 -5
  209. package/lib/components/booking/addons/model.d.ts +1 -10
  210. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  211. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  212. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  213. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  214. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  215. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  216. package/lib/components/booking/components/footer/utils.js +4 -5
  217. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  218. package/lib/components/booking/components/voucher/index.js +3 -8
  219. package/lib/components/booking/forms/footer.d.ts +6 -0
  220. package/lib/components/booking/forms/footer.js +81 -0
  221. package/lib/components/booking/forms/index.d.ts +1 -1
  222. package/lib/components/booking/forms/index.js +4 -2
  223. package/lib/components/booking/forms/index.less +7 -0
  224. package/lib/components/booking/forms/model.d.ts +1 -10
  225. package/lib/components/booking/forms/sendModal/index.d.ts +27 -0
  226. package/lib/components/booking/forms/sendModal/index.js +128 -0
  227. package/lib/components/booking/forms/sendModal/index.less +9 -0
  228. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +9 -0
  229. package/lib/components/booking/forms/sendModal/useSendModal.js +70 -0
  230. package/lib/components/booking/forms/serve.d.ts +9 -0
  231. package/lib/components/booking/forms/serve.js +5 -2
  232. package/lib/components/booking/forms/table/index.d.ts +0 -1
  233. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  234. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  235. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  236. package/lib/components/booking/info/date/index.d.ts +0 -1
  237. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  238. package/lib/components/booking/info/model.d.ts +1 -10
  239. package/lib/components/booking/info/notes/index.d.ts +0 -1
  240. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  241. package/lib/components/booking/info/service/addService/index.js +2 -2
  242. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  243. package/lib/components/booking/info/service/editService/index.js +12 -2
  244. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  245. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  246. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  247. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  248. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  249. package/lib/components/booking/info2/service/addService/index.js +3 -2
  250. package/lib/components/booking/info2/service/addService/utils.js +36 -1
  251. package/lib/components/booking/info2/service/editService/Resources/index.js +16 -1
  252. package/lib/components/booking/info2/service/editService/index.js +4 -2
  253. package/lib/components/booking/info2/service/editService/utils.d.ts +4 -2
  254. package/lib/components/booking/info2/service/editService/utils.js +48 -0
  255. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  256. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  257. package/lib/components/booking/locales.d.ts +39 -0
  258. package/lib/components/booking/locales.js +39 -0
  259. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  260. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  261. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  262. package/lib/components/booking/model.d.ts +1 -9
  263. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  264. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  265. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  266. package/lib/components/booking/notes/model.d.ts +1 -10
  267. package/lib/components/booking/payments/model.d.ts +1 -10
  268. package/lib/components/booking/utils.d.ts +2 -2
  269. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  270. package/lib/components/eftpos/group/index.d.ts +0 -1
  271. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  272. package/lib/components/eftpos/icon/device.d.ts +0 -1
  273. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  274. package/lib/components/eftposPay/amount.d.ts +1 -2
  275. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  276. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  277. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  278. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  279. package/lib/components/eftposPay/device.d.ts +1 -2
  280. package/lib/components/eftposPay/hooks.d.ts +1 -1
  281. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  282. package/lib/components/eftposPay/store/index.d.ts +4 -4
  283. package/lib/components/eftposPay/tip.d.ts +0 -1
  284. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  285. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  286. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  287. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  288. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  289. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  290. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  291. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  292. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  293. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  294. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  295. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  296. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  297. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  298. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  299. package/lib/components/login/index.d.ts +0 -1
  300. package/lib/components/pay/toC/PaymentList/serve.js +1 -1
  301. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  302. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  303. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  304. package/lib/components/pay/toC/model.d.ts +1 -9
  305. package/lib/components/pay/toC/serve.js +1 -1
  306. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  307. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  308. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  309. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +4 -1
  310. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  311. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  312. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  313. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  314. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  315. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  316. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  317. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  318. package/lib/components/schedules/calendar/index.d.ts +0 -1
  319. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  320. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  321. package/lib/components/schedules/model.d.ts +1 -9
  322. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  323. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  324. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  325. package/lib/components/schedules/products/list/index.d.ts +0 -1
  326. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  327. package/lib/components/schedules/utils.d.ts +1 -1
  328. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  329. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  330. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  331. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  332. package/lib/components/shoppingCart/index.d.ts +0 -1
  333. package/lib/components/wallet/Detail/model.d.ts +1 -13
  334. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  335. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  336. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  337. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  338. package/lib/components/wallet/model.d.ts +1 -9
  339. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  340. package/lib/utils/index.d.ts +1 -1
  341. package/package.json +4 -4
  342. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  343. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
  344. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
  345. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  346. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
  347. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
@@ -57,14 +57,18 @@ var useAppointmentBookingStep = () => {
57
57
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
58
58
  const { appointmentBooking, setCurrentStep, setIsLastStep } = (0, import_context.useAppointmentBookingContext)();
59
59
  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) || [];
60
+ const getCurrentAndLastStep = () => {
61
+ const _currentStep = appointmentBooking.getCurrentStep();
62
+ setCurrentStep(_currentStep);
63
+ setIsLastStep((_currentStep == null ? void 0 : _currentStep.index) === stepList.length - 1);
64
+ };
60
65
  (0, import_react.useEffect)(() => {
66
+ getCurrentAndLastStep();
61
67
  pisellOS.effects.on(
62
68
  "appointmentBooking_step:changed",
63
69
  async (res) => {
64
70
  if (res.path === "currentStep") {
65
- const _currentStep = appointmentBooking.getCurrentStep();
66
- setCurrentStep(_currentStep);
67
- setIsLastStep((_currentStep == null ? void 0 : _currentStep.index) === stepList.length - 1);
71
+ getCurrentAndLastStep();
68
72
  }
69
73
  }
70
74
  );
@@ -121,32 +125,29 @@ var useAppointmentBookingAccount = () => {
121
125
  const appointmentBooking = useAppointmentBooking();
122
126
  const [accountLists, setAccountLists] = (0, import_react.useState)([]);
123
127
  const getAccountLists = async () => {
124
- var _a, _b, _c;
125
128
  const data = await appointmentBooking.getAccounts();
129
+ console.log("appointmentBooking_accountList:changed", data);
126
130
  setAccountLists(data || []);
127
- console.log("currentUser4455777", appointmentBooking, (_c = (_b = (_a = appointmentBooking.store) == null ? void 0 : _a.accountList) == null ? void 0 : _b.store) == null ? void 0 : _c.accountList, data);
128
131
  };
129
132
  (0, import_react.useEffect)(() => {
133
+ getAccountLists();
130
134
  pisellOS.effects.on(
131
135
  "appointmentBooking_accountList:changed",
132
136
  async (res) => {
133
137
  if (res.path === "accounts") {
138
+ console.log("appointmentBooking_accountList:changed", res);
134
139
  getAccountLists();
135
140
  }
136
141
  }
137
142
  );
138
- getAccountLists();
139
143
  }, []);
140
144
  return { accountLists };
141
145
  };
142
146
  var useAppointmentBookingResource = () => {
143
147
  const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
144
148
  const { resourceSort } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
145
- const getResourceTimeSlot = async (params) => {
146
- const data = await appointmentBooking.getTimeSlotByAllResources(params);
147
- setTimes(data || []);
148
- };
149
149
  const getResourceList = () => {
150
+ var _a;
150
151
  let resources = appointmentBooking.getResourcesList();
151
152
  resources = resources.map((item) => {
152
153
  return {
@@ -154,15 +155,26 @@ var useAppointmentBookingResource = () => {
154
155
  resources: (0, import_utils.sortResources)((item == null ? void 0 : item.resources) || [], resourceSort)
155
156
  };
156
157
  });
158
+ const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
159
+ const resourceCodes = _resources.map((item) => item.code);
157
160
  setResources(resources || []);
158
- console.log(resources, "resourcesresources");
159
- return resources;
161
+ return { resources, resourceCodes };
162
+ };
163
+ const getResourceTimeSlot = async (index) => {
164
+ const { resourceCodes } = getResourceList();
165
+ const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
166
+ const data = await appointmentBooking.getTimeSlotByAllResources(code);
167
+ setTimes(data || []);
160
168
  };
161
- const autoSelectAllProductResources = async (code) => {
169
+ const autoSelectAllProductResources = async (index) => {
170
+ const { resourceCodes } = getResourceList();
171
+ const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
172
+ const data = await appointmentBooking.getTimeSlotByAllResources(code);
162
173
  let res = await appointmentBooking.autoSelectAllProductResources(code);
163
174
  setResourceOtherParams({
164
175
  ...resourceOtherParams,
165
- ...res
176
+ ...res,
177
+ resourceCodes
166
178
  });
167
179
  return res;
168
180
  };
@@ -39,6 +39,7 @@ var import_context = require("./context");
39
39
  var import_Content = __toESM(require("./components/Content"));
40
40
  var import_locales = __toESM(require("./locales"));
41
41
  var import_hooks = require("./hooks");
42
+ var import_utils2 = require("./utils");
42
43
  var import_index = require("./index.less");
43
44
  var AppointmentBooking = () => {
44
45
  var _a;
@@ -46,15 +47,14 @@ var AppointmentBooking = () => {
46
47
  const utils = context.appHelper.utils || {};
47
48
  import_utils.locales.init(import_locales.default, ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en");
48
49
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
49
- const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
50
- console.log(appointmentBooking, "wh97886786currentUser4455777");
50
+ const currentUser = (0, import_utils2.formatCurrentUser)();
51
51
  (0, import_react.useEffect)(() => {
52
- const res = appointmentBooking.getAccounts();
53
- console.log(res, "wh98867");
52
+ appointmentBooking.getAccounts().then((data) => {
53
+ if (!data.length) {
54
+ appointmentBooking.addAccount([currentUser]);
55
+ }
56
+ });
54
57
  }, []);
55
- (0, import_react.useEffect)(() => {
56
- console.log(accountLists, "wh98867555");
57
- }, [accountLists]);
58
58
  return /* @__PURE__ */ import_react.default.createElement(
59
59
  "div",
60
60
  {
@@ -85,6 +85,8 @@ declare const _default: {
85
85
  'pisell2.appointment.friday': string;
86
86
  'pisell2.appointment.saturday': string;
87
87
  'pisell2.appointment.sunday': string;
88
+ 'pisell2.appointment.any.professional': string;
89
+ 'pisell2.appointment.for.maximum.availability': string;
88
90
  'pisell2.text.apply': string;
89
91
  'pisell2.text.goodpass': string;
90
92
  'pisell2.text.goodpass.product-vouchers': string;
@@ -181,6 +183,8 @@ declare const _default: {
181
183
  'pisell2.appointment.friday': string;
182
184
  'pisell2.appointment.saturday': string;
183
185
  'pisell2.appointment.sunday': string;
186
+ 'pisell2.appointment.any.professional': string;
187
+ 'pisell2.appointment.for.maximum.availability': string;
184
188
  'pisell2.text.apply': string;
185
189
  'pisell2.text.goodpass': string;
186
190
  'pisell2.text.goodpass.product-vouchers': string;
@@ -277,6 +281,8 @@ declare const _default: {
277
281
  'pisell2.appointment.friday': string;
278
282
  'pisell2.appointment.saturday': string;
279
283
  'pisell2.appointment.sunday': string;
284
+ 'pisell2.appointment.any.professional': string;
285
+ 'pisell2.appointment.for.maximum.availability': string;
280
286
  'pisell2.text.apply': string;
281
287
  'pisell2.text.goodpass': string;
282
288
  'pisell2.text.goodpass.product-vouchers': string;
@@ -109,6 +109,8 @@ var locales_default = {
109
109
  "pisell2.appointment.friday": "Fri",
110
110
  "pisell2.appointment.saturday": "Sat",
111
111
  "pisell2.appointment.sunday": "Sun",
112
+ "pisell2.appointment.any.professional": "Any professional",
113
+ "pisell2.appointment.for.maximum.availability": "for maximum availability",
112
114
  "pisell2.text.apply": "Apply",
113
115
  "pisell2.text.goodpass": "GoodPass",
114
116
  "pisell2.text.goodpass.product-vouchers": "Product Vouchers",
@@ -205,6 +207,8 @@ var locales_default = {
205
207
  "pisell2.appointment.friday": "周五",
206
208
  "pisell2.appointment.saturday": "周六",
207
209
  "pisell2.appointment.sunday": "周日",
210
+ "pisell2.appointment.any.professional": "随机分配",
211
+ "pisell2.appointment.for.maximum.availability": "立即匹配",
208
212
  "pisell2.text.apply": "应用",
209
213
  "pisell2.text.goodpass": "商品券",
210
214
  "pisell2.text.goodpass.product-vouchers": "商品兑换券",
@@ -301,6 +305,8 @@ var locales_default = {
301
305
  "pisell2.appointment.friday": "周五",
302
306
  "pisell2.appointment.saturday": "周六",
303
307
  "pisell2.appointment.sunday": "周日",
308
+ "pisell2.appointment.any.professional": "隨機分配",
309
+ "pisell2.appointment.for.maximum.availability": "立即匹配",
304
310
  "pisell2.text.apply": "應用",
305
311
  "pisell2.text.goodpass": "商品券",
306
312
  "pisell2.text.goodpass.product-vouchers": "商品兌換券",
@@ -75,3 +75,12 @@ export declare const formatCurrentUser: () => {
75
75
  * @Date: 2025-04-15 17:05
76
76
  */
77
77
  export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
78
+ /**
79
+ * @title: 购物车中是否有空的资源数据
80
+ * @description:
81
+ * @param {any} carts
82
+ * @return {*}
83
+ * @Author: WangHan
84
+ * @Date: 2025-04-15 21:51
85
+ */
86
+ export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
@@ -39,6 +39,7 @@ __export(utils_exports, {
39
39
  getMeAccount: () => getMeAccount,
40
40
  getScheduleColors: () => getScheduleColors,
41
41
  getUsableSchedules: () => getUsableSchedules,
42
+ isEmptyCartsResourceId: () => isEmptyCartsResourceId,
42
43
  isEmptyGuest: () => isEmptyGuest,
43
44
  resourceTitle: () => resourceTitle,
44
45
  sortResources: () => sortResources
@@ -120,6 +121,7 @@ var formatCarts = (data, resources) => {
120
121
  const utils = context.appHelper.utils || {};
121
122
  const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
122
123
  const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
124
+ console.log(data, resources, "formatCartsformatCarts");
123
125
  return data == null ? void 0 : data.map((d) => {
124
126
  var _a2, _b;
125
127
  const currentResource = resources.find((r) => (d == null ? void 0 : d._id) === (r == null ? void 0 : r._id));
@@ -127,7 +129,7 @@ var formatCarts = (data, resources) => {
127
129
  currentResources = currentResources == null ? void 0 : currentResources.map((d2) => {
128
130
  return {
129
131
  ...d2,
130
- label: d2 == null ? void 0 : d2.main_field
132
+ label: (d2 == null ? void 0 : d2.main_field) || (d2 == null ? void 0 : d2.id)
131
133
  };
132
134
  });
133
135
  return {
@@ -202,6 +204,11 @@ var isEmptyGuest = (carts, accounts) => {
202
204
  }
203
205
  return false;
204
206
  };
207
+ var isEmptyCartsResourceId = (carts) => {
208
+ const isEmptyResourceId = carts == null ? void 0 : carts.some((d) => !(d == null ? void 0 : d.resource_id));
209
+ console.log(isEmptyResourceId, "isEmptyResourceId");
210
+ return isEmptyResourceId;
211
+ };
205
212
  // Annotate the CommonJS export names for ESM import in node:
206
213
  0 && (module.exports = {
207
214
  formatBackgroundColors,
@@ -214,6 +221,7 @@ var isEmptyGuest = (carts, accounts) => {
214
221
  getMeAccount,
215
222
  getScheduleColors,
216
223
  getUsableSchedules,
224
+ isEmptyCartsResourceId,
217
225
  isEmptyGuest,
218
226
  resourceTitle,
219
227
  sortResources
@@ -223,14 +223,15 @@ var Addons = (0, import_model.Provider)((props) => {
223
223
  },
224
224
  is_eject: isEject ? 1 : 0
225
225
  },
226
- callback: (e) => {
226
+ callback: (e, extension_type, detail) => {
227
227
  console.log("e", e);
228
+ const _detail = detail || item;
228
229
  let product = {
229
- ...item,
230
+ ..._detail,
230
231
  _id: (0, import_utils3.getUniqueId)(),
231
232
  _key: e.key,
232
233
  _extend: {
233
- price: item.price,
234
+ price: _detail.price,
234
235
  other: e,
235
236
  quantity: 1
236
237
  },
@@ -377,10 +378,11 @@ var Addons = (0, import_model.Provider)((props) => {
377
378
  },
378
379
  value: item._extend.other
379
380
  },
380
- callback: (e) => {
381
+ callback: (e, extension_type, detail) => {
381
382
  var _a2;
383
+ const _detail = detail || item;
382
384
  let product = {
383
- ...item,
385
+ ..._detail,
384
386
  _extend: {
385
387
  ...item._extend,
386
388
  other: e
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
4
3
  export default SelectProductItem;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const renderBundles: (item: any, amountSymbol: string) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 空状态
4
3
  * @description:
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const FooterMenus: ({ state, menuChange, items }: any) => JSX.Element | null;
4
3
  export default FooterMenus;
@@ -195,11 +195,12 @@ var formatProducts = (item) => {
195
195
  const discount_amount = origin_total - total;
196
196
  const discount_list = (item == null ? void 0 : item.discount_list) || [];
197
197
  const discount_type = discount_amount < 0 ? "change_price" : "discount";
198
+ const notManualDiscount = discount_list.filter((item2) => item2.type !== "product");
198
199
  return {
199
200
  "num": item._extend.quantity,
200
201
  "price": formatProductPrice(item),
201
202
  "product_id": (item == null ? void 0 : item.product_id) || item.id,
202
- "discount_amount": discount_list.length > 0 ? 0 : discount_amount,
203
+ "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
203
204
  "product_discount_reason": item._extend.discount_reason || "",
204
205
  "is_charge_tax": item.is_charge_tax,
205
206
  "note": (item == null ? void 0 : item.note) || "",
@@ -211,7 +212,7 @@ var formatProducts = (item) => {
211
212
  "bundle_edit": item._extend.bundle_edit,
212
213
  "product_option_item": formatProductOption((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.option),
213
214
  "product_variant_id": ((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.product_variant_id) || 0,
214
- "discount_list": discount_list,
215
+ "discount_list": notManualDiscount,
215
216
  metadata: formatMetaData(item)
216
217
  };
217
218
  };
@@ -250,9 +251,7 @@ var formatBookings = (data, values) => {
250
251
  return (_a = d._extend) == null ? void 0 : _a.holder_id;
251
252
  });
252
253
  }
253
- let dayParams = {
254
- relation_products: []
255
- };
254
+ let dayParams = {};
256
255
  const eventOtherParams = data.eventOtherParams;
257
256
  let bookings = [];
258
257
  bookings = list.map((item) => {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -39,7 +39,6 @@ var import_antd = require("antd");
39
39
  var import_utils = require("@pisell/utils");
40
40
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
41
41
  var import_materials = require("@pisell/materials");
42
- var import_icons = require("@ant-design/icons");
43
42
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
44
43
  var import_index = require("./index.less");
45
44
  var ShopDiscountHooks = {
@@ -145,6 +144,7 @@ var VoucherCard = (props) => {
145
144
  value: val.productList
146
145
  }
147
146
  });
147
+ setCode("");
148
148
  } else {
149
149
  (0, import_materials.PisellToast)({
150
150
  content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
@@ -193,6 +193,7 @@ var VoucherCard = (props) => {
193
193
  dispatch({
194
194
  type: "setService",
195
195
  payload: {
196
+ edit: true,
196
197
  value: detail.productList
197
198
  }
198
199
  });
@@ -208,13 +209,7 @@ var VoucherCard = (props) => {
208
209
  setCode((_a2 = e.target) == null ? void 0 : _a2.value);
209
210
  },
210
211
  size: "small",
211
- placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code"),
212
- suffix: /* @__PURE__ */ import_react.default.createElement(import_materials.PisellTooltip, { title: "" }, /* @__PURE__ */ import_react.default.createElement(
213
- import_icons.QuestionCircleOutlined,
214
- {
215
- style: { color: "rgba(0,0,0,.45)" }
216
- }
217
- ))
212
+ placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
218
213
  }
219
214
  )), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
220
215
  ));
@@ -0,0 +1,6 @@
1
+ interface FooterProps {
2
+ state: any;
3
+ reload: () => void;
4
+ }
5
+ declare const Footer: ({ state, reload }: FooterProps) => JSX.Element | null;
6
+ export default Footer;
@@ -0,0 +1,81 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/booking/forms/footer.tsx
30
+ var footer_exports = {};
31
+ __export(footer_exports, {
32
+ default: () => footer_default
33
+ });
34
+ module.exports = __toCommonJS(footer_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_materials = require("@pisell/materials");
37
+ var import_icons = require("@ant-design/icons");
38
+ var import_useSendModal = __toESM(require("./sendModal/useSendModal"));
39
+ var import_sendModal = __toESM(require("./sendModal"));
40
+ var import_utils = require("@pisell/utils");
41
+ var Footer = ({ state, reload }) => {
42
+ var _a, _b, _c, _d, _e;
43
+ const { open, setOpen, handleOpen, handleValuesChange, handleOk } = (0, import_useSendModal.default)(state == null ? void 0 : state.bookingId);
44
+ const handleReload = async () => {
45
+ await reload();
46
+ import_materials.message.success(import_utils.locales.getText("pisell2.text.send-form-reminder-refresh"));
47
+ };
48
+ const isAllCompleted = (0, import_react.useMemo)(() => {
49
+ var _a2;
50
+ return Object.values(((_a2 = state == null ? void 0 : state.form) == null ? void 0 : _a2.value) || {}).every(
51
+ (item) => item.length > 0
52
+ );
53
+ }, [(_a = state == null ? void 0 : state.form) == null ? void 0 : _a.value]);
54
+ const defaultValues = (0, import_react.useMemo)(() => {
55
+ var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j;
56
+ return {
57
+ sendSms: !!((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.phone),
58
+ sendEmail: !!((_d2 = (_c2 = state.client) == null ? void 0 : _c2.value) == null ? void 0 : _d2.email),
59
+ email: (_f = (_e2 = state.client) == null ? void 0 : _e2.value) == null ? void 0 : _f.email,
60
+ phone: {
61
+ code: (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.country_calling_code,
62
+ phone: (_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.phone
63
+ }
64
+ };
65
+ }, [(_b = state.client) == null ? void 0 : _b.value]);
66
+ if (!state.bookingId || !((_c = state == null ? void 0 : state.form) == null ? void 0 : _c.forms.length)) {
67
+ return null;
68
+ }
69
+ 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, disabled: isAllCompleted }, !isAllCompleted ? import_utils.locales.getText("pisell2.text.send-form-reminder") : import_utils.locales.getText("pisell2.text.send-form-reminder-completed")), /* @__PURE__ */ import_react.default.createElement(
70
+ import_sendModal.default,
71
+ {
72
+ refreshKey: (_e = (_d = state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id,
73
+ open,
74
+ onCancel: () => setOpen(false),
75
+ onOk: handleOk,
76
+ onValuesChange: handleValuesChange,
77
+ defaultValues
78
+ }
79
+ ));
80
+ };
81
+ var footer_default = Footer;
@@ -1,4 +1,4 @@
1
- import "./index.less";
1
+ import './index.less';
2
2
  export interface InfoProps {
3
3
  title?: string;
4
4
  style?: any;
@@ -42,9 +42,10 @@ var import_utils = require("@pisell/utils");
42
42
  var import_forms = __toESM(require("./forms"));
43
43
  var import_utils2 = require("../utils");
44
44
  var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
45
+ var import_footer = __toESM(require("./footer"));
45
46
  var relation_type = "appointment_booking";
46
47
  var Forms = (0, import_model.Provider)((props) => {
47
- var _a, _b, _c, _d, _e, _f, _g, _h;
48
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
48
49
  const { globalState } = props;
49
50
  const [loading, setLoading] = (0, import_react.useState)(true);
50
51
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
@@ -215,7 +216,8 @@ var Forms = (0, import_model.Provider)((props) => {
215
216
  {
216
217
  header: import_utils.locales.getText("pisell2.text.forms"),
217
218
  loading: loading && globalState.bookingId,
218
- bodyClassName: "booking-forms-body"
219
+ bodyClassName: "booking-forms-body",
220
+ footer: state.bookingId && ((_i = state == null ? void 0 : state.form) == null ? void 0 : _i.forms.length) && /* @__PURE__ */ import_react.default.createElement(import_footer.default, { state: globalState, reload: geForms })
219
221
  },
220
222
  !globalState.bookingId ? /* @__PURE__ */ import_react.default.createElement(import_emptyBooking.default, null) : /* @__PURE__ */ import_react.default.createElement(
221
223
  import_forms.default,
@@ -16,4 +16,11 @@
16
16
 
17
17
  .booking-forms-body {
18
18
  padding-bottom: 32px !important;
19
+ }
20
+ .pisell-lowcode-send-form-wrap {
21
+ padding: 24px 0;
22
+ }
23
+ .pisell-lowcode__booking-form-footer {
24
+ display: flex;
25
+ gap: 8px;
19
26
  }
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type SendModalValues = {
4
+ sendSms: boolean;
5
+ sendEmail: boolean;
6
+ phone: {
7
+ code: string;
8
+ phone: string;
9
+ };
10
+ email: string;
11
+ };
12
+ interface SendModalProps {
13
+ open: boolean;
14
+ refreshKey: string;
15
+ onCancel: () => void;
16
+ onOk: (values: SendModalValues) => void;
17
+ defaultValues?: {
18
+ email?: string;
19
+ phone?: {
20
+ code?: string;
21
+ phone?: string;
22
+ };
23
+ };
24
+ onValuesChange?: (values: any) => void;
25
+ }
26
+ declare const SendModal: React.FC<SendModalProps>;
27
+ export default SendModal;