@pisell/private-materials 6.2.18 → 6.2.20

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 (426) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.js +2 -2
  8. package/build/lowcode/view.js +8 -8
  9. package/es/businessModel/SalesModel/index.d.ts +1 -0
  10. package/es/components/Sales/Checkout/utils.d.ts +1 -0
  11. package/es/components/Sales/Checkout/utils.js +3 -2
  12. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  14. package/es/components/booking/addons/model.d.ts +1 -10
  15. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  16. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  17. package/es/components/booking/components/browserSelect/index.js +1 -1
  18. package/es/components/booking/components/customSelect/index.js +1 -0
  19. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  20. package/es/components/booking/editBookingModal/index.js +29 -58
  21. package/es/components/booking/editBookingModal/serve.d.ts +0 -1
  22. package/es/components/booking/editBookingModal/serve.js +11 -19
  23. package/es/components/booking/forms/model.d.ts +1 -10
  24. package/es/components/booking/forms/model.js +5 -5
  25. package/es/components/booking/forms/table/index.d.ts +1 -0
  26. package/es/components/booking/hooks/useClearCart.js +11 -8
  27. package/es/components/booking/info/client/index.js +3 -2
  28. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  29. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  30. package/es/components/booking/info/hooks/useInfoHolder.js +16 -9
  31. package/es/components/booking/info/model.d.ts +1 -10
  32. package/es/components/booking/info/service/Lists.js +36 -26
  33. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  34. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  35. package/es/components/booking/info/service/editService/constants.d.ts +1 -0
  36. package/es/components/booking/info/service/editService/constants.js +3 -0
  37. package/es/components/booking/info/service/editService/index.js +15 -10
  38. package/es/components/booking/info/service/like/index.d.ts +1 -0
  39. package/es/components/booking/info/service/like/index.js +1 -1
  40. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  41. package/es/components/booking/info/service2/utils.js +20 -21
  42. package/es/components/booking/info/utils.js +1 -1
  43. package/es/components/booking/info2/index.js +1 -0
  44. package/es/components/booking/info2/service/addService/utils.js +7 -4
  45. package/es/components/booking/info2/service/addTimeModal/index.js +3 -0
  46. package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
  47. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  48. package/es/components/booking/info2/service/editService/index.js +264 -168
  49. package/es/components/booking/info2/service/index.js +19 -15
  50. package/es/components/booking/materiels/duration/index.js +9 -2
  51. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  52. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  53. package/es/components/booking/materiels/startTime/index.js +1 -1
  54. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  55. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  56. package/es/components/booking/notes/model.d.ts +1 -10
  57. package/es/components/booking/notes/model.js +5 -5
  58. package/es/components/booking/payments/model.d.ts +1 -10
  59. package/es/components/booking/payments/model.js +5 -5
  60. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  61. package/es/components/eftpos/form/index.d.ts +1 -0
  62. package/es/components/eftpos/group/index.d.ts +1 -0
  63. package/es/components/eftpos/hooks.d.ts +1 -0
  64. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  65. package/es/components/eftpos/icon/device.d.ts +1 -0
  66. package/es/components/eftpos/receipt/index.d.ts +1 -0
  67. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  68. package/es/components/eftposPay/app.d.ts +1 -0
  69. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  70. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  71. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  72. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  73. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  74. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  75. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  78. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  79. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  80. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  81. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  82. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  83. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  84. package/es/components/listComponent/index.js +5 -5
  85. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  86. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  87. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  88. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  89. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  90. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  92. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  93. package/es/components/pay/toC/model.d.ts +1 -9
  94. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  95. package/es/components/productExtension/card/index.js +3 -3
  96. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  97. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  98. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  99. package/es/components/productExtension/fields/Forms/index.js +12 -12
  100. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  101. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  102. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  103. package/es/components/productExtension/server.js +2 -2
  104. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  105. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  106. package/es/components/schedules/calendar/index.js +4 -4
  107. package/es/components/schedules/calendar/serve.js +2 -2
  108. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  109. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  110. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  111. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  112. package/es/components/schedules/components/ResourceList/index.js +1 -1
  113. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  114. package/es/components/schedules/components/Search/index.js +5 -5
  115. package/es/components/schedules/model.d.ts +1 -9
  116. package/es/components/schedules/model.js +5 -5
  117. package/es/components/schedules/openHours/index.js +1 -1
  118. package/es/components/schedules/openHours/serve.js +2 -2
  119. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  120. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  121. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  122. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  123. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  124. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  125. package/es/components/schedules/products/index.d.ts +1 -0
  126. package/es/components/schedules/products/serve.js +2 -2
  127. package/es/components/schedules/products/utils.js +5 -5
  128. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  129. package/es/components/schedules/resources/detail/index.js +10 -10
  130. package/es/components/schedules/resources/list/index.js +2 -2
  131. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  132. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  133. package/es/components/schedules/resources/serve.js +2 -2
  134. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  135. package/es/components/schedules/utils.js +4 -4
  136. package/es/components/selectModal/index.js +2 -2
  137. package/es/components/shoppingCart/components/Cart/Product.js +48 -41
  138. package/es/components/shoppingCart/components/Cart/index.js +21 -18
  139. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  140. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  141. package/es/components/ticketBooking/components/addServiceVariant/addService.js +177 -157
  142. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  143. package/es/components/ticketBooking/components/timeBar/index.js +78 -71
  144. package/es/components/wallet/Detail/model.d.ts +1 -13
  145. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  146. package/es/components/wallet/PointCard/model.d.ts +1 -13
  147. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  148. package/es/components/wallet/Voucher/model.d.ts +1 -13
  149. package/es/components/wallet/model.d.ts +1 -9
  150. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  151. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  152. package/es/hooks/useComponents.js +1 -1
  153. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  154. package/lib/components/Sales/Checkout/utils.d.ts +1 -0
  155. package/lib/components/Sales/Checkout/utils.js +3 -2
  156. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  157. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  158. package/lib/components/booking/addons/model.d.ts +1 -10
  159. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  160. package/lib/components/booking/components/customSelect/index.js +1 -0
  161. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  162. package/lib/components/booking/editBookingModal/index.js +21 -56
  163. package/lib/components/booking/editBookingModal/serve.d.ts +0 -1
  164. package/lib/components/booking/editBookingModal/serve.js +6 -12
  165. package/lib/components/booking/forms/model.d.ts +1 -10
  166. package/lib/components/booking/forms/table/index.d.ts +1 -0
  167. package/lib/components/booking/hooks/useClearCart.js +16 -13
  168. package/lib/components/booking/info/client/index.js +5 -4
  169. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  170. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  171. package/lib/components/booking/info/hooks/useInfoHolder.js +10 -9
  172. package/lib/components/booking/info/model.d.ts +1 -10
  173. package/lib/components/booking/info/service/Lists.js +35 -23
  174. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  175. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  176. package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
  177. package/lib/components/booking/info/service/editService/constants.js +31 -0
  178. package/lib/components/booking/info/service/editService/index.js +7 -1
  179. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  180. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  181. package/lib/components/booking/info/service2/utils.js +17 -17
  182. package/lib/components/booking/info/utils.js +2 -1
  183. package/lib/components/booking/info2/service/addService/utils.js +5 -3
  184. package/lib/components/booking/info2/service/addTimeModal/index.js +3 -0
  185. package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
  186. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  187. package/lib/components/booking/info2/service/editService/index.js +137 -72
  188. package/lib/components/booking/info2/service/index.js +13 -9
  189. package/lib/components/booking/materiels/duration/index.js +7 -2
  190. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  191. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  192. package/lib/components/booking/notes/model.d.ts +1 -10
  193. package/lib/components/booking/payments/model.d.ts +1 -10
  194. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  195. package/lib/components/eftpos/form/index.d.ts +1 -0
  196. package/lib/components/eftpos/group/index.d.ts +1 -0
  197. package/lib/components/eftpos/hooks.d.ts +1 -0
  198. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  199. package/lib/components/eftpos/icon/device.d.ts +1 -0
  200. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  201. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  202. package/lib/components/eftposPay/app.d.ts +1 -0
  203. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  204. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  205. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  206. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  207. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  208. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  209. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  210. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  211. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  212. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  213. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  214. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  215. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  216. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  217. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  218. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  219. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  220. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  221. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  222. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  223. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  224. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  225. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  226. package/lib/components/pay/toC/model.d.ts +1 -9
  227. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  228. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  229. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  230. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  231. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  232. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  233. package/lib/components/schedules/model.d.ts +1 -9
  234. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  235. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  236. package/lib/components/schedules/products/index.d.ts +1 -0
  237. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  238. package/lib/components/schedules/utils.js +1 -1
  239. package/lib/components/shoppingCart/components/Cart/Product.js +31 -21
  240. package/lib/components/shoppingCart/components/Cart/index.js +18 -15
  241. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  242. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  243. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +145 -127
  244. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  245. package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
  246. package/lib/components/wallet/Detail/model.d.ts +1 -13
  247. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  248. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  249. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  250. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  251. package/lib/components/wallet/model.d.ts +1 -9
  252. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  253. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  254. package/package.json +3 -3
  255. package/es/components/Sales/Cart/utils.d.ts +0 -63
  256. package/es/components/Sales/Checkout/index.d.ts +0 -37
  257. package/es/components/Sales/Checkout/serve.d.ts +0 -15
  258. package/es/components/Sales/Customer/index.d.ts +0 -25
  259. package/es/components/Sales/Event/Detail.d.ts +0 -30
  260. package/es/components/Sales/Event/serve.d.ts +0 -49
  261. package/es/components/Sales/Summary/index.d.ts +0 -35
  262. package/es/components/Sales/Summary/serve.d.ts +0 -1
  263. package/es/components/Sales/Summary/utils.d.ts +0 -51
  264. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  265. package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  266. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
  267. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -9
  268. package/es/components/appointmentBooking/components/Form/index.d.ts +0 -4
  269. package/es/components/appointmentBooking/components/Form/utils.d.ts +0 -8
  270. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
  271. package/es/components/appointmentBooking/components/Resource/index.d.ts +0 -7
  272. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  273. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  274. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  275. package/es/components/appointmentBooking/deposit/index.d.ts +0 -3
  276. package/es/components/appointmentBooking/hooks.d.ts +0 -106
  277. package/es/components/appointmentBooking/index.d.ts +0 -3
  278. package/es/components/booking/components/customSelect/index.d.ts +0 -38
  279. package/es/components/booking/components/footer/index.d.ts +0 -11
  280. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  281. package/es/components/booking/components/voucher/index.d.ts +0 -3
  282. package/es/components/booking/hooks/useClearCart.d.ts +0 -2
  283. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  284. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -6
  285. package/es/components/booking/info/client/index.d.ts +0 -4
  286. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -9
  287. package/es/components/booking/info/index.d.ts +0 -3
  288. package/es/components/booking/info/service/Lists.d.ts +0 -2
  289. package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
  290. package/es/components/booking/info/service2/utils.d.ts +0 -247
  291. package/es/components/booking/info2/index.d.ts +0 -12
  292. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  293. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  294. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  295. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  296. package/es/components/booking/info2/service/index.d.ts +0 -4
  297. package/es/components/booking/info2/utils.d.ts +0 -4
  298. package/es/components/booking/info2/utilsByBooking.d.ts +0 -35
  299. package/es/components/booking/locales.d.ts +0 -828
  300. package/es/components/booking/materiels/duration/index.d.ts +0 -13
  301. package/es/components/booking/model.d.ts +0 -116
  302. package/es/components/eftposPay/const.d.ts +0 -184
  303. package/es/components/eftposPay/hooks.d.ts +0 -35
  304. package/es/components/eftposPay/index.d.ts +0 -4
  305. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  306. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  307. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  308. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  309. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  310. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  311. package/es/components/eftposPay/manufacturer.d.ts +0 -7
  312. package/es/components/eftposPay/pay.d.ts +0 -20
  313. package/es/components/eftposPay/store/index.d.ts +0 -355
  314. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  315. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
  316. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  317. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
  318. package/es/components/eventBooking/index.d.ts +0 -3
  319. package/es/components/eventBooking/locales.d.ts +0 -246
  320. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  321. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -3
  322. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
  323. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  324. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  325. package/es/components/pay/toC/index.d.ts +0 -3
  326. package/es/components/pay/toC/locales.d.ts +0 -289
  327. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
  328. package/es/components/productSelect/index.d.ts +0 -26
  329. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -3
  330. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -3
  331. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  332. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  333. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  334. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  335. package/es/components/ticketBooking/index.d.ts +0 -7
  336. package/es/components/ticketBooking/locales.d.ts +0 -174
  337. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  338. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  339. package/es/components/walletList/index.d.ts +0 -28
  340. package/es/utils/index.d.ts +0 -23
  341. package/lib/components/Sales/Cart/utils.d.ts +0 -63
  342. package/lib/components/Sales/Checkout/index.d.ts +0 -37
  343. package/lib/components/Sales/Checkout/serve.d.ts +0 -15
  344. package/lib/components/Sales/Customer/index.d.ts +0 -25
  345. package/lib/components/Sales/Event/Detail.d.ts +0 -30
  346. package/lib/components/Sales/Event/serve.d.ts +0 -49
  347. package/lib/components/Sales/Summary/index.d.ts +0 -35
  348. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  349. package/lib/components/Sales/Summary/utils.d.ts +0 -51
  350. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  351. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  352. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
  353. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -9
  354. package/lib/components/appointmentBooking/components/Form/index.d.ts +0 -4
  355. package/lib/components/appointmentBooking/components/Form/utils.d.ts +0 -8
  356. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
  357. package/lib/components/appointmentBooking/components/Resource/index.d.ts +0 -7
  358. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  359. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  360. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  361. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -3
  362. package/lib/components/appointmentBooking/hooks.d.ts +0 -106
  363. package/lib/components/appointmentBooking/index.d.ts +0 -3
  364. package/lib/components/booking/components/customSelect/index.d.ts +0 -38
  365. package/lib/components/booking/components/footer/index.d.ts +0 -11
  366. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  367. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  368. package/lib/components/booking/hooks/useClearCart.d.ts +0 -2
  369. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  370. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -6
  371. package/lib/components/booking/info/client/index.d.ts +0 -4
  372. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -9
  373. package/lib/components/booking/info/index.d.ts +0 -3
  374. package/lib/components/booking/info/service/Lists.d.ts +0 -2
  375. package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
  376. package/lib/components/booking/info/service2/utils.d.ts +0 -247
  377. package/lib/components/booking/info2/index.d.ts +0 -12
  378. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  379. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  380. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  381. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  382. package/lib/components/booking/info2/service/index.d.ts +0 -4
  383. package/lib/components/booking/info2/utils.d.ts +0 -4
  384. package/lib/components/booking/info2/utilsByBooking.d.ts +0 -35
  385. package/lib/components/booking/locales.d.ts +0 -828
  386. package/lib/components/booking/materiels/duration/index.d.ts +0 -13
  387. package/lib/components/booking/model.d.ts +0 -116
  388. package/lib/components/eftposPay/const.d.ts +0 -184
  389. package/lib/components/eftposPay/hooks.d.ts +0 -35
  390. package/lib/components/eftposPay/index.d.ts +0 -4
  391. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  392. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  393. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  394. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  395. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  396. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  397. package/lib/components/eftposPay/manufacturer.d.ts +0 -7
  398. package/lib/components/eftposPay/pay.d.ts +0 -20
  399. package/lib/components/eftposPay/store/index.d.ts +0 -355
  400. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  401. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
  402. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  403. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
  404. package/lib/components/eventBooking/index.d.ts +0 -3
  405. package/lib/components/eventBooking/locales.d.ts +0 -246
  406. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  407. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -3
  408. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
  409. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  410. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  411. package/lib/components/pay/toC/index.d.ts +0 -3
  412. package/lib/components/pay/toC/locales.d.ts +0 -289
  413. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
  414. package/lib/components/productSelect/index.d.ts +0 -26
  415. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -3
  416. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -3
  417. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  418. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  419. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  420. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  421. package/lib/components/ticketBooking/index.d.ts +0 -7
  422. package/lib/components/ticketBooking/locales.d.ts +0 -174
  423. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  424. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  425. package/lib/components/walletList/index.d.ts +0 -28
  426. package/lib/utils/index.d.ts +0 -23
