@pisell/private-materials 3.3.33 → 3.3.35

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 (274) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Cart/index.js +26 -13
  12. package/es/components/Sales/Cart/types.d.ts +12 -0
  13. package/es/components/Sales/Cart/utils.d.ts +23 -0
  14. package/es/components/Sales/Cart/utils.js +161 -0
  15. package/es/components/Sales/Checkout/utils.d.ts +9 -1
  16. package/es/components/Sales/Checkout/utils.js +25 -3
  17. package/es/components/Sales/Event/Detail.d.ts +2 -0
  18. package/es/components/Sales/Event/Detail.js +56 -13
  19. package/es/components/Sales/Event/serve.d.ts +10 -0
  20. package/es/components/Sales/Event/serve.js +26 -1
  21. package/es/components/Sales/Summary/utils.js +1 -0
  22. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +42 -20
  23. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -29
  25. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  26. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +156 -53
  27. package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  28. package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
  29. package/es/components/appointmentBooking/components/Content/index.js +28 -44
  30. package/es/components/appointmentBooking/components/Content/index.less +23 -1
  31. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  32. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  33. package/es/components/appointmentBooking/components/Footer/index.js +5 -5
  34. package/es/components/appointmentBooking/components/Form/index.js +161 -61
  35. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  36. package/es/components/appointmentBooking/components/Header/index.js +47 -61
  37. package/es/components/appointmentBooking/components/Resource/index.js +102 -119
  38. package/es/components/appointmentBooking/components/Services/index.js +50 -25
  39. package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
  40. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  41. package/es/components/appointmentBooking/context.js +3 -43
  42. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  43. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  44. package/es/components/appointmentBooking/hooks.d.ts +3 -1
  45. package/es/components/appointmentBooking/hooks.js +215 -294
  46. package/es/components/appointmentBooking/utils.d.ts +2 -88
  47. package/es/components/appointmentBooking/utils.js +63 -325
  48. package/es/components/booking/addons/model.js +5 -5
  49. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  50. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  51. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  52. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  53. package/es/components/booking/components/browserSelect/index.js +1 -1
  54. package/es/components/booking/components/voucher/index.d.ts +0 -1
  55. package/es/components/booking/forms/model.js +5 -5
  56. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  57. package/es/components/booking/forms/single/index.d.ts +0 -1
  58. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  59. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  60. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  61. package/es/components/booking/info/date/index.d.ts +0 -1
  62. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  63. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  64. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  65. package/es/components/booking/info/service/like/index.js +1 -1
  66. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  67. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  68. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  69. package/es/components/booking/info/utils.js +1 -1
  70. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  71. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  72. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  73. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  74. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  75. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  76. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  77. package/es/components/booking/materiels/startTime/index.js +1 -1
  78. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  79. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  80. package/es/components/booking/notes/model.js +5 -5
  81. package/es/components/booking/payments/model.js +5 -5
  82. package/es/components/booking/utils.d.ts +2 -2
  83. package/es/components/booking/utils.js +19 -11
  84. package/es/components/eftposPay/amount.d.ts +1 -1
  85. package/es/components/eftposPay/device.d.ts +1 -1
  86. package/es/components/eftposPay/hooks.d.ts +1 -1
  87. package/es/components/eftposPay/store/index.d.ts +3 -3
  88. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  89. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +218 -73
  90. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  91. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  92. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  93. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  94. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  95. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  96. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  97. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  98. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  99. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  100. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  101. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  102. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  103. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -2
  104. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -4
  105. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  106. package/es/components/eventBooking/components/bookingDetailModal/index.js +70 -13
  107. package/es/components/listComponent/index.js +5 -5
  108. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  109. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  110. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  111. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  112. package/es/components/productExtension/card/index.js +3 -3
  113. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  114. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  115. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  116. package/es/components/productExtension/fields/Forms/index.js +12 -12
  117. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  118. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  119. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  120. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  121. package/es/components/productExtension/index.d.ts +0 -1
  122. package/es/components/productExtension/server.js +2 -2
  123. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  124. package/es/components/productSelect/components/TabProduct/index.js +4 -2
  125. package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
  126. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  127. package/es/components/schedules/calendar/index.js +4 -4
  128. package/es/components/schedules/calendar/serve.js +2 -2
  129. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  130. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  131. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  132. package/es/components/schedules/components/ResourceList/index.js +1 -1
  133. package/es/components/schedules/components/Search/index.js +5 -5
  134. package/es/components/schedules/model.js +5 -5
  135. package/es/components/schedules/openHours/index.js +1 -1
  136. package/es/components/schedules/openHours/serve.js +2 -2
  137. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  138. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  139. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  140. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  141. package/es/components/schedules/products/serve.js +2 -2
  142. package/es/components/schedules/products/utils.js +5 -5
  143. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  144. package/es/components/schedules/resources/detail/index.js +10 -10
  145. package/es/components/schedules/resources/list/index.js +2 -2
  146. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  147. package/es/components/schedules/resources/serve.js +2 -2
  148. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  149. package/es/components/schedules/utils.d.ts +1 -1
  150. package/es/components/schedules/utils.js +4 -4
  151. package/es/components/selectModal/index.js +2 -2
  152. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  153. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  154. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  155. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  156. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  157. package/es/components/ticketBooking/index.d.ts +0 -1
  158. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  159. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  160. package/es/hooks/useComponents.js +1 -1
  161. package/es/utils/index.d.ts +1 -1
  162. package/lib/components/Sales/Cart/index.js +30 -18
  163. package/lib/components/Sales/Cart/types.d.ts +12 -0
  164. package/lib/components/Sales/Cart/utils.d.ts +23 -0
  165. package/lib/components/Sales/Cart/utils.js +149 -0
  166. package/lib/components/Sales/Checkout/utils.d.ts +9 -1
  167. package/lib/components/Sales/Checkout/utils.js +18 -4
  168. package/lib/components/Sales/Event/Detail.d.ts +2 -0
  169. package/lib/components/Sales/Event/Detail.js +34 -10
  170. package/lib/components/Sales/Event/serve.d.ts +10 -0
  171. package/lib/components/Sales/Event/serve.js +5 -2
  172. package/lib/components/Sales/Summary/utils.js +1 -0
  173. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +7 -2
  174. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  175. package/lib/components/appointmentBooking/components/Cart/Item/index.js +10 -34
  176. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  177. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +43 -6
  178. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  179. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
  180. package/lib/components/appointmentBooking/components/Content/index.js +28 -42
  181. package/lib/components/appointmentBooking/components/Content/index.less +23 -1
  182. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  183. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  184. package/lib/components/appointmentBooking/components/Form/index.js +98 -54
  185. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  186. package/lib/components/appointmentBooking/components/Header/index.js +19 -36
  187. package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
  188. package/lib/components/appointmentBooking/components/Services/index.js +18 -10
  189. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
  190. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  191. package/lib/components/appointmentBooking/context.js +4 -48
  192. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  193. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  194. package/lib/components/appointmentBooking/hooks.d.ts +3 -1
  195. package/lib/components/appointmentBooking/hooks.js +62 -142
  196. package/lib/components/appointmentBooking/utils.d.ts +2 -88
  197. package/lib/components/appointmentBooking/utils.js +51 -191
  198. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  199. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  200. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  201. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  202. package/lib/components/booking/forms/single/index.d.ts +0 -1
  203. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  204. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  205. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  206. package/lib/components/booking/info/date/index.d.ts +0 -1
  207. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  208. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  209. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  210. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  211. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  212. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  213. package/lib/components/booking/info/utils.js +1 -1
  214. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  215. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  216. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  217. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  218. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  219. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  220. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  221. package/lib/components/booking/utils.d.ts +2 -2
  222. package/lib/components/booking/utils.js +5 -1
  223. package/lib/components/eftposPay/amount.d.ts +1 -1
  224. package/lib/components/eftposPay/device.d.ts +1 -1
  225. package/lib/components/eftposPay/hooks.d.ts +1 -1
  226. package/lib/components/eftposPay/store/index.d.ts +3 -3
  227. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  228. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +128 -42
  229. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  230. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  231. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  232. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  233. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  234. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  235. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  236. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  237. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  238. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  239. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  240. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  241. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  242. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -2
  243. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -2
  244. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  245. package/lib/components/eventBooking/components/bookingDetailModal/index.js +79 -24
  246. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  247. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  248. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  249. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  250. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  251. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  252. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  253. package/lib/components/productExtension/index.d.ts +0 -1
  254. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  255. package/lib/components/productSelect/components/TabProduct/index.js +6 -2
  256. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
  257. package/lib/components/schedules/utils.d.ts +1 -1
  258. package/lib/components/schedules/utils.js +1 -1
  259. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  260. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  261. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  262. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  263. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  264. package/lib/components/ticketBooking/index.d.ts +0 -1
  265. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  266. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  267. package/lib/utils/index.d.ts +1 -1
  268. package/package.json +1 -1
  269. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  270. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
  271. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
  272. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  273. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
  274. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
