@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,102 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useState, useEffect } from 'react';
8
+ /**
9
+ * 设备检测Hook
10
+ * 根据屏幕宽度和用户代理判断当前设备类型
11
+ */
12
+ export var useDevice = function useDevice() {
13
+ var _useState = useState(function () {
14
+ // 初始化时的默认值
15
+ var initialWidth = typeof window !== 'undefined' ? window.innerWidth : 1920;
16
+ var initialHeight = typeof window !== 'undefined' ? window.innerHeight : 1080;
17
+ var initialType = getDeviceType(initialWidth);
18
+ return {
19
+ type: initialType,
20
+ isMobile: initialType === 'mobile',
21
+ isPad: initialType === 'pad',
22
+ isPc: initialType === 'pc',
23
+ width: initialWidth,
24
+ height: initialHeight
25
+ };
26
+ }),
27
+ _useState2 = _slicedToArray(_useState, 2),
28
+ deviceInfo = _useState2[0],
29
+ setDeviceInfo = _useState2[1];
30
+ useEffect(function () {
31
+ var handleResize = function handleResize() {
32
+ var width = window.innerWidth;
33
+ var height = window.innerHeight;
34
+ var type = getDeviceType(width);
35
+ setDeviceInfo({
36
+ type: type,
37
+ isMobile: type === 'mobile',
38
+ isPad: type === 'pad',
39
+ isPc: type === 'pc',
40
+ width: width,
41
+ height: height
42
+ });
43
+ };
44
+
45
+ // 初次加载时检测一次
46
+ handleResize();
47
+
48
+ // 监听窗口尺寸变化
49
+ window.addEventListener('resize', handleResize);
50
+
51
+ // 清理监听器
52
+ return function () {
53
+ window.removeEventListener('resize', handleResize);
54
+ };
55
+ }, []);
56
+ return deviceInfo;
57
+ };
58
+
59
+ /**
60
+ * 根据屏幕宽度判断设备类型
61
+ * @param width 屏幕宽度
62
+ * @returns 设备类型
63
+ */
64
+ function getDeviceType(width) {
65
+ // 移动端:小于 768px
66
+ if (width < 768) {
67
+ return 'mobile';
68
+ }
69
+ // 平板:768px - 1200px
70
+ else if (width < 1200) {
71
+ return 'pad';
72
+ }
73
+ // PC端:大于等于 1200px
74
+ else {
75
+ return 'pc';
76
+ }
77
+ }
78
+
79
+ /**
80
+ * 获取用户代理信息
81
+ * @returns 用户代理相关信息
82
+ */
83
+ export var getUserAgentInfo = function getUserAgentInfo() {
84
+ if (typeof window === 'undefined' || !window.navigator) {
85
+ return {
86
+ isMobileUA: false,
87
+ isTabletUA: false,
88
+ isDesktopUA: true,
89
+ userAgent: ''
90
+ };
91
+ }
92
+ var userAgent = window.navigator.userAgent.toLowerCase();
93
+ var isMobileUA = /mobile|android|iphone|ipod|phone/.test(userAgent);
94
+ var isTabletUA = /tablet|ipad/.test(userAgent) && !isMobileUA;
95
+ var isDesktopUA = !isMobileUA && !isTabletUA;
96
+ return {
97
+ isMobileUA: isMobileUA,
98
+ isTabletUA: isTabletUA,
99
+ isDesktopUA: isDesktopUA,
100
+ userAgent: userAgent
101
+ };
102
+ };
@@ -0,0 +1,176 @@
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ 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."); }
4
+ 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); }
5
+ 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; }
6
+ 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; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ 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; }
9
+ 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; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ 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); }
13
+ import { useReducer, useCallback } from 'react';
14
+
15
+ // 状态接口
16
+
17
+ // 动作类型
18
+
19
+ // reducer函数
20
+ function listStateReducer(state, action) {
21
+ switch (action.type) {
22
+ case 'SET_ACTIVE_TAB':
23
+ return _objectSpread(_objectSpread({}, state), {}, {
24
+ activeTab: action.payload
25
+ });
26
+ case 'SET_CURRENT_PAGE':
27
+ return _objectSpread(_objectSpread({}, state), {}, {
28
+ currentPage: action.payload
29
+ });
30
+ case 'SET_STICKY_ACTIVE':
31
+ return _objectSpread(_objectSpread({}, state), {}, {
32
+ isStickyActive: action.payload
33
+ });
34
+ case 'RESET_PAGE':
35
+ return _objectSpread(_objectSpread({}, state), {}, {
36
+ currentPage: 1
37
+ });
38
+ default:
39
+ return state;
40
+ }
41
+ }
42
+
43
+ // Hook参数接口
44
+
45
+ // Hook返回值接口
46
+
47
+ export var useListState = function useListState(_ref) {
48
+ var externalCurrentPage = _ref.externalCurrentPage,
49
+ tabItems = _ref.tabItems,
50
+ defaultPageSize = _ref.defaultPageSize,
51
+ onLoadData = _ref.onLoadData;
52
+ // 初始状态
53
+ var initialState = {
54
+ activeTab: tabItems.length > 0 ? tabItems[0].key : 'all',
55
+ currentPage: 1,
56
+ isStickyActive: false
57
+ };
58
+ var _useReducer = useReducer(listStateReducer, initialState),
59
+ _useReducer2 = _slicedToArray(_useReducer, 2),
60
+ state = _useReducer2[0],
61
+ dispatch = _useReducer2[1];
62
+
63
+ // 计算实际使用的当前页码
64
+ var actualCurrentPage = externalCurrentPage || state.currentPage;
65
+
66
+ // 状态更新函数
67
+ var setActiveTab = useCallback(function (tab) {
68
+ dispatch({
69
+ type: 'SET_ACTIVE_TAB',
70
+ payload: tab
71
+ });
72
+ }, []);
73
+ var setCurrentPage = useCallback(function (page) {
74
+ dispatch({
75
+ type: 'SET_CURRENT_PAGE',
76
+ payload: page
77
+ });
78
+ }, []);
79
+ var setStickyActive = useCallback(function (active) {
80
+ dispatch({
81
+ type: 'SET_STICKY_ACTIVE',
82
+ payload: active
83
+ });
84
+ }, []);
85
+ var resetPage = useCallback(function () {
86
+ dispatch({
87
+ type: 'RESET_PAGE'
88
+ });
89
+ }, []);
90
+
91
+ // 统一的数据加载函数
92
+ var loadData = useCallback(function (params) {
93
+ onLoadData === null || onLoadData === void 0 || onLoadData(params);
94
+ }, [onLoadData]);
95
+
96
+ // 业务逻辑函数
97
+ var handleTabChange = useCallback(function (key) {
98
+ setActiveTab(key);
99
+ resetPage();
100
+ loadData({
101
+ trigger: 'tabChange',
102
+ currentPage: 1,
103
+ pageSize: defaultPageSize,
104
+ activeTab: key
105
+ });
106
+ }, [setActiveTab, resetPage, loadData, defaultPageSize]);
107
+ var handlePageChange = useCallback(function (page, size) {
108
+ var previousPage = actualCurrentPage;
109
+ var pageSize = size || defaultPageSize;
110
+ setCurrentPage(page);
111
+ loadData({
112
+ trigger: 'pagination',
113
+ currentPage: page,
114
+ pageSize: pageSize,
115
+ activeTab: state.activeTab,
116
+ previousPage: previousPage
117
+ });
118
+ }, [actualCurrentPage, defaultPageSize, setCurrentPage, loadData, state.activeTab]);
119
+ var handleShowSizeChange = useCallback(function (current, size) {
120
+ var previousPageSize = defaultPageSize;
121
+ setCurrentPage(current);
122
+ loadData({
123
+ trigger: 'pageSize',
124
+ currentPage: current,
125
+ pageSize: size,
126
+ activeTab: state.activeTab,
127
+ previousPageSize: previousPageSize
128
+ });
129
+ }, [defaultPageSize, setCurrentPage, loadData, state.activeTab]);
130
+ var handleLoadMore = useCallback(function () {
131
+ var nextPage = actualCurrentPage + 1;
132
+ setCurrentPage(nextPage);
133
+ loadData({
134
+ trigger: 'loadMore',
135
+ currentPage: nextPage,
136
+ pageSize: defaultPageSize,
137
+ activeTab: state.activeTab
138
+ });
139
+ }, [actualCurrentPage, setCurrentPage, loadData, defaultPageSize, state.activeTab]);
140
+ var handleViewLess = useCallback(function () {
141
+ resetPage();
142
+ loadData({
143
+ trigger: 'pagination',
144
+ currentPage: 1,
145
+ pageSize: defaultPageSize,
146
+ activeTab: state.activeTab,
147
+ previousPage: actualCurrentPage
148
+ });
149
+ }, [resetPage, loadData, defaultPageSize, state.activeTab, actualCurrentPage]);
150
+
151
+ // 处理滚动加载
152
+ var handleScrollLoad = useCallback(function () {
153
+ var nextPage = actualCurrentPage + 1;
154
+ setCurrentPage(nextPage);
155
+ loadData({
156
+ trigger: 'scroll',
157
+ currentPage: nextPage,
158
+ pageSize: defaultPageSize,
159
+ activeTab: state.activeTab
160
+ });
161
+ }, [actualCurrentPage, setCurrentPage, loadData, defaultPageSize, state.activeTab]);
162
+ return {
163
+ state: state,
164
+ setActiveTab: setActiveTab,
165
+ setCurrentPage: setCurrentPage,
166
+ setStickyActive: setStickyActive,
167
+ resetPage: resetPage,
168
+ handleTabChange: handleTabChange,
169
+ handlePageChange: handlePageChange,
170
+ handleShowSizeChange: handleShowSizeChange,
171
+ handleLoadMore: handleLoadMore,
172
+ handleViewLess: handleViewLess,
173
+ handleScrollLoad: handleScrollLoad,
174
+ actualCurrentPage: actualCurrentPage
175
+ };
176
+ };
@@ -0,0 +1,161 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ 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."); }
3
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
4
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ 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."); }
7
+ 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); }
8
+ 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; }
9
+ 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; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import { useState, useEffect, useRef, useMemo, useCallback } from 'react';
12
+ export var useWaterfall = function useWaterfall(items, options) {
13
+ // 用于强制重新计算的版本号
14
+ var _useState = useState(0),
15
+ _useState2 = _slicedToArray(_useState, 2),
16
+ recalcVersion = _useState2[0],
17
+ setRecalcVersion = _useState2[1];
18
+
19
+ // 分别存储高度和宽度
20
+ var itemSizes = useRef(new Map());
21
+ var itemRefs = useRef(new Map());
22
+
23
+ // 注册元素引用的函数
24
+ var registerItemRef = useCallback(function (id, element) {
25
+ if (element) {
26
+ itemRefs.current.set(id, element);
27
+ } else {
28
+ itemRefs.current.delete(id);
29
+ }
30
+ }, []);
31
+
32
+ // 测量元素尺寸(高度和宽度)
33
+ var measureItemSize = useCallback(function (id) {
34
+ var element = itemRefs.current.get(id);
35
+ if (element) {
36
+ var rect = element.getBoundingClientRect();
37
+ var size = {
38
+ width: rect.width,
39
+ height: rect.height
40
+ };
41
+ itemSizes.current.set(id, size);
42
+ return size;
43
+ }
44
+ return itemSizes.current.get(id) || {
45
+ width: 200,
46
+ height: 200
47
+ }; // 默认尺寸
48
+ }, []);
49
+
50
+ // 根据direction获取相关尺寸
51
+ var getItemSize = useCallback(function (item) {
52
+ var direction = options.direction;
53
+ if (direction === 'vertical') {
54
+ // 垂直模式:使用高度
55
+ if (item.height) return item.height;
56
+ var measured = itemSizes.current.get(item.id);
57
+ return (measured === null || measured === void 0 ? void 0 : measured.height) || 200;
58
+ } else {
59
+ // 水平模式:使用宽度
60
+ if (item.width) return item.width;
61
+ var _measured = itemSizes.current.get(item.id);
62
+ return (_measured === null || _measured === void 0 ? void 0 : _measured.width) || 200;
63
+ }
64
+ }, [options]);
65
+
66
+ // 直接使用useMemo计算布局,支持垂直和水平两种模式
67
+ var layout = useMemo(function () {
68
+ var trackCount = options.tracks,
69
+ trackGap = options.trackGap,
70
+ itemGap = options.itemGap,
71
+ direction = options.direction;
72
+
73
+ // 初始化轨道(垂直模式为列,水平模式为行)
74
+ var newTracks = Array.from({
75
+ length: trackCount
76
+ }, function () {
77
+ return {
78
+ items: [],
79
+ size: 0
80
+ };
81
+ });
82
+
83
+ // 为每个项目分配到最短的轨道
84
+ items.forEach(function (item) {
85
+ // 找到当前尺寸最小的轨道
86
+ var shortestTrackIndex = newTracks.reduce(function (minIndex, track, index, arr) {
87
+ return track.size < arr[minIndex].size ? index : minIndex;
88
+ }, 0);
89
+ var targetTrack = newTracks[shortestTrackIndex];
90
+
91
+ // 获取项目在当前方向上的尺寸
92
+ var itemSize = getItemSize(item);
93
+
94
+ // 将项目添加到目标轨道
95
+ targetTrack.items.push(item);
96
+
97
+ // 更新轨道尺寸(如果不是第一个项目,需要加上项目间距)
98
+ if (targetTrack.items.length > 1) {
99
+ targetTrack.size += itemGap;
100
+ }
101
+ targetTrack.size += itemSize;
102
+ });
103
+
104
+ // 计算总尺寸
105
+ var totalSize = Math.max.apply(Math, _toConsumableArray(newTracks.map(function (track) {
106
+ return track.size;
107
+ })).concat([0]));
108
+ return {
109
+ tracks: newTracks,
110
+ totalSize: totalSize
111
+ };
112
+ }, [items, options, recalcVersion, getItemSize]);
113
+
114
+ // 重新计算布局的函数 - 重新测量元素尺寸,然后触发重新计算
115
+ var recalculateLayout = useCallback(function () {
116
+ // 重新测量所有已注册的元素尺寸
117
+ var hasChanges = false;
118
+ itemRefs.current.forEach(function (element, id) {
119
+ var rect = element.getBoundingClientRect();
120
+ var newSize = {
121
+ width: rect.width,
122
+ height: rect.height
123
+ };
124
+ var oldSize = itemSizes.current.get(id);
125
+ if (!oldSize || oldSize.width !== newSize.width || oldSize.height !== newSize.height) {
126
+ hasChanges = true;
127
+ itemSizes.current.set(id, newSize);
128
+ }
129
+ });
130
+
131
+ // 如果有变化,更新版本号来触发重新计算
132
+ if (hasChanges) {
133
+ setRecalcVersion(function (prev) {
134
+ return prev + 1;
135
+ });
136
+ }
137
+ }, []);
138
+
139
+ // 监听窗口大小变化,重新计算布局
140
+ useEffect(function () {
141
+ var timeoutId;
142
+ var handleResize = function handleResize() {
143
+ clearTimeout(timeoutId);
144
+ timeoutId = setTimeout(function () {
145
+ recalculateLayout();
146
+ }, 100);
147
+ };
148
+ window.addEventListener('resize', handleResize);
149
+ return function () {
150
+ window.removeEventListener('resize', handleResize);
151
+ clearTimeout(timeoutId);
152
+ };
153
+ }, [recalculateLayout]);
154
+ return {
155
+ layout: layout,
156
+ registerItemRef: registerItemRef,
157
+ measureItemSize: measureItemSize,
158
+ recalculateLayout: recalculateLayout
159
+ };
160
+ };
161
+ export default useWaterfall;
@@ -0,0 +1,7 @@
1
+ export { default } from "./List";
2
+ export { default as ResponsiveList, createResponsiveConfig } from "./ResponsiveWrapper";
3
+ export { default as TestResponsiveWrapper } from "./TestResponsiveWrapper";
4
+ export { default as Pagination } from "./components/Pagination";
5
+ export { default as Tab } from "./components/Tab";
6
+ export { useDevice, getUserAgentInfo } from "./hooks/useDevice";
7
+ export { default as TestList } from "./TestResponsiveWrapper";
@@ -0,0 +1,107 @@
1
+ export default {
2
+ "en": {
3
+ // Tab related
4
+ 'pisell-list-tab-group-default': 'Field',
5
+ // Empty state
6
+ 'pisell-list-empty-text-default': 'No data available',
7
+ // Load more actions
8
+ 'pisell-list-load-more': 'Load More',
9
+ 'pisell-list-view-less': 'View Less',
10
+ // Pagination
11
+ 'pisell-list-pagination-total': function pisellListPaginationTotal(start, end, total) {
12
+ return "Showing ".concat(start, "-").concat(end, " of ").concat(total, " items");
13
+ },
14
+ 'pisell-list-pagination-total-fallback': function pisellListPaginationTotalFallback(start, end, total) {
15
+ return "Showing ".concat(start, "-").concat(end, " of ").concat(total, " items");
16
+ },
17
+ 'pisell-list-pagination-page-of': function pisellListPaginationPageOf(current, total) {
18
+ return "Page ".concat(current, " of ").concat(total);
19
+ },
20
+ 'pisell-list-pagination-previous': 'Previous',
21
+ 'pisell-list-pagination-next': 'Next',
22
+ // Scroll actions
23
+ 'pisell-list-scroll-down': 'Scroll Down',
24
+ 'pisell-list-scroll-right': 'Scroll Right',
25
+ 'pisell-list-scroll-to-bottom': 'Scroll to bottom and load more',
26
+ 'pisell-list-scroll-to-end': 'Scroll to end and load more',
27
+ // Loading states
28
+ 'pisell-list-loading': 'Loading...',
29
+ 'pisell-list-loading-more': 'Loading more...',
30
+ 'pisell-list-no-more-data': 'No more data',
31
+ // Group titles
32
+ 'pisell-list-group-title-all': 'All',
33
+ // Error states
34
+ 'pisell-list-load-error': 'Failed to load data',
35
+ 'pisell-list-retry': 'Retry'
36
+ },
37
+ 'zh-CN': {
38
+ // Tab related
39
+ 'pisell-list-tab-group-default': '字段',
40
+ // Empty state
41
+ 'pisell-list-empty-text-default': '暂无数据',
42
+ // Load more actions
43
+ 'pisell-list-load-more': '查看更多',
44
+ 'pisell-list-view-less': '查看更少',
45
+ // Pagination
46
+ 'pisell-list-pagination-total': function pisellListPaginationTotal(start, end, total) {
47
+ return "\u663E\u793A\u7B2C ".concat(start, "-").concat(end, " \u6761\uFF0C\u5171 ").concat(total, " \u6761");
48
+ },
49
+ 'pisell-list-pagination-total-fallback': function pisellListPaginationTotalFallback(start, end, total) {
50
+ return "\u663E\u793A\u7B2C ".concat(start, "-").concat(end, " \u6761\uFF0C\u5171 ").concat(total, " \u6761");
51
+ },
52
+ 'pisell-list-pagination-page-of': function pisellListPaginationPageOf(current, total) {
53
+ return "\u7B2C ".concat(current, " \u9875\uFF0C\u5171 ").concat(total, " \u9875");
54
+ },
55
+ 'pisell-list-pagination-previous': '上一页',
56
+ 'pisell-list-pagination-next': '下一页',
57
+ // Scroll actions
58
+ 'pisell-list-scroll-down': '向下滚动',
59
+ 'pisell-list-scroll-right': '向右滚动',
60
+ 'pisell-list-scroll-to-bottom': '滚动到底部并加载更多',
61
+ 'pisell-list-scroll-to-end': '滚动到末尾并加载更多',
62
+ // Loading states
63
+ 'pisell-list-loading': '加载中...',
64
+ 'pisell-list-loading-more': '加载更多中...',
65
+ 'pisell-list-no-more-data': '没有更多数据了',
66
+ // Group titles
67
+ 'pisell-list-group-title-all': '全部',
68
+ // Error states
69
+ 'pisell-list-load-error': '数据加载失败',
70
+ 'pisell-list-retry': '重试'
71
+ },
72
+ 'zh-HK': {
73
+ // Tab related
74
+ 'pisell-list-tab-group-default': '字段',
75
+ // Empty state
76
+ 'pisell-list-empty-text-default': '暫無數據',
77
+ // Load more actions
78
+ 'pisell-list-load-more': '查看更多',
79
+ 'pisell-list-view-less': '查看更少',
80
+ // Pagination
81
+ 'pisell-list-pagination-total': function pisellListPaginationTotal(start, end, total) {
82
+ return "\u986F\u793A\u7B2C ".concat(start, "-").concat(end, " \u689D\uFF0C\u5171 ").concat(total, " \u689D");
83
+ },
84
+ 'pisell-list-pagination-total-fallback': function pisellListPaginationTotalFallback(start, end, total) {
85
+ return "\u986F\u793A\u7B2C ".concat(start, "-").concat(end, " \u689D\uFF0C\u5171 ").concat(total, " \u689D");
86
+ },
87
+ 'pisell-list-pagination-page-of': function pisellListPaginationPageOf(current, total) {
88
+ return "\u7B2C ".concat(current, " \u9801\uFF0C\u5171 ").concat(total, " \u9801");
89
+ },
90
+ 'pisell-list-pagination-previous': '上一頁',
91
+ 'pisell-list-pagination-next': '下一頁',
92
+ // Scroll actions
93
+ 'pisell-list-scroll-down': '向下滾動',
94
+ 'pisell-list-scroll-right': '向右滾動',
95
+ 'pisell-list-scroll-to-bottom': '滾動到底部並加載更多',
96
+ 'pisell-list-scroll-to-end': '滾動到末尾並加載更多',
97
+ // Loading states
98
+ 'pisell-list-loading': '加載中...',
99
+ 'pisell-list-loading-more': '加載更多中...',
100
+ 'pisell-list-no-more-data': '沒有更多數據了',
101
+ // Group titles
102
+ 'pisell-list-group-title-all': '全部',
103
+ // Error states
104
+ 'pisell-list-load-error': '數據加載失敗',
105
+ 'pisell-list-retry': '重試'
106
+ }
107
+ };
@@ -0,0 +1,39 @@
1
+ /* List 组件基础样式 */
2
+ @import './header.less';
3
+ @import './content.less';
4
+ @import './footer.less';
5
+ @import './floatButton.less';
6
+ @import './responsive.less';
7
+ @import '../components/Pagination/Pagination.less';
8
+
9
+ /* 主容器样式 */
10
+ .pisell-list {
11
+ display: flex;
12
+ flex-direction: column;
13
+ background: #f8f9fa;
14
+ border-radius: 8px;
15
+ overflow: hidden;
16
+
17
+ /* 垂直排版的特殊滚动处理 */
18
+ &.pisell-list-vertical {
19
+ .list-content {
20
+ /* 默认禁用内容区域的独立滚动,让容器级别滚动 */
21
+ &:not(.list-content-scroll) {
22
+ overflow-y: visible;
23
+ }
24
+
25
+ /* scroll模式下仍需要内容区域滚动 */
26
+ &.list-content-scroll {
27
+ overflow-y: auto;
28
+ }
29
+ }
30
+ }
31
+
32
+ /* 当启用sticky时的额外样式 */
33
+ &.pisell-list-sticky-enabled {
34
+ /* sticky相关的额外处理可以在这里添加 */
35
+ position: relative;
36
+ }
37
+
38
+ /* 空状态样式已移至 EmptyState 组件 */
39
+ }