@pisell/private-materials 6.4.59 → 6.4.60
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/components/actionButtons/index.js +7 -15
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/voucher/index.js +19 -23
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/index.js +3 -7
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +12 -17
- package/es/components/checkout/hooks/useWalletPass.js +21 -36
- 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 +1 -1
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/pay/toB/store/hooks.js +5 -19
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -20
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +12 -47
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/index.js +2 -4
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -5
- package/es/components/ticketBooking/components/menuBar/index.js +21 -45
- package/es/components/ticketBooking/components/menuBar/index.less +1 -32
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -6
- package/es/components/ticketBooking/components/ticketBooking/index.js +23 -66
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.less +0 -1
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -5
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +1 -13
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +0 -1
- package/es/components/ticketBooking/hooks/pisellos/index.js +1 -2
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +4 -12
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +10 -52
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +2 -5
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +2 -7
- package/es/components/ticketBooking/index.d.ts +0 -6
- package/es/components/ticketBooking/index.js +11 -86
- package/es/components/ticketBooking/utils/index.d.ts +2 -30
- package/es/components/ticketBooking/utils/index.js +1 -50
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +0 -2
- package/es/plus/productSelect/components/pisellPriceText/index.js +5 -7
- package/lib/components/booking/components/actionButtons/index.js +15 -22
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/voucher/index.js +40 -33
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/index.js +3 -7
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +12 -15
- package/lib/components/checkout/hooks/useWalletPass.js +45 -57
- 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 +1 -1
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/pay/toB/store/hooks.js +8 -16
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -20
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +12 -47
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +2 -3
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -5
- package/lib/components/ticketBooking/components/menuBar/index.js +22 -29
- package/lib/components/ticketBooking/components/menuBar/index.less +1 -32
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -56
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.less +0 -1
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -5
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +1 -5
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +0 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.js +1 -3
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +10 -17
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +1 -1
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +5 -35
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +2 -4
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +2 -6
- package/lib/components/ticketBooking/index.d.ts +0 -6
- package/lib/components/ticketBooking/index.js +8 -64
- package/lib/components/ticketBooking/utils/index.d.ts +2 -30
- package/lib/components/ticketBooking/utils/index.js +2 -70
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +0 -2
- package/lib/plus/productSelect/components/pisellPriceText/index.js +5 -6
- package/package.json +1 -1
- package/es/components/list/List.d.ts +0 -5
- package/es/components/list/List.js +0 -957
- package/es/components/list/List.less +0 -2
- package/es/components/list/ResponsiveWrapper.d.ts +0 -16
- package/es/components/list/ResponsiveWrapper.js +0 -130
- package/es/components/list/TestResponsiveWrapper.d.ts +0 -8
- package/es/components/list/TestResponsiveWrapper.js +0 -816
- package/es/components/list/TestResponsiveWrapper.less +0 -968
- package/es/components/list/components/EmptyState/EmptyState.d.ts +0 -20
- package/es/components/list/components/EmptyState/EmptyState.js +0 -75
- package/es/components/list/components/EmptyState/EmptyState.less +0 -121
- package/es/components/list/components/EmptyState/index.d.ts +0 -2
- package/es/components/list/components/EmptyState/index.js +0 -1
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +0 -13
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +0 -39
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +0 -29
- package/es/components/list/components/ListItemSkeleton/index.d.ts +0 -2
- package/es/components/list/components/ListItemSkeleton/index.js +0 -2
- package/es/components/list/components/Pagination/Pagination.d.ts +0 -30
- package/es/components/list/components/Pagination/Pagination.js +0 -240
- package/es/components/list/components/Pagination/Pagination.less +0 -439
- package/es/components/list/components/Pagination/index.d.ts +0 -1
- package/es/components/list/components/Pagination/index.js +0 -1
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +0 -18
- package/es/components/list/components/ScrollLoader/ScrollLoader.js +0 -18
- package/es/components/list/components/ScrollLoader/ScrollLoader.less +0 -3
- package/es/components/list/components/ScrollLoader/index.d.ts +0 -2
- package/es/components/list/components/ScrollLoader/index.js +0 -1
- package/es/components/list/components/Tab/Tab.d.ts +0 -5
- package/es/components/list/components/Tab/Tab.js +0 -43
- package/es/components/list/components/Tab/Tab.less +0 -139
- package/es/components/list/components/Tab/index.d.ts +0 -2
- package/es/components/list/components/Tab/index.js +0 -1
- package/es/components/list/components/Tab/types.d.ts +0 -14
- package/es/components/list/components/Tab/types.js +0 -1
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +0 -11
- package/es/components/list/components/TabSkeleton/TabSkeleton.js +0 -28
- package/es/components/list/components/TabSkeleton/TabSkeleton.less +0 -38
- package/es/components/list/components/TabSkeleton/index.d.ts +0 -2
- package/es/components/list/components/TabSkeleton/index.js +0 -2
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +0 -33
- package/es/components/list/components/WaterfallList/WaterfallList.js +0 -191
- package/es/components/list/components/WaterfallList/WaterfallList.less +0 -201
- package/es/components/list/components/WaterfallList/index.d.ts +0 -2
- package/es/components/list/components/WaterfallList/index.js +0 -1
- package/es/components/list/examples/GroupedListExample.d.ts +0 -3
- package/es/components/list/examples/GroupedListExample.js +0 -207
- package/es/components/list/hooks/index.d.ts +0 -5
- package/es/components/list/hooks/index.js +0 -3
- package/es/components/list/hooks/useDevice.d.ts +0 -24
- package/es/components/list/hooks/useDevice.js +0 -102
- package/es/components/list/hooks/useListState.d.ts +0 -43
- package/es/components/list/hooks/useListState.js +0 -176
- package/es/components/list/hooks/useWaterfall.d.ts +0 -34
- package/es/components/list/hooks/useWaterfall.js +0 -161
- package/es/components/list/index.d.ts +0 -10
- package/es/components/list/index.js +0 -7
- package/es/components/list/locales.d.ts +0 -66
- package/es/components/list/locales.js +0 -107
- package/es/components/list/styles/base.less +0 -39
- package/es/components/list/styles/content.less +0 -416
- package/es/components/list/styles/floatButton.less +0 -107
- package/es/components/list/styles/footer.less +0 -49
- package/es/components/list/styles/header.less +0 -69
- package/es/components/list/styles/responsive.less +0 -166
- package/es/components/list/types.d.ts +0 -177
- package/es/components/list/types.js +0 -1
- package/es/components/list/utils/getText.d.ts +0 -53
- package/es/components/list/utils/getText.js +0 -150
- package/es/components/list/utils/index.d.ts +0 -4
- package/es/components/list/utils/index.js +0 -5
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +0 -27
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -143
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +0 -7
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +0 -7
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -41
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +0 -115
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +0 -273
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +0 -50
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +0 -130
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +0 -26
- package/es/components/ticketBooking/context/IsActiveContext.js +0 -37
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +0 -26
- package/es/components/ticketBooking/context/OsKeyContext.js +0 -37
- package/es/components/ticketBooking/context/index.d.ts +0 -2
- package/es/components/ticketBooking/context/index.js +0 -2
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +0 -21
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +0 -50
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +0 -6
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +0 -17
- package/es/components/ticketBooking/utils/productCache.d.ts +0 -75
- package/es/components/ticketBooking/utils/productCache.js +0 -184
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +0 -11
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +0 -8
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +0 -11
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +0 -17
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +0 -11
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +0 -17
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +0 -11
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +0 -17
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +0 -11
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +0 -2
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -8
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +0 -100
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +0 -8
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +0 -32
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +0 -3
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -8
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +0 -239
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +0 -44
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +0 -34
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +0 -14
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +0 -33
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +0 -30
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -5
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -75
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +0 -46
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +0 -39
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +0 -9
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +0 -53
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +0 -31
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +0 -31
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +0 -3
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +0 -58
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +0 -11
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +0 -85
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +0 -24
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +0 -121
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +0 -57
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +0 -95
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +0 -18
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +0 -31
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +0 -3
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +0 -47
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +0 -3
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +0 -34
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +0 -13
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +0 -95
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +0 -18
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +0 -31
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +0 -3
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +0 -34
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +0 -13
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +0 -39
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +0 -22
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +0 -20
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +0 -20
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +0 -55
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -9
- package/es/plus/productSelect/ProductCard/SkuCard/index.js +0 -38
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +0 -42
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +0 -41
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +0 -162
- package/es/plus/productSelect/ProductCard/SkuCard/status.js +0 -481
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +0 -298
- package/es/plus/productSelect/ProductCard/SkuCard/type.js +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +0 -9
- package/es/plus/productSelect/ProductCard/SkuCard/utils.js +0 -21
- package/lib/components/list/List.d.ts +0 -5
- package/lib/components/list/List.js +0 -771
- package/lib/components/list/List.less +0 -2
- package/lib/components/list/ResponsiveWrapper.d.ts +0 -16
- package/lib/components/list/ResponsiveWrapper.js +0 -145
- package/lib/components/list/TestResponsiveWrapper.d.ts +0 -8
- package/lib/components/list/TestResponsiveWrapper.js +0 -493
- package/lib/components/list/TestResponsiveWrapper.less +0 -968
- package/lib/components/list/components/EmptyState/EmptyState.d.ts +0 -20
- package/lib/components/list/components/EmptyState/EmptyState.js +0 -75
- package/lib/components/list/components/EmptyState/EmptyState.less +0 -121
- package/lib/components/list/components/EmptyState/index.d.ts +0 -2
- package/lib/components/list/components/EmptyState/index.js +0 -35
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +0 -13
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +0 -75
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +0 -29
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +0 -2
- package/lib/components/list/components/ListItemSkeleton/index.js +0 -41
- package/lib/components/list/components/Pagination/Pagination.d.ts +0 -30
- package/lib/components/list/components/Pagination/Pagination.js +0 -205
- package/lib/components/list/components/Pagination/Pagination.less +0 -439
- package/lib/components/list/components/Pagination/index.d.ts +0 -1
- package/lib/components/list/components/Pagination/index.js +0 -35
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +0 -18
- package/lib/components/list/components/ScrollLoader/ScrollLoader.js +0 -37
- package/lib/components/list/components/ScrollLoader/ScrollLoader.less +0 -3
- package/lib/components/list/components/ScrollLoader/index.d.ts +0 -2
- package/lib/components/list/components/ScrollLoader/index.js +0 -35
- package/lib/components/list/components/Tab/Tab.d.ts +0 -5
- package/lib/components/list/components/Tab/Tab.js +0 -72
- package/lib/components/list/components/Tab/Tab.less +0 -139
- package/lib/components/list/components/Tab/index.d.ts +0 -2
- package/lib/components/list/components/Tab/index.js +0 -35
- package/lib/components/list/components/Tab/types.d.ts +0 -14
- package/lib/components/list/components/Tab/types.js +0 -17
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +0 -11
- package/lib/components/list/components/TabSkeleton/TabSkeleton.js +0 -61
- package/lib/components/list/components/TabSkeleton/TabSkeleton.less +0 -38
- package/lib/components/list/components/TabSkeleton/index.d.ts +0 -2
- package/lib/components/list/components/TabSkeleton/index.js +0 -41
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +0 -33
- package/lib/components/list/components/WaterfallList/WaterfallList.js +0 -178
- package/lib/components/list/components/WaterfallList/WaterfallList.less +0 -201
- package/lib/components/list/components/WaterfallList/index.d.ts +0 -2
- package/lib/components/list/components/WaterfallList/index.js +0 -35
- package/lib/components/list/examples/GroupedListExample.d.ts +0 -3
- package/lib/components/list/examples/GroupedListExample.js +0 -210
- package/lib/components/list/hooks/index.d.ts +0 -5
- package/lib/components/list/hooks/index.js +0 -47
- package/lib/components/list/hooks/useDevice.d.ts +0 -24
- package/lib/components/list/hooks/useDevice.js +0 -96
- package/lib/components/list/hooks/useListState.d.ts +0 -43
- package/lib/components/list/hooks/useListState.js +0 -149
- package/lib/components/list/hooks/useWaterfall.d.ts +0 -34
- package/lib/components/list/hooks/useWaterfall.js +0 -124
- package/lib/components/list/index.d.ts +0 -10
- package/lib/components/list/index.js +0 -60
- package/lib/components/list/locales.d.ts +0 -66
- package/lib/components/list/locales.js +0 -113
- package/lib/components/list/styles/base.less +0 -39
- package/lib/components/list/styles/content.less +0 -416
- package/lib/components/list/styles/floatButton.less +0 -107
- package/lib/components/list/styles/footer.less +0 -49
- package/lib/components/list/styles/header.less +0 -69
- package/lib/components/list/styles/responsive.less +0 -166
- package/lib/components/list/types.d.ts +0 -177
- package/lib/components/list/types.js +0 -17
- package/lib/components/list/utils/getText.d.ts +0 -53
- package/lib/components/list/utils/getText.js +0 -95
- package/lib/components/list/utils/index.d.ts +0 -4
- package/lib/components/list/utils/index.js +0 -43
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +0 -27
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -165
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +0 -7
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +0 -45
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -41
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +0 -115
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +0 -247
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +0 -50
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +0 -100
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +0 -26
- package/lib/components/ticketBooking/context/IsActiveContext.js +0 -56
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +0 -26
- package/lib/components/ticketBooking/context/OsKeyContext.js +0 -56
- package/lib/components/ticketBooking/context/index.d.ts +0 -2
- package/lib/components/ticketBooking/context/index.js +0 -44
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +0 -21
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +0 -47
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +0 -6
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +0 -37
- package/lib/components/ticketBooking/utils/productCache.d.ts +0 -75
- package/lib/components/ticketBooking/utils/productCache.js +0 -144
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +0 -42
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +0 -8
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +0 -42
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +0 -17
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +0 -42
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +0 -17
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +0 -42
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +0 -17
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +0 -42
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +0 -2
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -8
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +0 -129
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +0 -8
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +0 -52
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +0 -3
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -8
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +0 -178
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +0 -44
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +0 -52
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +0 -14
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +0 -63
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +0 -30
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -5
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -131
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +0 -46
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +0 -62
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +0 -9
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +0 -78
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +0 -31
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +0 -51
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +0 -3
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +0 -94
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +0 -11
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +0 -115
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +0 -24
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +0 -139
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +0 -57
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +0 -97
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +0 -18
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +0 -51
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +0 -3
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +0 -58
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +0 -3
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +0 -56
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +0 -13
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +0 -97
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +0 -18
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +0 -51
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +0 -3
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +0 -56
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +0 -13
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +0 -58
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +0 -22
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +0 -49
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +0 -20
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +0 -83
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -9
- package/lib/plus/productSelect/ProductCard/SkuCard/index.js +0 -68
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +0 -42
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +0 -65
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +0 -162
- package/lib/plus/productSelect/ProductCard/SkuCard/status.js +0 -501
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +0 -298
- package/lib/plus/productSelect/ProductCard/SkuCard/type.js +0 -17
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +0 -9
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +0 -37
- package/lowcode/sku-card/meta.ts +0 -1812
- package/lowcode/sku-card/snippets.ts +0 -372
- package/lowcode/sku-list/meta.ts +0 -410
|
@@ -1,207 +0,0 @@
|
|
|
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 React, { useState } from 'react';
|
|
8
|
-
import { List } from "../index";
|
|
9
|
-
|
|
10
|
-
// 示例数据接口
|
|
11
|
-
|
|
12
|
-
// 示例组件:门票列表展示
|
|
13
|
-
var GroupedListExample = function GroupedListExample() {
|
|
14
|
-
// 模拟门票数据 - 使用 ticketType 字段进行分组
|
|
15
|
-
var mockTicketData = [{
|
|
16
|
-
id: '1',
|
|
17
|
-
title: '2hrs upgrade Unlimited',
|
|
18
|
-
description: 'Adult Day',
|
|
19
|
-
price: 90,
|
|
20
|
-
duration: '2 h',
|
|
21
|
-
ticketType: 'all-access',
|
|
22
|
-
category: 'Adult Day Pass'
|
|
23
|
-
}, {
|
|
24
|
-
id: '2',
|
|
25
|
-
title: '2hrs upgrade Unlimited',
|
|
26
|
-
description: 'Kid Day',
|
|
27
|
-
price: 90,
|
|
28
|
-
duration: '2 h',
|
|
29
|
-
ticketType: 'all-access',
|
|
30
|
-
category: 'Kids Day Pass'
|
|
31
|
-
}, {
|
|
32
|
-
id: '3',
|
|
33
|
-
title: '2hrs upgrade Unlimited',
|
|
34
|
-
description: 'Family Package',
|
|
35
|
-
price: 90,
|
|
36
|
-
duration: '2 h',
|
|
37
|
-
ticketType: 'all-access',
|
|
38
|
-
category: 'Family Pass'
|
|
39
|
-
}, {
|
|
40
|
-
id: '4',
|
|
41
|
-
title: 'Child Ticket - Morning',
|
|
42
|
-
description: 'Special price for children',
|
|
43
|
-
price: 45,
|
|
44
|
-
duration: '4 h',
|
|
45
|
-
ticketType: 'child',
|
|
46
|
-
category: 'Morning Session'
|
|
47
|
-
}, {
|
|
48
|
-
id: '5',
|
|
49
|
-
title: 'Child Ticket - Afternoon',
|
|
50
|
-
description: 'Afternoon activities',
|
|
51
|
-
price: 45,
|
|
52
|
-
duration: '4 h',
|
|
53
|
-
ticketType: 'child',
|
|
54
|
-
category: 'Afternoon Session'
|
|
55
|
-
}, {
|
|
56
|
-
id: '6',
|
|
57
|
-
title: 'Adult Standard',
|
|
58
|
-
description: 'Standard adult admission',
|
|
59
|
-
price: 70,
|
|
60
|
-
duration: '6 h',
|
|
61
|
-
ticketType: 'adult',
|
|
62
|
-
category: 'Standard Admission'
|
|
63
|
-
}, {
|
|
64
|
-
id: '7',
|
|
65
|
-
title: 'Adult Premium',
|
|
66
|
-
description: 'Premium experience',
|
|
67
|
-
price: 120,
|
|
68
|
-
duration: '8 h',
|
|
69
|
-
ticketType: 'adult',
|
|
70
|
-
category: 'Premium Experience'
|
|
71
|
-
}, {
|
|
72
|
-
id: '8',
|
|
73
|
-
title: 'Special Event',
|
|
74
|
-
description: 'Limited time offer',
|
|
75
|
-
price: 150,
|
|
76
|
-
duration: '3 h',
|
|
77
|
-
ticketType: 'category5',
|
|
78
|
-
category: 'Special Event'
|
|
79
|
-
}];
|
|
80
|
-
|
|
81
|
-
// Tab配置,group值对应数据中 ticketType 字段的值
|
|
82
|
-
var tabItems = [{
|
|
83
|
-
key: 'all-access',
|
|
84
|
-
label: "All-Access Ticket (".concat(mockTicketData.filter(function (item) {
|
|
85
|
-
return item.ticketType === 'all-access';
|
|
86
|
-
}).length, ")"),
|
|
87
|
-
group: 'all-access'
|
|
88
|
-
}, {
|
|
89
|
-
key: 'child',
|
|
90
|
-
label: "Child Ticket (".concat(mockTicketData.filter(function (item) {
|
|
91
|
-
return item.ticketType === 'child';
|
|
92
|
-
}).length, ")"),
|
|
93
|
-
group: 'child'
|
|
94
|
-
}, {
|
|
95
|
-
key: 'adult',
|
|
96
|
-
label: "Adult Ticket (".concat(mockTicketData.filter(function (item) {
|
|
97
|
-
return item.ticketType === 'adult';
|
|
98
|
-
}).length, ")"),
|
|
99
|
-
group: 'adult'
|
|
100
|
-
}, {
|
|
101
|
-
key: 'category5',
|
|
102
|
-
label: "Category 5 (".concat(mockTicketData.filter(function (item) {
|
|
103
|
-
return item.ticketType === 'category5';
|
|
104
|
-
}).length, ")"),
|
|
105
|
-
group: 'category5'
|
|
106
|
-
}];
|
|
107
|
-
|
|
108
|
-
// 状态管理
|
|
109
|
-
var _useState = useState(mockTicketData),
|
|
110
|
-
_useState2 = _slicedToArray(_useState, 1),
|
|
111
|
-
currentData = _useState2[0];
|
|
112
|
-
var _useState3 = useState(false),
|
|
113
|
-
_useState4 = _slicedToArray(_useState3, 1),
|
|
114
|
-
loading = _useState4[0];
|
|
115
|
-
|
|
116
|
-
// 自定义渲染每个门票项
|
|
117
|
-
var renderTicketItem = function renderTicketItem(item, index) {
|
|
118
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
key: item.id,
|
|
120
|
-
style: {
|
|
121
|
-
background: '#FFF',
|
|
122
|
-
borderRadius: '12px',
|
|
123
|
-
padding: '16px',
|
|
124
|
-
border: '1px solid #E4E7EC',
|
|
125
|
-
boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)',
|
|
126
|
-
height: '160px',
|
|
127
|
-
display: 'flex',
|
|
128
|
-
flexDirection: 'column',
|
|
129
|
-
justifyContent: 'space-between'
|
|
130
|
-
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
132
|
-
style: {
|
|
133
|
-
height: '60px',
|
|
134
|
-
background: "linear-gradient(135deg, ".concat(item.ticketType === 'all-access' ? '#8157D5, #B794F6' : item.ticketType === 'child' ? '#F56565, #FC8181' : item.ticketType === 'adult' ? '#4299E1, #63B3ED' : '#ED8936, #F6AD55', ")"),
|
|
135
|
-
borderRadius: '8px',
|
|
136
|
-
marginBottom: '12px',
|
|
137
|
-
display: 'flex',
|
|
138
|
-
alignItems: 'center',
|
|
139
|
-
justifyContent: 'center',
|
|
140
|
-
color: 'white',
|
|
141
|
-
fontWeight: 'bold',
|
|
142
|
-
fontSize: '18px'
|
|
143
|
-
}
|
|
144
|
-
}, item.description), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
|
|
145
|
-
style: {
|
|
146
|
-
fontSize: '16px',
|
|
147
|
-
fontWeight: '600',
|
|
148
|
-
margin: '0 0 4px 0',
|
|
149
|
-
color: '#101828'
|
|
150
|
-
}
|
|
151
|
-
}, item.title), /*#__PURE__*/React.createElement("p", {
|
|
152
|
-
style: {
|
|
153
|
-
fontSize: '14px',
|
|
154
|
-
color: '#667085',
|
|
155
|
-
margin: '0 0 8px 0'
|
|
156
|
-
}
|
|
157
|
-
}, item.duration), /*#__PURE__*/React.createElement("p", {
|
|
158
|
-
style: {
|
|
159
|
-
fontSize: '18px',
|
|
160
|
-
fontWeight: '700',
|
|
161
|
-
color: '#101828',
|
|
162
|
-
margin: 0
|
|
163
|
-
}
|
|
164
|
-
}, "A$ ", item.price)));
|
|
165
|
-
};
|
|
166
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
167
|
-
style: {
|
|
168
|
-
padding: '20px',
|
|
169
|
-
maxWidth: '1200px',
|
|
170
|
-
margin: '0 auto'
|
|
171
|
-
}
|
|
172
|
-
}, /*#__PURE__*/React.createElement("h1", {
|
|
173
|
-
style: {
|
|
174
|
-
marginBottom: '20px',
|
|
175
|
-
color: '#101828'
|
|
176
|
-
}
|
|
177
|
-
}, "\u95E8\u7968\u5206\u7EC4\u5C55\u793A\u793A\u4F8B"), /*#__PURE__*/React.createElement(List, {
|
|
178
|
-
data: currentData,
|
|
179
|
-
tabData: tabItems,
|
|
180
|
-
tabGroup: "ticketType" // 指定使用 ticketType 字段进行分组
|
|
181
|
-
,
|
|
182
|
-
tabStyle: "anchor",
|
|
183
|
-
displayStyle: "grid",
|
|
184
|
-
layoutDirection: "vertical",
|
|
185
|
-
columns: 2,
|
|
186
|
-
rows: 2,
|
|
187
|
-
columnGap: 16,
|
|
188
|
-
rowGap: 16,
|
|
189
|
-
height: "600px",
|
|
190
|
-
renderItem: renderTicketItem,
|
|
191
|
-
loading: loading,
|
|
192
|
-
emptyConfig: {
|
|
193
|
-
show: true,
|
|
194
|
-
text: '暂无门票数据',
|
|
195
|
-
description: '请稍后再试'
|
|
196
|
-
},
|
|
197
|
-
className: "ticket-list-example"
|
|
198
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
199
|
-
style: {
|
|
200
|
-
marginTop: '20px',
|
|
201
|
-
padding: '16px',
|
|
202
|
-
background: '#F8F9FA',
|
|
203
|
-
borderRadius: '8px'
|
|
204
|
-
}
|
|
205
|
-
}, /*#__PURE__*/React.createElement("h3", null, "\u4F7F\u7528\u8BF4\u660E\uFF1A"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "\u901A\u8FC7 ", /*#__PURE__*/React.createElement("code", null, "tabGroup=\"ticketType\""), " \u6307\u5B9A\u4F7F\u7528\u6570\u636E\u9879\u7684 ticketType \u5B57\u6BB5\u8FDB\u884C\u5206\u7EC4"), /*#__PURE__*/React.createElement("li", null, "Tab\u7684 group \u5C5E\u6027\u503C\u5BF9\u5E94\u6570\u636E\u9879\u4E2D ticketType \u5B57\u6BB5\u7684\u503C"), /*#__PURE__*/React.createElement("li", null, "\u70B9\u51FB\u4E0D\u540C\u7684\u6807\u7B7E\u9875\u53EF\u4EE5\u67E5\u770B\u4E0D\u540C\u5206\u7EC4\u7684\u95E8\u7968"), /*#__PURE__*/React.createElement("li", null, "\u6570\u636E\u4F1A\u6839\u636E\u9009\u62E9\u7684\u5206\u7EC4\u81EA\u52A8\u8FC7\u6EE4"), /*#__PURE__*/React.createElement("li", null, "\u6BCF\u4E2A\u6807\u7B7E\u9875\u663E\u793A\u5BF9\u5E94\u5206\u7EC4\u7684\u6570\u91CF"), /*#__PURE__*/React.createElement("li", null, "\u652F\u6301\u6240\u6709\u73B0\u6709\u7684List\u7EC4\u4EF6\u5E03\u5C40\u548C\u5206\u9875\u6A21\u5F0F"))));
|
|
206
|
-
};
|
|
207
|
-
export default GroupedListExample;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { useDevice, getUserAgentInfo } from './useDevice';
|
|
2
|
-
export type { DeviceType, DeviceInfo } from './useDevice';
|
|
3
|
-
export { default as useWaterfall } from './useWaterfall';
|
|
4
|
-
export { useListState } from './useListState';
|
|
5
|
-
export type { ListState, ListAction, UseListStateProps, UseListStateReturn } from './useListState';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare type DeviceType = 'pc' | 'pad' | 'mobile';
|
|
2
|
-
export interface DeviceInfo {
|
|
3
|
-
type: DeviceType;
|
|
4
|
-
isMobile: boolean;
|
|
5
|
-
isPad: boolean;
|
|
6
|
-
isPc: boolean;
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* 设备检测Hook
|
|
12
|
-
* 根据屏幕宽度和用户代理判断当前设备类型
|
|
13
|
-
*/
|
|
14
|
-
export declare const useDevice: () => DeviceInfo;
|
|
15
|
-
/**
|
|
16
|
-
* 获取用户代理信息
|
|
17
|
-
* @returns 用户代理相关信息
|
|
18
|
-
*/
|
|
19
|
-
export declare const getUserAgentInfo: () => {
|
|
20
|
-
isMobileUA: boolean;
|
|
21
|
-
isTabletUA: boolean;
|
|
22
|
-
isDesktopUA: boolean;
|
|
23
|
-
userAgent: string;
|
|
24
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { TabItem, LoadDataParams } from '../types';
|
|
2
|
-
export interface ListState {
|
|
3
|
-
activeTab: string;
|
|
4
|
-
currentPage: number;
|
|
5
|
-
isStickyActive: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare type ListAction = {
|
|
8
|
-
type: 'SET_ACTIVE_TAB';
|
|
9
|
-
payload: string;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'SET_CURRENT_PAGE';
|
|
12
|
-
payload: number;
|
|
13
|
-
} | {
|
|
14
|
-
type: 'SET_STICKY_ACTIVE';
|
|
15
|
-
payload: boolean;
|
|
16
|
-
} | {
|
|
17
|
-
type: 'RESET_PAGE';
|
|
18
|
-
};
|
|
19
|
-
export interface UseListStateProps {
|
|
20
|
-
/** 外部传入的当前页码 */
|
|
21
|
-
externalCurrentPage?: number;
|
|
22
|
-
/** tab数据 */
|
|
23
|
-
tabItems: TabItem[];
|
|
24
|
-
/** 默认页面大小 */
|
|
25
|
-
defaultPageSize: number;
|
|
26
|
-
/** 数据加载回调 */
|
|
27
|
-
onLoadData?: (params: LoadDataParams) => void;
|
|
28
|
-
}
|
|
29
|
-
export interface UseListStateReturn {
|
|
30
|
-
state: ListState;
|
|
31
|
-
setActiveTab: (tab: string) => void;
|
|
32
|
-
setCurrentPage: (page: number) => void;
|
|
33
|
-
setStickyActive: (active: boolean) => void;
|
|
34
|
-
resetPage: () => void;
|
|
35
|
-
handleTabChange: (key: string) => void;
|
|
36
|
-
handlePageChange: (page: number, size?: number) => void;
|
|
37
|
-
handleShowSizeChange: (current: number, size: number) => void;
|
|
38
|
-
handleLoadMore: () => void;
|
|
39
|
-
handleViewLess: () => void;
|
|
40
|
-
handleScrollLoad: () => void;
|
|
41
|
-
actualCurrentPage: number;
|
|
42
|
-
}
|
|
43
|
-
export declare const useListState: ({ externalCurrentPage, tabItems, defaultPageSize, onLoadData, }: UseListStateProps) => UseListStateReturn;
|
|
@@ -1,176 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface WaterfallItem {
|
|
2
|
-
id: string | number;
|
|
3
|
-
data: any;
|
|
4
|
-
height?: number;
|
|
5
|
-
width?: number;
|
|
6
|
-
}
|
|
7
|
-
export interface WaterfallTrack<T = any> {
|
|
8
|
-
items: T[];
|
|
9
|
-
size: number;
|
|
10
|
-
}
|
|
11
|
-
export interface WaterfallLayoutOptions {
|
|
12
|
-
tracks: number;
|
|
13
|
-
trackGap: number;
|
|
14
|
-
itemGap: number;
|
|
15
|
-
direction: 'vertical' | 'horizontal';
|
|
16
|
-
}
|
|
17
|
-
export interface WaterfallLayout<T = any> {
|
|
18
|
-
tracks: WaterfallTrack<T>[];
|
|
19
|
-
totalSize: number;
|
|
20
|
-
}
|
|
21
|
-
export declare const useWaterfall: <T extends {
|
|
22
|
-
id: string | number;
|
|
23
|
-
height?: number | undefined;
|
|
24
|
-
width?: number | undefined;
|
|
25
|
-
}>(items: T[], options: WaterfallLayoutOptions) => {
|
|
26
|
-
layout: WaterfallLayout<T>;
|
|
27
|
-
registerItemRef: (id: string | number, element: HTMLElement | null) => void;
|
|
28
|
-
measureItemSize: (id: string | number) => {
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
};
|
|
32
|
-
recalculateLayout: () => void;
|
|
33
|
-
};
|
|
34
|
-
export default useWaterfall;
|