@pisell/private-materials 3.3.75 → 3.3.76

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 (436) 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.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/businessModel/SalesModel/Sales/index.js +4 -37
  12. package/es/businessModel/SalesModel/index.d.ts +1 -0
  13. package/es/components/Sales/Resource/index.js +2 -2
  14. package/es/components/Sales/Resource/serve.d.ts +0 -7
  15. package/es/components/Sales/Resource/serve.js +0 -10
  16. package/es/components/Sales/Summary/utils.d.ts +1 -1
  17. package/es/components/appointmentBooking/components/Cart/Item/index.js +2 -4
  18. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  19. package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
  20. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  21. package/es/components/appointmentBooking/components/Date/index.js +14 -24
  22. package/es/components/appointmentBooking/components/Header/index.js +14 -8
  23. package/es/components/appointmentBooking/components/Services/index.js +36 -38
  24. package/es/components/appointmentBooking/components/Voucher/index.js +0 -13
  25. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +7 -6
  26. package/es/components/appointmentBooking/index.js +0 -14
  27. package/es/components/appointmentBooking/index.less +1 -1
  28. package/es/components/appointmentBooking/locales.js +3 -3
  29. package/es/components/booking/addons/index.js +3 -12
  30. package/es/components/booking/addons/model.js +0 -5
  31. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  32. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  33. package/es/components/booking/components/TabProduct/selectProductItem/index.js +1 -3
  34. package/es/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
  35. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  36. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  37. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  38. package/es/components/booking/components/footer/amount.js +1 -2
  39. package/es/components/booking/components/footer/index.js +3 -9
  40. package/es/components/booking/components/footer/utils.js +35 -73
  41. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  42. package/es/components/booking/components/voucher/index.js +66 -110
  43. package/es/components/booking/deposit/index.d.ts +1 -0
  44. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  45. package/es/components/booking/forms/single/index.d.ts +1 -0
  46. package/es/components/booking/forms/table/index.d.ts +1 -0
  47. package/es/components/booking/hooks/useQuotation.d.ts +0 -1
  48. package/es/components/booking/hooks/useQuotation.js +1 -16
  49. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  50. package/es/components/booking/info/client/index.js +3 -12
  51. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  52. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  53. package/es/components/booking/info/date/index.d.ts +1 -0
  54. package/es/components/booking/info/header/index.d.ts +1 -0
  55. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  56. package/es/components/booking/info/index.d.ts +1 -0
  57. package/es/components/booking/info/notes/index.d.ts +1 -0
  58. package/es/components/booking/info/service/Lists.js +1 -1
  59. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  60. package/es/components/booking/info/service/addService/index.js +1 -3
  61. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  62. package/es/components/booking/info/service/like/index.d.ts +1 -0
  63. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  64. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  65. package/es/components/booking/info/service2/utils.js +2 -6
  66. package/es/components/booking/info/utils.js +1 -1
  67. package/es/components/booking/info2/index.js +4 -9
  68. package/es/components/booking/info2/serve.d.ts +1 -1
  69. package/es/components/booking/info2/serve.js +8 -12
  70. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  71. package/es/components/booking/info2/service/addService/index.js +3 -5
  72. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  73. package/es/components/booking/info2/service/editService/index.js +2 -5
  74. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  75. package/es/components/booking/info2/utils.d.ts +1 -1
  76. package/es/components/booking/info2/utils.js +2 -3
  77. package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
  78. package/es/components/booking/info2/utilsByBooking.js +3 -5
  79. package/es/components/booking/locales.d.ts +0 -3
  80. package/es/components/booking/locales.js +3 -6
  81. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  82. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  83. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  84. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  85. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  86. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  87. package/es/components/booking/notes/addNote/index.d.ts +1 -0
  88. package/es/components/booking/utils.d.ts +0 -1
  89. package/es/components/booking/utils.js +0 -4
  90. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  91. package/es/components/eftpos/form/index.d.ts +1 -0
  92. package/es/components/eftpos/group/index.d.ts +1 -0
  93. package/es/components/eftpos/hooks.d.ts +1 -0
  94. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  95. package/es/components/eftpos/icon/device.d.ts +1 -0
  96. package/es/components/eftpos/index.d.ts +1 -0
  97. package/es/components/eftpos/pos.d.ts +1 -0
  98. package/es/components/eftpos/receipt/index.d.ts +1 -0
  99. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  100. package/es/components/eftposPay/amount.d.ts +2 -1
  101. package/es/components/eftposPay/app.d.ts +2 -1
  102. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  103. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  104. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  105. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  106. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  107. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  108. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  109. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  110. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  111. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  112. package/es/components/eftposPay/device.d.ts +2 -1
  113. package/es/components/eftposPay/hooks.d.ts +1 -1
  114. package/es/components/eftposPay/index.d.ts +1 -0
  115. package/es/components/eftposPay/pay.d.ts +1 -0
  116. package/es/components/eftposPay/payo/config.d.ts +1 -0
  117. package/es/components/eftposPay/store/index.d.ts +4 -4
  118. package/es/components/eftposPay/tip.d.ts +1 -0
  119. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  120. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  121. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  122. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  123. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  124. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  125. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  126. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  127. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  128. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  129. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  130. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  131. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  132. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
  133. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  134. package/es/components/eventBooking/index.js +7 -21
  135. package/es/components/eventBooking/locales.js +3 -3
  136. package/es/components/index.d.ts +1 -2
  137. package/es/components/index.js +1 -2
  138. package/es/components/login/index.d.ts +1 -0
  139. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  140. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  141. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  142. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  143. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  144. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  145. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  146. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  147. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  148. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  149. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  150. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  151. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  152. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  153. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  154. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  155. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  156. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  157. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  158. package/es/components/productExtension/index.d.ts +1 -0
  159. package/es/components/ruleSetting/index.d.ts +1 -0
  160. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  161. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  162. package/es/components/schedules/calendar/index.d.ts +1 -0
  163. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  164. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  165. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  166. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  167. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  168. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  169. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  170. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  171. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  172. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  173. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  174. package/es/components/schedules/products/index.d.ts +1 -0
  175. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  176. package/es/components/schedules/products/list/index.d.ts +1 -0
  177. package/es/components/schedules/resources/index.d.ts +1 -0
  178. package/es/components/schedules/resources/list/index.d.ts +1 -0
  179. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  180. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  181. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  182. package/es/components/schedules/schedules/index.d.ts +1 -0
  183. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  184. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  185. package/es/components/shoppingCart/index.d.ts +1 -0
  186. package/es/components/taxSelect/index.d.ts +1 -0
  187. package/es/components/ticketBooking/components/addServiceVariant/addService.js +6 -9
  188. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  189. package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
  190. package/es/components/ticketBooking/components/ticketBooking/index.js +3 -124
  191. package/es/components/ticketBooking/index.d.ts +1 -0
  192. package/es/components/ticketBooking/locales.d.ts +146 -164
  193. package/es/components/ticketBooking/locales.js +147 -195
  194. package/es/components/ticketBooking/utils/index.d.ts +1 -5
  195. package/es/components/ticketBooking/utils/index.js +6 -58
  196. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  197. package/es/index.d.ts +0 -1
  198. package/es/index.js +1 -2
  199. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  200. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  201. package/lib/components/Sales/Resource/index.js +1 -1
  202. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  203. package/lib/components/Sales/Resource/serve.js +2 -9
  204. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  205. package/lib/components/appointmentBooking/components/Cart/Item/index.js +4 -5
  206. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  207. package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
  208. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  209. package/lib/components/appointmentBooking/components/Date/index.js +5 -12
  210. package/lib/components/appointmentBooking/components/Header/index.js +3 -2
  211. package/lib/components/appointmentBooking/components/Services/index.js +18 -19
  212. package/lib/components/appointmentBooking/components/Voucher/index.js +0 -9
  213. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -0
  214. package/lib/components/appointmentBooking/index.js +0 -11
  215. package/lib/components/appointmentBooking/index.less +1 -1
  216. package/lib/components/appointmentBooking/locales.js +3 -3
  217. package/lib/components/booking/addons/index.js +2 -12
  218. package/lib/components/booking/addons/model.js +0 -3
  219. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  220. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  221. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +1 -5
  222. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
  223. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  224. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  225. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  226. package/lib/components/booking/components/footer/amount.js +1 -2
  227. package/lib/components/booking/components/footer/index.js +5 -10
  228. package/lib/components/booking/components/footer/utils.js +11 -47
  229. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  230. package/lib/components/booking/components/voucher/index.js +67 -111
  231. package/lib/components/booking/deposit/index.d.ts +1 -0
  232. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  233. package/lib/components/booking/forms/single/index.d.ts +1 -0
  234. package/lib/components/booking/forms/table/index.d.ts +1 -0
  235. package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
  236. package/lib/components/booking/hooks/useQuotation.js +1 -19
  237. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  238. package/lib/components/booking/info/client/index.js +3 -10
  239. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  240. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  241. package/lib/components/booking/info/date/index.d.ts +1 -0
  242. package/lib/components/booking/info/header/index.d.ts +1 -0
  243. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  244. package/lib/components/booking/info/index.d.ts +1 -0
  245. package/lib/components/booking/info/notes/index.d.ts +1 -0
  246. package/lib/components/booking/info/service/Lists.js +1 -1
  247. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  248. package/lib/components/booking/info/service/addService/index.js +0 -2
  249. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  250. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  251. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  252. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  253. package/lib/components/booking/info/service2/utils.js +1 -3
  254. package/lib/components/booking/info/utils.js +3 -1
  255. package/lib/components/booking/info2/index.js +9 -9
  256. package/lib/components/booking/info2/serve.d.ts +1 -1
  257. package/lib/components/booking/info2/serve.js +1 -1
  258. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  259. package/lib/components/booking/info2/service/addService/index.js +2 -4
  260. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  261. package/lib/components/booking/info2/service/editService/index.js +2 -5
  262. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  263. package/lib/components/booking/info2/utils.d.ts +1 -1
  264. package/lib/components/booking/info2/utils.js +2 -2
  265. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
  266. package/lib/components/booking/info2/utilsByBooking.js +2 -3
  267. package/lib/components/booking/locales.d.ts +0 -3
  268. package/lib/components/booking/locales.js +3 -6
  269. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  270. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  271. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  272. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  273. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  274. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  275. package/lib/components/booking/notes/addNote/index.d.ts +1 -0
  276. package/lib/components/booking/utils.d.ts +0 -1
  277. package/lib/components/booking/utils.js +0 -6
  278. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  279. package/lib/components/eftpos/form/index.d.ts +1 -0
  280. package/lib/components/eftpos/group/index.d.ts +1 -0
  281. package/lib/components/eftpos/hooks.d.ts +1 -0
  282. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  283. package/lib/components/eftpos/icon/device.d.ts +1 -0
  284. package/lib/components/eftpos/index.d.ts +1 -0
  285. package/lib/components/eftpos/pos.d.ts +1 -0
  286. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  287. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  288. package/lib/components/eftposPay/amount.d.ts +2 -1
  289. package/lib/components/eftposPay/app.d.ts +2 -1
  290. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  291. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  292. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  293. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  294. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  295. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  296. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  297. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  298. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  299. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  300. package/lib/components/eftposPay/device.d.ts +2 -1
  301. package/lib/components/eftposPay/hooks.d.ts +1 -1
  302. package/lib/components/eftposPay/index.d.ts +1 -0
  303. package/lib/components/eftposPay/pay.d.ts +1 -0
  304. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  305. package/lib/components/eftposPay/store/index.d.ts +4 -4
  306. package/lib/components/eftposPay/tip.d.ts +1 -0
  307. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  308. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  309. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  310. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  311. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  312. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  313. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  314. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  315. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  316. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  317. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  318. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  319. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  320. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
  321. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  322. package/lib/components/eventBooking/index.js +7 -11
  323. package/lib/components/eventBooking/locales.js +3 -3
  324. package/lib/components/index.d.ts +1 -2
  325. package/lib/components/index.js +0 -3
  326. package/lib/components/login/index.d.ts +1 -0
  327. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  328. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  329. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  330. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  331. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  332. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  333. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  334. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  335. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  336. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  337. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  338. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  339. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  340. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  341. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  342. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  343. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  344. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  345. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  346. package/lib/components/productExtension/index.d.ts +1 -0
  347. package/lib/components/ruleSetting/index.d.ts +1 -0
  348. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  349. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  350. package/lib/components/schedules/calendar/index.d.ts +1 -0
  351. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  352. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  353. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  354. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  355. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  356. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  357. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  358. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  359. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  360. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  361. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  362. package/lib/components/schedules/products/index.d.ts +1 -0
  363. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  364. package/lib/components/schedules/products/list/index.d.ts +1 -0
  365. package/lib/components/schedules/resources/index.d.ts +1 -0
  366. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  367. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  368. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  369. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  370. package/lib/components/schedules/schedules/index.d.ts +1 -0
  371. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  372. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  373. package/lib/components/shoppingCart/index.d.ts +1 -0
  374. package/lib/components/taxSelect/index.d.ts +1 -0
  375. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +4 -8
  376. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  377. package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
  378. package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -124
  379. package/lib/components/ticketBooking/index.d.ts +1 -0
  380. package/lib/components/ticketBooking/locales.d.ts +146 -164
  381. package/lib/components/ticketBooking/locales.js +4 -22
  382. package/lib/components/ticketBooking/utils/index.d.ts +1 -5
  383. package/lib/components/ticketBooking/utils/index.js +5 -48
  384. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  385. package/lib/index.d.ts +0 -1
  386. package/lib/index.js +0 -3
  387. package/package.json +3 -3
  388. package/es/components/booking/components/voucher/utils.d.ts +0 -4
  389. package/es/components/booking/components/voucher/utils.js +0 -15
  390. package/es/components/stepController/components/Content/index.d.ts +0 -7
  391. package/es/components/stepController/components/Content/index.js +0 -9
  392. package/es/components/stepController/components/Content/index.less +0 -8
  393. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  394. package/es/components/stepController/components/Footer/index.js +0 -15
  395. package/es/components/stepController/components/Footer/index.less +0 -39
  396. package/es/components/stepController/components/Header/index.d.ts +0 -20
  397. package/es/components/stepController/components/Header/index.js +0 -97
  398. package/es/components/stepController/components/Header/index.less +0 -21
  399. package/es/components/stepController/index.d.ts +0 -5
  400. package/es/components/stepController/index.js +0 -64
  401. package/es/components/stepController/index.less +0 -11
  402. package/es/components/stepController/locales.d.ts +0 -27
  403. package/es/components/stepController/locales.js +0 -32
  404. package/es/components/stepController/types.d.ts +0 -23
  405. package/es/components/stepController/types.js +0 -1
  406. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  407. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  408. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  409. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  410. package/es/hooks/useWindowSize.d.ts +0 -5
  411. package/es/hooks/useWindowSize.js +0 -26
  412. package/lib/components/booking/components/voucher/utils.d.ts +0 -4
  413. package/lib/components/booking/components/voucher/utils.js +0 -43
  414. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  415. package/lib/components/stepController/components/Content/index.js +0 -40
  416. package/lib/components/stepController/components/Content/index.less +0 -8
  417. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  418. package/lib/components/stepController/components/Footer/index.js +0 -49
  419. package/lib/components/stepController/components/Footer/index.less +0 -39
  420. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  421. package/lib/components/stepController/components/Header/index.js +0 -104
  422. package/lib/components/stepController/components/Header/index.less +0 -21
  423. package/lib/components/stepController/index.d.ts +0 -5
  424. package/lib/components/stepController/index.js +0 -89
  425. package/lib/components/stepController/index.less +0 -11
  426. package/lib/components/stepController/locales.d.ts +0 -27
  427. package/lib/components/stepController/locales.js +0 -50
  428. package/lib/components/stepController/types.d.ts +0 -23
  429. package/lib/components/stepController/types.js +0 -17
  430. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  431. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  432. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  433. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  434. package/lib/hooks/useWindowSize.d.ts +0 -5
  435. package/lib/hooks/useWindowSize.js +0 -51
  436. package/lowcode/step-controller/meta.ts +0 -88