@@ -75,6 +75,7 @@ export declare const useAppointmentBookingResource: () => {
75
75
  resources: any;
76
76
  resourceCodes: any;
77
77
  };
78
+ autoSelectAllProductResources: (index?: number) => Promise<any>;
78
79
  };
79
80
  /**
80
81
  * @title: 是否跳过资源选择步骤
@@ -84,7 +85,7 @@ export declare const useAppointmentBookingResource: () => {
84
85
  * @Date: 2025-04-21 11:47
85
86
  */
86
87
  export declare const useIsSkipResourceStep: () => {
87
- checkSkipResourceStep: () => Promise<boolean>;
88
+ checkSkipResourceStep: (isSkipUpdateFormStep?: boolean) => Promise<boolean>;
88
89
  };
89
90
  /**
90
91
  * @title: 获取预约配置
@@ -96,6 +97,7 @@ export declare const useIsSkipResourceStep: () => {
96
97
  export declare const useAppointmentBookingSetting: () => {
97
98
  isDateSelectedFirst: boolean;
98
99
  isFormSubject: boolean;
100
+ isRetailTemplate: any;
99
101
  customPageId: any;
100
102
  channel: any;
101
103
  bookingSubject: any;
@@ -48,7 +48,7 @@ var import_useEngineContext = require("../../hooks/useEngineContext");
48
48
  var import_useEngineContext2 = __toESM(require("../../hooks/useEngineContext"));
49
49
  var import_utils2 = require("./utils");
50
50
  var import_context = require("./context");
51
- var import_utils3 = require("./components/Resource/utils");
51
+ var import_utils3 = require("./components/Cart/utils");
52
52
  var useAppointmentBooking = () => {
53
53
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
54
54
  return pisellOS.getModule("appointmentBooking");
@@ -66,13 +66,9 @@ var contextUtils = () => {
66
66
  var useAppointmentBookingStep = () => {
67
67
  var _a, _b, _c;
68
68
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
69
- const { appointmentBooking, setCurrentStep, carts, openPolicy, setCarts, setLoading, currentSelectedResourcesRef, currentStepParams, setIsErrorHolder } = (0, import_context.useAppointmentBookingContext)();
69
+ const { appointmentBooking, setCurrentStep, policyIdsRef, openPolicy } = (0, import_context.useAppointmentBookingContext)();
70
+ const { isRetailTemplate } = useAppointmentBookingSetting();
70
71
  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) || [];
71
- const { isLogin, openLoginModal } = useAppointmentBookingLogin();
72
- const { isFormSubject } = useAppointmentBookingSetting();
73
- const { accountLists, getHolders, checkAccount } = useAppointmentBookingAccount();
74
- const { getResourceList } = useAppointmentBookingResource();
75
- const utils = contextUtils();
76
72
  const getCurrentAndLastStep = () => {
77
73
  const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
78
74
  setCurrentStep(currentStep);
@@ -119,103 +115,27 @@ var useAppointmentBookingStep = () => {
119
115
  });
120
116
  };
121
117
  const nextStep = () => {
122
- var _a2, _b2, _c2, _d, _e, _f, _g, _h;
123
- let stepList2 = (currentStepParams == null ? void 0 : currentStepParams.stepLists) || [];
124
- const currentKey = currentStepParams == null ? void 0 : currentStepParams.key;
125
- if (currentKey == null ? void 0 : currentKey.startsWith("select-resource")) {
126
- const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)((currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) || [], appointmentBooking, utils);
127
- if (hasError) {
128
- (0, import_utils3.scrollToFirstErrorCard)();
129
- return;
130
- }
131
- (_a2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _a2.forEach((cart) => {
132
- var _a3, _b3;
133
- const selectedResource2 = cart == null ? void 0 : cart.currentSelectedResource;
134
- const resourceItem = (selectedResource2 == null ? void 0 : selectedResource2.resourceItem) || {};
135
- const formId = (_a3 = selectedResource2 == null ? void 0 : selectedResource2.renderItem) == null ? void 0 : _a3.resource_form_id;
136
- const policyId = (_b3 = selectedResource2 == null ? void 0 : selectedResource2.renderItem) == null ? void 0 : _b3.policy_id;
137
- const formKey = `fill-form_@${resourceItem == null ? void 0 : resourceItem.form_id}-${resourceItem == null ? void 0 : resourceItem.code}-${cart == null ? void 0 : cart._id}-${formId}-${policyId}`;
138
- if (formId) {
139
- const description = import_utils.locales.getText("pisell2.appointment.fill-form");
140
- const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
141
- appointmentBooking.addStep({ key: formKey, description }, beforeKey);
142
- } else {
143
- appointmentBooking.removeStep(formKey);
144
- }
145
- });
146
- const selectedResource = (_c2 = (_b2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.currentSelectedResource;
147
- if (selectedResource) {
148
- const originRenderLists = ((_d = selectedResource == null ? void 0 : selectedResource.resourceItem) == null ? void 0 : _d.originRenderLists) || [];
149
- const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex((item) => {
150
- var _a3;
151
- return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
152
- });
153
- const nextResource = originRenderLists == null ? void 0 : originRenderLists[currentResourceIndex + 1];
154
- const resourceKey = `select-resource_@${nextResource == null ? void 0 : nextResource.form_id}-${nextResource == null ? void 0 : nextResource.code}`;
155
- if (nextResource) {
156
- const beforeKey = (_e = stepList2[stepList2.length - 2]) == null ? void 0 : _e.key;
157
- appointmentBooking.addStep({ key: resourceKey, description: "" }, beforeKey);
158
- } else {
159
- appointmentBooking.removeStep(resourceKey);
160
- }
161
- }
118
+ var _a2, _b2, _c2, _d;
119
+ if (isRetailTemplate) {
120
+ return appointmentBooking.next();
162
121
  }
163
- const nextStep2 = stepList2[(currentStepParams == null ? void 0 : currentStepParams.index) + 1];
164
- if (((_f = nextStep2 == null ? void 0 : nextStep2.key) == null ? void 0 : _f.startsWith("select-resource_")) || (nextStep2 == null ? void 0 : nextStep2.key) === "confirm-information") {
165
- const selectedResource = (_h = (_g = currentSelectedResourcesRef.current) == null ? void 0 : _g[0]) == null ? void 0 : _h.currentSelectedResource;
166
- const renderItem = (selectedResource == null ? void 0 : selectedResource.renderItem) || {};
167
- const checkHolder = () => {
168
- setLoading(false);
169
- const { hasError, updatedCartList } = (0, import_utils2.checkAndGoNext)(isFormSubject, checkAccount, carts);
170
- if (hasError) {
171
- setIsErrorHolder(hasError);
172
- setCarts(updatedCartList);
173
- return;
174
- }
175
- if (!!(renderItem == null ? void 0 : renderItem.policy_id)) {
176
- openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
177
- return appointmentBooking.next();
178
- });
179
- } else {
180
- return appointmentBooking.next();
181
- }
182
- };
183
- const checkLogin = () => {
184
- if (!isLogin) {
185
- return openLoginModal({
186
- callback: (status) => {
187
- var _a3;
188
- if (status === "success") {
189
- if (!isFormSubject) {
190
- const user = JSON.parse(((_a3 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a3.get("customer")) || "{}");
191
- const currentUser = (0, import_utils2.formatCustomer)(user);
192
- const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
193
- appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
194
- } else {
195
- getHolders();
196
- }
197
- checkHolder();
198
- }
199
- }
200
- });
201
- } else {
202
- return checkHolder();
203
- }
204
- };
205
- if ((nextStep2 == null ? void 0 : nextStep2.key) !== "confirm-information") {
206
- if (!(renderItem == null ? void 0 : renderItem.policy_id)) {
207
- return appointmentBooking.next();
208
- }
209
- return openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
210
- const cartItem = carts == null ? void 0 : carts[0];
211
- appointmentBooking.updateCart({
212
- _id: cartItem == null ? void 0 : cartItem._id,
213
- ...cartItem
214
- });
215
- appointmentBooking.next();
216
- });
217
- } else {
218
- return checkLogin();
122
+ const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
123
+ const stepList2 = ((_c2 = (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.step) == null ? void 0 : _b2.store) == null ? void 0 : _c2.stepList) || [];
124
+ if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepList2 == null ? void 0 : stepList2.length)) {
125
+ if ((_d = policyIdsRef == null ? void 0 : policyIdsRef.current) == null ? void 0 : _d.length) {
126
+ let idx = 0;
127
+ const showNextPolicy = () => {
128
+ if (idx < policyIdsRef.current.length) {
129
+ openPolicy({ id: policyIdsRef.current[idx] }, () => {
130
+ idx++;
131
+ showNextPolicy();
132
+ });
133
+ } else {
134
+ appointmentBooking.next();
135
+ }
136
+ };
137
+ showNextPolicy();
138
+ return;
219
139
  }
220
140
  }
221
141
  appointmentBooking.next();
@@ -254,29 +174,14 @@ var useAppointmentBookingCart = () => {
254
174
  var _a;
255
175
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
256
176
  const utils = contextUtils();
257
- const { appointmentBooking, isErrorHolder, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
177
+ const { appointmentBooking, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
258
178
  const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
259
179
  const getCartAndSummary = async () => {
260
- var _a2;
261
- const locale = ((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("umi_locale")) || "en-US";
262
- const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
263
180
  const carts = await appointmentBooking.getCart();
264
- const accountLists = await appointmentBooking.getAccounts();
265
181
  const newCarts = carts == null ? void 0 : carts.map((item) => {
266
- var _a3;
267
182
  return {
268
183
  ...item,
269
- addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name),
270
- format: ["HH:mm", "HH:mm"],
271
- show_time: true,
272
- duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
273
- locale,
274
- symbol,
275
- holders: (0, import_utils2.formatHolder)(accountLists),
276
- allowClearHolder: true,
277
- allowClearResource: true,
278
- isErrorHolder: isErrorHolder || false,
279
- isMultipleResource: true
184
+ addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name)
280
185
  };
281
186
  });
282
187
  setCarts(newCarts || []);
@@ -369,7 +274,7 @@ var useAppointmentBookingAccount = () => {
369
274
  return { accountLists, getHolders, form_id, addAccount, checkAccount };
370
275
  };
371
276
  var useAppointmentBookingResource = () => {
372
- const { appointmentBooking, setResources, setTimes } = (0, import_context.useAppointmentBookingContext)();
277
+ const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
373
278
  const { resourceSort } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
374
279
  const getResourceList = () => {
375
280
  var _a;
@@ -391,47 +296,60 @@ var useAppointmentBookingResource = () => {
391
296
  const data = await appointmentBooking.getTimeSlotByAllResources(code);
392
297
  setTimes(data || []);
393
298
  };
394
- return { getResourceTimeSlot, getResourceList };
299
+ const autoSelectAllProductResources = async (index) => {
300
+ const { resourceCodes } = getResourceList();
301
+ const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
302
+ const data = await appointmentBooking.getTimeSlotByAllResources(code);
303
+ let res = await appointmentBooking.autoSelectAllProductResources(code);
304
+ setResourceOtherParams({
305
+ ...resourceOtherParams,
306
+ ...res,
307
+ resourceCodes
308
+ });
309
+ return res;
310
+ };
311
+ return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
395
312
  };
396
313
  var useIsSkipResourceStep = () => {
397
- const { currentStepParams } = (0, import_context.useAppointmentBookingContext)();
398
- const { getResourceList } = useAppointmentBookingResource();
314
+ var _a, _b, _c;
315
+ const { currentStep, setCarts, setPolicyIds } = (0, import_context.useAppointmentBookingContext)();
316
+ const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
399
317
  const { isFormSubject } = useAppointmentBookingSetting();
400
318
  const appointmentBooking = useAppointmentBooking();
319
+ 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) || [];
320
+ const { isLogin, openLoginModal } = useAppointmentBookingLogin();
321
+ const { getHolders, checkAccount } = useAppointmentBookingAccount();
401
322
  const { nextStep } = useAppointmentBookingStep();
402
- const checkSkipResourceStep = async () => {
323
+ const utils = contextUtils();
324
+ const checkSkipResourceStep = async (isSkipUpdateFormStep) => {
325
+ var _a2, _b2, _c2, _d, _e;
403
326
  try {
404
- const { resources } = getResourceList();
405
327
  const accountLists = await appointmentBooking.getAccounts();
406
- const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(currentStepParams.key, resources, appointmentBooking);
407
- if (isSystem) {
408
- nextStep();
409
- return true;
410
- }
328
+ const carts = await appointmentBooking.getCart();
411
329
  if ((accountLists == null ? void 0 : accountLists.length) === 1 || isFormSubject) {
412
- const renderLists = (0, import_utils2.currentRenderLists)(resources, form_code);
413
- let _isSkip = false;
414
- if ((renderLists == null ? void 0 : renderLists.length) === 1) {
415
- _isSkip = isSkip || false;
416
- } else {
417
- _isSkip = false;
418
- }
419
- if (_isSkip) {
420
- nextStep();
330
+ const res = await autoSelectAllProductResources();
331
+ const { resources } = getResourceList();
332
+ if (!((_a2 = res == null ? void 0 : res.errorList) == null ? void 0 : _a2.length) && ((_e = (_d = (_c2 = (_b2 = resources == null ? void 0 : resources[0]) == null ? void 0 : _b2.resources) == null ? void 0 : _c2[0]) == null ? void 0 : _d.renderList) == null ? void 0 : _e.length) === 1) {
333
+ if (!isSkipUpdateFormStep) {
334
+ const resultCarts = (0, import_utils2.formatCartsResources)(carts, resources, setPolicyIds);
335
+ (0, import_utils2.checkHasFormStep)({ nextStep, isSkip: true, openLoginModal, utils, accountLists, getHolders, checkHolder: import_utils3.checkHolder, setCarts, checkAccount, carts, isFormSubject, hasResourceFormId: (resultCarts == null ? void 0 : resultCarts.length) > 0, currentStep, stepList, appointmentBooking, locales: import_utils.locales, isLogin });
336
+ }
421
337
  return true;
338
+ } else {
339
+ return false;
422
340
  }
423
- return _isSkip;
424
341
  } else {
425
342
  return false;
426
343
  }
427
344
  } catch (error) {
345
+ console.log(error, "checkSkipResourceStep33");
428
346
  return false;
429
347
  }
430
348
  };
431
349
  return { checkSkipResourceStep };
432
350
  };
433
351
  var useAppointmentBookingSetting = () => {
434
- var _a;
352
+ var _a, _b;
435
353
  const utils = contextUtils();
436
354
  const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
437
355
  const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
@@ -449,6 +367,8 @@ var useAppointmentBookingSetting = () => {
449
367
  isDateSelectedFirst: bookingProcess === "date_first",
450
368
  // 主体是否是表单
451
369
  isFormSubject: (bookingSubject == null ? void 0 : bookingSubject.type) === "form",
370
+ // 是否是零售模版
371
+ isRetailTemplate: ((_b = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _b.isRetailTemplate) || false,
452
372
  customPageId,
453
373
  channel,
454
374
  bookingSubject,
@@ -101,7 +101,7 @@ export declare function updateLists<T extends Record<string, any>>(list: T[], ke
101
101
  * @Author: WangHan
102
102
  * @Date: 2025-04-27 17:27
103
103
  */
