@pisell/private-materials 3.2.39 → 3.3.0

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 (574) hide show
  1. package/es/businessModel/SalesModel/index.d.ts +1 -0
  2. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  3. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -127
  4. package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
  5. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  6. package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
  7. package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  8. package/es/components/appointmentBooking/components/Cart/index.js +2 -7
  9. package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  10. package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
  11. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  12. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
  13. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  14. package/es/components/appointmentBooking/components/Content/index.js +76 -9
  15. package/es/components/appointmentBooking/components/Content/index.less +21 -0
  16. package/es/components/appointmentBooking/components/Date/index.js +128 -37
  17. package/es/components/appointmentBooking/components/Date/index.less +1 -1
  18. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  19. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  20. package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
  21. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  22. package/es/components/appointmentBooking/components/Footer/index.js +8 -2
  23. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  24. package/es/components/appointmentBooking/components/Form/index.js +200 -0
  25. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  26. package/es/components/appointmentBooking/components/Guest/index.js +1 -1
  27. package/es/components/appointmentBooking/components/Header/index.js +53 -19
  28. package/es/components/appointmentBooking/components/Resource/index.js +67 -12
  29. package/es/components/appointmentBooking/components/Services/index.js +213 -75
  30. package/es/components/appointmentBooking/components/Services/index.less +0 -14
  31. package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
  32. package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  33. package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
  34. package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
  35. package/es/components/appointmentBooking/context.d.ts +4 -4
  36. package/es/components/appointmentBooking/context.js +42 -33
  37. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  38. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
  39. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  40. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  41. package/es/components/appointmentBooking/deposit/index.js +101 -0
  42. package/es/components/appointmentBooking/deposit/index.less +57 -0
  43. package/es/components/appointmentBooking/hooks.d.ts +29 -1
  44. package/es/components/appointmentBooking/hooks.js +382 -114
  45. package/es/components/appointmentBooking/index.js +9 -4
  46. package/es/components/appointmentBooking/locales.d.ts +51 -3
  47. package/es/components/appointmentBooking/locales.js +58 -4
  48. package/es/components/appointmentBooking/utils.d.ts +66 -1
  49. package/es/components/appointmentBooking/utils.js +226 -33
  50. package/es/components/booking/addons/index.js +10 -6
  51. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  52. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  53. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  54. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  55. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  56. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  57. package/es/components/booking/components/footer/index.js +90 -72
  58. package/es/components/booking/components/footer/utils.d.ts +11 -0
  59. package/es/components/booking/components/footer/utils.js +72 -44
  60. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  61. package/es/components/booking/components/voucher/index.js +22 -6
  62. package/es/components/booking/deposit/index.d.ts +1 -0
  63. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  64. package/es/components/booking/forms/single/index.d.ts +1 -0
  65. package/es/components/booking/forms/table/index.d.ts +1 -0
  66. package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  67. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  68. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  69. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  70. package/es/components/booking/info/date/index.d.ts +1 -0
  71. package/es/components/booking/info/header/index.d.ts +1 -0
  72. package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  73. package/es/components/booking/info/hooks/useAddHolder.js +70 -0
  74. package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  75. package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
  76. package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  77. package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
  78. package/es/components/booking/info/index.js +9 -2
  79. package/es/components/booking/info/main.js +1 -1
  80. package/es/components/booking/info/notes/index.d.ts +1 -0
  81. package/es/components/booking/info/pet/index.js +18 -17
  82. package/es/components/booking/info/service/Lists.d.ts +2 -0
  83. package/es/components/booking/info/service/Lists.js +119 -0
  84. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  85. package/es/components/booking/info/service/addService/index.js +7 -5
  86. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  87. package/es/components/booking/info/service/editService/index.js +7 -5
  88. package/es/components/booking/info/service/index.js +2 -2
  89. package/es/components/booking/info/service/like/index.d.ts +1 -0
  90. package/es/components/booking/info/service/serviceList/index.js +1 -0
  91. package/es/components/booking/info/service/serviceManager/index.js +12 -7
  92. package/es/components/booking/info/service2/Group/utils.js +2 -1
  93. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  94. package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
  95. package/es/components/booking/info/service2/utils.d.ts +6 -5
  96. package/es/components/booking/info/service2/utils.js +356 -88
  97. package/es/components/booking/info/utils.d.ts +2 -0
  98. package/es/components/booking/info/utils.js +45 -1
  99. package/es/components/booking/info2/index.js +9 -6
  100. package/es/components/booking/info2/serve.d.ts +2 -2
  101. package/es/components/booking/info2/serve.js +8 -15
  102. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  103. package/es/components/booking/info2/service/addService/index.js +13 -8
  104. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  105. package/es/components/booking/info2/service/addService/utils.js +49 -14
  106. package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
  107. package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
  108. package/es/components/booking/info2/service/editService/index.js +4 -3
  109. package/es/components/booking/info2/service/index.js +18 -37
  110. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  111. package/es/components/booking/info2/utils.d.ts +4 -0
  112. package/es/components/booking/info2/utils.js +43 -0
  113. package/es/components/booking/info2/utilsByBooking.js +17 -4
  114. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  115. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  116. package/es/components/booking/materiels/holder/index.js +2 -2
  117. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  118. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  119. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  120. package/es/components/booking/notes/addNote/index.js +1 -1
  121. package/es/components/booking/notes/addNote/index.less +3 -0
  122. package/es/components/booking/utils.d.ts +1 -0
  123. package/es/components/booking/utils.js +20 -8
  124. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  125. package/es/components/eftpos/form/index.d.ts +1 -0
  126. package/es/components/eftpos/group/index.d.ts +1 -0
  127. package/es/components/eftpos/hooks.d.ts +1 -0
  128. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  129. package/es/components/eftpos/icon/device.d.ts +1 -0
  130. package/es/components/eftpos/index.d.ts +1 -0
  131. package/es/components/eftpos/pos.d.ts +1 -0
  132. package/es/components/eftpos/receipt/index.d.ts +1 -0
  133. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  134. package/es/components/eftposPay/amount.d.ts +2 -1
  135. package/es/components/eftposPay/app.d.ts +1 -0
  136. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  137. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  138. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  139. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  140. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  141. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  142. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  143. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  144. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  145. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  146. package/es/components/eftposPay/device.d.ts +2 -1
  147. package/es/components/eftposPay/hooks.d.ts +2 -2
  148. package/es/components/eftposPay/index.d.ts +1 -0
  149. package/es/components/eftposPay/pay.d.ts +1 -0
  150. package/es/components/eftposPay/payo/config.d.ts +1 -0
  151. package/es/components/eftposPay/store/index.d.ts +6 -6
  152. package/es/components/eftposPay/tip.d.ts +1 -0
  153. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  154. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  155. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  156. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  157. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  158. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  159. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  160. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  161. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  162. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  163. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  164. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  165. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  166. package/es/components/eventBooking/index.d.ts +1 -0
  167. package/es/components/index.d.ts +2 -1
  168. package/es/components/index.js +2 -1
  169. package/es/components/login/index.d.ts +1 -0
  170. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  171. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  172. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  173. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  174. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  175. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  176. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  177. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  178. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  179. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  180. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  181. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  182. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  183. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  184. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  185. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  186. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  187. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  188. package/es/components/productExtension/index.d.ts +1 -0
  189. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  190. package/es/components/productSelect/components/TabProduct/index.js +176 -0
  191. package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
  192. package/es/components/productSelect/components/gridLayout/index.js +28 -0
  193. package/es/components/productSelect/components/gridLayout/index.less +6 -0
  194. package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
  195. package/es/components/productSelect/components/productGroup/index.js +145 -0
  196. package/es/components/productSelect/components/productGroup/index.less +208 -0
  197. package/es/components/productSelect/hooks/useToken.d.ts +18 -0
  198. package/es/components/productSelect/hooks/useToken.js +35 -0
  199. package/es/components/productSelect/index.d.ts +23 -0
  200. package/es/components/productSelect/index.js +93 -0
  201. package/es/components/productSelect/index.less +69 -0
  202. package/es/components/productSelect/locales.d.ts +18 -0
  203. package/es/components/productSelect/locales.js +17 -0
  204. package/es/components/productSelect/mock.d.ts +134 -0
  205. package/es/components/productSelect/mock.js +202 -0
  206. package/es/components/productSelect/theme/token.d.ts +17 -0
  207. package/es/components/productSelect/theme/token.js +19 -0
  208. package/es/components/ruleSetting/index.d.ts +1 -0
  209. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  210. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  211. package/es/components/schedules/calendar/index.d.ts +1 -0
  212. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  213. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  214. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  215. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  216. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  217. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  218. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  219. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  220. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  221. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  222. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  223. package/es/components/schedules/products/index.d.ts +1 -0
  224. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  225. package/es/components/schedules/products/list/index.d.ts +1 -0
  226. package/es/components/schedules/resources/index.d.ts +1 -0
  227. package/es/components/schedules/resources/list/index.d.ts +1 -0
  228. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  229. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  230. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  231. package/es/components/schedules/schedules/index.d.ts +1 -0
  232. package/es/components/shoppingCart/Provider.d.ts +1 -1
  233. package/es/components/shoppingCart/Provider.js +3 -1
  234. package/es/components/shoppingCart/components/Cart/Product.js +15 -3
  235. package/es/components/shoppingCart/components/Cart/index.less +15 -15
  236. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  237. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  238. package/es/components/shoppingCart/components/Render/index.less +15 -0
  239. package/es/components/shoppingCart/hooks/useAddService.js +7 -1
  240. package/es/components/shoppingCart/index.d.ts +1 -1
  241. package/es/components/shoppingCart/index.js +3 -1
  242. package/es/components/shoppingCart/status.js +4 -1
  243. package/es/components/shoppingCart/type.d.ts +5 -0
  244. package/es/components/subTotal/index.d.ts +22 -0
  245. package/es/components/subTotal/index.js +234 -0
  246. package/es/components/subTotal/index.less +70 -0
  247. package/es/components/subTotal/locales.d.ts +42 -0
  248. package/es/components/subTotal/locales.js +41 -0
  249. package/es/components/taxSelect/index.d.ts +1 -0
  250. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  251. package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
  252. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  253. package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
  254. package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  255. package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  256. package/es/components/ticketBooking/components/menuBar/index.js +54 -0
  257. package/es/components/ticketBooking/components/menuBar/index.less +84 -0
  258. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  259. package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
  260. package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
  261. package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  262. package/es/components/ticketBooking/components/timeBar/index.js +113 -0
  263. package/es/components/ticketBooking/components/timeBar/index.less +22 -0
  264. package/es/components/ticketBooking/data.d.ts +58 -0
  265. package/es/components/ticketBooking/data.js +58 -58
  266. package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  267. package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
  268. package/es/components/ticketBooking/index.d.ts +3 -2
  269. package/es/components/ticketBooking/index.js +139 -5
  270. package/es/components/ticketBooking/index.less +4 -0
  271. package/es/components/ticketBooking/locales.d.ts +144 -0
  272. package/es/components/ticketBooking/locales.js +143 -0
  273. package/es/components/ticketBooking/miniRedux.d.ts +22 -0
  274. package/es/components/ticketBooking/miniRedux.js +105 -0
  275. package/es/components/ticketBooking/serve.d.ts +282 -0
  276. package/es/components/ticketBooking/serve.js +957 -0
  277. package/es/components/ticketBooking/utils/index.d.ts +14 -0
  278. package/es/components/ticketBooking/utils/index.js +102 -0
  279. package/es/components/wallet/components/WalletCard.js +1 -1
  280. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  281. package/es/index.d.ts +3 -0
  282. package/es/index.js +4 -1
  283. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  284. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  285. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -80
  286. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
  287. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  288. package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
  289. package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  290. package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
  291. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  292. package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
  293. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  294. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
  295. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  296. package/lib/components/appointmentBooking/components/Content/index.js +59 -5
  297. package/lib/components/appointmentBooking/components/Content/index.less +21 -0
  298. package/lib/components/appointmentBooking/components/Date/index.js +44 -18
  299. package/lib/components/appointmentBooking/components/Date/index.less +1 -1
  300. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  301. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  302. package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
  303. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  304. package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
  305. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  306. package/lib/components/appointmentBooking/components/Form/index.js +157 -0
  307. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  308. package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
  309. package/lib/components/appointmentBooking/components/Header/index.js +31 -13
  310. package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
  311. package/lib/components/appointmentBooking/components/Services/index.js +86 -63
  312. package/lib/components/appointmentBooking/components/Services/index.less +0 -14
  313. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
  314. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  315. package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
  316. package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
  317. package/lib/components/appointmentBooking/context.d.ts +4 -4
  318. package/lib/components/appointmentBooking/context.js +15 -10
  319. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  320. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
  321. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  322. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  323. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  324. package/lib/components/appointmentBooking/deposit/index.less +57 -0
  325. package/lib/components/appointmentBooking/hooks.d.ts +29 -1
  326. package/lib/components/appointmentBooking/hooks.js +148 -22
  327. package/lib/components/appointmentBooking/index.js +6 -4
  328. package/lib/components/appointmentBooking/locales.d.ts +51 -3
  329. package/lib/components/appointmentBooking/locales.js +52 -4
  330. package/lib/components/appointmentBooking/utils.d.ts +66 -1
  331. package/lib/components/appointmentBooking/utils.js +158 -33
  332. package/lib/components/booking/addons/index.js +9 -5
  333. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  334. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  335. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  336. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  337. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  338. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  339. package/lib/components/booking/components/footer/index.js +94 -32
  340. package/lib/components/booking/components/footer/utils.d.ts +11 -0
  341. package/lib/components/booking/components/footer/utils.js +38 -14
  342. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  343. package/lib/components/booking/components/voucher/index.js +18 -2
  344. package/lib/components/booking/deposit/index.d.ts +1 -0
  345. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  346. package/lib/components/booking/forms/single/index.d.ts +1 -0
  347. package/lib/components/booking/forms/table/index.d.ts +1 -0
  348. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  349. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  350. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  351. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  352. package/lib/components/booking/info/date/index.d.ts +1 -0
  353. package/lib/components/booking/info/header/index.d.ts +1 -0
  354. package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  355. package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
  356. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  357. package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
  358. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  359. package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
  360. package/lib/components/booking/info/index.js +5 -1
  361. package/lib/components/booking/info/main.js +1 -1
  362. package/lib/components/booking/info/notes/index.d.ts +1 -0
  363. package/lib/components/booking/info/pet/index.js +3 -2
  364. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  365. package/lib/components/booking/info/service/Lists.js +106 -0
  366. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  367. package/lib/components/booking/info/service/addService/index.js +6 -4
  368. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  369. package/lib/components/booking/info/service/editService/index.js +5 -3
  370. package/lib/components/booking/info/service/index.js +1 -1
  371. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  372. package/lib/components/booking/info/service/serviceList/index.js +1 -0
  373. package/lib/components/booking/info/service/serviceManager/index.js +6 -1
  374. package/lib/components/booking/info/service2/Group/utils.js +2 -1
  375. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  376. package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
  377. package/lib/components/booking/info/service2/utils.d.ts +6 -5
  378. package/lib/components/booking/info/service2/utils.js +304 -30
  379. package/lib/components/booking/info/utils.d.ts +2 -0
  380. package/lib/components/booking/info/utils.js +40 -1
  381. package/lib/components/booking/info2/index.js +6 -1
  382. package/lib/components/booking/info2/serve.d.ts +2 -2
  383. package/lib/components/booking/info2/serve.js +3 -10
  384. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  385. package/lib/components/booking/info2/service/addService/index.js +11 -6
  386. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  387. package/lib/components/booking/info2/service/addService/utils.js +50 -17
  388. package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
  389. package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
  390. package/lib/components/booking/info2/service/editService/index.js +3 -1
  391. package/lib/components/booking/info2/service/index.js +18 -28
  392. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  393. package/lib/components/booking/info2/utils.d.ts +4 -0
  394. package/lib/components/booking/info2/utils.js +65 -0
  395. package/lib/components/booking/info2/utilsByBooking.js +12 -3
  396. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  397. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  398. package/lib/components/booking/materiels/holder/index.js +2 -2
  399. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  400. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  401. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  402. package/lib/components/booking/notes/addNote/index.js +1 -1
  403. package/lib/components/booking/notes/addNote/index.less +3 -0
  404. package/lib/components/booking/utils.d.ts +1 -0
  405. package/lib/components/booking/utils.js +25 -10
  406. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  407. package/lib/components/eftpos/form/index.d.ts +1 -0
  408. package/lib/components/eftpos/group/index.d.ts +1 -0
  409. package/lib/components/eftpos/hooks.d.ts +1 -0
  410. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  411. package/lib/components/eftpos/icon/device.d.ts +1 -0
  412. package/lib/components/eftpos/index.d.ts +1 -0
  413. package/lib/components/eftpos/pos.d.ts +1 -0
  414. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  415. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  416. package/lib/components/eftposPay/amount.d.ts +2 -1
  417. package/lib/components/eftposPay/app.d.ts +1 -0
  418. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  419. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  420. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  421. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  422. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  423. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  424. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  425. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  426. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  427. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  428. package/lib/components/eftposPay/device.d.ts +2 -1
  429. package/lib/components/eftposPay/hooks.d.ts +2 -2
  430. package/lib/components/eftposPay/index.d.ts +1 -0
  431. package/lib/components/eftposPay/pay.d.ts +1 -0
  432. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  433. package/lib/components/eftposPay/store/index.d.ts +6 -6
  434. package/lib/components/eftposPay/tip.d.ts +1 -0
  435. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  436. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  437. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  438. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  439. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  440. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  441. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  442. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  443. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  444. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  445. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  446. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  447. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  448. package/lib/components/eventBooking/index.d.ts +1 -0
  449. package/lib/components/index.d.ts +2 -1
  450. package/lib/components/index.js +3 -0
  451. package/lib/components/login/index.d.ts +1 -0
  452. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  453. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  454. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  455. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  456. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  457. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  458. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  459. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  460. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  461. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  462. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  463. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  464. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  465. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  466. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  467. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  468. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  469. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  470. package/lib/components/productExtension/index.d.ts +1 -0
  471. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  472. package/lib/components/productSelect/components/TabProduct/index.js +172 -0
  473. package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
  474. package/lib/components/productSelect/components/gridLayout/index.js +58 -0
  475. package/lib/components/productSelect/components/gridLayout/index.less +6 -0
  476. package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
  477. package/lib/components/productSelect/components/productGroup/index.js +122 -0
  478. package/lib/components/productSelect/components/productGroup/index.less +208 -0
  479. package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
  480. package/lib/components/productSelect/hooks/useToken.js +51 -0
  481. package/lib/components/productSelect/index.d.ts +23 -0
  482. package/lib/components/productSelect/index.js +119 -0
  483. package/lib/components/productSelect/index.less +69 -0
  484. package/lib/components/productSelect/locales.d.ts +18 -0
  485. package/lib/components/productSelect/locales.js +41 -0
  486. package/lib/components/productSelect/mock.d.ts +134 -0
  487. package/lib/components/productSelect/mock.js +276 -0
  488. package/lib/components/productSelect/theme/token.d.ts +17 -0
  489. package/lib/components/productSelect/theme/token.js +47 -0
  490. package/lib/components/ruleSetting/index.d.ts +1 -0
  491. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  492. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  493. package/lib/components/schedules/calendar/index.d.ts +1 -0
  494. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  495. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  496. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  497. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  498. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  499. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  500. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  501. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  502. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  503. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  504. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  505. package/lib/components/schedules/products/index.d.ts +1 -0
  506. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  507. package/lib/components/schedules/products/list/index.d.ts +1 -0
  508. package/lib/components/schedules/resources/index.d.ts +1 -0
  509. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  510. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  511. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  512. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  513. package/lib/components/schedules/schedules/index.d.ts +1 -0
  514. package/lib/components/shoppingCart/Provider.d.ts +1 -1
  515. package/lib/components/shoppingCart/Provider.js +3 -1
  516. package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
  517. package/lib/components/shoppingCart/components/Cart/index.less +15 -15
  518. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  519. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  520. package/lib/components/shoppingCart/components/Render/index.less +15 -0
  521. package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
  522. package/lib/components/shoppingCart/index.d.ts +1 -1
  523. package/lib/components/shoppingCart/index.js +2 -0
  524. package/lib/components/shoppingCart/status.js +4 -1
  525. package/lib/components/shoppingCart/type.d.ts +5 -0
  526. package/lib/components/subTotal/index.d.ts +22 -0
  527. package/lib/components/subTotal/index.js +175 -0
  528. package/lib/components/subTotal/index.less +70 -0
  529. package/lib/components/subTotal/locales.d.ts +42 -0
  530. package/lib/components/subTotal/locales.js +65 -0
  531. package/lib/components/taxSelect/index.d.ts +1 -0
  532. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  533. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
  534. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  535. package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
  536. package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  537. package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  538. package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
  539. package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
  540. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  541. package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
  542. package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
  543. package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  544. package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
  545. package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
  546. package/lib/components/ticketBooking/data.d.ts +58 -0
  547. package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  548. package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
  549. package/lib/components/ticketBooking/index.d.ts +3 -2
  550. package/lib/components/ticketBooking/index.js +159 -3
  551. package/lib/components/ticketBooking/index.less +4 -0
  552. package/lib/components/ticketBooking/locales.d.ts +144 -0
  553. package/lib/components/ticketBooking/locales.js +167 -0
  554. package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
  555. package/lib/components/ticketBooking/miniRedux.js +96 -0
  556. package/lib/components/ticketBooking/serve.d.ts +282 -0
  557. package/lib/components/ticketBooking/serve.js +214 -0
  558. package/lib/components/ticketBooking/utils/index.d.ts +14 -0
  559. package/lib/components/ticketBooking/utils/index.js +131 -0
  560. package/lib/components/wallet/components/WalletCard.js +1 -1
  561. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  562. package/lib/index.d.ts +3 -0
  563. package/lib/index.js +9 -0
  564. package/lowcode/appointment-deposit/meta.ts +58 -0
  565. package/lowcode/product-select/meta.ts +217 -0
  566. package/lowcode/sub-total/meta.ts +134 -0
  567. package/lowcode/ticket-booking/meta.ts +29 -0
  568. package/package.json +2 -2
  569. package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  570. package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
  571. package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
  572. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  573. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
  574. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
