@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,816 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ 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; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
+ 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."); }
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+ 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; }
13
+ 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); } }
14
+ 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); }); }; }
15
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
+ 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); }
18
+ 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; }
19
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
20
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
+ import React, { useState, useEffect, useCallback, useMemo } from 'react';
22
+ import ResponsiveWrapper, { createResponsiveConfig } from "./ResponsiveWrapper";
23
+ import "./TestResponsiveWrapper.less";
24
+
25
+ // 数据类型定义
26
+
27
+ // 模拟数据生成器
28
+ var generateTestData = function generateTestData(count, category) {
29
+ var categories = ['电子产品', '服装配饰', '家居用品', '运动户外', '美妆护肤'];
30
+ var statuses = ['active', 'inactive', 'pending'];
31
+ return Array.from({
32
+ length: count
33
+ }, function (_, index) {
34
+ return {
35
+ id: index + 1,
36
+ title: "".concat(category || categories[Math.floor(Math.random() * categories.length)], " ").concat(index + 1),
37
+ description: "\u8FD9\u662F\u7B2C ".concat(index + 1, " \u4E2A\u6D4B\u8BD5\u9879\u76EE\u7684\u8BE6\u7EC6\u63CF\u8FF0\uFF0C\u5305\u542B\u4E86\u4EA7\u54C1\u7684\u4E3B\u8981\u7279\u70B9\u548C\u4F18\u52BF"),
38
+ category: category || categories[Math.floor(Math.random() * categories.length)],
39
+ height: Math.random() * 200 + 100,
40
+ // 随机高度,用于瀑布流测试
41
+ price: Math.round(Math.random() * 1000 + 10),
42
+ status: statuses[Math.floor(Math.random() * statuses.length)],
43
+ createdAt: new Date(Date.now() - Math.random() * 30 * 24 * 60 * 60 * 1000) // 最近30天内的随机日期
44
+ };
45
+ });
46
+ };
47
+
48
+ // 带起始ID的数据生成器(用于分页数据)
49
+ var generateTestDataWithId = function generateTestDataWithId(count, category) {
50
+ var startId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
51
+ var categories = ['电子产品', '服装配饰', '家居用品', '运动户外', '美妆护肤'];
52
+ var statuses = ['active', 'inactive', 'pending'];
53
+
54
+ // 产品名称模板
55
+ var productNames = {
56
+ '电子产品': ['智能手机', '蓝牙耳机', '平板电脑', '智能手表', '充电器', '数据线', '移动电源', '音响'],
57
+ '服装配饰': ['休闲外套', '牛仔裤', '连衣裙', '运动鞋', '手提包', '围巾', '帽子', 'T恤'],
58
+ '家居用品': ['咖啡杯', '床上用品', '收纳盒', '台灯', '花瓶', '地毯', '抱枕', '装饰画'],
59
+ '运动户外': ['运动鞋', '瑜伽垫', '哑铃', '背包', '帐篷', '水杯', '护膝', '跑步腰包'],
60
+ '美妆护肤': ['面膜', '口红', '防晒霜', '洗面奶', '精华液', '粉底液', '眼影', '香水']
61
+ };
62
+ return Array.from({
63
+ length: count
64
+ }, function (_, index) {
65
+ var targetCategory = category && category !== 'all' ? category : categories[Math.floor(Math.random() * categories.length)];
66
+ var categoryProducts = productNames[targetCategory] || productNames['电子产品'];
67
+ var productName = categoryProducts[Math.floor(Math.random() * categoryProducts.length)];
68
+ var itemId = startId + index;
69
+ return {
70
+ id: itemId,
71
+ title: "".concat(productName, " - \u578B\u53F7").concat(String(itemId).padStart(4, '0')),
72
+ description: "".concat(productName, "\u7684\u8BE6\u7EC6\u4ECB\u7ECD\uFF1A\u91C7\u7528\u4F18\u8D28\u6750\u6599\u5236\u4F5C\uFF0C\u8BBE\u8BA1\u7CBE\u7F8E\uFF0C\u529F\u80FD\u5B9E\u7528\u3002\u9002\u5408\u65E5\u5E38\u4F7F\u7528\uFF0C\u6027\u4EF7\u6BD4\u6781\u9AD8\u3002\u7F16\u53F7\uFF1A").concat(String(itemId).padStart(6, '0')),
73
+ category: targetCategory,
74
+ height: Math.random() * 250 + 120,
75
+ // 稍微增加高度变化范围
76
+ price: Math.round(Math.random() * 2000 + 50),
77
+ // 增加价格范围
78
+ status: statuses[Math.floor(Math.random() * statuses.length)],
79
+ createdAt: new Date(Date.now() - Math.random() * 60 * 24 * 60 * 60 * 1000) // 最近60天内的随机日期
80
+ };
81
+ });
82
+ };
83
+
84
+ // 固定的分类配置
85
+ var CATEGORIES = [{
86
+ key: '电子产品',
87
+ label: '电子产品',
88
+ total: 150
89
+ }, {
90
+ key: '服装配饰',
91
+ label: '服装配饰',
92
+ total: 125
93
+ }, {
94
+ key: '家居用品',
95
+ label: '家居用品',
96
+ total: 100
97
+ }, {
98
+ key: '运动户外',
99
+ label: '运动户外',
100
+ total: 75
101
+ }, {
102
+ key: '美妆护肤',
103
+ label: '美妆护肤',
104
+ total: 50
105
+ }];
106
+
107
+ // 简单的tab生成函数 - 根据模式生成不同的tab数据
108
+ var generateSimpleTabItems = function generateSimpleTabItems(tabStyle) {
109
+ var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
110
+ if (tabStyle === 'switch') {
111
+ // 切换模式:使用固定的分类结构,不显示动态数量
112
+ var tabs = [{
113
+ key: 'all',
114
+ label: '全部'
115
+ }];
116
+ CATEGORIES.forEach(function (category) {
117
+ tabs.push({
118
+ key: category.key,
119
+ label: category.label,
120
+ group: category.key
121
+ });
122
+ });
123
+ return tabs;
124
+ } else {
125
+ // 锚点模式:基于实际数据统计数量,提供多维度分类
126
+ var categoryCount = data.reduce(function (acc, item) {
127
+ acc[item.category] = (acc[item.category] || 0) + 1;
128
+ return acc;
129
+ }, {});
130
+ var statusCount = data.reduce(function (acc, item) {
131
+ acc[item.status] = (acc[item.status] || 0) + 1;
132
+ return acc;
133
+ }, {});
134
+ var priceRangeCount = data.reduce(function (acc, item) {
135
+ var price = item.price || 0;
136
+ var range = '';
137
+ if (price < 100) range = '100元以下';else if (price < 500) range = '100-500元';else if (price < 1000) range = '500-1000元';else range = '1000元以上';
138
+ acc[range] = (acc[range] || 0) + 1;
139
+ return acc;
140
+ }, {});
141
+ var _tabs = [{
142
+ key: 'all',
143
+ label: "\u5168\u90E8 (".concat(data.length, ")")
144
+ }];
145
+
146
+ // 按商品分类
147
+ Object.entries(categoryCount).forEach(function (_ref) {
148
+ var _ref2 = _slicedToArray(_ref, 2),
149
+ category = _ref2[0],
150
+ count = _ref2[1];
151
+ _tabs.push({
152
+ key: "category-".concat(category),
153
+ label: "".concat(category, " (").concat(count, ")"),
154
+ group: category
155
+ });
156
+ });
157
+
158
+ // 按状态分类
159
+ var statusLabels = {
160
+ 'active': '正常',
161
+ 'inactive': '停用',
162
+ 'pending': '待审核'
163
+ };
164
+ Object.entries(statusCount).forEach(function (_ref3) {
165
+ var _ref4 = _slicedToArray(_ref3, 2),
166
+ status = _ref4[0],
167
+ count = _ref4[1];
168
+ _tabs.push({
169
+ key: "status-".concat(status),
170
+ label: "".concat(statusLabels[status], " (").concat(count, ")"),
171
+ group: status
172
+ });
173
+ });
174
+
175
+ // 按价格区间分类
176
+ Object.entries(priceRangeCount).forEach(function (_ref5) {
177
+ var _ref6 = _slicedToArray(_ref5, 2),
178
+ range = _ref6[0],
179
+ count = _ref6[1];
180
+ _tabs.push({
181
+ key: "price-".concat(range),
182
+ label: "".concat(range, " (").concat(count, ")"),
183
+ group: range
184
+ });
185
+ });
186
+ return _tabs;
187
+ }
188
+ };
189
+
190
+ // 模拟API调用
191
+ var mockApiCall = /*#__PURE__*/function () {
192
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
193
+ var pageSize, currentPage, category, _params$delay, delay, categoryTotals, totalCount, startId, data, hasMore;
194
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
195
+ while (1) switch (_context.prev = _context.next) {
196
+ case 0:
197
+ pageSize = params.pageSize, currentPage = params.currentPage, category = params.category, _params$delay = params.delay, delay = _params$delay === void 0 ? 800 : _params$delay; // 模拟网络延迟(减少延迟以提升体验)
198
+ _context.next = 3;
199
+ return new Promise(function (resolve) {
200
+ return setTimeout(resolve, delay);
201
+ });
202
+ case 3:
203
+ if (!(Math.random() < 0.05)) {
204
+ _context.next = 5;
205
+ break;
206
+ }
207
+ throw new Error('网络请求失败,请重试');
208
+ case 5:
209
+ // 根据分类设置不同的总数,总计500条数据
210
+ categoryTotals = {
211
+ '电子产品': 150,
212
+ // 30%
213
+ '服装配饰': 125,
214
+ // 25%
215
+ '家居用品': 100,
216
+ // 20%
217
+ '运动户外': 75,
218
+ // 15%
219
+ '美妆护肤': 50 // 10%
220
+ };
221
+ totalCount = category && category !== 'all' ? categoryTotals[category] || 50 : 500; // 生成当前页的数据,为分类数据添加起始ID偏移
222
+ startId = category && category !== 'all' ? Object.entries(categoryTotals).reduce(function (offset, _ref8) {
223
+ var _ref9 = _slicedToArray(_ref8, 2),
224
+ cat = _ref9[0],
225
+ count = _ref9[1];
226
+ if (cat === category) return offset;
227
+ return offset + count;
228
+ }, 0) + (currentPage - 1) * pageSize + 1 : (currentPage - 1) * pageSize + 1;
229
+ data = generateTestDataWithId(pageSize, category, startId);
230
+ hasMore = currentPage * pageSize < totalCount;
231
+ return _context.abrupt("return", {
232
+ data: data,
233
+ total: totalCount,
234
+ hasMore: hasMore
235
+ });
236
+ case 11:
237
+ case "end":
238
+ return _context.stop();
239
+ }
240
+ }, _callee);
241
+ }));
242
+ return function mockApiCall(_x) {
243
+ return _ref7.apply(this, arguments);
244
+ };
245
+ }();
246
+
247
+ // 基础配置项接口
248
+
249
+ // 默认配置(优化大数据量显示)
250
+ var defaultDynamicConfig = {
251
+ displayStyle: 'grid',
252
+ columns: {
253
+ pc: 4,
254
+ pad: 3,
255
+ mobile: 2
256
+ },
257
+ columnGap: {
258
+ pc: 20,
259
+ pad: 16,
260
+ mobile: 12
261
+ },
262
+ rowGap: {
263
+ pc: 20,
264
+ pad: 16,
265
+ mobile: 12
266
+ },
267
+ paginationType: {
268
+ pc: 'pager',
269
+ pad: 'more',
270
+ mobile: 'scroll'
271
+ },
272
+ defaultPageSize: {
273
+ pc: 20,
274
+ pad: 15,
275
+ mobile: 10
276
+ },
277
+ enableTab: false,
278
+ tabStyle: 'none',
279
+ stickyTop: false,
280
+ enableEmpty: false
281
+ };
282
+
283
+ // 预设配置模板
284
+ var presetConfigs = [{
285
+ name: '基础网格布局',
286
+ description: '标准的网格布局,适合大数据量内容展示(500条数据)',
287
+ config: {
288
+ displayStyle: 'grid',
289
+ columns: {
290
+ pc: 4,
291
+ pad: 3,
292
+ mobile: 2
293
+ },
294
+ columnGap: {
295
+ pc: 20,
296
+ pad: 16,
297
+ mobile: 12
298
+ },
299
+ rowGap: {
300
+ pc: 20,
301
+ pad: 16,
302
+ mobile: 12
303
+ },
304
+ paginationType: {
305
+ pc: 'pager',
306
+ pad: 'pager',
307
+ mobile: 'scroll'
308
+ },
309
+ defaultPageSize: {
310
+ pc: 20,
311
+ pad: 15,
312
+ mobile: 10
313
+ },
314
+ enableTab: false,
315
+ tabStyle: 'none',
316
+ stickyTop: false,
317
+ enableEmpty: false
318
+ }
319
+ }, {
320
+ name: '切换模式',
321
+ description: '标签切换模式,点击标签会重新加载对应分类的数据',
322
+ config: {
323
+ displayStyle: 'grid',
324
+ columns: {
325
+ pc: 4,
326
+ pad: 3,
327
+ mobile: 2
328
+ },
329
+ columnGap: {
330
+ pc: 18,
331
+ pad: 15,
332
+ mobile: 12
333
+ },
334
+ rowGap: {
335
+ pc: 18,
336
+ pad: 15,
337
+ mobile: 12
338
+ },
339
+ paginationType: {
340
+ pc: 'pager',
341
+ pad: 'more',
342
+ mobile: 'scroll'
343
+ },
344
+ defaultPageSize: {
345
+ pc: 16,
346
+ pad: 12,
347
+ mobile: 8
348
+ },
349
+ enableTab: true,
350
+ tabStyle: 'switch',
351
+ stickyTop: true,
352
+ enableEmpty: false
353
+ }
354
+ }, {
355
+ name: '锚点模式',
356
+ description: '标签锚点模式,显示所有数据并按分类分组,点击标签会跳转到对应分组位置',
357
+ config: {
358
+ displayStyle: 'grid',
359
+ columns: {
360
+ pc: 4,
361
+ pad: 3,
362
+ mobile: 2
363
+ },
364
+ columnGap: {
365
+ pc: 18,
366
+ pad: 15,
367
+ mobile: 12
368
+ },
369
+ rowGap: {
370
+ pc: 18,
371
+ pad: 15,
372
+ mobile: 12
373
+ },
374
+ paginationType: {
375
+ pc: 'all',
376
+ pad: 'all',
377
+ mobile: 'all'
378
+ },
379
+ defaultPageSize: {
380
+ pc: 500,
381
+ pad: 500,
382
+ mobile: 500
383
+ },
384
+ enableTab: true,
385
+ tabStyle: 'anchor',
386
+ stickyTop: true,
387
+ enableEmpty: false
388
+ }
389
+ }];
390
+
391
+ /**
392
+ * ResponsiveWrapper 测试组件
393
+ * 用于测试ResponsiveWrapper组件在不同配置下的表现,支持动态配置和数据加载模拟
394
+ */
395
+ var TestResponsiveWrapper = function TestResponsiveWrapper() {
396
+ var _useState = useState(0),
397
+ _useState2 = _slicedToArray(_useState, 2),
398
+ activePreset = _useState2[0],
399
+ setActivePreset = _useState2[1];
400
+ var _useState3 = useState(null),
401
+ _useState4 = _slicedToArray(_useState3, 2),
402
+ simulateDevice = _useState4[0],
403
+ setSimulateDevice = _useState4[1];
404
+ var _useState5 = useState(defaultDynamicConfig),
405
+ _useState6 = _slicedToArray(_useState5, 2),
406
+ dynamicConfig = _useState6[0],
407
+ setDynamicConfig = _useState6[1];
408
+ var _useState7 = useState(false),
409
+ _useState8 = _slicedToArray(_useState7, 2),
410
+ isCustomMode = _useState8[0],
411
+ setIsCustomMode = _useState8[1];
412
+
413
+ // 数据加载相关状态
414
+ var _useState9 = useState([]),
415
+ _useState10 = _slicedToArray(_useState9, 2),
416
+ data = _useState10[0],
417
+ setData = _useState10[1];
418
+ var _useState11 = useState(false),
419
+ _useState12 = _slicedToArray(_useState11, 2),
420
+ loading = _useState12[0],
421
+ setLoading = _useState12[1];
422
+ var _useState13 = useState(null),
423
+ _useState14 = _slicedToArray(_useState13, 2),
424
+ error = _useState14[0],
425
+ setError = _useState14[1];
426
+ var _useState15 = useState(1),
427
+ _useState16 = _slicedToArray(_useState15, 2),
428
+ currentPage = _useState16[0],
429
+ setCurrentPage = _useState16[1];
430
+ var _useState17 = useState(0),
431
+ _useState18 = _slicedToArray(_useState17, 2),
432
+ total = _useState18[0],
433
+ setTotal = _useState18[1];
434
+ var _useState19 = useState('all'),
435
+ _useState20 = _slicedToArray(_useState19, 2),
436
+ activeTab = _useState20[0],
437
+ setActiveTab = _useState20[1];
438
+ var _useState21 = useState('pager'),
439
+ _useState22 = _slicedToArray(_useState21, 2),
440
+ currentPaginationType = _useState22[0],
441
+ setCurrentPaginationType = _useState22[1];
442
+ var _useState23 = useState(600),
443
+ _useState24 = _slicedToArray(_useState23, 2),
444
+ maxHeight = _useState24[0],
445
+ setMaxHeight = _useState24[1]; // 默认600px最大高度
446
+ var _useState25 = useState('vertical'),
447
+ _useState26 = _slicedToArray(_useState25, 2),
448
+ scrollDirection = _useState26[0],
449
+ setScrollDirection = _useState26[1]; // 默认垂直滚动
450
+
451
+ // 加载数据的方法
452
+ var loadData = useCallback( /*#__PURE__*/function () {
453
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
454
+ var response;
455
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
456
+ while (1) switch (_context2.prev = _context2.next) {
457
+ case 0:
458
+ setLoading(true);
459
+ setError(null);
460
+ _context2.prev = 2;
461
+ _context2.next = 5;
462
+ return mockApiCall({
463
+ currentPage: params.currentPage,
464
+ pageSize: params.pageSize,
465
+ category: params.activeTab === 'all' ? undefined : params.activeTab
466
+ });
467
+ case 5:
468
+ response = _context2.sent;
469
+ if (params.trigger === 'loadMore' || params.trigger === 'scroll') {
470
+ setData(function (prev) {
471
+ return [].concat(_toConsumableArray(prev), _toConsumableArray(response.data));
472
+ });
473
+ } else {
474
+ setData(response.data);
475
+ }
476
+ setTotal(response.total);
477
+ setCurrentPage(params.currentPage);
478
+ setActiveTab(params.activeTab || 'all');
479
+ _context2.next = 15;
480
+ break;
481
+ case 12:
482
+ _context2.prev = 12;
483
+ _context2.t0 = _context2["catch"](2);
484
+ setError(_context2.t0 instanceof Error ? _context2.t0.message : '未知错误');
485
+ case 15:
486
+ _context2.prev = 15;
487
+ setLoading(false);
488
+ return _context2.finish(15);
489
+ case 18:
490
+ case "end":
491
+ return _context2.stop();
492
+ }
493
+ }, _callee2, null, [[2, 12, 15, 18]]);
494
+ }));
495
+ return function (_x2) {
496
+ return _ref10.apply(this, arguments);
497
+ };
498
+ }(), []);
499
+
500
+ // 刷新数据
501
+ var refreshData = useCallback(function () {
502
+ var config = isCustomMode ? dynamicConfig : presetConfigs[activePreset].config;
503
+ var deviceType = simulateDevice || 'pc';
504
+ var pageSize = config.defaultPageSize[deviceType];
505
+ loadData({
506
+ trigger: 'pagination',
507
+ currentPage: 1,
508
+ pageSize: pageSize,
509
+ activeTab: activeTab
510
+ });
511
+ }, [isCustomMode, dynamicConfig, activePreset, simulateDevice, activeTab, loadData]);
512
+
513
+ // 初始化和配置变化时加载数据
514
+ useEffect(function () {
515
+ refreshData();
516
+ }, [refreshData]);
517
+
518
+ // 创建当前的响应式配置
519
+ var currentResponsiveConfig = useMemo(function () {
520
+ var config = isCustomMode ? dynamicConfig : presetConfigs[activePreset].config;
521
+
522
+ // 生成简单的Tab数据
523
+ var tabData = config.enableTab && config.tabStyle !== 'none' ? generateSimpleTabItems(config.tabStyle, data) : undefined;
524
+
525
+ // 渲染项目的方法
526
+ var renderItem = function renderItem(item, index) {
527
+ var testItem = item;
528
+ return /*#__PURE__*/React.createElement("div", {
529
+ className: "test-item ".concat(testItem.status),
530
+ key: testItem.id
531
+ }, /*#__PURE__*/React.createElement("div", {
532
+ className: "item-header"
533
+ }, /*#__PURE__*/React.createElement("h4", {
534
+ title: testItem.title
535
+ }, testItem.title), /*#__PURE__*/React.createElement("span", {
536
+ className: "status-badge ".concat(testItem.status)
537
+ }, testItem.status === 'active' ? '正常' : testItem.status === 'inactive' ? '停用' : '待审核')), /*#__PURE__*/React.createElement("p", {
538
+ className: "item-description",
539
+ title: testItem.description
540
+ }, testItem.description), /*#__PURE__*/React.createElement("div", {
541
+ className: "item-meta"
542
+ }, /*#__PURE__*/React.createElement("span", {
543
+ className: "category"
544
+ }, testItem.category), testItem.price && /*#__PURE__*/React.createElement("span", {
545
+ className: "price"
546
+ }, "\xA5", testItem.price)), /*#__PURE__*/React.createElement("div", {
547
+ className: "item-footer"
548
+ }, /*#__PURE__*/React.createElement("span", {
549
+ className: "item-id"
550
+ }, "#", testItem.id), /*#__PURE__*/React.createElement("span", {
551
+ className: "created-time"
552
+ }, testItem.createdAt.toLocaleDateString())), config.displayStyle === 'waterfall' && /*#__PURE__*/React.createElement("div", {
553
+ className: "height-info"
554
+ }, "\u9AD8\u5EA6: ", Math.round(testItem.height || 150), "px"));
555
+ };
556
+
557
+ // 基础配置
558
+ var baseProps = {
559
+ data: config.enableEmpty ? [] : data,
560
+ loading: loading,
561
+ displayStyle: config.displayStyle,
562
+ layoutDirection: scrollDirection,
563
+ tabStyle: config.enableTab ? config.tabStyle : 'none',
564
+ tabGroup: 'category',
565
+ // 指定使用category字段进行分组
566
+ tabData: tabData,
567
+ stickyTop: config.stickyTop,
568
+ emptyConfig: config.enableEmpty ? {
569
+ show: true,
570
+ text: '暂无数据',
571
+ description: '当前没有可显示的内容,请尝试刷新或调整筛选条件'
572
+ } : undefined,
573
+ renderItem: renderItem,
574
+ onLoadData: loadData
575
+ };
576
+
577
+ // 创建响应式配置,使用createResponsiveConfig的新接口
578
+ var responsiveConfig = createResponsiveConfig({
579
+ pc: {
580
+ columns: config.columns.pc,
581
+ columnGap: config.columnGap.pc,
582
+ rowGap: config.rowGap.pc,
583
+ layoutDirection: scrollDirection,
584
+ paginationType: currentPaginationType,
585
+ defaultPageSize: config.defaultPageSize.pc,
586
+ pagination: {
587
+ current: currentPage,
588
+ total: Math.ceil(total / config.defaultPageSize.pc),
589
+ totalCount: total
590
+ }
591
+ },
592
+ pad: {
593
+ columns: config.columns.pad,
594
+ columnGap: config.columnGap.pad,
595
+ rowGap: config.rowGap.pad,
596
+ layoutDirection: scrollDirection,
597
+ paginationType: currentPaginationType,
598
+ defaultPageSize: config.defaultPageSize.pad,
599
+ pagination: {
600
+ current: currentPage,
601
+ total: Math.ceil(total / config.defaultPageSize.pad),
602
+ totalCount: total
603
+ }
604
+ },
605
+ mobile: {
606
+ columns: config.columns.mobile,
607
+ columnGap: config.columnGap.mobile,
608
+ rowGap: config.rowGap.mobile,
609
+ layoutDirection: scrollDirection,
610
+ paginationType: currentPaginationType,
611
+ defaultPageSize: config.defaultPageSize.mobile,
612
+ pagination: {
613
+ current: currentPage,
614
+ total: Math.ceil(total / config.defaultPageSize.mobile),
615
+ totalCount: total
616
+ }
617
+ }
618
+ });
619
+
620
+ // 返回完整的ResponsiveWrapperProps
621
+ return _objectSpread(_objectSpread({}, baseProps), {}, {
622
+ responsive: responsiveConfig
623
+ });
624
+ }, [isCustomMode, dynamicConfig, activePreset, data, loading, total, loadData, currentPaginationType, currentPage, scrollDirection]);
625
+
626
+ // 处理预设配置切换
627
+ var handlePresetChange = function handlePresetChange(index) {
628
+ setActivePreset(index);
629
+ setIsCustomMode(false);
630
+ setDynamicConfig(presetConfigs[index].config);
631
+ };
632
+
633
+ // 处理自定义配置变化
634
+ var handleConfigChange = function handleConfigChange(field, value) {
635
+ setIsCustomMode(true);
636
+ setDynamicConfig(function (prev) {
637
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, field, value));
638
+ });
639
+ };
640
+
641
+ // 处理设备特定配置变化
642
+ var handleDeviceConfigChange = function handleDeviceConfigChange(device, field, value) {
643
+ setIsCustomMode(true);
644
+ setDynamicConfig(function (prev) {
645
+ var fieldValue = prev[field];
646
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, field, _objectSpread(_objectSpread({}, fieldValue), {}, _defineProperty({}, device, value))));
647
+ });
648
+ };
649
+ return /*#__PURE__*/React.createElement("div", {
650
+ className: "test-responsive-wrapper"
651
+ }, /*#__PURE__*/React.createElement("div", {
652
+ className: "test-controls"
653
+ }, /*#__PURE__*/React.createElement("div", {
654
+ className: "preset-selector"
655
+ }, /*#__PURE__*/React.createElement("h3", null, "\u9884\u8BBE\u914D\u7F6E\u6A21\u677F:"), /*#__PURE__*/React.createElement("div", {
656
+ className: "preset-buttons"
657
+ }, presetConfigs.map(function (preset, index) {
658
+ return /*#__PURE__*/React.createElement("button", {
659
+ key: index,
660
+ className: "preset-button ".concat(index === activePreset && !isCustomMode ? 'active' : ''),
661
+ onClick: function onClick() {
662
+ return handlePresetChange(index);
663
+ },
664
+ title: preset.description
665
+ }, preset.name);
666
+ }))), /*#__PURE__*/React.createElement("div", {
667
+ className: "device-simulator"
668
+ }, /*#__PURE__*/React.createElement("h3", null, "\u8BBE\u5907\u7C7B\u578B:"), /*#__PURE__*/React.createElement("div", {
669
+ className: "device-buttons"
670
+ }, /*#__PURE__*/React.createElement("button", {
671
+ className: "device-button ".concat(simulateDevice === null ? 'active' : ''),
672
+ onClick: function onClick() {
673
+ return setSimulateDevice(null);
674
+ }
675
+ }, "\u81EA\u52A8\u68C0\u6D4B"), ['pc', 'pad', 'mobile'].map(function (device) {
676
+ return /*#__PURE__*/React.createElement("button", {
677
+ key: device,
678
+ className: "device-button ".concat(simulateDevice === device ? 'active' : ''),
679
+ onClick: function onClick() {
680
+ return setSimulateDevice(device);
681
+ }
682
+ }, device.toUpperCase());
683
+ }))), /*#__PURE__*/React.createElement("div", {
684
+ className: "data-controls"
685
+ }, /*#__PURE__*/React.createElement("h3", null, "\u6570\u636E\u64CD\u4F5C:"), /*#__PURE__*/React.createElement("div", {
686
+ className: "data-buttons"
687
+ }, /*#__PURE__*/React.createElement("button", {
688
+ onClick: refreshData,
689
+ disabled: loading,
690
+ className: "refresh-button"
691
+ }, loading ? '加载中...' : '刷新数据'), /*#__PURE__*/React.createElement("button", {
692
+ onClick: function onClick() {
693
+ return handleConfigChange('enableEmpty', !dynamicConfig.enableEmpty);
694
+ },
695
+ className: "toggle-button ".concat(dynamicConfig.enableEmpty ? 'active' : '')
696
+ }, dynamicConfig.enableEmpty ? '显示数据' : '显示空状态'))), /*#__PURE__*/React.createElement("div", {
697
+ className: "pagination-controls"
698
+ }, /*#__PURE__*/React.createElement("h3", null, "\u5206\u9875\u65B9\u5F0F:"), /*#__PURE__*/React.createElement("div", {
699
+ className: "pagination-buttons"
700
+ }, [{
701
+ key: 'pager',
702
+ label: '分页器',
703
+ desc: '传统分页,适合精确导航'
704
+ }, {
705
+ key: 'more',
706
+ label: '加载更多',
707
+ desc: '点击按钮加载,适合移动端'
708
+ }, {
709
+ key: 'scroll',
710
+ label: '滚动加载',
711
+ desc: '自动无限滚动'
712
+ }, {
713
+ key: 'all',
714
+ label: '全部显示',
715
+ desc: '一次性显示所有数据'
716
+ }].map(function (pagination) {
717
+ return /*#__PURE__*/React.createElement("button", {
718
+ key: pagination.key,
719
+ className: "pagination-button ".concat(currentPaginationType === pagination.key ? 'active' : ''),
720
+ onClick: function onClick() {
721
+ return setCurrentPaginationType(pagination.key);
722
+ },
723
+ title: pagination.desc
724
+ }, pagination.label, pagination.key === 'all' && total > 100 && /*#__PURE__*/React.createElement("span", {
725
+ className: "warning-badge"
726
+ }, "\u26A0\uFE0F"));
727
+ })), /*#__PURE__*/React.createElement("div", {
728
+ className: "pagination-description"
729
+ }, /*#__PURE__*/React.createElement("small", null, "\u5F53\u524D: ", /*#__PURE__*/React.createElement("strong", null, currentPaginationType === 'pager' && '传统分页器 - 显示页码和跳转控件', currentPaginationType === 'more' && '加载更多 - 点击按钮加载下一页', currentPaginationType === 'scroll' && '滚动加载 - 滚动到底部自动加载', currentPaginationType === 'all' && '全部显示 - 一次性显示所有500条数据')))), /*#__PURE__*/React.createElement("div", {
730
+ className: "height-controls"
731
+ }, /*#__PURE__*/React.createElement("h3", null, "\u5217\u8868\u9AD8\u5EA6\u9650\u5236:"), /*#__PURE__*/React.createElement("div", {
732
+ className: "height-buttons"
733
+ }, [{
734
+ value: 400,
735
+ label: '400px',
736
+ desc: '适合紧凑布局'
737
+ }, {
738
+ value: 600,
739
+ label: '600px',
740
+ desc: '默认高度,平衡体验'
741
+ }, {
742
+ value: 800,
743
+ label: '800px',
744
+ desc: '适合大屏幕浏览'
745
+ }, {
746
+ value: 'auto',
747
+ label: '无限制',
748
+ desc: '根据内容自适应高度'
749
+ }].map(function (height) {
750
+ return /*#__PURE__*/React.createElement("button", {
751
+ key: height.value,
752
+ className: "height-button ".concat(maxHeight === height.value ? 'active' : ''),
753
+ onClick: function onClick() {
754
+ return setMaxHeight(height.value);
755
+ },
756
+ title: height.desc
757
+ }, height.label, height.value === 'auto' && currentPaginationType === 'all' && /*#__PURE__*/React.createElement("span", {
758
+ className: "warning-badge"
759
+ }, "\u26A0\uFE0F"));
760
+ })), /*#__PURE__*/React.createElement("div", {
761
+ className: "height-description"
762
+ }, /*#__PURE__*/React.createElement("small", null, "\u5F53\u524D\u9AD8\u5EA6: ", /*#__PURE__*/React.createElement("strong", null, maxHeight === 'auto' ? '无限制 - 根据内容自适应' : "".concat(maxHeight, "px - \u8D85\u51FA\u90E8\u5206\u53EF\u6EDA\u52A8")), maxHeight === 'auto' && currentPaginationType === 'all' && /*#__PURE__*/React.createElement("span", {
763
+ className: "performance-warning"
764
+ }, " (\u26A0\uFE0F 500\u6761\u6570\u636E\u53EF\u80FD\u5F71\u54CD\u9875\u9762\u6027\u80FD)")))), /*#__PURE__*/React.createElement("div", {
765
+ className: "scroll-direction-controls"
766
+ }, /*#__PURE__*/React.createElement("h3", null, "\u6EDA\u52A8\u65B9\u5411:"), /*#__PURE__*/React.createElement("div", {
767
+ className: "scroll-direction-buttons"
768
+ }, [{
769
+ key: 'vertical',
770
+ label: '垂直滚动',
771
+ desc: '上下滚动,传统列表布局',
772
+ icon: '↕️',
773
+ recommend: '推荐用于大多数场景'
774
+ }, {
775
+ key: 'horizontal',
776
+ label: '水平滚动',
777
+ desc: '左右滚动,卡片式布局',
778
+ icon: '↔️',
779
+ recommend: '适合图片展示或卡片浏览'
780
+ }].map(function (direction) {
781
+ return /*#__PURE__*/React.createElement("button", {
782
+ key: direction.key,
783
+ className: "scroll-direction-button ".concat(scrollDirection === direction.key ? 'active' : ''),
784
+ onClick: function onClick() {
785
+ return setScrollDirection(direction.key);
786
+ },
787
+ title: direction.desc
788
+ }, /*#__PURE__*/React.createElement("span", {
789
+ className: "direction-icon"
790
+ }, direction.icon), direction.label, scrollDirection === direction.key && /*#__PURE__*/React.createElement("span", {
791
+ className: "recommend-badge"
792
+ }, "\u2713"));
793
+ })))), /*#__PURE__*/React.createElement("div", {
794
+ className: "test-container ".concat(simulateDevice ? "simulate-".concat(simulateDevice) : '')
795
+ }, /*#__PURE__*/React.createElement(ResponsiveWrapper, _extends({}, currentResponsiveConfig, {
796
+ className: "test-responsive-wrapper-instance scroll-".concat(scrollDirection),
797
+ style: {
798
+ border: '2px solid #e0e0e0',
799
+ borderRadius: '8px',
800
+ padding: '16px',
801
+ backgroundColor: '#fafafa',
802
+ position: 'relative',
803
+ maxHeight: maxHeight === 'auto' ? 'none' : "".concat(maxHeight, "px"),
804
+ overflowY: scrollDirection === 'vertical' ? maxHeight === 'auto' ? 'visible' : 'auto' : 'hidden',
805
+ overflowX: scrollDirection === 'horizontal' ? 'auto' : 'hidden',
806
+ maxWidth: scrollDirection === 'horizontal' ? '100%' : 'none'
807
+ }
808
+ })), loading && /*#__PURE__*/React.createElement("div", {
809
+ className: "loading-overlay"
810
+ }, /*#__PURE__*/React.createElement("div", {
811
+ className: "loading-spinner"
812
+ }, "\u52A0\u8F7D\u4E2D...")), maxHeight !== 'auto' && /*#__PURE__*/React.createElement("div", {
813
+ className: "height-indicator"
814
+ }, /*#__PURE__*/React.createElement("small", null, "\uD83D\uDCCF \u5217\u8868\u6700\u5927\u9AD8\u5EA6: ", maxHeight, "px"))));
815
+ };
816
+ export default TestResponsiveWrapper;