@pisell/private-materials 6.6.24 → 6.6.26

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 (500) 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/render/default/view.css +1 -1
  7. package/build/lowcode/render/default/view.js +1 -1
  8. package/build/lowcode/view.css +1 -1
  9. package/build/lowcode/view.js +1 -1
  10. package/es/businessModel/SalesModel/index.d.ts +0 -1
  11. package/es/components/Sales/Cart/utils.d.ts +63 -0
  12. package/es/components/Sales/Summary/utils.d.ts +51 -0
  13. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Voucher/index.js +22 -7
  16. package/es/components/appointmentBooking/locales.d.ts +363 -0
  17. package/es/components/booking/addons/index.js +3 -2
  18. package/es/components/booking/components/footer/amount.js +1 -1
  19. package/es/components/booking/components/footer/index.js +7 -0
  20. package/es/components/booking/components/footer/utils.d.ts +1 -1
  21. package/es/components/booking/components/footer/utils.js +7 -5
  22. package/es/components/booking/components/voucher/index.js +6 -0
  23. package/es/components/booking/components/voucher/index.less +4 -1
  24. package/es/components/booking/components/voucherModal/index.less +1 -0
  25. package/es/components/booking/dashboard/index.js +21 -5
  26. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  27. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  28. package/es/components/booking/forms/serve.d.ts +18 -0
  29. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  30. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  31. package/es/components/booking/info/client/serve.d.ts +2 -0
  32. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  33. package/es/components/booking/info/hooks/useHolderConfig.d.ts +10 -0
  34. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  35. package/es/components/booking/info/index.d.ts +0 -1
  36. package/es/components/booking/info/pet/serve.d.ts +1 -0
  37. package/es/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
  38. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  39. package/es/components/booking/info/service/serve.d.ts +34 -0
  40. package/es/components/booking/info/service2/utils.d.ts +1 -1
  41. package/es/components/booking/info2/cartClientCard/locales.d.ts +21 -0
  42. package/es/components/booking/info2/cartClientCard/types.d.ts +18 -0
  43. package/es/components/booking/info2/cartClientCard/utils.d.ts +3 -0
  44. package/es/components/booking/info2/serve.d.ts +6 -0
  45. package/es/components/booking/info2/service/editService/index.js +33 -2
  46. package/es/components/booking/locales.d.ts +951 -0
  47. package/es/components/checkout/PaymentModal.js +42 -2
  48. package/es/components/checkout/components/AdditionalModule/locales.d.ts +36 -0
  49. package/es/components/checkout/components/PaymentResultToast/types.d.ts +59 -0
  50. package/es/components/checkout/components/PaymentResultToast/utils.d.ts +44 -0
  51. package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
  52. package/es/components/checkout/components/ScrollableList/types.d.ts +53 -0
  53. package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
  54. package/es/components/checkout/components/WalletPassModule/index.js +1 -0
  55. package/es/components/checkout/components/WalletPassModule/types.d.ts +134 -0
  56. package/es/components/checkout/components/WalletPassModule/utils.d.ts +1 -0
  57. package/es/components/checkout/components/WalletPassModule/utils.js +17 -3
  58. package/es/components/checkout/constants.d.ts +2 -0
  59. package/es/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
  60. package/es/components/checkout/hooks/useWalletPass.d.ts +2 -2
  61. package/es/components/checkout/hooks/useWalletPass.js +322 -194
  62. package/es/components/checkout/locales.d.ts +513 -0
  63. package/es/components/checkout/styles.d.ts +67 -0
  64. package/es/components/checkout/types.d.ts +130 -0
  65. package/es/components/checkout/utils.d.ts +3 -0
  66. package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  67. package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  68. package/es/components/eftposPay/amount.d.ts +1 -1
  69. package/es/components/eftposPay/app.d.ts +0 -1
  70. package/es/components/eftposPay/component/fail/failCustom.js +1 -1
  71. package/es/components/eftposPay/const.d.ts +195 -0
  72. package/es/components/eftposPay/device.d.ts +1 -1
  73. package/es/components/eftposPay/hooks.d.ts +2 -2
  74. package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
  75. package/es/components/eftposPay/huifu/types.d.ts +14 -0
  76. package/es/components/eftposPay/locales.d.ts +366 -0
  77. package/es/components/eftposPay/manufacturer.d.ts +8 -0
  78. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  79. package/es/components/eftposPay/store/index.d.ts +362 -0
  80. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  81. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  82. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  83. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  84. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  85. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  86. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  87. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
  88. package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
  89. package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
  90. package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
  91. package/es/components/list/components/Tab/Tab.d.ts +5 -0
  92. package/es/components/list/components/Tab/index.d.ts +2 -0
  93. package/es/components/list/components/Tab/types.d.ts +14 -0
  94. package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
  95. package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
  96. package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
  97. package/es/components/list/components/WaterfallList/index.d.ts +2 -0
  98. package/es/components/list/hooks/index.d.ts +5 -0
  99. package/es/components/list/hooks/useDevice.d.ts +24 -0
  100. package/es/components/list/hooks/useListState.d.ts +43 -0
  101. package/es/components/list/hooks/useWaterfall.d.ts +34 -0
  102. package/es/components/list/locales.d.ts +66 -0
  103. package/es/components/list/types.d.ts +177 -0
  104. package/es/components/list/utils/getText.d.ts +53 -0
  105. package/es/components/list/utils/index.d.ts +4 -0
  106. package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  107. package/es/components/pay/toB/components/Content/utils.d.ts +16 -0
  108. package/es/components/pay/toB/hooks.d.ts +12 -0
  109. package/es/components/pay/toB/locales.d.ts +54 -0
  110. package/es/components/pay/toB/store/context.d.ts +3 -0
  111. package/es/components/pay/toB/store/index.d.ts +3 -0
  112. package/es/components/pay/toB/store/provider.d.ts +4 -0
  113. package/es/components/pay/toB/types/index.d.ts +61 -0
  114. package/es/components/pay/toB/types/storeTypes.d.ts +143 -0
  115. package/es/components/pay/toC/PaymentList/utils.d.ts +36 -0
  116. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +7 -0
  117. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
  118. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
  119. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  120. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  121. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  122. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  123. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +166 -145
  124. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  125. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  126. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  127. package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
  128. package/es/components/pay/toC/index.js +66 -27
  129. package/es/components/pay/toC/locales.d.ts +307 -0
  130. package/es/components/pay/toC/model.d.ts +1 -0
  131. package/es/components/pay/toC/serve.d.ts +18 -0
  132. package/es/components/pay/toC/serve.js +29 -1
  133. package/es/components/pay/toC/status.d.ts +13 -0
  134. package/es/components/pay/toC/utils.d.ts +2 -2
  135. package/es/components/pay/toC/utils.js +4 -0
  136. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  137. package/es/components/ruleSetting/locales.d.ts +48 -0
  138. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  139. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  140. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  141. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  142. package/es/components/shoppingCart/locales.d.ts +36 -0
  143. package/es/components/shoppingCart/type.d.ts +50 -0
  144. package/es/components/subTotal/locales.d.ts +42 -0
  145. package/es/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
  146. package/es/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
  147. package/es/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
  148. package/es/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
  149. package/es/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
  150. package/es/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
  151. package/es/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
  152. package/es/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
  153. package/es/components/systemSettings/registry/components/docs/images/image.png +0 -0
  154. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  155. package/es/components/systemSettings/registry/services.d.ts +77 -0
  156. package/es/components/systemSettings/registry/types.d.ts +126 -0
  157. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  158. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  159. package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
  160. package/es/components/ticketBooking/components/addServiceVariant/addService.js +7 -4
  161. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  162. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
  163. package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
  164. package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
  165. package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
  166. package/es/components/ticketBooking/context/index.d.ts +2 -0
  167. package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
  168. package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
  169. package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
  170. package/es/components/ticketBooking/locales.d.ts +198 -0
  171. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  172. package/es/components/ticketBooking/utils/productCache.d.ts +75 -0
  173. package/es/components/wallet/utils.d.ts +48 -0
  174. package/es/components/walletList/locales.d.ts +27 -0
  175. package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
  176. package/es/components/workSpaceList/components/Card/constants.d.ts +2 -0
  177. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  178. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  179. package/es/hooks/useEngineContext.d.ts +3 -0
  180. package/es/hooks/useLogger.d.ts +2 -0
  181. package/es/hooks/useToast.d.ts +2 -0
  182. package/es/hooks/useTranslationOriginal.d.ts +1 -0
  183. package/es/hooks/useWindowSize.d.ts +5 -0
  184. package/es/plus/clientCard/locales.d.ts +18 -0
  185. package/es/plus/clientCard/types.d.ts +134 -0
  186. package/es/plus/clientCard/utils.d.ts +8 -0
  187. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  188. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  189. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  190. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  191. package/es/plus/clinetSearch/locales.d.ts +108 -0
  192. package/es/plus/clinetSearch/types.d.ts +70 -0
  193. package/es/plus/noteModal/locales.d.ts +33 -0
  194. package/es/plus/noteModal/types.d.ts +19 -0
  195. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
  196. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
  197. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
  198. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
  199. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
  200. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -1
  201. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  202. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
  203. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
  204. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  205. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
  206. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -1
  207. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  208. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -1
  209. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
  210. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  211. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
  212. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -1
  213. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
  214. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
  215. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
  216. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
  217. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
  218. package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
  219. package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
  220. package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
  221. package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
  222. package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
  223. package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
  224. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  225. package/es/plus/selectHolder/locales.d.ts +24 -0
  226. package/es/plus/selectHolder/types.d.ts +104 -0
  227. package/es/plus/selectHolder/utils.d.ts +9 -0
  228. package/es/plus/walletEditor/locales.d.ts +135 -0
  229. package/es/plus/walletPassGallery/locales.d.ts +285 -0
  230. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  231. package/es/pro/Login2.0/shared/types.d.ts +232 -0
  232. package/es/pro/NumberKeyboardPopover/types.d.ts +31 -0
  233. package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
  234. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
  235. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
  236. package/es/pro/comprehensiveSearch/locales.d.ts +15 -0
  237. package/es/pro/comprehensiveSearch/types.d.ts +32 -0
  238. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  239. package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  240. package/es/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
  241. package/es/pro/pisellPriceKeyboardPopover/index.d.ts +2 -0
  242. package/es/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
  243. package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  244. package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  245. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +98 -0
  246. package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  247. package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  248. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  249. package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  250. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +18 -0
  251. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +0 -1
  252. package/es/pro/skuDetailModal/locales.d.ts +48 -0
  253. package/es/pro/skuDetailModal/types.d.ts +348 -0
  254. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  255. package/lib/components/Sales/Cart/utils.d.ts +63 -0
  256. package/lib/components/Sales/Summary/utils.d.ts +51 -0
  257. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  258. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  259. package/lib/components/appointmentBooking/components/Voucher/index.js +10 -2
  260. package/lib/components/appointmentBooking/locales.d.ts +363 -0
  261. package/lib/components/booking/addons/index.js +3 -2
  262. package/lib/components/booking/components/footer/amount.js +1 -1
  263. package/lib/components/booking/components/footer/index.js +9 -0
  264. package/lib/components/booking/components/footer/utils.d.ts +1 -1
  265. package/lib/components/booking/components/footer/utils.js +5 -3
  266. package/lib/components/booking/components/voucher/index.js +6 -0
  267. package/lib/components/booking/components/voucher/index.less +4 -1
  268. package/lib/components/booking/components/voucherModal/index.less +1 -0
  269. package/lib/components/booking/dashboard/index.js +11 -1
  270. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  271. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  272. package/lib/components/booking/forms/serve.d.ts +18 -0
  273. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  274. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  275. package/lib/components/booking/info/client/serve.d.ts +2 -0
  276. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  277. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +10 -0
  278. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  279. package/lib/components/booking/info/index.d.ts +0 -1
  280. package/lib/components/booking/info/pet/serve.d.ts +1 -0
  281. package/lib/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
  282. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  283. package/lib/components/booking/info/service/serve.d.ts +34 -0
  284. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  285. package/lib/components/booking/info2/cartClientCard/locales.d.ts +21 -0
  286. package/lib/components/booking/info2/cartClientCard/types.d.ts +18 -0
  287. package/lib/components/booking/info2/cartClientCard/utils.d.ts +3 -0
  288. package/lib/components/booking/info2/serve.d.ts +6 -0
  289. package/lib/components/booking/info2/service/editService/index.js +48 -24
  290. package/lib/components/booking/locales.d.ts +951 -0
  291. package/lib/components/checkout/PaymentModal.js +24 -1
  292. package/lib/components/checkout/components/AdditionalModule/locales.d.ts +36 -0
  293. package/lib/components/checkout/components/PaymentResultToast/types.d.ts +59 -0
  294. package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +44 -0
  295. package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
  296. package/lib/components/checkout/components/ScrollableList/types.d.ts +53 -0
  297. package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
  298. package/lib/components/checkout/components/WalletPassModule/index.js +1 -0
  299. package/lib/components/checkout/components/WalletPassModule/types.d.ts +134 -0
  300. package/lib/components/checkout/components/WalletPassModule/utils.d.ts +1 -0
  301. package/lib/components/checkout/components/WalletPassModule/utils.js +18 -2
  302. package/lib/components/checkout/constants.d.ts +2 -0
  303. package/lib/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
  304. package/lib/components/checkout/hooks/useWalletPass.d.ts +2 -2
  305. package/lib/components/checkout/hooks/useWalletPass.js +160 -107
  306. package/lib/components/checkout/locales.d.ts +513 -0
  307. package/lib/components/checkout/styles.d.ts +67 -0
  308. package/lib/components/checkout/types.d.ts +130 -0
  309. package/lib/components/checkout/utils.d.ts +3 -0
  310. package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  311. package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  312. package/lib/components/eftposPay/amount.d.ts +1 -1
  313. package/lib/components/eftposPay/app.d.ts +0 -1
  314. package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
  315. package/lib/components/eftposPay/const.d.ts +195 -0
  316. package/lib/components/eftposPay/device.d.ts +1 -1
  317. package/lib/components/eftposPay/hooks.d.ts +2 -2
  318. package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
  319. package/lib/components/eftposPay/huifu/types.d.ts +14 -0
  320. package/lib/components/eftposPay/locales.d.ts +366 -0
  321. package/lib/components/eftposPay/manufacturer.d.ts +8 -0
  322. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  323. package/lib/components/eftposPay/store/index.d.ts +362 -0
  324. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  325. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  326. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  327. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  328. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  329. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  330. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  331. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
  332. package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
  333. package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
  334. package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
  335. package/lib/components/list/components/Tab/Tab.d.ts +5 -0
  336. package/lib/components/list/components/Tab/index.d.ts +2 -0
  337. package/lib/components/list/components/Tab/types.d.ts +14 -0
  338. package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
  339. package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
  340. package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
  341. package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
  342. package/lib/components/list/hooks/index.d.ts +5 -0
  343. package/lib/components/list/hooks/useDevice.d.ts +24 -0
  344. package/lib/components/list/hooks/useListState.d.ts +43 -0
  345. package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
  346. package/lib/components/list/locales.d.ts +66 -0
  347. package/lib/components/list/types.d.ts +177 -0
  348. package/lib/components/list/utils/getText.d.ts +53 -0
  349. package/lib/components/list/utils/index.d.ts +4 -0
  350. package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  351. package/lib/components/pay/toB/components/Content/utils.d.ts +16 -0
  352. package/lib/components/pay/toB/hooks.d.ts +12 -0
  353. package/lib/components/pay/toB/locales.d.ts +54 -0
  354. package/lib/components/pay/toB/store/context.d.ts +3 -0
  355. package/lib/components/pay/toB/store/index.d.ts +3 -0
  356. package/lib/components/pay/toB/store/provider.d.ts +4 -0
  357. package/lib/components/pay/toB/types/index.d.ts +61 -0
  358. package/lib/components/pay/toB/types/storeTypes.d.ts +143 -0
  359. package/lib/components/pay/toC/PaymentList/utils.d.ts +36 -0
  360. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +7 -0
  361. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
  362. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
  363. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  364. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  365. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  366. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  367. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
  368. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  369. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  370. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  371. package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
  372. package/lib/components/pay/toC/index.js +52 -11
  373. package/lib/components/pay/toC/locales.d.ts +307 -0
  374. package/lib/components/pay/toC/model.d.ts +1 -0
  375. package/lib/components/pay/toC/serve.d.ts +18 -0
  376. package/lib/components/pay/toC/serve.js +6 -0
  377. package/lib/components/pay/toC/status.d.ts +13 -0
  378. package/lib/components/pay/toC/utils.d.ts +2 -2
  379. package/lib/components/pay/toC/utils.js +4 -0
  380. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  381. package/lib/components/ruleSetting/locales.d.ts +48 -0
  382. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  383. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  384. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  385. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  386. package/lib/components/shoppingCart/locales.d.ts +36 -0
  387. package/lib/components/shoppingCart/type.d.ts +50 -0
  388. package/lib/components/subTotal/locales.d.ts +42 -0
  389. package/lib/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
  390. package/lib/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
  391. package/lib/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
  392. package/lib/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
  393. package/lib/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
  394. package/lib/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
  395. package/lib/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
  396. package/lib/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
  397. package/lib/components/systemSettings/registry/components/docs/images/image.png +0 -0
  398. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  399. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  400. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  401. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  402. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  403. package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
  404. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +11 -7
  405. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  406. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
  407. package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
  408. package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
  409. package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
  410. package/lib/components/ticketBooking/context/index.d.ts +2 -0
  411. package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
  412. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
  413. package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
  414. package/lib/components/ticketBooking/locales.d.ts +198 -0
  415. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  416. package/lib/components/ticketBooking/utils/productCache.d.ts +75 -0
  417. package/lib/components/wallet/utils.d.ts +48 -0
  418. package/lib/components/walletList/locales.d.ts +27 -0
  419. package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
  420. package/lib/components/workSpaceList/components/Card/constants.d.ts +2 -0
  421. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  422. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  423. package/lib/hooks/useEngineContext.d.ts +3 -0
  424. package/lib/hooks/useLogger.d.ts +2 -0
  425. package/lib/hooks/useToast.d.ts +2 -0
  426. package/lib/hooks/useTranslationOriginal.d.ts +1 -0
  427. package/lib/hooks/useWindowSize.d.ts +5 -0
  428. package/lib/plus/clientCard/locales.d.ts +18 -0
  429. package/lib/plus/clientCard/types.d.ts +134 -0
  430. package/lib/plus/clientCard/utils.d.ts +8 -0
  431. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  432. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  433. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  434. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  435. package/lib/plus/clinetSearch/locales.d.ts +108 -0
  436. package/lib/plus/clinetSearch/types.d.ts +70 -0
  437. package/lib/plus/noteModal/locales.d.ts +33 -0
  438. package/lib/plus/noteModal/types.d.ts +19 -0
  439. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
  440. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
  441. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
  442. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
  443. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
  444. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -1
  445. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  446. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
  447. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
  448. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  449. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
  450. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -1
  451. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  452. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -1
  453. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
  454. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  455. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
  456. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -1
  457. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
  458. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
  459. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
  460. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
  461. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
  462. package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
  463. package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
  464. package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
  465. package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
  466. package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
  467. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
  468. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  469. package/lib/plus/selectHolder/locales.d.ts +24 -0
  470. package/lib/plus/selectHolder/types.d.ts +104 -0
  471. package/lib/plus/selectHolder/utils.d.ts +9 -0
  472. package/lib/plus/walletEditor/locales.d.ts +135 -0
  473. package/lib/plus/walletPassGallery/locales.d.ts +285 -0
  474. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  475. package/lib/pro/Login2.0/shared/types.d.ts +232 -0
  476. package/lib/pro/NumberKeyboardPopover/types.d.ts +31 -0
  477. package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
  478. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
  479. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
  480. package/lib/pro/comprehensiveSearch/locales.d.ts +15 -0
  481. package/lib/pro/comprehensiveSearch/types.d.ts +32 -0
  482. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  483. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  484. package/lib/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
  485. package/lib/pro/pisellPriceKeyboardPopover/index.d.ts +2 -0
  486. package/lib/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
  487. package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  488. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  489. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +98 -0
  490. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  491. package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  492. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  493. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  494. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +18 -0
  495. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +0 -1
  496. package/lib/pro/skuDetailModal/locales.d.ts +48 -0
  497. package/lib/pro/skuDetailModal/types.d.ts +348 -0
  498. package/lowcode/eco-cup-list/meta.ts +63 -0
  499. package/lowcode/eco-customer-list/meta.ts +63 -0
  500. package/package.json +4 -4
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.module.less';
3
2
  declare const StripePayment: () => JSX.Element;
