@pisell/private-materials 3.4.3 → 3.4.5

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 (339) 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 +4 -4
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/businessModel/SalesModel/index.d.ts +1 -0
  12. package/es/components/Sales/Cart/index.js +5 -1
  13. package/es/components/Sales/Cart/utils.d.ts +40 -0
  14. package/es/components/Sales/Cart/utils.js +187 -0
  15. package/es/components/Sales/Checkout/index.d.ts +4 -0
  16. package/es/components/Sales/Checkout/index.js +52 -8
  17. package/es/components/Sales/Checkout/serve.d.ts +13 -0
  18. package/es/components/Sales/Checkout/serve.js +16 -2
  19. package/es/components/Sales/Checkout/utils.d.ts +1 -0
  20. package/es/components/Sales/Checkout/utils.js +9 -2
  21. package/es/components/Sales/Customer/index.d.ts +25 -0
  22. package/es/components/Sales/Event/Detail.d.ts +1 -0
  23. package/es/components/Sales/Event/Detail.js +45 -11
  24. package/es/components/Sales/Event/serve.d.ts +10 -0
  25. package/es/components/Sales/Event/serve.js +25 -0
  26. package/es/components/Sales/Summary/index.d.ts +10 -0
  27. package/es/components/Sales/Summary/index.js +17 -2
  28. package/es/components/Sales/Summary/serve.d.ts +1 -0
  29. package/es/components/Sales/Summary/serve.js +6 -0
  30. package/es/components/Sales/Summary/utils.d.ts +15 -0
  31. package/es/components/Sales/Summary/utils.js +43 -1
  32. package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  33. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  34. package/es/components/appointmentBooking/components/Content/index.js +15 -1
  35. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  36. package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  37. package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
  38. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  39. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  40. package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  41. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  42. package/es/components/appointmentBooking/components/Resource/index.js +1 -0
  43. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
  44. package/es/components/appointmentBooking/deposit/index.js +4 -2
  45. package/es/components/appointmentBooking/index.js +14 -0
  46. package/es/components/appointmentBooking/index.less +1 -1
  47. package/es/components/booking/addons/model.d.ts +10 -1
  48. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  49. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  50. package/es/components/booking/components/browserSelect/index.js +1 -1
  51. package/es/components/booking/components/footer/index.js +32 -24
  52. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  53. package/es/components/booking/forms/model.d.ts +10 -1
  54. package/es/components/booking/forms/model.js +5 -5
  55. package/es/components/booking/forms/table/index.d.ts +1 -0
  56. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -1
  57. package/es/components/booking/hooks/useIsBooking4Shop.js +4 -3
  58. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  59. package/es/components/booking/info/addServiceVariant/index.js +2 -2
  60. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  61. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  62. package/es/components/booking/info/index.d.ts +1 -0
  63. package/es/components/booking/info/index.js +4 -4
  64. package/es/components/booking/info/model.d.ts +10 -1
  65. package/es/components/booking/info/service/Lists.d.ts +2 -0
  66. package/es/components/booking/info/service/like/index.d.ts +1 -0
  67. package/es/components/booking/info/service/like/index.js +1 -1
  68. package/es/components/booking/info/utils.d.ts +1 -1
  69. package/es/components/booking/info/utils.js +5 -3
  70. package/es/components/booking/info2/service/addService/utils.js +38 -9
  71. package/es/components/booking/info2/service/addTimeModal/index.js +2 -2
  72. package/es/components/booking/info2/service/index.d.ts +4 -0
  73. package/es/components/booking/info2/utils.d.ts +4 -0
  74. package/es/components/booking/info2/utilsByBooking.js +9 -3
  75. package/es/components/booking/materiels/startTime/index.js +1 -1
  76. package/es/components/booking/model.d.ts +9 -1
  77. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  78. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  79. package/es/components/booking/notes/model.d.ts +10 -1
  80. package/es/components/booking/notes/model.js +5 -5
  81. package/es/components/booking/payments/model.d.ts +10 -1
  82. package/es/components/booking/payments/model.js +5 -5
  83. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  84. package/es/components/eftpos/form/index.d.ts +1 -0
  85. package/es/components/eftpos/group/index.d.ts +1 -0
  86. package/es/components/eftpos/hooks.d.ts +1 -0
  87. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  88. package/es/components/eftpos/icon/device.d.ts +1 -0
  89. package/es/components/eftpos/receipt/index.d.ts +1 -0
  90. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  91. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  92. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  93. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  94. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  95. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  96. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  97. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
  98. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
  99. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  100. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  101. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  102. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  103. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  104. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  105. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  106. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  107. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  108. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  109. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  110. package/es/components/eventBooking/components/bookingDetailModal/index.js +6 -3
  111. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  112. package/es/components/eventBooking/index.js +14 -0
  113. package/es/components/eventBooking/index.less +1 -1
  114. package/es/components/eventBooking/locales.d.ts +24 -0
  115. package/es/components/eventBooking/locales.js +27 -3
  116. package/es/components/listComponent/index.js +5 -5
  117. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +18 -3
  118. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -1
  119. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +7 -2
  120. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +8 -0
  121. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  122. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  124. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  125. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  126. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  127. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  128. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +18 -3
  129. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +113 -0
  130. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  131. package/es/components/pay/toC/locales.d.ts +3 -0
  132. package/es/components/pay/toC/locales.js +3 -0
  133. package/es/components/pay/toC/model.d.ts +9 -1
  134. package/es/components/pay/toC/utils.d.ts +57 -0
  135. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  136. package/es/components/productExtension/card/index.js +3 -3
  137. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  138. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  139. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  140. package/es/components/productExtension/fields/Forms/index.js +12 -12
  141. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  142. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  143. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  144. package/es/components/productExtension/server.js +2 -2
  145. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  146. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  147. package/es/components/schedules/calendar/index.js +4 -4
  148. package/es/components/schedules/calendar/serve.js +2 -2
  149. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  150. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  151. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  152. package/es/components/schedules/components/ResourceList/index.js +1 -1
  153. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  154. package/es/components/schedules/components/Search/index.js +5 -5
  155. package/es/components/schedules/model.d.ts +9 -1
  156. package/es/components/schedules/model.js +5 -5
  157. package/es/components/schedules/openHours/index.js +1 -1
  158. package/es/components/schedules/openHours/serve.js +2 -2
  159. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  160. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  161. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  162. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  163. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  164. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  165. package/es/components/schedules/products/serve.js +2 -2
  166. package/es/components/schedules/products/utils.js +5 -5
  167. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  168. package/es/components/schedules/resources/detail/index.js +10 -10
  169. package/es/components/schedules/resources/list/index.js +2 -2
  170. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  171. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  172. package/es/components/schedules/resources/serve.js +2 -2
  173. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  174. package/es/components/schedules/utils.d.ts +1 -1
  175. package/es/components/schedules/utils.js +4 -4
  176. package/es/components/selectModal/index.js +2 -2
  177. package/es/components/shoppingCart/components/Cart/Product.d.ts +4 -0
  178. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  179. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  180. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -4
  181. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  182. package/es/components/ticketBooking/components/menuBar/index.js +38 -2
  183. package/es/components/ticketBooking/components/menuBar/index.less +8 -0
  184. package/es/components/ticketBooking/locales.d.ts +174 -0
  185. package/es/components/ticketBooking/locales.js +6 -3
  186. package/es/components/wallet/Detail/model.d.ts +13 -1
  187. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  188. package/es/components/wallet/PointCard/model.d.ts +13 -1
  189. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  190. package/es/components/wallet/Voucher/model.d.ts +13 -1
  191. package/es/components/wallet/model.d.ts +9 -1
  192. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  193. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  194. package/es/hooks/useComponents.js +1 -1
  195. package/es/utils/index.d.ts +1 -1
  196. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  197. package/lib/components/Sales/Cart/index.js +1 -0
  198. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  199. package/lib/components/Sales/Cart/utils.js +129 -0
  200. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  201. package/lib/components/Sales/Checkout/index.js +39 -7
  202. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  203. package/lib/components/Sales/Checkout/serve.js +7 -2
  204. package/lib/components/Sales/Checkout/utils.d.ts +1 -0
  205. package/lib/components/Sales/Checkout/utils.js +5 -2
  206. package/lib/components/Sales/Customer/index.d.ts +25 -0
  207. package/lib/components/Sales/Event/Detail.d.ts +1 -0
  208. package/lib/components/Sales/Event/Detail.js +37 -12
  209. package/lib/components/Sales/Event/serve.d.ts +10 -0
  210. package/lib/components/Sales/Event/serve.js +7 -0
  211. package/lib/components/Sales/Summary/index.d.ts +10 -0
  212. package/lib/components/Sales/Summary/index.js +7 -1
  213. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  214. package/lib/components/Sales/Summary/serve.js +32 -0
  215. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  216. package/lib/components/Sales/Summary/utils.js +30 -1
  217. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  218. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  219. package/lib/components/appointmentBooking/components/Content/index.js +6 -1
  220. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  221. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  222. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  223. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  224. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  225. package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  226. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  227. package/lib/components/appointmentBooking/components/Resource/index.js +1 -0
  228. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  229. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  230. package/lib/components/appointmentBooking/index.js +11 -0
  231. package/lib/components/appointmentBooking/index.less +1 -1
  232. package/lib/components/booking/addons/model.d.ts +10 -1
  233. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  234. package/lib/components/booking/components/footer/index.js +24 -11
  235. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  236. package/lib/components/booking/forms/model.d.ts +10 -1
  237. package/lib/components/booking/forms/table/index.d.ts +1 -0
  238. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -1
  239. package/lib/components/booking/hooks/useIsBooking4Shop.js +6 -4
  240. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  241. package/lib/components/booking/info/addServiceVariant/index.js +3 -2
  242. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  243. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  244. package/lib/components/booking/info/index.d.ts +1 -0
  245. package/lib/components/booking/info/index.js +4 -3
  246. package/lib/components/booking/info/model.d.ts +10 -1
  247. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  248. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  249. package/lib/components/booking/info/utils.d.ts +1 -1
  250. package/lib/components/booking/info/utils.js +5 -3
  251. package/lib/components/booking/info2/service/addService/utils.js +31 -10
  252. package/lib/components/booking/info2/service/addTimeModal/index.js +3 -2
  253. package/lib/components/booking/info2/service/index.d.ts +4 -0
  254. package/lib/components/booking/info2/utils.d.ts +4 -0
  255. package/lib/components/booking/info2/utilsByBooking.js +4 -1
  256. package/lib/components/booking/model.d.ts +9 -1
  257. package/lib/components/booking/notes/model.d.ts +10 -1
  258. package/lib/components/booking/payments/model.d.ts +10 -1
  259. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  260. package/lib/components/eftpos/form/index.d.ts +1 -0
  261. package/lib/components/eftpos/group/index.d.ts +1 -0
  262. package/lib/components/eftpos/hooks.d.ts +1 -0
  263. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  264. package/lib/components/eftpos/icon/device.d.ts +1 -0
  265. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  266. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  267. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  268. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  269. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  270. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  271. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  272. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  273. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -4
  274. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
  275. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
  276. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  277. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  278. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  279. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  280. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  281. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  282. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  283. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  284. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  285. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  286. package/lib/components/eventBooking/components/bookingDetailModal/index.js +4 -3
  287. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  288. package/lib/components/eventBooking/index.js +11 -0
  289. package/lib/components/eventBooking/index.less +1 -1
  290. package/lib/components/eventBooking/locales.d.ts +24 -0
  291. package/lib/components/eventBooking/locales.js +27 -3
  292. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +13 -1
  293. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -1
  294. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +2 -2
  295. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +8 -0
  296. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  297. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  298. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  299. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  300. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  301. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  302. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  303. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +13 -1
  304. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +113 -0
  305. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  306. package/lib/components/pay/toC/locales.d.ts +3 -0
  307. package/lib/components/pay/toC/locales.js +3 -0
  308. package/lib/components/pay/toC/model.d.ts +9 -1
  309. package/lib/components/pay/toC/utils.d.ts +57 -0
  310. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  311. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  312. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  313. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  314. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  315. package/lib/components/schedules/model.d.ts +9 -1
  316. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  317. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  318. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  319. package/lib/components/schedules/utils.d.ts +1 -1
  320. package/lib/components/schedules/utils.js +1 -1
  321. package/lib/components/shoppingCart/components/Cart/Product.d.ts +4 -0
  322. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  323. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  324. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -6
  325. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  326. package/lib/components/ticketBooking/components/menuBar/index.js +42 -2
  327. package/lib/components/ticketBooking/components/menuBar/index.less +8 -0
  328. package/lib/components/ticketBooking/locales.d.ts +174 -0
  329. package/lib/components/ticketBooking/locales.js +6 -3
  330. package/lib/components/wallet/Detail/model.d.ts +13 -1
  331. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  332. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  333. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  334. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  335. package/lib/components/wallet/model.d.ts +9 -1
  336. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  337. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  338. package/lib/utils/index.d.ts +1 -1
  339. package/package.json +3 -3
