@pisell/private-materials 6.1.1 → 6.2.1

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 (480) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/businessModel/SalesModel/Sales/index.js +37 -4
  12. package/es/businessModel/SalesModel/index.d.ts +0 -1
  13. package/es/components/Sales/Cart/index.js +13 -4
  14. package/es/components/Sales/Cart/utils.d.ts +40 -0
  15. package/es/components/Sales/Cart/utils.js +171 -0
  16. package/es/components/Sales/Checkout/index.d.ts +4 -0
  17. package/es/components/Sales/Checkout/index.js +52 -8
  18. package/es/components/Sales/Checkout/serve.d.ts +13 -0
  19. package/es/components/Sales/Checkout/serve.js +16 -2
  20. package/es/components/Sales/Checkout/utils.d.ts +6 -1
  21. package/es/components/Sales/Checkout/utils.js +15 -4
  22. package/es/components/Sales/Customer/index.d.ts +1 -0
  23. package/es/components/Sales/Customer/index.js +1 -0
  24. package/es/components/Sales/Resource/index.js +2 -2
  25. package/es/components/Sales/Resource/serve.d.ts +7 -0
  26. package/es/components/Sales/Resource/serve.js +10 -0
  27. package/es/components/Sales/Summary/index.d.ts +10 -0
  28. package/es/components/Sales/Summary/index.js +17 -2
  29. package/es/components/Sales/Summary/serve.d.ts +1 -0
  30. package/es/components/Sales/Summary/serve.js +6 -0
  31. package/es/components/Sales/Summary/utils.d.ts +15 -0
  32. package/es/components/Sales/Summary/utils.js +43 -1
  33. package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  34. package/es/components/appointmentBooking/components/Content/index.js +15 -1
  35. package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  36. package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
  37. package/es/components/appointmentBooking/components/Form/index.js +1 -1
  38. package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  39. package/es/components/appointmentBooking/components/Form/utils.js +17 -15
  40. package/es/components/appointmentBooking/components/Header/index.js +2 -1
  41. package/es/components/appointmentBooking/components/Resource/index.js +1 -0
  42. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
  43. package/es/components/appointmentBooking/deposit/index.js +4 -2
  44. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  45. package/es/components/booking/components/footer/index.js +9 -33
  46. package/es/components/booking/components/footer/utils.d.ts +1 -0
  47. package/es/components/booking/components/footer/utils.js +47 -18
  48. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  49. package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  50. package/es/components/{pay/toB/store/provider.js → booking/components/reloadResourceModal/index.js} +48 -52
  51. package/es/components/booking/components/reloadResourceModal/index.less +6 -0
  52. package/es/components/booking/components/voucher/index.js +2 -2
  53. package/es/components/booking/editBookingModal/index.d.ts +5 -0
  54. package/es/components/booking/editBookingModal/index.js +386 -0
  55. package/es/components/booking/editBookingModal/index.less +8 -0
  56. package/es/components/booking/editBookingModal/locales.d.ts +21 -0
  57. package/es/components/booking/editBookingModal/locales.js +20 -0
  58. package/es/components/booking/editBookingModal/mock.d.ts +807 -0
  59. package/es/components/booking/editBookingModal/mock.js +2993 -0
  60. package/es/components/booking/editBookingModal/serve.d.ts +51 -0
  61. package/es/components/booking/editBookingModal/serve.js +288 -0
  62. package/es/components/booking/editBookingModal/type.d.ts +12 -0
  63. package/es/components/booking/editBookingModal/type.js +1 -0
  64. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  65. package/es/components/booking/editBookingModal/utils.js +157 -0
  66. package/es/components/booking/forms/table/index.d.ts +0 -1
  67. package/es/components/booking/hooks/useIsBooking4Shop.js +2 -2
  68. package/es/components/booking/info/addServiceVariant/index.js +2 -2
  69. package/es/components/booking/info/client/index.js +2 -2
  70. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  71. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  72. package/es/components/booking/info/hooks/useInfoHolder.js +8 -1
  73. package/es/components/booking/info/index.js +4 -5
  74. package/es/components/booking/info/model.js +5 -0
  75. package/es/components/booking/info/service/addService/index.js +2 -2
  76. package/es/components/booking/info/service/editService/index.js +1 -1
  77. package/es/components/booking/info/service/like/index.d.ts +0 -1
  78. package/es/components/booking/info/service/serviceManager/index.js +4 -4
  79. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  80. package/es/components/booking/info/service2/utils.d.ts +1 -1
  81. package/es/components/booking/info/service2/utils.js +6 -4
  82. package/es/components/booking/info/utils.js +1 -1
  83. package/es/components/booking/info2/index.js +37 -13
  84. package/es/components/booking/info2/service/addService/index.js +22 -9
  85. package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
  86. package/es/components/booking/info2/service/addService/utils.js +48 -14
  87. package/es/components/booking/info2/service/addTimeModal/index.js +32 -9
  88. package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
  89. package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
  90. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  91. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
  92. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  93. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
  94. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  95. package/es/components/booking/info2/service/editService/index.js +12 -15
  96. package/es/components/booking/info2/utils.js +13 -16
  97. package/es/components/booking/info2/utilsByBooking.js +10 -1
  98. package/es/components/booking/locales.d.ts +12 -0
  99. package/es/components/booking/locales.js +12 -0
  100. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  101. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  102. package/es/components/booking/model.d.ts +1 -0
  103. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  104. package/es/components/eftpos/form/index.d.ts +0 -1
  105. package/es/components/eftpos/group/index.d.ts +0 -1
  106. package/es/components/eftpos/hooks.d.ts +0 -1
  107. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  108. package/es/components/eftpos/icon/device.d.ts +0 -1
  109. package/es/components/eftpos/receipt/index.d.ts +0 -1
  110. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  111. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  112. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  113. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  114. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  115. package/es/components/eftposPay/const.d.ts +4 -1
  116. package/es/components/eftposPay/const.js +3 -1
  117. package/es/components/eftposPay/hooks.d.ts +2 -2
  118. package/es/components/eftposPay/hooks.js +3 -1
  119. package/es/components/eftposPay/index.js +1 -1
  120. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  121. package/es/components/eftposPay/linkly/const.js +82 -0
  122. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  123. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  124. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  125. package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
  126. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  127. package/es/components/{pay/toB/store/hooks.js → eftposPay/linkly/hooks/useTimeQuery.js} +252 -59
  128. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  129. package/es/components/eftposPay/linkly/index.js +197 -0
  130. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  131. package/es/components/eftposPay/linkly/service.js +81 -0
  132. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  133. package/es/components/eftposPay/manufacturer.js +4 -0
  134. package/es/components/eftposPay/pay.d.ts +1 -1
  135. package/es/components/eftposPay/pay.js +6 -2
  136. package/es/components/eftposPay/payo/config.js +30 -3
  137. package/es/components/eftposPay/store/index.d.ts +5 -5
  138. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  139. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +40 -19
  140. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  141. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  142. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  143. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  144. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  145. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  146. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  147. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  148. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  149. package/es/components/eventBooking/components/bookingDetailModal/index.js +22 -4
  150. package/es/components/eventBooking/index.js +21 -7
  151. package/es/components/eventBooking/locales.d.ts +24 -0
  152. package/es/components/eventBooking/locales.js +30 -6
  153. package/es/components/index.d.ts +3 -1
  154. package/es/components/index.js +3 -1
  155. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  156. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  157. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  158. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  159. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  160. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  161. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -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/productSelect/components/pisellPriceText/index.js +2 -3
  165. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  166. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  167. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  168. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  169. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  170. package/es/components/schedules/products/index.d.ts +0 -1
  171. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  172. package/es/components/schedules/utils.d.ts +1 -1
  173. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  174. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  175. package/es/components/stepController/components/Content/index.d.ts +7 -0
  176. package/es/components/stepController/components/Content/index.js +9 -0
  177. package/es/components/stepController/components/Content/index.less +8 -0
  178. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  179. package/es/components/stepController/components/Footer/index.js +15 -0
  180. package/es/components/stepController/components/Footer/index.less +39 -0
  181. package/es/components/stepController/components/Header/index.d.ts +20 -0
  182. package/es/components/stepController/components/Header/index.js +97 -0
  183. package/es/components/stepController/components/Header/index.less +21 -0
  184. package/es/components/stepController/index.d.ts +5 -0
  185. package/es/components/stepController/index.js +64 -0
  186. package/es/components/stepController/index.less +11 -0
  187. package/es/components/stepController/locales.d.ts +27 -0
  188. package/es/components/stepController/locales.js +32 -0
  189. package/es/components/stepController/types.d.ts +23 -0
  190. package/es/components/stepController/types.js +1 -0
  191. package/es/components/ticketBooking/components/addServiceVariant/addService.js +19 -9
  192. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  193. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  194. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  195. package/es/components/ticketBooking/components/ticketBooking/index.js +141 -142
  196. package/es/components/ticketBooking/index.js +4 -3
  197. package/es/components/ticketBooking/serve.d.ts +0 -1
  198. package/es/components/ticketBooking/serve.js +0 -26
  199. package/es/components/ticketBooking/utils/index.js +2 -1
  200. package/es/hooks/useWindowSize.d.ts +5 -0
  201. package/es/hooks/useWindowSize.js +26 -0
  202. package/es/index.d.ts +2 -1
  203. package/es/index.js +3 -2
  204. package/es/utils/index.d.ts +1 -1
  205. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  206. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  207. package/lib/components/Sales/Cart/index.js +9 -4
  208. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  209. package/lib/components/Sales/Cart/utils.js +120 -0
  210. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  211. package/lib/components/Sales/Checkout/index.js +39 -7
  212. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  213. package/lib/components/Sales/Checkout/serve.js +7 -2
  214. package/lib/components/Sales/Checkout/utils.d.ts +6 -1
  215. package/lib/components/Sales/Checkout/utils.js +7 -3
  216. package/lib/components/Sales/Customer/index.d.ts +1 -0
  217. package/lib/components/Sales/Customer/index.js +1 -0
  218. package/lib/components/Sales/Resource/index.js +1 -1
  219. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  220. package/lib/components/Sales/Resource/serve.js +9 -2
  221. package/lib/components/Sales/Summary/index.d.ts +10 -0
  222. package/lib/components/Sales/Summary/index.js +7 -1
  223. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  224. package/lib/components/Sales/Summary/serve.js +32 -0
  225. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  226. package/lib/components/Sales/Summary/utils.js +30 -1
  227. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  228. package/lib/components/appointmentBooking/components/Content/index.js +6 -1
  229. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  230. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  231. package/lib/components/appointmentBooking/components/Form/index.js +6 -1
  232. package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  233. package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
  234. package/lib/components/appointmentBooking/components/Header/index.js +1 -0
  235. package/lib/components/appointmentBooking/components/Resource/index.js +1 -0
  236. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  237. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  238. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  239. package/lib/components/booking/components/footer/index.js +4 -23
  240. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  241. package/lib/components/booking/components/footer/utils.js +27 -7
  242. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  243. package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  244. package/lib/components/booking/components/reloadResourceModal/index.js +74 -0
  245. package/lib/components/booking/components/reloadResourceModal/index.less +6 -0
  246. package/lib/components/booking/components/voucher/index.js +2 -2
  247. package/lib/components/booking/editBookingModal/index.d.ts +5 -0
  248. package/lib/components/booking/editBookingModal/index.js +363 -0
  249. package/lib/components/booking/editBookingModal/index.less +8 -0
  250. package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
  251. package/lib/components/booking/editBookingModal/locales.js +44 -0
  252. package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
  253. package/lib/components/booking/editBookingModal/mock.js +3314 -0
  254. package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
  255. package/lib/components/booking/editBookingModal/serve.js +178 -0
  256. package/lib/components/booking/editBookingModal/type.d.ts +12 -0
  257. package/lib/components/{pay/toB/store/context.js → booking/editBookingModal/type.js} +3 -18
  258. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  259. package/lib/components/booking/editBookingModal/utils.js +158 -0
  260. package/lib/components/booking/forms/table/index.d.ts +0 -1
  261. package/lib/components/booking/hooks/useIsBooking4Shop.js +2 -2
  262. package/lib/components/booking/info/addServiceVariant/index.js +3 -3
  263. package/lib/components/booking/info/client/index.js +19 -57
  264. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  265. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  266. package/lib/components/booking/info/hooks/useInfoHolder.js +6 -1
  267. package/lib/components/booking/info/index.js +6 -4
  268. package/lib/components/booking/info/model.js +3 -0
  269. package/lib/components/booking/info/service/addService/index.js +3 -3
  270. package/lib/components/booking/info/service/editService/index.js +1 -0
  271. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  272. package/lib/components/booking/info/service/serviceManager/index.js +3 -3
  273. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  274. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  275. package/lib/components/booking/info/service2/utils.js +5 -4
  276. package/lib/components/booking/info/utils.js +2 -1
  277. package/lib/components/booking/info2/index.js +54 -20
  278. package/lib/components/booking/info2/service/addService/index.js +20 -7
  279. package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
  280. package/lib/components/booking/info2/service/addService/utils.js +32 -5
  281. package/lib/components/booking/info2/service/addTimeModal/index.js +26 -10
  282. package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
  283. package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
  284. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  285. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
  286. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  287. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
  288. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  289. package/lib/components/booking/info2/service/editService/index.js +25 -28
  290. package/lib/components/booking/info2/utils.js +0 -15
  291. package/lib/components/booking/info2/utilsByBooking.js +7 -1
  292. package/lib/components/booking/locales.d.ts +12 -0
  293. package/lib/components/booking/locales.js +12 -0
  294. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  295. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  296. package/lib/components/booking/model.d.ts +1 -0
  297. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  298. package/lib/components/eftpos/form/index.d.ts +0 -1
  299. package/lib/components/eftpos/group/index.d.ts +0 -1
  300. package/lib/components/eftpos/hooks.d.ts +0 -1
  301. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  302. package/lib/components/eftpos/icon/device.d.ts +0 -1
  303. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  304. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  305. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  306. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  307. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  308. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  309. package/lib/components/eftposPay/const.d.ts +4 -1
  310. package/lib/components/eftposPay/const.js +2 -0
  311. package/lib/components/eftposPay/hooks.d.ts +2 -2
  312. package/lib/components/eftposPay/hooks.js +11 -4
  313. package/lib/components/eftposPay/index.js +1 -1
  314. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  315. package/lib/components/eftposPay/linkly/const.js +102 -0
  316. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  317. package/lib/components/{pay/toB/types → eftposPay/linkly/hooks}/index.js +7 -5
  318. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  319. package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
  320. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  321. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  322. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  323. package/lib/components/eftposPay/linkly/index.js +208 -0
  324. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  325. package/lib/components/eftposPay/linkly/service.js +55 -0
  326. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  327. package/lib/components/eftposPay/manufacturer.js +6 -0
  328. package/lib/components/eftposPay/pay.d.ts +1 -1
  329. package/lib/components/eftposPay/pay.js +13 -2
  330. package/lib/components/eftposPay/payo/config.js +22 -2
  331. package/lib/components/eftposPay/store/index.d.ts +5 -5
  332. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  333. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -8
  334. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  335. package/lib/components/{pay/toB/components → eventBooking/components/Provider/Cart/Deposit}/index.js +26 -22
  336. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  337. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  338. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  339. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  340. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  341. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  342. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  343. package/lib/components/eventBooking/components/bookingDetailModal/index.js +10 -4
  344. package/lib/components/eventBooking/index.js +11 -7
  345. package/lib/components/eventBooking/locales.d.ts +24 -0
  346. package/lib/components/eventBooking/locales.js +30 -6
  347. package/lib/components/index.d.ts +3 -1
  348. package/lib/components/index.js +6 -0
  349. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  350. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  351. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  352. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  353. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  354. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  355. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  356. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  357. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  358. package/lib/components/productSelect/components/pisellPriceText/index.js +2 -8
  359. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  360. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  361. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  362. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  363. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  364. package/lib/components/schedules/products/index.d.ts +0 -1
  365. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  366. package/lib/components/schedules/utils.d.ts +1 -1
  367. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  368. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  369. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  370. package/lib/components/{pay/toB/components/Content/Header.js → stepController/components/Content/index.js} +9 -9
  371. package/lib/components/stepController/components/Content/index.less +8 -0
  372. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  373. package/lib/components/{pay/toB/components/CardGroup → stepController/components/Footer}/index.js +17 -11
  374. package/lib/components/stepController/components/Footer/index.less +39 -0
  375. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  376. package/lib/components/stepController/components/Header/index.js +104 -0
  377. package/lib/components/stepController/components/Header/index.less +21 -0
  378. package/lib/components/stepController/index.d.ts +5 -0
  379. package/lib/components/stepController/index.js +89 -0
  380. package/lib/components/stepController/index.less +11 -0
  381. package/lib/components/stepController/locales.d.ts +27 -0
  382. package/lib/components/stepController/locales.js +50 -0
  383. package/lib/components/stepController/types.d.ts +23 -0
  384. package/lib/components/{pay/toB/store/index.js → stepController/types.js} +3 -13
  385. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +22 -11
  386. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  387. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  388. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  389. package/lib/components/ticketBooking/components/ticketBooking/index.js +147 -143
  390. package/lib/components/ticketBooking/index.js +5 -16
  391. package/lib/components/ticketBooking/serve.d.ts +0 -1
  392. package/lib/components/ticketBooking/serve.js +0 -11
  393. package/lib/components/ticketBooking/utils/index.js +2 -1
  394. package/lib/hooks/useWindowSize.d.ts +5 -0
  395. package/lib/hooks/useWindowSize.js +51 -0
  396. package/lib/index.d.ts +2 -1
  397. package/lib/index.js +6 -3
  398. package/lib/utils/index.d.ts +1 -1
  399. package/lowcode/edit-booking-modal/meta.ts +53 -0
  400. package/lowcode/step-controller/meta.ts +88 -0
  401. package/package.json +3 -3
  402. package/es/components/pay/toB/components/Cache/index.d.ts +0 -10
  403. package/es/components/pay/toB/components/Cache/index.js +0 -94
  404. package/es/components/pay/toB/components/Cache/index.less +0 -41
  405. package/es/components/pay/toB/components/Card/index.d.ts +0 -7
  406. package/es/components/pay/toB/components/Card/index.js +0 -32
  407. package/es/components/pay/toB/components/Card/index.less +0 -26
  408. package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -7
  409. package/es/components/pay/toB/components/CardGroup/index.js +0 -22
  410. package/es/components/pay/toB/components/CardGroup/index.less +0 -18
  411. package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -6
  412. package/es/components/pay/toB/components/ConfirmedPayment/index.js +0 -67
  413. package/es/components/pay/toB/components/ConfirmedPayment/index.less +0 -69
  414. package/es/components/pay/toB/components/Content/Footer.d.ts +0 -7
  415. package/es/components/pay/toB/components/Content/Footer.js +0 -36
  416. package/es/components/pay/toB/components/Content/Header.d.ts +0 -4
  417. package/es/components/pay/toB/components/Content/Header.js +0 -12
  418. package/es/components/pay/toB/components/Content/index.d.ts +0 -4
  419. package/es/components/pay/toB/components/Content/index.js +0 -277
  420. package/es/components/pay/toB/components/Content/index.less +0 -9
  421. package/es/components/pay/toB/components/Content/utils.d.ts +0 -16
  422. package/es/components/pay/toB/components/Content/utils.js +0 -76
  423. package/es/components/pay/toB/components/index.d.ts +0 -5
  424. package/es/components/pay/toB/components/index.js +0 -5
  425. package/es/components/pay/toB/hooks.d.ts +0 -12
  426. package/es/components/pay/toB/hooks.js +0 -30
  427. package/es/components/pay/toB/index.d.ts +0 -3
  428. package/es/components/pay/toB/index.js +0 -24
  429. package/es/components/pay/toB/locales.d.ts +0 -54
  430. package/es/components/pay/toB/locales.js +0 -65
  431. package/es/components/pay/toB/store/context.d.ts +0 -3
  432. package/es/components/pay/toB/store/context.js +0 -2
  433. package/es/components/pay/toB/store/hooks.d.ts +0 -15
  434. package/es/components/pay/toB/store/index.d.ts +0 -3
  435. package/es/components/pay/toB/store/index.js +0 -3
  436. package/es/components/pay/toB/store/provider.d.ts +0 -4
  437. package/es/components/pay/toB/store/utils.d.ts +0 -13
  438. package/es/components/pay/toB/store/utils.js +0 -66
  439. package/es/components/pay/toB/types/index.d.ts +0 -1
  440. package/es/components/pay/toB/types/index.js +0 -1
  441. package/es/components/pay/toB/types/storeTypes.d.ts +0 -141
  442. package/es/components/pay/toB/types/storeTypes.js +0 -24
  443. package/lib/components/pay/toB/components/Cache/index.d.ts +0 -10
  444. package/lib/components/pay/toB/components/Cache/index.js +0 -108
  445. package/lib/components/pay/toB/components/Cache/index.less +0 -41
  446. package/lib/components/pay/toB/components/Card/index.d.ts +0 -7
  447. package/lib/components/pay/toB/components/Card/index.js +0 -66
  448. package/lib/components/pay/toB/components/Card/index.less +0 -26
  449. package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -7
  450. package/lib/components/pay/toB/components/CardGroup/index.less +0 -18
  451. package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -6
  452. package/lib/components/pay/toB/components/ConfirmedPayment/index.js +0 -77
  453. package/lib/components/pay/toB/components/ConfirmedPayment/index.less +0 -69
  454. package/lib/components/pay/toB/components/Content/Footer.d.ts +0 -7
  455. package/lib/components/pay/toB/components/Content/Footer.js +0 -63
  456. package/lib/components/pay/toB/components/Content/Header.d.ts +0 -4
  457. package/lib/components/pay/toB/components/Content/index.d.ts +0 -4
  458. package/lib/components/pay/toB/components/Content/index.js +0 -209
  459. package/lib/components/pay/toB/components/Content/index.less +0 -9
  460. package/lib/components/pay/toB/components/Content/utils.d.ts +0 -16
  461. package/lib/components/pay/toB/components/Content/utils.js +0 -91
  462. package/lib/components/pay/toB/components/index.d.ts +0 -5
  463. package/lib/components/pay/toB/hooks.d.ts +0 -12
  464. package/lib/components/pay/toB/hooks.js +0 -60
  465. package/lib/components/pay/toB/index.d.ts +0 -3
  466. package/lib/components/pay/toB/index.js +0 -54
  467. package/lib/components/pay/toB/locales.d.ts +0 -54
  468. package/lib/components/pay/toB/locales.js +0 -77
  469. package/lib/components/pay/toB/store/context.d.ts +0 -3
  470. package/lib/components/pay/toB/store/hooks.d.ts +0 -15
  471. package/lib/components/pay/toB/store/hooks.js +0 -85
  472. package/lib/components/pay/toB/store/index.d.ts +0 -3
  473. package/lib/components/pay/toB/store/provider.d.ts +0 -4
  474. package/lib/components/pay/toB/store/provider.js +0 -70
  475. package/lib/components/pay/toB/store/utils.d.ts +0 -13
  476. package/lib/components/pay/toB/store/utils.js +0 -72
  477. package/lib/components/pay/toB/types/index.d.ts +0 -1
  478. package/lib/components/pay/toB/types/storeTypes.d.ts +0 -141
  479. package/lib/components/pay/toB/types/storeTypes.js +0 -36
  480. package/lowcode/tob-pay/meta.ts +0 -44