4
3
  export default StripePayment;
@@ -15,11 +15,16 @@ export interface WalletPassProps {
15
15
  walletPass: {
16
16
  cards: WalletPassDataType[];
17
17
  amount: number;
18
+ recommended?: WalletPassDataType[];
19
+ transformList?: WalletPassDataType[];
20
+ noApplicableVoucher?: WalletPassDataType[];
18
21
  };
19
22
  walletSetting: {
20
23
  name: string;
21
24
  popup_status: 0 | 1;
22
25
  };
26
+ orderDetail: any;
27
+ total_amount: number;
23
28
  }
24
29
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
25
30
  export default _default;
@@ -47,10 +47,14 @@ var import_index = require("./index.less");
47
47
  var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
48
48
  var { Amount } = import_materials.PisellText;
49
49
  var WalletPass = (0, import_react.forwardRef)((props, ref) => {
50
- var _a, _b, _c, _d, _e;
51
- const { onWalletPassChange, walletPass, walletSetting } = props;
50
+ var _a, _b, _c, _d, _e, _f;
51
+ const { onWalletPassChange, walletPass, walletSetting, orderDetail, total_amount } = props;
52
52
  const context = (0, import_useEngineContext.default)();
53
- const isWalletCode = (_d = (_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.businessUtils) == null ? void 0 : _c.getAppByModal) == null ? void 0 : _d.call(_c, "wallet");
53
+ const { walletPassEvaluator } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
54
+ const { detail } = orderDetail;
55
+ const isWalletCode = (_e = (_d = (_c = (_b = context == null ? void 0 : context.appHelper) == null ? void 0 : _b.utils) == null ? void 0 : _c.businessUtils) == null ? void 0 : _d.getAppByModal) == null ? void 0 : _e.call(_d, "wallet");
56
+ const { cards: recommended, transformList, noApplicableVoucher } = walletPass;
57
+ const [selectedVoucherIds, setSelectedVoucherIds] = (0, import_react.useState)([]);
54
58
  const [currentWalletPass, setCurrentWalletPass] = (0, import_react.useState)(walletPass);
55
59
  const [loading, setLoading] = (0, import_react.useState)(false);
56
60
  const [open, setOpen] = (0, import_react.useState)(false);
@@ -63,80 +67,69 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
63
67
  details: []
64
68
  });