@@ -7,10 +7,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
10
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
12
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -26,8 +22,7 @@ import useEngineContext from "../../../../hooks/useEngineContext";
26
22
  import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
27
23
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
28
24
  import "./index.less";
29
- import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
30
- import { getServiceAddons } from "./utils";
25
+ import { useMemoizedFn, useDebounceFn } from 'ahooks';
31
26
  var ShopDiscountHooks = {
32
27
  onInited: 'shopDiscount:onInited',
33
28
  onDestroy: 'shopDiscount:onDestroy',
@@ -40,11 +35,10 @@ var ShopDiscountHooks = {
40
35
  };
41
36
  var services = {};
42
37
  var VoucherCard = function VoucherCard(props) {
43
- var _context$appHelper, _state$client$value, _state$service2;
38
+ var _context$appHelper, _state$client$value;
44
39
  var context = useEngineContext();
45
40
  var state = props.state,
46
- dispatch = props.dispatch,
47
- source = props.source;
41
+ dispatch = props.dispatch;
48
42
  var _useState = useState(false),
49
43
  _useState2 = _slicedToArray(_useState, 2),
50
44
  showDetail = _useState2[0],
@@ -59,27 +53,35 @@ var VoucherCard = function VoucherCard(props) {
59
53
  _useState6 = _slicedToArray(_useState5, 2),
60
54
  discountList = _useState6[0],
61
55
  setDisCountList = _useState6[1];
62
- var serviceValueRef = useRef(state.service.value);
63
- var addonsValueRef = useRef(state.addons.value);
56
+ var productRef = useRef(state.service.value);
64
57
  var isBooking4Shop = useIsBooking4Shop(state);
65
58
  var shopDiscount = pisellos.getModule('shopDiscount');
66
59
  services = state.service;
60
+ var availableData = useMemo(function () {
61
+ if (!isBooking4Shop) return [];
62
+ var shopDiscount = pisellos.getModule('shopDiscount');
63
+ return discountList.filter(function (item) {
64
+ return !!item.isAvailable;
65
+ }).map(function (discount) {
66
+ return _objectSpread(_objectSpread({}, discount), {}, {
67
+ savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
68
+ });
69
+ });
70
+ }, [discountList, isBooking4Shop]);
67
71
 
68
72
  // 设置client
69
- useDebounceEffect(function () {
73
+ useEffect(function () {
70
74
  if (isBooking4Shop) {
71
75
  shopDiscount.setCustomer(state.client.value);
72
76
  }
73
- }, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop], {
74
- wait: 200
75
- });
77
+ }, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop]);
76
78
 
77
79
  // 设置productList
78
80
  useEffect(function () {
79
81
  if (isBooking4Shop) {
80
- shopDiscount.setProductList([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
82
+ shopDiscount.setProductList(state.service.value);
81
83
  }
82
- }, [state.service.value, state.addons.value, isBooking4Shop]);
84
+ }, [state.service.value, isBooking4Shop]);
83
85
  var serviceMemo = useMemo(function () {
84
86
  var _ref;
85
87
  var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
@@ -87,6 +89,7 @@ var VoucherCard = function VoucherCard(props) {
87
89
  return {
88
90
  booking_id: value.booking_id,
89
91
  id: value.id,
92
+ _id: value._id,
90
93
  price: value.price,
91
94
  total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
92
95
  discount_list: value.discount_list,
@@ -95,43 +98,24 @@ var VoucherCard = function VoucherCard(props) {
95
98
  });
96
99
  return val;
97
100
  }, [state.service.value]);
98
- var addonsMemo = useMemo(function () {
99
- var _ref2;
100
- var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
101
- var _value$_extend3, _value$_extend4;
102
- return {
103
- booking_id: value.booking_id,
104
- id: value.id,
105
- _id: value._id,
106
- price: value.price,
107
- total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
108
- discount_list: value.discount_list,
109
- _key: value._key,
110
- num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
111
- };
112
- });
113
- return val;
114
- }, [state.addons.value]);
115
- var disabled = useMemo(function () {
116
- var _state$bookingDetail;
117
- if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
118
- return item.booking_id;
119
- })) {
120
- return true;
121
- }
122
- return false;
123
- }, [state, addonsMemo, serviceMemo]);
124
101
  var _useDebounceFn = useDebounceFn(function () {
125
102
  var _state$service;
126
103
  // console.log('state.service.value1', state.service.value);
127
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
104
+ if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
128
105
  return;
129
106
  }
130
107
  if (isBooking4Shop) {
131
- var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
132
- console.log('input: ', state.service.value);
133
- console.log('output: ', val);
134
- productListToValue(val.productList);
108
+ var val = shopDiscount.calcDiscount(state.service.value);
109
+ // console.log('input: ', state.service.value);
110
+ // console.log('output: ', val);
111
+ productRef.current = val.productList;
112
+ // console.log('val.productList', val.productList);
113
+ dispatch({
114
+ type: 'setService',
115
+ payload: _objectSpread(_objectSpread({}, services), {}, {
116
+ value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
117
+ })
118
+ });
135
119
  }
136
120
  }, {
137
121
  wait: 500
@@ -141,7 +125,7 @@ var VoucherCard = function VoucherCard(props) {
141
125
  // 更新productList
142
126
  useEffect(function () {
143
127
  run();
144
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
128
+ }, [JSON.stringify(serviceMemo), isBooking4Shop]);
145
129
  var fn = useMemoizedFn(function (result) {
146
130
  var _result$productList;
147
131
  if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
@@ -149,13 +133,18 @@ var VoucherCard = function VoucherCard(props) {
149
133
  })) {
150
134
  return;
151
135
  }
152
- productListToValue(result.productList);
136
+ dispatch({
137
+ type: 'setService',
138
+ payload: _objectSpread(_objectSpread({}, services), {}, {
139
+ value: result.productList
140
+ })
141
+ });
153
142
  });