@@ -15,7 +15,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
15
15
  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; }
16
16
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
- import React, { useContext, useEffect, useMemo, useImperativeHandle, forwardRef, useRef } from 'react';
18
+ import React, { useContext, useEffect, useMemo, useState, useImperativeHandle, forwardRef, useRef } from 'react';
19
19
  import Delete_wght300_24px from '@pisell/icon/es/Delete_wght300_24px';
20
20
  import Drawer from "../../../components/drawer";
21
21
  import { Context } from "../../../info/model";
@@ -27,7 +27,7 @@ import { Input, Button, Row, Col, Form, InputNumber } from 'antd';
27
27
  import "./index.less";
28
28
  import CollapsibleList from "../../../components/collapsibleList";
29
29
  import { renderBundles } from "../../../components/collapsibleList/utils";
30
- import { useUpdateEffect, useMemoizedFn } from 'ahooks';
30
+ import { useUpdateEffect, useMemoizedFn, useDebounceFn } from 'ahooks';
31
31
  // import SelectTime from "../../../../../../../materials/src/components/select-time";
32
32
  import { getServiceTimes, deleteCacheParams, getProductTotalPrice, isSessionProduct } from "../../../utils";
33
33
  import { getErrorList } from "../../utilsByBooking";
@@ -38,7 +38,7 @@ import { isNormalProductByDurationSchedule } from "../../../info/service2/utils"
38
38
  import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