65
69
  const isAutoSelect = (0, import_react.useRef)(false);
66
- const listRef = (0, import_react.useRef)(null);
67
70
  const searchValRef = (0, import_react.useRef)(null);
68
71
  const pinVerifyModalRef = (0, import_react.useRef)(null);
69
- const { cards: walletPassSelectCards, amount } = currentWalletPass || {};
70
- const [currentCustomerWalletPass, otherCustomerWalletPass] = (0, import_react.useMemo)(() => {
71
- const current = [];
72
- const other = [];
73
- (walletPassSelectCards || []).forEach((item) => {
74
- if (item.customer_id === (order == null ? void 0 : order.customer_id)) {
75
- current.push(item);
72
+ const allVouchersForCalculation = (0, import_react.useMemo)(() => {
73
+ return [...transformList || [], ...addList || []];
74
+ }, [transformList, addList]);
75
+ const selectedVouchers = (0, import_react.useMemo)(() => {
76
+ return selectedVoucherIds.map((id) => allVouchersForCalculation.find((v) => v.id === id)).filter(Boolean);
77
+ }, [selectedVoucherIds, allVouchersForCalculation]);
78
+ const { displayVouchers, displayOtherVouchers, selectedWithDetails, totalDeduction } = (0, import_react.useMemo)(() => {
79
+ if (!walletPassEvaluator || !allVouchersForCalculation.length || !(order == null ? void 0 : order.total_amount)) {
80
+ return {
81
+ displayVouchers: [...transformList || [], ...noApplicableVoucher || []],
82
+ displayOtherVouchers: addList || [],
83
+ selectedWithDetails: [],
84
+ totalDeduction: 0
85
+ };
86
+ }
87
+ if (selectedVouchers.length === 0) {
88
+ return {
89
+ displayVouchers: [...transformList || [], ...noApplicableVoucher || []],
90
+ displayOtherVouchers: addList || [],
91
+ selectedWithDetails: [],
92
+ totalDeduction: 0
93
+ };
94
+ }
95
+ const result = walletPassEvaluator.recalculateVouchers(
96
+ allVouchersForCalculation,
97
+ selectedVouchers,
98
+ order.total_amount,
99
+ detail || []
100
+ );
101
+ const currentCustomerVouchers = [];
102
+ const otherCustomerVouchers = [];
103
+ result.allWithUpdatedStatus.forEach((voucher) => {
104
+ if (voucher.customer_id === (order == null ? void 0 : order.customer_id)) {
105
+ currentCustomerVouchers.push(voucher);
76
106
  } else {
77
- other.push(item);
107
+ otherCustomerVouchers.push(voucher);
78
108
  }
79
109
  });
80
- return [current, other];
81
- }, [walletPassSelectCards, order == null ? void 0 : order.customer_id]);
110
+ return {
111
+ displayVouchers: [...currentCustomerVouchers, ...noApplicableVoucher || []],
112
+ displayOtherVouchers: otherCustomerVouchers,
113
+ selectedWithDetails: result.selectedWithDetails,
114
+ totalDeduction: result.selectedWithDetails.reduce((sum, v) => sum + (v.actualDeduction || 0), 0)
115
+ };
116
+ }, [selectedVouchers, allVouchersForCalculation, transformList, addList, noApplicableVoucher, order == null ? void 0 : order.total_amount, order == null ? void 0 : order.customer_id, detail, walletPassEvaluator]);
82
117
  const prepare_payments = (0, import_react.useMemo)(() => {
83
118
  return (0, import_utils3.formatWalletPassList2PreparePayments)(
84
119
  (0, import_utils.uniqueByKey)(
85
- (walletPassSelectCards || []).concat(searchSelectData.details),
120
+ (selectedWithDetails || []).concat(searchSelectData.details),
86
121
  "id"
87
122
  )
88
123
  );
89
- }, [walletPassSelectCards, searchSelectData]);
124
+ }, [selectedWithDetails, searchSelectData]);
90
125
  const selectValue = (0, import_react.useMemo)(() => {
91
- return (walletPassSelectCards == null ? void 0 : walletPassSelectCards.map((item) => item.id)) || [];
92
- }, [walletPassSelectCards]);
93
- const otherCustomerWalletPassList = (0, import_react.useMemo)(() => {
94
- return (0, import_utils2.formatMachineCodeServer2CardList)(addList, selectValue);
95
- }, [addList, selectValue]);
96
- const other_exact_codes = (0, import_react.useMemo)(() => {
97
- const codes = [];
98
- addList.forEach((item) => {
99
- if (!selectValue.includes(item.id)) {
100
- codes.push(item.code);
101
- }
102
- });
103
- return codes;
104
- }, [addList, selectValue]);
105
- const refreshList = (0, import_ahooks.useMemoizedFn)(() => {
106
- var _a2, _b2;
107
- if ((order == null ? void 0 : order.order_id) && (order == null ? void 0 : order.customer_id)) {
108
- (_b2 = listRef.current) == null ? void 0 : _b2.init(
109
- {
110
- order_id: order.order_id,
111
- available: 2,
112
- prepare_payments,
113
- filter_prepare_wallet_pass: 1,
114
- sale_channel: ((_a2 = order._order) == null ? void 0 : _a2.sale_channel) || "online-store",
115
- other_exact_codes
116
- },
117
- // 已选择的卡片接口中不会返回,所以追加进入列表
118
- (val) => {
119
- const idMap = val.reduce((pre, cur) => {
120
- return {
121
- ...pre,
122
- [cur.id]: cur
123
- };
124
- }, {});
125
- setAddList((prevState) => {
126
- return prevState.map((item) => {
127
- if (idMap[item.id]) {
128
- return idMap[item.id];
129
- }
130
- return item;
131
- });
132
- });
133
- return [...currentCustomerWalletPass || [], ...val].filter(
134
- (item) => !(order == null ? void 0 : order.customer_id) || item.customer_id === (order == null ? void 0 : order.customer_id)
135
- );
136
- }
137
- );
126
+ return selectedVoucherIds;
127
+ }, [selectedVoucherIds]);
128
+ (0, import_react.useEffect)(() => {
129
+ if (recommended && recommended.length > 0) {
130
+ setSelectedVoucherIds(recommended.map((v) => v.id));
138
131
  }
139
- });
132
+ }, [recommended]);
140
133
  (0, import_react.useEffect)(() => {
141
134
  if ((order == null ? void 0 : order.order_id) && searchValRef.current) {
142
135
  searchList(searchValRef.current, true);
@@ -147,16 +140,16 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
147
140
  setOrder(res);
148
141
  setOpen(true);
149
142
  setCurrentWalletPass(walletPass);
150
- setTimeout(() => {
151
- refreshList();
152
- });
143
+ if (recommended && recommended.length > 0) {
144
+ setSelectedVoucherIds(recommended.map((v) => v.id));
145
+ }
153
146
  };
154
147
  const searchList = async ({ code, customer_pin_key }, isSelectChange) => {
155
148
  var _a2;
156
149
  if (!(order == null ? void 0 : order.order_id)) return;
157
150
  setLoading(true);
158
151
  try {
159
- const result = await (0, import_serve.searchMachineCodeList)({
152
+ const baseResult = await (0, import_serve.searchMachineCodeList)({
160
153
  order_id: order.order_id,
161
154
  code,
162
155
  prepare_payments,
@@ -164,7 +157,7 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
164
157
  sale_channel: ((_a2 = order._order) == null ? void 0 : _a2.sale_channel) || "online-store",
165
158
  customer_pin_key
166
159
  });
167
- if (!result) {
160
+ if (!baseResult) {
168
161
  if (!isSelectChange) {
169
162
  (0, import_materials.PisellToast)({
170
163
  content: import_utils.locales.getText("tocPay.text.walletSearchEmpty")
@@ -175,6 +168,11 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
175
168
  if (isSelectChange && !searchValRef.current) {
176
169
  return;
177
170
  }
171
+ let result = walletPassEvaluator.searchVoucherFormat({
172
+ vouchers: baseResult,
173
+ orderTotalAmount: order.total_amount,
174
+ products: detail
175
+ });
178
176
  setSearchData(
179
177
  (0, import_utils2.formatMachineCodeServer2CardList)(
180
178
  [...searchSelectData.details, ...result],
@@ -237,23 +235,23 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
237
235
  });
238
236
  };
239
237
  const handleSelectOk = () => {
240
- changeWalletPass(
241
- (0, import_utils.uniqueByKey)(
242
- [
243
- ...walletPassSelectCards || [],
244
- ...searchSelectData.details
245
- ],
246
- "id"
247
- )
238
+ const otherCustomerSearchVouchers = searchSelectData.details.filter(
239
+ (item) => item.customer_id !== (order == null ? void 0 : order.customer_id)
248
240
  );
249
241
  setAddList((prevState) => {
250
242
  return (0, import_utils.uniqueByKey)(
251
- [...prevState, ...searchSelectData.details],
243
+ [...prevState, ...otherCustomerSearchVouchers],
252
244
  "id"
253
- ).filter(
254
- (item) => !(order == null ? void 0 : order.customer_id) || item.customer_id !== (order == null ? void 0 : order.customer_id)
255
245
  );
256
246
  });
247
+ const newSelectedIds = (0, import_utils.uniqueByKey)(
248
+ [
249
+ ...selectedWithDetails || [],
250
+ ...searchSelectData.details
251
+ ],
252
+ "id"
253
+ ).map((v) => v.id);
254
+ setSelectedVoucherIds(newSelectedIds);
257
255
  handleSearchModalClose();
258
256
  };
259
257
  const handleAddChange = (0, import_ahooks.useMemoizedFn)(
@@ -265,26 +263,15 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
265
263
  });
266
264
  }
267
265
  );
268
- const changeWalletPass = (cards) => {
269
- setCurrentWalletPass == null ? void 0 : setCurrentWalletPass({
270
- cards,
271
- amount: (0, import_utils3.calcWalletPassListAmount)(cards)
272
- });
273
- setTimeout(() => {
274
- refreshList();
275
- });
276
- };
277
266
  const handleSelectChange = (val, details, type) => {
278
- let cards = details.map((item) => item.originData);
279
- if (type === "other") {
280
- cards = currentCustomerWalletPass.concat(cards);
281
- } else if (type === "current") {
282
- cards = otherCustomerWalletPass.concat(cards);
283
- }
284
- changeWalletPass(cards);
267
+ setSelectedVoucherIds(val);
285
268
  };
286
269
  const handleRedeem = () => {
287
- onWalletPassChange == null ? void 0 : onWalletPassChange(currentWalletPass);
270
+ onWalletPassChange == null ? void 0 : onWalletPassChange({
271
+ ...currentWalletPass,
272
+ cards: selectedWithDetails,
273
+ amount: totalDeduction
274
+ });
288
275
  setOpen(false);
289
276
  };
290
277
  const handleWalletClose = () => {
@@ -309,16 +296,16 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
309
296
  onCancel: () => handleWalletClose(),
310
297
  cancelVisible: false,
311
298
  destroyOnClose: true,
312
- okText: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("tocPay.text.redeem"), " ", /* @__PURE__ */ import_react.default.createElement(Amount, { value: amount })),
299
+ okText: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("tocPay.text.redeem"), " ", /* @__PURE__ */ import_react.default.createElement(Amount, { value: totalDeduction })),
313
300
  onOk: handleRedeem
314
301
  },
315
302
  /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { marginTop: 24 } }, /* @__PURE__ */ import_react.default.createElement(import_MultiModeSearch.default, { onChange: handleSearch }), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-pass-modal-multi-selection-available" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-pass-modal-multi-selection-available-title" }, /* @__PURE__ */ import_react.default.createElement(import_icons.InfoCircleOutlined, { className: "wallet-pass-modal-multi-selection-available-title-icon" }), import_utils.locales.getText("tocPay.text.multipleSelectionAvailable")), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-pass-modal-multi-selection-available-desc" }, import_utils.locales.getText(
316
303
  "tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment"
317
- )(walletSetting.name))), otherCustomerWalletPassList.length > 0 && /* @__PURE__ */ import_react.default.createElement(
304
+ )(walletSetting.name))), displayOtherVouchers.length > 0 && /* @__PURE__ */ import_react.default.createElement(
318
305
  import_List.default,
319
306
  {
320
307
  walletSetting,
321
- data: otherCustomerWalletPassList,
308
+ data: (0, import_utils2.formatMachineCodeServer2CardList)(displayOtherVouchers, selectValue),
322
309
  title: import_utils.locales.getText("tocPay.text.couponCodesAdded"),
323
310
  onChange: handleOtherChange,
324
311
  value: selectValue,
@@ -331,9 +318,9 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
331
318
  walletSetting,
332
319
  title: walletSetting.name,
333
320
  onChange: handleCurrentChange,
334
- ref: listRef,
321
+ data: (0, import_utils2.formatMachineCodeServer2CardList)(displayVouchers, selectValue),
335
322
  value: selectValue,
336
- onLoadingChange: setLoading
323
+ loading
337
324
  }
338
325
  ))