154
143
 
155
144
  // 监听customer变化
156
145
  useEffect(function () {
157
146
  if (!isBooking4Shop) return;
158
- var onScanCustomerChange = function onScanCustomerChange(customer) {
147
+ pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, function (customer) {
159
148
  // 更新客户
160
149
  dispatch({
161
150
  type: 'setClient',
@@ -163,49 +152,22 @@ var VoucherCard = function VoucherCard(props) {
163
152
  value: customer
164
153
  }
165
154
  });
166
- };
167
- var onDiscountListChange = function onDiscountListChange(discount) {
168
- setDisCountList(discount);
169
- };
170
- pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, onScanCustomerChange);
155
+ });
171
156
  pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
172
- pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
157
+ pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, function (discount) {
158
+ setDisCountList(discount);
159
+ });
173
160
  return function () {
174
161
  shopDiscount.clear();
175
- pisellos.effects.off(ShopDiscountHooks.onCustomerChange, onScanCustomerChange);
176
- pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
177
- pisellos.effects.off(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
162
+ pisellos.effects.off(ShopDiscountHooks.onCustomerChange);
163
+ pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
164
+ pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
178
165
  };
179
166
  }, [state.bookingId, isBooking4Shop, fn]);
180
- var productListToValue = useMemoizedFn(function (list, edit) {
181
- var _getServiceAddons = getServiceAddons(list),
182
- serviceList = _getServiceAddons.serviceList,
183
- addonsList = _getServiceAddons.addonsList;
184
- serviceValueRef.current = serviceList;
185
- addonsValueRef.current = addonsList;
186
- var other = {};
187
- if (edit) {
188
- other = {
189
- edit: true
190
- };
191
- }
192
- dispatch({
193
- type: 'setService',
194
- payload: _objectSpread({
195
- value: serviceList
196
- }, other)
197
- });
198
- dispatch({
199
- type: 'setAddons',
200
- payload: _objectSpread({
201
- value: addonsList
202
- }, other)
203
- });
204
- });
205
167
 