@@ -0,0 +1,174 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.ticket-booking.info': string;
4
+ 'pisell2.ticket-booking.notes': string;
5
+ 'pisell2.ticket-booking.forms': string;
6
+ 'pisell2.ticket-booking.sales': string;
7
+ 'pisell2.ticket-booking.payment': string;
8
+ 'pisell2.ticket-booking.unsaved-changes': string;
9
+ 'pisell2.ticket-booking.exit-confirm': string;
10
+ 'pisell2.ticket-booking.go-back': string;
11
+ 'pisell2.ticket-booking.exit': string;
12
+ 'pisell2.ticket-booking.deposit': string;
13
+ 'pisell2.ticket-booking.copy-success': string;
14
+ 'pisell2.ticket-booking.no-data': string;
15
+ 'pisell2.ticket-booking.authorized': string;
16
+ 'pisell2.ticket-booking.paid': string;
17
+ 'pisell2.ticket-booking.partially-paid': string;
18
+ 'pisell2.ticket-booking.partially-refunded': string;
19
+ 'pisell2.ticket-booking.payment-pending': string;
20
+ 'pisell2.ticket-booking.refunded': string;
21
+ 'pisell2.ticket-booking.unpaid': string;
22
+ 'pisell2.ticket-booking.voided': string;
23
+ 'pisell2.ticket-booking.pending': string;
24
+ 'pisell2.ticket-booking.all': string;
25
+ 'pisell2.ticket-booking.not-started': string;
26
+ 'pisell2.ticket-booking.started': string;
27
+ 'pisell2.ticket-booking.finished': string;
28
+ 'pisell2.ticket-booking.canceled': string;
29
+ 'pisell2.ticket-booking.inform': string;
30
+ 'pisell2.ticket-booking.check-management': string;
31
+ 'pisell2.ticket-booking.confirm': string;
32
+ 'pisell2.ticket-booking.dashboard': string;
33
+ 'pisell2.ticket-booking.booking-list': string;
34
+ 'pisell2.ticket-booking.full-data': string;
35
+ 'pisell2.ticket-booking.today': string;
36
+ 'pisell2.ticket-booking.now': string;
37
+ 'pisell2.ticket-booking.start-time': string;
38
+ 'pisell2.ticket-booking.create-time': string;
39
+ 'pisell2.ticket-booking.customer': string;
40
+ 'pisell2.ticket-booking.total': string;
41
+ 'pisell2.ticket-booking.search': string;
42
+ 'pisell2.ticket-booking.refresh-success': string;
43
+ 'pisell2.ticket-booking.loading': string;
44
+ 'pisell2.ticket-booking.appointment-not-found': string;
45
+ 'pisell2.ticket-booking.scan': string;
46
+ 'pisell2.ticket-booking.create-new': string;
47
+ 'pisell2.ticket-booking.add-to-cart': string;
48
+ 'pisell2.ticket-booking.not-available-title': string;
49
+ 'pisell2.ticket-booking.not-available-ok': string;
50
+ 'pisell2.ticket-booking.in-cart': (number: number) => string;
51
+ 'pisell2.product.card.cart-items': (number: number) => string;
52
+ 'pisell2.product.card.subtotal': string;
53
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
54
+ 'pisell2.product.card.day': (val: number) => string;
55
+ 'pisell2.product.card.day.event': (val: number) => string;
56
+ 'pisell2.product.card.minute': (val: number) => string;
57
+ "pisell2.ticket-booking.reload": string;
58
+ };
59
+ 'zh-CN': {
60
+ 'pisell2.ticket-booking.info': string;
61
+ 'pisell2.ticket-booking.notes': string;
62
+ 'pisell2.ticket-booking.forms': string;
63
+ 'pisell2.ticket-booking.sales': string;
64
+ 'pisell2.ticket-booking.payment': string;
65
+ 'pisell2.ticket-booking.unsaved-changes': string;
66
+ 'pisell2.ticket-booking.exit-confirm': string;
67
+ 'pisell2.ticket-booking.go-back': string;
68
+ 'pisell2.ticket-booking.exit': string;
69
+ 'pisell2.ticket-booking.deposit': string;
70
+ 'pisell2.ticket-booking.copy-success': string;
71
+ 'pisell2.ticket-booking.no-data': string;
72
+ 'pisell2.ticket-booking.authorized': string;
73
+ 'pisell2.ticket-booking.paid': string;
74
+ 'pisell2.ticket-booking.partially-paid': string;
75
+ 'pisell2.ticket-booking.partially-refunded': string;
76
+ 'pisell2.ticket-booking.payment-pending': string;
77
+ 'pisell2.ticket-booking.refunded': string;
78
+ 'pisell2.ticket-booking.unpaid': string;
79
+ 'pisell2.ticket-booking.voided': string;
80
+ 'pisell2.ticket-booking.pending': string;
81
+ 'pisell2.ticket-booking.all': string;
82
+ 'pisell2.ticket-booking.not-started': string;
83
+ 'pisell2.ticket-booking.started': string;
84
+ 'pisell2.ticket-booking.finished': string;
85
+ 'pisell2.ticket-booking.canceled': string;
86
+ 'pisell2.ticket-booking.inform': string;
87
+ 'pisell2.ticket-booking.check-management': string;
88
+ 'pisell2.ticket-booking.confirm': string;
89
+ 'pisell2.ticket-booking.dashboard': string;
90
+ 'pisell2.ticket-booking.booking-list': string;
91
+ 'pisell2.ticket-booking.full-data': string;
92
+ 'pisell2.ticket-booking.today': string;
93
+ 'pisell2.ticket-booking.now': string;
94
+ 'pisell2.ticket-booking.start-time': string;
95
+ 'pisell2.ticket-booking.create-time': string;
96
+ 'pisell2.ticket-booking.customer': string;
97
+ 'pisell2.ticket-booking.total': string;
98
+ 'pisell2.ticket-booking.search': string;
99
+ 'pisell2.ticket-booking.refresh-success': string;
100
+ 'pisell2.ticket-booking.loading': string;
101
+ 'pisell2.ticket-booking.appointment-not-found': string;
102
+ 'pisell2.ticket-booking.scan': string;
103
+ 'pisell2.ticket-booking.create-new': string;
104
+ 'pisell2.ticket-booking.add-to-cart': string;
105
+ 'pisell2.ticket-booking.not-available-title': string;
106
+ 'pisell2.ticket-booking.not-available-ok': string;
107
+ 'pisell2.product.card.cart-items': (number: number) => string;
108
+ 'pisell2.product.card.subtotal': string;
109
+ 'pisell2.ticket-booking.in-cart': (number: number) => string;
110
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
111
+ 'pisell2.product.card.day': (val: number) => string;
112
+ 'pisell2.product.card.day.event': (val: number) => string;
113
+ 'pisell2.product.card.minute': (val: number) => string;
114
+ "pisell2.ticket-booking.reload": string;
115
+ };
116
+ 'zh-HK': {
117
+ 'pisell2.ticket-booking.info': string;
118
+ 'pisell2.ticket-booking.notes': string;
119
+ 'pisell2.ticket-booking.forms': string;
120
+ 'pisell2.ticket-booking.sales': string;
121
+ 'pisell2.ticket-booking.payment': string;
122
+ 'pisell2.ticket-booking.unsaved-changes': string;
123
+ 'pisell2.ticket-booking.exit-confirm': string;
124
+ 'pisell2.ticket-booking.go-back': string;
125
+ 'pisell2.ticket-booking.exit': string;
126
+ 'pisell2.ticket-booking.deposit': string;
127
+ 'pisell2.ticket-booking.copy-success': string;
128
+ 'pisell2.ticket-booking.no-data': string;
129
+ 'pisell2.ticket-booking.authorized': string;
130
+ 'pisell2.ticket-booking.paid': string;
131
+ 'pisell2.ticket-booking.partially-paid': string;
132
+ 'pisell2.ticket-booking.partially-refunded': string;
133
+ 'pisell2.ticket-booking.payment-pending': string;
134
+ 'pisell2.ticket-booking.refunded': string;
135
+ 'pisell2.ticket-booking.unpaid': string;
136
+ 'pisell2.ticket-booking.voided': string;
137
+ 'pisell2.ticket-booking.pending': string;
138
+ 'pisell2.ticket-booking.all': string;
139
+ 'pisell2.ticket-booking.not-started': string;
140
+ 'pisell2.ticket-booking.started': string;
141
+ 'pisell2.ticket-booking.finished': string;
142
+ 'pisell2.ticket-booking.canceled': string;
143
+ 'pisell2.ticket-booking.inform': string;
144
+ 'pisell2.ticket-booking.check-management': string;
145
+ 'pisell2.ticket-booking.confirm': string;
146
+ 'pisell2.ticket-booking.dashboard': string;
147
+ 'pisell2.ticket-booking.booking-list': string;
148
+ 'pisell2.ticket-booking.full-data': string;
149
+ 'pisell2.ticket-booking.today': string;
150
+ 'pisell2.ticket-booking.now': string;
151
+ 'pisell2.ticket-booking.start-time': string;
152
+ 'pisell2.ticket-booking.create-time': string;
153
+ 'pisell2.ticket-booking.customer': string;
154
+ 'pisell2.ticket-booking.total': string;
155
+ 'pisell2.ticket-booking.search': string;
156
+ 'pisell2.ticket-booking.refresh-success': string;
157
+ 'pisell2.ticket-booking.loading': string;
158
+ 'pisell2.ticket-booking.appointment-not-found': string;
159
+ 'pisell2.ticket-booking.scan': string;
160
+ 'pisell2.ticket-booking.create-new': string;
161
+ 'pisell2.ticket-booking.add-to-cart': string;
162
+ 'pisell2.ticket-booking.not-available-title': string;
163
+ 'pisell2.ticket-booking.not-available-ok': string;
164
+ 'pisell2.ticket-booking.in-cart': (number: number) => string;
165
+ 'pisell2.product.card.cart-items': (number: number) => string;
166
+ 'pisell2.product.card.subtotal': string;
167
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
168
+ 'pisell2.product.card.day': (val: number) => string;
169
+ 'pisell2.product.card.day.event': (val: number) => string;
170
+ 'pisell2.product.card.minute': (val: number) => string;
171
+ "pisell2.ticket-booking.reload": string;
172
+ };
173
+ };
174
+ export default _default;
@@ -65,7 +65,8 @@ export default {
65
65
  },
