@pisell/private-materials 6.2.20 → 6.2.21

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 (402) 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 +0 -1
  10. package/es/components/Sales/Cart/utils.d.ts +63 -0
  11. package/es/components/Sales/Checkout/index.d.ts +37 -0
  12. package/es/components/Sales/Checkout/serve.d.ts +15 -0
  13. package/es/components/Sales/Checkout/utils.d.ts +0 -1
  14. package/es/components/Sales/Checkout/utils.js +2 -3
  15. package/es/components/Sales/Customer/index.d.ts +25 -0
  16. package/es/components/Sales/Event/Detail.d.ts +30 -0
  17. package/es/components/Sales/Event/serve.d.ts +49 -0
  18. package/es/components/Sales/Summary/index.d.ts +35 -0
  19. package/es/components/Sales/Summary/serve.d.ts +1 -0
  20. package/es/components/Sales/Summary/utils.d.ts +51 -0
  21. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
  22. package/es/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
  23. package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
  24. package/es/components/appointmentBooking/components/Content/index.js +19 -12
  25. package/es/components/appointmentBooking/components/Deposit/index.d.ts +9 -0
  26. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  27. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  28. package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  29. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  30. package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
  31. package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  32. package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
  33. package/es/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
  34. package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  35. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  36. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  37. package/es/components/appointmentBooking/hooks.d.ts +106 -0
  38. package/es/components/appointmentBooking/index.d.ts +3 -0
  39. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  40. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  41. package/es/components/booking/components/browserSelect/index.js +1 -1
  42. package/es/components/booking/components/customSelect/index.d.ts +38 -0
  43. package/es/components/booking/components/customSelect/index.js +0 -1
  44. package/es/components/booking/components/footer/index.d.ts +11 -0
  45. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  46. package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  47. package/es/components/booking/components/voucher/index.d.ts +3 -0
  48. package/es/components/booking/editBookingModal/index.js +58 -29
  49. package/es/components/booking/editBookingModal/serve.d.ts +1 -0
  50. package/es/components/booking/editBookingModal/serve.js +19 -11
  51. package/es/components/booking/forms/model.js +5 -5
  52. package/es/components/booking/forms/table/index.d.ts +0 -1
  53. package/es/components/booking/hooks/useClearCart.d.ts +2 -0
  54. package/es/components/booking/hooks/useClearCart.js +8 -11
  55. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  56. package/es/components/booking/info/addServiceVariant/index.d.ts +6 -0
  57. package/es/components/booking/info/client/index.d.ts +4 -0
  58. package/es/components/booking/info/client/index.js +2 -3
  59. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  60. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  61. package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  62. package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
  63. package/es/components/booking/info/index.d.ts +3 -0
  64. package/es/components/booking/info/service/Lists.d.ts +2 -0
  65. package/es/components/booking/info/service/Lists.js +26 -36
  66. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  67. package/es/components/booking/info/service/editService/index.js +10 -15
  68. package/es/components/booking/info/service/like/index.d.ts +0 -1
  69. package/es/components/booking/info/service/like/index.js +1 -1
  70. package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
  71. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  72. package/es/components/booking/info/service2/utils.d.ts +247 -0
  73. package/es/components/booking/info/service2/utils.js +21 -20
  74. package/es/components/booking/info/utils.js +1 -1
  75. package/es/components/booking/info2/index.d.ts +12 -0
  76. package/es/components/booking/info2/index.js +0 -1
  77. package/es/components/booking/info2/service/addService/index.d.ts +11 -0
  78. package/es/components/booking/info2/service/addService/utils.d.ts +98 -0
  79. package/es/components/booking/info2/service/addService/utils.js +4 -7
  80. package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
  81. package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
  82. package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
  83. package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
  84. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  85. package/es/components/booking/info2/service/editService/index.js +168 -264
  86. package/es/components/booking/info2/service/index.d.ts +4 -0
  87. package/es/components/booking/info2/service/index.js +15 -19
  88. package/es/components/booking/info2/utils.d.ts +4 -0
  89. package/es/components/booking/info2/utilsByBooking.d.ts +35 -0
  90. package/es/components/booking/locales.d.ts +828 -0
  91. package/es/components/booking/materiels/duration/index.d.ts +13 -0
  92. package/es/components/booking/materiels/duration/index.js +2 -9
  93. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  94. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  95. package/es/components/booking/materiels/startTime/index.js +1 -1
  96. package/es/components/booking/model.d.ts +108 -0
  97. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  98. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  99. package/es/components/booking/notes/model.js +5 -5
  100. package/es/components/booking/payments/model.js +5 -5
  101. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  102. package/es/components/eftpos/form/index.d.ts +0 -1
  103. package/es/components/eftpos/group/index.d.ts +0 -1
  104. package/es/components/eftpos/hooks.d.ts +0 -1
  105. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  106. package/es/components/eftpos/icon/device.d.ts +0 -1
  107. package/es/components/eftpos/receipt/index.d.ts +0 -1
  108. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  109. package/es/components/eftposPay/app.d.ts +0 -1
  110. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  111. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  112. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  113. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  114. package/es/components/eftposPay/const.d.ts +184 -0
  115. package/es/components/eftposPay/hooks.d.ts +35 -0
  116. package/es/components/eftposPay/index.d.ts +4 -0
  117. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  118. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  119. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  120. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  121. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  122. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  123. package/es/components/eftposPay/manufacturer.d.ts +7 -0
  124. package/es/components/eftposPay/pay.d.ts +20 -0
  125. package/es/components/eftposPay/store/index.d.ts +355 -0
  126. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  127. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  128. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  129. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  130. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  131. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  132. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  133. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  134. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  135. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  136. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  137. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  138. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  139. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  140. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  141. package/es/components/eventBooking/index.d.ts +3 -0
  142. package/es/components/eventBooking/locales.d.ts +246 -0
  143. package/es/components/listComponent/index.js +5 -5
  144. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
  145. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +3 -0
  146. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
  147. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  148. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  149. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  150. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  151. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  152. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  153. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  154. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
  155. package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  156. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  157. package/es/components/pay/toC/index.d.ts +3 -0
  158. package/es/components/pay/toC/locales.d.ts +289 -0
  159. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  160. package/es/components/productExtension/card/index.js +3 -3
  161. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  162. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  163. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  164. package/es/components/productExtension/fields/Forms/index.js +12 -12
  165. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  166. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  167. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  168. package/es/components/productExtension/server.js +2 -2
  169. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  170. package/es/components/productSelect/index.d.ts +26 -0
  171. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  172. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  173. package/es/components/schedules/calendar/index.js +4 -4
  174. package/es/components/schedules/calendar/serve.js +2 -2
  175. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  176. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  177. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  178. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  179. package/es/components/schedules/components/ResourceList/index.js +1 -1
  180. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  181. package/es/components/schedules/components/Search/index.js +5 -5
  182. package/es/components/schedules/model.js +5 -5
  183. package/es/components/schedules/openHours/index.js +1 -1
  184. package/es/components/schedules/openHours/serve.js +2 -2
  185. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  186. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  187. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  188. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  189. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  190. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  191. package/es/components/schedules/products/index.d.ts +0 -1
  192. package/es/components/schedules/products/serve.js +2 -2
  193. package/es/components/schedules/products/utils.js +5 -5
  194. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  195. package/es/components/schedules/resources/detail/index.js +10 -10
  196. package/es/components/schedules/resources/list/index.js +2 -2
  197. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  198. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  199. package/es/components/schedules/resources/serve.js +2 -2
  200. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  201. package/es/components/schedules/utils.js +4 -4
  202. package/es/components/selectModal/index.js +2 -2
  203. package/es/components/shoppingCart/components/Cart/Product.d.ts +3 -0
  204. package/es/components/shoppingCart/components/Cart/Product.js +41 -48
  205. package/es/components/shoppingCart/components/Cart/index.d.ts +3 -0
  206. package/es/components/shoppingCart/components/Cart/index.js +18 -21
  207. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  208. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  209. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  210. package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -177
  211. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  212. package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  213. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
  214. package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
  215. package/es/components/ticketBooking/components/timeBar/index.js +71 -78
  216. package/es/components/ticketBooking/index.d.ts +7 -0
  217. package/es/components/ticketBooking/locales.d.ts +174 -0
  218. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  219. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  220. package/es/components/walletList/index.d.ts +28 -0
  221. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  222. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  223. package/es/hooks/useComponents.js +1 -1
  224. package/es/utils/index.d.ts +23 -0
  225. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  226. package/lib/components/Sales/Cart/utils.d.ts +63 -0
  227. package/lib/components/Sales/Checkout/index.d.ts +37 -0
  228. package/lib/components/Sales/Checkout/serve.d.ts +15 -0
  229. package/lib/components/Sales/Checkout/utils.d.ts +0 -1
  230. package/lib/components/Sales/Checkout/utils.js +2 -3
  231. package/lib/components/Sales/Customer/index.d.ts +25 -0
  232. package/lib/components/Sales/Event/Detail.d.ts +30 -0
  233. package/lib/components/Sales/Event/serve.d.ts +49 -0
  234. package/lib/components/Sales/Summary/index.d.ts +35 -0
  235. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  236. package/lib/components/Sales/Summary/utils.d.ts +51 -0
  237. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
  238. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
  239. package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
  240. package/lib/components/appointmentBooking/components/Content/index.js +7 -2
  241. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +9 -0
  242. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  243. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  244. package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  245. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  246. package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
  247. package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  248. package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
  249. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
  250. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  251. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  252. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  253. package/lib/components/appointmentBooking/hooks.d.ts +106 -0
  254. package/lib/components/appointmentBooking/index.d.ts +3 -0
  255. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  256. package/lib/components/booking/components/customSelect/index.d.ts +38 -0
  257. package/lib/components/booking/components/customSelect/index.js +0 -1
  258. package/lib/components/booking/components/footer/index.d.ts +11 -0
  259. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  260. package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  261. package/lib/components/booking/components/voucher/index.d.ts +3 -0
  262. package/lib/components/booking/editBookingModal/index.js +56 -21
  263. package/lib/components/booking/editBookingModal/serve.d.ts +1 -0
  264. package/lib/components/booking/editBookingModal/serve.js +12 -6
  265. package/lib/components/booking/forms/table/index.d.ts +0 -1
  266. package/lib/components/booking/hooks/useClearCart.d.ts +2 -0
  267. package/lib/components/booking/hooks/useClearCart.js +13 -16
  268. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  269. package/lib/components/booking/info/addServiceVariant/index.d.ts +6 -0
  270. package/lib/components/booking/info/client/index.d.ts +4 -0
  271. package/lib/components/booking/info/client/index.js +4 -5
  272. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  273. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  274. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  275. package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
  276. package/lib/components/booking/info/index.d.ts +3 -0
  277. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  278. package/lib/components/booking/info/service/Lists.js +23 -35
  279. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  280. package/lib/components/booking/info/service/editService/index.js +1 -7
  281. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  282. package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
  283. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  284. package/lib/components/booking/info/service2/utils.d.ts +247 -0
  285. package/lib/components/booking/info/service2/utils.js +17 -17
  286. package/lib/components/booking/info/utils.js +1 -2
  287. package/lib/components/booking/info2/index.d.ts +12 -0
  288. package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
  289. package/lib/components/booking/info2/service/addService/utils.d.ts +98 -0
  290. package/lib/components/booking/info2/service/addService/utils.js +3 -5
  291. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
  292. package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
  293. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
  294. package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
  295. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  296. package/lib/components/booking/info2/service/editService/index.js +72 -137
  297. package/lib/components/booking/info2/service/index.d.ts +4 -0
  298. package/lib/components/booking/info2/service/index.js +9 -13
  299. package/lib/components/booking/info2/utils.d.ts +4 -0
  300. package/lib/components/booking/info2/utilsByBooking.d.ts +35 -0
  301. package/lib/components/booking/locales.d.ts +828 -0
  302. package/lib/components/booking/materiels/duration/index.d.ts +13 -0
  303. package/lib/components/booking/materiels/duration/index.js +2 -7
  304. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  305. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  306. package/lib/components/booking/model.d.ts +108 -0
  307. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  308. package/lib/components/eftpos/form/index.d.ts +0 -1
  309. package/lib/components/eftpos/group/index.d.ts +0 -1
  310. package/lib/components/eftpos/hooks.d.ts +0 -1
  311. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  312. package/lib/components/eftpos/icon/device.d.ts +0 -1
  313. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  314. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  315. package/lib/components/eftposPay/app.d.ts +0 -1
  316. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  317. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  318. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  319. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  320. package/lib/components/eftposPay/const.d.ts +184 -0
  321. package/lib/components/eftposPay/hooks.d.ts +35 -0
  322. package/lib/components/eftposPay/index.d.ts +4 -0
  323. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  324. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  325. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  326. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  327. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  328. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  329. package/lib/components/eftposPay/manufacturer.d.ts +7 -0
  330. package/lib/components/eftposPay/pay.d.ts +20 -0
  331. package/lib/components/eftposPay/store/index.d.ts +355 -0
  332. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  333. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  334. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  335. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  336. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  337. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  338. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  339. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  340. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  341. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  342. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  343. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  344. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  345. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  346. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  347. package/lib/components/eventBooking/index.d.ts +3 -0
  348. package/lib/components/eventBooking/locales.d.ts +246 -0
  349. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
  350. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +3 -0
  351. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
  352. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  353. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  354. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  355. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  356. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  357. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  358. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  359. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
  360. package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  361. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  362. package/lib/components/pay/toC/index.d.ts +3 -0
  363. package/lib/components/pay/toC/locales.d.ts +289 -0
  364. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  365. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  366. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  367. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  368. package/lib/components/productSelect/index.d.ts +26 -0
  369. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  370. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  371. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  372. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  373. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  374. package/lib/components/schedules/products/index.d.ts +0 -1
  375. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  376. package/lib/components/schedules/utils.js +1 -1
  377. package/lib/components/shoppingCart/components/Cart/Product.d.ts +3 -0
  378. package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
  379. package/lib/components/shoppingCart/components/Cart/index.d.ts +3 -0
  380. package/lib/components/shoppingCart/components/Cart/index.js +15 -18
  381. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  382. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  383. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  384. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +127 -145
  385. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  386. package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  387. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
  388. package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
  389. package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
  390. package/lib/components/ticketBooking/index.d.ts +7 -0
  391. package/lib/components/ticketBooking/locales.d.ts +174 -0
  392. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  393. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  394. package/lib/components/walletList/index.d.ts +28 -0
  395. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  396. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  397. package/lib/utils/index.d.ts +23 -0
  398. package/package.json +4 -4
  399. package/es/components/booking/info/service/editService/constants.d.ts +0 -1
  400. package/es/components/booking/info/service/editService/constants.js +0 -3
  401. package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
  402. package/lib/components/booking/info/service/editService/constants.js +0 -31