39
39
  var submitLock = false;
40
40
  var Info = function Info(_, ref) {
41
- var _state$service3, _state$bookingConfig2, _state$service$cacheI4, _state$service$cacheI5, _state$service6, _state$service8, _window$BaseMaterials, _state$service$cacheI6, _state$service9, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$bookingConfig3, _state$service$resour;
41
+ var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI4, _state$service$cacheI5, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI10, _state$bookingConfig5, _state$service$cacheI11, _state$service$cacheI12, _state$service9, _state$service$resour2, _state$service$cacheI13, _state$service$cacheI14;
42
42
  var _Form$useForm = Form.useForm(),
43
43
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
44
44
  form = _Form$useForm2[0];
@@ -52,19 +52,22 @@ var Info = function Info(_, ref) {
52
52
  var resourcesRef = useRef(null);
53
53
  var isChangeTotal = useRef(false);
54
54
  var isNormalProduct = useMemo(function () {
55
- var _state$service, _state$service2;
56
- return (state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.cacheItem) && isNormalProductByDurationSchedule(state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.cacheItem);
57
- }, [state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.cacheItem]);
55
+ var _state$service, _state$service2, _state$service3;
56
+ if (!(state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && _state$service.cacheItem)) {
57
+ return true;
58
+ }
59
+ return (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.cacheItem) && isNormalProductByDurationSchedule(state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.cacheItem);
60
+ }, [state === null || state === void 0 || (_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.cacheItem]);
58
61
 
59
62
  // 当前商品信息+ 表单信息
60
- var getCurrentCacheItem = function getCurrentCacheItem(_cacheItem) {
63
+ var getCurrentCacheItem = useMemoizedFn(function (_cacheItem) {
61
64
  // 获取当前表单数据
62
65
  var values = form.getFieldsValue();
63
66
  var _item = _cacheItem || state.service.cacheItem;
64
67
  return _objectSpread(_objectSpread({}, _item), {}, {
65
68
  _extend: _objectSpread(_objectSpread({}, _item === null || _item === void 0 ? void 0 : _item._extend), values)
66
69
  });
67
- };
70
+ });
68
71
 
69
72
  /**
70
73
  * @title: 当前的资源
@@ -78,7 +81,7 @@ var Info = function Info(_, ref) {
78
81
  // let item =
79
82
  // resources.find((d: any) => d.form_record_id == useResource) || {};
80
83
  return null;
81
- }, [useResource]);
84
+ }, []);
82
85
 
83
86
  /**
84
87
  * @title: 持续时长组件的props
@@ -91,13 +94,16 @@ var Info = function Info(_, ref) {
91
94
  var durationProps = useMemo(function () {
92
95
  var _state$bookingConfig;
93
96
  var _cacheItem = getCurrentCacheItem();
94
- return getDurationProps({
97
+ var val = getDurationProps({
95
98
  cacheItem: _cacheItem,
96
99
  useStartTime: useStartTime,
97
- currentResource: currentResource,
100
+ // currentResource,
98
101
  slice: (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.service_time
99
102
  });
100
- }, [currentResource, state.service.cacheItem, useStartTime, useResource, (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.service_time]);
103
+ return val;
104
+ }, [
105
+ // currentResource,
106
+ state.service.cacheItem, useStartTime, useResource, (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.service_time]);
101
107
 
102
108
  /**
103
109
  * @title: 灵活时长选项
@@ -108,9 +114,10 @@ var Info = function Info(_, ref) {
108
114
  * @Date: 2024-02-23 10:10
109
115
  */
110
116
  var flexibleOption = useMemo(function () {
111
- return getFlexibleOption({
117
+ var op = getFlexibleOption({
112
118
  durationProps: durationProps
113
119
  });
120
+ return op;
114
121
  }, [durationProps, locales.locale]);
115
122
 
116
123
  /**
@@ -121,14 +128,16 @@ var Info = function Info(_, ref) {
121
128
  * @Date: 2024-01-09 13:37
122
129
  */
123
130
  var timeObj = useMemo(function () {
124
- return getTimeObj({
131
+ var val = getTimeObj({
125
132
  durationProps: durationProps,
126
133
  useStartTime: useStartTime,
127
134
  currentResource: currentResource,
128
135
  state: state,
129
136
  useDuration: useDuration
130
137
  });
131
- }, [durationProps, useStartTime, currentResource, state, useDuration]);
138
+ return val;
139
+ }, [durationProps, useStartTime, currentResource, (_state$bookingConfig3 = state.bookingConfig) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.config) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.basic) === null || _state$bookingConfig3 === void 0 ? void 0 : _state$bookingConfig3.service_time, useDuration]);
140
+
132
141
  // 由于灵活时长的结束时间随时变动, 这里发现如果当前选择的值没有在列表内,则选择最新的灵活时长值
133
142
  useEffect(function () {
134
143
  try {
@@ -280,12 +289,51 @@ var Info = function Info(_, ref) {
280
289
  }
281
290
  });
282
291
  };
292
+ var _useDebounceFn = useDebounceFn(function () {
293
+ setEditData.apply(void 0, arguments);
294
+ }, {
295
+ wait: 50,
296
+ leading: true,
297
+ trailing: false
298
+ }),
299
+ setEditDataRun = _useDebounceFn.run;
283
300
  var setEditData = useMemoizedFn(function (_cacheItem, open, openProductDetail) {
284
- form.resetFields();
301
+ console.timeEnd('handleChange');
302
+ console.log('setEditDatasetEditData', _cacheItem, open);
285
303
  isChangeTotal.current = false;
286
304
  var cacheItem = _cacheItem || state.service.cacheItem;
287
305
  var values = cacheItem._extend;
306
+ var startTime = performance.now();
307
+ console.log(startTime, 'startTime');
308
+ form.resetFields();
288
309
  form.setFieldsValue(values);
310
+ // form.setFieldValue('resource', values.resource)
311
+
312
+ // values.resource[1117][0].times = [];
313
+ // values.resource[1117][0]._extend = {
314
+ // usableTime: {
315
+ // ...values.resource[1117][0]._extend.usableTime,
316
+ // event_list: []
317
+ // }
318
+ // };
319
+
320
+ // form.setFieldsValue({
321
+ // capacity: values.capacity,
322
+ // duration: values.duration,
323
+ // endDate: values.endDate,
324
+ // origin_total: values.origin_total,
325
+ // price: values.price,
326
+ // product_name: values.product_name,
327
+ // quantity: values.quantity,
328
+ // resource: values.resource,
329
+ // startDate: values.startDate,
330
+ // start_time: values.start_time,
331
+ // total: values.total,
332
+ // });
333
+ var endTime = performance.now();
334
+ console.log(endTime - window.pp1, '打开商品5');
335
+ console.log('执行时间', endTime - startTime, values);
336
+ setTimeout(function () {}, 20);
289
337
  if (openProductDetail) {
290
338
  setTimeout(function () {
291
339
  handleEdit({});
@@ -368,7 +416,7 @@ var Info = function Info(_, ref) {
368
416
  useEffect(function () {
369
417
  // 预约创建页面并且打开了编辑弹窗
370
418
  if (state.isBookingCreatePage && state.service.editModal) {
371
- setEditData(null);
419
+ setEditDataRun(null);
372
420
  }
373
421
  }, [state.service.editModal, state.isBookingCreatePage]);
374
422
 
@@ -382,17 +430,10 @@ var Info = function Info(_, ref) {
382
430
  useEffect(function () {
383
431
  getDiscount();
384
432
  }, [useTotal, (_state$service$cacheI5 = state.service.cacheItem) === null || _state$service$cacheI5 === void 0 || (_state$service$cacheI5 = _state$service$cacheI5._extend) === null || _state$service$cacheI5 === void 0 ? void 0 : _state$service$cacheI5.origin_total]);
385
- var isDiscount = useMemo(function () {
386
- var _state$service4, _state$service5;
387
- if (!((_state$service4 = state.service) !== null && _state$service4 !== void 0 && _state$service4.cacheItem)) {
388
- return false;
389
- }
390
- return useTotal != ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 ? void 0 : _state$service5._extend.origin_total);
391
- }, [useTotal, (_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.cacheItem) === null || _state$service6 === void 0 ? void 0 : _state$service6._extend.origin_total]);
392
433
  var bundles = useMemo(function () {
393
- var _state$service7;
394
- return ((_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.other) === null || _state$service7 === void 0 ? void 0 : _state$service7.bundle) || [];
395
- }, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.other) === null || _state$service8 === void 0 ? void 0 : _state$service8.bundle]);
434
+ var _state$service5;
435
+ return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 || (_state$service5 = _state$service5._extend) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.other) === null || _state$service5 === void 0 ? void 0 : _state$service5.bundle) || [];
436
+ }, [(_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.cacheItem) === null || _state$service6 === void 0 || (_state$service6 = _state$service6._extend) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.other) === null || _state$service6 === void 0 ? void 0 : _state$service6.bundle]);
396
437
 