66
66
  'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
67
67
  return "".concat(val > 1 ? ' minutes' : ' minute');
68
- }
68
+ },
69
+ "pisell2.ticket-booking.reload": 'Reload'
69
70
  },
70
71
  'zh-CN': {
71
72
  'pisell2.ticket-booking.info': '信息',
@@ -133,7 +134,8 @@ export default {
133
134
  },
134
135
  'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
135
136
  return '分钟';
136
- }
137
+ },
138
+ "pisell2.ticket-booking.reload": '重新加载'
137
139
  },
138
140
  'zh-HK': {
139
141
  'pisell2.ticket-booking.info': '資訊',
@@ -201,6 +203,7 @@ export default {
201
203
  },
202
204
  'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
203
205
  return '分鐘';
204
- }
206
+ },
207
+ "pisell2.ticket-booking.reload": '重新載入'
205
208
  }
206
209
  };
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ addWalletCard: any;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ walletDetailState: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,14 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ setup?: 'menu' | 'list' | 'detail' | string;
5
+ }
6
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
+ state: RechargeState;
8
+ } & {
9
+ dispatch: (params: {
10
+ type: string;
11
+ payload: any;
12
+ }) => void;
13
+ }>;
14
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from './serve';
2
3
  export interface WalletCardItemProps {
3
4
  id: string;
@@ -26,4 +27,11 @@ export interface WalletListProps {
26
27
  currentSearchListItemCode?: string;
27
28
  [key: string]: any;
28
29
  }
29
- export declare const Provider: any, Context: any;
30
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
+ global_wallet: WalletListProps;
32
+ } & {
33
+ dispatch: (params: {
34
+ type: string;
35
+ payload: any;
36
+ }) => void;
37
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
2
3
  import './index.less';
3
4
  interface ModalProps extends AntModalProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './../../index.less';
2
3
  declare const Search: () => JSX.Element;
3
4
  export default Search;
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
8
8
  var _utils$getComponents;
9
9
  var _ref = appHelper || {},
10
10
  utils = _ref.utils;
11
- return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
11
+ return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
12
12
  }, [components]);
