@pisell/private-materials 6.5.13 → 6.5.14

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 (492) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/booking/addons/model.d.ts +10 -1
  12. package/es/components/booking/components/actionButtons/index.js +15 -9
  13. package/es/components/booking/components/footer/index.js +2 -2
  14. package/es/components/booking/components/voucher/index.js +23 -19
  15. package/es/components/booking/forms/footer.js +4 -13
  16. package/es/components/booking/forms/model.d.ts +10 -1
  17. package/es/components/booking/info/model.d.ts +10 -1
  18. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  19. package/es/components/booking/info/service2/utils.d.ts +1 -1
  20. package/es/components/booking/info2/cartClientCard/index.js +7 -3
  21. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  22. package/es/components/booking/model.d.ts +9 -1
  23. package/es/components/booking/notes/model.d.ts +10 -1
  24. package/es/components/booking/payments/model.d.ts +10 -1
  25. package/es/components/booking/utils.d.ts +2 -2
  26. package/es/components/checkout/PaymentModal.js +17 -12
  27. package/es/components/checkout/components/CashPaymentModule/index.js +9 -9
  28. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  29. package/es/components/checkout/hooks/useWalletPass.js +40 -22
  30. package/es/components/eftposPay/amount.d.ts +1 -1
  31. package/es/components/eftposPay/device.d.ts +1 -1
  32. package/es/components/eftposPay/hooks.d.ts +2 -2
  33. package/es/components/eftposPay/store/index.d.ts +5 -5
  34. package/es/components/list/List.d.ts +5 -0
  35. package/es/components/list/List.js +957 -0
  36. package/es/components/list/List.less +2 -0
  37. package/es/components/list/ResponsiveWrapper.d.ts +16 -0
  38. package/es/components/list/ResponsiveWrapper.js +130 -0
  39. package/es/components/list/TestResponsiveWrapper.d.ts +8 -0
  40. package/es/components/list/TestResponsiveWrapper.js +816 -0
  41. package/es/components/list/TestResponsiveWrapper.less +968 -0
  42. package/es/components/list/components/EmptyState/EmptyState.d.ts +20 -0
  43. package/es/components/list/components/EmptyState/EmptyState.js +75 -0
  44. package/es/components/list/components/EmptyState/EmptyState.less +121 -0
  45. package/es/components/list/components/EmptyState/index.d.ts +2 -0
  46. package/es/components/list/components/EmptyState/index.js +1 -0
  47. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
  48. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
  49. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
  50. package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
  51. package/es/components/list/components/ListItemSkeleton/index.js +2 -0
  52. package/es/components/list/components/Pagination/Pagination.d.ts +30 -0
  53. package/es/components/list/components/Pagination/Pagination.js +240 -0
  54. package/es/components/list/components/Pagination/Pagination.less +439 -0
  55. package/es/components/list/components/Pagination/index.d.ts +1 -0
  56. package/es/components/list/components/Pagination/index.js +1 -0
  57. package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
  58. package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
  59. package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
  60. package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
  61. package/es/components/list/components/ScrollLoader/index.js +1 -0
  62. package/es/components/list/components/Tab/Tab.d.ts +5 -0
  63. package/es/components/list/components/Tab/Tab.js +43 -0
  64. package/es/components/list/components/Tab/Tab.less +139 -0
  65. package/es/components/list/components/Tab/index.d.ts +2 -0
  66. package/es/components/list/components/Tab/index.js +1 -0
  67. package/es/components/list/components/Tab/types.d.ts +14 -0
  68. package/es/components/list/components/Tab/types.js +1 -0
  69. package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
  70. package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
  71. package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
  72. package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
  73. package/es/components/list/components/TabSkeleton/index.js +2 -0
  74. package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
  75. package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
  76. package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
  77. package/es/components/list/components/WaterfallList/index.d.ts +2 -0
  78. package/es/components/list/components/WaterfallList/index.js +1 -0
  79. package/es/components/list/examples/GroupedListExample.d.ts +3 -0
  80. package/es/components/list/examples/GroupedListExample.js +207 -0
  81. package/es/components/list/hooks/index.d.ts +5 -0
  82. package/es/components/list/hooks/index.js +3 -0
  83. package/es/components/list/hooks/useDevice.d.ts +24 -0
  84. package/es/components/list/hooks/useDevice.js +102 -0
  85. package/es/components/list/hooks/useListState.d.ts +43 -0
  86. package/es/components/list/hooks/useListState.js +176 -0
  87. package/es/components/list/hooks/useWaterfall.d.ts +34 -0
  88. package/es/components/list/hooks/useWaterfall.js +161 -0
  89. package/es/components/list/index.d.ts +10 -0
  90. package/es/components/list/index.js +7 -0
  91. package/es/components/list/locales.d.ts +66 -0
  92. package/es/components/list/locales.js +107 -0
  93. package/es/components/list/styles/base.less +39 -0
  94. package/es/components/list/styles/content.less +415 -0
  95. package/es/components/list/styles/floatButton.less +107 -0
  96. package/es/components/list/styles/footer.less +49 -0
  97. package/es/components/list/styles/header.less +69 -0
  98. package/es/components/list/styles/responsive.less +166 -0
  99. package/es/components/list/types.d.ts +177 -0
  100. package/es/components/list/types.js +1 -0
  101. package/es/components/list/utils/getText.d.ts +53 -0
  102. package/es/components/list/utils/getText.js +150 -0
  103. package/es/components/list/utils/index.d.ts +4 -0
  104. package/es/components/list/utils/index.js +5 -0
  105. package/es/components/pay/toB/store/hooks.js +19 -5
  106. package/es/components/pay/toC/model.d.ts +9 -1
  107. package/es/components/schedules/model.d.ts +9 -1
  108. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
  109. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
  110. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
  111. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
  112. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
  113. package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
  114. package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
  115. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
  116. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
  117. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
  118. package/es/components/ticketBooking/components/addServiceVariant/addService.js +32 -10
  119. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
  120. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
  121. package/es/components/ticketBooking/components/menuBar/index.d.ts +5 -1
  122. package/es/components/ticketBooking/components/menuBar/index.js +40 -17
  123. package/es/components/ticketBooking/components/menuBar/index.less +27 -1
  124. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
  125. package/es/components/ticketBooking/components/ticketBooking/index.js +20 -10
  126. package/es/components/ticketBooking/components/timeBar/index.less +1 -0
  127. package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
  128. package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
  129. package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
  130. package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
  131. package/es/components/ticketBooking/context/index.d.ts +2 -0
  132. package/es/components/ticketBooking/context/index.js +2 -0
  133. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
  134. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
  135. package/es/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
  136. package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
  137. package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
  138. package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
  139. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
  140. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
  141. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
  142. package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
  143. package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
  144. package/es/components/ticketBooking/index.d.ts +6 -0
  145. package/es/components/ticketBooking/index.js +86 -12
  146. package/es/components/ticketBooking/utils/index.d.ts +28 -1
  147. package/es/components/ticketBooking/utils/index.js +40 -0
  148. package/es/components/wallet/Detail/model.d.ts +13 -1
  149. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  150. package/es/components/wallet/PointCard/model.d.ts +13 -1
  151. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  152. package/es/components/wallet/Voucher/model.d.ts +13 -1
  153. package/es/components/wallet/model.d.ts +9 -1
  154. package/es/index.d.ts +2 -0
  155. package/es/index.js +3 -1
  156. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
  157. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
  158. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
  159. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
  160. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
  161. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
  162. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
  163. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
  164. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
  165. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
  166. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
  167. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
  168. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
  169. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
  170. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
  171. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
  172. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
  173. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
  174. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
  175. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
  176. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
  177. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
  178. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
  179. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
  180. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
  181. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
  182. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
  183. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
  184. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
  185. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
  186. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
  187. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
  188. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
  189. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
  190. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
  191. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
  192. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
  193. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
  194. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
  195. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
  196. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
  197. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
  198. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
  199. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
  200. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
  201. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
  202. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
  203. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
  204. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
  205. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
  206. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
  207. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
  208. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
  209. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
  210. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
  211. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
  212. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
  213. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
  214. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
  215. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
  216. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
  217. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
  218. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
  219. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
  220. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
  221. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
  222. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
  223. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
  224. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
  225. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
  226. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
  227. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
  228. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
  229. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
  230. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
  231. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
  232. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
  233. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
  234. package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
  235. package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
  236. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
  237. package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
  238. package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
  239. package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
  240. package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
  241. package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
  242. package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
  243. package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
  244. package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
  245. package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
  246. package/es/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
  247. package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
  248. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +20 -10
  249. package/es/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
  250. package/lib/components/booking/addons/model.d.ts +10 -1
  251. package/lib/components/booking/components/actionButtons/index.js +22 -17
  252. package/lib/components/booking/components/footer/index.js +2 -2
  253. package/lib/components/booking/components/voucher/index.js +33 -40
  254. package/lib/components/booking/forms/footer.js +7 -13
  255. package/lib/components/booking/forms/model.d.ts +10 -1
  256. package/lib/components/booking/info/model.d.ts +10 -1
  257. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  258. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  259. package/lib/components/booking/info2/cartClientCard/index.js +7 -3
  260. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  261. package/lib/components/booking/model.d.ts +9 -1
  262. package/lib/components/booking/notes/model.d.ts +10 -1
  263. package/lib/components/booking/payments/model.d.ts +10 -1
  264. package/lib/components/booking/utils.d.ts +2 -2
  265. package/lib/components/checkout/PaymentModal.js +15 -12
  266. package/lib/components/checkout/components/CashPaymentModule/index.js +0 -1
  267. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  268. package/lib/components/checkout/hooks/useWalletPass.js +61 -46
  269. package/lib/components/eftposPay/amount.d.ts +1 -1
  270. package/lib/components/eftposPay/device.d.ts +1 -1
  271. package/lib/components/eftposPay/hooks.d.ts +2 -2
  272. package/lib/components/eftposPay/store/index.d.ts +5 -5
  273. package/lib/components/list/List.d.ts +5 -0
  274. package/lib/components/list/List.js +771 -0
  275. package/lib/components/list/List.less +2 -0
  276. package/lib/components/list/ResponsiveWrapper.d.ts +16 -0
  277. package/lib/components/list/ResponsiveWrapper.js +145 -0
  278. package/lib/components/list/TestResponsiveWrapper.d.ts +8 -0
  279. package/lib/components/list/TestResponsiveWrapper.js +493 -0
  280. package/lib/components/list/TestResponsiveWrapper.less +968 -0
  281. package/lib/components/list/components/EmptyState/EmptyState.d.ts +20 -0
  282. package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
  283. package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
  284. package/lib/components/list/components/EmptyState/index.d.ts +2 -0
  285. package/lib/components/list/components/EmptyState/index.js +35 -0
  286. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
  287. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
  288. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
  289. package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
  290. package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
  291. package/lib/components/list/components/Pagination/Pagination.d.ts +30 -0
  292. package/lib/components/list/components/Pagination/Pagination.js +205 -0
  293. package/lib/components/list/components/Pagination/Pagination.less +439 -0
  294. package/lib/components/list/components/Pagination/index.d.ts +1 -0
  295. package/lib/components/list/components/Pagination/index.js +35 -0
  296. package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
  297. package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
  298. package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
  299. package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
  300. package/lib/components/list/components/ScrollLoader/index.js +35 -0
  301. package/lib/components/list/components/Tab/Tab.d.ts +5 -0
  302. package/lib/components/list/components/Tab/Tab.js +72 -0
  303. package/lib/components/list/components/Tab/Tab.less +139 -0
  304. package/lib/components/list/components/Tab/index.d.ts +2 -0
  305. package/lib/components/list/components/Tab/index.js +35 -0
  306. package/lib/components/list/components/Tab/types.d.ts +14 -0
  307. package/lib/components/list/components/Tab/types.js +17 -0
  308. package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
  309. package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
  310. package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
  311. package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
  312. package/lib/components/list/components/TabSkeleton/index.js +41 -0
  313. package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
  314. package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
  315. package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
  316. package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
  317. package/lib/components/list/components/WaterfallList/index.js +35 -0
  318. package/lib/components/list/examples/GroupedListExample.d.ts +3 -0
  319. package/lib/components/list/examples/GroupedListExample.js +210 -0
  320. package/lib/components/list/hooks/index.d.ts +5 -0
  321. package/lib/components/list/hooks/index.js +47 -0
  322. package/lib/components/list/hooks/useDevice.d.ts +24 -0
  323. package/lib/components/list/hooks/useDevice.js +96 -0
  324. package/lib/components/list/hooks/useListState.d.ts +43 -0
  325. package/lib/components/list/hooks/useListState.js +149 -0
  326. package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
  327. package/lib/components/list/hooks/useWaterfall.js +124 -0
  328. package/lib/components/list/index.d.ts +10 -0
  329. package/lib/components/list/index.js +60 -0
  330. package/lib/components/list/locales.d.ts +66 -0
  331. package/lib/components/list/locales.js +113 -0
  332. package/lib/components/list/styles/base.less +39 -0
  333. package/lib/components/list/styles/content.less +415 -0
  334. package/lib/components/list/styles/floatButton.less +107 -0
  335. package/lib/components/list/styles/footer.less +49 -0
  336. package/lib/components/list/styles/header.less +69 -0
  337. package/lib/components/list/styles/responsive.less +166 -0
  338. package/lib/components/list/types.d.ts +177 -0
  339. package/lib/components/list/types.js +17 -0
  340. package/lib/components/list/utils/getText.d.ts +53 -0
  341. package/lib/components/list/utils/getText.js +95 -0
  342. package/lib/components/list/utils/index.d.ts +4 -0
  343. package/lib/components/list/utils/index.js +43 -0
  344. package/lib/components/pay/toB/store/hooks.js +16 -8
  345. package/lib/components/pay/toC/model.d.ts +9 -1
  346. package/lib/components/schedules/model.d.ts +9 -1
  347. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
  348. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
  349. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
  350. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
  351. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
  352. package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
  353. package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
  354. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
  355. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
  356. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
  357. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +36 -10
  358. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
  359. package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
  360. package/lib/components/ticketBooking/components/menuBar/index.d.ts +5 -1
  361. package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
  362. package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
  363. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
  364. package/lib/components/ticketBooking/components/ticketBooking/index.js +14 -9
  365. package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
  366. package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
  367. package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
  368. package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
  369. package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
  370. package/lib/components/ticketBooking/context/index.d.ts +2 -0
  371. package/lib/components/ticketBooking/context/index.js +44 -0
  372. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
  373. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
  374. package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
  375. package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
  376. package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
  377. package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
  378. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
  379. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
  380. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
  381. package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
  382. package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
  383. package/lib/components/ticketBooking/index.d.ts +6 -0
  384. package/lib/components/ticketBooking/index.js +69 -7
  385. package/lib/components/ticketBooking/utils/index.d.ts +28 -1
  386. package/lib/components/ticketBooking/utils/index.js +45 -2
  387. package/lib/components/wallet/Detail/model.d.ts +13 -1
  388. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  389. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  390. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  391. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  392. package/lib/components/wallet/model.d.ts +9 -1
  393. package/lib/index.d.ts +2 -0
  394. package/lib/index.js +6 -0
  395. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
  396. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
  397. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
  398. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
  399. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
  400. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
  401. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
  402. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
  403. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
  404. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
  405. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
  406. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
  407. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
  408. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
  409. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
  410. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
  411. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
  412. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
  413. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
  414. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
  415. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
  416. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
  417. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
  418. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
  419. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
  420. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
  421. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
  422. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
  423. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
  424. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
  425. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
  426. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
  427. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
  428. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
  429. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
  430. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
  431. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
  432. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
  433. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
  434. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
  435. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
  436. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
  437. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
  438. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
  439. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
  440. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
  441. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
  442. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
  443. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
  444. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
  445. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
  446. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
  447. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
  448. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
  449. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
  450. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
  451. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
  452. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
  453. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
  454. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
  455. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
  456. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
  457. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
  458. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
  459. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
  460. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
  461. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
  462. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
  463. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
  464. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
  465. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
  466. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
  467. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
  468. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
  469. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
  470. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
  471. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
  472. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
  473. package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
  474. package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
  475. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
  476. package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
  477. package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
  478. package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
  479. package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
  480. package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
  481. package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
  482. package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
  483. package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
  484. package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
  485. package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
  486. package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
  487. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +61 -27
  488. package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
  489. package/lowcode/sku-card/meta.ts +1812 -0
  490. package/lowcode/sku-card/snippets.ts +372 -0
  491. package/lowcode/sku-list/meta.ts +410 -0
  492. package/package.json +1 -1