@@ -8,16 +8,21 @@ import { useAppointmentBooking } from "./hooks";
8
8
  import { formatCurrentUser } from "./utils";
9
9
  import "./index.less";
10
10
  var AppointmentBooking = function AppointmentBooking() {
11
- var _utils$storage;
11
+ var _context$engine;
12
12
  var context = useEngineContext();
13
- var utils = context.appHelper.utils || {};
14
- locales.init(localeTexts, (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en');
13
+ locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
15
14
  var appointmentBooking = useAppointmentBooking();
16
15
  var currentUser = formatCurrentUser();
17
16
  useEffect(function () {
17
+ var _appointmentBooking$o;
18
+ var _ref = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
19
+ bookingSubject = _ref.bookingSubject;
20
+
21
+ // 预约主体是表单则不需要添加账户
22
+ if ((bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.type) === 'form') return;
18
23
  appointmentBooking.getAccounts().then(function (data) {
19
24
  if (!data.length) {
20
- appointmentBooking.addAccount([currentUser]);
25
+ appointmentBooking.addAccounts([currentUser]);
21
26
  }
22
27
  });
23
28
  }, []);
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  'pisell2.event.close.tip': string;
13
13
  'pisell2.event.close.continue': string;
14
14
  'pisell2.event.close.exit': string;
15
- 'pisell2.event.step': (step: number) => string;
15
+ 'pisell2.appointment.step': (step: number) => string;
16
16
  'pisell2.event.select.category': (val: string) => string;
17
17
  'pisell2.event.select.campus': (val: string) => string;
18
18
  'pisell2.event.select.event': string;
@@ -70,6 +70,7 @@ declare const _default: {
70
70
  'pisell2.event.capacity.limit.reached.title': string;
71
71
  'pisell2.event.capacity.limit.reached.tip': string;
72
72
  'pisell2.appointment.booking.empty.service': string;
73
+ 'pisell2.appointment.booking.empty.data': string;
73
74
  'pisell2.appointment.booking.empty.time': string;
74
75
  'pisell2.appointment.service.title': (val: number) => string;
75
76
  'pisell2.appointment.add.guest': string;
@@ -87,6 +88,21 @@ declare const _default: {
87
88
  'pisell2.appointment.sunday': string;
88
89
  'pisell2.appointment.any.professional': string;
89
90
  'pisell2.appointment.for.maximum.availability': string;
91
+ 'pisell2.appointment.deposit': string;
92
+ 'pisell2.appointment.deposit.agreed': string;
93
+ 'pisell2.appointment.deposit.agree.policy': string;
94
+ 'pisell2.appointment.deposit.and': string;
95
+ 'pisell2.appointment.deposit.amount.tip1': string;
96
+ 'pisell2.appointment.deposit.amount.tip2': string;
97
+ 'pisell2.appointment.deposit.close': string;
98
+ 'pisell2.appointment.tips': string;
99
+ 'pisell2.appointment.tips.content': string;
100
+ 'pisell2.appointment.fill-form': string;
101
+ 'pisell2.appointment.select.holder': (val: string) => string;
102
+ 'pisell2.appointment.select.time': string;
103
+ 'pisell2.appointment.unselect.time': string;
104
+ 'pisell2.appointment.unselect.date': string;
105
+ 'pisell2.appointment.add-guests': string;
90
106
  'pisell2.text.apply': string;
91
107
  'pisell2.text.goodpass': string;
92
108
  'pisell2.text.goodpass.product-vouchers': string;
@@ -110,7 +126,7 @@ declare const _default: {
110
126
  'pisell2.event.close.tip': string;
111
127
  'pisell2.event.close.continue': string;
112
128
  'pisell2.event.close.exit': string;
113
- 'pisell2.event.step': (step: number) => string;
129
+ 'pisell2.appointment.step': (step: number) => string;
114
130
  'pisell2.event.select.category': (val: string) => string;
115
131
  'pisell2.event.select.event': string;
116
132
  'pisell2.event.select.campus': (val: string) => string;
@@ -168,6 +184,7 @@ declare const _default: {
168
184
  'pisell2.event.capacity.limit.reached.title': string;
169
185
  'pisell2.event.capacity.limit.reached.tip': string;
170
186
  'pisell2.appointment.booking.empty.service': string;
187
+ 'pisell2.appointment.booking.empty.data': string;
171
188
  'pisell2.appointment.booking.empty.time': string;
172
189
  'pisell2.appointment.service.title': (val: number) => string;
173
190
  'pisell2.appointment.add.guest': string;
@@ -185,6 +202,21 @@ declare const _default: {
185
202
  'pisell2.appointment.sunday': string;
186
203
  'pisell2.appointment.any.professional': string;
187
204
  'pisell2.appointment.for.maximum.availability': string;
205
+ 'pisell2.appointment.deposit': string;
206
+ 'pisell2.appointment.deposit.agreed': string;
207
+ 'pisell2.appointment.deposit.agree.policy': string;
208
+ 'pisell2.appointment.deposit.and': string;
209
+ 'pisell2.appointment.deposit.amount.tip1': string;
210
+ 'pisell2.appointment.deposit.amount.tip2': string;
211
+ 'pisell2.appointment.deposit.close': string;
212
+ 'pisell2.appointment.tips': string;
213
+ 'pisell2.appointment.tips.content': string;
214
+ 'pisell2.appointment.fill-form': string;
215
+ 'pisell2.appointment.select.holder': (val: string) => string;
216
+ 'pisell2.appointment.select.time': string;
217
+ 'pisell2.appointment.unselect.time': string;
218
+ 'pisell2.appointment.unselect.date': string;
219
+ 'pisell2.appointment.add-guests': string;
188
220
  'pisell2.text.apply': string;
189
221
  'pisell2.text.goodpass': string;
190
222
  'pisell2.text.goodpass.product-vouchers': string;
@@ -208,7 +240,7 @@ declare const _default: {
208
240
  'pisell2.event.close.tip': string;
209
241
  'pisell2.event.close.continue': string;
210
242
  'pisell2.event.close.exit': string;
211
- 'pisell2.event.step': (step: number) => string;
243
+ 'pisell2.appointment.step': (step: number) => string;
212
244
  'pisell2.event.select.category': (val: string) => string;
213
245
  'pisell2.event.select.event': string;
214
246
  'pisell2.event.select.campus': (val: string) => string;
@@ -266,6 +298,7 @@ declare const _default: {
266
298
  'pisell2.event.capacity.limit.reached.title': string;
267
299
  'pisell2.event.capacity.limit.reached.tip': string;
268
300
  'pisell2.appointment.booking.empty.service': string;
301
+ 'pisell2.appointment.booking.empty.data': string;
269
302
  'pisell2.appointment.booking.empty.time': string;
270
303
  'pisell2.appointment.service.title': (val: number) => string;
271
304
  'pisell2.appointment.add.guest': string;
@@ -283,6 +316,21 @@ declare const _default: {
283
316
  'pisell2.appointment.sunday': string;
284
317
  'pisell2.appointment.any.professional': string;
285
318
  'pisell2.appointment.for.maximum.availability': string;
319
+ 'pisell2.appointment.deposit': string;
320
+ 'pisell2.appointment.deposit.agreed': string;
321
+ 'pisell2.appointment.deposit.agree.policy': string;
322
+ 'pisell2.appointment.deposit.and': string;
323
+ 'pisell2.appointment.deposit.amount.tip1': string;
324
+ 'pisell2.appointment.deposit.amount.tip2': string;
325
+ 'pisell2.appointment.deposit.close': string;
326
+ 'pisell2.appointment.tips': string;
327
+ 'pisell2.appointment.tips.content': string;
328
+ 'pisell2.appointment.fill-form': string;
329
+ 'pisell2.appointment.select.holder': (val: string) => string;
330
+ 'pisell2.appointment.select.time': string;
331
+ 'pisell2.appointment.unselect.time': string;
332
+ 'pisell2.appointment.unselect.date': string;
333
+ 'pisell2.appointment.add-guests': string;
286
334
  'pisell2.text.apply': string;
287
335
  'pisell2.text.goodpass': string;
288
336
  'pisell2.text.goodpass.product-vouchers': string;
@@ -12,7 +12,7 @@ export default {
12
12
  'pisell2.event.close.tip': "All entered information will be lost. Are you sure you want to exit?",
13
13
  'pisell2.event.close.continue': "Continue",
14
14
  'pisell2.event.close.exit': "Exit",
15
- 'pisell2.event.step': function pisell2EventStep(step) {
15
+ 'pisell2.appointment.step': function pisell2AppointmentStep(step) {
16
16
  return "Step ".concat(step);
17
17
  },
18
18
  'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
@@ -82,6 +82,7 @@ export default {
82
82
  'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
83
83
  'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
84
84
  'pisell2.appointment.booking.empty.service': 'No service',
85
+ 'pisell2.appointment.booking.empty.data': 'No data',
85
86
  'pisell2.appointment.booking.empty.time': 'No time',
86
87
  'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
87
88
  return "".concat(val, " ").concat(val > 1 ? 'services' : 'service');
@@ -99,8 +100,25 @@ export default {
99
100
  'pisell2.appointment.friday': 'Fri',
100
101
  'pisell2.appointment.saturday': 'Sat',
101
102
  'pisell2.appointment.sunday': 'Sun',
102
- 'pisell2.appointment.any.professional': 'Any professional',
103
+ 'pisell2.appointment.any.professional': 'No preference',
103
104
  'pisell2.appointment.for.maximum.availability': 'for maximum availability',
105
+ 'pisell2.appointment.deposit': 'Deposit',
106
+ 'pisell2.appointment.deposit.agreed': 'I have read and agree to the ',
107
+ 'pisell2.appointment.deposit.agree.policy': 'You need to agree the policy to proceed',
108
+ 'pisell2.appointment.deposit.and': ' & ',
109
+ 'pisell2.appointment.deposit.amount.tip1': ' needs to be paid as deposit.',
110
+ 'pisell2.appointment.deposit.amount.tip2': ' ',
111
+ 'pisell2.appointment.deposit.close': 'Close',
112
+ 'pisell2.appointment.tips': 'Tips',
113
+ 'pisell2.appointment.tips.content': "Please carefully review the items in your shopping cart and click the \"Checkout\" button below to proceed with the payment.",
114
+ 'pisell2.appointment.fill-form': 'Enter your details',
115
+ 'pisell2.appointment.select.holder': function pisell2AppointmentSelectHolder(val) {
116
+ return "Please select ".concat(val);
117
+ },
118
+ 'pisell2.appointment.select.time': 'Select time',
119
+ 'pisell2.appointment.unselect.time': 'No times available. Go back',
120
+ 'pisell2.appointment.unselect.date': 'Please select date',
121
+ 'pisell2.appointment.add-guests': 'Add guests',
104
122
  'pisell2.text.apply': 'Apply',
105
123
  'pisell2.text.goodpass': "GoodPass",
106
124
  'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
@@ -124,7 +142,7 @@ export default {
124
142
  'pisell2.event.close.tip': "退出后将丢失所有已填写的信息,确定要退出吗?",
125
143
  'pisell2.event.close.continue': "继续",
126
144
  'pisell2.event.close.exit': "退出",
127
- 'pisell2.event.step': function pisell2EventStep(step) {
145
+ 'pisell2.appointment.step': function pisell2AppointmentStep(step) {
128
146
  return "\u6B65\u9AA4 ".concat(step);
129
147
  },
130
148
  'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
@@ -194,6 +212,7 @@ export default {
194
212
  'pisell2.event.capacity.limit.reached.title': '活动名额已满',
195
213
  'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
196
214
  'pisell2.appointment.booking.empty.service': '暂无服务',
215
+ 'pisell2.appointment.booking.empty.data': '暂无数据',
197
216
  'pisell2.appointment.booking.empty.time': '暂无时间',
198
217
  'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
199
218
  return "".concat(val, "\u4E2A\u670D\u52A1");
@@ -213,6 +232,23 @@ export default {
213
232
  'pisell2.appointment.sunday': '周日',
214
233
  'pisell2.appointment.any.professional': '随机分配',
215
234
  'pisell2.appointment.for.maximum.availability': '立即匹配',
235
+ 'pisell2.appointment.deposit': '定金',
236
+ 'pisell2.appointment.deposit.agreed': '我已阅读并同意 ',
237
+ 'pisell2.appointment.deposit.agree.policy': '您需要同意协议才能继续',
238
+ 'pisell2.appointment.deposit.and': ' 和 ',
239
+ 'pisell2.appointment.deposit.amount.tip1': '请支付 ',
240
+ 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
241
+ 'pisell2.appointment.deposit.close': '关闭',
242
+ 'pisell2.appointment.tips': '提示',
243
+ 'pisell2.appointment.tips.content': "\u8BF7\u4ED4\u7EC6\u67E5\u770B\u8D2D\u7269\u8F66\u4E2D\u7684\u5546\u54C1\uFF0C\u7136\u540E\u70B9\u51FB\u4E0B\u9762\u7684\u201C\u7ED3\u7B97\u201D\u6309\u94AE\u7EE7\u7EED\u4ED8\u6B3E\u3002",
244
+ 'pisell2.appointment.fill-form': '填写信息',
245
+ 'pisell2.appointment.select.holder': function pisell2AppointmentSelectHolder(val) {
246
+ return "\u8BF7\u9009\u62E9".concat(val);
247
+ },
248
+ 'pisell2.appointment.select.time': '选择时间',
249
+ 'pisell2.appointment.unselect.time': '无可用时间,请返回',
250
+ 'pisell2.appointment.unselect.date': '请选择日期',
251
+ 'pisell2.appointment.add-guests': '添加预约人',
216
252
  'pisell2.text.apply': '应用',
217
253
  'pisell2.text.goodpass': "商品券",
218
254
  'pisell2.text.goodpass.product-vouchers': "商品兑换券",
@@ -236,7 +272,7 @@ export default {
236
272
  'pisell2.event.close.tip': "退出後將丟失所有已填寫的信息,確定要退出嗎?",
237
273
  'pisell2.event.close.continue': "繼續",
238
274
  'pisell2.event.close.exit': "退出",
239
- 'pisell2.event.step': function pisell2EventStep(step) {
275
+ 'pisell2.appointment.step': function pisell2AppointmentStep(step) {
240
276
  return "\u6B65\u9A5F ".concat(step);
241
277
  },
242
278
  'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
@@ -306,6 +342,7 @@ export default {
306
342
  'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
307
343
  'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
308
344
  'pisell2.appointment.booking.empty.service': '暫無服務',
345
+ 'pisell2.appointment.booking.empty.data': '暫無數據',
309
346
  'pisell2.appointment.booking.empty.time': '暫無時間',
310
347
  'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
311
348
  return "".concat(val, "\u4E2A\u670D\u52D9");
@@ -325,6 +362,23 @@ export default {
325
362
  'pisell2.appointment.sunday': '周日',
326
363
  'pisell2.appointment.any.professional': '隨機分配',
327
364
  'pisell2.appointment.for.maximum.availability': '立即匹配',
365
+ 'pisell2.appointment.deposit': '定金',
366
+ 'pisell2.appointment.deposit.agreed': '我已閱讀並同意 ',
367
+ 'pisell2.appointment.deposit.agree.policy': '您需要同意協議才能繼續',
368
+ 'pisell2.appointment.deposit.and': ' 和 ',
369
+ 'pisell2.appointment.deposit.amount.tip1': '請支付 ',
370
+ 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
371
+ 'pisell2.appointment.deposit.close': '关闭',
372
+ 'pisell2.appointment.tips': '提示',
373
+ 'pisell2.appointment.tips.content': "\u8ACB\u4ED4\u7D30\u67E5\u770B\u8CFC\u7269\u8ECA\u4E2D\u7684\u5546\u54C1\uFF0C\u7136\u5F8C\u9EDE\u64CA\u4E0B\u9762\u7684\"\u7D50\u7B97\"\u6309\u9215\u7E7C\u7E8C\u4ED8\u6B3E\u3002",
374
+ 'pisell2.appointment.fill-form': '填寫資訊',
375
+ 'pisell2.appointment.select.holder': function pisell2AppointmentSelectHolder(val) {
376
+ return "\u8ACB\u9078\u64C7".concat(val);
377
+ },
378
+ 'pisell2.appointment.select.time': '選擇時間',
379
+ 'pisell2.appointment.unselect.time': '無可用時間,請返回',
380
+ 'pisell2.appointment.unselect.date': '請選擇日期',
381
+ 'pisell2.appointment.add-guests': '添加預約人',
328
382
  'pisell2.text.apply': '應用',
329
383
  'pisell2.text.goodpass': "商品券",
330
384
  'pisell2.text.goodpass.product-vouchers': "商品兌換券",
@@ -45,7 +45,7 @@ export declare const formatMonthDisplay: (dateString: string) => string;
45
45
  export declare const resourceTitle: (data: any) => any;
46
46
  export declare const formatHolder: (data: any[]) => any[];
47
47
  export declare const formatGuest: (data: any[], products: any) => any[];
48
- export declare const formatCarts: (data: any[], resources: any[]) => any[];
48
+ export declare const formatCarts: (data: any[], resources: any[], accountLists?: any) => any[];
49
49
  /**
50
50
  * @title: 对资源进行排序
51
51
  * @description:
@@ -57,6 +57,7 @@ export declare const formatCarts: (data: any[], resources: any[]) => any[];
57
57
  */
58
58
  export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
59
59
  export declare const getMeAccount: (val: any[]) => any;
60
+ export declare const getCustomer: () => any;
60
61
  export declare const formatCustomer: (val: any) => {
61
62
  id: any;
62
63
  username: string;
@@ -84,3 +85,67 @@ export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
84
85
  * @Date: 2025-04-15 21:51
85
86
  */
86
87
  export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
88
+ /**
89
+ * @title: 定金合并的标点符号
90
+ * @description:
91
+ * @return {*}
92
+ * @Author: WangHan
93
+ * @Date: 2025-04-21 17:52
94
+ */
95
+ export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
96
+ /**
97
+ * @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
98
+ * @description:
99
+ * @param {any} array
100
+ * @param {any} resources
101
+ * @return {*}
102
+ * @Author: WangHan
103
+ * @Date: 2025-04-25 19:05
104
+ */
105
+ export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
106
+ export declare const formatForms: (array: any[]) => ({
107
+ form_id: any;
108
+ policy_id: any;
109
+ id: any;
110
+ cart_id: any;
111
+ } | null)[];
112
+ /**
113
+ * @title: 打开表单
114
+ * @description:
115
+ * @param {string} title
116
+ * @param {any} callback
117
+ * @return {*}
118
+ * @Author: WangHan
119
+ * @Date: 2025-04-26 15:26
120
+ */
121
+ export declare const openForm: ({ form_id, title, callback, utils }: any) => void;
122
+ /**
123
+ * @title: 更新数组
124
+ * @description:
125
+ * @return {*}
126
+ * @Author: WangHan
127
+ * @Date: 2025-04-26 18:13
128
+ */
129
+ export declare function updateLists<T extends Record<string, any>>(list: T[], key: string, value: any, newData: Partial<T>): T[];
130
+ /**
131
+ * @title: 检查表单是否有未完成或错误
132
+ * @description:
133
+ * @param {any} formStatus
134
+ * @param {any} formLists
135
+ * @return {*}
136
+ * @Author: WangHan
137
+ * @Date: 2025-04-26 18:52
138
+ */
139
+ export declare function hasFormError(formStatus: any[], formLists: any[]): boolean;
140
+ /**
141
+ * @title: 更新表单存储
142
+ * @description:
143
+ * @param {any} bookingForm
144
+ * @param {number} id
145
+ * @param {any} newData
146
+ * @return {*}
147
+ * @Author: WangHan
148
+ * @Date: 2025-04-27 17:27
149
+ */
150
+ export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
151
+ export declare const Toast: (text: string) => void;
@@ -1,4 +1,8 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2
6
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
@@ -8,7 +12,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
8
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
14
  import dayjs from 'dayjs';
11
- import { getUniqueId } from "@pisell/utils";
15
+ import { getUniqueId, locales } from "@pisell/utils";
16
+ import { PisellToast } from '@pisell/materials';
12
17
  import useEngineContext from "../../hooks/useEngineContext";
13
18
 
14
19
  /**
@@ -132,35 +137,42 @@ export var formatGuest = function formatGuest(data, products) {
132
137
  });
133
138
  });
134
139
  };
135
- export var formatCarts = function formatCarts(data, resources) {
136
- var _utils$storage2;
137
- var context = useEngineContext();
138
- var utils = context.appHelper.utils || {};
139
- var locale = (utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('umi_locale')) || 'en-US';
140
- var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
141
- console.log(data, resources, 'formatCartsformatCarts');
142
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
143
- var _currentResource$reso, _currentResources;
144
- var currentResource = resources.find(function (r) {
145
- return (d === null || d === void 0 ? void 0 : d._id) === (r === null || r === void 0 ? void 0 : r._id);
146
- });
147
- var currentResources = currentResource === null || currentResource === void 0 || (_currentResource$reso = currentResource.resources) === null || _currentResource$reso === void 0 || (_currentResource$reso = _currentResource$reso[0]) === null || _currentResource$reso === void 0 ? void 0 : _currentResource$reso.renderList;
148
- currentResources = (_currentResources = currentResources) === null || _currentResources === void 0 ? void 0 : _currentResources.map(function (d) {
140
+ export var formatCarts = function formatCarts(data, resources, accountLists) {
141
+ try {
142
+ var _utils$storage2;
143
+ var context = useEngineContext();
144
+ var utils = context.appHelper.utils || {};
145
+ var locale = (utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('umi_locale')) || 'en-US';
146
+ var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
147
+ console.log(data, resources, 'wh9786876');
148
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
149
+ var _currentResource$reso, _currentResources, _d$duration;
150
+ var currentResource = resources === null || resources === void 0 ? void 0 : resources.find(function (r) {
151
+ return (d === null || d === void 0 ? void 0 : d._id) === (r === null || r === void 0 ? void 0 : r._id);
152
+ });
153
+ var currentResources = currentResource === null || currentResource === void 0 || (_currentResource$reso = currentResource.resources) === null || _currentResource$reso === void 0 || (_currentResource$reso = _currentResource$reso[0]) === null || _currentResource$reso === void 0 ? void 0 : _currentResource$reso.renderList;
154
+ currentResources = (_currentResources = currentResources) === null || _currentResources === void 0 ? void 0 : _currentResources.map(function (d) {
155
+ return _objectSpread(_objectSpread({}, d), {}, {
156
+ label: (d === null || d === void 0 ? void 0 : d.main_field) || (d === null || d === void 0 ? void 0 : d.id)
157
+ });
158
+ });
149
159
  return _objectSpread(_objectSpread({}, d), {}, {
150
- label: (d === null || d === void 0 ? void 0 : d.main_field) || (d === null || d === void 0 ? void 0 : d.id)
160
+ format: ['HH:mm', 'HH:mm'],
161
+ show_time: true,
162
+ duration_type: (d === null || d === void 0 || (_d$duration = d.duration) === null || _d$duration === void 0 ? void 0 : _d$duration.type) || 'minutes',
163
+ locale: locale,
164
+ symbol: symbol,
165
+ resources: currentResources,
166
+ is_hide_like: true,
167
+ holders: formatHolder(accountLists),
168
+ allowClearHolder: true,
169
+ allowClearResource: true
151
170
  });
152
171
  });
153
- return _objectSpread(_objectSpread({}, d), {}, {
154
- format: ['HH:mm', 'HH:mm'],
155
- show_time: true,
156
- duration_type: d.duration.type,
157
- locale: locale,
158
- symbol: symbol,
159
- resources: currentResources,
160
- is_hide_like: true,
161
- holder_title: ''
162
- });
163
- });
172
+ } catch (error) {
173
+ console.log(error, 'formatCarts');
174
+ return [];
175
+ }
164
176
  };
165
177
 
166
178
  /**
@@ -206,6 +218,15 @@ export var getMeAccount = function getMeAccount(val) {
206
218
  return !(d !== null && d !== void 0 && d.isGuest);
207
219
  });
208
220
  };
221
+ export var getCustomer = function getCustomer() {
222
+ var _utils$getStore$getSt, _userInfo;
223
+ var context = useEngineContext();
224
+ var utils = context.appHelper.utils || {};
225
+ var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
226
+ var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
227
+ userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
228
+ return userInfo;
229
+ };
209
230
  export var formatCustomer = function formatCustomer(val) {
210
231
  var currentUserName = "".concat((val === null || val === void 0 ? void 0 : val.first_name) || '').concat(val !== null && val !== void 0 && val.last_name ? " ".concat(val === null || val === void 0 ? void 0 : val.last_name) : '');
211
232
  currentUserName = currentUserName || (val === null || val === void 0 ? void 0 : val.nickname) || 'Me';
@@ -215,12 +236,7 @@ export var formatCustomer = function formatCustomer(val) {
215
236
  };
216
237
  };
217
238
  export var formatCurrentUser = function formatCurrentUser() {
218
- var _utils$getStore$getSt, _userInfo;
219
- var context = useEngineContext();
220
- var utils = context.appHelper.utils || {};
221
- var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
222
- var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
223
- userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
239
+ var userInfo = getCustomer();
224
240
  var customer = formatCustomer(userInfo);
225
241
  return customer;
226
242
  };
@@ -280,4 +296,181 @@ export var isEmptyCartsResourceId = function isEmptyCartsResourceId(carts) {
280
296
  });
281
297
  console.log(isEmptyResourceId, 'isEmptyResourceId');
282
298
  return isEmptyResourceId;
299
+ };
300
+
301
+ /**
302
+ * @title: 定金合并的标点符号
303
+ * @description:
304
+ * @return {*}
305
+ * @Author: WangHan
306
+ * @Date: 2025-04-21 17:52
307
+ */
308
+ export var getPunctuationMark = function getPunctuationMark(index, totalLength, isEn) {
309
+ var isLastItem = index === totalLength - 1;
310
+ var isSecondLastItem = index === totalLength - 2;
311
+ if (isLastItem) {
312
+ return isEn ? '.' : '。';
313
+ }
314
+ if (isSecondLastItem) {
315
+ return locales.getText('pisell2.appointment.deposit.and');
316
+ }
317
+ return isEn ? ', ' : '、';
318
+ };
319
+
320
+ /**
321
+ * @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
322
+ * @description:
323
+ * @param {any} array
324
+ * @param {any} resources
325
+ * @return {*}
326
+ * @Author: WangHan
327
+ * @Date: 2025-04-25 19:05
328
+ */
329
+ export var hasResourceFormId = function hasResourceFormId(array) {
330
+ try {
331
+ if (!(array !== null && array !== void 0 && array.length)) {
332
+ return false;
333
+ }
334
+
335
+ // 检查数组中的任何一个 resource_id 是否满足条件
336
+ return array.some(function (item) {
337
+ var _item$resources;
338
+ // 获取当前项的 resource_id
339
+ var resourceId = item.resource_id;
340
+
341
+ // 在 resources 中查找匹配的项
342
+ var foundResource = item === null || item === void 0 || (_item$resources = item.resources) === null || _item$resources === void 0 ? void 0 : _item$resources.find(function (resource) {
343
+ return resource.id === resourceId;
344
+ });
345
+ console.log(foundResource, item, 'foundResource');
346
+ // 如果找到匹配项并且其 resource_form_id 存在且有值
347
+ return foundResource && foundResource.resource_form_id;
348
+ });
349
+ } catch (error) {
350
+ console.log(error, 'hasResourceFormId');
351
+ }
352
+ };
353
+ export var formatForms = function formatForms(array) {
354
+ try {
355
+ if (!(array !== null && array !== void 0 && array.length)) {
356
+ return [];
357
+ }
358
+ var mappedResources = array.map(function (item) {
359
+ var _item$resources2;
360
+ // 在 resources 中查找匹配的项
361
+ var foundResource = item === null || item === void 0 || (_item$resources2 = item.resources) === null || _item$resources2 === void 0 ? void 0 : _item$resources2.find(function (resource) {
362
+ return resource.id === item.resource_id;
363
+ });
364
+ if (foundResource && (foundResource !== null && foundResource !== void 0 && foundResource.resource_form_id || foundResource !== null && foundResource !== void 0 && foundResource.policy_id)) {
365
+ return {
366
+ form_id: foundResource.resource_form_id,
367
+ policy_id: foundResource.policy_id,
368
+ id: foundResource === null || foundResource === void 0 ? void 0 : foundResource.id,
369
+ cart_id: item === null || item === void 0 ? void 0 : item._id
370
+ };
371
+ }
372
+ return null;
373
+ }).filter(Boolean);
374
+ return mappedResources;
375
+ } catch (error) {
376
+ console.log(error, 'hasResourceFormId');
377
+ return [];
378
+ }
379
+ };
380
+
381
+ /**
382
+ * @title: 打开表单
383
+ * @description:
384
+ * @param {string} title
385
+ * @param {any} callback
386
+ * @return {*}
387
+ * @Author: WangHan
388
+ * @Date: 2025-04-26 15:26
389
+ */
390
+ export var openForm = function openForm(_ref) {
391
+ var form_id = _ref.form_id,
392
+ title = _ref.title,
393
+ callback = _ref.callback,
394
+ utils = _ref.utils;
395
+ utils.action({
396
+ type: 'pisell1.form',
397
+ data: {
398
+ form_id: form_id,
399
+ form_title: title,
400
+ isV2API: true
401
+ },
402
+ callback: callback
403
+ });
404
+ };
405
+
406
+ /**
407
+ * @title: 更新数组
408
+ * @description:
409
+ * @return {*}
410
+ * @Author: WangHan
411
+ * @Date: 2025-04-26 18:13
412
+ */
413
+ export function updateLists(list, key, value, newData) {
414
+ var idx = list.findIndex(function (item) {
415
+ return item[key] === value;
416
+ });
417
+ if (idx > -1) {
418
+ // 存在则合并更新
419
+ var updated = _objectSpread(_objectSpread({}, list[idx]), newData);
420
+ var newList = _toConsumableArray(list);
421
+ newList[idx] = updated;
422
+ return newList;
423
+ } else {
424
+ // 不存在则添加
425
+ return [].concat(_toConsumableArray(list), [_objectSpread(_objectSpread({}, newData), {}, _defineProperty({}, key, value))]);
426
+ }
427
+ }
428
+
429
+ /**
430
+ * @title: 检查表单是否有未完成或错误
431
+ * @description:
432
+ * @param {any} formStatus
433
+ * @param {any} formLists
434
+ * @return {*}
435
+ * @Author: WangHan
436
+ * @Date: 2025-04-26 18:52
437
+ */
438
+ export function hasFormError(formStatus, formLists) {
439
+ if (formStatus.length !== formLists.length) return true;
440
+ return formStatus.some(function (item) {
441
+ return item.status === 'error';
442
+ });
443
+ }
444
+
445
+ /**
446
+ * @title: 更新表单存储
447
+ * @description:
448
+ * @param {any} bookingForm
449
+ * @param {number} id
450
+ * @param {any} newData
451
+ * @return {*}
452
+ * @Author: WangHan
453
+ * @Date: 2025-04-27 17:27
454
+ */
455
+ export var updateBookingFormStorage = function updateBookingFormStorage(bookingForm, id, newData) {
456
+ // 浅拷贝,避免直接修改原对象
457
+ var newBookingForm = _objectSpread({}, bookingForm);
458
+ if (newBookingForm[id]) {
459
+ // 已存在,合并更新
460
+ newBookingForm[id] = _objectSpread(_objectSpread({}, newBookingForm[id]), newData);
461
+ } else {
462
+ // 不存在,直接添加
463
+ newBookingForm[id] = _objectSpread({}, newData);
464
+ }
465
+ return newBookingForm;
466
+ };
467
+ export var Toast = function Toast(text) {
468
+ try {
469
+ PisellToast({
470
+ content: text
471
+ });
472
+ } catch (error) {
473
+ var _window;
474
+ (_window = window) === null || _window === void 0 || _window.alert(text);
475
+ }
283
476
  };