@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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/actionButtons/index.js +15 -9
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/voucher/index.js +23 -19
- package/es/components/booking/forms/footer.js +4 -13
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/index.js +7 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +17 -12
- package/es/components/checkout/components/CashPaymentModule/index.js +9 -9
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +40 -22
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/list/List.d.ts +5 -0
- package/es/components/list/List.js +957 -0
- package/es/components/list/List.less +2 -0
- package/es/components/list/ResponsiveWrapper.d.ts +16 -0
- package/es/components/list/ResponsiveWrapper.js +130 -0
- package/es/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/es/components/list/TestResponsiveWrapper.js +816 -0
- package/es/components/list/TestResponsiveWrapper.less +968 -0
- package/es/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/es/components/list/components/EmptyState/EmptyState.js +75 -0
- package/es/components/list/components/EmptyState/EmptyState.less +121 -0
- package/es/components/list/components/EmptyState/index.d.ts +2 -0
- package/es/components/list/components/EmptyState/index.js +1 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/es/components/list/components/ListItemSkeleton/index.js +2 -0
- package/es/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/es/components/list/components/Pagination/Pagination.js +240 -0
- package/es/components/list/components/Pagination/Pagination.less +439 -0
- package/es/components/list/components/Pagination/index.d.ts +1 -0
- package/es/components/list/components/Pagination/index.js +1 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/es/components/list/components/ScrollLoader/index.js +1 -0
- package/es/components/list/components/Tab/Tab.d.ts +5 -0
- package/es/components/list/components/Tab/Tab.js +43 -0
- package/es/components/list/components/Tab/Tab.less +139 -0
- package/es/components/list/components/Tab/index.d.ts +2 -0
- package/es/components/list/components/Tab/index.js +1 -0
- package/es/components/list/components/Tab/types.d.ts +14 -0
- package/es/components/list/components/Tab/types.js +1 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/es/components/list/components/TabSkeleton/index.js +2 -0
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
- package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/es/components/list/components/WaterfallList/index.d.ts +2 -0
- package/es/components/list/components/WaterfallList/index.js +1 -0
- package/es/components/list/examples/GroupedListExample.d.ts +3 -0
- package/es/components/list/examples/GroupedListExample.js +207 -0
- package/es/components/list/hooks/index.d.ts +5 -0
- package/es/components/list/hooks/index.js +3 -0
- package/es/components/list/hooks/useDevice.d.ts +24 -0
- package/es/components/list/hooks/useDevice.js +102 -0
- package/es/components/list/hooks/useListState.d.ts +43 -0
- package/es/components/list/hooks/useListState.js +176 -0
- package/es/components/list/hooks/useWaterfall.d.ts +34 -0
- package/es/components/list/hooks/useWaterfall.js +161 -0
- package/es/components/list/index.d.ts +10 -0
- package/es/components/list/index.js +7 -0
- package/es/components/list/locales.d.ts +66 -0
- package/es/components/list/locales.js +107 -0
- package/es/components/list/styles/base.less +39 -0
- package/es/components/list/styles/content.less +415 -0
- package/es/components/list/styles/floatButton.less +107 -0
- package/es/components/list/styles/footer.less +49 -0
- package/es/components/list/styles/header.less +69 -0
- package/es/components/list/styles/responsive.less +166 -0
- package/es/components/list/types.d.ts +177 -0
- package/es/components/list/types.js +1 -0
- package/es/components/list/utils/getText.d.ts +53 -0
- package/es/components/list/utils/getText.js +150 -0
- package/es/components/list/utils/index.d.ts +4 -0
- package/es/components/list/utils/index.js +5 -0
- package/es/components/pay/toB/store/hooks.js +19 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +32 -10
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/es/components/ticketBooking/components/menuBar/index.js +40 -17
- package/es/components/ticketBooking/components/menuBar/index.less +27 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +20 -10
- package/es/components/ticketBooking/components/timeBar/index.less +1 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -0
- package/es/components/ticketBooking/context/index.js +2 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
- package/es/components/ticketBooking/index.d.ts +6 -0
- package/es/components/ticketBooking/index.js +86 -12
- package/es/components/ticketBooking/utils/index.d.ts +28 -1
- package/es/components/ticketBooking/utils/index.js +40 -0
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +20 -10
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/actionButtons/index.js +22 -17
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/voucher/index.js +33 -40
- package/lib/components/booking/forms/footer.js +7 -13
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/index.js +7 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +15 -12
- package/lib/components/checkout/components/CashPaymentModule/index.js +0 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +61 -46
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/list/List.d.ts +5 -0
- package/lib/components/list/List.js +771 -0
- package/lib/components/list/List.less +2 -0
- package/lib/components/list/ResponsiveWrapper.d.ts +16 -0
- package/lib/components/list/ResponsiveWrapper.js +145 -0
- package/lib/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/lib/components/list/TestResponsiveWrapper.js +493 -0
- package/lib/components/list/TestResponsiveWrapper.less +968 -0
- package/lib/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
- package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
- package/lib/components/list/components/EmptyState/index.d.ts +2 -0
- package/lib/components/list/components/EmptyState/index.js +35 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
- package/lib/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/lib/components/list/components/Pagination/Pagination.js +205 -0
- package/lib/components/list/components/Pagination/Pagination.less +439 -0
- package/lib/components/list/components/Pagination/index.d.ts +1 -0
- package/lib/components/list/components/Pagination/index.js +35 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/lib/components/list/components/ScrollLoader/index.js +35 -0
- package/lib/components/list/components/Tab/Tab.d.ts +5 -0
- package/lib/components/list/components/Tab/Tab.js +72 -0
- package/lib/components/list/components/Tab/Tab.less +139 -0
- package/lib/components/list/components/Tab/index.d.ts +2 -0
- package/lib/components/list/components/Tab/index.js +35 -0
- package/lib/components/list/components/Tab/types.d.ts +14 -0
- package/lib/components/list/components/Tab/types.js +17 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/TabSkeleton/index.js +41 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
- package/lib/components/list/components/WaterfallList/index.js +35 -0
- package/lib/components/list/examples/GroupedListExample.d.ts +3 -0
- package/lib/components/list/examples/GroupedListExample.js +210 -0
- package/lib/components/list/hooks/index.d.ts +5 -0
- package/lib/components/list/hooks/index.js +47 -0
- package/lib/components/list/hooks/useDevice.d.ts +24 -0
- package/lib/components/list/hooks/useDevice.js +96 -0
- package/lib/components/list/hooks/useListState.d.ts +43 -0
- package/lib/components/list/hooks/useListState.js +149 -0
- package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
- package/lib/components/list/hooks/useWaterfall.js +124 -0
- package/lib/components/list/index.d.ts +10 -0
- package/lib/components/list/index.js +60 -0
- package/lib/components/list/locales.d.ts +66 -0
- package/lib/components/list/locales.js +113 -0
- package/lib/components/list/styles/base.less +39 -0
- package/lib/components/list/styles/content.less +415 -0
- package/lib/components/list/styles/floatButton.less +107 -0
- package/lib/components/list/styles/footer.less +49 -0
- package/lib/components/list/styles/header.less +69 -0
- package/lib/components/list/styles/responsive.less +166 -0
- package/lib/components/list/types.d.ts +177 -0
- package/lib/components/list/types.js +17 -0
- package/lib/components/list/utils/getText.d.ts +53 -0
- package/lib/components/list/utils/getText.js +95 -0
- package/lib/components/list/utils/index.d.ts +4 -0
- package/lib/components/list/utils/index.js +43 -0
- package/lib/components/pay/toB/store/hooks.js +16 -8
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +36 -10
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
- package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +14 -9
- package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -0
- package/lib/components/ticketBooking/context/index.js +44 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
- package/lib/components/ticketBooking/index.d.ts +6 -0
- package/lib/components/ticketBooking/index.js +69 -7
- package/lib/components/ticketBooking/utils/index.d.ts +28 -1
- package/lib/components/ticketBooking/utils/index.js +45 -2
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +61 -27
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lowcode/sku-card/meta.ts +1812 -0
- package/lowcode/sku-card/snippets.ts +372 -0
- package/lowcode/sku-list/meta.ts +410 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ListProps, ResponsiveConfig, ResponsiveWrapperProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* ResponsiveWrapper 响应式包装器组件
|
|
5
|
+
* 根据不同设备类型自动选择合适的配置
|
|
6
|
+
*/
|
|
7
|
+
declare const ResponsiveWrapper: React.FC<ResponsiveWrapperProps>;
|
|
8
|
+
/**
|
|
9
|
+
* 用于创建响应式配置的工具函数
|
|
10
|
+
*/
|
|
11
|
+
export declare const createResponsiveConfig: (overrides?: {
|
|
12
|
+
pc?: Partial<ListProps>;
|
|
13
|
+
pad?: Partial<ListProps>;
|
|
14
|
+
mobile?: Partial<ListProps>;
|
|
15
|
+
}) => ResponsiveConfig;
|
|
16
|
+
export default ResponsiveWrapper;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/list/ResponsiveWrapper.tsx
|
|
30
|
+
var ResponsiveWrapper_exports = {};
|
|
31
|
+
__export(ResponsiveWrapper_exports, {
|
|
32
|
+
createResponsiveConfig: () => createResponsiveConfig,
|
|
33
|
+
default: () => ResponsiveWrapper_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(ResponsiveWrapper_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_List = __toESM(require("./List"));
|
|
38
|
+
var import_useDevice = require("./hooks/useDevice");
|
|
39
|
+
var ResponsiveWrapper = (props) => {
|
|
40
|
+
const { responsive, children, ...listProps } = props;
|
|
41
|
+
const deviceInfo = (0, import_useDevice.useDevice)();
|
|
42
|
+
console.log("deviceInfo", deviceInfo);
|
|
43
|
+
const finalProps = (0, import_react.useMemo)(() => {
|
|
44
|
+
if (!responsive) {
|
|
45
|
+
const classNames2 = [
|
|
46
|
+
listProps.className,
|
|
47
|
+
`list-device-${deviceInfo.type}`
|
|
48
|
+
// 添加设备类型类名
|
|
49
|
+
].filter(Boolean).join(" ");
|
|
50
|
+
return {
|
|
51
|
+
...listProps,
|
|
52
|
+
className: classNames2
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const { pc, pad, mobile } = responsive;
|
|
56
|
+
let deviceSpecificProps = {};
|
|
57
|
+
switch (deviceInfo.type) {
|
|
58
|
+
case "mobile":
|
|
59
|
+
deviceSpecificProps = mobile || {};
|
|
60
|
+
break;
|
|
61
|
+
case "pad":
|
|
62
|
+
deviceSpecificProps = pad || {};
|
|
63
|
+
break;
|
|
64
|
+
case "pc":
|
|
65
|
+
deviceSpecificProps = pc || {};
|
|
66
|
+
break;
|
|
67
|
+
default:
|
|
68
|
+
deviceSpecificProps = {};
|
|
69
|
+
}
|
|
70
|
+
const mergedProps = {
|
|
71
|
+
...listProps,
|
|
72
|
+
...deviceSpecificProps
|
|
73
|
+
};
|
|
74
|
+
const classNames = [
|
|
75
|
+
mergedProps.className,
|
|
76
|
+
`list-device-${deviceInfo.type}`
|
|
77
|
+
// 添加设备类型类名
|
|
78
|
+
].filter(Boolean).join(" ");
|
|
79
|
+
return {
|
|
80
|
+
...mergedProps,
|
|
81
|
+
className: classNames
|
|
82
|
+
};
|
|
83
|
+
}, [responsive, deviceInfo.type, listProps]);
|
|
84
|
+
const optimizedProps = (0, import_react.useMemo)(() => {
|
|
85
|
+
const props2 = { ...finalProps };
|
|
86
|
+
switch (deviceInfo.type) {
|
|
87
|
+
case "mobile":
|
|
88
|
+
return {
|
|
89
|
+
...props2,
|
|
90
|
+
// 移动端默认使用垂直布局
|
|
91
|
+
layoutDirection: props2.layoutDirection || "vertical",
|
|
92
|
+
// 移动端默认单列显示
|
|
93
|
+
columns: props2.columns ?? 1,
|
|
94
|
+
// 移动端减少间距
|
|
95
|
+
columnGap: props2.columnGap ?? 8,
|
|
96
|
+
rowGap: props2.rowGap ?? 8,
|
|
97
|
+
// 移动端适合滚动加载
|
|
98
|
+
paginationType: props2.paginationType || "scroll",
|
|
99
|
+
// 移动端默认较小的页面大小
|
|
100
|
+
defaultPageSize: props2.defaultPageSize ?? 10
|
|
101
|
+
};
|
|
102
|
+
case "pad":
|
|
103
|
+
return {
|
|
104
|
+
...props2,
|
|
105
|
+
// 平板端可以使用2列
|
|
106
|
+
columns: props2.columns ?? 2,
|
|
107
|
+
// 平板端适中的间距
|
|
108
|
+
columnGap: props2.columnGap ?? 12,
|
|
109
|
+
rowGap: props2.rowGap ?? 12,
|
|
110
|
+
// 平板端适合分页或滚动加载
|
|
111
|
+
paginationType: props2.paginationType || "more",
|
|
112
|
+
// 平板端中等的页面大小
|
|
113
|
+
defaultPageSize: props2.defaultPageSize ?? 12
|
|
114
|
+
};
|
|
115
|
+
case "pc":
|
|
116
|
+
return {
|
|
117
|
+
...props2,
|
|
118
|
+
// PC端可以使用更多列
|
|
119
|
+
columns: props2.columns ?? 3,
|
|
120
|
+
// PC端较大的间距
|
|
121
|
+
columnGap: props2.columnGap ?? 16,
|
|
122
|
+
rowGap: props2.rowGap ?? 16,
|
|
123
|
+
// PC端适合传统分页
|
|
124
|
+
paginationType: props2.paginationType || "pager",
|
|
125
|
+
// PC端较大的页面大小
|
|
126
|
+
defaultPageSize: props2.defaultPageSize ?? 15
|
|
127
|
+
};
|
|
128
|
+
default:
|
|
129
|
+
return props2;
|
|
130
|
+
}
|
|
131
|
+
}, [finalProps, deviceInfo.type]);
|
|
132
|
+
return /* @__PURE__ */ import_react.default.createElement(import_List.default, { ...optimizedProps }, children);
|
|
133
|
+
};
|
|
134
|
+
var createResponsiveConfig = (overrides) => {
|
|
135
|
+
return {
|
|
136
|
+
pc: overrides == null ? void 0 : overrides.pc,
|
|
137
|
+
pad: overrides == null ? void 0 : overrides.pad,
|
|
138
|
+
mobile: overrides == null ? void 0 : overrides.mobile
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
var ResponsiveWrapper_default = ResponsiveWrapper;
|
|
142
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
143
|
+
0 && (module.exports = {
|
|
144
|
+
createResponsiveConfig
|
|
145
|
+
});
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/list/TestResponsiveWrapper.tsx
|
|
30
|
+
var TestResponsiveWrapper_exports = {};
|
|
31
|
+
__export(TestResponsiveWrapper_exports, {
|
|
32
|
+
default: () => TestResponsiveWrapper_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(TestResponsiveWrapper_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_ResponsiveWrapper = __toESM(require("./ResponsiveWrapper"));
|
|
37
|
+
var import_TestResponsiveWrapper = require("./TestResponsiveWrapper.less");
|
|
38
|
+
var generateTestDataWithId = (count, category, startId = 1) => {
|
|
39
|
+
const categories = ["电子产品", "服装配饰", "家居用品", "运动户外", "美妆护肤"];
|
|
40
|
+
const statuses = ["active", "inactive", "pending"];
|
|
41
|
+
const productNames = {
|
|
42
|
+
"电子产品": ["智能手机", "蓝牙耳机", "平板电脑", "智能手表", "充电器", "数据线", "移动电源", "音响"],
|
|
43
|
+
"服装配饰": ["休闲外套", "牛仔裤", "连衣裙", "运动鞋", "手提包", "围巾", "帽子", "T恤"],
|
|
44
|
+
"家居用品": ["咖啡杯", "床上用品", "收纳盒", "台灯", "花瓶", "地毯", "抱枕", "装饰画"],
|
|
45
|
+
"运动户外": ["运动鞋", "瑜伽垫", "哑铃", "背包", "帐篷", "水杯", "护膝", "跑步腰包"],
|
|
46
|
+
"美妆护肤": ["面膜", "口红", "防晒霜", "洗面奶", "精华液", "粉底液", "眼影", "香水"]
|
|
47
|
+
};
|
|
48
|
+
return Array.from({ length: count }, (_, index) => {
|
|
49
|
+
const targetCategory = category && category !== "all" ? category : categories[Math.floor(Math.random() * categories.length)];
|
|
50
|
+
const categoryProducts = productNames[targetCategory] || productNames["电子产品"];
|
|
51
|
+
const productName = categoryProducts[Math.floor(Math.random() * categoryProducts.length)];
|
|
52
|
+
const itemId = startId + index;
|
|
53
|
+
return {
|
|
54
|
+
id: itemId,
|
|
55
|
+
title: `${productName} - 型号${String(itemId).padStart(4, "0")}`,
|
|
56
|
+
description: `${productName}的详细介绍:采用优质材料制作,设计精美,功能实用。适合日常使用,性价比极高。编号:${String(itemId).padStart(6, "0")}`,
|
|
57
|
+
category: targetCategory,
|
|
58
|
+
height: Math.random() * 250 + 120,
|
|
59
|
+
// 稍微增加高度变化范围
|
|
60
|
+
price: Math.round(Math.random() * 2e3 + 50),
|
|
61
|
+
// 增加价格范围
|
|
62
|
+
status: statuses[Math.floor(Math.random() * statuses.length)],
|
|
63
|
+
createdAt: new Date(Date.now() - Math.random() * 60 * 24 * 60 * 60 * 1e3)
|
|
64
|
+
// 最近60天内的随机日期
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var CATEGORIES = [
|
|
69
|
+
{ key: "电子产品", label: "电子产品", total: 150 },
|
|
70
|
+
{ key: "服装配饰", label: "服装配饰", total: 125 },
|
|
71
|
+
{ key: "家居用品", label: "家居用品", total: 100 },
|
|
72
|
+
{ key: "运动户外", label: "运动户外", total: 75 },
|
|
73
|
+
{ key: "美妆护肤", label: "美妆护肤", total: 50 }
|
|
74
|
+
];
|
|
75
|
+
var generateSimpleTabItems = (tabStyle, data = []) => {
|
|
76
|
+
if (tabStyle === "switch") {
|
|
77
|
+
const tabs = [
|
|
78
|
+
{ key: "all", label: "全部" }
|
|
79
|
+
];
|
|
80
|
+
CATEGORIES.forEach((category) => {
|
|
81
|
+
tabs.push({
|
|
82
|
+
key: category.key,
|
|
83
|
+
label: category.label,
|
|
84
|
+
group: category.key
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
return tabs;
|
|
88
|
+
} else {
|
|
89
|
+
const categoryCount = data.reduce((acc, item) => {
|
|
90
|
+
acc[item.category] = (acc[item.category] || 0) + 1;
|
|
91
|
+
return acc;
|
|
92
|
+
}, {});
|
|
93
|
+
const statusCount = data.reduce((acc, item) => {
|
|
94
|
+
acc[item.status] = (acc[item.status] || 0) + 1;
|
|
95
|
+
return acc;
|
|
96
|
+
}, {});
|
|
97
|
+
const priceRangeCount = data.reduce((acc, item) => {
|
|
98
|
+
const price = item.price || 0;
|
|
99
|
+
let range = "";
|
|
100
|
+
if (price < 100) range = "100元以下";
|
|
101
|
+
else if (price < 500) range = "100-500元";
|
|
102
|
+
else if (price < 1e3) range = "500-1000元";
|
|
103
|
+
else range = "1000元以上";
|
|
104
|
+
acc[range] = (acc[range] || 0) + 1;
|
|
105
|
+
return acc;
|
|
106
|
+
}, {});
|
|
107
|
+
const tabs = [
|
|
108
|
+
{ key: "all", label: `全部 (${data.length})` }
|
|
109
|
+
];
|
|
110
|
+
Object.entries(categoryCount).forEach(([category, count]) => {
|
|
111
|
+
tabs.push({
|
|
112
|
+
key: `category-${category}`,
|
|
113
|
+
label: `${category} (${count})`,
|
|
114
|
+
group: category
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
const statusLabels = {
|
|
118
|
+
"active": "正常",
|
|
119
|
+
"inactive": "停用",
|
|
120
|
+
"pending": "待审核"
|
|
121
|
+
};
|
|
122
|
+
Object.entries(statusCount).forEach(([status, count]) => {
|
|
123
|
+
tabs.push({
|
|
124
|
+
key: `status-${status}`,
|
|
125
|
+
label: `${statusLabels[status]} (${count})`,
|
|
126
|
+
group: status
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
Object.entries(priceRangeCount).forEach(([range, count]) => {
|
|
130
|
+
tabs.push({
|
|
131
|
+
key: `price-${range}`,
|
|
132
|
+
label: `${range} (${count})`,
|
|
133
|
+
group: range
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
return tabs;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var mockApiCall = async (params) => {
|
|
140
|
+
const { pageSize, currentPage, category, delay = 800 } = params;
|
|
141
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
142
|
+
if (Math.random() < 0.05) {
|
|
143
|
+
throw new Error("网络请求失败,请重试");
|
|
144
|
+
}
|
|
145
|
+
const categoryTotals = {
|
|
146
|
+
"电子产品": 150,
|
|
147
|
+
// 30%
|
|
148
|
+
"服装配饰": 125,
|
|
149
|
+
// 25%
|
|
150
|
+
"家居用品": 100,
|
|
151
|
+
// 20%
|
|
152
|
+
"运动户外": 75,
|
|
153
|
+
// 15%
|
|
154
|
+
"美妆护肤": 50
|
|
155
|
+
// 10%
|
|
156
|
+
};
|
|
157
|
+
const totalCount = category && category !== "all" ? categoryTotals[category] || 50 : 500;
|
|
158
|
+
const startId = category && category !== "all" ? Object.entries(categoryTotals).reduce((offset, [cat, count]) => {
|
|
159
|
+
if (cat === category) return offset;
|
|
160
|
+
return offset + count;
|
|
161
|
+
}, 0) + (currentPage - 1) * pageSize + 1 : (currentPage - 1) * pageSize + 1;
|
|
162
|
+
const data = generateTestDataWithId(pageSize, category, startId);
|
|
163
|
+
const hasMore = currentPage * pageSize < totalCount;
|
|
164
|
+
return {
|
|
165
|
+
data,
|
|
166
|
+
total: totalCount,
|
|
167
|
+
hasMore
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
var defaultDynamicConfig = {
|
|
171
|
+
displayStyle: "grid",
|
|
172
|
+
columns: { pc: 4, pad: 3, mobile: 2 },
|
|
173
|
+
columnGap: { pc: 20, pad: 16, mobile: 12 },
|
|
174
|
+
rowGap: { pc: 20, pad: 16, mobile: 12 },
|
|
175
|
+
paginationType: { pc: "pager", pad: "more", mobile: "scroll" },
|
|
176
|
+
defaultPageSize: { pc: 20, pad: 15, mobile: 10 },
|
|
177
|
+
enableTab: false,
|
|
178
|
+
tabStyle: "none",
|
|
179
|
+
stickyTop: false,
|
|
180
|
+
enableEmpty: false
|
|
181
|
+
};
|
|
182
|
+
var presetConfigs = [
|
|
183
|
+
{
|
|
184
|
+
name: "基础网格布局",
|
|
185
|
+
description: "标准的网格布局,适合大数据量内容展示(500条数据)",
|
|
186
|
+
config: {
|
|
187
|
+
displayStyle: "grid",
|
|
188
|
+
columns: { pc: 4, pad: 3, mobile: 2 },
|
|
189
|
+
columnGap: { pc: 20, pad: 16, mobile: 12 },
|
|
190
|
+
rowGap: { pc: 20, pad: 16, mobile: 12 },
|
|
191
|
+
paginationType: { pc: "pager", pad: "pager", mobile: "scroll" },
|
|
192
|
+
defaultPageSize: { pc: 20, pad: 15, mobile: 10 },
|
|
193
|
+
enableTab: false,
|
|
194
|
+
tabStyle: "none",
|
|
195
|
+
stickyTop: false,
|
|
196
|
+
enableEmpty: false
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "切换模式",
|
|
201
|
+
description: "标签切换模式,点击标签会重新加载对应分类的数据",
|
|
202
|
+
config: {
|
|
203
|
+
displayStyle: "grid",
|
|
204
|
+
columns: { pc: 4, pad: 3, mobile: 2 },
|
|
205
|
+
columnGap: { pc: 18, pad: 15, mobile: 12 },
|
|
206
|
+
rowGap: { pc: 18, pad: 15, mobile: 12 },
|
|
207
|
+
paginationType: { pc: "pager", pad: "more", mobile: "scroll" },
|
|
208
|
+
defaultPageSize: { pc: 16, pad: 12, mobile: 8 },
|
|
209
|
+
enableTab: true,
|
|
210
|
+
tabStyle: "switch",
|
|
211
|
+
stickyTop: true,
|
|
212
|
+
enableEmpty: false
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "锚点模式",
|
|
217
|
+
description: "标签锚点模式,显示所有数据并按分类分组,点击标签会跳转到对应分组位置",
|
|
218
|
+
config: {
|
|
219
|
+
displayStyle: "grid",
|
|
220
|
+
columns: { pc: 4, pad: 3, mobile: 2 },
|
|
221
|
+
columnGap: { pc: 18, pad: 15, mobile: 12 },
|
|
222
|
+
rowGap: { pc: 18, pad: 15, mobile: 12 },
|
|
223
|
+
paginationType: { pc: "all", pad: "all", mobile: "all" },
|
|
224
|
+
defaultPageSize: { pc: 500, pad: 500, mobile: 500 },
|
|
225
|
+
enableTab: true,
|
|
226
|
+
tabStyle: "anchor",
|
|
227
|
+
stickyTop: true,
|
|
228
|
+
enableEmpty: false
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
];
|
|
232
|
+
var TestResponsiveWrapper = () => {
|
|
233
|
+
const [activePreset, setActivePreset] = (0, import_react.useState)(0);
|
|
234
|
+
const [simulateDevice, setSimulateDevice] = (0, import_react.useState)(null);
|
|
235
|
+
const [dynamicConfig, setDynamicConfig] = (0, import_react.useState)(defaultDynamicConfig);
|
|
236
|
+
const [isCustomMode, setIsCustomMode] = (0, import_react.useState)(false);
|
|
237
|
+
const [data, setData] = (0, import_react.useState)([]);
|
|
238
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
239
|
+
const [error, setError] = (0, import_react.useState)(null);
|
|
240
|
+
const [currentPage, setCurrentPage] = (0, import_react.useState)(1);
|
|
241
|
+
const [total, setTotal] = (0, import_react.useState)(0);
|
|
242
|
+
const [activeTab, setActiveTab] = (0, import_react.useState)("all");
|
|
243
|
+
const [currentPaginationType, setCurrentPaginationType] = (0, import_react.useState)("pager");
|
|
244
|
+
const [maxHeight, setMaxHeight] = (0, import_react.useState)(600);
|
|
245
|
+
const [scrollDirection, setScrollDirection] = (0, import_react.useState)("vertical");
|
|
246
|
+
const loadData = (0, import_react.useCallback)(async (params) => {
|
|
247
|
+
setLoading(true);
|
|
248
|
+
setError(null);
|
|
249
|
+
try {
|
|
250
|
+
const response = await mockApiCall({
|
|
251
|
+
currentPage: params.currentPage,
|
|
252
|
+
pageSize: params.pageSize,
|
|
253
|
+
category: params.activeTab === "all" ? void 0 : params.activeTab
|
|
254
|
+
});
|
|
255
|
+
if (params.trigger === "loadMore" || params.trigger === "scroll") {
|
|
256
|
+
setData((prev) => [...prev, ...response.data]);
|
|
257
|
+
} else {
|
|
258
|
+
setData(response.data);
|
|
259
|
+
}
|
|
260
|
+
setTotal(response.total);
|
|
261
|
+
setCurrentPage(params.currentPage);
|
|
262
|
+
setActiveTab(params.activeTab || "all");
|
|
263
|
+
} catch (err) {
|
|
264
|
+
setError(err instanceof Error ? err.message : "未知错误");
|
|
265
|
+
} finally {
|
|
266
|
+
setLoading(false);
|
|
267
|
+
}
|
|
268
|
+
}, []);
|
|
269
|
+
const refreshData = (0, import_react.useCallback)(() => {
|
|
270
|
+
const config = isCustomMode ? dynamicConfig : presetConfigs[activePreset].config;
|
|
271
|
+
const deviceType = simulateDevice || "pc";
|
|
272
|
+
const pageSize = config.defaultPageSize[deviceType];
|
|
273
|
+
loadData({
|
|
274
|
+
trigger: "pagination",
|
|
275
|
+
currentPage: 1,
|
|
276
|
+
pageSize,
|
|
277
|
+
activeTab
|
|
278
|
+
});
|
|
279
|
+
}, [isCustomMode, dynamicConfig, activePreset, simulateDevice, activeTab, loadData]);
|
|
280
|
+
(0, import_react.useEffect)(() => {
|
|
281
|
+
refreshData();
|
|
282
|
+
}, [refreshData]);
|
|
283
|
+
const currentResponsiveConfig = (0, import_react.useMemo)(() => {
|
|
284
|
+
const config = isCustomMode ? dynamicConfig : presetConfigs[activePreset].config;
|
|
285
|
+
const tabData = config.enableTab && config.tabStyle !== "none" ? generateSimpleTabItems(config.tabStyle, data) : void 0;
|
|
286
|
+
const renderItem = (item, index) => {
|
|
287
|
+
const testItem = item;
|
|
288
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `test-item ${testItem.status}`, key: testItem.id }, /* @__PURE__ */ import_react.default.createElement("div", { className: "item-header" }, /* @__PURE__ */ import_react.default.createElement("h4", { title: testItem.title }, testItem.title), /* @__PURE__ */ import_react.default.createElement("span", { className: `status-badge ${testItem.status}` }, testItem.status === "active" ? "正常" : testItem.status === "inactive" ? "停用" : "待审核")), /* @__PURE__ */ import_react.default.createElement("p", { className: "item-description", title: testItem.description }, testItem.description), /* @__PURE__ */ import_react.default.createElement("div", { className: "item-meta" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "category" }, testItem.category), testItem.price && /* @__PURE__ */ import_react.default.createElement("span", { className: "price" }, "¥", testItem.price)), /* @__PURE__ */ import_react.default.createElement("div", { className: "item-footer" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "item-id" }, "#", testItem.id), /* @__PURE__ */ import_react.default.createElement("span", { className: "created-time" }, testItem.createdAt.toLocaleDateString())), config.displayStyle === "waterfall" && /* @__PURE__ */ import_react.default.createElement("div", { className: "height-info" }, "高度: ", Math.round(testItem.height || 150), "px"));
|
|
289
|
+
};
|
|
290
|
+
const baseProps = {
|
|
291
|
+
data: config.enableEmpty ? [] : data,
|
|
292
|
+
loading,
|
|
293
|
+
displayStyle: config.displayStyle,
|
|
294
|
+
layoutDirection: scrollDirection,
|
|
295
|
+
tabStyle: config.enableTab ? config.tabStyle : "none",
|
|
296
|
+
tabGroup: "category",
|
|
297
|
+
// 指定使用category字段进行分组
|
|
298
|
+
tabData,
|
|
299
|
+
stickyTop: config.stickyTop,
|
|
300
|
+
emptyConfig: config.enableEmpty ? {
|
|
301
|
+
show: true,
|
|
302
|
+
text: "暂无数据",
|
|
303
|
+
description: "当前没有可显示的内容,请尝试刷新或调整筛选条件"
|
|
304
|
+
} : void 0,
|
|
305
|
+
renderItem,
|
|
306
|
+
onLoadData: loadData
|
|
307
|
+
};
|
|
308
|
+
const responsiveConfig = (0, import_ResponsiveWrapper.createResponsiveConfig)({
|
|
309
|
+
pc: {
|
|
310
|
+
columns: config.columns.pc,
|
|
311
|
+
columnGap: config.columnGap.pc,
|
|
312
|
+
rowGap: config.rowGap.pc,
|
|
313
|
+
layoutDirection: scrollDirection,
|
|
314
|
+
paginationType: currentPaginationType,
|
|
315
|
+
defaultPageSize: config.defaultPageSize.pc,
|
|
316
|
+
pagination: {
|
|
317
|
+
current: currentPage,
|
|
318
|
+
total: Math.ceil(total / config.defaultPageSize.pc),
|
|
319
|
+
totalCount: total
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
pad: {
|
|
323
|
+
columns: config.columns.pad,
|
|
324
|
+
columnGap: config.columnGap.pad,
|
|
325
|
+
rowGap: config.rowGap.pad,
|
|
326
|
+
layoutDirection: scrollDirection,
|
|
327
|
+
paginationType: currentPaginationType,
|
|
328
|
+
defaultPageSize: config.defaultPageSize.pad,
|
|
329
|
+
pagination: {
|
|
330
|
+
current: currentPage,
|
|
331
|
+
total: Math.ceil(total / config.defaultPageSize.pad),
|
|
332
|
+
totalCount: total
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
mobile: {
|
|
336
|
+
columns: config.columns.mobile,
|
|
337
|
+
columnGap: config.columnGap.mobile,
|
|
338
|
+
rowGap: config.rowGap.mobile,
|
|
339
|
+
layoutDirection: scrollDirection,
|
|
340
|
+
paginationType: currentPaginationType,
|
|
341
|
+
defaultPageSize: config.defaultPageSize.mobile,
|
|
342
|
+
pagination: {
|
|
343
|
+
current: currentPage,
|
|
344
|
+
total: Math.ceil(total / config.defaultPageSize.mobile),
|
|
345
|
+
totalCount: total
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
return {
|
|
350
|
+
...baseProps,
|
|
351
|
+
responsive: responsiveConfig
|
|
352
|
+
};
|
|
353
|
+
}, [isCustomMode, dynamicConfig, activePreset, data, loading, total, loadData, currentPaginationType, currentPage, scrollDirection]);
|
|
354
|
+
const handlePresetChange = (index) => {
|
|
355
|
+
setActivePreset(index);
|
|
356
|
+
setIsCustomMode(false);
|
|
357
|
+
setDynamicConfig(presetConfigs[index].config);
|
|
358
|
+
};
|
|
359
|
+
const handleConfigChange = (field, value) => {
|
|
360
|
+
setIsCustomMode(true);
|
|
361
|
+
setDynamicConfig((prev) => ({
|
|
362
|
+
...prev,
|
|
363
|
+
[field]: value
|
|
364
|
+
}));
|
|
365
|
+
};
|
|
366
|
+
const handleDeviceConfigChange = (device, field, value) => {
|
|
367
|
+
setIsCustomMode(true);
|
|
368
|
+
setDynamicConfig((prev) => {
|
|
369
|
+
const fieldValue = prev[field];
|
|
370
|
+
return {
|
|
371
|
+
...prev,
|
|
372
|
+
[field]: {
|
|
373
|
+
...fieldValue,
|
|
374
|
+
[device]: value
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "test-responsive-wrapper" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "test-controls" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "preset-selector" }, /* @__PURE__ */ import_react.default.createElement("h3", null, "预设配置模板:"), /* @__PURE__ */ import_react.default.createElement("div", { className: "preset-buttons" }, presetConfigs.map((preset, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
380
|
+
"button",
|
|
381
|
+
{
|
|
382
|
+
key: index,
|
|
383
|
+
className: `preset-button ${index === activePreset && !isCustomMode ? "active" : ""}`,
|
|
384
|
+
onClick: () => handlePresetChange(index),
|
|
385
|
+
title: preset.description
|
|
386
|
+
},
|
|
387
|
+
preset.name
|
|
388
|
+
)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-simulator" }, /* @__PURE__ */ import_react.default.createElement("h3", null, "设备类型:"), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-buttons" }, /* @__PURE__ */ import_react.default.createElement(
|
|
389
|
+
"button",
|
|
390
|
+
{
|
|
391
|
+
className: `device-button ${simulateDevice === null ? "active" : ""}`,
|
|
392
|
+
onClick: () => setSimulateDevice(null)
|
|
393
|
+
},
|
|
394
|
+
"自动检测"
|
|
395
|
+
), ["pc", "pad", "mobile"].map((device) => /* @__PURE__ */ import_react.default.createElement(
|
|
396
|
+
"button",
|
|
397
|
+
{
|
|
398
|
+
key: device,
|
|
399
|
+
className: `device-button ${simulateDevice === device ? "active" : ""}`,
|
|
400
|
+
onClick: () => setSimulateDevice(device)
|
|
401
|
+
},
|
|
402
|
+
device.toUpperCase()
|
|
403
|
+
)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "data-controls" }, /* @__PURE__ */ import_react.default.createElement("h3", null, "数据操作:"), /* @__PURE__ */ import_react.default.createElement("div", { className: "data-buttons" }, /* @__PURE__ */ import_react.default.createElement("button", { onClick: refreshData, disabled: loading, className: "refresh-button" }, loading ? "加载中..." : "刷新数据"), /* @__PURE__ */ import_react.default.createElement(
|
|
404
|
+
"button",
|
|
405
|
+
{
|
|
406
|
+
onClick: () => handleConfigChange("enableEmpty", !dynamicConfig.enableEmpty),
|
|
407
|
+
className: `toggle-button ${dynamicConfig.enableEmpty ? "active" : ""}`
|
|
408
|
+
},
|
|
409
|
+
dynamicConfig.enableEmpty ? "显示数据" : "显示空状态"
|
|
410
|
+
))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pagination-controls" }, /* @__PURE__ */ import_react.default.createElement("h3", null, "分页方式:"), /* @__PURE__ */ import_react.default.createElement("div", { className: "pagination-buttons" }, [
|
|
411
|
+
{ key: "pager", label: "分页器", desc: "传统分页,适合精确导航" },
|
|
412
|
+
{ key: "more", label: "加载更多", desc: "点击按钮加载,适合移动端" },
|
|
413
|
+
{ key: "scroll", label: "滚动加载", desc: "自动无限滚动" },
|
|
414
|
+
{ key: "all", label: "全部显示", desc: "一次性显示所有数据" }
|
|
415
|
+
].map((pagination) => /* @__PURE__ */ import_react.default.createElement(
|
|
416
|
+
"button",
|
|
417
|
+
{
|
|
418
|
+
key: pagination.key,
|
|
419
|
+
className: `pagination-button ${currentPaginationType === pagination.key ? "active" : ""}`,
|
|
420
|
+
onClick: () => setCurrentPaginationType(pagination.key),
|
|
421
|
+
title: pagination.desc
|
|
422
|
+
},
|
|
423
|
+
pagination.label,
|
|
424
|
+
pagination.key === "all" && total > 100 && /* @__PURE__ */ import_react.default.createElement("span", { className: "warning-badge" }, "⚠️")
|
|
425
|
+
))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pagination-description" }, /* @__PURE__ */ import_react.default.createElement("small", null, "当前: ", /* @__PURE__ */ import_react.default.createElement("strong", null, currentPaginationType === "pager" && "传统分页器 - 显示页码和跳转控件", currentPaginationType === "more" && "加载更多 - 点击按钮加载下一页", currentPaginationType === "scroll" && "滚动加载 - 滚动到底部自动加载", currentPaginationType === "all" && "全部显示 - 一次性显示所有500条数据")))), /* @__PURE__ */ import_react.default.createElement("div", { className: "height-controls" }, /* @__PURE__ */ import_react.default.createElement("h3", null, "列表高度限制:"), /* @__PURE__ */ import_react.default.createElement("div", { className: "height-buttons" }, [
|
|
426
|
+
{ value: 400, label: "400px", desc: "适合紧凑布局" },
|
|
427
|
+
{ value: 600, label: "600px", desc: "默认高度,平衡体验" },
|
|
428
|
+
{ value: 800, label: "800px", desc: "适合大屏幕浏览" },
|
|
429
|
+
{ value: "auto", label: "无限制", desc: "根据内容自适应高度" }
|
|
430
|
+
].map((height) => /* @__PURE__ */ import_react.default.createElement(
|
|
431
|
+
"button",
|
|
432
|
+
{
|
|
433
|
+
key: height.value,
|
|
434
|
+
className: `height-button ${maxHeight === height.value ? "active" : ""}`,
|
|
435
|
+
onClick: () => setMaxHeight(height.value),
|
|
436
|
+
title: height.desc
|
|
437
|
+
},
|
|
438
|
+
height.label,
|
|
439
|
+
height.value === "auto" && currentPaginationType === "all" && /* @__PURE__ */ import_react.default.createElement("span", { className: "warning-badge" }, "⚠️")
|
|
440
|
+
))), /* @__PURE__ */ import_react.default.createElement("div", { className: "height-description" }, /* @__PURE__ */ import_react.default.createElement("small", null, "当前高度: ", /* @__PURE__ */ import_react.default.createElement("strong", null, maxHeight === "auto" ? "无限制 - 根据内容自适应" : `${maxHeight}px - 超出部分可滚动`), maxHeight === "auto" && currentPaginationType === "all" && /* @__PURE__ */ import_react.default.createElement("span", { className: "performance-warning" }, " (⚠️ 500条数据可能影响页面性能)")))), /* @__PURE__ */ import_react.default.createElement("div", { className: "scroll-direction-controls" }, /* @__PURE__ */ import_react.default.createElement("h3", null, "滚动方向:"), /* @__PURE__ */ import_react.default.createElement("div", { className: "scroll-direction-buttons" }, [
|
|
441
|
+
{
|
|
442
|
+
key: "vertical",
|
|
443
|
+
label: "垂直滚动",
|
|
444
|
+
desc: "上下滚动,传统列表布局",
|
|
445
|
+
icon: "↕️",
|
|
446
|
+
recommend: "推荐用于大多数场景"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
key: "horizontal",
|
|
450
|
+
label: "水平滚动",
|
|
451
|
+
desc: "左右滚动,卡片式布局",
|
|
452
|
+
icon: "↔️",
|
|
453
|
+
recommend: "适合图片展示或卡片浏览"
|
|
454
|
+
}
|
|
455
|
+
].map((direction) => /* @__PURE__ */ import_react.default.createElement(
|
|
456
|
+
"button",
|
|
457
|
+
{
|
|
458
|
+
key: direction.key,
|
|
459
|
+
className: `scroll-direction-button ${scrollDirection === direction.key ? "active" : ""}`,
|
|
460
|
+
onClick: () => setScrollDirection(direction.key),
|
|
461
|
+
title: direction.desc
|
|
462
|
+
},
|
|
463
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: "direction-icon" }, direction.icon),
|
|
464
|
+
direction.label,
|
|
465
|
+
scrollDirection === direction.key && /* @__PURE__ */ import_react.default.createElement("span", { className: "recommend-badge" }, "✓")
|
|
466
|
+
))))), /* @__PURE__ */ import_react.default.createElement(
|
|
467
|
+
"div",
|
|
468
|
+
{
|
|
469
|
+
className: `test-container ${simulateDevice ? `simulate-${simulateDevice}` : ""}`
|
|
470
|
+
},
|
|
471
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
472
|
+
import_ResponsiveWrapper.default,
|
|
473
|
+
{
|
|
474
|
+
...currentResponsiveConfig,
|
|
475
|
+
className: `test-responsive-wrapper-instance scroll-${scrollDirection}`,
|
|
476
|
+
style: {
|
|
477
|
+
border: "2px solid #e0e0e0",
|
|
478
|
+
borderRadius: "8px",
|
|
479
|
+
padding: "16px",
|
|
480
|
+
backgroundColor: "#fafafa",
|
|
481
|
+
position: "relative",
|
|
482
|
+
maxHeight: maxHeight === "auto" ? "none" : `${maxHeight}px`,
|
|
483
|
+
overflowY: scrollDirection === "vertical" ? maxHeight === "auto" ? "visible" : "auto" : "hidden",
|
|
484
|
+
overflowX: scrollDirection === "horizontal" ? "auto" : "hidden",
|
|
485
|
+
maxWidth: scrollDirection === "horizontal" ? "100%" : "none"
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
loading && /* @__PURE__ */ import_react.default.createElement("div", { className: "loading-overlay" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "loading-spinner" }, "加载中...")),
|
|
490
|
+
maxHeight !== "auto" && /* @__PURE__ */ import_react.default.createElement("div", { className: "height-indicator" }, /* @__PURE__ */ import_react.default.createElement("small", null, "📏 列表最大高度: ", maxHeight, "px"))
|
|
491
|
+
));
|
|
492
|
+
};
|
|
493
|
+
var TestResponsiveWrapper_default = TestResponsiveWrapper;
|