104
- export declare const updateBookingFormStorage: (bookingForm: any, id: number | string, newData: any) => any;
104
+ export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
105
105
  export declare const Toast: (text: string) => void;
106
106
  /**
107
107
  * @title: 添加或移除表单步骤
@@ -111,90 +111,4 @@ export declare const Toast: (text: string) => void;
111
111
  * @Author: WangHan
112
112
  * @Date: 2025-05-06 21:51
113
113
  */
114
- export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => void;
115
- export declare const getCartCurrentResourceData: (cart: any, currentKey: any, resources: any[]) => any;
116
- /**
117
- * @title: 获取购物车资源列表
118
- * @description:
119
- * @return {*}
120
- * @Author: WangHan
121
- * @Date: 2025-05-25 13:56
122
- */
123
- export declare const getMultiResources: (cart: any, resourceItem: any, currentKey: string) => any[];
124
- export declare const getCurrentBoard: (appointmentBooking: any, code: string) => any;
125
- /**
126
- * @title:
127
- * @description: 根据资源code获取资源标题
128
- * @param {any} appointmentBooking
129
- * @param {string} code
130
- * @return {*}
131
- * @Author: WangHan
132
- * @Date: 2025-05-24 18:51
133
- */
134
- export declare const getResourceTitle: (appointmentBooking: any, code: string, utils: any, originResource: any) => string;
135
- /**
136
- * @title: 监测购物车中是否有没有选择资源的
137
- * @description:
138
- * @param {any} carts
139
- * @return {*}
140
- * @Author: WangHan
141
- * @Date: 2025-05-24 18:47
142
- */
143
- export declare const checkAndMarkCartRenderError: (carts: any, appointmentBooking?: any, utils?: any) => {
144
- hasError: boolean;
145
- updatedCartList: any;
146
- };
147
- /**
148
- * @title: 查表表单步骤插入到哪个步骤的后面的key
149
- * @description:
150
- * @param {string} currentKey
151
- * @param {any} stepList
152
- * @return {*}
153
- * @Author: WangHan
154
- * @Date: 2025-05-24 19:05
155
- */
156
- export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[]) => any;
157
- /**
158
- * @title: 监测holder数据
159
- * @description:
160
- * @param {any} isFormSubject
161
- * @param {any} checkAccount
162
- * @param {any} carts
163
- * @return {*}
164
- * @Author: WangHan
165
- * @Date: 2025-05-24 22:46
166
- */
167
- export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
168
- hasError: boolean;
169
- updatedCartList: any[];
170
- };
171
- export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
172
- isRequired: boolean;
173
- isSystem: boolean;
174
- isSkip: boolean;
175
- form_id: number;
176
- form_code: any;
177
- cart_id: string;
178
- resource_form_id: string;
179
- policy_id: string;
180
- } | {
181
- isRequired?: undefined;
182
- isSystem?: undefined;
183
- isSkip?: undefined;
184
- form_id?: undefined;
185
- form_code?: undefined;
186
- cart_id?: undefined;
187
- resource_form_id?: undefined;
188
- policy_id?: undefined;
189
- };
190
- export declare const currentRenderLists: (resources: any[], code: any) => any;
191
- /**
192
- * @title: 更新购物车
193
- * @description:
194
- * @param {any} carts
195
- * @param {any} value
196
- * @return {*}
197
- * @Author: WangHan
198
- * @Date: 2025-05-25 23:17
199
- */
200
- export declare const updateCartResources: (item: any, value: any) => any;
114
+ export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;