@pisell/private-materials 6.7.7 → 6.7.9

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 (367) 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 +2 -2
  6. package/build/lowcode/preview.js +17 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Voucher/index.js +1 -2
  12. package/es/components/booking/addons/index.js +17 -25
  13. package/es/components/booking/addons/model.d.ts +10 -1
  14. package/es/components/booking/components/footer/amount.d.ts +0 -1
  15. package/es/components/booking/components/footer/amount.js +84 -548
  16. package/es/components/booking/components/footer/index.js +56 -77
  17. package/es/components/booking/components/footer/utils.d.ts +0 -19
  18. package/es/components/booking/components/footer/utils.js +73 -194
  19. package/es/components/booking/components/voucher/index.js +7 -23
  20. package/es/components/booking/forms/model.d.ts +10 -1
  21. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  22. package/es/components/booking/hooks/useQuotation.js +1 -4
  23. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  24. package/es/components/booking/info/model.d.ts +10 -1
  25. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  26. package/es/components/booking/info/service2/utils.js +0 -1
  27. package/es/components/booking/info2/cartClientCard/index.js +6 -30
  28. package/es/components/booking/info2/index.js +1 -1
  29. package/es/components/booking/info2/service/addService/index.js +3 -2
  30. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  31. package/es/components/booking/info2/service/editNormalService/index.js +0 -6
  32. package/es/components/booking/info2/service/editService/index.js +6 -16
  33. package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
  34. package/es/components/booking/info2/service/editService/utils.js +0 -66
  35. package/es/components/booking/model.d.ts +9 -1
  36. package/es/components/booking/notes/model.d.ts +10 -1
  37. package/es/components/booking/payments/model.d.ts +10 -1
  38. package/es/components/booking/utils.d.ts +0 -1
  39. package/es/components/booking/utils.js +3 -16
  40. package/es/components/checkout/PaymentModal.d.ts +5 -13
  41. package/es/components/checkout/PaymentModal.js +252 -304
  42. package/es/components/checkout/PaymentPlugin.d.ts +3 -0
  43. package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
  44. package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
  45. package/es/components/checkout/components/AdditionalModule/index.js +12 -52
  46. package/es/components/checkout/components/AmountSummary/index.js +76 -9
  47. package/es/components/checkout/components/AmountSummary/index.less +6 -5
  48. package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
  49. package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
  50. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  51. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
  52. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
  53. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
  54. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
  55. package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
  56. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
  57. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
  58. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  59. package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
  60. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  61. package/es/components/checkout/hooks/useWalletPass.js +1 -1
  62. package/es/components/checkout/index.less +1 -1
  63. package/es/components/checkout/locales.d.ts +0 -6
  64. package/es/components/checkout/locales.js +0 -6
  65. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
  66. package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
  67. package/es/components/eftposPay/hooks.d.ts +1 -1
  68. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
  69. package/es/components/eftposPay/payo/config.js +32 -70
  70. package/es/components/eftposPay/store/index.d.ts +4 -4
  71. package/es/components/eftposPay/tyro/index.js +0 -12
  72. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  76. package/es/components/index.d.ts +1 -2
  77. package/es/components/index.js +1 -2
  78. package/es/components/list/List.js +40 -56
  79. package/es/components/list/hooks/useListState.d.ts +3 -5
  80. package/es/components/list/hooks/useListState.js +2 -17
  81. package/es/components/list/styles/header.less +3 -3
  82. package/es/components/list/utils/index.d.ts +1 -13
  83. package/es/components/list/utils/index.js +1 -43
  84. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
  85. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  86. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
  87. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
  88. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
  89. package/es/components/pay/toC/index.js +4 -7
  90. package/es/components/pay/toC/locales.d.ts +0 -3
  91. package/es/components/pay/toC/locales.js +3 -6
  92. package/es/components/pay/toC/model.d.ts +9 -1
  93. package/es/components/pay/toC/status.d.ts +0 -1
  94. package/es/components/pay/toC/status.js +0 -3
  95. package/es/components/schedules/model.d.ts +9 -1
  96. package/es/components/schedules/utils.d.ts +1 -1
  97. package/es/components/subTotal/index.js +1 -1
  98. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
  99. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
  100. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
  101. package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
  102. package/es/components/ticketBooking/components/menuBar/index.js +12 -109
  103. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  104. package/es/components/ticketBooking/components/timeBar/index.js +7 -112
  105. package/es/components/ticketBooking/components/timeBar/index.less +0 -59
  106. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
  107. package/es/components/ticketBooking/locales.d.ts +0 -6
  108. package/es/components/ticketBooking/locales.js +3 -9
  109. package/es/components/ticketBooking/utils/index.d.ts +0 -3
  110. package/es/components/ticketBooking/utils/index.js +13 -36
  111. package/es/components/wallet/Detail/index.js +2 -34
  112. package/es/components/wallet/Detail/index.less +0 -11
  113. package/es/components/wallet/Detail/locales.d.ts +0 -6
  114. package/es/components/wallet/Detail/locales.js +2 -14
  115. package/es/components/wallet/Detail/model.d.ts +13 -1
  116. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  117. package/es/components/wallet/PointCard/model.d.ts +13 -1
  118. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  119. package/es/components/wallet/Voucher/index.js +10 -11
  120. package/es/components/wallet/Voucher/model.d.ts +13 -1
  121. package/es/components/wallet/components/WalletCard.js +1 -5
  122. package/es/components/wallet/index.js +2 -4
  123. package/es/components/wallet/model.d.ts +9 -1
  124. package/es/components/wallet/serve.d.ts +0 -7
  125. package/es/hooks/usePaymentLogger.d.ts +0 -1
  126. package/es/index.d.ts +0 -4
  127. package/es/index.js +1 -5
  128. package/es/plus/clientCard/locales.js +3 -3
  129. package/es/plus/clinetSearch/index.js +30 -28
  130. package/es/plus/clinetSearch/locales.d.ts +0 -3
  131. package/es/plus/clinetSearch/locales.js +4 -7
  132. package/es/plus/clinetSearch/types.d.ts +0 -12
  133. package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
  134. package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
  135. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
  136. package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
  137. package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
  138. package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
  139. package/es/plus/walletPassGallery/index.js +3 -7
  140. package/es/plus/walletPassGallery/serve.d.ts +0 -3
  141. package/es/plus/walletPassGallery/serve.js +2 -4
  142. package/es/pro/Login2.0/index.less +8 -15
  143. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  144. package/es/pro/comprehensiveSearch/locales.js +1 -1
  145. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -45
  146. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  147. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
  148. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
  149. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
  150. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
  151. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
  152. package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
  153. package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
  154. package/es/utils/index.d.ts +1 -1
  155. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
  156. package/lib/components/booking/addons/index.js +7 -15
  157. package/lib/components/booking/addons/model.d.ts +10 -1
  158. package/lib/components/booking/components/footer/amount.d.ts +0 -1
  159. package/lib/components/booking/components/footer/amount.js +41 -293
  160. package/lib/components/booking/components/footer/index.js +11 -30
  161. package/lib/components/booking/components/footer/utils.d.ts +0 -19
  162. package/lib/components/booking/components/footer/utils.js +41 -138
  163. package/lib/components/booking/components/voucher/index.js +9 -25
  164. package/lib/components/booking/forms/model.d.ts +10 -1
  165. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  166. package/lib/components/booking/hooks/useQuotation.js +1 -2
  167. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  168. package/lib/components/booking/info/model.d.ts +10 -1
  169. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  170. package/lib/components/booking/info/service2/utils.js +0 -1
  171. package/lib/components/booking/info2/cartClientCard/index.js +5 -25
  172. package/lib/components/booking/info2/index.js +2 -7
  173. package/lib/components/booking/info2/service/addService/index.js +2 -1
  174. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  175. package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
  176. package/lib/components/booking/info2/service/editService/index.js +3 -12
  177. package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
  178. package/lib/components/booking/info2/service/editService/utils.js +3 -40
  179. package/lib/components/booking/model.d.ts +9 -1
  180. package/lib/components/booking/notes/model.d.ts +10 -1
  181. package/lib/components/booking/payments/model.d.ts +10 -1
  182. package/lib/components/booking/utils.d.ts +0 -1
  183. package/lib/components/booking/utils.js +0 -11
  184. package/lib/components/checkout/PaymentModal.d.ts +5 -13
  185. package/lib/components/checkout/PaymentModal.js +147 -190
  186. package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
  187. package/lib/components/checkout/PaymentPlugin.js +181 -0
  188. package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
  189. package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
  190. package/lib/components/checkout/components/AmountSummary/index.js +46 -5
  191. package/lib/components/checkout/components/AmountSummary/index.less +6 -5
  192. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
  193. package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
  194. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  195. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
  196. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
  197. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
  198. package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
  199. package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
  200. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
  201. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
  202. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  203. package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
  204. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  205. package/lib/components/checkout/hooks/useWalletPass.js +1 -1
  206. package/lib/components/checkout/index.less +1 -1
  207. package/lib/components/checkout/locales.d.ts +0 -6
  208. package/lib/components/checkout/locales.js +0 -6
  209. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
  210. package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
  211. package/lib/components/eftposPay/hooks.d.ts +1 -1
  212. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
  213. package/lib/components/eftposPay/payo/config.js +73 -98
  214. package/lib/components/eftposPay/store/index.d.ts +4 -4
  215. package/lib/components/eftposPay/tyro/index.js +0 -12
  216. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  217. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  218. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  219. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  220. package/lib/components/index.d.ts +1 -2
  221. package/lib/components/index.js +0 -3
  222. package/lib/components/list/List.js +16 -34
  223. package/lib/components/list/hooks/useListState.d.ts +3 -5
  224. package/lib/components/list/hooks/useListState.js +1 -14
  225. package/lib/components/list/styles/header.less +3 -3
  226. package/lib/components/list/utils/index.d.ts +1 -13
  227. package/lib/components/list/utils/index.js +0 -27
  228. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
  229. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  230. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
  231. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  232. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
  233. package/lib/components/pay/toC/index.js +1 -4
  234. package/lib/components/pay/toC/locales.d.ts +0 -3
  235. package/lib/components/pay/toC/locales.js +3 -6
  236. package/lib/components/pay/toC/model.d.ts +9 -1
  237. package/lib/components/pay/toC/status.d.ts +0 -1
  238. package/lib/components/pay/toC/status.js +0 -5
  239. package/lib/components/schedules/model.d.ts +9 -1
  240. package/lib/components/schedules/utils.d.ts +1 -1
  241. package/lib/components/subTotal/index.js +1 -1
  242. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
  243. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
  244. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
  245. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
  246. package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
  247. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  248. package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
  249. package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
  250. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
  251. package/lib/components/ticketBooking/locales.d.ts +0 -6
  252. package/lib/components/ticketBooking/locales.js +3 -9
  253. package/lib/components/ticketBooking/utils/index.d.ts +0 -3
  254. package/lib/components/ticketBooking/utils/index.js +6 -20
  255. package/lib/components/wallet/Detail/index.js +3 -31
  256. package/lib/components/wallet/Detail/index.less +0 -11
  257. package/lib/components/wallet/Detail/locales.d.ts +0 -6
  258. package/lib/components/wallet/Detail/locales.js +2 -14
  259. package/lib/components/wallet/Detail/model.d.ts +13 -1
  260. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  261. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  262. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  263. package/lib/components/wallet/Voucher/index.js +8 -8
  264. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  265. package/lib/components/wallet/components/WalletCard.js +0 -4
  266. package/lib/components/wallet/index.js +2 -2
  267. package/lib/components/wallet/model.d.ts +9 -1
  268. package/lib/components/wallet/serve.d.ts +0 -7
  269. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  270. package/lib/index.d.ts +0 -4
  271. package/lib/index.js +0 -12
  272. package/lib/plus/clientCard/locales.js +3 -3
  273. package/lib/plus/clinetSearch/index.js +8 -17
  274. package/lib/plus/clinetSearch/locales.d.ts +0 -3
  275. package/lib/plus/clinetSearch/locales.js +4 -7
  276. package/lib/plus/clinetSearch/types.d.ts +0 -12
  277. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  278. package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
  279. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
  280. package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
  281. package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
  282. package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
  283. package/lib/plus/walletPassGallery/index.js +3 -7
  284. package/lib/plus/walletPassGallery/serve.d.ts +0 -3
  285. package/lib/plus/walletPassGallery/serve.js +2 -3
  286. package/lib/pro/Login2.0/index.less +8 -15
  287. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  288. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  289. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +43 -42
  290. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  291. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
  292. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
  293. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
  294. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
  295. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
  296. package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
  297. package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
  298. package/lib/utils/index.d.ts +1 -1
  299. package/package.json +4 -4
  300. package/es/components/checkout/plugin.d.ts +0 -2
  301. package/es/components/checkout/plugin.js +0 -303
  302. package/es/components/eftposPay/payo/payment.d.ts +0 -66
  303. package/es/components/eftposPay/payo/payment.js +0 -579
  304. package/es/components/eftposPay/utils/log/index.d.ts +0 -110
  305. package/es/components/eftposPay/utils/log/index.js +0 -371
  306. package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
  307. package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
  308. package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
  309. package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
  310. package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
  311. package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
  312. package/es/components/systemSettings/registry/components/SectionList.js +0 -174
  313. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
  314. package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
  315. package/es/components/systemSettings/registry/components/index.d.ts +0 -4
  316. package/es/components/systemSettings/registry/components/index.js +0 -4
  317. package/es/components/systemSettings/registry/index.d.ts +0 -5
  318. package/es/components/systemSettings/registry/index.js +0 -1059
  319. package/es/components/systemSettings/registry/index.less +0 -410
  320. package/es/components/systemSettings/registry/locales.d.ts +0 -272
  321. package/es/components/systemSettings/registry/locales.js +0 -300
  322. package/es/components/systemSettings/registry/services.d.ts +0 -77
  323. package/es/components/systemSettings/registry/services.js +0 -472
  324. package/es/components/systemSettings/registry/types.d.ts +0 -126
  325. package/es/components/systemSettings/registry/types.js +0 -1
  326. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  327. package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
  328. package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
  329. package/es/components/systemSettings/registry/utils/validators.js +0 -44
  330. package/es/components/wallet/utils.d.ts +0 -48
  331. package/es/components/wallet/utils.js +0 -342
  332. package/lib/components/checkout/plugin.d.ts +0 -2
  333. package/lib/components/checkout/plugin.js +0 -263
  334. package/lib/components/eftposPay/payo/payment.d.ts +0 -66
  335. package/lib/components/eftposPay/payo/payment.js +0 -357
  336. package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
  337. package/lib/components/eftposPay/utils/log/index.js +0 -294
  338. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
  339. package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
  340. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
  341. package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
  342. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
  343. package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
  344. package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
  345. package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
  346. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
  347. package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
  348. package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
  349. package/lib/components/systemSettings/registry/components/index.js +0 -48
  350. package/lib/components/systemSettings/registry/index.d.ts +0 -5
  351. package/lib/components/systemSettings/registry/index.js +0 -529
  352. package/lib/components/systemSettings/registry/index.less +0 -410
  353. package/lib/components/systemSettings/registry/locales.d.ts +0 -272
  354. package/lib/components/systemSettings/registry/locales.js +0 -324
  355. package/lib/components/systemSettings/registry/services.d.ts +0 -77
  356. package/lib/components/systemSettings/registry/services.js +0 -290
  357. package/lib/components/systemSettings/registry/types.d.ts +0 -126
  358. package/lib/components/systemSettings/registry/types.js +0 -17
  359. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  360. package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
  361. package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
  362. package/lib/components/systemSettings/registry/utils/validators.js +0 -54
  363. package/lib/components/wallet/utils.d.ts +0 -48
  364. package/lib/components/wallet/utils.js +0 -287
  365. package/lowcode/payment-modal/meta.ts +0 -135
  366. package/lowcode/settings-registry/meta.ts +0 -29
  367. package/lowcode/wallet-pass-detail/meta.ts +0 -89