13
13
  return Cpt;
14
14
  };
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
2
3
  export * from './Sales';
3
4
  export default SalesModel;
@@ -295,6 +295,7 @@ var CartProvider = ({ children }) => {
295
295
  },
296
296
  _productDetail: eventDetail.productDetail
297
297
  };
298
+ newCartItem.deposit = (0, import_utils3.handleProductDeposit)(newCartItem, eventDetail, num);
298
299
  const originData = (0, import_utils3.handleCartItemOrigin)(newCartItem, eventDetail);
299
300
  newCartItem._originData = originData;
300
301
  if (holderItem == null ? void 0 : holderItem._originData) {
@@ -1,3 +1,4 @@
1
+ import Decimal from 'decimal.js';
1
2
  import { ICalculatePriceParams } from './types';
2
3
  export declare const handleProductInfo: (eventDetail: any, num: number) => {
3
4
  totalPrice: number;
@@ -21,3 +22,42 @@ export declare const getOriginTotalPrice: (params: ICalculatePriceParams) => num
21
22
  export declare const handleCartItemOrigin: (cartItem: any, eventDetail: any) => any;
22
23
  export declare const formatBundleToOrigin: (bundle: any) => any;
23
24
  export declare const formatOptionsToOrigin: (options: any) => any;
25
+ export declare const handleProductDeposit: (cartItem: any, eventDetail: any, num: number) => {
26
+ total: number;
27
+ protocols: any;
28
+ } | null;
29
+ /**
30
+ * 获取商品定金
31
+ * @description 定金基于商品售价来算,最终乘商品数量
32
+ * 1、如果套餐主商品有定金规则,则定金为:(套餐商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
33
+ * 2、如果套餐主商品没有定金规则,子商品有定金规则,则定金为:(套餐子商品售价 * 套餐子商品定金百分比 + 套餐子商品定金固定金额)* 商品数量,最终将所有子商品定金相加
34
+ * 3、普通商品/单规格商品/组合规则商品,定金规则:(商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
35
+ * @param params 参数
36
+ * @returns 商品定金
37
+ */
38
+ export declare const getProductDeposit: (params: {
39
+ cartItem: any;
40
+ product: any;
41
+ bundle?: any;
42
+ options?: any;
43
+ num?: number;
44
+ }) => {
45
+ total: number;
46
+ protocols: any;
47
+ } | null;
48
+ /**
49
+ * 计算商品定金
50
+ * @param params 参数
51
+ * @returns 商品定金
52
+ */
53
+ export declare const calculateProductDeposit: (params: {
54
+ depositData: {
55
+ deposit_fixed?: string;
56
+ deposit_percentage?: string;
57
+ };
58
+ total: string | number;
59
+ num: number;
60
+ }) => {
61
+ result: boolean;
62
+ depositTotal: Decimal;
63
+ };
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,19 +16,31 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
 
19
29
  // src/components/Sales/Cart/utils.ts
20
30
  var utils_exports = {};
21
31
  __export(utils_exports, {
32
+ calculateProductDeposit: () => calculateProductDeposit,
22
33
  formatBundleToOrigin: () => formatBundleToOrigin,
23
34
  formatOptionsToOrigin: () => formatOptionsToOrigin,
24
35
  getOriginTotalPrice: () => getOriginTotalPrice,
36
+ getProductDeposit: () => getProductDeposit,
25
37
  getTotalPrice: () => getTotalPrice,
26
38
  handleCartItemOrigin: () => handleCartItemOrigin,
39
+ handleProductDeposit: () => handleProductDeposit,
27
40
  handleProductInfo: () => handleProductInfo
28
41
  });
29
42
  module.exports = __toCommonJS(utils_exports);
43
+ var import_decimal = __toESM(require("decimal.js"));
30
44
  var handleProductInfo = (eventDetail, num) => {
31
45
  var _a;
32
46
  const { productDetail, bookingOptionItem } = eventDetail;
@@ -138,12 +152,127 @@ var formatOptionsToOrigin = (options) => {
138
152
  };
139
153
  });
140
154
  };