397
438
  /**
398
439
  * @title: 编辑商品
@@ -402,7 +443,7 @@ var Info = function Info(_, ref) {
402
443
  * @Author: zhiwei.Wang
403
444
  * @Date: 2024-08-28 17:08
404
445
  */
405
- var handleEdit = function handleEdit(e) {
446
+ var handleEdit = useMemoizedFn(function (e) {
406
447
  var _state$client;
407
448
  // 当前商品
408
449
  var item = state.service.cacheItem;
@@ -498,7 +539,7 @@ var Info = function Info(_, ref) {
498
539
  });
499
540
  }
500
541
  });
501
- };
542
+ });
502
543
 
503
544
  /**
504
545
  * @title: 更换商品
@@ -508,7 +549,7 @@ var Info = function Info(_, ref) {
508
549
  * @Author: zhiwei.Wang
509
550
  * @Date: 2024-08-28 17:10
510
551
  */
511
- var handleChange = function handleChange(e) {
552
+ var handleChange = useMemoizedFn(function (e) {
512
553
  if (state.channelDisabledEdit) {
513
554
  return;
514
555
  }
@@ -523,10 +564,10 @@ var Info = function Info(_, ref) {
523
564
  // changeService: true,
524
565
  }
525
566
  });
526
- };
567
+ });
527
568
  useImperativeHandle(ref, function () {
528
569
  return {
529
- init: setEditData
570
+ init: setEditDataRun
530
571
  };
531
572
  });