@@ -0,0 +1,166 @@
1
+ /* 响应式样式 */
2
+
3
+ /* 设备类型样式 */
4
+ .pisell-list {
5
+ &.pisell-list-pc {
6
+ min-width: 320px;
7
+ }
8
+
9
+ &.pisell-list-pad {
10
+ min-width: 280px;
11
+
12
+ .list-items {
13
+ .list-item {
14
+ font-size: 14px;
15
+ }
16
+ }
17
+ }
18
+
19
+ &.pisell-list-mobile {
20
+ min-width: 240px;
21
+
22
+ .list-items {
23
+ .list-item {
24
+ font-size: 12px;
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ /* 响应式适配 */
31
+ @media (max-width: 768px) {
32
+ .pisell-list {
33
+ /* 垂直模式移动端适配 */
34
+ &.pisell-list-vertical {
35
+ .list-scroll-float-button {
36
+ .scroll-pause-button {
37
+ bottom: 16px !important;
38
+ padding: 12px !important;
39
+
40
+ & > div {
41
+ width: 28px !important;
42
+ height: 28px !important;
43
+
44
+ .pisell-iconfont {
45
+ font-size: 16px !important;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ /* 水平模式移动端适配 */
53
+ &.pisell-list-horizontal {
54
+ .list-scroll-float-button {
55
+ .scroll-pause-button {
56
+ right: 16px !important;
57
+ padding: 12px !important;
58
+
59
+ & > div {
60
+ width: 28px !important;
61
+ height: 28px !important;
62
+
63
+ .pisell-iconfont {
64
+ font-size: 16px !important;
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ .pisell-list-header {
72
+
73
+ .pisell-list-tabs {
74
+ gap: 6px;
75
+
76
+ .pisell-tab-item {
77
+ padding-left: 12px;
78
+ padding-right: 12px;
79
+ height: 36px;
80
+
81
+ .pisell-tab-item-label {
82
+ font-size: 12px;
83
+ }
84
+ }
85
+ }
86
+ }
87
+
88
+ .list-content {
89
+
90
+ .list-items {
91
+ .list-item {
92
+ .default-item {
93
+ padding: 10px;
94
+ min-height: 50px;
95
+ }
96
+
97
+ .card-item {
98
+ .card-image {
99
+ width: 100px;
100
+ height: 80px;
101
+
102
+ .image-text {
103
+ font-size: 18px;
104
+
105
+ .subtitle {
106
+ font-size: 12px;
107
+ }
108
+ }
109
+ }
110
+
111
+ .card-content {
112
+ padding: 12px 16px;
113
+
114
+ .card-header {
115
+ .card-title {
116
+ font-size: 14px;
117
+ }
118
+
119
+ .card-subtitle {
120
+ font-size: 12px;
121
+ }
122
+ }
123
+
124
+ .card-footer {
125
+ .card-price {
126
+ .price-main {
127
+ font-size: 16px;
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+
137
+ }
138
+ }
139
+
140
+ @media (max-width: 480px) {
141
+ .pisell-list {
142
+ .pisell-list-header {
143
+ .pisell-list-tabs {
144
+ gap: 4px;
145
+
146
+ .pisell-tab-item {
147
+ padding-left: 8px;
148
+ padding-right: 8px;
149
+ height: 32px;
150
+
151
+ .pisell-tab-item-label {
152
+ font-size: 11px;
153
+ }
154
+ }
155
+ }
156
+ }
157
+
158
+ .list-content {
159
+ .list-items {
160
+ grid-gap: 8px !important;
161
+ column-gap: 8px !important;
162
+ row-gap: 8px !important;
163
+ }
164
+ }
165
+ }
166
+ }
@@ -0,0 +1,177 @@
1
+ import { ReactNode, CSSProperties } from 'react';
2
+ /** 设备类型 */
3
+ export declare type DeviceType = 'pc' | 'pad' | 'mobile';
4
+ /** 设备信息 */
5
+ export interface DeviceInfo {
6
+ type: DeviceType;
7
+ isMobile: boolean;
8
+ isPad: boolean;
9
+ isPc: boolean;
10
+ width: number;
11
+ height: number;
12
+ }
13
+ /** 响应式配置接口 */
14
+ export interface ResponsiveConfig {
15
+ /** PC端特定配置 */
16
+ pc?: Partial<ListProps>;
17
+ /** 平板端特定配置 */
18
+ pad?: Partial<ListProps>;
19
+ /** 移动端特定配置 */
20
+ mobile?: Partial<ListProps>;
21
+ }
22
+ /** 响应式Props接口 - 继承ListProps并添加responsive属性 */
23
+ export interface ResponsiveProps extends ListProps {
24
+ /** 响应式配置 */
25
+ responsive?: ResponsiveConfig;
26
+ }
27
+ /** ResponsiveWrapper 组件属性 */
28
+ export interface ResponsiveWrapperProps extends ResponsiveProps {
29
+ /** 子元素 */
30
+ children?: ReactNode;
31
+ }
32
+ /** 基础列表项接口 */
33
+ export interface BaseListItem {
34
+ /** 唯一标识 */
35
+ id: string | number;
36
+ /** 预设高度(瀑布流模式) */
37
+ height?: number;
38
+ /** 预设宽度(瀑布流模式) */
39
+ width?: number;
40
+ /** 其他任意属性,可以包含用于分组的字段 */
41
+ [key: string]: any;
42
+ }
43
+ /** 空状态配置接口 */
44
+ export interface EmptyStateConfig {
45
+ /** 是否显示空状态 */
46
+ show?: boolean;
47
+ /** 空状态文本 */
48
+ text?: string;
49
+ /** 空状态图标 */
50
+ icon?: ReactNode;
51
+ /** 空状态描述 */
52
+ description?: string;
53
+ }
54
+ /** 分页信息接口 */
55
+ export interface PaginationInfo {
56
+ /** 当前页数 */
57
+ current?: number;
58
+ /** 总页数 */
59
+ total?: number;
60
+ /** 总数据条数 */
61
+ totalCount?: number;
62
+ }
63
+ /** 布局配置接口 */
64
+ export interface LayoutConfig {
65
+ /** 显示样式 */
66
+ displayStyle?: 'grid' | 'waterfall';
67
+ /** 排版方式 */
68
+ layoutDirection?: 'horizontal' | 'vertical';
69
+ /** 列数 */
70
+ columns?: number;
71
+ /** 行数 */
72
+ rows?: number;
73
+ /** 列间距 */
74
+ columnGap?: number;
75
+ /** 行间距 */
76
+ rowGap?: number;
77
+ /** 缩放倍率 */
78
+ zoom?: number;
79
+ }
80
+ /** Tab配置接口 */
81
+ export interface TabConfig {
82
+ /** tab样式 */
83
+ tabStyle?: 'anchor' | 'switch' | 'none';
84
+ /** 指定用于分组的数据字段名,例如 'category'、'type' 等 */
85
+ tabGroup?: string;
86
+ /** Tab数据源 */
87
+ tabData?: TabItem[];
88
+ /** 顶部固定 */
89
+ stickyTop?: boolean;
90
+ }
91
+ /** 分页配置接口 */
92
+ export interface PaginationConfig {
93
+ /** 分页方式 */
94
+ paginationType?: 'all' | 'scroll' | 'pager' | 'more';
95
+ /** 默认显示个数 */
96
+ defaultPageSize?: number;
97
+ /** 每次加载个数 */
98
+ pageSize?: number;
99
+ /** 分页信息 */
100
+ pagination?: PaginationInfo;
101
+ }
102
+ /** 泛型List组件Props接口 */
103
+ export interface ListProps<TItem extends BaseListItem = BaseListItem> {
104
+ /** 基础属性 */
105
+ className?: string;
106
+ style?: CSSProperties;
107
+ width?: string | number;
108
+ height?: string | number;
109
+ /** 布局配置 */
110
+ displayStyle?: LayoutConfig['displayStyle'];
111
+ layoutDirection?: LayoutConfig['layoutDirection'];
112
+ columns?: LayoutConfig['columns'];
113
+ rows?: LayoutConfig['rows'];
114
+ columnGap?: LayoutConfig['columnGap'];
115
+ rowGap?: LayoutConfig['rowGap'];
116
+ zoom?: LayoutConfig['zoom'];
117
+ /** Tab配置 */
118
+ tabStyle?: TabConfig['tabStyle'];
119
+ tabGroup?: TabConfig['tabGroup'];
120
+ tabData?: TabConfig['tabData'];
121
+ stickyTop?: TabConfig['stickyTop'];
122
+ /** 分页配置 */
123
+ paginationType?: PaginationConfig['paginationType'];
124
+ defaultPageSize?: PaginationConfig['defaultPageSize'];
125
+ pageSize?: PaginationConfig['pageSize'];
126
+ pagination?: PaginationConfig['pagination'];
127
+ /** 数据和渲染 */
128
+ data?: TItem[];
129
+ children?: ReactNode;
130
+ renderItem?: (item: TItem, index: number) => ReactNode;
131
+ /** 回调函数 */
132
+ onLoadData?: (params: LoadDataParams) => void;
133
+ /** 状态配置 */
134
+ emptyConfig?: EmptyStateConfig;
135
+ loading?: boolean;
136
+ }
137
+ /** 向后兼容的非泛型版本 */
138
+ export interface LegacyListProps extends ListProps<any> {
139
+ /** 兼容旧的any[]类型 */
140
+ data?: any[];
141
+ renderItem?: (item: any, index: number) => ReactNode;
142
+ }
143
+ export interface TabItem {
144
+ /** 唯一标识,同时用作anchor模式下的锚点标识 */
145
+ key: string;
146
+ /** 显示文本 */
147
+ label: string;
148
+ /** 分组值,对应数据项中 tabGroup 指定字段的值 */
149
+ group?: string;
150
+ /** 是否禁用 */
151
+ disabled?: boolean;
152
+ }
153
+ export interface LoadMoreParams {
154
+ /** 当前页码 */
155
+ currentPage: number;
156
+ /** 每页数量 */
157
+ pageSize: number;
158
+ /** 当前tab */
159
+ activeTab?: string;
160
+ }
161
+ /** 数据加载触发类型 */
162
+ export declare type LoadDataTrigger = 'tabChange' | 'pagination' | 'pageSize' | 'loadMore' | 'scroll';
163
+ /** 统一的数据加载参数 */
164
+ export interface LoadDataParams {
165
+ /** 触发类型 */
166
+ trigger: LoadDataTrigger;
167
+ /** 当前页码 */
168
+ currentPage: number;
169
+ /** 每页数量 */
170
+ pageSize: number;
171
+ /** 当前激活的tab */
172
+ activeTab?: string;
173
+ /** 上一页页码(分页变化时提供) */
174
+ previousPage?: number;
175
+ /** 上一页大小(页大小变化时提供) */
176
+ previousPageSize?: number;
177
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,53 @@
1
+ /**
2
+ * 国际化文案获取工具函数
3
+ * 参考 AmountSummary 组件的实现方式,使用 useEngineContext 获取语言设置
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * import { useGetText } from './utils';
8
+ * import locales from './locales';
9
+ *
10
+ * const MyComponent = () => {
11
+ * const { getText, getTextFunc } = useGetText(locales);
12
+ *
13
+ * // 获取字符串文案
14
+ * const title = getText('component.title', 'Default Title');
15
+ *
16
+ * // 获取函数类型文案
17
+ * const formatFunc = getTextFunc('component.format');
18
+ * const formattedText = typeof formatFunc === 'function'
19
+ * ? formatFunc(arg1, arg2)
20
+ * : 'Default Text';
21
+ *
22
+ * return <div>{title}</div>;
23
+ * };
24
+ * ```
25
+ */
26
+ export declare type SupportedLanguage = 'en' | 'zh-CN' | 'zh-HK';
27
+ export interface LocalesObject {
28
+ [key: string]: {
29
+ [key: string]: string | ((...args: any[]) => string);
30
+ };
31
+ }
32
+ export interface GetTextFunctions {
33
+ getText: (key: string, fallback?: string) => string;
34
+ getTextFunc: (key: string) => any;
35
+ getCurrentLanguage: () => string;
36
+ }
37
+ /**
38
+ * 使用 useEngineContext 创建本地化文案获取函数的 Hook
39
+ * @param locales - 本地化文案对象
40
+ * @returns getText 和 getTextFunc 函数
41
+ */
42
+ export declare const useGetText: (locales: LocalesObject) => GetTextFunctions;
43
+ /**
44
+ * 创建本地化文案获取函数(非 Hook 版本,保持向后兼容)
45
+ * @param locales - 本地化文案对象
46
+ * @returns getText 和 getTextFunc 函数
47
+ * @deprecated 推荐使用 useGetText Hook 版本
48
+ */
49
+ export declare const createGetText: (locales: LocalesObject) => GetTextFunctions;
50
+ /**
51
+ * 默认导出:直接创建一个通用的 getText 函数工厂
52
+ */
53
+ export default createGetText;
@@ -0,0 +1,150 @@
1
+ /**
2
+ * 国际化文案获取工具函数
3
+ * 参考 AmountSummary 组件的实现方式,使用 useEngineContext 获取语言设置
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * import { useGetText } from './utils';
8
+ * import locales from './locales';
9
+ *
10
+ * const MyComponent = () => {
11
+ * const { getText, getTextFunc } = useGetText(locales);
12
+ *
13
+ * // 获取字符串文案
14
+ * const title = getText('component.title', 'Default Title');
15
+ *
16
+ * // 获取函数类型文案
17
+ * const formatFunc = getTextFunc('component.format');
18
+ * const formattedText = typeof formatFunc === 'function'
19
+ * ? formatFunc(arg1, arg2)
20
+ * : 'Default Text';
21
+ *
22
+ * return <div>{title}</div>;
23
+ * };
24
+ * ```
25
+ */
26
+
27
+ import useEngineContext from "../../../hooks/useEngineContext";
28
+ // 导入全局 locales 作为回退
29
+ // import { locales } from '@pisell/utils';
30
+
31
+ // 支持的语言类型
32
+
33
+ // 本地化文案对象类型
34
+
35
+ // getText 函数返回类型
36
+
37
+ // Engine Context 类型定义
38
+
39
+ /**
40
+ * 使用 useEngineContext 创建本地化文案获取函数的 Hook
41
+ * @param locales - 本地化文案对象
42
+ * @returns getText 和 getTextFunc 函数
43
+ */
44
+ export var useGetText = function useGetText(locales) {
45
+ var context = useEngineContext();
46
+
47
+ /**
48
+ * 获取当前语言
49
+ * 参考 AmountSummary 组件的实现方式
50
+ */
51
+ var getCurrentLanguage = function getCurrentLanguage() {
52
+ var _context$appHelper, _context$appHelper$ge, _context$appHelper$ge2, _context$appHelper2;
53
+ return ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getApp) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge = _context$appHelper$ge.call(_context$appHelper)) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge = _context$appHelper$ge.locales) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge2 = _context$appHelper$ge.getLocale) === null || _context$appHelper$ge2 === void 0 ? void 0 : _context$appHelper$ge2.call(_context$appHelper$ge)) || ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.storage) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.get('umi_locale')) || 'zh-CN';
54
+ };
55
+
56
+ /**
57
+ * 获取字符串类型的文案
58
+ * @param key - 文案键名
59
+ * @param fallback - 回退文案
60
+ * @returns 本地化文案字符串
61
+ */
62
+ var getText = function getText(key, fallback) {
63
+ var _locales;
64
+ var currentLang = getCurrentLanguage();
65
+ var localText = (_locales = locales[currentLang]) === null || _locales === void 0 ? void 0 : _locales[key];
66
+ if (typeof localText === 'string') {
67
+ return localText;
68
+ }
69
+
70
+ // 回退到全局语言包(如果可用)
71
+ // const globalText = locales?.getText(key);
72
+ // if (globalText) {
73
+ // return globalText;
74
+ // }
75
+
76
+ // 最终回退到默认值
77
+ return fallback || '';
78
+ };
79
+
80
+ /**
81
+ * 获取任意类型的文案(包括函数类型)
82
+ * @param key - 文案键名
83
+ * @returns 本地化文案(可能是字符串或函数)
84
+ */
85
+ var getTextFunc = function getTextFunc(key) {
86
+ var _locales2;
87
+ var currentLang = getCurrentLanguage();
88
+ var localText = (_locales2 = locales[currentLang]) === null || _locales2 === void 0 ? void 0 : _locales2[key];
89
+ return localText;
90
+ };
91
+ return {
92
+ getText: getText,
93
+ getTextFunc: getTextFunc,
94
+ getCurrentLanguage: getCurrentLanguage
95
+ };
96
+ };
97
+
98
+ /**
99
+ * 创建本地化文案获取函数(非 Hook 版本,保持向后兼容)
100
+ * @param locales - 本地化文案对象
101
+ * @returns getText 和 getTextFunc 函数
102
+ * @deprecated 推荐使用 useGetText Hook 版本
103
+ */
104
+ export var createGetText = function createGetText(locales) {
105
+ // 获取当前语言的函数(非 Hook 版本)
106
+ var getCurrentLanguage = function getCurrentLanguage() {
107
+ // 获取当前语言,优先从 localStorage 或其他来源获取
108
+ return (typeof window !== 'undefined' ? localStorage.getItem('umi_locale') : null) || 'zh-CN';
109
+ };
110
+
111
+ /**
112
+ * 获取字符串类型的文案
113
+ * @param key - 文案键名
114
+ * @param fallback - 回退文案
115
+ * @returns 本地化文案字符串
116
+ */
117
+ var getText = function getText(key, fallback) {
118
+ var _locales3;
119
+ var currentLang = getCurrentLanguage();
120
+ var localText = (_locales3 = locales[currentLang]) === null || _locales3 === void 0 ? void 0 : _locales3[key];
121
+ if (typeof localText === 'string') {
122
+ return localText;
123
+ }
124
+
125
+ // 回退到默认值
126
+ return fallback || '';
127
+ };
128
+
129
+ /**
130
+ * 获取任意类型的文案(包括函数类型)
131
+ * @param key - 文案键名
132
+ * @returns 本地化文案(可能是字符串或函数)
133
+ */
134
+ var getTextFunc = function getTextFunc(key) {
135
+ var _locales4;
136
+ var currentLang = getCurrentLanguage();
137
+ var localText = (_locales4 = locales[currentLang]) === null || _locales4 === void 0 ? void 0 : _locales4[key];
138
+ return localText;
139
+ };
140
+ return {
141
+ getText: getText,
142
+ getTextFunc: getTextFunc,
143
+ getCurrentLanguage: getCurrentLanguage
144
+ };
145
+ };
146
+
147
+ /**
148
+ * 默认导出:直接创建一个通用的 getText 函数工厂
149
+ */
150
+ export default createGetText;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * List 组件工具函数导出
3
+ */
4
+ export { useGetText, createGetText, default as createGetTextDefault, type SupportedLanguage, type LocalesObject, type GetTextFunctions } from './getText';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * List 组件工具函数导出
3
+ */
4
+
5
+ export { useGetText, createGetText, default as createGetTextDefault } from "./getText";
@@ -2,10 +2,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- import React from 'react';
5
+ import React, { useRef } from 'react';
6
6
  import { ToBPayContext } from "./index";
7
7
  import { usePisellOS } from "../../../../hooks/useEngineContext";
8
8
  import { handlePayMethodList } from "./utils";
9
+ import { useActiveExecute } from "../../../ticketBooking/hooks/pisellos";
9
10
 
10
11
  /**
11
12
  * 使用商家端支付的Hook
@@ -32,15 +33,28 @@ export var useOSPaymentEffect = function useOSPaymentEffect() {
32
33
  var _useToBPay = useToBPay(),
33
34
  setOrder = _useToBPay.setOrder,
34
35
  setPayMethodGroupList = _useToBPay.setPayMethodGroupList;
36
+ var _useActiveExecute = useActiveExecute(),
37
+ executeIfActive = _useActiveExecute.executeIfActive;
38
+ var unlisten1 = useRef(null);
39
+ var unlisten2 = useRef(null);
35
40
  var osPaymentEffectOn = function osPaymentEffectOn() {
41
+ var wrappedOnPaymentMethodsChanged = executeIfActive(onPaymentMethodsChanged);
42
+ var wrappedOnOrderChanged = executeIfActive(onOrderChanged);
43
+
36
44
  // 监听OS的支付方式列表变化
37
- pisellOS.effects.on('payment:onPaymentMethodsChanged', onPaymentMethodsChanged);
45
+ unlisten1.current = pisellOS.effects.on('payment:onPaymentMethodsChanged', wrappedOnPaymentMethodsChanged);
38
46
  // 监听OS的订单信息变化,包括订单、支付项发生改变、删除、修改信息等操作
39
- pisellOS.effects.on('payment:onOrderChanged', onOrderChanged);
47
+ unlisten2.current = pisellOS.effects.on('payment:onOrderChanged', wrappedOnOrderChanged);
40
48
  };
41
49
  var osPaymentEffectOff = function osPaymentEffectOff() {
42
- pisellOS.effects.off('payment:onPaymentMethodsChanged', onPaymentMethodsChanged);
43
- pisellOS.effects.off('payment:onOrderChanged', onOrderChanged);
50
+ if (unlisten1.current) {
51
+ var _unlisten1$current;
52
+ (_unlisten1$current = unlisten1.current) === null || _unlisten1$current === void 0 || _unlisten1$current.call(unlisten1);
53
+ }
54
+ if (unlisten2.current) {
55
+ var _unlisten2$current;
56
+ (_unlisten2$current = unlisten2.current) === null || _unlisten2$current === void 0 || _unlisten2$current.call(unlisten2);
57
+ }
44
58
  };
45
59
  var onPaymentMethodsChanged = /*#__PURE__*/function () {
46
60
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -28,4 +29,11 @@ export interface PayGroup {
28
29
  pay_number?: string;
29
30
  _order: any;
30
31
  }
31
- export declare const Provider: any, Context: any;
32
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
+ state: FormState;
34
+ } & {
35
+ dispatch: (params: {
36
+ type: string;
37
+ payload: any;
38
+ }) => void;
39
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;