@@ -32,15 +32,10 @@ __export(utils_exports, {
32
32
  checkHolderIsError: () => checkHolderIsError,
33
33
  checkResourcesFormat: () => checkResourcesFormat,
34
34
  checkSubResourcesCapacity: () => checkSubResourcesCapacity,
35
- formatOriginalPrice: () => formatOriginalPrice,
36
35
  formatProductBundle: () => formatProductBundle,
37
36
  formatProductOption: () => formatProductOption,
38
37
  formatProductPrice: () => formatProductPrice,
39
- formatSellingPrice: () => formatSellingPrice,
40
- formatValues: () => formatValues,
41
- getBundleDiscountList: () => getBundleDiscountList,
42
- getMainProductSellingPrice: () => getMainProductSellingPrice,
43
- getSourceProductPrice: () => getSourceProductPrice
38
+ formatValues: () => formatValues
44
39
  });
45
40
  module.exports = __toCommonJS(utils_exports);
46
41
  var import_dayjs = __toESM(require("dayjs"));
@@ -79,10 +74,10 @@ var formatProductOption = (option) => {
79
74
  }
80
75
  return option.map((d) => {
81
76
  return {
82
- num: d.num,
83
- option_group_item_id: d.product_option_item_id || d.option_group_item_id,
84
- option_group_id: d.option_group_id,
85
- custom_add_price: Number(d == null ? void 0 : d.add_price)
77
+ "num": d.num,
78
+ "option_group_item_id": d.product_option_item_id || d.option_group_item_id,
79
+ "option_group_id": d.option_group_id,
80
+ "custom_add_price": Number(d == null ? void 0 : d.add_price)
86
81
  };
87
82
  });