206
168
  // apply code
207
169
  var onScanCode = /*#__PURE__*/function () {
208
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
170
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
209
171
  var val;
210
172
  return _regeneratorRuntime().wrap(function _callee$(_context) {
211
173
  while (1) switch (_context.prev = _context.next) {
@@ -216,11 +178,18 @@ var VoucherCard = function VoucherCard(props) {
216
178
  val = _context.sent;
217
179
  console.log(val);
218
180
  if (val !== null && val !== void 0 && val.isAvailable) {
219
- productListToValue(val.productList, true);
181
+ productRef.current = val.productList;
182
+ dispatch({
183
+ type: 'setService',
184
+ payload: {
185
+ value: val.productList,
186
+ edit: true
187
+ }
188
+ });
220
189
  setCode('');
221
190
  } else {
222
191
  PisellToast({
223
- content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
192
+ content: locales.getText('pisell2.text.goodpass.code-invalid')
224
193
  });
225
194
  }
226
195
  case 5:
@@ -230,27 +199,10 @@ var VoucherCard = function VoucherCard(props) {
230
199
  }, _callee);
231
200
  }));
232
201
  return function onScanCode() {
233
- return _ref3.apply(this, arguments);
202
+ return _ref2.apply(this, arguments);
234
203
  };
235
204
  }();