@@ -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, useState, useImperativeHandle, forwardRef, useRef } from 'react';
18
+ import React, { useContext, useEffect, useMemo, 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, useDebounceFn } from 'ahooks';
30
+ import { useUpdateEffect, useMemoizedFn } 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$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;
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;
42
42
  var _Form$useForm = Form.useForm(),
43
43
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
44
44
  form = _Form$useForm2[0];
@@ -52,22 +52,19 @@ 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, _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]);
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]);
61
58
 
62
59
  // 当前商品信息+ 表单信息
63
- var getCurrentCacheItem = useMemoizedFn(function (_cacheItem) {
60
+ var getCurrentCacheItem = function getCurrentCacheItem(_cacheItem) {
64
61
  // 获取当前表单数据
65
62
  var values = form.getFieldsValue();
66
63
  var _item = _cacheItem || state.service.cacheItem;
67
64
  return _objectSpread(_objectSpread({}, _item), {}, {
68
65
  _extend: _objectSpread(_objectSpread({}, _item === null || _item === void 0 ? void 0 : _item._extend), values)
69
66
  });
70
- });
67
+ };
71
68
 
72
69
  /**
73
70
  * @title: 当前的资源
@@ -81,7 +78,7 @@ var Info = function Info(_, ref) {
81
78
  // let item =
82
79
  // resources.find((d: any) => d.form_record_id == useResource) || {};
83
80
  return null;
84
- }, []);
81
+ }, [useResource]);
85
82
 
86
83
  /**
87
84
  * @title: 持续时长组件的props
@@ -94,16 +91,13 @@ var Info = function Info(_, ref) {
94
91
  var durationProps = useMemo(function () {
95
92
  var _state$bookingConfig;
96
93
  var _cacheItem = getCurrentCacheItem();
97
- var val = getDurationProps({
94
+ return getDurationProps({
98
95
  cacheItem: _cacheItem,
99
96
  useStartTime: useStartTime,
100
- // currentResource,
97
+ currentResource: currentResource,
101
98
  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
102
99
  });
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]);
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]);
107
101
 
108
102
  /**
109
103
  * @title: 灵活时长选项
@@ -114,10 +108,9 @@ var Info = function Info(_, ref) {
114
108
  * @Date: 2024-02-23 10:10
115
109
  */