532
573
  var handleTotalChange = function handleTotalChange(number) {
@@ -540,6 +581,195 @@ var Info = function Info(_, ref) {
540
581
  return false;
541
582
  }, [state.renderType, isNormalProduct]);
542
583
  var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
584
+ console.log(isShowTimeAndResource, 'isShowTimeAndResource');
585
+ var productName = useMemo(function () {
586
+ var _state$service7;
587
+ return /*#__PURE__*/React.createElement(Col, {
588
+ span: 24
589
+ }, /*#__PURE__*/React.createElement(Form.Item, {
590
+ name: "product_name"
591
+ }, /*#__PURE__*/React.createElement("div", {
592
+ className: "current-service-info"
593
+ }, /*#__PURE__*/React.createElement("div", {
594
+ className: "current-service-info-name-wrap"
595
+ }, /*#__PURE__*/React.createElement("div", {
596
+ className: "current-service-info-name"
597
+ }, ((_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 ? void 0 : _state$service7.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
598
+ onClick: handleEdit
599
+ }, locales.getText('pisell2.text.edit')), !state.isBookingCreatePage && /*#__PURE__*/React.createElement(Button, {
600
+ onClick: handleChange
601
+ }, locales.getText('pisell2.text.change'))), /*#__PURE__*/React.createElement(CollapsibleList, {
602
+ style: {
603
+ marginTop: bundles.length ? '8px' : 0
604
+ },
605
+ list: bundles,
606
+ renderItem: function renderItem(item) {
607
+ return renderBundles(item, state.amountSymbol);
608
+ }
609
+ }))));
610
+ }, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 ? void 0 : _state$service8.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
611
+ var price = useMemo(function () {
612
+ var _state$service$cacheI6, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9;
613
+ return /*#__PURE__*/React.createElement(Col, {
614
+ span: 24
615
+ }, /*#__PURE__*/React.createElement(Form.Item, {
616
+ label: locales.getText('pisell2.text.price'),
617
+ name: "total",
618
+ rules: [{
619
+ required: true
620
+ }],
621
+ extra: useTotal !== ((_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 || (_state$service$cacheI6 = _state$service$cacheI6._extend) === null || _state$service$cacheI6 === void 0 ? void 0 : _state$service$cacheI6.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
622
+ }, /*#__PURE__*/React.createElement(PisellAdjustPriceInputNumber, {
623
+ style: {
624
+ width: '100%'
625
+ },
626
+ min: 0,
627
+ precision: 2,
628
+ prefix: state.amountSymbol,
629
+ onChange: handleTotalChange,
630
+ disabled: state.channelDisabledEdit,
631
+ originValue: ((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total) || 0,
632
+ placeholder: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || '0'
633
+ })));
634
+ }, [useTotal, (_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total, state.amountSymbol, state.channelDisabledEdit]);
635
+ var reason = useMemo(function () {
636
+ return isReason ? /*#__PURE__*/React.createElement(Col, {
637
+ span: 24
638
+ }, /*#__PURE__*/React.createElement(Form.Item, {
639
+ label: locales.getText('pisell2.text.discount-reason'),
640
+ name: "discount_reason"
641
+ }, /*#__PURE__*/React.createElement(Input.TextArea, {
642
+ size: "large"
643
+ }))) : null;
644
+ }, [isReason]);
645
+ var startTime = useMemo(function () {
646
+ var _state$bookingConfig4;
647
+ return /*#__PURE__*/React.createElement(Col, {
648
+ span: 12
649
+ }, /*#__PURE__*/React.createElement(Form.Item, {
650
+ label: locales.getText('pisell2.text.start_time'),
651
+ name: "start_time",
652
+ rules: [{
653
+ required: true
654
+ }]
655
+ }, SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
656
+ slice: (_state$bookingConfig4 = state.bookingConfig) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.config) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.basic) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.service_time) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.value,
657
+ timePickerProps: {
658
+ style: {
659
+ width: '100%'
660
+ }
661
+ },
662
+ timeProps: {
663
+ style: {
664
+ zoom: 0.8
665
+ }
666
+ }
667
+ }) : null));
668
+ }, [SelectTime, (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.basic) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.service_time) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.value]);
669
+ var duration = useMemo(function () {
670
+ console.log('render form duration');
671
+ return /*#__PURE__*/React.createElement(Col, {
672
+ span: 12
673
+ }, /*#__PURE__*/React.createElement(Form.Item, {
674
+ label: locales.getText('pisell2.text.duration'),
675
+ name: "duration",
676
+ rules: [{
677
+ required: true
678
+ }]
679
+ }, /*#__PURE__*/React.createElement(Duration, _extends({}, durationProps, {
680
+ timeObj: timeObj
681
+ }))));
682
+ }, [durationProps, timeObj]);
683
+ var resource = useMemo(function () {
684
+ console.log('render form resource');
685
+ return /*#__PURE__*/React.createElement(Form.Item, {
686
+ noStyle: true,
687
+ name: "resource"
688
+ }, /*#__PURE__*/React.createElement(Resources, {
689
+ ref: resourcesRef,
690
+ state: state,
691
+ cacheItem: state.service.cacheItem,
692
+ getCurrentCacheItem: getCurrentCacheItem
693
+ // 内部没有使用 useDuration useStartTime
694
+ // useDuration={useDuration}
695
+ // useStartTime={useStartTime}
696
+ }));
697
+ // 只监听内部使用值
698
+ }, [state.renderType, (_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._data) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.resources, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._data) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.resourceMaps]);
699
+ var capacity = useMemo(function () {
700
+ return /*#__PURE__*/React.createElement(Form.Item, {
701
+ noStyle: true,
702
+ name: "capacity"
703
+ }, /*#__PURE__*/React.createElement(Capacity, {
704
+ state: state,
705
+ cacheItem: state.service.cacheItem
706
+ }));
707
+ // 只监听Capacity 内部使用的 state.locale state.isTerminal, state.service?.cacheItem?._data?.capacitys
708
+ }, [state.locale, state.isTerminal, (_state$service9 = state.service) === null || _state$service9 === void 0 || (_state$service9 = _state$service9.cacheItem) === null || _state$service9 === void 0 || (_state$service9 = _state$service9._data) === null || _state$service9 === void 0 ? void 0 : _state$service9.capacitys]);
709
+ var hiddenQuantity = useMemo(function () {
710
+ return /*#__PURE__*/React.createElement(Form.Item, {
711
+ hidden: true,
712
+ name: "quantity"
713
+ }, /*#__PURE__*/React.createElement(InputNumber, null));
714
+ }, []);
715
+ var quantity = useMemo(function () {
716
+ return /*#__PURE__*/React.createElement(Col, {
717
+ span: 24
718
+ }, /*#__PURE__*/React.createElement(Form.Item, {
719
+ label: locales.getText('pisell2.text.quantity'),
720
+ name: "quantity",
721
+ rules: [{
722
+ required: true
723
+ }]
724
+ }, /*#__PURE__*/React.createElement(InputNumber, {
725
+ size: "large",
726
+ style: {
727
+ width: '100%'
728
+ },
729
+ min: 1,
730
+ max: 999999,
731
+ formatter: function formatter(value) {
732
+ if (value !== undefined) {
733
+ // 向下取整
734
+ return Math.floor(value);
735
+ }
736
+ return value;
737
+ }
738
+ })));
739
+ }, []);
740
+ var footer = useMemo(function () {
741
+ var _state$service$resour;
742
+ return /*#__PURE__*/React.createElement("div", {
743
+ className: "pisell-lowcode__booking-service-body-edit-footer"
744
+ }, /*#__PURE__*/React.createElement("div", {
745
+ className: "pisell-lowcode__booking-service-delete-wrap",
746
+ onClick: handleDeleteProduct
747
+ }, /*#__PURE__*/React.createElement(Delete_wght300_24px, {
748
+ className: "pisell-lowcode__booking-service-delete-icon"
749
+ })), /*#__PURE__*/React.createElement(Button, {
750
+ type: "primary",
751
+ className: "pisell-lowcode__booking-service-body-edit-footer-apple",
752
+ disabled: !isNormalProduct && !((_state$service$resour = state.service.resourcesOrigin) !== null && _state$service$resour !== void 0 && _state$service$resour.length),
753
+ onClick: function onClick() {
754
+ form.submit();
755
+ }
756
+ }, locales.getText('pisell2.text.apply')));
757
+ }, [isNormalProduct, (_state$service$resour2 = state.service.resourcesOrigin) === null || _state$service$resour2 === void 0 ? void 0 : _state$service$resour2.length]);
758
+ console.log('render edit');
759
+ console.log(state.service.editModal && !((_state$service$cacheI13 = state.service.cacheItem) !== null && _state$service$cacheI13 !== void 0 && _state$service$cacheI13.autoClose), performance.now() - window.pp1, '打开商品1');
760
+ var _useState = useState(false),
761
+ _useState2 = _slicedToArray(_useState, 2),
762
+ val = _useState2[0],
763
+ setVal = _useState2[1];
764
+ useEffect(function () {
765
+ if (isShowTimeAndResource) {
766
+ setTimeout(function () {
767
+ setVal(true);
768
+ }, 200);
769
+ } else {
770
+ setVal(false);
771
+ }
772
+ }, [isShowTimeAndResource]);
543
773
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
544
774
  titleNoWrap: true