88
83
  };
@@ -114,8 +109,6 @@ var formatProductBundle = (bundle) => {
114
109
  return temp + Number(item.num) * item.custom_add_price;
115
110
  }, 0);
116
111
  return {
117
- "is_charge_tax": d.is_charge_tax,
118
- "tax_fee": d.tax_fee,
119
112
  "bundle_group_id": d.group_id,
120
113
  "bundle_id": d.id,
121
114
  "bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
@@ -123,42 +116,16 @@ var formatProductBundle = (bundle) => {
123
116
  "num": d.num,
124
117
  "extension_id": d.extension_id,
125
118
  "extension_type": d.extension_type,
126
- "price": Number(d == null ? void 0 : d.product_price),
119
+ "price": Number(d == null ? void 0 : d.price),
120
+ // checkout 2.0 新增
127
121
  "price_type": d == null ? void 0 : d.price_type,
128
- "price_type_ext": d == null ? void 0 : d.price_type_ext,
129
- "custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
122
+ // checkout 2.0 新增
123
+ "custom_price": new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
130
124
  "custom_price_type": d == null ? void 0 : d.price_type,
131
- "option": option,
132
- "bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
133
- // "bundle_sum_price": d?.original_price || d?.original_total,
134
- "metadata": {
135
- custom_product_bundle_map_id: d._id,
136
- // 子商品单数量附加费
137
- "surcharge_fee": d.surcharge_fee,
138
- // 可选,附加费均摊舍入金额
139
- "surcharge_rounding_remainder": d.surcharge_rounding_remainder,
140
- relation_surcharge_ids: d.relation_surcharge_ids || []
141
- }
125
+ "option": option
142
126
  };
143
127
  });