116
110
  var flexibleOption = useMemo(function () {
117
- var op = getFlexibleOption({
111
+ return getFlexibleOption({
118
112
  durationProps: durationProps
119
113
  });
120
- return op;
121
114
  }, [durationProps, locales.locale]);
122
115
 
123
116
  /**
@@ -128,16 +121,14 @@ var Info = function Info(_, ref) {
128
121
  * @Date: 2024-01-09 13:37
129
122
  */
130
123
  var timeObj = useMemo(function () {
131
- var val = getTimeObj({
124
+ return getTimeObj({
132
125
  durationProps: durationProps,
133
126
  useStartTime: useStartTime,
134
127
  currentResource: currentResource,
135
128
  state: state,
136
129
  useDuration: useDuration
137
130
  });
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
-
131
+ }, [durationProps, useStartTime, currentResource, state, useDuration]);
141
132
  // 由于灵活时长的结束时间随时变动, 这里发现如果当前选择的值没有在列表内,则选择最新的灵活时长值
142
133
  useEffect(function () {
143
134
  try {
@@ -289,51 +280,12 @@ var Info = function Info(_, ref) {
289
280
  }
290
281
  });
291
282
  };
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;
300
283
  var setEditData = useMemoizedFn(function (_cacheItem, open, openProductDetail) {
301
- console.timeEnd('handleChange');
302
- console.log('setEditDatasetEditData', _cacheItem, open);
284
+ form.resetFields();
303
285
  isChangeTotal.current = false;
304
286
  var cacheItem = _cacheItem || state.service.cacheItem;
305
287
  var values = cacheItem._extend;
306
- var startTime = performance.now();
307
- console.log(startTime, 'startTime');
308
- form.resetFields();
309
288
  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);
337
289
  if (openProductDetail) {
338
290
  setTimeout(function () {
339
291
  handleEdit({});
@@ -416,7 +368,7 @@ var Info = function Info(_, ref) {
416
368
  useEffect(function () {
417
369
  // 预约创建页面并且打开了编辑弹窗
418
370
  if (state.isBookingCreatePage && state.service.editModal) {
419
- setEditDataRun(null);
371
+ setEditData(null);
420
372
  }
421
373
  }, [state.service.editModal, state.isBookingCreatePage]);
422
374
 
@@ -430,10 +382,17 @@ var Info = function Info(_, ref) {
430
382
  useEffect(function () {
431
383
  getDiscount();
432
384
  }, [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]);
433
392
  var bundles = useMemo(function () {
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]);
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]);
437
396
 
438
397
  /**
439
398
  * @title: 编辑商品
@@ -443,7 +402,7 @@ var Info = function Info(_, ref) {
443
402
  * @Author: zhiwei.Wang
444
403
  * @Date: 2024-08-28 17:08
445
404
  */
446
- var handleEdit = useMemoizedFn(function (e) {
405
+ var handleEdit = function handleEdit(e) {
447
406
  var _state$client;
448
407
  // 当前商品
449
408
  var item = state.service.cacheItem;
@@ -539,7 +498,7 @@ var Info = function Info(_, ref) {
539
498
  });
540
499
  }
541
500
  });
542
- });
501
+ };
543
502
 
544
503
  /**
545
504
  * @title: 更换商品
@@ -549,7 +508,7 @@ var Info = function Info(_, ref) {
549
508
  * @Author: zhiwei.Wang
550
509
  * @Date: 2024-08-28 17:10
551
510
  */
552
- var handleChange = useMemoizedFn(function (e) {
511
+ var handleChange = function handleChange(e) {
553
512
  if (state.channelDisabledEdit) {
554
513
  return;
555
514
  }
@@ -564,10 +523,10 @@ var Info = function Info(_, ref) {
564
523
  // changeService: true,
565
524
  }
566
525
  });
567
- });
526
+ };
568
527
  useImperativeHandle(ref, function () {
569
528
  return {
570
- init: setEditDataRun
529
+ init: setEditData
571
530
  };
572
531
  });
573
532
  var handleTotalChange = function handleTotalChange(number) {
@@ -581,195 +540,6 @@ var Info = function Info(_, ref) {
581
540
  return false;
582
541
  }, [state.renderType, isNormalProduct]);
583
542
  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]);