155
+ var handleProductDeposit = (cartItem, eventDetail, num) => {
156
+ var _a;
157
+ const { productDetail, bookingOptionItem } = eventDetail;
158
+ const normalProduct = bookingOptionItem == null ? void 0 : bookingOptionItem._originData;
159
+ if (!productDetail && normalProduct) {
160
+ const { custom_deposit_data } = normalProduct;
161
+ if ((custom_deposit_data == null ? void 0 : custom_deposit_data.has_deposit) == 1) {
162
+ return getProductDeposit({ cartItem, product: normalProduct, num });
163
+ } else {
164
+ return null;
165
+ }
166
+ }
167
+ if (!productDetail) {
168
+ return null;
169
+ }
170
+ const { origin, bundle, options, product_variant_id } = productDetail || {};
171
+ let deposit = null;
172
+ const product = origin;
173
+ if (product_variant_id) {
174
+ product.product_variant_id = product_variant_id;
175
+ }
176
+ if (((_a = origin == null ? void 0 : origin.custom_deposit_data) == null ? void 0 : _a.has_deposit) == 1) {
177
+ deposit = getProductDeposit({ cartItem, product, bundle, options, num });
178
+ }
179
+ return deposit;
180
+ };
181
+ var getProductDeposit = (params) => {
182
+ var _a, _b;
183
+ const { cartItem, product, bundle, options } = params;
184
+ const num = (params == null ? void 0 : params.num) || 1;
185
+ if (((_a = product == null ? void 0 : product.custom_deposit_data) == null ? void 0 : _a.has_deposit) == 1) {
186
+ let total = new import_decimal.default(0);
187
+ const {
188
+ deposit_fixed,
189
+ deposit_percentage,
190
+ deposit_policy_data,
191
+ self_deposit_policy_ids
192
+ } = (product == null ? void 0 : product.custom_deposit_data) || {};
193
+ const allProtocols = deposit_policy_data || [];
194
+ let productHasDeposit = false;
195
+ const protocolIds = [];
196
+ if (typeof deposit_fixed === "string" && typeof deposit_percentage === "string") {
197
+ const { depositTotal, result } = calculateProductDeposit({
198
+ depositData: product == null ? void 0 : product.custom_deposit_data,
199
+ total: (cartItem == null ? void 0 : cartItem.total) || 0,
200
+ num
201
+ });
202
+ if (result) {
203
+ total = depositTotal;
204
+ protocolIds.push(...self_deposit_policy_ids || []);
205
+ productHasDeposit = true;
206
+ }
207
+ } else {
208
+ if (product == null ? void 0 : product.product_variant_id) {
209
+ const variantProduct = (_b = product == null ? void 0 : product.variant) == null ? void 0 : _b.find(
210
+ (item) => (item == null ? void 0 : item.id) === (product == null ? void 0 : product.product_variant_id)
211
+ );
212
+ if (variantProduct) {
213
+ const depositData = variantProduct == null ? void 0 : variantProduct.custom_deposit_data;
214
+ const { depositTotal, result } = calculateProductDeposit({
215
+ depositData,
216
+ total: (cartItem == null ? void 0 : cartItem.total) || 0,
217
+ num
218
+ });
219
+ if (result) {
220
+ total = depositTotal;
221
+ protocolIds.push(...(depositData == null ? void 0 : depositData.self_deposit_policy_ids) || []);
222
+ productHasDeposit = true;
223
+ }
224
+ }
225
+ }
226
+ if (bundle == null ? void 0 : bundle.length) {
227
+ total = bundle.reduce((accumulator, currBundleProduct) => {
228
+ const depositData = currBundleProduct == null ? void 0 : currBundleProduct.custom_deposit_data;
229
+ const { depositTotal, result } = calculateProductDeposit({
230
+ depositData,
231
+ total: currBundleProduct == null ? void 0 : currBundleProduct.price,
232
+ num: (currBundleProduct == null ? void 0 : currBundleProduct.num) || 1
233
+ });
234
+ if (result) {
235
+ protocolIds.push(...(depositData == null ? void 0 : depositData.self_deposit_policy_ids) || []);
236
+ productHasDeposit = true;
237
+ return accumulator.plus(depositTotal);
238
+ }
239
+ return accumulator;
240
+ }, new import_decimal.default(0));
241
+ }
242
+ }
243
+ if (productHasDeposit) {
244
+ const ids = new Set(protocolIds);
245
+ const protocols = allProtocols.filter((item) => ids.has(item.id));
246
+ return { total: total.toNumber(), protocols };
247
+ }
248
+ return null;
249
+ }
250
+ return null;
251
+ };
252
+ var calculateProductDeposit = (params) => {
253
+ const { depositData, total, num } = params;
254
+ if (!depositData) {
255
+ return { result: false, depositTotal: new import_decimal.default(0) };
256
+ }
257
+ const { deposit_fixed, deposit_percentage } = depositData || {};
258
+ if (typeof deposit_fixed === "string" && typeof deposit_percentage === "string") {
259
+ const depositFixed = new import_decimal.default(deposit_fixed || 0);
260
+ const depositPercent = new import_decimal.default(deposit_percentage || 0);
261
+ const productTotalPrice = new import_decimal.default(total || 0);
262
+ const deposit = depositFixed.plus(depositPercent.times(productTotalPrice));
263
+ return { depositTotal: deposit.times(num), result: true };
264
+ }
265
+ return { result: false, depositTotal: new import_decimal.default(0) };
266
+ };
141
267
  // Annotate the CommonJS export names for ESM import in node:
142
268
  0 && (module.exports = {
269
+ calculateProductDeposit,
143
270
  formatBundleToOrigin,
144
271
  formatOptionsToOrigin,
145
272
  getOriginTotalPrice,
273
+ getProductDeposit,
146
274
  getTotalPrice,
147
275
  handleCartItemOrigin,
276
+ handleProductDeposit,
148
277
  handleProductInfo
149
278
  });
@@ -5,6 +5,9 @@ interface PayProps {
5
5
  order_id: string;
6
6
  amount: number;
7
7
  sale_channel?: string;
8
+ is_deposit?: number;
9
+ deposit_amount?: number;
10
+ total_amount?: number;
8
11
  }
9
12
  interface CheckoutContextType {
10
13
  onCheckBeforeBooking: (data: any) => Promise<{
@@ -15,6 +18,7 @@ interface CheckoutContextType {
15
18
  onPay: (payProps: PayProps) => void;
16
19
  createBooking: any;
17
20
  checkBeforeBooking: any;
21
+ freePay: any;
18
22
  }
19
23
  interface CheckoutProviderProps {
20
24
  children: React.ReactNode;