545
775
  //通过zIndex的方式控制 添加商品 和 编辑服务弹窗的上下层级
@@ -547,7 +777,7 @@ var Info = function Info(_, ref) {
547
777
  zIndex: state.service.changeService ? 999 : 1000,
548
778
  forceRender: true,
549
779
  mask: state.drawerMask,
550
- open: state.service.editModal && !((_state$service$cacheI6 = state.service.cacheItem) !== null && _state$service$cacheI6 !== void 0 && _state$service$cacheI6.autoClose),
780
+ open: state.service.editModal && !((_state$service$cacheI14 = state.service.cacheItem) !== null && _state$service$cacheI14 !== void 0 && _state$service$cacheI14.autoClose),
551
781
  title: locales.getText('pisell2.text.edit-service'),
552
782
  onClose: function onClose() {
553
783
  dispatch({
@@ -570,140 +800,6 @@ var Info = function Info(_, ref) {
570
800
  width: '100%'
571
801
  },
572
802
  gutter: [16, 0]
573
- }, /*#__PURE__*/React.createElement(Col, {
574
- span: 24
575
- }, /*#__PURE__*/React.createElement(Form.Item, {
576
- name: "product_name"
577
- }, /*#__PURE__*/React.createElement("div", {
578
- className: "current-service-info"
579
- }, /*#__PURE__*/React.createElement("div", {
580
- className: "current-service-info-name-wrap"
581
- }, /*#__PURE__*/React.createElement("div", {
582
- className: "current-service-info-name"
583
- }, ((_state$service9 = state.service) === null || _state$service9 === void 0 || (_state$service9 = _state$service9.cacheItem) === null || _state$service9 === void 0 || (_state$service9 = _state$service9._extend) === null || _state$service9 === void 0 ? void 0 : _state$service9.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
584
- onClick: handleEdit
585
- }, locales.getText('pisell2.text.edit')), !state.isBookingCreatePage && /*#__PURE__*/React.createElement(Button, {
586
- onClick: handleChange
587
- }, locales.getText('pisell2.text.change'))), /*#__PURE__*/React.createElement(CollapsibleList, {
588
- style: {
589
- marginTop: bundles.length ? '8px' : 0
590
- },
591
- list: bundles,
592
- renderItem: function renderItem(item) {
593
- return renderBundles(item, state.amountSymbol);
594
- }
595
- })))), /*#__PURE__*/React.createElement(Col, {
596
- span: 24
597
- }, /*#__PURE__*/React.createElement(Form.Item, {
598
- label: locales.getText('pisell2.text.price'),
599
- name: "total",
600
- rules: [{
601
- required: true
602
- }],
603
- extra: useTotal !== ((_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
604
- }, /*#__PURE__*/React.createElement(PisellAdjustPriceInputNumber, {
605
- style: {
606
- width: '100%'
607
- },
608
- min: 0,
609
- precision: 2,
610
- prefix: state.amountSymbol,
611
- onChange: handleTotalChange,
612
- disabled: state.channelDisabledEdit,
613
- originValue: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
614
- placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || '0'
615
- }))), isReason ? /*#__PURE__*/React.createElement(Col, {
616
- span: 24
617
- }, /*#__PURE__*/React.createElement(Form.Item, {
618
- label: locales.getText('pisell2.text.discount-reason'),
619
- name: "discount_reason"
620
- }, /*#__PURE__*/React.createElement(Input.TextArea, {
621
- size: "large"
622
- }))) : null, isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, {
623
- span: 12
624
- }, /*#__PURE__*/React.createElement(Form.Item, {
625
- label: locales.getText('pisell2.text.start_time'),
626
- name: "start_time",
627
- rules: [{
628
- required: true
629
- }]
630
- }, SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
631
- slice: (_state$bookingConfig3 = state.bookingConfig) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.config) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.basic) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.service_time) === null || _state$bookingConfig3 === void 0 ? void 0 : _state$bookingConfig3.value,
632
- timePickerProps: {
633
- style: {
634
- width: '100%'
635
- }
636
- },
637
- timeProps: {
638
- style: {
639
- zoom: 0.8
640
- }
641
- }
642
- }) : null)), /*#__PURE__*/React.createElement(Col, {
643
- span: 12
644
- }, /*#__PURE__*/React.createElement(Form.Item, {
645
- label: locales.getText('pisell2.text.duration'),
646
- name: "duration",
647
- rules: [{
648
- required: true
649
- }]
650
- }, /*#__PURE__*/React.createElement(Duration, _extends({}, durationProps, {
651
- timeObj: timeObj
652
- })))), /*#__PURE__*/React.createElement(Form.Item, {
653
- noStyle: true,
654
- name: "resource"
655
- }, /*#__PURE__*/React.createElement(Resources, {
656
- ref: resourcesRef,
657
- state: state,
658
- cacheItem: state.service.cacheItem,
659
- getCurrentCacheItem: getCurrentCacheItem,
660
- useDuration: useDuration,
661
- useStartTime: useStartTime
662
- })), /*#__PURE__*/React.createElement(Form.Item, {
663
- noStyle: true,
664
- name: "capacity"
665
- }, /*#__PURE__*/React.createElement(Capacity, {
666
- state: state,
667
- cacheItem: state.service.cacheItem
668
- })), /*#__PURE__*/React.createElement(Form.Item, {
669
- hidden: true,
670
- name: "quantity"
671
- }, /*#__PURE__*/React.createElement(InputNumber, null))), isNormalProduct && /*#__PURE__*/React.createElement(Col, {
672
- span: 24
673
- }, /*#__PURE__*/React.createElement(Form.Item, {
674
- label: locales.getText('pisell2.text.quantity'),
675
- name: "quantity",
676
- rules: [{
677
- required: true
678
- }]
679
- }, /*#__PURE__*/React.createElement(InputNumber, {
680
- size: "large",
681
- style: {
682
- width: '100%'
683
- },
684
- min: 1,
685
- max: 999999,
686
- formatter: function formatter(value) {
687
- if (value !== undefined) {
688
- // 向下取整
689
- return Math.floor(value);
690
- }
691
- return value;
692
- }
693
- }))))), /*#__PURE__*/React.createElement("div", {
694
- className: "pisell-lowcode__booking-service-body-edit-footer"
695
- }, /*#__PURE__*/React.createElement("div", {
696
- className: "pisell-lowcode__booking-service-delete-wrap",
697
- onClick: handleDeleteProduct
698
- }, /*#__PURE__*/React.createElement(Delete_wght300_24px, {
699
- className: "pisell-lowcode__booking-service-delete-icon"
700
- })), /*#__PURE__*/React.createElement(Button, {
701
- type: "primary",
702
- className: "pisell-lowcode__booking-service-body-edit-footer-apple",
703
- disabled: !isNormalProduct && !((_state$service$resour = state.service.resourcesOrigin) !== null && _state$service$resour !== void 0 && _state$service$resour.length),
704
- onClick: function onClick() {
705
- form.submit();
706
- }
707
- }, locales.getText('pisell2.text.apply'))))));
803
+ }, productName, price, reason, val && isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)));
708
804
  };