773
543
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
774
544
  titleNoWrap: true
775
545
  //通过zIndex的方式控制 添加商品 和 编辑服务弹窗的上下层级
@@ -777,7 +547,7 @@ var Info = function Info(_, ref) {
777
547
  zIndex: state.service.changeService ? 999 : 1000,
778
548
  forceRender: true,
779
549
  mask: state.drawerMask,
780
- open: state.service.editModal && !((_state$service$cacheI14 = state.service.cacheItem) !== null && _state$service$cacheI14 !== void 0 && _state$service$cacheI14.autoClose),
550
+ open: state.service.editModal && !((_state$service$cacheI6 = state.service.cacheItem) !== null && _state$service$cacheI6 !== void 0 && _state$service$cacheI6.autoClose),
781
551
  title: locales.getText('pisell2.text.edit-service'),
782
552
  onClose: function onClose() {
783
553
  dispatch({
@@ -800,6 +570,140 @@ var Info = function Info(_, ref) {
800
570
  width: '100%'
801
571
  },
802
572
  gutter: [16, 0]
803
- }, productName, price, reason, val && isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)));
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'))))));
804
708
  };
805
709
  export default /*#__PURE__*/forwardRef(Info);
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import '../../info/service/index.less';
3
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
4
+ export default _default;
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useContext, useMemo } from 'react';
1
+ import React, { useEffect, useContext } from 'react';
2
2
  import AddService from "./addService";
3
3
  import { Context } from "../../info/model";
4
4
  import EditService from "./editService";
@@ -24,23 +24,19 @@ var Service = function Service() {
24
24
  var clearCart = useClearCart(state, dispatch);
25
25
  var _useQuotation = useQuotation(state, dispatch),
26
26
  dom = _useQuotation.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);
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);
45
41
  };
46
42
  export default /*#__PURE__*/React.memo(Service);
@@ -0,0 +1,4 @@
1
+ export declare const getFormatResourceListAndMap: (data: any[], bookingId?: number[]) => {
2
+ list: any[];
3
+ listMap: any;
4
+ };