236
- var availableData = useMemo(function () {
237
- if (!isBooking4Shop) return [];
238
- var shopDiscount = pisellos.getModule('shopDiscount');
239
- return discountList.filter(function (item) {
240
- return !!item.isAvailable;
241
- }).map(function (discount) {
242
- return _objectSpread(_objectSpread({}, discount), {}, {
243
- isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
244
- savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
245
- });
246
- });
247
- }, [discountList, isBooking4Shop, disabled]);
248
205
  if (!isBooking4Shop) return null;
249
- var mixedSort = function mixedSort(val) {
250
- return _toConsumableArray(val).sort(function (a, b) {
251
- return Number(b === null || b === void 0 ? void 0 : b.isSelected) - Number(a === null || a === void 0 ? void 0 : a.isSelected);
252
- });
253
- };
254
206
  return /*#__PURE__*/React.createElement("div", {
255
207
  className: "pisell-lowcode__booking-footer-voucher-container"
256
208
  }, /*#__PURE__*/React.createElement("div", {
@@ -275,8 +227,7 @@ var VoucherCard = function VoucherCard(props) {
275
227
  style: {
276
228
  width: '100%'
277
229
  },
278
- dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
279
- mixedSort: mixedSort,
230
+ dataSource: availableData,
280
231
  onChange: function onChange(val) {
281
232
  var shopDiscount = pisellos.getModule('shopDiscount');
282
233
  var detail = shopDiscount.setDiscountSelected({
@@ -284,7 +235,13 @@ var VoucherCard = function VoucherCard(props) {
284
235
  isSelected: val.isSelected
285
236
  });
286
237
  console.log('setDiscountSelected:', detail);
287
- productListToValue(detail.productList, true);
238
+ dispatch({
239
+ type: 'setService',
240
+ payload: {
241
+ edit: true,
242
+ value: detail.productList
243
+ }
244
+ });
288
245
  }
289
246
  }) : null, /*#__PURE__*/React.createElement("div", {
290
247
  className: "voucher-code-input-wrapper"
@@ -301,7 +258,6 @@ var VoucherCard = function VoucherCard(props) {
301
258
  setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
302
259
  },
303
260
  size: "small",
304
- allowClear: true,
305
261
  placeholder: locales.getText('pisell2.text.goodpass.enter-code')
306
262
  // suffix={
307
263
  // <PisellTooltip title="">
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Deposit: (props: any) => JSX.Element;
2
3
  export default Deposit;
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<any>;
7
+ handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
8
8
  };
9
9
  export default useSendModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 表单选择器
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
3
4
  export default Table;
@@ -1,4 +1,3 @@
1
- export declare const calculateTotalPrice: (data: any) => number;
2
1
  declare const useQuotation: (state: any, dispatch: any) => {
3
2
  dom: JSX.Element;
4
3
  };
@@ -19,7 +19,6 @@ import useEngineContext from "../../../../es/hooks/useEngineContext";
19
19
  import { locales } from "@pisell/utils";
20
20
  import { PisellModal } from "@pisell/materials";
21
21
  import { getProductPrice } from "../info/service/serve";
22
- import Decimal from 'decimal.js';
23
22
  var formatBundleItemMap = function formatBundleItemMap(product) {
24
23
  return product.bundle_group.reduce(function (pre, cur) {
25
24
  var curObj = {};
@@ -29,13 +28,6 @@ var formatBundleItemMap = function formatBundleItemMap(product) {
29
28
  return _objectSpread(_objectSpread({}, pre), curObj);
30
29
  }, {});
31
30
  };
32
- export var calculateTotalPrice = function calculateTotalPrice(data) {
33
- var _price = data.reduce(function (total, item) {
34
- var _price = (item === null || item === void 0 ? void 0 : item.price) || (item === null || item === void 0 ? void 0 : item.add_price);
35
- return total + _price * item.num;
36
- }, 0);
37
- return parseFloat(_price);
38
- };
39
31
  var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
40
32
  if (!newProducts.length) {
41
33
  return {
@@ -78,16 +70,9 @@ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
78
70
  isChangePrice = true;
79
71
  isBundleChange = true;
80
72
  }
81
- if (bundleItemMap[bundle.id].price_type === 'markdown') {
82
- bundleItemMap[bundle.id].price = new Decimal(bundleItemMap[bundle.id].price || 0).mul(-1).toNumber();
83
- }
84
- var selectBundleInfo = item._extend.other.bundle.find(function (item) {
85
- return item.id === bundle.id;
86
- });
87
- var optionPrice = calculateTotalPrice((selectBundleInfo === null || selectBundleInfo === void 0 ? void 0 : selectBundleInfo.option) || []);
88
73
  return _objectSpread(_objectSpread({}, bundle), {}, {
89
74
  base_price: bundleItemMap[bundle.id].base_price,
90
- price: new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
75
+ price: bundleItemMap[bundle.id].price
91
76
  // product_price: bundleItemMap[item.id].product_price,
92
77
  });
93
78
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -33,7 +33,6 @@ import { isWalkIn as getIsWalkIn } from "../../utils";
33
33
  import { getFranchiseeCustomerInfo, getFranchiseeCustomerList } from "./serve";
34
34
  import { useMemoizedFn } from 'ahooks';
35
35
  import { getWaiverTitle } from "../clientVariant/utils";
36
- import useGetHolderList from "../hooks/useGetHolderList";
37
36
  var isLoadClient = false;
38
37
  var Client = function Client() {
39
38
  var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
@@ -53,7 +52,6 @@ var Client = function Client() {
53
52
  _useState6 = _slicedToArray(_useState5, 2),
54
53
  franchiseeLoading = _useState6[0],
55
54
  setFranchiseeLoading = _useState6[1];
56
- var getHolders = useGetHolderList(state, dispatch);
57
55
  var _useState7 = useState({
58
56
  skip: 1,
59
57
  num: 10,
@@ -283,7 +281,6 @@ var Client = function Client() {
283
281
  if (data) {
284
282
  handleSelectClient([data]);
285
283
  }
286
- getHolders();
287
284
  getClients(_objectSpread(_objectSpread({}, state.client.clientsParams), {}, {
288
285
  search: '',
289
286
  customer_id: data === null || data === void 0 ? void 0 : data.id,
@@ -301,20 +298,14 @@ var Client = function Client() {
301
298
  showAcceptsMarketing: false
302
299
  },
303
300
  callback: function callback(customer_id, params) {
304
- var _state$client2, _state$client2$map, _params$, _params$2, _state$client3;
305
- var waiverForm = ((_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.clients) === null || _state$client2 === void 0 || (_state$client2 = _state$client2[0].waiver_form) === null || _state$client2 === void 0 || (_state$client2$map = _state$client2.map) === null || _state$client2$map === void 0 ? void 0 : _state$client2$map.call(_state$client2, function (item) {
306
- return _objectSpread(_objectSpread({}, item), {}, {
307
- is_filled: 0
308
- });
309
- })) || [];
301
+ var _params$, _params$2, _state$client2;
310
302
  // 创建后本地数据处理到数组
311
303
  dispatch({
312
304
  type: 'setClient',
313
305
  payload: {
314
306
  clients: [].concat(_toConsumableArray(params !== null && params !== void 0 && (_params$ = params[0]) !== null && _params$ !== void 0 && _params$.customer ? [_objectSpread(_objectSpread({}, params === null || params === void 0 || (_params$2 = params[0]) === null || _params$2 === void 0 ? void 0 : _params$2.customer), {}, {
315
- id: customer_id,
316
- waiver_form: waiverForm
317
- })] : []), _toConsumableArray(((_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.clients) || []))
307
+ id: customer_id
308
+ })] : []), _toConsumableArray(((_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : _state$client2.clients) || []))
318
309
  }
319
310
  });
320
311
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from '../../../model';
2
3
  interface useClientFnParams {
3
4
  state: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
2
3
  export default useIsLowSpeedNetwork;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
3
4
  declare const DateCom: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const header: ({ state, dispatch }: any) => JSX.Element;
3
4
  export default header;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Notes: () => JSX.Element | null;
2
3
  export default Notes;
@@ -92,7 +92,7 @@ var Lists = function Lists(_ref) {
92
92
  isShowChangeHolder: isShowChangeHolder,
93
93
  isShowChangeResource: true,
94
94
  isShowAddHolderButton: true,
95
- isShowEditProduct: !state.isBookingCreatePage
95
+ isShowEditProduct: true
96
96
  };
97
97
  }, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
98
98
  return /*#__PURE__*/React.createElement(CartContext.Provider, {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -28,7 +28,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
28
28
  import TabProduct from "../../../components/TabProduct";
29
29
  import AddButton from "../../../components/addButton";
30
30
  import Drawer from "../../../components/drawer";
31
- import { formatProductListByCategory, getIsEject, getIsOnlySession, isSessionProduct, request } from "../../../utils";
31
+ import { formatProductListByCategory, getIsEject, isSessionProduct, request } from "../../../utils";
32
32
  import DateRange from "../../dateRange";
33
33
  import { Context } from "../../model";
34
34
  import { appointmentTypes, inputDateCol } from "../../service2/status";
@@ -311,7 +311,6 @@ var Info = function Info(props) {
311
311
  var isSession = isSessionProduct(item);
312
312
  // 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
313
313
  var isEject = getIsEject(item, type);
314
- var isOnlySession = getIsOnlySession(item);
315
314
 
316
315
  // 跨日预约开启单规格 组合规格 套餐
317
316
  if (isDay) {
@@ -329,7 +328,6 @@ var Info = function Info(props) {
329
328
  package: true
330
329
  },
331
330
  is_eject: isEject ? 1 : 0,
332
- isOnlySession: isOnlySession,
333
331
  customer_id: customerId,
334
332
  isOS: isSession
335
333
  },
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Like: ({ status, onChange, className, style, }: {
3
4
  style?: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
21
  import { getNoResource } from "../../mock";
22
22
  import { getErrorList, getProductTotalPrice } from "../../utils";
23
- import { isArr, locales } from '@pisell/utils';
23
+ import { locales } from '@pisell/utils';
24
24
  import dayjs from 'dayjs';
25
25
  import { appointmentTypes, openingTime } from "./status";
26
26
  import { postMultiDay } from "../service/serve";
@@ -199,9 +199,7 @@ export var handleChangeHolder = function handleChangeHolder(products, currentIte
199
199
  if (item._id === currentItem._id) {
200
200
  return _objectSpread(_objectSpread({}, item), {}, {
201
201
  _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
202
- holder_id: isArr(other) ? other.map(function (item) {
203
- return item.id;
204
- }) : item._extend.quantity > 1 ? [other.id] : other.id
202
+ holder_id: other.id
205
203
  })
206
204
  });
207
205
  }
@@ -612,8 +610,6 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
612
610
  actionText: locales.getText('page.booking.text.add-time'),
613
611
  isMultipleResource: true,
614
612
  multiResources: multiResources,
615
- holderMaxCount: item === null || item === void 0 ? void 0 : item._extend.quantity,
616
- holderMode: (item === null || item === void 0 ? void 0 : item._extend.quantity) > 1 ? 'multiple' : undefined,
617
613
  isErrorHolder: getIsSubjectRequire(state),
618
614
  addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
619
615
  holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
95
95
  if (renderType === 'eventBooking') {
96
96
  return false;
97
97
  }
98
- var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
98
+ var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988, 8872, 6930];
99
99
  return booking4Shops.includes(shopId);
100
100
  };
101
101
  function generateDateRange(start, end) {
@@ -31,7 +31,6 @@ import { Skeleton } from 'antd';
31
31
  import classNames from 'classnames';
32
32
  import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
33
33
  import { getLocale } from "../../../utils/locales";
34
- import { useDebounceEffect } from "ahooks";
35
34
  var defaultModules = {
36
35
  client: 1,
37
36
  date: 1,
@@ -165,7 +164,7 @@ var Info = Provider(function (props) {
165
164
  try {
166
165
  // 同步最新数据用, 增加延迟为了不和getProduct接口冲突
167
166
  setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
168
- var _stateRef$current, _stateRef$current$map;
167
+ var _stateRef$current;
169
168
  var data;
170
169
  return _regeneratorRuntime().wrap(function _callee$(_context) {
171
170
  while (1) switch (_context.prev = _context.next) {
@@ -173,9 +172,7 @@ var Info = Provider(function (props) {
173
172
  _context.next = 2;
174
173
  return getResourceList({
175
174
  date: currentDate
176
- }, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.service) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.value) === null || _stateRef$current === void 0 || (_stateRef$current$map = _stateRef$current.map) === null || _stateRef$current$map === void 0 ? void 0 : _stateRef$current$map.call(_stateRef$current, function (item) {
177
- return item === null || item === void 0 ? void 0 : item.booking_id;
178
- }));
175
+ }, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.bookingId);
179
176
  case 2:
180
177
  data = _context.sent;
181
178
  data.date = currentDate;
@@ -206,15 +203,13 @@ var Info = Provider(function (props) {
206
203
  return _ref.apply(this, arguments);
207
204
  };
208
205
  }();
209
- useDebounceEffect(function () {
206
+ useEffect(function () {
210
207
  // setTimeout(() => {
211
208
  if (currentDate) {
212
209
  getResourcesData();
213
210
  }
214
211
  // }, 20);
215
- }, [currentDate], {
216
- wait: 300
217
- });
212
+ }, [currentDate]);
218
213
  return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, _defineProperty(_defineProperty({
219
214
  style: style,
220
215
  header: header,
@@ -1,4 +1,4 @@
1
- export declare const getResourceList: (params: any, bookingId?: number[]) => Promise<{
1
+ export declare const getResourceList: (params: any, bookingId?: number) => Promise<{
2
2
  list: any[];
3
3
  listMap: any;
4
4
  }>;