709
805
  export default /*#__PURE__*/forwardRef(Info);
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useContext } from 'react';
1
+ import React, { useEffect, useContext, useMemo } from 'react';
2
2
  import AddService from "./addService";
3
3
  import { Context } from "../../info/model";
4
4
  import EditService from "./editService";
@@ -24,19 +24,23 @@ var Service = function Service() {
24
24
  var clearCart = useClearCart(state, dispatch);
25
25
  var _useQuotation = useQuotation(state, dispatch),
26
26
  dom = _useQuotation.dom;
27
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
28
- className: "pisell-lowcode__booking-service-wrap"
29
- }, clearCart, /*#__PURE__*/React.createElement(Lists, {
30
- isParallelResource: true,
31
- onEdit: handleEdit,
32
- onAction: handleAction,
33
- onChange: function onChange(e, type) {
34
- return dispatchService(type || 'setService', e);
35
- }
36
- }), !state.isBookingCreatePage ? /*#__PURE__*/React.createElement(AddService, {
37
- onEdit: handleEdit
38
- }) : null), /*#__PURE__*/React.createElement(EditService, {
39
- ref: detailRef
40
- }), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null), dom);
27
+ var renderMemo = useMemo(function () {
28
+ console.log('render info22222');
29
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
30
+ className: "pisell-lowcode__booking-service-wrap"
31
+ }, clearCart, /*#__PURE__*/React.createElement(Lists, {
32
+ isParallelResource: true,
33
+ onEdit: handleEdit,
34
+ onAction: handleAction,
35
+ onChange: function onChange(e, type) {
36
+ return dispatchService(type || 'setService', e);
37
+ }
38
+ }), !state.isBookingCreatePage ? /*#__PURE__*/React.createElement(AddService, {
39
+ onEdit: handleEdit
40
+ }) : null), /*#__PURE__*/React.createElement(EditService, {
41
+ ref: detailRef
42
+ }), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null), dom);
43
+ }, [clearCart, dom, showAddTimeModal, clearCart]);
44
+ return /*#__PURE__*/React.createElement(React.Fragment, null, renderMemo);
41
45
  };
