@pisell/private-materials 6.4.55 → 6.4.57

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 (448) 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/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  16. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  17. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  18. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  19. package/es/components/booking/components/actionButtons/index.js +15 -7
  20. package/es/components/booking/components/footer/amount.js +1 -1
  21. package/es/components/booking/components/footer/index.js +2 -2
  22. package/es/components/booking/components/footer/utils.js +8 -1
  23. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  24. package/es/components/booking/components/voucher/index.js +23 -19
  25. package/es/components/booking/forms/footer.d.ts +0 -1
  26. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  27. package/es/components/booking/forms/single/index.d.ts +0 -1
  28. package/es/components/booking/info2/cartClientCard/index.js +7 -3
  29. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  30. package/es/components/checkout/PaymentModal.js +34 -28
  31. package/es/components/checkout/hooks/useWalletPass.js +36 -21
  32. package/es/components/eftpos/form/index.d.ts +0 -1
  33. package/es/components/eftpos/hooks.d.ts +0 -1
  34. package/es/components/eftpos/index.d.ts +0 -1
  35. package/es/components/eftpos/pos.d.ts +0 -1
  36. package/es/components/eftposPay/amount.d.ts +0 -1
  37. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  38. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  39. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  40. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  41. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  42. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  43. package/es/components/eftposPay/hooks.d.ts +1 -1
  44. package/es/components/eftposPay/pay.d.ts +0 -1
  45. package/es/components/eftposPay/store/index.d.ts +2 -2
  46. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  47. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  48. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  49. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  50. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  51. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  52. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  53. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  54. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  55. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  56. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  57. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  58. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  59. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  60. package/es/components/list/List.js +957 -0
  61. package/es/components/list/List.less +2 -0
  62. package/es/components/list/ResponsiveWrapper.js +130 -0
  63. package/es/components/list/TestResponsiveWrapper.js +816 -0
  64. package/es/components/list/TestResponsiveWrapper.less +968 -0
  65. package/es/components/list/components/EmptyState/EmptyState.js +75 -0
  66. package/es/components/list/components/EmptyState/EmptyState.less +121 -0
  67. package/es/components/list/components/EmptyState/index.js +1 -0
  68. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
  69. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
  70. package/es/components/list/components/ListItemSkeleton/index.js +2 -0
  71. package/es/components/list/components/Pagination/Pagination.js +240 -0
  72. package/es/components/list/components/Pagination/Pagination.less +439 -0
  73. package/es/components/list/components/Pagination/index.js +1 -0
  74. package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
  75. package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
  76. package/es/components/list/components/ScrollLoader/index.js +1 -0
  77. package/es/components/list/components/Tab/Tab.js +43 -0
  78. package/es/components/list/components/Tab/Tab.less +139 -0
  79. package/es/components/list/components/Tab/index.js +1 -0
  80. package/es/components/list/components/Tab/types.js +1 -0
  81. package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
  82. package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
  83. package/es/components/list/components/TabSkeleton/index.js +2 -0
  84. package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
  85. package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
  86. package/es/components/list/components/WaterfallList/index.js +1 -0
  87. package/es/components/list/examples/GroupedListExample.js +207 -0
  88. package/es/components/list/hooks/index.js +3 -0
  89. package/es/components/list/hooks/useDevice.js +102 -0
  90. package/es/components/list/hooks/useListState.js +176 -0
  91. package/es/components/list/hooks/useWaterfall.js +161 -0
  92. package/es/components/list/index.js +7 -0
  93. package/es/components/list/locales.js +107 -0
  94. package/es/components/list/styles/base.less +39 -0
  95. package/es/components/list/styles/content.less +416 -0
  96. package/es/components/list/styles/floatButton.less +107 -0
  97. package/es/components/list/styles/footer.less +49 -0
  98. package/es/components/list/styles/header.less +69 -0
  99. package/es/components/list/styles/responsive.less +166 -0
  100. package/es/components/list/types.js +1 -0
  101. package/es/components/list/utils/getText.js +150 -0
  102. package/es/components/list/utils/index.js +5 -0
  103. package/es/components/pay/toB/store/hooks.js +19 -5
  104. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  105. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  106. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  107. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  108. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  109. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  110. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  111. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  112. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  113. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  114. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  115. package/es/components/schedules/products/index.d.ts +0 -1
  116. package/es/components/schedules/resources/index.d.ts +0 -1
  117. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  118. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  119. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  120. package/es/components/schedules/schedules/index.d.ts +0 -1
  121. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  122. package/es/components/shoppingCart/index.d.ts +0 -1
  123. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
  124. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
  125. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
  126. package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
  127. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
  128. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
  129. package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -11
  130. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
  131. package/es/components/ticketBooking/components/menuBar/index.js +40 -17
  132. package/es/components/ticketBooking/components/menuBar/index.less +27 -1
  133. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +6 -1
  134. package/es/components/ticketBooking/components/ticketBooking/index.js +66 -23
  135. package/es/components/ticketBooking/components/timeBar/index.less +1 -0
  136. package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
  137. package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
  138. package/es/components/ticketBooking/context/index.js +2 -0
  139. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
  140. package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
  141. package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
  142. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
  143. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +43 -9
  144. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
  145. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
  146. package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
  147. package/es/components/ticketBooking/index.d.ts +6 -0
  148. package/es/components/ticketBooking/index.js +86 -11
  149. package/es/components/ticketBooking/utils/index.js +50 -1
  150. package/es/components/ticketBooking/utils/productCache.js +184 -0
  151. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  152. package/es/index.js +3 -1
  153. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
  154. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
  155. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
  156. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
  157. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
  158. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
  159. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
  160. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
  161. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
  162. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
  163. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
  164. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
  165. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
  166. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
  167. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
  168. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
  169. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
  170. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
  171. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
  172. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
  173. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
  174. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
  175. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
  176. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
  177. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
  178. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
  179. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
  180. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
  181. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
  182. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
  183. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
  184. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
  185. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
  186. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
  187. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
  188. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
  189. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
  190. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
  191. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
  192. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
  193. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
  194. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
  195. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
  196. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
  197. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
  198. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
  199. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
  200. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
  201. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
  202. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
  203. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
  204. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
  205. package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
  206. package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
  207. package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
  208. package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
  209. package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
  210. package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
  211. package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
  212. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  213. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  214. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  215. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  216. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  217. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  218. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  219. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  220. package/lib/components/booking/components/actionButtons/index.js +22 -15
  221. package/lib/components/booking/components/footer/amount.js +1 -1
  222. package/lib/components/booking/components/footer/index.js +2 -2
  223. package/lib/components/booking/components/footer/utils.js +8 -1
  224. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  225. package/lib/components/booking/components/voucher/index.js +33 -40
  226. package/lib/components/booking/forms/footer.d.ts +0 -1
  227. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  228. package/lib/components/booking/forms/single/index.d.ts +0 -1
  229. package/lib/components/booking/info2/cartClientCard/index.js +7 -3
  230. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  231. package/lib/components/checkout/PaymentModal.js +20 -16
  232. package/lib/components/checkout/hooks/useWalletPass.js +57 -45
  233. package/lib/components/eftpos/form/index.d.ts +0 -1
  234. package/lib/components/eftpos/hooks.d.ts +0 -1
  235. package/lib/components/eftpos/index.d.ts +0 -1
  236. package/lib/components/eftpos/pos.d.ts +0 -1
  237. package/lib/components/eftposPay/amount.d.ts +0 -1
  238. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  239. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  240. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  241. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  242. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  243. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  244. package/lib/components/eftposPay/hooks.d.ts +1 -1
  245. package/lib/components/eftposPay/pay.d.ts +0 -1
  246. package/lib/components/eftposPay/store/index.d.ts +2 -2
  247. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  248. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  249. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  250. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  251. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  252. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  253. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  254. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  255. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  256. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  257. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  258. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  259. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  260. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  261. package/lib/components/list/List.js +771 -0
  262. package/lib/components/list/List.less +2 -0
  263. package/lib/components/list/ResponsiveWrapper.js +145 -0
  264. package/lib/components/list/TestResponsiveWrapper.js +493 -0
  265. package/lib/components/list/TestResponsiveWrapper.less +968 -0
  266. package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
  267. package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
  268. package/lib/components/list/components/EmptyState/index.js +35 -0
  269. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
  270. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
  271. package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
  272. package/lib/components/list/components/Pagination/Pagination.js +205 -0
  273. package/lib/components/list/components/Pagination/Pagination.less +439 -0
  274. package/lib/components/list/components/Pagination/index.js +35 -0
  275. package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
  276. package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
  277. package/lib/components/list/components/ScrollLoader/index.js +35 -0
  278. package/lib/components/list/components/Tab/Tab.js +72 -0
  279. package/lib/components/list/components/Tab/Tab.less +139 -0
  280. package/lib/components/list/components/Tab/index.js +35 -0
  281. package/lib/components/list/components/Tab/types.js +17 -0
  282. package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
  283. package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
  284. package/lib/components/list/components/TabSkeleton/index.js +41 -0
  285. package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
  286. package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
  287. package/lib/components/list/components/WaterfallList/index.js +35 -0
  288. package/lib/components/list/examples/GroupedListExample.js +210 -0
  289. package/lib/components/list/hooks/index.js +47 -0
  290. package/lib/components/list/hooks/useDevice.js +96 -0
  291. package/lib/components/list/hooks/useListState.js +149 -0
  292. package/lib/components/list/hooks/useWaterfall.js +124 -0
  293. package/lib/components/list/index.js +60 -0
  294. package/lib/components/list/locales.js +113 -0
  295. package/lib/components/list/styles/base.less +39 -0
  296. package/lib/components/list/styles/content.less +416 -0
  297. package/lib/components/list/styles/floatButton.less +107 -0
  298. package/lib/components/list/styles/footer.less +49 -0
  299. package/lib/components/list/styles/header.less +69 -0
  300. package/lib/components/list/styles/responsive.less +166 -0
  301. package/lib/components/list/types.js +17 -0
  302. package/lib/components/list/utils/getText.js +95 -0
  303. package/lib/components/list/utils/index.js +43 -0
  304. package/lib/components/pay/toB/store/hooks.js +16 -8
  305. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  306. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  307. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  308. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  309. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  310. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  311. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  312. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  313. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  314. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  315. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  316. package/lib/components/schedules/products/index.d.ts +0 -1
  317. package/lib/components/schedules/resources/index.d.ts +0 -1
  318. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  319. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  320. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  321. package/lib/components/schedules/schedules/index.d.ts +0 -1
  322. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  323. package/lib/components/shoppingCart/index.d.ts +0 -1
  324. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
  325. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
  326. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
  327. package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
  328. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
  329. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
  330. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +45 -11
  331. package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
  332. package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
  333. package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
  334. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +6 -1
  335. package/lib/components/ticketBooking/components/ticketBooking/index.js +56 -25
  336. package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
  337. package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
  338. package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
  339. package/lib/components/ticketBooking/context/index.js +44 -0
  340. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
  341. package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
  342. package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
  343. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
  344. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +26 -4
  345. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
  346. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
  347. package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
  348. package/lib/components/ticketBooking/index.d.ts +6 -0
  349. package/lib/components/ticketBooking/index.js +64 -8
  350. package/lib/components/ticketBooking/utils/index.js +70 -2
  351. package/lib/components/ticketBooking/utils/productCache.js +144 -0
  352. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  353. package/lib/index.js +6 -0
  354. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
  355. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
  356. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
  357. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
  358. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
  359. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
  360. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
  361. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
  362. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
  363. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
  364. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
  365. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
  366. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
  367. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
  368. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
  369. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
  370. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
  371. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
  372. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
  373. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
  374. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
  375. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
  376. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
  377. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
  378. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
  379. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
  380. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
  381. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
  382. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
  383. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
  384. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
  385. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
  386. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
  387. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
  388. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
  389. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
  390. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
  391. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
  392. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
  393. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
  394. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
  395. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
  396. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
  397. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
  398. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
  399. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
  400. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
  401. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
  402. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
  403. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
  404. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
  405. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
  406. package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
  407. package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
  408. package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
  409. package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
  410. package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
  411. package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
  412. package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
  413. package/lowcode/sku-card/meta.ts +1812 -0
  414. package/lowcode/sku-card/snippets.ts +372 -0
  415. package/lowcode/sku-list/meta.ts +410 -0
  416. package/package.json +1 -1
  417. package/es/components/booking/components/actionButtons/index.d.ts +0 -31
  418. package/es/components/booking/components/footer/index.d.ts +0 -11
  419. package/es/components/booking/components/voucher/index.d.ts +0 -3
  420. package/es/components/booking/info2/cartClientCard/index.d.ts +0 -6
  421. package/es/components/checkout/hooks/useWalletPass.d.ts +0 -40
  422. package/es/components/pay/toB/store/hooks.d.ts +0 -15
  423. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
  424. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  425. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
  426. package/es/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
  427. package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
  428. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +0 -5
  429. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +0 -5
  430. package/es/components/ticketBooking/utils/index.d.ts +0 -62
  431. package/es/index.d.ts +0 -63
  432. package/es/plus/productSelect/components/pisellPriceText/index.d.ts +0 -12
  433. package/lib/components/booking/components/actionButtons/index.d.ts +0 -31
  434. package/lib/components/booking/components/footer/index.d.ts +0 -11
  435. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  436. package/lib/components/booking/info2/cartClientCard/index.d.ts +0 -6
  437. package/lib/components/checkout/hooks/useWalletPass.d.ts +0 -40
  438. package/lib/components/pay/toB/store/hooks.d.ts +0 -15
  439. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
  440. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  441. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
  442. package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
  443. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
  444. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +0 -5
  445. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +0 -5
  446. package/lib/components/ticketBooking/utils/index.d.ts +0 -62
  447. package/lib/index.d.ts +0 -63
  448. package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +0 -12