339
326
  ), /* @__PURE__ */ import_react.default.createElement(
@@ -348,7 +335,7 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
348
335
  okText: import_utils.locales.getText("tocPay.text.select"),
349
336
  onOk: handleSelectOk,
350
337
  okButtonProps: {
351
- disabled: ((_e = searchSelectData.ids) == null ? void 0 : _e.length) === 0
338
+ disabled: ((_f = searchSelectData.ids) == null ? void 0 : _f.length) === 0
352
339
  }
353
340
  },
354
341
  /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { marginTop: 24 } }, /* @__PURE__ */ import_react.default.createElement(
@@ -56,6 +56,12 @@ export declare type WalletPassDataType = {
56
56
  metadata?: {
57
57
  validity_type: string;
58
58
  };
59
+ /** 前端计算 可用最大金额 */
60
+ _available_max_amount?: number;
61
+ /** 前端计算 统一可用状态 */
62
+ _unified_available_status?: 0 | 1;
63
+ /** 前端计算 禁用原因 */
64
+ reason?: string;
59
65
  };
60
66
  declare type Shop = {
61
67
  id: number;
@@ -53,8 +53,8 @@ var formatMachineCodeServer2CardList = (data, selectId = []) => {
53
53
  showDetail: false,
54
54
  showQrCode: false,
55
55
  code: item.code,
56
- disabled: !item.unified_available_status,
57
- disabledReason: (_b = item.unified_messages) == null ? void 0 : _b.title,
56
+ disabled: (0, import_utils.isNumber)(item._unified_available_status) ? !item._unified_available_status : !item.unified_available_status,
57
+ disabledReason: (0, import_utils.isNumber)(item._unified_available_status) ? item.reason : (_b = item.unified_messages) == null ? void 0 : _b.title,
58
58
  cover: (_c = item.product) == null ? void 0 : _c.cover,
59
59
  qrCode: item.code,
60
60
  validDate: voucherTime(item),
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
3
2
  import './index.less';
4
3
  interface WalletUseListProps {
@@ -166,7 +166,9 @@ var WalletPassBlock = (props, ref) => {
166
166
  ref: walletPassRef,
167
167
  walletSetting,
168
168
  onWalletPassChange,
169
- walletPass: payGroup == null ? void 0 : payGroup.walletPass
169
+ walletPass: payGroup == null ? void 0 : payGroup.walletPass,
170
+ orderDetail: payGroup == null ? void 0 : payGroup.orderDetail,
171
+ total_amount: payGroup == null ? void 0 : payGroup.total_amount
170
172
  }
171
173
  ), /* @__PURE__ */ import_react.default.createElement(
172
174
  import_WalletAvailable.default,
@@ -49,6 +49,7 @@ var import_usePaymentLogger = __toESM(require("../../../hooks/usePaymentLogger")
49
49
  var import_utils2 = require("../../../utils");
50
50
  var import_payGroup = require("./payGroup");
51
51
  var import_locales = __toESM(require("./locales"));
52
+ var import_serve2 = require("./PaymentMethods/WalletPass/serve");
52
53
  var import_utils3 = require("./utils");
53
54
  var import_status = require("./status");
54
55
  var import_index = require("./index.less");
@@ -154,7 +155,7 @@ var ToCPay = (props, ref) => {
154
155
  }
155
156
  };
156
157
  const _getPaymentsAndWalletPass = async (order) => {
157
- var _a2, _b2;
158
+ var _a2, _b2, _c2;
158
159
  paymentLogger.addLog({
159
160
  key: "获取支付列表开始",
160
161
  value: {
@@ -162,11 +163,22 @@ var ToCPay = (props, ref) => {
162
163
  }
163
164
  });
164
165
  try {
165
- const data = await (0, import_serve.getPaymentsAndWalletPass)({
166
- order_id: order.order_id,
167
- total_amount: order.amount,
168
- sale_channel: order.sale_channel || "online-store"
169
- });
166
+ const [data, allList, orderBasicDetail] = await Promise.all([
167
+ (0, import_serve.getPaymentsAndWalletPass)({
168
+ order_id: order.order_id,
169
+ total_amount: order.amount,
170
+ sale_channel: order.sale_channel || "online-store"
171
+ }),
172
+ (0, import_serve2.getMachineCodeList)({
173
+ order_id: order.order_id,
174
+ available: 2,
175
+ prepare_payments: [],
176
+ filter_prepare_wallet_pass: 1,
177
+ sale_channel: ((_a2 = order._order) == null ? void 0 : _a2.sale_channel) || "online-store",
178
+ other_exact_codes: []
179
+ }),
180
+ (0, import_serve.getOrderBasicDetail)(order.order_id)
181
+ ]);
170
182
  const {
171
183
  remain_amount = 0,
172
184
  wallet_pass_recommend_list,
@@ -174,6 +186,25 @@ var ToCPay = (props, ref) => {
174
186
  payment_list,
175
187
  walletPass
176
188
  } = data || {};
189
+ const products = (orderBasicDetail.detail || []).map((item) => {
190
+ var _a3;
191
+ return {
192
+ ...item,
193
+ is_price_include_tax: orderBasicDetail.is_price_include_tax,
194
+ product_bundle: (_a3 = item.product_bundle || []) == null ? void 0 : _a3.map((bundle) => {
195
+ return {
196
+ ...bundle,
197
+ is_price_include_tax: orderBasicDetail.is_price_include_tax
198
+ };
199
+ })
200
+ };
201
+ });
202
+ const res = utils.walletPassEvaluator.getRecommendedVouchers({
203
+ orderTotalAmount: Math.min(orderBasicDetail.product_unpaid_total_pay_amount, order.amount),
204
+ products,
205
+ vouchers: allList || []
206
+ });
207
+ const { recommended, transformList, noApplicableVoucher, recommendedAmount } = res;
177
208
  paymentLogger.addLog({
178
209
  key: "支付数据获取",
179
210
  value: ""
@@ -186,27 +217,37 @@ var ToCPay = (props, ref) => {
186
217
  };
187
218
  }
188
219
  );
220
+ const waitAmount2 = new import_decimal.Decimal((order == null ? void 0 : order.amount) || 0).minus(new import_decimal.Decimal(recommendedAmount)).toNumber();
189
221
  dispatch({
190
222
  type: "setPayGroup",
191
223
  payload: {
192
224
  // ...state.payGroup,
193
225
  order_id: order == null ? void 0 : order.order_id,
194
226
  // total_amount: order?.amount,
227
+ orderDetail: orderBasicDetail,
195
228
  // 原订单信息
196
229
  _order: order,
197
230
  payment_group_id: order == null ? void 0 : order.payment_group_id,
198
231
  // 支付方式没有walletPass时walletPass设置null
199
232
  walletPass: walletPass ? {
200
- ...(_a2 = state.payGroup) == null ? void 0 : _a2.walletPass,
233
+ ...(_b2 = state.payGroup) == null ? void 0 : _b2.walletPass,
201
234
  ...walletPass,
202
- amount: wallet_pass_amount,
203
- cards: withCustomerIdList
235
+ // 推荐钱包
236
+ cards: recommended,
237
+ // 推荐金额
238
+ amount: recommendedAmount,
239
+ // 不可用钱包
240
+ noApplicableVoucher,
241
+ // 转换列表
242
+ transformList
243
+ // amount: wallet_pass_amount,
244
+ // cards: wallet_pass_recommend_list,
204
245
  } : null,
205
246
  total_amount: order == null ? void 0 : order.amount,
206
- wait_amount: remain_amount
247
+ wait_amount: Math.max(0, waitAmount2)
207
248
  }
208
249
  });
209
- await ((_b2 = paymentListRef.current) == null ? void 0 : _b2.init(payment_list, remain_amount || 0));
250
+ await ((_c2 = paymentListRef.current) == null ? void 0 : _c2.init(payment_list, remain_amount || 0));
210
251
  setTimeout(() => {
211
252
  setLoading(false);
212
253
  }, 100);