42
46
  export default /*#__PURE__*/React.memo(Service);
@@ -20,6 +20,9 @@ var Duration = function Duration(props) {
20
20
  startDate = props.startDate,
21
21
  timeObj = props.timeObj,
22
22
  resetProps = _objectWithoutProperties(props, _excluded);
23
+ var startDateStr = useMemo(function () {
24
+ return dayjs(startDate).format('YYYY-MM-DD HH:mm:ss');
25
+ }, [startDate]);
23
26
 
24
27
  /**
25
28
  * @title: 时间切片
@@ -57,7 +60,7 @@ var Duration = function Duration(props) {
57
60
  });
58
61
  }
59
62
  return durationSlicesBasedOnTime;
60
- }, [timeObj, slice, locale, duration, startDate, usableTime]);
63
+ }, [timeObj.durationSlicesBasedOnTime, slice, locale, duration, startDateStr, usableTime === null || usableTime === void 0 ? void 0 : usableTime.end_at]);
61
64
  useEffect(function () {
62
65
  timeObjChange === null || timeObjChange === void 0 || timeObjChange(times);
63
66
  }, [times]);
@@ -72,6 +75,10 @@ var Duration = function Duration(props) {
72
75
  }, d[label]);
73
76
  });
74
77
  }, []);
75
- return /*#__PURE__*/React.createElement(Select, _extends({}, selectProps, resetProps), renderOptions(times));
78
+ var options = useMemo(function () {
79
+ console.log('render form options');
80
+ return renderOptions(times);
81
+ }, [times]);
82
+ return /*#__PURE__*/React.createElement(Select, _extends({}, selectProps, resetProps), options);
76
83
  };
77
84
  export default Duration;