@@ -0,0 +1,957 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
11
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ import React, { useEffect, useMemo, useRef, useCallback, cloneElement, isValidElement } from 'react';
15
+ import { Button } from 'antd';
16
+ import classNames from 'classnames';
17
+ import Tab from "./components/Tab";
18
+ import Pagination from "./components/Pagination";
19
+ import EmptyState from "./components/EmptyState";
20
+ import ScrollLoader from "./components/ScrollLoader";
21
+ import WaterfallList from "./components/WaterfallList";
22
+ import ListItemSkeleton from "./components/ListItemSkeleton";
23
+ import TabSkeleton from "./components/TabSkeleton";
24
+ import "./List.less";
25
+ import { Iconfont } from '@pisell/materials';
26
+ // import { locales } from '@pisell/utils';
27
+ import listLocales from "./locales";
28
+ import useWaterfall from "./hooks/useWaterfall";
29
+ import { useListState } from "./hooks/useListState";
30
+ import useEngineContext from "../../hooks/useEngineContext";
31
+
32
+ // 虚假数据常量,用于loading状态
33
+ var MOCK_LIST_DATA = function () {
34
+ var mockData = [];
35
+ // 添加8个模拟项用于骨架屏
36
+ for (var i = 0; i < 8; i++) {
37
+ mockData.push({
38
+ id: "_mock_".concat(i),
39
+ __isSkeleton: true
40
+ });
41
+ }
42
+ return mockData;
43
+ }();
44
+ var List = function List(props) {
45
+ // 获取应用上下文
46
+ var context = useEngineContext();
47
+
48
+ // 创建统一的语言获取函数
49
+ var getCurrentLanguage = function getCurrentLanguage() {
50
+ var _context$appHelper, _context$appHelper$ge, _context$appHelper$ge2, _context$appHelper2;
51
+ var appLocale = (_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);
52
+ var storageLocale = (_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');
53
+
54
+ // 尝试多种方式获取语言
55
+ var finalLang = appLocale || storageLocale;
56
+
57
+ // 如果上下文方式都失败,尝试直接从 localStorage 获取
58
+ if (!finalLang && typeof window !== 'undefined') {
59
+ finalLang = localStorage.getItem('umi_locale');
60
+ }
61
+
62
+ // 最终回退到默认语言
63
+ return finalLang || 'en';
64
+ };
65
+
66
+ // 创建本地 getText 函数来处理本地化文案
67
+ var getLocalText = function getLocalText(key, fallback) {
68
+ var _listLocales;
69
+ var currentLang = getCurrentLanguage();
70
+ var localText = (_listLocales = listLocales[currentLang]) === null || _listLocales === void 0 ? void 0 : _listLocales[key];
71
+
72
+ // 如果是字符串,返回字符串;否则回退到 fallback
73
+ if (typeof localText === 'string') {
74
+ return localText;
75
+ }
76
+ return fallback || '';
77
+ };
78
+
79
+ // 创建获取函数类型文案的函数
80
+ var getLocalTextFunc = function getLocalTextFunc(key) {
81
+ var _listLocales2;
82
+ var currentLang = getCurrentLanguage();
83
+ var localText = (_listLocales2 = listLocales[currentLang]) === null || _listLocales2 === void 0 ? void 0 : _listLocales2[key];
84
+
85
+ // 如果是函数类型,直接返回函数;如果是字符串,返回字符串;否则回退
86
+ if (typeof localText === 'function' || typeof localText === 'string') {
87
+ return localText;
88
+ }
89
+ return key; // 简单回退,返回 key 本身
90
+ };
91
+ var _props$className = props.className,
92
+ className = _props$className === void 0 ? '' : _props$className,
93
+ _props$style = props.style,
94
+ style = _props$style === void 0 ? {} : _props$style,
95
+ _props$tabStyle = props.tabStyle,
96
+ tabStyle = _props$tabStyle === void 0 ? 'anchor' : _props$tabStyle,
97
+ _props$tabGroup = props.tabGroup,
98
+ tabGroup = _props$tabGroup === void 0 ? getLocalText('pisell-list-tab-group-default', '字段') : _props$tabGroup,
99
+ _props$displayStyle = props.displayStyle,
100
+ displayStyle = _props$displayStyle === void 0 ? 'grid' : _props$displayStyle,
101
+ _props$width = props.width,
102
+ width = _props$width === void 0 ? 'auto' : _props$width,
103
+ _props$height = props.height,
104
+ height = _props$height === void 0 ? 'auto' : _props$height,
105
+ _props$paginationType = props.paginationType,
106
+ paginationType = _props$paginationType === void 0 ? 'all' : _props$paginationType,
107
+ _props$defaultPageSiz = props.defaultPageSize,
108
+ defaultPageSize = _props$defaultPageSiz === void 0 ? 6 : _props$defaultPageSiz,
109
+ _props$layoutDirectio = props.layoutDirection,
110
+ layoutDirection = _props$layoutDirectio === void 0 ? 'horizontal' : _props$layoutDirectio,
111
+ _props$zoom = props.zoom,
112
+ zoom = _props$zoom === void 0 ? 1 : _props$zoom,
113
+ _props$columns = props.columns,
114
+ columns = _props$columns === void 0 ? 2 : _props$columns,
115
+ _props$rows = props.rows,
116
+ rows = _props$rows === void 0 ? 2 : _props$rows,
117
+ _props$stickyTop = props.stickyTop,
118
+ stickyTop = _props$stickyTop === void 0 ? true : _props$stickyTop,
119
+ _props$columnGap = props.columnGap,
120
+ columnGap = _props$columnGap === void 0 ? 12 : _props$columnGap,
121
+ _props$rowGap = props.rowGap,
122
+ rowGap = _props$rowGap === void 0 ? 12 : _props$rowGap,
123
+ _props$tabData = props.tabData,
124
+ tabData = _props$tabData === void 0 ? [] : _props$tabData,
125
+ _props$data = props.data,
126
+ data = _props$data === void 0 ? [] : _props$data,
127
+ children = props.children,
128
+ onLoadData = props.onLoadData,
129
+ renderItem = props.renderItem,
130
+ _props$emptyConfig = props.emptyConfig,
131
+ emptyConfig = _props$emptyConfig === void 0 ? {
132
+ show: true,
133
+ text: getLocalText('pisell-list-empty-text-default', 'No data available'),
134
+ icon: null,
135
+ description: ''
136
+ } : _props$emptyConfig,
137
+ pagination = props.pagination,
138
+ _props$loading = props.loading,
139
+ loading = _props$loading === void 0 ? false : _props$loading;
140
+ console.log('List props', props);
141
+ var tabItems = tabStyle === 'none' ? [] : tabData || [];
142
+
143
+ // 统一状态管理
144
+ var _useListState = useListState({
145
+ externalCurrentPage: pagination === null || pagination === void 0 ? void 0 : pagination.current,
146
+ tabItems: tabItems,
147
+ defaultPageSize: defaultPageSize,
148
+ onLoadData: onLoadData
149
+ }),
150
+ listState = _useListState.state,
151
+ currentPage = _useListState.actualCurrentPage,
152
+ handleTabChange = _useListState.handleTabChange,
153
+ handlePageChange = _useListState.handlePageChange,
154
+ handleShowSizeChange = _useListState.handleShowSizeChange,
155
+ handleLoadMore = _useListState.handleLoadMore,
156
+ handleViewLess = _useListState.handleViewLess,
157
+ handleScrollLoad = _useListState.handleScrollLoad,
158
+ setIsStickyActive = _useListState.setStickyActive,
159
+ setActiveTab = _useListState.setActiveTab;
160
+
161
+ // 从状态中解构需要的值
162
+ var activeTab = listState.activeTab,
163
+ isStickyActive = listState.isStickyActive;
164
+ var listRef = useRef(null);
165
+ var containerRef = useRef(null);
166
+ var headerRef = useRef(null);
167
+
168
+ // 辅助函数:判断字段值是否匹配目标值(支持数组包含判断)
169
+ var matchesFieldValue = function matchesFieldValue(fieldValue, targetValue) {
170
+ // 如果字段值是数组,检查是否包含目标值
171
+ if (Array.isArray(fieldValue)) {
172
+ return fieldValue.includes(targetValue);
173
+ }
174
+ // 否则使用严格相等比较
175
+ return fieldValue === targetValue;
176
+ };
177
+
178
+ // 数据分组处理 - 按tab分组数据
179
+ var processedData = useMemo(function () {
180
+ // 如果正在加载且没有数据,使用模拟数据
181
+ var sourceData = loading ? MOCK_LIST_DATA : data || [];
182
+ console.log("processedData recalculating: tabStyle=".concat(tabStyle, ", activeTab=").concat(activeTab, ", tabItems=").concat(tabItems.length, ", dataLength=").concat(sourceData.length));
183
+ console.log("sourceData sample: ".concat(JSON.stringify(sourceData.slice(0, 2), null, 2)));
184
+ console.log("tabGroup: ".concat(tabGroup));
185
+
186
+ // 如果tab样式是anchor,需要按分组显示数据
187
+ if (tabStyle === 'anchor' && tabItems.length > 0) {
188
+ var groupedData = [];
189
+
190
+ // 在anchor模式下,始终显示所有分组的数据,完全忽略activeTab的值
191
+ // 获取需要显示的分类tabs(排除"全部")
192
+ var categoryTabs = tabItems.filter(function (tab) {
193
+ return tab.key !== 'all';
194
+ });
195
+ console.log("categoryTabs: ".concat(JSON.stringify(categoryTabs.map(function (t) {
196
+ return {
197
+ key: t.key,
198
+ label: t.label,
199
+ group: t.group
200
+ };
201
+ }), null, 2)));
202
+ categoryTabs.forEach(function (tab) {
203
+ console.log("Processing tab: ".concat(tab.key, ", label: ").concat(tab.label, ", group: ").concat(tab.group));
204
+ var groupItems = [];
205
+
206
+ // 优先使用tab.group字段进行过滤
207
+ if (tab.group) {
208
+ // 使用tabGroup指定的字段名进行过滤
209
+ var filterField = tabGroup && tabGroup !== '字段' ? tabGroup : 'category';
210
+ console.log("Using group filter: ".concat(filterField, " matches ").concat(tab.group));
211
+ groupItems = sourceData.filter(function (item) {
212
+ return matchesFieldValue(item[filterField], tab.group);
213
+ });
214
+ console.log("Found ".concat(groupItems.length, " items for group ").concat(tab.group));
215
+ } else {
216
+ // 如果没有group属性,尝试使用tab.key在多个可能的字段中查找匹配
217
+ var possibleFields = [tabGroup && tabGroup !== '字段' ? tabGroup : null, 'category', 'status', 'type'].filter(Boolean);
218
+ console.log("Trying fields for tab.key ".concat(tab.key, ": ").concat(JSON.stringify(possibleFields)));
219
+ var _iterator = _createForOfIteratorHelper(possibleFields),
220
+ _step;
221
+ try {
222
+ var _loop = function _loop() {
223
+ var field = _step.value;
224
+ if (field && sourceData.some(function (item) {
225
+ return item[field] === tab.key;
226
+ })) {
227
+ groupItems = sourceData.filter(function (item) {
228
+ return item[field] === tab.key;
229
+ });
230
+ console.log("Found ".concat(groupItems.length, " items using field ").concat(field, " === ").concat(tab.key));
231
+ return 1; // break
232
+ }
233
+ };
234
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
235
+ if (_loop()) break;
236
+ }
237
+ } catch (err) {
238
+ _iterator.e(err);
239
+ } finally {
240
+ _iterator.f();
241
+ }
242
+ }
243
+ console.log("Tab ".concat(tab.key, " final groupItems count: ").concat(groupItems.length));
244
+
245
+ // 在锚点模式下,即使没有数据也要显示分组(用于显示空状态)
246
+ groupedData.push({
247
+ tabKey: tab.key,
248
+ tabLabel: tab.label,
249
+ items: groupItems
250
+ });
251
+ if (groupItems.length > 0) {
252
+ console.log("Added group ".concat(tab.key, " to groupedData with ").concat(groupItems.length, " items"));
253
+ } else {
254
+ console.log("Added empty group ".concat(tab.key, " to groupedData"));
255
+ }
256
+ });
257
+
258
+ // 在anchor模式下,总是返回所有分组,不受activeTab影响
259
+ console.log("Anchor mode grouped data: ".concat(JSON.stringify(groupedData.map(function (g) {
260
+ return {
261
+ key: g.tabKey,
262
+ label: g.tabLabel,
263
+ itemCount: g.items.length
264
+ };
265
+ }), null, 2)));
266
+ return groupedData;
267
+ } else {
268
+ // 非anchor模式或无tab,使用原有的过滤逻辑
269
+ var filteredData = sourceData;
270
+
271
+ // 如果没有选择任何tab或者选择了"全部",不进行过滤
272
+ if (!activeTab || activeTab === 'all') {
273
+ return [{
274
+ tabKey: 'all',
275
+ tabLabel: '',
276
+ items: filteredData
277
+ }];
278
+ }
279
+
280
+ // 查找当前选中的tab
281
+ var currentTab = tabItems.find(function (tab) {
282
+ return tab.key === activeTab;
283
+ });
284
+ if (currentTab && currentTab.group) {
285
+ // 如果tab项有group属性,使用group值进行过滤
286
+ var filterField = 'category'; // 固定使用category字段,因为测试数据都使用这个字段
287
+ filteredData = filteredData.filter(function (item) {
288
+ return matchesFieldValue(item[filterField], currentTab.group);
289
+ });
290
+ } else if (currentTab) {
291
+ // 如果没有group属性,假设tab的key就是要过滤的值
292
+ var possibleFields = ['category', 'status', 'type', tabGroup];
293
+ var _loop2 = function _loop2() {
294
+ var field = _possibleFields[_i];
295
+ if (field && field !== '字段' && filteredData.some(function (item) {
296
+ return matchesFieldValue(item[field], activeTab);
297
+ })) {
298
+ filteredData = filteredData.filter(function (item) {
299
+ return matchesFieldValue(item[field], activeTab);
300
+ });
301
+ return 1; // break
302
+ }
303
+ };
304
+ for (var _i = 0, _possibleFields = possibleFields; _i < _possibleFields.length; _i++) {
305
+ if (_loop2()) break;
306
+ }
307
+ }
308
+ return [{
309
+ tabKey: activeTab,
310
+ tabLabel: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.label) || '',
311
+ items: filteredData
312
+ }];
313
+ }
314
+ }, [data, activeTab, tabItems, tabGroup, tabStyle, loading]);
315
+
316
+ // 获取用于计算的数据总长度(所有分组的项目总数)
317
+ var totalDataLength = useMemo(function () {
318
+ return processedData.reduce(function (total, group) {
319
+ return total + group.items.length;
320
+ }, 0);
321
+ }, [processedData]);
322
+
323
+ // 瀑布流数据:展平所有分组的items
324
+ var waterfallItems = useMemo(function () {
325
+ if (displayStyle !== 'waterfall') return [];
326
+ return processedData.reduce(function (allItems, group) {
327
+ return [].concat(_toConsumableArray(allItems), _toConsumableArray(group.items));
328
+ }, []);
329
+ }, [displayStyle, processedData]);
330
+
331
+ // 瀑布流布局Hook - 只在瀑布流模式下传入完整配置
332
+ var waterfallOptions = useMemo(function () {
333
+ if (displayStyle !== 'waterfall') {
334
+ // 非瀑布流模式:使用简化配置避免不必要的计算
335
+ return {
336
+ tracks: 1,
337
+ trackGap: 0,
338
+ itemGap: 0,
339
+ direction: 'vertical'
340
+ };
341
+ }
342
+ return {
343
+ // 垂直滚动使用columns(列数),水平滚动使用rows(行数)
344
+ tracks: layoutDirection === 'vertical' ? columns : rows,
345
+ // 垂直滚动:trackGap是列间距,水平滚动:trackGap是行间距
346
+ trackGap: layoutDirection === 'vertical' ? columnGap : rowGap,
347
+ // 垂直滚动:itemGap是行间距,水平滚动:itemGap是列间距
348
+ itemGap: layoutDirection === 'vertical' ? rowGap : columnGap,
349
+ direction: layoutDirection === 'vertical' ? 'vertical' : 'horizontal'
350
+ };
351
+ }, [displayStyle, layoutDirection, columns, rows, columnGap, rowGap]);
352
+ var _useWaterfall = useWaterfall(waterfallItems, waterfallOptions),
353
+ waterfallLayout = _useWaterfall.layout,
354
+ registerItemRef = _useWaterfall.registerItemRef,
355
+ recalculateLayout = _useWaterfall.recalculateLayout;
356
+
357
+ // 处理向下滚动到底部并触发加载更多
358
+ var handleScrollDown = function handleScrollDown() {
359
+ if (!listRef.current) return;
360
+ var element = listRef.current;
361
+ if (layoutDirection === 'vertical') {
362
+ // 垂直滚动:滚动到底部
363
+ var scrollHeight = element.scrollHeight,
364
+ clientHeight = element.clientHeight;
365
+ var maxScroll = scrollHeight - clientHeight;
366
+ element.scrollTo({
367
+ top: maxScroll,
368
+ behavior: 'smooth'
369
+ });
370
+ } else {
371
+ // 水平滚动:滚动到最右边
372
+ var scrollWidth = element.scrollWidth,
373
+ clientWidth = element.clientWidth;
374
+ var _maxScroll = scrollWidth - clientWidth;
375
+ element.scrollTo({
376
+ left: _maxScroll,
377
+ behavior: 'smooth'
378
+ });
379
+ }
380
+
381
+ // 滚动完成后检查是否需要加载更多数据
382
+ setTimeout(function () {
383
+ if (!listRef.current || loading || !hasMore) return;
384
+ var element = listRef.current;
385
+ var isAtEnd = false;
386
+ if (layoutDirection === 'vertical') {
387
+ var scrollTop = element.scrollTop,
388
+ _scrollHeight = element.scrollHeight,
389
+ _clientHeight = element.clientHeight;
390
+ isAtEnd = scrollTop + _clientHeight >= _scrollHeight - 5; // 5px容错
391
+ } else {
392
+ var scrollLeft = element.scrollLeft,
393
+ _scrollWidth = element.scrollWidth,
394
+ _clientWidth = element.clientWidth;
395
+ isAtEnd = scrollLeft + _clientWidth >= _scrollWidth - 5; // 5px容错
396
+ }
397
+
398
+ // 如果已经滚动到底部且有更多数据,触发加载更多
399
+ if (isAtEnd && hasMore) {
400
+ console.log('List: Triggering load more after scroll to bottom');
401
+ handleScrollLoad();
402
+ }
403
+ }, 500); // 等待滚动动画完成(通常smooth滚动需要约500ms)
404
+ };
405
+
406
+ // 根据分页信息判断是否还有更多数据
407
+ var hasMore = useMemo(function () {
408
+ if (!pagination) return false;
409
+ var current = pagination.current || currentPage;
410
+ var total = pagination.total || 0;
411
+ return current < total;
412
+ }, [pagination, currentPage]);
413
+
414
+ // 计算滚动加载相关状态
415
+ var scrollLoadState = useMemo(function () {
416
+ if (paginationType !== 'scroll') return null;
417
+ var totalLoaded = totalDataLength;
418
+ return {
419
+ canLoadMore: hasMore,
420
+ totalLoaded: totalLoaded
421
+ };
422
+ }, [paginationType, totalDataLength, hasMore]);
423
+
424
+ // 处理滚动加载
425
+ useEffect(function () {
426
+ if (paginationType !== 'scroll') return;
427
+ var scrollTimer = null;
428
+ var lastScrollPosition = {
429
+ top: 0,
430
+ left: 0
431
+ };
432
+ var handleScroll = function handleScroll() {
433
+ if (!listRef.current || loading) return;
434
+
435
+ // 清除之前的定时器,实现防抖
436
+ if (scrollTimer) {
437
+ clearTimeout(scrollTimer);
438
+ }
439
+ scrollTimer = setTimeout(function () {
440
+ if (!listRef.current || loading || !hasMore) return;
441
+ var element = listRef.current;
442
+ var currentScrollTop = element.scrollTop;
443
+ var currentScrollLeft = element.scrollLeft;
444
+
445
+ // 根据布局方向检查不同的滚动方向和边界
446
+ var isNearEnd = false;
447
+ var isScrollingTowardsEnd = false;
448
+ if (layoutDirection === 'vertical') {
449
+ var scrollTop = element.scrollTop,
450
+ scrollHeight = element.scrollHeight,
451
+ clientHeight = element.clientHeight;
452
+ isScrollingTowardsEnd = currentScrollTop > lastScrollPosition.top;
453
+ isNearEnd = scrollTop + clientHeight >= scrollHeight - 50;
454
+ } else {
455
+ var scrollLeft = element.scrollLeft,
456
+ scrollWidth = element.scrollWidth,
457
+ clientWidth = element.clientWidth;
458
+ isScrollingTowardsEnd = currentScrollLeft > lastScrollPosition.left;
459
+ isNearEnd = scrollLeft + clientWidth >= scrollWidth - 50;
460
+ }
461
+ lastScrollPosition = {
462
+ top: currentScrollTop,
463
+ left: currentScrollLeft
464
+ };
465
+ if (isScrollingTowardsEnd && isNearEnd && hasMore) {
466
+ handleScrollLoad();
467
+ }
468
+ }, 100);
469
+ };
470
+ var listElement = listRef.current;
471
+ if (listElement) {
472
+ lastScrollPosition = {
473
+ top: listElement.scrollTop,
474
+ left: listElement.scrollLeft
475
+ };
476
+ listElement.addEventListener('scroll', handleScroll, {
477
+ passive: true
478
+ });
479
+ }
480
+ return function () {
481
+ if (listElement) {
482
+ listElement.removeEventListener('scroll', handleScroll);
483
+ }
484
+ if (scrollTimer) {
485
+ clearTimeout(scrollTimer);
486
+ }
487
+ };
488
+ }, [paginationType, layoutDirection, loading, hasMore, handleScrollLoad]);
489
+
490
+ // 检测sticky状态的滚动监听器
491
+ useEffect(function () {
492
+ if (!stickyTop || layoutDirection !== 'vertical') {
493
+ // 如果不需要sticky效果,重置状态
494
+ if (isStickyActive) {
495
+ setIsStickyActive(false);
496
+ }
497
+ return;
498
+ }
499
+ var handleScroll = null;
500
+
501
+ // 等待DOM更新后再添加监听器
502
+ var timer = setTimeout(function () {
503
+ if (!containerRef.current || !headerRef.current) return;
504
+ handleScroll = function handleScroll() {
505
+ if (!listRef.current || !headerRef.current) return;
506
+
507
+ // 监听 list-content 的滚动
508
+ var scrollTop = listRef.current.scrollTop;
509
+ var headerHeight = headerRef.current.offsetHeight;
510
+
511
+ // 检测是否滚动了足够的距离来激活sticky效果
512
+ var shouldActivate = scrollTop > headerHeight / 2;
513
+
514
+ // 避免不必要的状态更新
515
+ if (isStickyActive !== shouldActivate) {
516
+ setIsStickyActive(shouldActivate);
517
+ }
518
+ };
519
+
520
+ // 监听 list-content 的滚动
521
+ var listContent = listRef.current;
522
+ if (listContent) {
523
+ listContent.addEventListener('scroll', handleScroll, {
524
+ passive: true
525
+ });
526
+
527
+ // 立即检查一次当前状态
528
+ handleScroll();
529
+ }
530
+ }, 0);
531
+ return function () {
532
+ clearTimeout(timer);
533
+ if (handleScroll && listRef.current) {
534
+ listRef.current.removeEventListener('scroll', handleScroll);
535
+ }
536
+ };
537
+ }, [stickyTop, layoutDirection, isStickyActive]);
538
+
539
+ // 自动加载检测 - 当内容不足以产生滚动条时自动加载更多数据
540
+ useEffect(function () {
541
+ if (paginationType !== 'scroll' || loading || !hasMore || data.length === 0) {
542
+ return;
543
+ }
544
+ var autoLoadTimer = null;
545
+ var checkAutoLoad = function checkAutoLoad() {
546
+ if (!listRef.current || loading || !hasMore) return;
547
+ var element = listRef.current;
548
+ var needsMoreContent = false;
549
+
550
+ // 根据布局方向检查是否需要滚动条
551
+ if (layoutDirection === 'vertical') {
552
+ // 垂直滚动:检查内容高度是否小于等于容器高度
553
+ needsMoreContent = element.scrollHeight <= element.clientHeight;
554
+ } else {
555
+ // 水平滚动:检查内容宽度是否小于等于容器宽度
556
+ needsMoreContent = element.scrollWidth <= element.clientWidth;
557
+ }
558
+
559
+ // 如果内容不足以产生滚动条且有更多数据,自动触发加载
560
+ if (needsMoreContent && hasMore) {
561
+ console.log('List: Auto-loading more data due to insufficient content');
562
+ handleScrollLoad();
563
+ }
564
+ };
565
+
566
+ // 延迟检测,确保DOM已渲染完成
567
+ autoLoadTimer = setTimeout(function () {
568
+ checkAutoLoad();
569
+ }, 100);
570
+ return function () {
571
+ if (autoLoadTimer) {
572
+ clearTimeout(autoLoadTimer);
573
+ }
574
+ };
575
+ }, [paginationType, layoutDirection, loading, hasMore, totalDataLength, handleScrollLoad]);
576
+
577
+ // 计算容器样式 - 使用useMemo优化响应式更新
578
+ var containerStyle = useMemo(function () {
579
+ // 处理width值:数字或数字字符串加px,其他直接使用
580
+ var processedWidth = typeof width === 'number' ? "".concat(width, "px") : typeof width === 'string' && /^\d+(\.\d+)?$/.test(width.trim()) ? "".concat(width, "px") : width;
581
+
582
+ // 处理height值:数字或数字字符串加px,其他直接使用
583
+ var processedHeight = typeof height === 'number' ? "".concat(height, "px") : typeof height === 'string' && /^\d+(\.\d+)?$/.test(height.trim()) ? "".concat(height, "px") : height;
584
+ return _objectSpread(_objectSpread({}, style), {}, {
585
+ width: processedWidth,
586
+ height: processedHeight,
587
+ transform: "scale(".concat(zoom, ")"),
588
+ transformOrigin: 'top left'
589
+ });
590
+ }, [style, width, height, zoom]);
591
+
592
+ // 计算列表项样式 - 使用useMemo优化
593
+ var listStyle = useMemo(function () {
594
+ var baseStyle = {
595
+ columnGap: "".concat(columnGap, "px"),
596
+ rowGap: "".concat(rowGap, "px")
597
+ };
598
+ if (displayStyle === 'grid') {
599
+ if (layoutDirection === 'vertical') {
600
+ return _objectSpread(_objectSpread({}, baseStyle), {}, {
601
+ display: 'grid',
602
+ gridTemplateColumns: "repeat(".concat(columns, ", 1fr)")
603
+ });
604
+ } else {
605
+ return _objectSpread(_objectSpread({}, baseStyle), {}, {
606
+ display: 'grid',
607
+ gridTemplateRows: "repeat(".concat(rows, ", 1fr)"),
608
+ gridAutoFlow: 'column'
609
+ });
610
+ }
611
+ } else {
612
+ // 瀑布流布局 - 使用新的瀑布流实现
613
+ return _objectSpread(_objectSpread({}, baseStyle), {}, {
614
+ display: 'flex',
615
+ flexDirection: layoutDirection === 'vertical' ? 'row' : 'row',
616
+ alignItems: 'flex-start',
617
+ gap: layoutDirection === 'vertical' ? "0 ".concat(columnGap, "px") : "".concat(rowGap, "px ").concat(columnGap, "px"),
618
+ width: '100%'
619
+ }, layoutDirection === 'horizontal' && {
620
+ flexWrap: 'wrap'
621
+ });
622
+ }
623
+ }, [displayStyle, layoutDirection, columns, rows, columnGap, rowGap]);
624
+
625
+ // 滚动到指定标题的函数
626
+ var scrollToTitle = function scrollToTitle(tabKey) {
627
+ var titleElement = document.getElementById("list-title-".concat(tabKey));
628
+ if (titleElement && listRef.current) {
629
+ var container = listRef.current;
630
+ var titleOffsetTop = titleElement.offsetTop;
631
+ container.scrollTo({
632
+ top: titleOffsetTop - 20,
633
+ // 留一些上边距
634
+ behavior: 'smooth'
635
+ });
636
+ }
637
+ };
638
+
639
+ // 处理tab变化
640
+ var handleTabChangeWithScroll = function handleTabChangeWithScroll(key) {
641
+ if (tabStyle === 'anchor') {
642
+ // 锚点模式:只更新activeTab状态,不触发数据加载
643
+ console.log('Anchor mode tab change:', key, '- skipping data load');
644
+ setActiveTab(key);
645
+
646
+ // 滚动到对应位置
647
+ if (key === 'all') {
648
+ setTimeout(function () {
649
+ if (listRef.current) {
650
+ listRef.current.scrollTo({
651
+ top: 0,
652
+ behavior: 'smooth'
653
+ });
654
+ }
655
+ }, 100);
656
+ } else {
657
+ // 滚动到对应的分组标题
658
+ setTimeout(function () {
659
+ scrollToTitle(key);
660
+ }, 100);
661
+ }
662
+ } else {
663
+ // 非锚点模式:正常处理tab切换,包括数据加载
664
+ console.log('Non-anchor mode tab change:', key, '- triggering data load');
665
+ handleTabChange(key);
666
+ }
667
+ };
668
+
669
+ // 渲染Tab栏 - 简化为普通函数
670
+ var renderTabs = function renderTabs() {
671
+ // 检查是否应该显示tab
672
+ if (tabStyle === 'none' || tabItems.length === 0) return null;
673
+
674
+ // 只有在垂直排版且开启顶部固定时才应用sticky效果
675
+ var shouldSticky = layoutDirection === 'vertical' && stickyTop;
676
+
677
+ // 构建header类名
678
+ var headerClasses = classNames('pisell-list-header', {
679
+ 'pisell-list-header-sticky': shouldSticky,
680
+ 'sticky-active': shouldSticky && isStickyActive
681
+ });
682
+
683
+ // 如果正在加载,显示骨架屏
684
+ if (loading) {
685
+ return /*#__PURE__*/React.createElement("div", {
686
+ ref: headerRef,
687
+ className: headerClasses,
688
+ style: {
689
+ padding: '0 12px'
690
+ }
691
+ }, /*#__PURE__*/React.createElement(TabSkeleton, {
692
+ tabStyle: tabStyle
693
+ }));
694
+ }
695
+ return /*#__PURE__*/React.createElement("div", {
696
+ ref: headerRef,
697
+ className: headerClasses
698
+ }, /*#__PURE__*/React.createElement(Tab, {
699
+ className: classNames('pisell-list-tabs', "pisell-list-tabs-".concat(tabStyle)),
700
+ activeKey: activeTab,
701
+ items: tabItems,
702
+ onChange: handleTabChangeWithScroll
703
+ }));
704
+ };
705
+
706
+ // 渲染列表内容
707
+ var renderContent = useCallback(function () {
708
+ // 检查是否有子组件
709
+ var hasChildren = children && React.Children.count(children) > 0;
710
+
711
+ // 计算列表内容区域的高度
712
+ var getContentHeight = function getContentHeight() {
713
+ // 如果是scroll模式,需要确保有固定高度才能滚动
714
+ if (paginationType === 'scroll') {
715
+ // 如果容器有明确的高度设置,让内容区域自动填充(使用flex: 1)
716
+ if (height !== 'auto') {
717
+ return undefined; // 不设置具体高度,让CSS的flex: 1生效
718
+ }
719
+ // 如果容器高度是auto,给一个默认的滚动高度
720
+ return '400px';
721
+ }
722
+ // 非scroll模式:如果外部设置了高度,让内容区域填充;否则使用auto
723
+ if (height !== 'auto') {
724
+ return undefined; // 不设置具体高度,让CSS的flex: 1生效
725
+ }
726
+ return 'auto';
727
+ };
728
+ var contentHeight = getContentHeight();
729
+ return /*#__PURE__*/React.createElement("div", {
730
+ ref: listRef,
731
+ className: classNames('list-content', "list-content-".concat(displayStyle), "list-content-".concat(layoutDirection)),
732
+ style: _objectSpread(_objectSpread({
733
+ background: 'transparent'
734
+ }, contentHeight !== undefined && {
735
+ height: contentHeight
736
+ }), paginationType === 'scroll' && {
737
+ overflow: layoutDirection === 'horizontal' ? 'auto hidden' : 'hidden auto'
738
+ })
739
+ }, layoutDirection === 'vertical' && renderTabs(), totalDataLength === 0 && !loading ? /*#__PURE__*/React.createElement(EmptyState, {
740
+ config: emptyConfig,
741
+ hasData: totalDataLength > 0
742
+ }) : /*#__PURE__*/React.createElement("div", {
743
+ className: classNames('list-items'),
744
+ style: _objectSpread({}, layoutDirection === 'vertical' && {
745
+ padding: undefined
746
+ })
747
+ }, displayStyle === 'waterfall' ?
748
+ /*#__PURE__*/
749
+ // 瀑布流渲染 - 使用独立组件
750
+ React.createElement(WaterfallList, {
751
+ layout: waterfallLayout,
752
+ layoutDirection: layoutDirection,
753
+ columnGap: columnGap,
754
+ rowGap: rowGap,
755
+ columns: columns,
756
+ rows: rows,
757
+ registerItemRef: registerItemRef,
758
+ renderItem: renderItem
759
+ }, children) :
760
+ /*#__PURE__*/
761
+ // 分组渲染逻辑
762
+ React.createElement(React.Fragment, null, processedData.map(function (group, groupIndex) {
763
+ return /*#__PURE__*/React.createElement(React.Fragment, {
764
+ key: group.tabKey
765
+ }, (tabStyle === 'anchor' || processedData.length > 1) && group.tabLabel && /*#__PURE__*/React.createElement("div", {
766
+ id: "list-title-".concat(group.tabKey),
767
+ className: "pisell-list-group-title"
768
+ }, /*#__PURE__*/React.createElement("h2", {
769
+ className: "pisell-list-group-title-text"
770
+ }, group.tabLabel)), /*#__PURE__*/React.createElement("div", {
771
+ className: classNames('list-group-items'),
772
+ style: displayStyle === 'grid' ? listStyle : undefined
773
+ }, hasChildren ?
774
+ // 如果有子组件,循环渲染子组件
775
+ group.items.map(function (item, itemIndex) {
776
+ return /*#__PURE__*/React.createElement("div", {
777
+ key: item.id || itemIndex,
778
+ className: classNames('list-item')
779
+ }, item.__isSkeleton ? /*#__PURE__*/React.createElement(ListItemSkeleton, {
780
+ displayStyle: displayStyle,
781
+ showImage: true
782
+ }) : React.Children.map(children, function (child, childIndex) {
783
+ if ( /*#__PURE__*/isValidElement(child)) {
784
+ return /*#__PURE__*/cloneElement(child, _objectSpread(_objectSpread({}, child.props), {}, {
785
+ // 传递数据项给子组件
786
+ item: item,
787
+ index: itemIndex,
788
+ // 为每个子组件添加唯一key
789
+ key: "".concat(group.tabKey, "-").concat(item.id || itemIndex, "-").concat(childIndex)
790
+ }));
791
+ }
792
+ return child;
793
+ }));
794
+ }) :
795
+ // 没有子组件时使用原有逻辑
796
+ group.items.map(function (item, itemIndex) {
797
+ return /*#__PURE__*/React.createElement("div", {
798
+ key: item.id || itemIndex,
799
+ className: classNames('list-item')
800
+ }, item.__isSkeleton ? /*#__PURE__*/React.createElement(ListItemSkeleton, {
801
+ displayStyle: displayStyle,
802
+ showImage: true
803
+ }) : renderItem ? renderItem(item, itemIndex) : /*#__PURE__*/React.createElement("div", {
804
+ className: classNames('default-item')
805
+ }, _typeof(item) === 'object' ? JSON.stringify(item) : item));
806
+ })));
807
+ })), /*#__PURE__*/React.createElement(ScrollLoader, {
808
+ loading: loading,
809
+ scrollLoadState: scrollLoadState,
810
+ layoutDirection: layoutDirection,
811
+ paginationType: paginationType
812
+ })));
813
+ }, [displayStyle, layoutDirection, paginationType, listStyle, processedData, renderItem, loading, children, height, scrollLoadState, emptyConfig, totalDataLength, tabStyle]);
814
+
815
+ // 渲染底部工具栏
816
+ var renderFooter = function renderFooter() {
817
+ if (paginationType === 'all' || paginationType === 'scroll') return null;
818
+ if (paginationType === 'more') {
819
+ var canLoadMore = hasMore;
820
+ if (canLoadMore) {
821
+ return /*#__PURE__*/React.createElement("div", {
822
+ className: classNames('list-footer')
823
+ }, /*#__PURE__*/React.createElement(Button, {
824
+ onClick: handleLoadMore,
825
+ loading: loading
826
+ }, getLocalText('pisell-list-load-more', '查看更多')));
827
+ } else if (currentPage > 1) {
828
+ // 当已经显示超过初始数量的数据时,显示查看更少按钮
829
+ return /*#__PURE__*/React.createElement("div", {
830
+ className: classNames('list-footer')
831
+ }, /*#__PURE__*/React.createElement(Button, {
832
+ onClick: handleViewLess,
833
+ className: classNames('view-less-btn')
834
+ }, getLocalText('pisell-list-view-less', '查看更少')));
835
+ }
836
+ return null;
837
+ }
838
+ if (paginationType === 'pager') {
839
+ var _pagination$totalCoun;
840
+ // 优先使用传入的总数据条数,否则使用当前数据长度
841
+ var total = (_pagination$totalCoun = pagination === null || pagination === void 0 ? void 0 : pagination.totalCount) !== null && _pagination$totalCoun !== void 0 ? _pagination$totalCoun : totalDataLength;
842
+ var showTotal = function showTotal(total, range) {
843
+ var totalFunc = getLocalTextFunc('pisell-list-pagination-total');
844
+ if (typeof totalFunc === 'function') {
845
+ return totalFunc(range[0], range[1], total);
846
+ }
847
+ // 使用 i18n 回退函数
848
+ var fallbackFunc = getLocalTextFunc('pisell-list-pagination-total-fallback');
849
+ if (typeof fallbackFunc === 'function') {
850
+ return fallbackFunc(range[0], range[1], total);
851
+ }
852
+
853
+ // 最终回退(理论上不会执行到这里)
854
+ return "\u663E\u793A\u7B2C ".concat(range[0], "-").concat(range[1], " \u6761\uFF0C\u5171 ").concat(total, " \u6761");
855
+ };
856
+ return /*#__PURE__*/React.createElement("div", {
857
+ className: classNames('list-footer')
858
+ }, /*#__PURE__*/React.createElement(Pagination, {
859
+ current: currentPage,
860
+ pageSize: defaultPageSize,
861
+ total: total,
862
+ totalPages: pagination === null || pagination === void 0 ? void 0 : pagination.total,
863
+ onChange: handlePageChange,
864
+ onShowSizeChange: handleShowSizeChange,
865
+ showTotal: showTotal,
866
+ showSizeChanger: true,
867
+ pageSizeOptions: ['6', '10', '20', '50']
868
+ }));
869
+ }
870
+ return null;
871
+ };
872
+
873
+ // 渲染滚动悬浮按钮
874
+ var renderScrollButton = function renderScrollButton() {
875
+ // 只在滚动加载模式下且有数据时显示滚动按钮
876
+ if (paginationType !== 'scroll' || totalDataLength === 0) {
877
+ return null;
878
+ }
879
+ return /*#__PURE__*/React.createElement("div", {
880
+ className: classNames('list-scroll-float-button')
881
+ }, /*#__PURE__*/React.createElement("button", {
882
+ className: classNames('scroll-down-button'),
883
+ onClick: handleScrollDown,
884
+ title: layoutDirection === 'vertical' ? getLocalText('pisell-list-scroll-to-bottom', '滚动到底部并加载更多') : getLocalText('pisell-list-scroll-to-end', '滚动到末尾并加载更多'),
885
+ style: _objectSpread(_objectSpread({
886
+ padding: '16px',
887
+ position: 'absolute',
888
+ background: 'rgba(255, 255, 255, 0.75)',
889
+ boxShadow: '0px 4px 6px -2px rgba(16, 24, 40, 0.03)',
890
+ borderRadius: '100px',
891
+ outline: '1px #D0D5DD solid',
892
+ outlineOffset: '-1px',
893
+ backdropFilter: 'blur(6px)',
894
+ flexDirection: 'column',
895
+ justifyContent: 'flex-start',
896
+ alignItems: 'flex-start',
897
+ gap: '16px',
898
+ display: 'inline-flex',
899
+ cursor: 'pointer'
900
+ }, layoutDirection === 'horizontal' ? {
901
+ right: '20px',
902
+ top: '50%',
903
+ transform: 'translateY(-50%)'
904
+ } : {
905
+ left: '50%',
906
+ bottom: '20px',
907
+ transform: 'translateX(-50%)'
908
+ }), {}, {
909
+ zIndex: 1000,
910
+ border: 'none'
911
+ })
912
+ }, /*#__PURE__*/React.createElement("div", {
913
+ style: {
914
+ width: '32px',
915
+ height: '32px',
916
+ display: 'flex',
917
+ alignItems: 'center',
918
+ justifyContent: 'center'
919
+ }
920
+ }, /*#__PURE__*/React.createElement(Iconfont, {
921
+ type: layoutDirection === 'horizontal' ? "pisell2-chevron-right" : "pisell2-chevron-down",
922
+ style: {
923
+ fontSize: '20px',
924
+ color: '#101828'
925
+ }
926
+ }))));
927
+ };
928
+
929
+ // 计算容器类名 - 直接计算,无需memo
930
+ var containerClassName = classNames('pisell-list', className, "pisell-list-".concat(layoutDirection), {
931
+ 'pisell-list-sticky-enabled': layoutDirection === 'vertical' && stickyTop
932
+ });
933
+
934
+ // 计算容器样式 - 直接计算,无需memo
935
+ var finalContainerStyle = _objectSpread(_objectSpread({}, containerStyle), {}, {
936
+ position: 'relative'
937
+ }, layoutDirection === 'vertical' && height !== 'auto' && {
938
+ overflowY: 'hidden'
939
+ });
940
+
941
+ // 渲染主要内容区域
942
+ var renderMainContent = function renderMainContent() {
943
+ if (layoutDirection === 'vertical') {
944
+ // 上下排版:header 和内容都在一个滚动容器内
945
+ return renderContent();
946
+ } else {
947
+ // 左右排版:保持原有结构
948
+ return /*#__PURE__*/React.createElement(React.Fragment, null, renderTabs(), renderContent());
949
+ }
950
+ };
951
+ return /*#__PURE__*/React.createElement("div", {
952
+ ref: containerRef,
953
+ className: containerClassName,
954
+ style: finalContainerStyle
955
+ }, renderMainContent(), renderFooter(), renderScrollButton());
956
+ };
957
+ export default List;