144
128
  };
145
- var getBundleDiscountList = (bundle) => {
146
- if (!bundle) {
147
- return [];
148
- }
149
- let discountList = [];
150
- bundle.forEach((d) => {
151
- if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
152
- d.discount_list.forEach((item) => {
153
- if (item == null ? void 0 : item.id) {
154
- item.order_discount_id = item.id;
155
- }
156
- });
157
- discountList.push(...d.discount_list.filter((item) => !item.id));
158
- }
159
- });
160
- return discountList;
161
- };
162
129
  var getSubType = (item) => {
163
130
  var _a;
164
131
  const _type = (_a = item.duration) == null ? void 0 : _a.type;
@@ -246,7 +213,7 @@ var formatHolders = (state, item, values) => {
246
213
  var formatProductPrice = (item) => {
247
214
  var _a, _b, _c, _d;
248
215
  const other = (_a = item._extend) == null ? void 0 : _a.other;
249
- let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
216
+ let price = Number((_b = item._extend) == null ? void 0 : _b.price);
250
217
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
251
218
  const variant = item.variant.find(
252
219
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -290,26 +257,6 @@ var formatMetaData = (item, isMultiDayPrices) => {
290
257
  }
291
258
  return metadata;
292
259
  };
293
- var formatProductMetadata = (item) => {
294
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
295
- let metadata = {};
296
- if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
297
- metadata.main_product_attached_bundle_surcharge_fee = (_b = item._extend) == null ? void 0 : _b.surcharge_fee;
298
- }
299
- if ((_c = item._extend) == null ? void 0 : _c.main_product_attached_bundle_tax_fee) {
300
- metadata.main_product_attached_bundle_tax_fee = (_d = item._extend) == null ? void 0 : _d.main_product_attached_bundle_tax_fee;
301
- }
302
- if ((_e = item._extend) == null ? void 0 : _e.surcharge_rounding_remainder) {
303
- metadata.surcharge_rounding_remainder = (_f = item._extend) == null ? void 0 : _f.surcharge_rounding_remainder;
304
- }
305
- if ((_g = item._extend) == null ? void 0 : _g.relation_surcharge_ids) {
306
- metadata.relation_surcharge_ids = (_h = item._extend) == null ? void 0 : _h.relation_surcharge_ids;
307
- }
308
- if ((_i = item._extend) == null ? void 0 : _i.unique_identification_number) {
309
- metadata.unique_identification_number = (_j = item._extend) == null ? void 0 : _j.unique_identification_number;
310
- }
311
- return metadata;
312
- };
313
260
  var getSourceProductPrice = (item) => {
314
261
  var _a, _b, _c;
315
262
  const other = (_a = item._extend) == null ? void 0 : _a.other;
@@ -324,36 +271,12 @@ var getSourceProductPrice = (item) => {
324
271
  }
325
272
  return price;
326
273
  };
327
- var getMainProductSellingPrice = (item) => {
328
- var _a, _b, _c, _d, _e, _f;
329
- if (!(0, import_utils5.isNumber)((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) && !(0, import_utils5.isString)((_b = item._extend) == null ? void 0 : _b.main_product_selling_price)) {
330
- return void 0;
331
- }
332
- let optionPrice = new import_decimal.default(0);
333
- if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
334
- optionPrice = (_e = item._extend.other) == null ? void 0 : _e.option.reduce((accumulator, currentValue) => {
335
- const currentPrice = new import_decimal.default(currentValue.price || 0);
336
- const currentNum = new import_decimal.default(currentValue.num || 0);
337
- return accumulator.add(currentPrice.mul(currentNum));
338
- }, optionPrice);
339
- }
340
- return new import_decimal.default((_f = item._extend) == null ? void 0 : _f.main_product_selling_price).add(optionPrice).toNumber();
341
- };
342
274
  var formatProducts = (item, quantity) => {
343
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
344
- if (item == null ? void 0 : item.discount_list) {
345
- item == null ? void 0 : item.discount_list.forEach((d) => {
346
- if (d == null ? void 0 : d.id) {
347
- d.order_discount_id = d.id;
348
- }
349
- });
350
- }
275
+ var _a, _b, _c, _d, _e, _f, _g;
351
276
  const total = Number(item._extend.total);
352
277
  const origin_total = Number(item._extend.origin_total);
353
278
  const discount_amount = origin_total - total;
354
- const bundleDiscountList = getBundleDiscountList(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
355
- const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
356
- discount_list.push(...bundleDiscountList);
279
+ const discount_list = (item == null ? void 0 : item.discount_list) || [];
357
280
  const discount_type = discount_amount < 0 ? "change_price" : "discount";
358
281
  discount_list.forEach((d) => {
359
282
  d.metadata = {
@@ -371,23 +294,22 @@ var formatProducts = (item, quantity) => {
371
294
  "name": item.name,
372
295
  "num": quantity || item._extend.quantity,
373
296
  "price": formatProductPrice(item),
374
- "main_product_selling_price": getMainProductSellingPrice(item) ?? formatProductPrice(item),
375
297
  "source_product_price": getSourceProductPrice(item),
376
298
  "product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
377
299
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
378
300
  "product_discount_reason": item._extend.discount_reason || "",
379
301
  "is_charge_tax": item.is_charge_tax,
380
- "note": ((_c = item._extend) == null ? void 0 : _c.note) || "",
302
+ "note": ((_a = item._extend) == null ? void 0 : _a.note) || "",
381
303
  "discountway": item._extend.discountway || "num",
382
304
  "discount_per": item._extend.discount_per,
383
305
  "discount_type": item._extend.discount_type || discount_type,
384
306
  "order_detail_id": item._extend.order_detail_id || 0,
385
- "product_bundle": formatProductBundle((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
386
- "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
387
- "product_option_item": formatProductOption((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
388
- "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
307
+ "product_bundle": formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
308
+ "bundle_edit": item._extend.bundle_edit,
309
+ "product_option_item": formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
310
+ "product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
389
311
  "discount_list": notManualDiscount,
390
- metadata: formatProductMetadata(item),
312
+ metadata: formatMetaData(item, false),
391
313
  // checkout 需求新增字段
392
314
  "calculated_original_price": formatOriginalPrice(item),
393
315
  "calculated_selling_price": formatSellingPrice(item),
@@ -450,7 +372,7 @@ var formatBookings = (data, values) => {
450
372
  let bookings = [];
451
373
  let obj = {};
452
374
  list.forEach((item) => {
453
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
375
+ var _a, _b, _c, _d, _e, _f;
454
376
  if (item.isCustomItem) {
455
377
  bookings.push({
456
378
  ...item._extend,
@@ -490,32 +412,26 @@ var formatBookings = (data, values) => {
490
412
  item._extend.unique_identification_number = unique_identification_number;
491
413
  }
492
414
  const isSetGroupId = obj[(_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.groupId];
493
- if (!((_g = item._extend) == null ? void 0 : _g.unique_identification_number)) {
494
- const unique_identification_number = (0, import_utils5.getUniqueId)();
495
- item._extend.unique_identification_number = unique_identification_number;
496
- }
497
- debugger;
498
415
  const booking = {
499
- schedule_event_id: item == null ? void 0 : item.booking_id,
500
- product: formatProducts(item),
501
- relation_products: formatRelationDetails(item._extend.relation_details),
502
- id: item.booking_id || 0,
503
- relation_id: item._extend.relation_id || 0,
504
- like_status: item._extend.like_status || "common",
505
- relation_type: item._extend.relation_type || "",
506
- is_all: false,
507
- schedule_id: item._extend.schedule_id || 0,
508
- end_time,
509
- sub_type: isDay ? "days" : getSubType(item),
510
- select_date: start_date,
511
- start_time,
512
- end_date,
513
- start_date,
514
- duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
515
- number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
516
- resources: formatResource(item),
517
- note: item._extend.note,
518
- metadata: formatMetaData(item, !isSetGroupId),
416
+ "product": formatProducts(item),
417
+ "metadata": formatMetaData(item, !isSetGroupId),
418
+ "relation_products": formatRelationDetails(item._extend.relation_details),
419
+ "id": item.booking_id || 0,
420
+ "relation_id": item._extend.relation_id || 0,
421
+ "like_status": item._extend.like_status || "common",
422
+ "relation_type": item._extend.relation_type || "",
423
+ "is_all": false,
424
+ "schedule_id": item._extend.schedule_id || 0,
425
+ "end_time": end_time,
426
+ "sub_type": isDay ? "days" : getSubType(item),
427
+ "select_date": start_date,
428
+ "start_time": start_time,
429
+ "end_date": end_date,
430
+ "start_date": start_date,
431
+ "duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
432
+ "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
433
+ "resources": formatResource(item),
434
+ "note": item._extend.note,
519
435
  ...eventOtherParams || {},
520
436
  ...dayParams
521
437
  };
@@ -529,20 +445,12 @@ var formatBookings = (data, values) => {
529
445
  for (let i = 0; i < (item._extend.quantity || 1); i++) {
530
446
  const newItem = (0, import_lodash.cloneDeep)(item);
531
447
  newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
532
- if (i > 0) {
533
- newItem._extend.surcharge_rounding_remainder = void 0;
534
- if (((_j = (_i = (_h = newItem._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle) == null ? void 0 : _j.length) > 0) {
535
- newItem._extend.other.bundle.forEach((bundleItem) => {
536
- bundleItem.surcharge_rounding_remainder = void 0;
537
- });
538
- }
539
- }
540
448
  bookings.push({
541
449
  ...booking,
542
450
  "product": formatProducts(newItem, 1),
543
451
  "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
544
452
  "holder": getHolderByIndex(booking.holder, i),
545
- "metadata": formatMetaData(newItem, false)
453
+ "metadata": formatMetaData(newItem)
546
454
  });
547
455
  }
548
456
  });
@@ -701,13 +609,8 @@ var checkHolderIsError = (state) => {
701
609
  checkHolderIsError,
702
610
  checkResourcesFormat,
703
611
  checkSubResourcesCapacity,
704
- formatOriginalPrice,
705
612
  formatProductBundle,
706
613
  formatProductOption,
707
614
  formatProductPrice,
708
- formatSellingPrice,
709
- formatValues,
710
- getBundleDiscountList,
711
- getMainProductSellingPrice,
712
- getSourceProductPrice
615
+ formatValues
713
616
  });
@@ -60,8 +60,6 @@ var VoucherCard = (props) => {
60
60
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
61
61
  const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
62
62
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
63
- const stateRef = (0, import_react.useRef)(state);
64
- stateRef.current = state;
65
63
  services = state.service;
66
64
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
67
65
  dispatch({
@@ -105,17 +103,11 @@ var VoucherCard = (props) => {
105
103
  total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
106
104
  discount_list: value.discount_list,
107
105
  origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
108
- quantity: value._extend.quantity,
109
- startDate: value._extend.startDate
106
+ quantity: value._extend.quantity
110
107
  };
111
108
  });
112
109
  return val;
113
110
  }, [state.service.value]);
114
- const serviceTotal = (0, import_react.useMemo)(() => {
115
- return serviceMemo.reduce((total, item) => {
116
- return total + (item.total || 0);
117
- }, 0);
118
- }, [serviceMemo]);
119
111
  const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
120
112
  if (!e.detail.code) {
121
113
  return;
@@ -163,8 +155,8 @@ var VoucherCard = (props) => {
163
155
  }
164
156
  if (isBooking4Shop) {
165
157
  const val = shopDiscount.calcDiscount([
166
- ...stateRef.current.service.value,
167
- ...stateRef.current.addons.value
158
+ ...state.service.value,
159
+ ...state.addons.value
168
160
  ]);
169
161
  console.log("input: ", state.service.value);
170
162
  console.log("output: ", val);
@@ -235,12 +227,6 @@ var VoucherCard = (props) => {
235
227
  const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
236
228
  var _a2;
237
229
  const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
238
- const newTotal = serviceList.reduce((total, item) => {
239
- return total + (item._extend.total || 0);
240
- }, 0);
241
- if (newTotal !== serviceTotal) {
242
- edit = true;
243
- }
244
230
  serviceValueRef.current = serviceList;
245
231
  addonsValueRef.current = addonsList;
246
232
  let other = {};
@@ -257,14 +243,12 @@ var VoucherCard = (props) => {
257
243
  }
258
244
  });
259
245
  if (!((_a2 = props == null ? void 0 : props.state) == null ? void 0 : _a2.isBookingTicket2)) {
260
- setTimeout(() => {
261
- dispatch({
262
- type: "setAddons",
263
- payload: {
264
- value: addonsList,
265
- ...other
266
- }
267
- });
246
+ dispatch({
247
+ type: "setAddons",
248
+ payload: {
249
+ value: addonsList,
250
+ ...other
251
+ }
268
252
  });
269
253
  }
270
254
  });
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -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;
@@ -95,11 +95,10 @@ var setNewCartValue = (cartValue, newProducts) => {
95
95
  }
96
96
  const selectBundleInfo = item._extend.other.bundle.find((item2) => item2.id === bundle.id);
97
97
  const optionPrice = calculateTotalPrice((selectBundleInfo == null ? void 0 : selectBundleInfo.option) || []);
98
- const isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
99
98
  return {
100
99
  ...bundle,
101
100
  base_price: bundleItemMap[bundle.id].base_price,
102
- price: isEditDiscount ? bundle.price : new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
101
+ price: new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
103
102
  // product_price: bundleItemMap[item.id].product_price,
104
103
  };
105
104
  });
@@ -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,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -378,7 +378,6 @@ var formatBundle = (bundle) => {
378
378
  num: item == null ? void 0 : item.num,
379
379
  price: item == null ? void 0 : item.price,
380
380
  total: item == null ? void 0 : item.price,
381
- origin_total: item.original_total,
382
381
  price_type: item == null ? void 0 : item.price_type,
383
382
  bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
384
383
  bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
@@ -36,7 +36,6 @@ var import_react = __toESM(require("react"));
36
36
  var import_ahooks = require("ahooks");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
- var import_lodash = require("lodash");
40
39
  var import_locales = __toESM(require("./locales"));
41
40
  var import_clientCard = __toESM(require("../../../../plus/clientCard"));
42
41
  var import_clinetSearch = __toESM(require("../../../../plus/clinetSearch"));
@@ -149,34 +148,10 @@ var CartClientCard = (0, import_react.forwardRef)(({
149
148
  selectCustomer(null);
150
149
  };
151
150
  const handleViewClient = (data) => {
152
- const newSelectedCustomer = (0, import_lodash.cloneDeep)(selectedCustomer);
153
151
  state.action({
154
152
  type: "pisell1.handleOpenCustomerModal",
155
153
  data: { id: state.client.value.id },
156
154
  callback: (data2) => {
157
- console.log("data>>>>>", data2);
158
- const _selectedCustomer = {
159
- ...newSelectedCustomer || {},
160
- display_name: (data2 == null ? void 0 : data2.display_name) || "",
161
- email: (data2 == null ? void 0 : data2.email) || "",
162
- phone: (data2 == null ? void 0 : data2.phone) || "",
163
- nickname: (data2 == null ? void 0 : data2.nickname) || "",
164
- country_calling_code: (data2 == null ? void 0 : data2.country_calling_code) || "",
165
- first_name: (data2 == null ? void 0 : data2.first_name) || "",
166
- last_name: (data2 == null ? void 0 : data2.last_name) || "",
167
- contacts_info: (data2 == null ? void 0 : data2.contacts_info) || null
168
- };
169
- selectCustomer(_selectedCustomer);
170
- if (JSON.stringify((newSelectedCustomer == null ? void 0 : newSelectedCustomer.contacts_info) || {}) !== JSON.stringify((data2 == null ? void 0 : data2.contacts_info) || {})) {
171
- dispatch({
172
- type: "setContactsInfo",
173
- payload: {
174
- value: (data2 == null ? void 0 : data2.contacts_info) || {},
175
- client_id: data2 == null ? void 0 : data2.id
176
- }
177
- });
178
- }
179
- handleSearchClient("");
180
155
  }
181
156
  });
182
157
  };
@@ -262,6 +237,11 @@ var CartClientCard = (0, import_react.forwardRef)(({
262
237
  (0, import_utils3.setHandleSetClient)(handleSetClient);
263
238
  }
264
239
  }, [isActive]);
240
+ (0, import_react.useEffect)(() => {
241
+ return () => {
242
+ (0, import_utils3.setHandleSetClient)(null);
243
+ };
244
+ }, [isActive]);
265
245
  const tags = (0, import_react.useMemo)(() => {
266
246
  var _a2;
267
247
  if (!selectedCustomer) return;
@@ -58,9 +58,9 @@ var import_classnames = __toESM(require("classnames"));
58
58
  var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
59
59
  var import_locales2 = require("../../../utils/locales");
60
60
  var import_ahooks = require("ahooks");
61
+ var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
61
62
  var import_cartClientCard = __toESM(require("./cartClientCard"));
62
63
  var import_materials = require("@pisell/materials");
63
- var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
64
64
  var defaultModules = {
65
65
  client: 1,
66
66
  date: 1,
@@ -299,12 +299,7 @@ var Info = (0, import_model.Provider)((props) => {
299
299
  dispatch: modal.dispatch,
300
300
  source: "info"
301
301
  },
302
- /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
303
- import_cartClientCard.default,
304
- {
305
- clientCardProps: { dropdown: dropdownProps }
306
- }
307
- )) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
302
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(import_cartClientCard.default, { clientCardProps: { dropdown: dropdownProps } })) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
308
303
  "div",
309
304
  {
310
305
  className: "booking-info-client-line-code",
@@ -243,12 +243,13 @@ var Info = (props) => {
243
243
  _extend: {
244
244
  start_date: state.date.value,
245
245
  quantity: (e == null ? void 0 : e.quantity) || 1,
246
+ price: _detail.price,
246
247
  product_name: item.title,
247
248
  other
248
249
  },
249
250
  new: 1
250
251
  };
251
- cacheItem._extend.price = (0, import_utils3.getMainPrice)(cacheItem, _detail.price);
252
+ console.log(cacheItem, "cacheItem", e);
252
253
  let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
253
254
  cacheItem._extend.total = _total;
254
255
  cacheItem._extend.origin_total = _total;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -36,7 +36,6 @@ var import_react = __toESM(require("react"));
36
36
  var import_ahooks = require("ahooks");
37
37
  var import_skuDetailModal = __toESM(require("../../../../../pro/skuDetailModal"));
38
38
  var import_model = require("../../../info/model");
39
- var import_utils = require("../editService/utils");
40
39
  var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
41
40
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
42
41
  const modalRef = (0, import_react.useRef)(null);
@@ -63,12 +62,7 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
63
62
  const handleConfirm = (0, import_ahooks.useMemoizedFn)((data) => {
64
63
  var _a, _b;
65
64
  const newProducts = (_b = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || []) == null ? void 0 : _b.map((item) => {
66
- var _a2, _b2;
67
65
  if (item._id == data._id) {
68
- data = (0, import_utils.setProductPrice)(data, {
69
- newTotal: (_a2 = data._extend) == null ? void 0 : _a2.total,
70
- origin_total: (_b2 = data._extend) == null ? void 0 : _b2.origin_total
71
- });
72
66
  return data;
73
67
  }
74
68
  return item;
@@ -53,7 +53,6 @@ var import_utils5 = require("../../../info/utils");
53
53
  var import_utils6 = require("../../../utils");
54
54
  var import_utilsByBooking = require("../../utilsByBooking");
55
55
  var import_utils7 = require("../addService/utils");
56
- var import_utils8 = require("./utils");
57
56
  var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
58
57
  var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
59
58
  var submitLock = false;
@@ -188,7 +187,7 @@ var Info = (_, ref) => {
188
187
  form.setFieldsValue({ discount });
189
188
  };
190
189
  const onFinish = (values) => {
191
- var _a2, _b2, _c2, _d2, _e2, _f2;
190
+ var _a2, _b2, _c2, _d2;
192
191
  let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
193
192
  if (isShowTimeAndResource && !isSuccess) {
194
193
  return;
@@ -223,27 +222,19 @@ var Info = (_, ref) => {
223
222
  _item._time = (/* @__PURE__ */ new Date()).getTime();
224
223
  _item._serviceKey = (0, import_utils3.genServiceKey)(_item);
225
224
  let _id = _item == null ? void 0 : _item._id;
226
- _item = (0, import_utils8.setProductPrice)(_item, {
227
- newTotal: values.total,
228
- origin_total: (_c2 = _item._extend) == null ? void 0 : _c2.origin_total
229
- });
230
225
  if (!_list.some((d) => d._id === _id)) {
231
226
  const detail = (0, import_utils3.addService)(_list, _item, state);
232
227
  _list = detail.list;
233
228
  } else {
234
229
  if (isChangeTotal.current) {
235
230
  delete _item.discount_list;
236
- _item = (0, import_utils8.setProductPrice)(_item, {
237
- newTotal: values.total,
238
- origin_total: (_d2 = _item._extend) == null ? void 0 : _d2.origin_total
239
- });
240
231
  }
241
232
  _list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
242
233
  }
243
234
  (0, import_utils6.deleteCacheParams)();
244
235
  console.log("_onFinish", _list);
245
236
  form.resetFields();
246
- if (!!((_e2 = state.service.cacheItem) == null ? void 0 : _e2.new)) {
237
+ if (!!((_c2 = state.service.cacheItem) == null ? void 0 : _c2.new)) {
247
238
  window.dispatchEvent(
248
239
  new CustomEvent("onAddNewService", {
249
240
  detail: {
@@ -252,7 +243,7 @@ var Info = (_, ref) => {
252
243
  })
253
244
  );
254
245
  }
255
- (_f2 = window.closeBookingEditModal) == null ? void 0 : _f2.call(window);
246
+ (_d2 = window.closeBookingEditModal) == null ? void 0 : _d2.call(window);
256
247
  dispatch({
257
248
  type: "setService",
258
249
  payload: {
@@ -11,18 +11,3 @@ export declare const getAutoAllocationStorage: (id: string | number) => any;
11
11
  export declare const setAutoAllocationStorage: (data: {
12
12
  [key: string]: boolean;
13
13
  }) => void;
14
- /**
15
- * 手动折扣后给商品价格和子商品价格重新计算
16
- *
17
- * 计算逻辑:
18
- * 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
19
- * 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
20
- *
21
- * @param cacheItem - 缓存的商品项
22
- * @param newTotal - 折扣后的新总价
23
- * @param origin_total - 原始总价
24
- */
25
- export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total }: {
26
- newTotal: number;
27
- origin_total: number;
28
- }) => any;