@@ -281,13 +281,13 @@ var Info = (props) => {
281
281
  return ((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) > 0;
282
282
  }, [state.service.value]);
283
283
  (0, import_react.useEffect)(() => {
284
- var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j;
284
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g;
285
285
  if (shopList.includes(
286
- ((_c2 = (_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.getData) == null ? void 0 : _c2.call(_b2, "shop_id")) || ((_h = (_g = (_f2 = (_e2 = (_d2 = context.appHelper.utils.store) == null ? void 0 : _d2.getState) == null ? void 0 : _e2.call(_d2)) == null ? void 0 : _f2.global) == null ? void 0 : _g.globalConfig) == null ? void 0 : _h.id)
286
+ (_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
287
287
  ) || state.closeAutoOpenService) {
288
288
  return;
289
289
  }
290
- if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_j = (_i = state.service) == null ? void 0 : _i.value) == null ? void 0 : _j.length) === 0) {
290
+ if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f2 = state.service) == null ? void 0 : _f2.value) == null ? void 0 : _g.length) === 0) {
291
291
  setTimeout(() => {
292
292
  handleSelectService();
293
293
  }, 10);
@@ -455,6 +455,7 @@ var Info = (_, ref) => {
455
455
  const other = JSON.parse(JSON.stringify(e2));
456
456
  other.session = e2.session;
457
457
  let cacheItem = {
458
+ ...item,
458
459
  ..._detail,
459
460
  product_id: item.id,
460
461
  _id: item == null ? void 0 : item._id,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -143,9 +143,9 @@ var useService = ({
143
143
  }
144
144
  const resourceItem = currentResource(changeValues.resource);
145
145
  const { relation_type, item_id, schedule_id } = ((_a2 = resourceItem == null ? void 0 : resourceItem._extend) == null ? void 0 : _a2.usableTime) || {};
146
- _extend.relation_type = relation_type || "form";
147
- _extend.relation_id = item_id || (resourceItem == null ? void 0 : resourceItem.form_record_id) || 0;
148
- _extend.schedule_id = schedule_id || 0;
146
+ _extend.relation_type = relation_type || (_extend == null ? void 0 : _extend.relation_type) || "form";
147
+ _extend.relation_id = item_id || (resourceItem == null ? void 0 : resourceItem.form_record_id) || (_extend == null ? void 0 : _extend.relation_id) || 0;
148
+ _extend.schedule_id = schedule_id || (_extend == null ? void 0 : _extend.schedule_id) || 0;
149
149
  if (_extend.bundle_edit !== void 0) {
150
150
  _extend.bundle_edit = 1;
151
151
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
247
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -377,12 +377,13 @@ var formatBundle = (bundle) => {
377
377
  var formatOptions = (options) => {
378
378
  if (!(options == null ? void 0 : options.length)) return [];
379
379
  return options.map((item) => {
380
+ const price = Number((item == null ? void 0 : item.price) || (item == null ? void 0 : item.add_price));
380
381
  return {
381
382
  id: item == null ? void 0 : item.id,
382
383
  name: item == null ? void 0 : item.name,
383
384
  num: item == null ? void 0 : item.num,
384
- price: item == null ? void 0 : item.price,
385
- total: item == null ? void 0 : item.price,
385
+ price,
386
+ total: price,
386
387
  origin_total: item == null ? void 0 : item.original_price
387
388
  };
388
389
  });
@@ -422,7 +423,7 @@ var getErrorMessageInfo2 = (errorList) => {
422
423
  };
423
424
  var getAllErrorList = (item) => {
424
425
  const { resourceMaps } = item._data || {};
425
- const { resource } = item._extend || {};
426
+ const { resource = {} } = item._extend || {};
426
427
  const errorList = [];
427
428
  Object.entries(resource).forEach(([key, value]) => {
428
429
  value.forEach((val) => {
@@ -437,7 +438,7 @@ var getAllErrorList = (item) => {
437
438
  var mapListItems = (items) => items.map((item) => ({
438
439
  id: item.id || item.form_record_id,
439
440
  label: item.labelText,
440
- isError: !item.usable
441
+ isError: !item.usable || item.unbound
441
442
  }));
442
443
  var getIsSubjectRequire = (state) => {
443
444
  var _a, _b, _c, _d, _e, _f, _g;
@@ -142,7 +142,8 @@ var isBooking4Shop = (shopId, renderType) => {
142
142
  6988,
143
143
  8872,
144
144
  6930,
145
- 8824
145
+ 8824,
146
+ 8913
146
147
  ];
147
148
  return booking4Shops.includes(shopId);
148
149
  };
@@ -44,6 +44,7 @@ var import_addNote = __toESM(require("../notes/addNote"));
44
44
  var import_header = __toESM(require("../info/header"));
45
45
  var import_locales = __toESM(require("../locales"));
46
46
  var import_utils = require("@pisell/utils");
47
+ var import_reloadResourceModal = __toESM(require("../components/reloadResourceModal"));
47
48
  var import_utils2 = require("../utils");
48
49
  var import_utilsByBooking = require("./utilsByBooking");
49
50
  var import_utilsByBooking2 = require("./utilsByBooking");
@@ -163,35 +164,68 @@ var Info = (0, import_model.Provider)((props) => {
163
164
  });
164
165
  }
165
166
  }
166
- try {
167
+ return new Promise((resolve, reject) => {
167
168
  setTimeout(async () => {
168
169
  var _a2, _b2, _c2, _d2;
169
- let data = await (0, import_serve.getResourceList)({
170
- date: currentDate
171
- }, (_d2 = (_c2 = (_b2 = (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.map) == null ? void 0 : _d2.call(_c2, (item) => item == null ? void 0 : item.booking_id));
172
- data.date = currentDate;
173
- localStorage.setItem("bookingResourceList", JSON.stringify(data));
170
+ try {
171
+ let data = await (0, import_serve.getResourceList)(
172
+ {
173
+ date: currentDate
174
+ },
175
+ (_d2 = (_c2 = (_b2 = (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.map) == null ? void 0 : _d2.call(_c2, (item) => item == null ? void 0 : item.booking_id)
176
+ );
177
+ data.date = currentDate;
178
+ localStorage.setItem("bookingResourceList", JSON.stringify(data));
179
+ modal.dispatch({
180
+ type: "setService",
181
+ payload: {
182
+ ...stateRef.current.service,
183
+ resourcesOrigin: data.list || [],
184
+ resourcesOriginMap: data.listMap,
185
+ reloadResourceModal: false
186
+ }
187
+ });
188
+ resolve(data);
189
+ } catch (error) {
190
+ modal.dispatch({
191
+ type: "setService",
192
+ payload: {
193
+ ...stateRef.current.service,
194
+ reloadResourceModal: true
195
+ }
196
+ });
197
+ reject(error);
198
+ }
199
+ }, timeoutNumber);
200
+ });
201
+ };
202
+ (0, import_ahooks.useDebounceEffect)(
203
+ () => {
204
+ if (currentDate) {
205
+ getResourcesData();
206
+ }
207
+ },
208
+ [currentDate],
209
+ {
210
+ wait: 300
211
+ }
212
+ );
213
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
214
+ import_reloadResourceModal.default,
215
+ {
216
+ modal,
217
+ onReload: getResourcesData,
218
+ onCancel: () => {
174
219
  modal.dispatch({
175
220
  type: "setService",
176
221
  payload: {
177
222
  ...stateRef.current.service,
178
- resourcesOrigin: data.list || [],
179
- resourcesOriginMap: data.listMap
223
+ reloadResourceModal: false
180
224
  }
181
225
  });
182
- }, timeoutNumber);
183
- } catch (err) {
184
- console.log(err, "err");
185
- }
186
- };
187
- (0, import_ahooks.useDebounceEffect)(() => {
188
- if (currentDate) {
189
- getResourcesData();
226
+ }
190
227
  }
191
- }, [currentDate], {
192
- wait: 300
193
- });
194
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
228
+ ), !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
195
229
  import_tabPane.default,
196
230
  {
197
231
  style,
@@ -47,7 +47,8 @@ var import_utils2 = require("./utils");
47
47
  var import_utils3 = require("../../../utils");
48
48
  var import_utils4 = require("@pisell/utils");
49
49
  var import_ahooks = require("ahooks");
50
- var import_utils5 = require("../../../../ticketBooking/utils");
50
+ var import_utils5 = require("../../../info/service2/utils");
51
+ var import_utils6 = require("../../../../ticketBooking/utils");
51
52
  var shopList = [
52
53
  2886,
53
54
  4422,
@@ -187,7 +188,19 @@ var Info = (props) => {
187
188
  }
188
189
  };
189
190
  const handleSelectProduct = (item, type) => {
190
- var _a2, _b2;
191
+ var _a2, _b2, _c2;
192
+ if (!(0, import_utils5.isNormalProductByDurationSchedule)(item)) {
193
+ if (!Array.isArray((_a2 = state.service) == null ? void 0 : _a2.resourcesOrigin) || !state.service.resourcesOrigin.length) {
194
+ dispatch({
195
+ type: "setService",
196
+ payload: {
197
+ ...state.service,
198
+ reloadResourceModal: true
199
+ }
200
+ });
201
+ return;
202
+ }
203
+ }
191
204
  const isSession = (0, import_utils3.isSessionProduct)(item);
192
205
  const isEject = (0, import_utils3.getIsEject)(item, type);
193
206
  const isOnlySession = (0, import_utils3.getIsOnlySession)(item);
@@ -202,12 +215,12 @@ var Info = (props) => {
202
215
  session: isSession,
203
216
  variant: true,
204
217
  package: true,
205
- number: (0, import_utils5.getIsShowNumber)(item, state)
218
+ number: (0, import_utils6.getIsShowNumber)(item, state)
206
219
  },
207
220
  is_eject: isEject ? 1 : 0,
208
221
  isOnlySession,
209
222
  isOS: isSession,
210
- customer_id: (_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id
223
+ customer_id: (_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id
211
224
  },
212
225
  callback: (e, extension_type, detail) => {
213
226
  var _a3;
@@ -303,13 +316,13 @@ var Info = (props) => {
303
316
  return state.service.value.length > 0;
304
317
  }, [state.service.value]);
305
318
  (0, import_react.useEffect)(() => {
306
- var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j;
319
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g;
307
320
  if (shopList.includes(
308
- ((_c2 = (_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.getData) == null ? void 0 : _c2.call(_b2, "shop_id")) || ((_h = (_g = (_f2 = (_e2 = (_d2 = context.appHelper.utils.store) == null ? void 0 : _d2.getState) == null ? void 0 : _e2.call(_d2)) == null ? void 0 : _f2.global) == null ? void 0 : _g.globalConfig) == null ? void 0 : _h.id)
321
+ (_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
309
322
  ) || state.closeAutoOpenService) {
310
323
  return;
311
324
  }
312
- if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_j = (_i = state.service) == null ? void 0 : _i.value) == null ? void 0 : _j.length) === 0) {
325
+ if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f2 = state.service) == null ? void 0 : _f2.value) == null ? void 0 : _g.length) === 0) {
313
326
  setTimeout(() => {
314
327
  handleSelectService();
315
328
  }, 10);
@@ -69,6 +69,16 @@ export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
69
69
  * @Date: 2024-09-19 20:26
70
70
  */
71
71
  export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any;
72
+ /**
73
+ * @title: 将商品内关联的资源id还原成数据
74
+ * @description:
75
+ * @param {any} resourcesOriginMap
76
+ * @param {any} cacheItem
77
+ * @return {*}
78
+ * @Author: zhiwei.Wang
79
+ * @Date: 2024-09-19 20:23
80
+ */
81
+ export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
72
82
  /**
73
83
  * @title: 预生成服务的 extend
74
84
  * @description:
@@ -33,6 +33,7 @@ __export(utils_exports, {
33
33
  getDurationProps: () => getDurationProps,
34
34
  getFlexibleOption: () => getFlexibleOption,
35
35
  getProductExtend: () => getProductExtend,
36
+ getResourceByIds: () => getResourceByIds,
36
37
  getTimeObj: () => getTimeObj,
37
38
  getTimeSlices: () => getTimeSlices,
38
39
  getUsableTime: () => getUsableTime,
@@ -177,8 +178,12 @@ var formatResources = ({ cacheItem, resourcesOrigin, id }) => {
177
178
  let _item = (0, import_lodash.cloneDeep)(item);
178
179
  _item.renderList = _item.renderList.map((d) => {
179
180
  let res = (0, import_utilsByBooking.formatResource)(d, _cacheItem, (newData) => {
180
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), newData.labelText, !newData.usable && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
181
+ let unbound = !item.optional_resource.includes(newData.id) && !item.default_resource.includes(newData.id) && newData.id !== 0;
182
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "resource-option-label-text" }, newData.labelText), (!newData.usable || unbound) && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
181
183
  });
184
+ if (!item.optional_resource.includes(d.id) && !item.default_resource.includes(d.id) && d.id !== 0) {
185
+ res.unbound = true;
186
+ }
182
187
  renderListMaps[res.id] = res;
183
188
  return res;
184
189
  }).sort((a, b) => b.usable ? 1 : -1);
@@ -280,12 +285,17 @@ var setDefaultCapacitys = ({ capacitys, cacheItem }) => {
280
285
  }
281
286
  return [{ id: 0, value: 1, name: "" }];
282
287
  };
283
- var getResourceByIds = (resourcesOriginMap, cacheItem) => {
288
+ var getResourceByIds = (resourcesOriginMap, cacheItem, extraParams) => {
284
289
  var _a;
285
290
  let _resources = [...((_a = cacheItem == null ? void 0 : cacheItem.product_resource) == null ? void 0 : _a.resources) || []];
291
+ const { extraResources = [] } = extraParams || {};
286
292
  _resources = _resources.filter((d) => d.status == 1);
287
293
  for (let item of _resources) {
288
294
  const form_id = item.id;
295
+ let extraResourceIds = extraResources.filter((_extraItem) => {
296
+ return _extraItem.form_id === form_id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
297
+ }).map((_extraItem) => _extraItem.id);
298
+ extraResourceIds = Array.from(new Set(extraResourceIds));
289
299
  item.optional_resource = (item.optional_resource || []).filter(
290
300
  (d) => item.default_resource.indexOf(d) == -1
291
301
  );
@@ -294,8 +304,12 @@ var getResourceByIds = (resourcesOriginMap, cacheItem) => {
294
304
  if (resourcesOriginMap[d].combined_resource && resourcesOriginMap[d].combined_resource.status === 1) {
295
305
  resourcesOriginMap[d].combined_resource.resource_ids.forEach(
296
306
  (id) => {
307
+ var _a2, _b;
297
308
  if (resourcesOriginMap[id]) {
298
- combiningResources.push(resourcesOriginMap[id]);
309
+ combiningResources.push({
310
+ ...resourcesOriginMap[id],
311
+ relation_id: ((_a2 = resourcesOriginMap[id]) == null ? void 0 : _a2.relation_id) || ((_b = resourcesOriginMap[id]) == null ? void 0 : _b.id)
312
+ });
299
313
  }
300
314
  }
301
315
  );
@@ -308,7 +322,7 @@ var getResourceByIds = (resourcesOriginMap, cacheItem) => {
308
322
  }
309
323
  };
310
324
  };
311
- let optional_resource = item.optional_resource.map((d) => {
325
+ let optional_resource = [...item.optional_resource, ...extraResourceIds].map((d) => {
312
326
  if (!resourcesOriginMap[d]) {
313
327
  return null;
314
328
  }
@@ -417,9 +431,21 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
417
431
  _cacheItem._data.capacitys = cacheItem.capacity;
418
432
  }
419
433
  if (!_cacheItem._data.resourcesOrigin) {
434
+ const extraResources = [];
435
+ if (Array.isArray(_cacheItem._extend.event_resources)) {
436
+ _cacheItem._extend.event_resources.forEach((_item) => {
437
+ extraResources.push({
438
+ form_id: _item.form_id,
439
+ id: _item.relation_id
440
+ });
441
+ });
442
+ }
420
443
  _cacheItem._data.resourcesOrigin = getResourceByIds(
421
444
  resourcesOriginMap,
422
- cacheItem
445
+ cacheItem,
446
+ {
447
+ extraResources
448
+ }
423
449
  );
424
450
  }
425
451
  if (!_cacheItem._data.resources) {
@@ -458,6 +484,7 @@ var transServiceList = (list) => {
458
484
  getDurationProps,
459
485
  getFlexibleOption,
460
486
  getProductExtend,
487
+ getResourceByIds,
461
488
  getTimeObj,
462
489
  getTimeSlices,
463
490
  getUsableTime,
@@ -59,6 +59,7 @@ var AddTimeModal = () => {
59
59
  var _a, _b, _c, _d, _e, _f, _g, _h;
60
60
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
61
61
  const [isEdit, setIsEdit] = (0, import_react.useState)(false);
62
+ const loadingRef = (0, import_react.useRef)(false);
62
63
  const [loading, setLoading] = (0, import_react.useState)("");
63
64
  const [recordKey, setRecordKey] = (0, import_react.useState)("");
64
65
  const [number, setNumber] = (0, import_react.useState)(1);
@@ -192,7 +193,11 @@ var AddTimeModal = () => {
192
193
  status: "published"
193
194
  },
194
195
  {
195
- useCache: true
196
+ useCache: true,
197
+ retry: {
198
+ count: 3,
199
+ delay: 500
200
+ }
196
201
  }
197
202
  );
198
203
  return (data == null ? void 0 : data.list) || [];
@@ -226,12 +231,14 @@ var AddTimeModal = () => {
226
231
  let productId = list[0].id;
227
232
  let time = list[0].times[0].value;
228
233
  setRecordKey(import_utils2.addTimeRowKey.create(productId, time));
234
+ updateServices.run();
229
235
  } catch (err) {
230
236
  }
231
237
  };
232
238
  (0, import_ahooks.useUpdateEffect)(() => {
233
239
  if (state.service.addTimeModal) {
234
240
  getTimeProducts();
241
+ loadingRef.current = false;
235
242
  originServices.current = state.service;
236
243
  } else {
237
244
  updateServices.run();
@@ -382,22 +389,31 @@ var AddTimeModal = () => {
382
389
  goCheckout();
383
390
  };
384
391
  const handleSave = async (loadingType = "save") => {
385
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
392
+ var _a2, _b2, _c2, _d2, _e2;
386
393
  if (currentTime === null) {
387
394
  return;
388
395
  }
396
+ if (loadingRef.current) {
397
+ return;
398
+ }
399
+ loadingRef.current = true;
389
400
  setLoading(loadingType);
390
401
  const api = (0, import_utils4.isBooking4Shop)(
391
- ((_c2 = (_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.getData) == null ? void 0 : _c2.call(_b2, "shop_id")) || ((_h2 = (_g2 = (_f2 = (_e2 = (_d2 = context.appHelper.utils.store) == null ? void 0 : _d2.getState) == null ? void 0 : _e2.call(_d2)) == null ? void 0 : _f2.global) == null ? void 0 : _g2.globalConfig) == null ? void 0 : _h2.id),
402
+ (_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id,
392
403
  state.renderType
393
404
  ) ? import_serve.saveAddTimeProduct2 : import_serve.saveAddTimeProduct;
394
- await api({
395
- orderId: state.bookingId,
396
- params: {
397
- ...newService,
398
- _extend: void 0
399
- }
400
- });
405
+ try {
406
+ await api({
407
+ orderId: state.bookingId,
408
+ params: {
409
+ ...newService,
410
+ _extend: void 0
411
+ }
412
+ });
413
+ loadingRef.current = false;
414
+ } catch (err) {
415
+ loadingRef.current = false;
416
+ }
401
417
  setLoading("");
402
418
  import_antd.message.success(import_utils.locales.getText("page.booking.text.add-time-success"));
403
419
  onCancel();
@@ -43,7 +43,20 @@ var import_lodash = require("lodash");
43
43
  var import_utils2 = require("../utils");
44
44
  var import_ahooks = require("ahooks");
45
45
  var import_icons = require("@ant-design/icons");
46
- var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref) => {
46
+ var Resources = ({
47
+ state,
48
+ cacheItem,
49
+ getCurrentCacheItem,
50
+ onChange,
51
+ value,
52
+ config = {
53
+ // 是否显示自动分配
54
+ autoAllocation: true,
55
+ // 是否显示资源错误图标
56
+ resourceErrorIcon: true,
57
+ disabled: false
58
+ }
59
+ }, ref) => {
47
60
  var _a, _b;
48
61
  const [showError, setShowError] = (0, import_react.useState)(false);
49
62
  const update = (0, import_ahooks.useUpdate)();
@@ -134,7 +147,7 @@ var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref
134
147
  );
135
148
  });
136
149
  },
137
- []
150
+ [config == null ? void 0 : config.resourceErrorIcon]
138
151
  );
139
152
  const check = () => {
140
153
  var _a2;
@@ -166,6 +179,7 @@ var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref
166
179
  {
167
180
  label: item.title,
168
181
  required: true,
182
+ labelCol: config == null ? void 0 : config.labelCol,
169
183
  extra: showError && item.select_type.min > (cur == null ? void 0 : cur.length) ? /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#ff4d4f" } }, import_utils.locales.getText(
170
184
  "page.booking.text.resource.min-length-error"
171
185
  )(item.select_type.min, item.title)) : void 0
@@ -173,9 +187,12 @@ var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref
173
187
  /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, item.select_type.type === "multiple" ? null : /* @__PURE__ */ import_react.default.createElement(
174
188
  import_antd.Button,
175
189
  {
176
- className: "resource-col-like-wrap",
190
+ className: `resource-col-like-wrap ${(config == null ? void 0 : config.disabled) ? "resource-col-like-wrap-disabled" : ""}`,
177
191
  onClick: () => {
178
192
  var _a3;
193
+ if (config == null ? void 0 : config.disabled) {
194
+ return;
195
+ }
179
196
  setLikeStatus(
180
197
  ((_a3 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a3.like_status) === "like" ? "common" : "like",
181
198
  item.form_id,
@@ -183,7 +200,13 @@ var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref
183
200
  );
184
201
  }
185
202
  },
186
- /* @__PURE__ */ import_react.default.createElement(import_like.default, { status: (_a2 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a2.like_status })
203
+ /* @__PURE__ */ import_react.default.createElement(
204
+ import_like.default,
205
+ {
206
+ status: (_a2 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a2.like_status,
207
+ className: `${(config == null ? void 0 : config.disabled) ? "like-icon-disabled" : ""}`
208
+ }
209
+ )
187
210
  ), /* @__PURE__ */ import_react.default.createElement(
188
211
  import_MaxLengthSelect.default,
189
212
  {
@@ -204,14 +227,35 @@ var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref
204
227
  showSearch: true,
205
228
  filterOption: (str, option) => {
206
229
  return ((option == null ? void 0 : option.labelText) || "").toLowerCase().includes((str || "").toLowerCase());
230
+ },
231
+ disabled: config == null ? void 0 : config.disabled
232
+ },
233
+ renderOptions(
234
+ item.renderList,
235
+ "id",
236
+ (config == null ? void 0 : config.resourceErrorIcon) ? "label" : "labelText",
237
+ "resource"
238
+ )
239
+ ), (config == null ? void 0 : config.autoAllocation) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
240
+ import_antd.Checkbox,
241
+ {
242
+ checked: getIsAutoAllocation(item.form_id),
243
+ onChange: (e) => {
244
+ handleCheckAutoAllocation(
245
+ item.form_id,
246
+ e.target.checked
247
+ );
207
248
  }
249
+ }
250
+ ), /* @__PURE__ */ import_react.default.createElement(
251
+ import_antd.Tooltip,
252
+ {
253
+ title: import_utils.locales.getText(
254
+ "page.booking.text.resource.check-auto-allocation-tip"
255
+ )
208
256
  },
209
- renderOptions(item.renderList, "id", "label", "resource")
210
- ), /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, { checked: getIsAutoAllocation(item.form_id), onChange: (e) => {
211
- handleCheckAutoAllocation(item.form_id, e.target.checked);
212
- } }), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: import_utils.locales.getText(
213
- "page.booking.text.resource.check-auto-allocation-tip"
214
- ) }, /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)))
257
+ /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)
258
+ )) : null)
215
259
  ), state.renderType !== "eventBooking" && (errors || []).map((d) => {
216
260
  return /* @__PURE__ */ import_react.default.createElement(
217
261
  import_antd.Alert,
@@ -15,6 +15,12 @@
15
15
  .like-resource {}
16
16
  }
17
17
 
18
+ .resource-col-like-wrap-disabled,
19
+ .like-icon-disabled {
20
+ opacity: 0.5;
21
+ cursor: not-allowed;
22
+ }
23
+
18
24
  .resource-col-select {
19
25
  flex: 1;
20
26
  }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { SelectProps } from 'antd';
3
+ interface MaxLengthSelectProps<T> extends SelectProps<T> {
4
+ maxLength: number;
5
+ }
6
+ declare const _default: import("react").ForwardRefExoticComponent<Partial<MaxLengthSelectProps<any>> & import("react").RefAttributes<unknown>>;
7
+ export default _default;
@@ -0,0 +1,53 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.tsx
20
+ var MaxLengthSelect_exports = {};
21
+ __export(MaxLengthSelect_exports, {
22
+ default: () => MaxLengthSelect_default
23
+ });
24
+ module.exports = __toCommonJS(MaxLengthSelect_exports);
25
+ var import_react = require("react");
26
+ var import_antd = require("antd");
27
+ var MaxLengthSelect = (props, ref) => {
28
+ (0, import_react.useImperativeHandle)(ref, () => {
29
+ return {
30
+ onChange: handleChange
31
+ };
32
+ });
33
+ const handleChange = (e, _option) => {
34
+ if (props.onChange) {
35
+ if ((props.mode === "multiple" || props.mode === "tags") && props.maxLength) {
36
+ if (props.value && props.value.length >= props.maxLength && e.length > props.value.length) {
37
+ return;
38
+ }
39
+ }
40
+ props.onChange(e, _option);
41
+ }
42
+ };
43
+ return /* @__PURE__ */ React.createElement(
44
+ import_antd.Select,
45
+ {
46
+ ...props,
47
+ onChange: handleChange,
48
+ popupMatchSelectWidth: false
49
+ },
50
+ props.children
51
+ );
52
+ };
53
+ var MaxLengthSelect_default = (0, import_react.forwardRef)(MaxLengthSelect);
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface IResourcesProps {
4
+ [key: string]: any;
5
+ /** 展示资源的变动情况 */
6
+ originCacheItem: any;
7
+ originValue: any;
8
+ }
9
+ declare const _default: React.ForwardRefExoticComponent<Omit<IResourcesProps, "ref"> & React.RefAttributes<unknown>>;
10
+ export default _default;