@anker-in/headless-ui 1.1.16 → 1.1.17-alpha.1765870943164
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/dist/cjs/biz-components/AccordionCards/index.d.ts +2 -2
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +1 -1
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +3 -2
- package/dist/cjs/biz-components/AplusDesc/index.js +1 -1
- package/dist/cjs/biz-components/AplusDesc/index.js.map +3 -3
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
- package/dist/cjs/biz-components/BrandEquity/types.d.ts +0 -1
- package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
- package/dist/cjs/biz-components/Category/index.d.ts +2 -2
- package/dist/cjs/biz-components/Category/index.js +1 -1
- package/dist/cjs/biz-components/Category/index.js.map +3 -3
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
- package/dist/cjs/biz-components/CollectionShelves/index.d.ts +7 -0
- package/dist/cjs/biz-components/CollectionShelves/index.js +2 -0
- package/dist/cjs/biz-components/CollectionShelves/index.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +7 -0
- package/dist/cjs/biz-components/CollectionsBanner/index.js +2 -0
- package/dist/cjs/biz-components/CollectionsBanner/index.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +43 -0
- package/dist/cjs/biz-components/CollectionsBanner/types.js +2 -0
- package/dist/cjs/biz-components/CollectionsBanner/types.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +25 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/price.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +24 -0
- package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +3 -2
- package/dist/cjs/biz-components/DownLoad/index.d.ts +3 -2
- package/dist/cjs/biz-components/Evaluate/index.d.ts +2 -2
- package/dist/cjs/biz-components/Faq/Faq.d.ts +2 -2
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +2 -0
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +7 -0
- package/dist/cjs/biz-components/FeatureCards/index.d.ts +2 -0
- package/dist/cjs/biz-components/FeatureCards/index.js +2 -0
- package/dist/cjs/biz-components/FeatureCards/index.js.map +7 -0
- package/dist/cjs/biz-components/FeatureCards/types.d.ts +27 -0
- package/dist/cjs/biz-components/FeatureCards/types.js +2 -0
- package/dist/cjs/biz-components/FeatureCards/types.js.map +7 -0
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
- package/dist/cjs/biz-components/FeatureShowcase/index.d.ts +2 -0
- package/dist/cjs/biz-components/FeatureShowcase/index.js +2 -0
- package/dist/cjs/biz-components/FeatureShowcase/index.js.map +7 -0
- package/dist/cjs/biz-components/FeatureShowcase/types.d.ts +23 -0
- package/dist/cjs/biz-components/FeatureShowcase/types.js +2 -0
- package/dist/cjs/biz-components/FeatureShowcase/types.js.map +7 -0
- package/dist/cjs/biz-components/Features/index.d.ts +3 -2
- package/dist/cjs/biz-components/Features/index.js +1 -1
- package/dist/cjs/biz-components/Features/index.js.map +3 -3
- package/dist/cjs/biz-components/FootCharger/index.d.ts +3 -2
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +3 -2
- package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -2
- package/dist/cjs/biz-components/GiftBox/index.js +1 -1
- package/dist/cjs/biz-components/GiftBox/index.js.map +3 -3
- package/dist/cjs/biz-components/Graphic/index.d.ts +2 -2
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +3 -2
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +2 -5
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +2 -0
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
- package/dist/cjs/biz-components/ImageTextFeature/index.d.ts +2 -0
- package/dist/cjs/biz-components/ImageTextFeature/index.js +2 -0
- package/dist/cjs/biz-components/ImageTextFeature/index.js.map +7 -0
- package/dist/cjs/biz-components/ImageTextFeature/types.d.ts +31 -0
- package/dist/cjs/biz-components/ImageTextFeature/types.js +2 -0
- package/dist/cjs/biz-components/ImageTextFeature/types.js.map +7 -0
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +2 -0
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +7 -0
- package/dist/cjs/biz-components/ImageWithText/index.d.ts +3 -0
- package/dist/cjs/biz-components/ImageWithText/index.js +2 -0
- package/dist/cjs/biz-components/ImageWithText/index.js.map +7 -0
- package/dist/cjs/biz-components/ImageWithText/types.d.ts +108 -0
- package/dist/cjs/biz-components/ImageWithText/types.js +2 -0
- package/dist/cjs/biz-components/ImageWithText/types.js.map +7 -0
- package/dist/cjs/biz-components/InlineVideo/index.d.ts +16 -0
- package/dist/cjs/biz-components/InlineVideo/index.js +2 -0
- package/dist/cjs/biz-components/InlineVideo/index.js.map +7 -0
- package/dist/cjs/biz-components/Ksp/index.d.ts +44 -0
- package/dist/cjs/biz-components/Ksp/index.js +2 -0
- package/dist/cjs/biz-components/Ksp/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/useScrollSpy.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/useScrollSpy.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -2
- package/dist/cjs/biz-components/MarqueeReview/index.d.ts +42 -0
- package/dist/cjs/biz-components/MarqueeReview/index.js +2 -0
- package/dist/cjs/biz-components/MarqueeReview/index.js.map +7 -0
- package/dist/cjs/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
- package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js +2 -0
- package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
- package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -2
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +2 -2
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -2
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +2 -2
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/index.js +2 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/index.js.map +7 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/types.d.ts +21 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/types.js +2 -0
- package/dist/cjs/biz-components/MediaSceneSwitcher/types.js.map +7 -0
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +2 -2
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -0
- package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
- package/dist/cjs/biz-components/Paginator/index.d.ts +7 -0
- package/dist/cjs/biz-components/Paginator/index.js +7 -0
- package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +54 -0
- package/dist/cjs/biz-components/ProductCompare/index.js +2 -0
- package/dist/cjs/biz-components/ProductCompare/index.js.map +7 -0
- package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +7 -0
- package/dist/cjs/biz-components/ProductHero/ProductHero.js +2 -0
- package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +7 -0
- package/dist/cjs/biz-components/ProductHero/index.d.ts +2 -0
- package/dist/cjs/biz-components/ProductHero/index.js +2 -0
- package/dist/cjs/biz-components/ProductHero/index.js.map +7 -0
- package/dist/cjs/biz-components/ProductHero/types.d.ts +23 -0
- package/dist/cjs/biz-components/ProductHero/types.js +2 -0
- package/dist/cjs/biz-components/ProductHero/types.js.map +7 -0
- package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +7 -0
- package/dist/cjs/biz-components/ProductNav/ProductNav.js +2 -0
- package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +7 -0
- package/dist/cjs/biz-components/ProductNav/index.d.ts +2 -0
- package/dist/cjs/biz-components/ProductNav/index.js +2 -0
- package/dist/cjs/biz-components/ProductNav/index.js.map +7 -0
- package/dist/cjs/biz-components/ProductNav/types.d.ts +35 -0
- package/dist/cjs/biz-components/ProductNav/types.js +2 -0
- package/dist/cjs/biz-components/ProductNav/types.js.map +7 -0
- package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -2
- package/dist/cjs/biz-components/SelectStore/index.js +1 -1
- package/dist/cjs/biz-components/SelectStore/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/cjs/biz-components/Slogan/index.d.ts +2 -2
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +1 -1
- package/dist/cjs/biz-components/Spacer/index.d.ts +2 -2
- package/dist/cjs/biz-components/Spacer/index.js +1 -1
- package/dist/cjs/biz-components/Spacer/index.js.map +2 -2
- package/dist/cjs/biz-components/Specs/index.d.ts +2 -2
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js +2 -0
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
- package/dist/cjs/biz-components/SpecsComparison/index.d.ts +2 -0
- package/dist/cjs/biz-components/SpecsComparison/index.js +2 -0
- package/dist/cjs/biz-components/SpecsComparison/index.js.map +7 -0
- package/dist/cjs/biz-components/SpecsComparison/types.d.ts +34 -0
- package/dist/cjs/biz-components/SpecsComparison/types.js +2 -0
- package/dist/cjs/biz-components/SpecsComparison/types.js.map +7 -0
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +2 -0
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +7 -0
- package/dist/cjs/biz-components/TabWithImage/index.d.ts +2 -0
- package/dist/cjs/biz-components/TabWithImage/index.js +2 -0
- package/dist/cjs/biz-components/TabWithImage/index.js.map +7 -0
- package/dist/cjs/biz-components/TabWithImage/types.d.ts +29 -0
- package/dist/cjs/biz-components/TabWithImage/types.js +2 -0
- package/dist/cjs/biz-components/TabWithImage/types.js.map +7 -0
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +2 -2
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/biz-components/Tabs/types.d.ts +11 -0
- package/dist/cjs/biz-components/Tabs/types.js +1 -1
- package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
- package/dist/cjs/biz-components/TabsGroup/index.d.ts +2 -2
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
- package/dist/cjs/biz-components/TabsWithMedia/index.d.ts +2 -0
- package/dist/cjs/biz-components/TabsWithMedia/index.js +2 -0
- package/dist/cjs/biz-components/TabsWithMedia/index.js.map +7 -0
- package/dist/cjs/biz-components/TabsWithMedia/types.d.ts +43 -0
- package/dist/cjs/biz-components/TabsWithMedia/types.js +2 -0
- package/dist/cjs/biz-components/TabsWithMedia/types.js.map +7 -0
- package/dist/cjs/biz-components/TextMarquee/index.d.ts +10 -0
- package/dist/cjs/biz-components/TextMarquee/index.js +2 -0
- package/dist/cjs/biz-components/TextMarquee/index.js.map +7 -0
- package/dist/cjs/biz-components/TextModal/index.js +1 -1
- package/dist/cjs/biz-components/TextModal/index.js.map +3 -3
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
- package/dist/cjs/biz-components/ThreeDCarousel/index.d.ts +2 -0
- package/dist/cjs/biz-components/ThreeDCarousel/index.js +2 -0
- package/dist/cjs/biz-components/ThreeDCarousel/index.js.map +7 -0
- package/dist/cjs/biz-components/ThreeDCarousel/types.d.ts +26 -0
- package/dist/cjs/biz-components/ThreeDCarousel/types.js +2 -0
- package/dist/cjs/biz-components/ThreeDCarousel/types.js.map +7 -0
- package/dist/cjs/biz-components/Title/index.d.ts +2 -2
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/types.d.ts +1 -0
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +2 -0
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +7 -0
- package/dist/cjs/biz-components/VideoFeature/index.d.ts +2 -0
- package/dist/cjs/biz-components/VideoFeature/index.js +2 -0
- package/dist/cjs/biz-components/VideoFeature/index.js.map +7 -0
- package/dist/cjs/biz-components/VideoFeature/types.d.ts +19 -0
- package/dist/cjs/biz-components/VideoFeature/types.js +2 -0
- package/dist/cjs/biz-components/VideoFeature/types.js.map +7 -0
- package/dist/cjs/biz-components/VideoModal/index.js +1 -1
- package/dist/cjs/biz-components/VideoModal/index.js.map +2 -2
- package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
- package/dist/cjs/biz-components/index.d.ts +42 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/alert.d.ts +2 -2
- package/dist/cjs/components/avatar.d.ts +8 -8
- package/dist/cjs/components/board.d.ts +2 -1
- package/dist/cjs/components/board.js +1 -1
- package/dist/cjs/components/board.js.map +3 -3
- package/dist/cjs/components/breadcrumb.d.ts +12 -0
- package/dist/cjs/components/breadcrumb.js +2 -0
- package/dist/cjs/components/breadcrumb.js.map +7 -0
- package/dist/cjs/components/container.d.ts +7 -7
- package/dist/cjs/components/dialog.d.ts +1 -1
- package/dist/cjs/components/drop-down.d.ts +3 -3
- package/dist/cjs/components/heading.d.ts +1 -0
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/input-number.d.ts +15 -15
- package/dist/cjs/components/link.d.ts +6 -6
- package/dist/cjs/components/picture.js +1 -1
- package/dist/cjs/components/picture.js.map +3 -3
- package/dist/cjs/components/tabs.d.ts +2 -2
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +2 -2
- package/dist/cjs/helpers/utils.d.ts +1 -0
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/hooks/useRollout.d.ts +2 -2
- package/dist/cjs/hooks/useRollout.js +1 -1
- package/dist/cjs/hooks/useRollout.js.map +2 -2
- package/dist/cjs/shared/ErrorBoundary.d.ts +18 -0
- package/dist/cjs/shared/ErrorBoundary.js +2 -0
- package/dist/cjs/shared/ErrorBoundary.js.map +7 -0
- package/dist/cjs/shared/Styles.d.ts +4 -4
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +3 -3
- package/dist/cjs/stories/InlineVideo.stories.js +164 -0
- package/dist/cjs/stories/InlineVideo.stories.js.map +7 -0
- package/dist/cjs/stories/MarqueeReview.stories.js +19 -0
- package/dist/cjs/stories/MarqueeReview.stories.js.map +7 -0
- package/dist/cjs/stories/MediaSceneSwitcher.stories.js +2 -0
- package/dist/cjs/stories/MediaSceneSwitcher.stories.js.map +7 -0
- package/dist/cjs/stories/ProductNav.stories.js +2 -0
- package/dist/cjs/stories/ProductNav.stories.js.map +7 -0
- package/dist/cjs/stories/ThreeDCarousel.stories.js +118 -0
- package/dist/cjs/stories/ThreeDCarousel.stories.js.map +7 -0
- package/dist/cjs/stories/featureCards.stories.js +61 -0
- package/dist/cjs/stories/featureCards.stories.js.map +7 -0
- package/dist/cjs/stories/featureShowcase.stories.js +44 -0
- package/dist/cjs/stories/featureShowcase.stories.js.map +7 -0
- package/dist/cjs/stories/imageTextFeature.stories.js +50 -0
- package/dist/cjs/stories/imageTextFeature.stories.js.map +7 -0
- package/dist/cjs/stories/imageWithText.stories.js +84 -0
- package/dist/cjs/stories/imageWithText.stories.js.map +7 -0
- package/dist/cjs/stories/ksp.stories.js +128 -0
- package/dist/cjs/stories/ksp.stories.js.map +7 -0
- package/dist/cjs/stories/picture.stories.js +2 -2
- package/dist/cjs/stories/picture.stories.js.map +3 -3
- package/dist/cjs/stories/productCompare.stories.js +54 -0
- package/dist/cjs/stories/productCompare.stories.js.map +7 -0
- package/dist/cjs/stories/productHero.stories.js +50 -0
- package/dist/cjs/stories/productHero.stories.js.map +7 -0
- package/dist/cjs/stories/shelfDisplay.stories.js +1 -1
- package/dist/cjs/stories/shelfDisplay.stories.js.map +3 -3
- package/dist/cjs/stories/specsComparison.stories.js +105 -0
- package/dist/cjs/stories/specsComparison.stories.js.map +7 -0
- package/dist/cjs/stories/tabWithImage.stories.js +53 -0
- package/dist/cjs/stories/tabWithImage.stories.js.map +7 -0
- package/dist/cjs/stories/tabsWithMedia.stories.js +68 -0
- package/dist/cjs/stories/tabsWithMedia.stories.js.map +7 -0
- package/dist/cjs/stories/videoFeature.stories.js +56 -0
- package/dist/cjs/stories/videoFeature.stories.js.map +7 -0
- package/dist/cjs/types/props.d.ts +9 -2
- package/dist/cjs/types/props.js +1 -1
- package/dist/cjs/types/props.js.map +1 -1
- package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -2
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +1 -1
- package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -2
- package/dist/esm/biz-components/AplusDesc/index.js +1 -1
- package/dist/esm/biz-components/AplusDesc/index.js.map +3 -3
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
- package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -1
- package/dist/esm/biz-components/Category/index.d.ts +2 -2
- package/dist/esm/biz-components/Category/index.js +1 -1
- package/dist/esm/biz-components/Category/index.js.map +3 -3
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
- package/dist/esm/biz-components/CollectionShelves/index.d.ts +7 -0
- package/dist/esm/biz-components/CollectionShelves/index.js +2 -0
- package/dist/esm/biz-components/CollectionShelves/index.js.map +7 -0
- package/dist/esm/biz-components/CollectionsBanner/index.d.ts +7 -0
- package/dist/esm/biz-components/CollectionsBanner/index.js +2 -0
- package/dist/esm/biz-components/CollectionsBanner/index.js.map +7 -0
- package/dist/esm/biz-components/CollectionsBanner/types.d.ts +43 -0
- package/dist/esm/biz-components/CollectionsBanner/types.js +1 -0
- package/dist/esm/biz-components/CollectionsBanner/types.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterList.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
- package/dist/esm/biz-components/CollectionsFilters/component/helper.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +25 -0
- package/dist/esm/biz-components/CollectionsFilters/component/price.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/index.d.ts +24 -0
- package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
- package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -2
- package/dist/esm/biz-components/DownLoad/index.d.ts +3 -2
- package/dist/esm/biz-components/Evaluate/index.d.ts +2 -2
- package/dist/esm/biz-components/Faq/Faq.d.ts +2 -2
- package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js +2 -0
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +7 -0
- package/dist/esm/biz-components/FeatureCards/index.d.ts +2 -0
- package/dist/esm/biz-components/FeatureCards/index.js +2 -0
- package/dist/esm/biz-components/FeatureCards/index.js.map +7 -0
- package/dist/esm/biz-components/FeatureCards/types.d.ts +27 -0
- package/dist/esm/biz-components/FeatureCards/types.js +1 -0
- package/dist/esm/biz-components/FeatureCards/types.js.map +7 -0
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
- package/dist/esm/biz-components/FeatureShowcase/index.d.ts +2 -0
- package/dist/esm/biz-components/FeatureShowcase/index.js +2 -0
- package/dist/esm/biz-components/FeatureShowcase/index.js.map +7 -0
- package/dist/esm/biz-components/FeatureShowcase/types.d.ts +23 -0
- package/dist/esm/biz-components/FeatureShowcase/types.js +1 -0
- package/dist/esm/biz-components/FeatureShowcase/types.js.map +7 -0
- package/dist/esm/biz-components/Features/index.d.ts +3 -2
- package/dist/esm/biz-components/Features/index.js +1 -1
- package/dist/esm/biz-components/Features/index.js.map +3 -3
- package/dist/esm/biz-components/FootCharger/index.d.ts +3 -2
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -2
- package/dist/esm/biz-components/GiftBox/index.d.ts +3 -2
- package/dist/esm/biz-components/GiftBox/index.js +1 -1
- package/dist/esm/biz-components/GiftBox/index.js.map +3 -3
- package/dist/esm/biz-components/Graphic/index.d.ts +2 -2
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
- package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -2
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +2 -5
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
- package/dist/esm/biz-components/ImageTextFeature/index.d.ts +2 -0
- package/dist/esm/biz-components/ImageTextFeature/index.js +2 -0
- package/dist/esm/biz-components/ImageTextFeature/index.js.map +7 -0
- package/dist/esm/biz-components/ImageTextFeature/types.d.ts +31 -0
- package/dist/esm/biz-components/ImageTextFeature/types.js +1 -0
- package/dist/esm/biz-components/ImageTextFeature/types.js.map +7 -0
- package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +2 -0
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +7 -0
- package/dist/esm/biz-components/ImageWithText/index.d.ts +3 -0
- package/dist/esm/biz-components/ImageWithText/index.js +2 -0
- package/dist/esm/biz-components/ImageWithText/index.js.map +7 -0
- package/dist/esm/biz-components/ImageWithText/types.d.ts +108 -0
- package/dist/esm/biz-components/ImageWithText/types.js +2 -0
- package/dist/esm/biz-components/ImageWithText/types.js.map +7 -0
- package/dist/esm/biz-components/InlineVideo/index.d.ts +16 -0
- package/dist/esm/biz-components/InlineVideo/index.js +2 -0
- package/dist/esm/biz-components/InlineVideo/index.js.map +7 -0
- package/dist/esm/biz-components/Ksp/index.d.ts +44 -0
- package/dist/esm/biz-components/Ksp/index.js +2 -0
- package/dist/esm/biz-components/Ksp/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/useScrollSpy.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/useScrollSpy.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -2
- package/dist/esm/biz-components/MarqueeReview/index.d.ts +42 -0
- package/dist/esm/biz-components/MarqueeReview/index.js +2 -0
- package/dist/esm/biz-components/MarqueeReview/index.js.map +7 -0
- package/dist/esm/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
- package/dist/esm/biz-components/MediaPlayerBase/index.backup.js +2 -0
- package/dist/esm/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
- package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -2
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js.map +2 -2
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -2
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +2 -2
- package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/index.js +2 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/index.js.map +7 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/types.d.ts +21 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/types.js +1 -0
- package/dist/esm/biz-components/MediaSceneSwitcher/types.js.map +7 -0
- package/dist/esm/biz-components/MemberEquity/index.d.ts +2 -2
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -0
- package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.js.map +2 -2
- package/dist/esm/biz-components/Paginator/index.d.ts +7 -0
- package/dist/esm/biz-components/Paginator/index.js +7 -0
- package/dist/esm/biz-components/Paginator/index.js.map +7 -0
- package/dist/esm/biz-components/ProductCompare/index.d.ts +54 -0
- package/dist/esm/biz-components/ProductCompare/index.js +2 -0
- package/dist/esm/biz-components/ProductCompare/index.js.map +7 -0
- package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +7 -0
- package/dist/esm/biz-components/ProductHero/ProductHero.js +2 -0
- package/dist/esm/biz-components/ProductHero/ProductHero.js.map +7 -0
- package/dist/esm/biz-components/ProductHero/index.d.ts +2 -0
- package/dist/esm/biz-components/ProductHero/index.js +2 -0
- package/dist/esm/biz-components/ProductHero/index.js.map +7 -0
- package/dist/esm/biz-components/ProductHero/types.d.ts +23 -0
- package/dist/esm/biz-components/ProductHero/types.js +1 -0
- package/dist/esm/biz-components/ProductHero/types.js.map +7 -0
- package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +7 -0
- package/dist/esm/biz-components/ProductNav/ProductNav.js +2 -0
- package/dist/esm/biz-components/ProductNav/ProductNav.js.map +7 -0
- package/dist/esm/biz-components/ProductNav/index.d.ts +2 -0
- package/dist/esm/biz-components/ProductNav/index.js +2 -0
- package/dist/esm/biz-components/ProductNav/index.js.map +7 -0
- package/dist/esm/biz-components/ProductNav/types.d.ts +35 -0
- package/dist/esm/biz-components/ProductNav/types.js +1 -0
- package/dist/esm/biz-components/ProductNav/types.js.map +7 -0
- package/dist/esm/biz-components/SelectStore/index.d.ts +3 -2
- package/dist/esm/biz-components/SelectStore/index.js +1 -1
- package/dist/esm/biz-components/SelectStore/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/esm/biz-components/Slogan/index.d.ts +2 -2
- package/dist/esm/biz-components/Slogan/index.js +1 -1
- package/dist/esm/biz-components/Slogan/index.js.map +1 -1
- package/dist/esm/biz-components/Spacer/index.d.ts +2 -2
- package/dist/esm/biz-components/Spacer/index.js +1 -1
- package/dist/esm/biz-components/Spacer/index.js.map +2 -2
- package/dist/esm/biz-components/Specs/index.d.ts +2 -2
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js +2 -0
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
- package/dist/esm/biz-components/SpecsComparison/index.d.ts +2 -0
- package/dist/esm/biz-components/SpecsComparison/index.js +2 -0
- package/dist/esm/biz-components/SpecsComparison/index.js.map +7 -0
- package/dist/esm/biz-components/SpecsComparison/types.d.ts +34 -0
- package/dist/esm/biz-components/SpecsComparison/types.js +1 -0
- package/dist/esm/biz-components/SpecsComparison/types.js.map +7 -0
- package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
- package/dist/esm/biz-components/TabWithImage/TabWithImage.js +2 -0
- package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +7 -0
- package/dist/esm/biz-components/TabWithImage/index.d.ts +2 -0
- package/dist/esm/biz-components/TabWithImage/index.js +2 -0
- package/dist/esm/biz-components/TabWithImage/index.js.map +7 -0
- package/dist/esm/biz-components/TabWithImage/types.d.ts +29 -0
- package/dist/esm/biz-components/TabWithImage/types.js +1 -0
- package/dist/esm/biz-components/TabWithImage/types.js.map +7 -0
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +2 -2
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/biz-components/Tabs/types.d.ts +11 -0
- package/dist/esm/biz-components/TabsGroup/index.d.ts +2 -2
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
- package/dist/esm/biz-components/TabsWithMedia/index.d.ts +2 -0
- package/dist/esm/biz-components/TabsWithMedia/index.js +2 -0
- package/dist/esm/biz-components/TabsWithMedia/index.js.map +7 -0
- package/dist/esm/biz-components/TabsWithMedia/types.d.ts +43 -0
- package/dist/esm/biz-components/TabsWithMedia/types.js +1 -0
- package/dist/esm/biz-components/TabsWithMedia/types.js.map +7 -0
- package/dist/esm/biz-components/TextMarquee/index.d.ts +10 -0
- package/dist/esm/biz-components/TextMarquee/index.js +2 -0
- package/dist/esm/biz-components/TextMarquee/index.js.map +7 -0
- package/dist/esm/biz-components/TextModal/index.js +1 -1
- package/dist/esm/biz-components/TextModal/index.js.map +2 -2
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
- package/dist/esm/biz-components/ThreeDCarousel/index.d.ts +2 -0
- package/dist/esm/biz-components/ThreeDCarousel/index.js +2 -0
- package/dist/esm/biz-components/ThreeDCarousel/index.js.map +7 -0
- package/dist/esm/biz-components/ThreeDCarousel/types.d.ts +26 -0
- package/dist/esm/biz-components/ThreeDCarousel/types.js +1 -0
- package/dist/esm/biz-components/ThreeDCarousel/types.js.map +7 -0
- package/dist/esm/biz-components/Title/index.d.ts +2 -2
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/Title/types.d.ts +1 -0
- package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
- package/dist/esm/biz-components/VideoFeature/VideoFeature.js +2 -0
- package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +7 -0
- package/dist/esm/biz-components/VideoFeature/index.d.ts +2 -0
- package/dist/esm/biz-components/VideoFeature/index.js +2 -0
- package/dist/esm/biz-components/VideoFeature/index.js.map +7 -0
- package/dist/esm/biz-components/VideoFeature/types.d.ts +19 -0
- package/dist/esm/biz-components/VideoFeature/types.js +1 -0
- package/dist/esm/biz-components/VideoFeature/types.js.map +7 -0
- package/dist/esm/biz-components/VideoModal/index.js +1 -1
- package/dist/esm/biz-components/VideoModal/index.js.map +2 -2
- package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
- package/dist/esm/biz-components/index.d.ts +42 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/alert.d.ts +2 -2
- package/dist/esm/components/avatar.d.ts +8 -8
- package/dist/esm/components/board.d.ts +2 -1
- package/dist/esm/components/board.js +1 -1
- package/dist/esm/components/board.js.map +3 -3
- package/dist/esm/components/breadcrumb.d.ts +12 -0
- package/dist/esm/components/breadcrumb.js +2 -0
- package/dist/esm/components/breadcrumb.js.map +7 -0
- package/dist/esm/components/container.d.ts +7 -7
- package/dist/esm/components/dialog.d.ts +1 -1
- package/dist/esm/components/drop-down.d.ts +3 -3
- package/dist/esm/components/heading.d.ts +1 -0
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/input-number.d.ts +15 -15
- package/dist/esm/components/link.d.ts +6 -6
- package/dist/esm/components/picture.js +1 -1
- package/dist/esm/components/picture.js.map +3 -3
- package/dist/esm/components/tabs.d.ts +2 -2
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.js.map +2 -2
- package/dist/esm/helpers/utils.d.ts +1 -0
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/hooks/useRollout.d.ts +2 -2
- package/dist/esm/hooks/useRollout.js +1 -1
- package/dist/esm/hooks/useRollout.js.map +3 -3
- package/dist/esm/shared/ErrorBoundary.d.ts +18 -0
- package/dist/esm/shared/ErrorBoundary.js +2 -0
- package/dist/esm/shared/ErrorBoundary.js.map +7 -0
- package/dist/esm/shared/Styles.d.ts +4 -4
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +3 -3
- package/dist/esm/stories/InlineVideo.stories.js +164 -0
- package/dist/esm/stories/InlineVideo.stories.js.map +7 -0
- package/dist/esm/stories/MarqueeReview.stories.js +19 -0
- package/dist/esm/stories/MarqueeReview.stories.js.map +7 -0
- package/dist/esm/stories/MediaSceneSwitcher.stories.js +2 -0
- package/dist/esm/stories/MediaSceneSwitcher.stories.js.map +7 -0
- package/dist/esm/stories/ProductNav.stories.js +2 -0
- package/dist/esm/stories/ProductNav.stories.js.map +7 -0
- package/dist/esm/stories/ThreeDCarousel.stories.js +118 -0
- package/dist/esm/stories/ThreeDCarousel.stories.js.map +7 -0
- package/dist/esm/stories/featureCards.stories.js +61 -0
- package/dist/esm/stories/featureCards.stories.js.map +7 -0
- package/dist/esm/stories/featureShowcase.stories.js +44 -0
- package/dist/esm/stories/featureShowcase.stories.js.map +7 -0
- package/dist/esm/stories/imageTextFeature.stories.js +50 -0
- package/dist/esm/stories/imageTextFeature.stories.js.map +7 -0
- package/dist/esm/stories/imageWithText.stories.js +84 -0
- package/dist/esm/stories/imageWithText.stories.js.map +7 -0
- package/dist/esm/stories/ksp.stories.js +128 -0
- package/dist/esm/stories/ksp.stories.js.map +7 -0
- package/dist/esm/stories/picture.stories.js +2 -2
- package/dist/esm/stories/picture.stories.js.map +3 -3
- package/dist/esm/stories/productCompare.stories.js +54 -0
- package/dist/esm/stories/productCompare.stories.js.map +7 -0
- package/dist/esm/stories/productHero.stories.js +50 -0
- package/dist/esm/stories/productHero.stories.js.map +7 -0
- package/dist/esm/stories/shelfDisplay.stories.js +1 -1
- package/dist/esm/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/esm/stories/specsComparison.stories.js +105 -0
- package/dist/esm/stories/specsComparison.stories.js.map +7 -0
- package/dist/esm/stories/tabWithImage.stories.js +53 -0
- package/dist/esm/stories/tabWithImage.stories.js.map +7 -0
- package/dist/esm/stories/tabsWithMedia.stories.js +68 -0
- package/dist/esm/stories/tabsWithMedia.stories.js.map +7 -0
- package/dist/esm/stories/videoFeature.stories.js +56 -0
- package/dist/esm/stories/videoFeature.stories.js.map +7 -0
- package/dist/esm/types/props.d.ts +9 -2
- package/package.json +20 -17
- package/style.css +39 -0
- package/tailwind.config.js +24 -0
- package/dist/cjs/stories/HeroBanner.stories.d.ts +0 -28
- package/dist/cjs/stories/MemberEquity.stories.d.ts +0 -9
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
- package/dist/cjs/stories/accordionCards.stories.d.ts +0 -17
- package/dist/cjs/stories/alert.stories.d.ts +0 -27
- package/dist/cjs/stories/avatar.stories.d.ts +0 -39
- package/dist/cjs/stories/badge.stories.d.ts +0 -31
- package/dist/cjs/stories/bizTabs.stories.d.ts +0 -7
- package/dist/cjs/stories/board.stories.d.ts +0 -6
- package/dist/cjs/stories/brandEquity.stories.d.ts +0 -16
- package/dist/cjs/stories/button.stories.d.ts +0 -56
- package/dist/cjs/stories/card.stories.d.ts +0 -27
- package/dist/cjs/stories/carousel.stories.d.ts +0 -8
- package/dist/cjs/stories/category.stories.d.ts +0 -17
- package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
- package/dist/cjs/stories/container.stories.d.ts +0 -28
- package/dist/cjs/stories/cpnBanner.stories.d.ts +0 -14
- package/dist/cjs/stories/cpnCountdown.stories.d.ts +0 -12
- package/dist/cjs/stories/cpnNavigation.stories.d.ts +0 -14
- package/dist/cjs/stories/cpnProductcard.stories.d.ts +0 -14
- package/dist/cjs/stories/cpnTitle.stories.d.ts +0 -14
- package/dist/cjs/stories/creativeModule.stories.d.ts +0 -19
- package/dist/cjs/stories/dialog.stories.d.ts +0 -20
- package/dist/cjs/stories/drawer.stories.d.ts +0 -20
- package/dist/cjs/stories/drop-down.stories.d.ts +0 -16
- package/dist/cjs/stories/evaluate.stories.d.ts +0 -16
- package/dist/cjs/stories/faq.stories.d.ts +0 -21
- package/dist/cjs/stories/graphic.stories.d.ts +0 -64
- package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +0 -6
- package/dist/cjs/stories/grid.stories.d.ts +0 -22
- package/dist/cjs/stories/heading.stories.d.ts +0 -84
- package/dist/cjs/stories/input-number.stories.d.ts +0 -39
- package/dist/cjs/stories/input.stories.d.ts +0 -35
- package/dist/cjs/stories/link.stories.d.ts +0 -69
- package/dist/cjs/stories/marquee.stories.d.ts +0 -30
- package/dist/cjs/stories/mediaplayerBase.stories.d.ts +0 -6
- package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +0 -16
- package/dist/cjs/stories/picture.stories.d.ts +0 -23
- package/dist/cjs/stories/popover.stories.d.ts +0 -17
- package/dist/cjs/stories/radio.stories.d.ts +0 -39
- package/dist/cjs/stories/shelfDisplay.stories.d.ts +0 -16
- package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
- package/dist/cjs/stories/slogan.stories.d.ts +0 -20
- package/dist/cjs/stories/specs.stories.d.ts +0 -13
- package/dist/cjs/stories/tabs.stories.d.ts +0 -373
- package/dist/cjs/stories/text.stories.d.ts +0 -86
- package/dist/cjs/stories/whychoose.stories.d.ts +0 -21
- package/dist/esm/stories/HeroBanner.stories.d.ts +0 -28
- package/dist/esm/stories/MemberEquity.stories.d.ts +0 -9
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
- package/dist/esm/stories/accordionCards.stories.d.ts +0 -17
- package/dist/esm/stories/alert.stories.d.ts +0 -27
- package/dist/esm/stories/avatar.stories.d.ts +0 -39
- package/dist/esm/stories/badge.stories.d.ts +0 -31
- package/dist/esm/stories/bizTabs.stories.d.ts +0 -7
- package/dist/esm/stories/board.stories.d.ts +0 -6
- package/dist/esm/stories/brandEquity.stories.d.ts +0 -16
- package/dist/esm/stories/button.stories.d.ts +0 -56
- package/dist/esm/stories/card.stories.d.ts +0 -27
- package/dist/esm/stories/carousel.stories.d.ts +0 -8
- package/dist/esm/stories/category.stories.d.ts +0 -17
- package/dist/esm/stories/checkbox.stories.d.ts +0 -46
- package/dist/esm/stories/container.stories.d.ts +0 -28
- package/dist/esm/stories/cpnBanner.stories.d.ts +0 -14
- package/dist/esm/stories/cpnCountdown.stories.d.ts +0 -12
- package/dist/esm/stories/cpnNavigation.stories.d.ts +0 -14
- package/dist/esm/stories/cpnProductcard.stories.d.ts +0 -14
- package/dist/esm/stories/cpnTitle.stories.d.ts +0 -14
- package/dist/esm/stories/creativeModule.stories.d.ts +0 -19
- package/dist/esm/stories/dialog.stories.d.ts +0 -20
- package/dist/esm/stories/drawer.stories.d.ts +0 -20
- package/dist/esm/stories/drop-down.stories.d.ts +0 -16
- package/dist/esm/stories/evaluate.stories.d.ts +0 -16
- package/dist/esm/stories/faq.stories.d.ts +0 -21
- package/dist/esm/stories/graphic.stories.d.ts +0 -64
- package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +0 -6
- package/dist/esm/stories/grid.stories.d.ts +0 -22
- package/dist/esm/stories/heading.stories.d.ts +0 -84
- package/dist/esm/stories/input-number.stories.d.ts +0 -39
- package/dist/esm/stories/input.stories.d.ts +0 -35
- package/dist/esm/stories/link.stories.d.ts +0 -69
- package/dist/esm/stories/marquee.stories.d.ts +0 -30
- package/dist/esm/stories/mediaplayerBase.stories.d.ts +0 -6
- package/dist/esm/stories/mediaplayerMulti.stories.d.ts +0 -16
- package/dist/esm/stories/picture.stories.d.ts +0 -23
- package/dist/esm/stories/popover.stories.d.ts +0 -17
- package/dist/esm/stories/radio.stories.d.ts +0 -39
- package/dist/esm/stories/shelfDisplay.stories.d.ts +0 -16
- package/dist/esm/stories/skeleton.stories.d.ts +0 -20
- package/dist/esm/stories/slogan.stories.d.ts +0 -20
- package/dist/esm/stories/specs.stories.d.ts +0 -13
- package/dist/esm/stories/tabs.stories.d.ts +0 -373
- package/dist/esm/stories/text.stories.d.ts +0 -86
- package/dist/esm/stories/whychoose.stories.d.ts +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { Text, Picture, Badge } from '../../../../../components/index.js'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n useEffect,\n type Dispatch,\n type SetStateAction,\n useImperativeHandle,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination, Autoplay } from 'swiper/modules'\nimport { cn } from '../../../../../helpers/index.js'\nimport { GalleryTabType } from './types.js'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useVariantMedia } from '../../../hooks/use-variant-media.js'\nimport { SpecsModal } from './components/SpecsModal.js'\nimport CompareModal from './components/CompareModal.js'\nimport { formatPrice } from '../../../utils/index.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\n\nimport type { Swiper as SwiperType } from 'swiper'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\nimport type { ProductGalleryProps, ProductGalleryTabItemProps, GalleryTabItemProps } from './types.js'\nimport { debounce } from 'es-toolkit'\n\nconst SwiperLeftButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect x=\"48\" y=\"48\" width=\"48\" height=\"48\" rx=\"24\" transform=\"rotate(-180 48 48)\" fill=\"white\" />\n <path\n d=\"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst SwiperRightButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect width=\"48\" height=\"48\" rx=\"24\" transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)\" fill=\"white\" />\n <path\n d=\"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst ProductGallery = () => {\n const { copyWriting } = useAiuiContext()\n const { product, variant, selectedOptions } = useBizProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const productGalleryTabRef = useRef<ProductGalleryTabRef>(null)\n\n const customMediaList = variant?.metafields?.component?.custom_media_list\n let productList: ImageMedia[], sceneList: ImageMedia[], keyFeaturesList: ImageMedia[], videoList: VideoMedia[]\n\n if (customMediaList && customMediaList?.available) {\n productList = customMediaList?.product || []\n sceneList = customMediaList?.scenarios || []\n keyFeaturesList = customMediaList?.keyFeatures || []\n videoList = customMediaList?.video || []\n } else {\n productList = defaultMediaData?.productList\n sceneList = defaultMediaData?.sceneList\n keyFeaturesList = defaultMediaData?.keyFeaturesList\n videoList = defaultMediaData?.videoList\n }\n\n const allMedia = useMemo(() => [...productList, ...sceneList, ...videoList], [productList, sceneList, videoList])\n\n const galleryMap: Record<string, ImageMedia[] | VideoMedia[]> = {\n productList: productList,\n sceneList: sceneList,\n keyFeaturesList: keyFeaturesList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab: ProductGalleryProps =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n const variantProductGallery =\n variant?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => {\n // \u5982\u679C\u5B58\u5728 images \u6570\u7EC4\u4E14\u6709\u6709\u6548\u503C\uFF0C\u4F18\u5148\u4F7F\u7528 images \u521B\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6570\u636E\n const variantProductGalleryItem = variantProductGallery?.find(\n (variantItem: any) => item?.galleries === variantItem?.galleries\n )\n let galleries = galleryMap[item?.galleries] || []\n\n if (\n variantProductGalleryItem?.images &&\n Array.isArray(variantProductGalleryItem.images) &&\n variantProductGalleryItem.images.length > 0\n ) {\n // \u5904\u7406 images \u6570\u7EC4\uFF0C\u4E3A\u6BCF\u5F20\u56FE\u7247\u751F\u6210\u54CD\u5E94\u5F0F source\n const imageGalleries = variantProductGalleryItem.images\n .map((imageItem: any) => {\n // \u4ECE\u5355\u4E2A\u56FE\u7247\u5BF9\u8C61\u751F\u6210\u54CD\u5E94\u5F0F\u56FE\u7247\u7684 source \u5B57\u7B26\u4E32\n const imageSourceParts: string[] = []\n if (imageItem.image_1920 && imageItem.image_1920.trim()) {\n imageSourceParts.push(`${imageItem.image_1920}`)\n }\n if (imageItem.image_1440 && imageItem.image_1440.trim()) {\n imageSourceParts.push(`${imageItem.image_1440} 1919`)\n }\n if (imageItem.image_1024 && imageItem.image_1024.trim()) {\n imageSourceParts.push(`${imageItem.image_1024} 1439`)\n }\n if (imageItem.image_768 && imageItem.image_768.trim()) {\n imageSourceParts.push(`${imageItem.image_768} 1023`)\n }\n if (imageItem.image_390 && imageItem.image_390.trim()) {\n imageSourceParts.push(`${imageItem.image_390} 767`)\n }\n\n // \u5982\u679C\u751F\u6210\u4E86\u6709\u6548\u7684\u54CD\u5E94\u5F0F source\uFF0C\u8FD4\u56DE\u56FE\u7247\u5BF9\u8C61\n if (imageSourceParts.length > 0) {\n const responsiveSource = imageSourceParts.join(', ')\n return {\n image: {\n url: responsiveSource,\n altText: item.comment?.content || '',\n },\n // \u6807\u8BB0\u8FD9\u662F\u4ECE images \u751F\u6210\u7684\uFF0C\u7528\u4E8E\u540E\u7EED\u5904\u7406\n _fromImages: true,\n _responsiveSource: responsiveSource,\n } as any\n }\n return null\n })\n .filter((gallery: any) => gallery !== null) // \u8FC7\u6EE4\u6389\u65E0\u6548\u7684\u56FE\u7247\n\n // \u5982\u679C\u4ECE images \u6570\u7EC4\u751F\u6210\u4E86\u6709\u6548\u7684\u56FE\u7247\uFF0C\u4F7F\u7528\u5B83\u4EEC\uFF1B\u5426\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries\n if (imageGalleries.length > 0) {\n galleries = imageGalleries\n }\n // \u5982\u679C images \u5B58\u5728\u4F46\u90FD\u662F\u7A7A\u503C\uFF0C\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries \u903B\u8F91\n }\n\n return {\n ...item,\n galleries,\n }\n })\n .filter((item: any) => item.galleries.length > 0)\n }, [variant?.payload, galleryMap, product?.payload])\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\n const [activeTabIndex, setActiveTabIndex] = useState(0)\n const [targetSlideIndex, setTargetSlideIndex] = useState<number | null>(null)\n\n // \u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\uFF09\n const handleNextTab = useCallback(() => {\n const nextIndex = (activeTabIndex + 1) % galleryTabs.length\n setActiveTabIndex(nextIndex)\n setActiveGalleryTab(galleryTabs[nextIndex])\n setTargetSlideIndex(0) // \u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n }, [activeTabIndex, galleryTabs])\n\n // \u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u6700\u540E\u4E00\u5F20\uFF09\n const handlePrevTab = useCallback(() => {\n const prevIndex = activeTabIndex === 0 ? galleryTabs.length - 1 : activeTabIndex - 1\n setActiveTabIndex(prevIndex)\n setActiveGalleryTab(galleryTabs[prevIndex])\n // \u8DF3\u8F6C\u5230\u4E0A\u4E00\u4E2A tab \u7684\u6700\u540E\u4E00\u5F20\n const prevTabGalleries = galleryTabs[prevIndex]?.galleries || []\n setTargetSlideIndex(prevTabGalleries.length - 1)\n }, [activeTabIndex, galleryTabs])\n\n // \u5F53 activeTabIndex \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\n useEffect(() => {\n if (activeTabIndex !== null && activeTabIndex !== undefined) {\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDD DOM \u5DF2\u66F4\u65B0\n requestAnimationFrame(() => {\n productGalleryTabRef.current?.scrollToTab(activeTabIndex)\n })\n }\n }, [activeTabIndex])\n\n useEffect(() => {\n // \u5F53 variant \u53D8\u5316\u65F6\uFF0C\u5207\u6362\u5230\u7B2C\u4E00\u4E2A tab\n setActiveGalleryTab(galleryTabs[0])\n setActiveTabIndex(0)\n }, [variant?.id])\n\n // \u4E3A\u6BCF\u4E2A tab \u6E32\u67D3\u5BF9\u5E94\u7684\u7EC4\u4EF6\n const renderGalleryForTab = (tab: any, index: number) => {\n switch (tab?.galleryTabType) {\n case GalleryTabType.GALLERY_IMAGE_MAIN:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_FEATURES:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_SCENE:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return (\n <ProductGalleryTabVideo\n {...tab}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" value={activeGalleryTab?.tabValue} defaultValue={galleryTabs?.[0]?.tabValue}>\n <div className=\"tablet:h-[620px] laptop-md:rounded-2xl laptop-md:h-[560px] lg-desktop:h-[700px] laptop-md:relative h-[420px] overflow-hidden bg-[#EAEAEC] \">\n {galleryTabs.map((item: any, index: number) => {\n return (\n <Content key={item.tabValue} className=\"h-full\" value={item.tabValue}>\n {renderGalleryForTab(item, index)}\n </Content>\n )\n })}\n </div>\n <ProductGalleryTab\n ref={productGalleryTabRef}\n galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n setActiveTabIndex={setActiveTabIndex}\n setTargetSlideIndex={setTargetSlideIndex}\n />\n </Root>\n </div>\n )\n}\n\nexport interface ProductGalleryTabRef {\n scrollToTab: (index: number) => void\n}\n\nconst ProductGalleryTab = forwardRef<\n ProductGalleryTabRef,\n {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n setActiveTabIndex: Dispatch<SetStateAction<number>>\n setTargetSlideIndex: Dispatch<SetStateAction<number | null>>\n }\n>((props, ref) => {\n const { galleryTabs, activeGalleryTab, setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex } = props\n const { product } = useBizProductContext()\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const triggerRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const scrollToEvent = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = event.currentTarget\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }, [])\n\n const handleGalleryTabClick = useCallback(\n (el: React.MouseEvent<HTMLButtonElement>, item: GalleryTabItemProps, index: number) => {\n setActiveGalleryTab(item)\n setActiveTabIndex(index)\n setTargetSlideIndex(0) // \u624B\u52A8\u70B9\u51FB tab \u65F6\uFF0C\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n scrollToEvent(el)\n },\n [setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex, scrollToEvent]\n )\n\n // \u6EDA\u52A8\u5230\u6307\u5B9A\u7D22\u5F15\u7684 tab\n const scrollToTab = useCallback(\n (index: number) => {\n if (scrollContainerRef.current && galleryTabs[index]) {\n const container = scrollContainerRef.current\n const tabItem = galleryTabs[index]\n const button = triggerRefs.current.get(tabItem.tabValue)\n\n if (button) {\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n },\n [galleryTabs]\n )\n\n useImperativeHandle(ref, () => ({\n scrollToTab,\n }))\n\n return (\n <div className=\"laptop:inset-x-16 tablet:mt-3 laptop-md:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between\">\n <List\n ref={scrollContainerRef}\n className=\"laptop:p-0 laptop-md:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div className=\"whitespace-nowrap\">\n {galleryTabs?.map((item, index) => {\n return (\n <Trigger\n ref={el => {\n if (el) {\n triggerRefs.current.set(item.tabValue, el)\n } else {\n triggerRefs.current.delete(item.tabValue)\n }\n }}\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={el => handleGalleryTabClick(el, item, index)}\n key={item.tabValue + index}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </div>\n </List>\n <div className=\"laptop:gap-2 laptop:flex hidden\">\n {product.metafields?.global?.specifications && (\n <>\n <SpecsModal /> | <CompareModal />\n </>\n )}\n </div>\n </div>\n )\n})\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useBizProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const [textGroups, setTextGroups] = useState<string[]>([])\n const measureRef = useRef<HTMLDivElement>(null)\n\n const imageClassName = useMemo(() => {\n if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_MAIN) {\n return 'size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_FEATURES) {\n // return '420px'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_SCENE) {\n // return '560px'\n }\n }, [props?.galleryTabType])\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && !!props.targetSlideIndex) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n // \u5C06\u6587\u672C\u63092\u884C\u4E00\u7EC4\u8FDB\u884C\u5206\u7EC4\n useEffect(() => {\n const calculateGroups = () => {\n if (!props?.comment?.content || !measureRef.current) return\n\n const measureEl = measureRef.current\n\n // \u5148\u6D4B\u91CF\u5355\u884C\u9AD8\u5EA6\n measureEl.textContent = 'Test'\n const singleLineHeight = measureEl.offsetHeight\n const twoLinesMaxHeight = singleLineHeight * 2 + 2 // 2\u884C\u7684\u6700\u5927\u9AD8\u5EA6\uFF0C\u52A02px\u5BB9\u5DEE\n\n // \u6E05\u7406HTML\u6807\u7B7E\u5E76\u5206\u5272\u5355\u8BCD\n const cleanText = props.comment.content\n .replace(/<[^>]*>/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n const words = cleanText.split(' ')\n const groups: string[] = []\n let currentGroup = ''\n\n for (let i = 0; i < words.length; i++) {\n const word = words[i]\n const testText = currentGroup ? `${currentGroup} ${word}` : word\n\n // \u76F4\u63A5\u5728 measureRef \u5143\u7D20\u4E0A\u6D4B\u91CF\n measureEl.textContent = testText\n const testHeight = measureEl.offsetHeight\n\n if (testHeight > twoLinesMaxHeight) {\n // \u5F53\u524D\u5355\u8BCD\u4F1A\u5BFC\u81F4\u8D85\u8FC72\u884C\uFF0C\u4FDD\u5B58\u4E4B\u524D\u7684\u7EC4\n if (currentGroup) {\n groups.push(currentGroup)\n currentGroup = word\n } else {\n // \u5355\u4E2A\u5355\u8BCD\u5C31\u8D85\u8FC72\u884C\uFF0C\u5F3A\u5236\u52A0\u5165\n groups.push(word)\n currentGroup = ''\n }\n } else {\n // \u8FD8\u57282\u884C\u4EE5\u5185\uFF0C\u7EE7\u7EED\u7D2F\u52A0\n currentGroup = testText\n }\n }\n\n // \u6DFB\u52A0\u6700\u540E\u4E00\u7EC4\n if (currentGroup) {\n groups.push(currentGroup)\n }\n\n // \u6E05\u7A7A\u6D4B\u91CF\u5143\u7D20\n measureEl.textContent = ''\n setTextGroups(groups)\n }\n\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDDDOM\u6E32\u67D3\u5B8C\u6210\u540E\u518D\u8BA1\u7B97\n const rafId = requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n calculateGroups()\n })\n })\n\n // \u76D1\u542C\u7A97\u53E3\u5927\u5C0F\u53D8\u5316\uFF0C\u91CD\u65B0\u8BA1\u7B97\u5206\u7EC4\n const handleResize = () => {\n calculateGroups()\n }\n\n window.addEventListener('resize', debounce(handleResize, 500))\n return () => {\n cancelAnimationFrame(rafId)\n window.removeEventListener('resize', debounce(handleResize, 500))\n }\n }, [props?.comment?.content])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n ref={ref}\n className=\"h-full\"\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n thumbs={{ swiper: thumbsSwiper }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\uFF08tabId + index\uFF09\n const exposureKey = `${props.tabValue}-${jIndex}`\n\n // \u66DD\u5149\u68C0\u6D4B\u56DE\u8C03\n const handleExposure = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: props?.tabLabel || '',\n position: jIndex + 1,\n creative_id: '',\n component_title: '',\n component_description: '',\n navigation: '',\n },\n })\n }\n\n // \u4F18\u5148\u4F7F\u7528\u4ECE images \u751F\u6210\u7684\u54CD\u5E94\u5F0F source\uFF0C\u5426\u5219\u4F7F\u7528\u539F\u6709\u7684 image.url\n const pictureSource = (item as any)?._responsiveSource || item?.image?.url || ''\n\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <ExposureDetector\n onExposure={handleExposure}\n exposureKey={exposureKey}\n threshold={0.5}\n duration={2000}\n className=\"h-full\"\n >\n <Picture\n source={pictureSource}\n alt={item?.image?.altText}\n className={cn('h-full', imageClassName)}\n imgClassName=\"object-cover h-full\"\n />\n </ExposureDetector>\n </SwiperSlide>\n )\n })}\n </Swiper>\n {variant.availableForSale && !!totalSavings && !props.index && (\n <Badge\n size=\"lg\"\n className=\"bg-brand laptop:left-16 laptop:top-5 laptop-md:left-6 laptop-md:top-6 absolute left-4 top-3 z-[2] text-white\"\n >\n {`${formatPrice({\n amount: totalSavings,\n currencyCode: variant?.price?.currencyCode,\n locale: locale,\n })} ${copyWriting?.off}`}\n </Badge>\n )}\n <div\n className={cn(\n 'tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 laptop-md:left-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n `swiper-button`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n <div\n className={cn(\n 'tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 laptop-md:right-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n `swiper-button`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n {/* {props?.galleries?.map((item, jIndex) => {\n return (\n <Picture\n key={props?.id + 'SwiperSlideItem' + jIndex}\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-cover h-full\"\n />\n )\n })} */}\n <div className=\"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 laptop-md:bottom-[20px] laptop-md:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between\">\n <div className=\"tablet:block hidden\">\n <Swiper\n className=\"flex items-center justify-between\"\n onSwiper={setThumbsSwiper}\n spaceBetween={12}\n slidesPerView={6}\n freeMode={true}\n watchSlidesProgress={true}\n modules={[Navigation, Thumbs]}\n >\n {props?.galleries?.map((item, jIndex) => (\n <SwiperSlide\n key={props?.id + 'SwiperSlideThumbItem' + jIndex}\n className=\"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white\"\n imgClassName=\"object-cover h-full\"\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n {!props?.index && (\n <div className=\"flex items-center gap-2\">\n <Picture\n source={props?.comment?.avatar?.url}\n className=\"laptop:size-10 size-8 shrink-0 rounded-full\"\n imgClassName=\"object-cover \"\n />\n <div className=\"relative max-w-[528px]\">\n {/* \u9690\u85CF\u7684\u6D4B\u91CF\u5143\u7D20 */}\n <div\n ref={measureRef}\n className=\"lg-desktop:text-base pointer-events-none text-sm font-bold text-[#1D1D1F] opacity-0\"\n style={{ visibility: 'hidden' }}\n />\n <Swiper\n modules={[Autoplay]}\n loop={textGroups.length > 1}\n className=\"h-[44px]\"\n direction=\"vertical\"\n autoplay={{ delay: 5000, disableOnInteraction: false }}\n >\n {textGroups.length > 0 ? (\n textGroups.map((group, index) => (\n <SwiperSlide key={index + 'text-group'}>\n <Text\n html={group}\n as=\"div\"\n className=\"lg-desktop:text-base overflow-hidden text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n ))\n ) : (\n <SwiperSlide>\n <Text\n as=\"div\"\n html={props?.comment?.content}\n className=\"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n )}\n </Swiper>\n </div>\n </div>\n )}\n </div>\n <div\n ref={paginationRef}\n className=\"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#080A0F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100\"\n />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && props.targetSlideIndex !== null && props.targetSlideIndex !== undefined) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n className=\"h-full\"\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <video controls className=\"size-full object-cover\">\n <track kind=\"captions\" />\n <source src={item?.sources?.[0]?.url} type=\"video/mp4\" />\n <source src={item?.sources?.[0]?.url} type=\"video/webm\" />\n <source src={item?.sources?.[0]?.url} type=\"video/ogg\" />\n </video>\n </SwiperSlide>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default withLayout(ProductGallery)\n"],
|
|
5
|
-
"mappings": "AAkCI,OAqVM,YAAAA,GApVJ,OAAAC,EADF,QAAAC,MAAA,oBAlCJ,OAAS,kBAAAC,MAAsB,oCAC/B,OAAS,QAAAC,EAAM,WAAAC,EAAS,SAAAC,OAAa,qCACrC,OACE,eAAAC,EACA,WAAAC,EACA,YAAAC,EACA,cAAAC,EACA,UAAAC,EACA,aAAAC,EAGA,uBAAAC,OACK,QACP,OAAS,UAAAC,EAAQ,eAAAC,MAAmC,eACpD,OAAS,cAAAC,EAAY,cAAAC,EAAY,UAAAC,EAAQ,cAAAC,GAAY,YAAAC,OAAgB,iBACrE,OAAS,MAAAC,MAAU,kCACnB,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,WAAAC,GAAS,QAAAC,GAAM,QAAAC,GAAM,WAAAC,OAAe,uBAC7C,OAAS,wBAAAC,MAA4B,iCACrC,OAAS,mBAAAC,OAAuB,sCAChC,OAAS,cAAAC,OAAkB,6BAC3B,OAAOC,OAAkB,+BACzB,OAAS,eAAAC,OAAmB,0BAC5B,OAAS,cAAAC,OAAkB,kCAC3B,OAAS,WAAAC,OAAe,iCACxB,OAAS,oBAAAC,OAAwB,qCAKjC,OAAS,YAAAC,OAAgB,aAEzB,MAAMC,GAAwBC,GAE1BnC,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,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ACrB,SAAAb,EAAC,SAAM,SAAQ,GAAC,UAAU,yBACxB,UAAAD,EAAC,SAAM,KAAK,WAAW,EACvBA,EAAC,UAAO,IAAKwD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,EACvDxD,EAAC,UAAO,IAAKwD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,aAAa,EACxDxD,EAAC,UAAO,IAAKwD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,GACzD,GANmCpB,GAAO,GAAK,kBAAoBiF,CAOrE,CAEH,EACH,EACArH,EAAC,OACC,UAAWoB,EACT,sIAEF,EACA,QAASoF,EAET,SAAAxG,EAACmC,GAAA,CAAqB,UAAU,oCAAoC,EACtE,EACAnC,EAAC,OACC,UAAWoB,EACT,uIAEF,EACA,QAASqF,EAET,SAAAzG,EAACqC,GAAA,CAAsB,UAAU,oCAAoC,EACvE,GACF,CAEJ,EAEMqF,GAA2BtF,GACxBpC,EAAC,OAAI,mBAAO,EAGrB,IAAO2H,GAAQ5F,GAAWO,EAAc",
|
|
4
|
+
"sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { Text, Picture, Badge } from '../../../../../components/index.js'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n useEffect,\n type Dispatch,\n type SetStateAction,\n useImperativeHandle,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination, Autoplay } from 'swiper/modules'\nimport { cn } from '../../../../../helpers/index.js'\nimport { GalleryTabType } from './types.js'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useVariantMedia } from '../../../hooks/use-variant-media.js'\nimport { SpecsModal } from './components/SpecsModal.js'\nimport CompareModal from './components/CompareModal.js'\nimport { formatPrice } from '../../../utils/index.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\n\nimport type { Swiper as SwiperType } from 'swiper'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\nimport type { ProductGalleryProps, ProductGalleryTabItemProps, GalleryTabItemProps } from './types.js'\nimport { debounce } from 'es-toolkit'\n\nconst SwiperLeftButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect x=\"48\" y=\"48\" width=\"48\" height=\"48\" rx=\"24\" transform=\"rotate(-180 48 48)\" fill=\"white\" />\n <path\n d=\"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst SwiperRightButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect width=\"48\" height=\"48\" rx=\"24\" transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)\" fill=\"white\" />\n <path\n d=\"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst ProductGallery = () => {\n const { copyWriting } = useAiuiContext()\n const { product, variant, selectedOptions } = useBizProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const productGalleryTabRef = useRef<ProductGalleryTabRef>(null)\n\n const customMediaList = variant?.metafields?.component?.custom_media_list\n let productList: ImageMedia[], sceneList: ImageMedia[], keyFeaturesList: ImageMedia[], videoList: VideoMedia[]\n\n if (customMediaList && customMediaList?.available) {\n productList = customMediaList?.product || []\n sceneList = customMediaList?.scenarios || []\n keyFeaturesList = customMediaList?.keyFeatures || []\n videoList = customMediaList?.video || []\n } else {\n productList = defaultMediaData?.productList\n sceneList = defaultMediaData?.sceneList\n keyFeaturesList = defaultMediaData?.keyFeaturesList\n videoList = defaultMediaData?.videoList\n }\n\n const allMedia = useMemo(() => [...productList, ...sceneList, ...videoList], [productList, sceneList, videoList])\n\n const galleryMap: Record<string, ImageMedia[] | VideoMedia[]> = {\n productList: productList,\n sceneList: sceneList,\n keyFeaturesList: keyFeaturesList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab: ProductGalleryProps =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n const variantProductGallery =\n variant?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => {\n // \u5982\u679C\u5B58\u5728 images \u6570\u7EC4\u4E14\u6709\u6709\u6548\u503C\uFF0C\u4F18\u5148\u4F7F\u7528 images \u521B\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6570\u636E\n const variantProductGalleryItem = variantProductGallery?.find(\n (variantItem: any) => item?.galleries === variantItem?.galleries\n )\n let galleries = galleryMap[item?.galleries] || []\n\n if (\n variantProductGalleryItem?.images &&\n Array.isArray(variantProductGalleryItem.images) &&\n variantProductGalleryItem.images.length > 0\n ) {\n // \u5904\u7406 images \u6570\u7EC4\uFF0C\u4E3A\u6BCF\u5F20\u56FE\u7247\u751F\u6210\u54CD\u5E94\u5F0F source\n const imageGalleries = variantProductGalleryItem.images\n .map((imageItem: any) => {\n // \u4ECE\u5355\u4E2A\u56FE\u7247\u5BF9\u8C61\u751F\u6210\u54CD\u5E94\u5F0F\u56FE\u7247\u7684 source \u5B57\u7B26\u4E32\n const imageSourceParts: string[] = []\n if (imageItem.image_1920 && imageItem.image_1920.trim()) {\n imageSourceParts.push(`${imageItem.image_1920} 1920`)\n }\n if (imageItem.image_1440 && imageItem.image_1440.trim()) {\n imageSourceParts.push(`${imageItem.image_1440} 1440`)\n }\n if (imageItem.image_1024 && imageItem.image_1024.trim()) {\n imageSourceParts.push(`${imageItem.image_1024} 1024`)\n }\n if (imageItem.image_768 && imageItem.image_768.trim()) {\n imageSourceParts.push(`${imageItem.image_768} 767`)\n }\n if (imageItem.image_390 && imageItem.image_390.trim()) {\n imageSourceParts.push(`${imageItem.image_390} 390`)\n }\n\n // \u5982\u679C\u751F\u6210\u4E86\u6709\u6548\u7684\u54CD\u5E94\u5F0F source\uFF0C\u8FD4\u56DE\u56FE\u7247\u5BF9\u8C61\n if (imageSourceParts.length > 0) {\n const responsiveSource = imageSourceParts.join(', ')\n return {\n image: {\n url: responsiveSource,\n altText: item.comment?.content || '',\n },\n // \u6807\u8BB0\u8FD9\u662F\u4ECE images \u751F\u6210\u7684\uFF0C\u7528\u4E8E\u540E\u7EED\u5904\u7406\n _fromImages: true,\n _responsiveSource: responsiveSource,\n } as any\n }\n return null\n })\n .filter((gallery: any) => gallery !== null) // \u8FC7\u6EE4\u6389\u65E0\u6548\u7684\u56FE\u7247\n\n // \u5982\u679C\u4ECE images \u6570\u7EC4\u751F\u6210\u4E86\u6709\u6548\u7684\u56FE\u7247\uFF0C\u4F7F\u7528\u5B83\u4EEC\uFF1B\u5426\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries\n if (imageGalleries.length > 0) {\n galleries = imageGalleries\n }\n // \u5982\u679C images \u5B58\u5728\u4F46\u90FD\u662F\u7A7A\u503C\uFF0C\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries \u903B\u8F91\n }\n\n return {\n ...item,\n galleries,\n }\n })\n .filter((item: any) => item.galleries.length > 0)\n }, [variant?.payload, galleryMap, product?.payload])\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\n const [activeTabIndex, setActiveTabIndex] = useState(0)\n const [targetSlideIndex, setTargetSlideIndex] = useState<number | null>(null)\n\n // \u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\uFF09\n const handleNextTab = useCallback(() => {\n const nextIndex = (activeTabIndex + 1) % galleryTabs.length\n setActiveTabIndex(nextIndex)\n setActiveGalleryTab(galleryTabs[nextIndex])\n setTargetSlideIndex(0) // \u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n }, [activeTabIndex, galleryTabs])\n\n // \u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u6700\u540E\u4E00\u5F20\uFF09\n const handlePrevTab = useCallback(() => {\n const prevIndex = activeTabIndex === 0 ? galleryTabs.length - 1 : activeTabIndex - 1\n setActiveTabIndex(prevIndex)\n setActiveGalleryTab(galleryTabs[prevIndex])\n // \u8DF3\u8F6C\u5230\u4E0A\u4E00\u4E2A tab \u7684\u6700\u540E\u4E00\u5F20\n const prevTabGalleries = galleryTabs[prevIndex]?.galleries || []\n setTargetSlideIndex(prevTabGalleries.length - 1)\n }, [activeTabIndex, galleryTabs])\n\n // \u5F53 activeTabIndex \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\n useEffect(() => {\n if (activeTabIndex !== null && activeTabIndex !== undefined) {\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDD DOM \u5DF2\u66F4\u65B0\n requestAnimationFrame(() => {\n productGalleryTabRef.current?.scrollToTab(activeTabIndex)\n })\n }\n }, [activeTabIndex])\n\n useEffect(() => {\n // \u5F53 variant \u53D8\u5316\u65F6\uFF0C\u5207\u6362\u5230\u7B2C\u4E00\u4E2A tab\n setActiveGalleryTab(galleryTabs[0])\n setActiveTabIndex(0)\n }, [variant?.id])\n\n // \u4E3A\u6BCF\u4E2A tab \u6E32\u67D3\u5BF9\u5E94\u7684\u7EC4\u4EF6\n const renderGalleryForTab = (tab: any, index: number) => {\n switch (tab?.galleryTabType) {\n case GalleryTabType.GALLERY_IMAGE_MAIN:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_FEATURES:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_SCENE:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return (\n <ProductGalleryTabVideo\n {...tab}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" value={activeGalleryTab?.tabValue} defaultValue={galleryTabs?.[0]?.tabValue}>\n <div className=\"tablet:h-[620px] laptop-md:rounded-2xl laptop-md:h-[560px] lg-desktop:h-[700px] laptop-md:relative h-[420px] overflow-hidden bg-[#EAEAEC] \">\n {galleryTabs.map((item: any, index: number) => {\n return (\n <Content key={item.tabValue} className=\"h-full\" value={item.tabValue}>\n {renderGalleryForTab(item, index)}\n </Content>\n )\n })}\n </div>\n <ProductGalleryTab\n ref={productGalleryTabRef}\n galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n setActiveTabIndex={setActiveTabIndex}\n setTargetSlideIndex={setTargetSlideIndex}\n />\n </Root>\n </div>\n )\n}\n\nexport interface ProductGalleryTabRef {\n scrollToTab: (index: number) => void\n}\n\nconst ProductGalleryTab = forwardRef<\n ProductGalleryTabRef,\n {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n setActiveTabIndex: Dispatch<SetStateAction<number>>\n setTargetSlideIndex: Dispatch<SetStateAction<number | null>>\n }\n>((props, ref) => {\n const { galleryTabs, activeGalleryTab, setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex } = props\n const { product } = useBizProductContext()\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const triggerRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const scrollToEvent = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = event.currentTarget\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }, [])\n\n const handleGalleryTabClick = useCallback(\n (el: React.MouseEvent<HTMLButtonElement>, item: GalleryTabItemProps, index: number) => {\n setActiveGalleryTab(item)\n setActiveTabIndex(index)\n setTargetSlideIndex(0) // \u624B\u52A8\u70B9\u51FB tab \u65F6\uFF0C\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n scrollToEvent(el)\n },\n [setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex, scrollToEvent]\n )\n\n // \u6EDA\u52A8\u5230\u6307\u5B9A\u7D22\u5F15\u7684 tab\n const scrollToTab = useCallback(\n (index: number) => {\n if (scrollContainerRef.current && galleryTabs[index]) {\n const container = scrollContainerRef.current\n const tabItem = galleryTabs[index]\n const button = triggerRefs.current.get(tabItem.tabValue)\n\n if (button) {\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n },\n [galleryTabs]\n )\n\n useImperativeHandle(ref, () => ({\n scrollToTab,\n }))\n\n return (\n <div className=\"laptop:inset-x-16 tablet:mt-3 laptop-md:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between\">\n <List\n ref={scrollContainerRef}\n className=\"laptop:p-0 laptop-md:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div className=\"whitespace-nowrap\">\n {galleryTabs?.map((item, index) => {\n return (\n <Trigger\n ref={el => {\n if (el) {\n triggerRefs.current.set(item.tabValue, el)\n } else {\n triggerRefs.current.delete(item.tabValue)\n }\n }}\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={el => handleGalleryTabClick(el, item, index)}\n key={item.tabValue + index}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </div>\n </List>\n <div className=\"laptop:gap-2 laptop:flex hidden\">\n {product.metafields?.global?.specifications && (\n <>\n <SpecsModal /> | <CompareModal />\n </>\n )}\n </div>\n </div>\n )\n})\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useBizProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const [textGroups, setTextGroups] = useState<string[]>([])\n const measureRef = useRef<HTMLDivElement>(null)\n\n const imageClassName = useMemo(() => {\n if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_MAIN) {\n return 'size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_FEATURES) {\n // return '420px'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_SCENE) {\n // return '560px'\n }\n }, [props?.galleryTabType])\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && !!props.targetSlideIndex) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n // \u5C06\u6587\u672C\u63092\u884C\u4E00\u7EC4\u8FDB\u884C\u5206\u7EC4\n useEffect(() => {\n const calculateGroups = () => {\n if (!props?.comment?.content || !measureRef.current) return\n\n const measureEl = measureRef.current\n\n // \u5148\u6D4B\u91CF\u5355\u884C\u9AD8\u5EA6\n measureEl.textContent = 'Test'\n const singleLineHeight = measureEl.offsetHeight\n const twoLinesMaxHeight = singleLineHeight * 2 + 2 // 2\u884C\u7684\u6700\u5927\u9AD8\u5EA6\uFF0C\u52A02px\u5BB9\u5DEE\n\n // \u6E05\u7406HTML\u6807\u7B7E\u5E76\u5206\u5272\u5355\u8BCD\n const cleanText = props.comment.content\n .replace(/<[^>]*>/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n const words = cleanText.split(' ')\n const groups: string[] = []\n let currentGroup = ''\n\n for (let i = 0; i < words.length; i++) {\n const word = words[i]\n const testText = currentGroup ? `${currentGroup} ${word}` : word\n\n // \u76F4\u63A5\u5728 measureRef \u5143\u7D20\u4E0A\u6D4B\u91CF\n measureEl.textContent = testText\n const testHeight = measureEl.offsetHeight\n\n if (testHeight > twoLinesMaxHeight) {\n // \u5F53\u524D\u5355\u8BCD\u4F1A\u5BFC\u81F4\u8D85\u8FC72\u884C\uFF0C\u4FDD\u5B58\u4E4B\u524D\u7684\u7EC4\n if (currentGroup) {\n groups.push(currentGroup)\n currentGroup = word\n } else {\n // \u5355\u4E2A\u5355\u8BCD\u5C31\u8D85\u8FC72\u884C\uFF0C\u5F3A\u5236\u52A0\u5165\n groups.push(word)\n currentGroup = ''\n }\n } else {\n // \u8FD8\u57282\u884C\u4EE5\u5185\uFF0C\u7EE7\u7EED\u7D2F\u52A0\n currentGroup = testText\n }\n }\n\n // \u6DFB\u52A0\u6700\u540E\u4E00\u7EC4\n if (currentGroup) {\n groups.push(currentGroup)\n }\n\n // \u6E05\u7A7A\u6D4B\u91CF\u5143\u7D20\n measureEl.textContent = ''\n setTextGroups(groups)\n }\n\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDDDOM\u6E32\u67D3\u5B8C\u6210\u540E\u518D\u8BA1\u7B97\n const rafId = requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n calculateGroups()\n })\n })\n\n // \u76D1\u542C\u7A97\u53E3\u5927\u5C0F\u53D8\u5316\uFF0C\u91CD\u65B0\u8BA1\u7B97\u5206\u7EC4\n const handleResize = () => {\n calculateGroups()\n }\n\n window.addEventListener('resize', debounce(handleResize, 500))\n return () => {\n cancelAnimationFrame(rafId)\n window.removeEventListener('resize', debounce(handleResize, 500))\n }\n }, [props?.comment?.content])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n ref={ref}\n className=\"h-full\"\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n thumbs={{ swiper: thumbsSwiper }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\uFF08tabId + index\uFF09\n const exposureKey = `${props.tabValue}-${jIndex}`\n\n // \u66DD\u5149\u68C0\u6D4B\u56DE\u8C03\n const handleExposure = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: props?.tabLabel || '',\n position: jIndex + 1,\n creative_id: '',\n component_title: '',\n component_description: '',\n navigation: '',\n },\n })\n }\n\n // \u4F18\u5148\u4F7F\u7528\u4ECE images \u751F\u6210\u7684\u54CD\u5E94\u5F0F source\uFF0C\u5426\u5219\u4F7F\u7528\u539F\u6709\u7684 image.url\n const pictureSource = (item as any)?._responsiveSource || item?.image?.url || ''\n\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <ExposureDetector\n onExposure={handleExposure}\n exposureKey={exposureKey}\n threshold={0.5}\n duration={2000}\n className=\"h-full\"\n >\n <Picture\n source={pictureSource}\n alt={item?.image?.altText}\n className={cn('h-full', imageClassName)}\n imgClassName=\"object-cover h-full\"\n />\n </ExposureDetector>\n </SwiperSlide>\n )\n })}\n </Swiper>\n {variant.availableForSale && !!totalSavings && !props.index && (\n <Badge\n size=\"lg\"\n className=\"bg-brand laptop:left-16 laptop:top-5 laptop-md:left-6 laptop-md:top-6 absolute left-4 top-3 z-[2] text-white\"\n >\n {`${formatPrice({\n amount: totalSavings,\n currencyCode: variant?.price?.currencyCode,\n locale: locale,\n })} ${copyWriting?.off}`}\n </Badge>\n )}\n <div\n className={cn(\n 'tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 laptop-md:left-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n `swiper-button`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n <div\n className={cn(\n 'tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 laptop-md:right-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n `swiper-button`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n {/* {props?.galleries?.map((item, jIndex) => {\n return (\n <Picture\n key={props?.id + 'SwiperSlideItem' + jIndex}\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-cover h-full\"\n />\n )\n })} */}\n <div className=\"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 laptop-md:bottom-[20px] laptop-md:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between\">\n <div className=\"tablet:block hidden\">\n <Swiper\n className=\"flex items-center justify-between\"\n onSwiper={setThumbsSwiper}\n spaceBetween={12}\n slidesPerView={6}\n freeMode={true}\n watchSlidesProgress={true}\n modules={[Navigation, Thumbs]}\n >\n {props?.galleries?.map((item, jIndex) => (\n <SwiperSlide\n key={props?.id + 'SwiperSlideThumbItem' + jIndex}\n className=\"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white\"\n imgClassName=\"object-cover h-full\"\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n {!props?.index && (\n <div className=\"flex items-center gap-2\">\n <Picture\n source={props?.comment?.avatar?.url}\n className=\"laptop:size-10 size-8 shrink-0 rounded-full\"\n imgClassName=\"object-cover \"\n />\n <div className=\"relative max-w-[528px]\">\n {/* \u9690\u85CF\u7684\u6D4B\u91CF\u5143\u7D20 */}\n <div\n ref={measureRef}\n className=\"lg-desktop:text-base pointer-events-none text-sm font-bold text-[#1D1D1F] opacity-0\"\n style={{ visibility: 'hidden' }}\n />\n <Swiper\n modules={[Autoplay]}\n loop={textGroups.length > 1}\n className=\"h-[44px]\"\n direction=\"vertical\"\n autoplay={{ delay: 5000, disableOnInteraction: false }}\n >\n {textGroups.length > 0 ? (\n textGroups.map((group, index) => (\n <SwiperSlide key={index + 'text-group'}>\n <Text\n html={group}\n as=\"div\"\n className=\"lg-desktop:text-base overflow-hidden text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n ))\n ) : (\n <SwiperSlide>\n <Text\n as=\"div\"\n html={props?.comment?.content}\n className=\"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n )}\n </Swiper>\n </div>\n </div>\n )}\n </div>\n <div\n ref={paginationRef}\n className=\"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#080A0F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100\"\n />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && props.targetSlideIndex !== null && props.targetSlideIndex !== undefined) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n className=\"h-full\"\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <video controls className=\"size-full object-cover\">\n <track kind=\"captions\" />\n <source src={item?.sources?.[0]?.url} type=\"video/mp4\" />\n <source src={item?.sources?.[0]?.url} type=\"video/webm\" />\n <source src={item?.sources?.[0]?.url} type=\"video/ogg\" />\n </video>\n </SwiperSlide>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default withLayout(ProductGallery)\n"],
|
|
5
|
+
"mappings": "AAkCI,OAqVM,YAAAA,GApVJ,OAAAC,EADF,QAAAC,MAAA,oBAlCJ,OAAS,kBAAAC,MAAsB,oCAC/B,OAAS,QAAAC,EAAM,WAAAC,EAAS,SAAAC,OAAa,qCACrC,OACE,eAAAC,EACA,WAAAC,EACA,YAAAC,EACA,cAAAC,EACA,UAAAC,EACA,aAAAC,EAGA,uBAAAC,OACK,QACP,OAAS,UAAAC,EAAQ,eAAAC,MAAmC,eACpD,OAAS,cAAAC,EAAY,cAAAC,EAAY,UAAAC,EAAQ,cAAAC,GAAY,YAAAC,OAAgB,iBACrE,OAAS,MAAAC,MAAU,kCACnB,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,WAAAC,GAAS,QAAAC,GAAM,QAAAC,GAAM,WAAAC,OAAe,uBAC7C,OAAS,wBAAAC,MAA4B,iCACrC,OAAS,mBAAAC,OAAuB,sCAChC,OAAS,cAAAC,OAAkB,6BAC3B,OAAOC,OAAkB,+BACzB,OAAS,eAAAC,OAAmB,0BAC5B,OAAS,cAAAC,OAAkB,kCAC3B,OAAS,WAAAC,OAAe,iCACxB,OAAS,oBAAAC,OAAwB,qCAKjC,OAAS,YAAAC,OAAgB,aAEzB,MAAMC,GAAwBC,GAE1BnC,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGmC,EACjG,UAAApC,EAAC,QAAK,EAAE,KAAK,EAAE,KAAK,MAAM,KAAK,OAAO,KAAK,GAAG,KAAK,UAAU,qBAAqB,KAAK,QAAQ,EAC/FA,EAAC,QACC,EAAE,4TACF,KAAK,eACP,GACF,EAIEqC,GAAyBD,GAE3BnC,EAAC,OAAI,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O,IAAKwD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,GACzD,GANmCpB,GAAO,GAAK,kBAAoBiF,CAOrE,CAEH,EACH,EACArH,EAAC,OACC,UAAWoB,EACT,sIAEF,EACA,QAASoF,EAET,SAAAxG,EAACmC,GAAA,CAAqB,UAAU,oCAAoC,EACtE,EACAnC,EAAC,OACC,UAAWoB,EACT,uIAEF,EACA,QAASqF,EAET,SAAAzG,EAACqC,GAAA,CAAsB,UAAU,oCAAoC,EACvE,GACF,CAEJ,EAEMqF,GAA2BtF,GACxBpC,EAAC,OAAI,mBAAO,EAGrB,IAAO2H,GAAQ5F,GAAWO,EAAc",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "useAiuiContext", "Text", "Picture", "Badge", "useCallback", "useMemo", "useState", "forwardRef", "useRef", "useEffect", "useImperativeHandle", "Swiper", "SwiperSlide", "Navigation", "Mousewheel", "Thumbs", "Pagination", "Autoplay", "cn", "GalleryTabType", "Content", "List", "Root", "Trigger", "useBizProductContext", "useVariantMedia", "SpecsModal", "CompareModal", "formatPrice", "withLayout", "gaTrack", "ExposureDetector", "debounce", "SwiperLeftButtonIcon", "props", "SwiperRightButtonIcon", "ProductGallery", "copyWriting", "product", "variant", "selectedOptions", "defaultMediaData", "swiper", "setSwiper", "productGalleryTabRef", "customMediaList", "productList", "sceneList", "keyFeaturesList", "videoList", "allMedia", "galleryMap", "galleryTabs", "productTab", "item", "variantProductGallery", "variantProductGalleryItem", "variantItem", "galleries", "imageGalleries", "imageItem", "imageSourceParts", "responsiveSource", "gallery", "activeGalleryTab", "setActiveGalleryTab", "activeTabIndex", "setActiveTabIndex", "targetSlideIndex", "setTargetSlideIndex", "handleNextTab", "nextIndex", "handlePrevTab", "prevIndex", "prevTabGalleries", "renderGalleryForTab", "tab", "index", "ProductGalleryTabImage", "ProductGalleryTabVideo", "ProductGalleryTab", "ref", "scrollContainerRef", "triggerRefs", "scrollToEvent", "event", "container", "button", "scrollLeft", "handleGalleryTabClick", "el", "scrollToTab", "tabItem", "locale", "totalSavings", "paginationRef", "thumbsSwiper", "setThumbsSwiper", "textGroups", "setTextGroups", "measureRef", "imageClassName", "handlePrevClick", "handleNextClick", "calculateGroups", "measureEl", "twoLinesMaxHeight", "words", "groups", "currentGroup", "i", "word", "testText", "rafId", "handleResize", "jIndex", "exposureKey", "handleExposure", "pictureSource", "group", "ProductGalleryTab3DView", "ProductGallery_default"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: import("react").ForwardRefExoticComponent<Omit<object, keyof import("../../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../../shared/Styles.js").StylesProps & import("../../../../../shared/Styles.js").ContainerProps> & {
|
|
2
|
-
className?: string;
|
|
3
|
-
data?: Record<string, any
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
data?: Record<string, any> | undefined;
|
|
4
5
|
} & import("react").RefAttributes<any>>;
|
|
5
6
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as n,jsxs as w}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as n,jsxs as w}from"react/jsx-runtime";import{cn as l}from"../../../../../helpers/index.js";import{useCallback as m,useRef as v,useMemo as h,useEffect as b,useState as k}from"react";import{useScrollSpy as E}from"./useScrollSpy.js";import{debounce as H}from"es-toolkit";const L=({tabs:i,onSpyNavItemClick:u,className:g,renderRating:s})=>{const[S,y]=k(0),c=h(()=>s?[...i,{label:"Reviews",id:"ipc-review",href:""}]:i,[i,s]),x=h(()=>c.map(e=>e.id),[c]),r=H(()=>{const e=document.querySelector("#purchase-bar");e&&y(e.getBoundingClientRect().height)},500);b(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[r]);const o=E(x,S),a=v(null),d=v(new Map),N=m(e=>{u?.(e)},[u]);b(()=>{if(!o||!a.current)return;const e=d.current.get(o);if(!e)return;const t=a.current,p=e.getBoundingClientRect(),f=t.getBoundingClientRect(),B=p.left+p.width/2-f.left,C=f.width/2,T=B-C;t.scrollTo({left:t.scrollLeft+T,behavior:"smooth"})},[o]);const R=m((e,t)=>{t?d.current.set(e,t):d.current.delete(e)},[]);return n("div",{ref:a,style:{scrollbarWidth:"none",msOverflowStyle:"none"},className:l("overflow-x-auto",g),children:n("div",{className:"tablet:gap-8 flex gap-6",children:c?.map(e=>n("button",{ref:t=>R(e.id,t),children:e.id==="ipc-review"?w("div",{className:"relative shrink-0 whitespace-nowrap py-[10px]",children:[s,n("div",{className:l("laptop-md:block bg-brand-0 absolute bottom-0 left-0 hidden h-[2px] w-0 transition-all duration-300 ease-in-out",{"w-full":o===e.id})})]}):w("div",{className:l("laptop-md:text-[#1d1d1f] relative shrink-0 whitespace-nowrap py-[10px] text-sm font-bold text-[#949494]",{"text-[#1d1d1f]":o===e.id}),onClick:()=>N(e),children:[e.label,n("div",{className:l("laptop-md:block bg-brand-0 absolute bottom-0 left-0 hidden h-[2px] w-0 transition-all duration-300 ease-in-out",{"w-full":o===e.id})})]})},e.id))})})};var O=L;export{O as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAyFc,OAEE,OAAAA,EAFF,QAAAC,MAAA,oBAzFd,OAAS,
|
|
6
|
-
"names": ["jsx", "jsxs", "
|
|
4
|
+
"sourcesContent": ["import { cn } from '../../../../../helpers/index.js'\nimport { useCallback, useRef, useMemo, useEffect, useState } from 'react'\nimport type { ScrollSpyNavItem, ScrollSpyNavProps } from './types.js'\nimport { useScrollSpy } from './useScrollSpy.js'\nimport { debounce } from 'es-toolkit'\n\nconst ScrollSpyNav = ({ tabs, onSpyNavItemClick, className, renderRating }: ScrollSpyNavProps) => {\n // \u4F7F\u7528 useScrollSpy hook \u81EA\u52A8\u76D1\u542C\u6EDA\u52A8\n const [purchaseBarHeight, setPurchaseBarHeight] = useState(0)\n const combinedTabs = useMemo(() => {\n if (renderRating) {\n return [...tabs, { label: 'Reviews', id: 'ipc-review', href: '' }]\n }\n return tabs\n }, [tabs, renderRating])\n\n const sectionIds = useMemo(() => {\n return combinedTabs.map(tab => tab.id)\n }, [combinedTabs])\n\n const debouncedHandleResize = debounce(() => {\n const purchaseBar = document.querySelector('#purchase-bar')\n if (purchaseBar) {\n setPurchaseBarHeight(purchaseBar.getBoundingClientRect().height)\n }\n }, 500)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [debouncedHandleResize])\n\n const activeId = useScrollSpy(sectionIds, purchaseBarHeight)\n\n // \u79FB\u52A8\u7AEF\uFF1A\u6A2A\u5411\u6EDA\u52A8\u5BB9\u5668\u548C tab \u6309\u94AE\u7684 refs\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const tabRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const onTabClick = useCallback(\n (tab: ScrollSpyNavItem) => {\n onSpyNavItemClick?.(tab)\n },\n [onSpyNavItemClick]\n )\n\n // \u79FB\u52A8\u7AEF\uFF1A\u5F53 activeTab \u6539\u53D8\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u4E2D\u5FC3\u4F4D\u7F6E\n useEffect(() => {\n if (!activeId || !scrollContainerRef.current) return\n\n const activeTabElement = tabRefs.current.get(activeId)\n if (!activeTabElement) return\n\n const container = scrollContainerRef.current\n const tabRect = activeTabElement.getBoundingClientRect()\n const containerRect = container.getBoundingClientRect()\n\n // \u8BA1\u7B97\u9700\u8981\u6EDA\u52A8\u7684\u8DDD\u79BB\uFF0C\u4F7F tab \u4F4D\u4E8E\u5BB9\u5668\u4E2D\u5FC3\n const tabCenter = tabRect.left + tabRect.width / 2 - containerRect.left\n const containerCenter = containerRect.width / 2\n const scrollOffset = tabCenter - containerCenter\n\n container.scrollTo({\n left: container.scrollLeft + scrollOffset,\n behavior: 'smooth',\n })\n }, [activeId])\n\n // \u8BBE\u7F6E tab ref\n const setTabRef = useCallback((tabId: string, element: HTMLButtonElement | null) => {\n if (element) {\n tabRefs.current.set(tabId, element)\n } else {\n tabRefs.current.delete(tabId)\n }\n }, [])\n\n return (\n <div\n ref={scrollContainerRef}\n style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}\n className={cn('overflow-x-auto', className)}\n >\n <div className=\"tablet:gap-8 flex gap-6\">\n {combinedTabs?.map(tab => (\n <button key={tab.id} ref={el => setTabRef(tab.id, el)}>\n {tab.id === 'ipc-review' ? (\n <div className=\"relative shrink-0 whitespace-nowrap py-[10px]\">\n {renderRating}\n <div\n className={cn(\n 'laptop-md:block bg-brand-0 absolute bottom-0 left-0 hidden h-[2px] w-0 transition-all duration-300 ease-in-out',\n {\n 'w-full': activeId === tab.id,\n }\n )}\n />\n </div>\n ) : (\n <div\n className={cn(\n 'laptop-md:text-[#1d1d1f] relative shrink-0 whitespace-nowrap py-[10px] text-sm font-bold text-[#949494]',\n {\n 'text-[#1d1d1f]': activeId === tab.id,\n }\n )}\n onClick={() => onTabClick(tab)}\n >\n {tab.label}\n <div\n className={cn(\n 'laptop-md:block bg-brand-0 absolute bottom-0 left-0 hidden h-[2px] w-0 transition-all duration-300 ease-in-out',\n {\n 'w-full': activeId === tab.id,\n }\n )}\n />\n </div>\n )}\n </button>\n ))}\n </div>\n </div>\n )\n}\n\nexport default ScrollSpyNav\n"],
|
|
5
|
+
"mappings": "AAyFc,OAEE,OAAAA,EAFF,QAAAC,MAAA,oBAzFd,OAAS,MAAAC,MAAU,kCACnB,OAAS,eAAAC,EAAa,UAAAC,EAAQ,WAAAC,EAAS,aAAAC,EAAW,YAAAC,MAAgB,QAElE,OAAS,gBAAAC,MAAoB,oBAC7B,OA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A,EAAU,WAAaK,EAC7B,SAAU,QACZ,CAAC,CACH,EAAG,CAACV,CAAQ,CAAC,EAGb,MAAMW,EAAY9B,EAAY,CAAC+B,EAAeC,IAAsC,CAC9EA,EACFX,EAAQ,QAAQ,IAAIU,EAAOC,CAAO,EAElCX,EAAQ,QAAQ,OAAOU,CAAK,CAEhC,EAAG,CAAC,CAAC,EAEL,OACElC,EAAC,OACC,IAAKuB,EACL,MAAO,CAAE,eAAgB,OAAQ,gBAAiB,MAAO,EACzD,UAAWrB,EAAG,kBAAmBW,CAAS,EAE1C,SAAAb,EAAC,OAAI,UAAU,0BACZ,SAAAiB,GAAc,IAAIE,GACjBnB,EAAC,UAAoB,IAAKoC,GAAMH,EAAUd,EAAI,GAAIiB,CAAE,EACjD,SAAAjB,EAAI,KAAO,aACVlB,EAAC,OAAI,UAAU,gDACZ,UAAAa,EACDd,EAAC,OACC,UAAWE,EACT,iHACA,CACE,SAAUoB,IAAaH,EAAI,EAC7B,CACF,EACF,GACF,EAEAlB,EAAC,OACC,UAAWC,EACT,0GACA,CACE,iBAAkBoB,IAAaH,EAAI,EACrC,CACF,EACA,QAAS,IAAMM,EAAWN,CAAG,EAE5B,UAAAA,EAAI,MACLnB,EAAC,OACC,UAAWE,EACT,iHACA,CACE,SAAUoB,IAAaH,EAAI,EAC7B,CACF,EACF,GACF,GAhCSA,EAAI,EAkCjB,CACD,EACH,EACF,CAEJ,EAEA,IAAOkB,EAAQ3B",
|
|
6
|
+
"names": ["jsx", "jsxs", "cn", "useCallback", "useRef", "useMemo", "useEffect", "useState", "useScrollSpy", "debounce", "ScrollSpyNav", "tabs", "onSpyNavItemClick", "className", "renderRating", "purchaseBarHeight", "setPurchaseBarHeight", "combinedTabs", "sectionIds", "tab", "debouncedHandleResize", "purchaseBar", "activeId", "scrollContainerRef", "tabRefs", "onTabClick", "activeTabElement", "container", "tabRect", "containerRect", "tabCenter", "containerCenter", "scrollOffset", "setTabRef", "tabId", "element", "el", "ScrollSpyNav_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as
|
|
1
|
+
import{useState as f,useEffect as u}from"react";import{debounce as a}from"es-toolkit";const w=(e,t=100)=>{const[i,s]=f("");return u(()=>{const n=()=>{const d=Math.ceil(window.scrollY+t+10);for(let o=e.length-1;o>=0;o--){const c=document.getElementById(e[o]);if(c){const r=Math.ceil(c.getBoundingClientRect().top+window.scrollY);if(console.log(r,"offsetTop"),d>=r){s(e[o]);break}}}};n();const l=a(n,50);return window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[e,t]),i};export{w as useScrollSpy};
|
|
2
2
|
//# sourceMappingURL=useScrollSpy.js.map
|
package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/useScrollSpy.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/useScrollSpy.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useState, useEffect } from 'react'\nimport { debounce } from 'es-toolkit'\n\nconst useScrollSpy = (sectionIds: string[], offset = 100) => {\n const [activeId, setActiveId] = useState('')\n\n useEffect(() => {\n const handleScroll = () => {\n const scrollPosition = Math.ceil(window.scrollY + offset + 10)\n\n // \u904D\u5386\u6240\u6709section\uFF0C\u627E\u5230\u5F53\u524D\u53EF\u89C6\u533A\u57DF\u5185\u7684section\n for (let i = sectionIds.length - 1; i >= 0; i--) {\n const section = document.getElementById(sectionIds[i])\n if (section) {\n const offsetTop = Math.ceil(section.getBoundingClientRect().top + window.scrollY)\n if (scrollPosition >= offsetTop) {\n setActiveId(sectionIds[i])\n break\n }\n }\n }\n }\n\n // \u521D\u59CB\u5316\u65F6\u6267\u884C\u4E00\u6B21\n handleScroll()\n\n // \u521B\u5EFAdebounce\u51FD\u6570\u5E76\u4FDD\u5B58\u5F15\u7528\uFF0C\u786E\u4FDD\u80FD\u6B63\u786E\u79FB\u9664\u76D1\u542C\u5668\n const debouncedHandleScroll = debounce(handleScroll, 50)\n window.addEventListener('scroll', debouncedHandleScroll)\n\n return () => {\n window.removeEventListener('scroll', debouncedHandleScroll)\n }\n }, [sectionIds, offset])\n\n return activeId\n}\n\nexport { useScrollSpy }\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,YAAAA,EAAU,aAAAC,MAAiB,QACpC,OAAS,YAAAC,MAAgB,aAEzB,MAAMC,EAAe,CAACC,EAAsBC,EAAS,MAAQ,CAC3D,KAAM,CAACC,EAAUC,CAAW,EAAIP,EAAS,EAAE,EAE3C,OAAAC,EAAU,IAAM,CACd,MAAMO,EAAe,IAAM,CACzB,MAAMC,EAAiB,KAAK,KAAK,OAAO,QAAUJ,EAAS,EAAE,EAG7D,QAASK,EAAIN,EAAW,OAAS,EAAGM,GAAK,EAAGA,IAAK,CAC/C,MAAMC,EAAU,SAAS,eAAeP,EAAWM,CAAC,CAAC,EACrD,GAAIC,EAAS,CACX,MAAMC,EAAY,KAAK,KAAKD,EAAQ,sBAAsB,EAAE,IAAM,OAAO,OAAO,
|
|
4
|
+
"sourcesContent": ["import { useState, useEffect } from 'react'\nimport { debounce } from 'es-toolkit'\n\nconst useScrollSpy = (sectionIds: string[], offset = 100) => {\n const [activeId, setActiveId] = useState('')\n\n useEffect(() => {\n const handleScroll = () => {\n const scrollPosition = Math.ceil(window.scrollY + offset + 10)\n\n // \u904D\u5386\u6240\u6709section\uFF0C\u627E\u5230\u5F53\u524D\u53EF\u89C6\u533A\u57DF\u5185\u7684section\n for (let i = sectionIds.length - 1; i >= 0; i--) {\n const section = document.getElementById(sectionIds[i])\n if (section) {\n const offsetTop = Math.ceil(section.getBoundingClientRect().top + window.scrollY)\n console.log(offsetTop, 'offsetTop')\n if (scrollPosition >= offsetTop) {\n setActiveId(sectionIds[i])\n break\n }\n }\n }\n }\n\n // \u521D\u59CB\u5316\u65F6\u6267\u884C\u4E00\u6B21\n handleScroll()\n\n // \u521B\u5EFAdebounce\u51FD\u6570\u5E76\u4FDD\u5B58\u5F15\u7528\uFF0C\u786E\u4FDD\u80FD\u6B63\u786E\u79FB\u9664\u76D1\u542C\u5668\n const debouncedHandleScroll = debounce(handleScroll, 50)\n window.addEventListener('scroll', debouncedHandleScroll)\n\n return () => {\n window.removeEventListener('scroll', debouncedHandleScroll)\n }\n }, [sectionIds, offset])\n\n return activeId\n}\n\nexport { useScrollSpy }\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,YAAAA,EAAU,aAAAC,MAAiB,QACpC,OAAS,YAAAC,MAAgB,aAEzB,MAAMC,EAAe,CAACC,EAAsBC,EAAS,MAAQ,CAC3D,KAAM,CAACC,EAAUC,CAAW,EAAIP,EAAS,EAAE,EAE3C,OAAAC,EAAU,IAAM,CACd,MAAMO,EAAe,IAAM,CACzB,MAAMC,EAAiB,KAAK,KAAK,OAAO,QAAUJ,EAAS,EAAE,EAG7D,QAASK,EAAIN,EAAW,OAAS,EAAGM,GAAK,EAAGA,IAAK,CAC/C,MAAMC,EAAU,SAAS,eAAeP,EAAWM,CAAC,CAAC,EACrD,GAAIC,EAAS,CACX,MAAMC,EAAY,KAAK,KAAKD,EAAQ,sBAAsB,EAAE,IAAM,OAAO,OAAO,EAEhF,GADA,QAAQ,IAAIC,EAAW,WAAW,EAC9BH,GAAkBG,EAAW,CAC/BL,EAAYH,EAAWM,CAAC,CAAC,EACzB,KACF,CACF,CACF,CACF,EAGAF,EAAa,EAGb,MAAMK,EAAwBX,EAASM,EAAc,EAAE,EACvD,cAAO,iBAAiB,SAAUK,CAAqB,EAEhD,IAAM,CACX,OAAO,oBAAoB,SAAUA,CAAqB,CAC5D,CACF,EAAG,CAACT,EAAYC,CAAM,CAAC,EAEhBC,CACT",
|
|
6
6
|
"names": ["useState", "useEffect", "debounce", "useScrollSpy", "sectionIds", "offset", "activeId", "setActiveId", "handleScroll", "scrollPosition", "i", "section", "offsetTop", "debouncedHandleScroll"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { PurchaseBarProps } from './types.js';
|
|
2
3
|
declare const _default: import("react").ForwardRefExoticComponent<Omit<PurchaseBarProps, keyof import("../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../shared/Styles.js").StylesProps & import("../../../../shared/Styles.js").ContainerProps> & {
|
|
3
|
-
className?: string;
|
|
4
|
-
data?: Record<string, any
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
data?: Record<string, any> | undefined;
|
|
5
6
|
} & import("react").RefAttributes<any>>;
|
|
6
7
|
export default _default;
|
|
@@ -11,8 +11,8 @@ declare const MarqueeImageContent: {
|
|
|
11
11
|
};
|
|
12
12
|
declare const MarqueeTextContent: React.ForwardRefExoticComponent<MarqueeTextContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MarqueeProps & React.RefAttributes<SwiperRef>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
14
|
-
className?: string;
|
|
15
|
-
data?: Record<string, any
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
data?: Record<string, any> | undefined;
|
|
16
16
|
}, "ref"> & React.RefAttributes<any>>;
|
|
17
17
|
export default _default;
|
|
18
18
|
export { MarqueeItem, MarqueeImageContent, MarqueeTextContent };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Media, Theme } from '../../types/props.js';
|
|
3
|
+
/**
|
|
4
|
+
* 评论项数据结构
|
|
5
|
+
*/
|
|
6
|
+
export interface ReviewItem {
|
|
7
|
+
/** 评论者名称 */
|
|
8
|
+
name: string;
|
|
9
|
+
/** 评论者头像 URL */
|
|
10
|
+
avatar: Media;
|
|
11
|
+
/** 评论内容 */
|
|
12
|
+
comment: string;
|
|
13
|
+
/** 评分(1-5星) */
|
|
14
|
+
rating?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 轮播评论数据结构
|
|
18
|
+
*/
|
|
19
|
+
export interface MarqueeReviewData {
|
|
20
|
+
/** 主标题 */
|
|
21
|
+
title: string;
|
|
22
|
+
/** 副标题 */
|
|
23
|
+
subtitle: string;
|
|
24
|
+
/** 评论列表 */
|
|
25
|
+
items: ReviewItem[];
|
|
26
|
+
/** 主题:light 或 dark */
|
|
27
|
+
theme?: Theme;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* MarqueeReview 组件 Props
|
|
31
|
+
*/
|
|
32
|
+
export interface MarqueeReviewProps {
|
|
33
|
+
/** 评论数据 */
|
|
34
|
+
data: MarqueeReviewData;
|
|
35
|
+
/** 自定义类名 */
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<MarqueeReviewProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
39
|
+
className?: string | undefined;
|
|
40
|
+
data?: Record<string, any> | undefined;
|
|
41
|
+
} & import("react").RefAttributes<any>>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as s}from"react/jsx-runtime";import{Text as n,Heading as c,Avatar as g,AvatarImage as w,AvatarFallback as u}from"../../components/index.js";import{cn as m}from"../../helpers/utils.js";import{withLayout as C}from"../../shared/Styles.js";const x=9,L=3,k=(t,a)=>Array.from({length:Math.ceil(t.length/a)},(l,r)=>t.slice(r*a,(r+1)*a)),y=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})}),N=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"13",viewBox:"0 0 14 13",fill:"none",children:e("path",{d:"M6.07501 0.418036C6.35012 -0.139398 7.145 -0.139397 7.42011 0.418037L8.9242 3.46565C9.03344 3.68701 9.24462 3.84043 9.4889 3.87593L12.8521 4.36464C13.4673 4.45403 13.7129 5.21 13.2678 5.64391L10.8341 8.01614C10.6574 8.18844 10.5767 8.43669 10.6184 8.67999L11.1929 12.0296C11.298 12.6423 10.655 13.1095 10.1047 12.8203L7.09656 11.2388C6.87807 11.1239 6.61705 11.1239 6.39855 11.2388L3.39038 12.8203C2.84016 13.1095 2.19709 12.6423 2.30217 12.0296L2.87668 8.67999C2.91841 8.43669 2.83775 8.18844 2.66098 8.01614L0.227318 5.64391C-0.21782 5.21 0.0278133 4.45403 0.642979 4.36464L4.00622 3.87593C4.2505 3.84043 4.46167 3.68701 4.57092 3.46565L6.07501 0.418036Z",fill:"#75787F"})}),b=({item:t})=>s("div",{className:"rounded-box bg-container-primary text-info-primary min-l:p-[24px] laptop:h-[240px] desktop:h-[240px] lg-desktop:h-[240px] flex h-[240px] grow flex-col justify-between p-[16px]",children:[s("div",{className:"flex justify-between",children:[s("div",{className:"flex flex-col",children:[e(n,{size:4,html:t.name,className:"laptop:block hidden"}),e(n,{size:2,html:t.name,className:"laptop:hidden block"}),s("div",{className:"mt-2 flex gap-1",children:[new Array(t.rating||5).fill(0).map((a,l)=>e(y,{},l)),new Array(5-(t.rating||5)).fill(0).map((a,l)=>e("span",{children:N()},l))]})]}),s(g,{size:"small",className:" laptop:size-[48px] size-[40px]",children:[e(w,{src:t.avatar?.url,alt:t.avatar?.alt||""}),e(u,{children:(t.name??"").slice(0,2).toUpperCase()})]})]}),e("div",{children:e(c,{as:"h6",size:2,html:`${t.comment}`,className:"line-clamp-5 min-h-[120px] text-wrap"})})]});function M({data:t,className:a}){const{title:l,subtitle:r,items:i=[],theme:h="light"}=t,d=k(i.length<x?[...i,...i.slice(x-i.length)]:i,L).slice(0,3).map(o=>[...o,...o]);return s("section",{className:m("text-info-primary flex flex-col items-center justify-center py-3",a,{"aiui-dark":h==="dark"}),children:[e(c,{as:"h1",size:4,html:l,className:"laptop:text-center w-full text-left"}),e(n,{size:2,html:r,className:"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]"}),e("div",{className:m("mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden"),children:d.map((o,p)=>e("div",{className:m("animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4",{"top-10":p===0||p===2,"hidden desktop:flex":p===1,"hidden tablet:flex":p===2}),children:o.map((f,v)=>e(b,{item:f},v))},p))})]})}var R=C(M);export{R as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/MarqueeReview/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Text, Heading, Avatar, AvatarImage, AvatarFallback } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { Media, Theme } from '../../types/props.js'\n\nconst FIX_ITEMS_LENGTH = 9\nconst COUNT = 3\n\n/**\n * \u8BC4\u8BBA\u9879\u6570\u636E\u7ED3\u6784\n */\nexport interface ReviewItem {\n /** \u8BC4\u8BBA\u8005\u540D\u79F0 */\n name: string\n /** \u8BC4\u8BBA\u8005\u5934\u50CF URL */\n avatar: Media\n /** \u8BC4\u8BBA\u5185\u5BB9 */\n comment: string\n /** \u8BC4\u5206(1-5\u661F) */\n rating?: number\n}\n\n/**\n * \u8F6E\u64AD\u8BC4\u8BBA\u6570\u636E\u7ED3\u6784\n */\nexport interface MarqueeReviewData {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898 */\n subtitle: string\n /** \u8BC4\u8BBA\u5217\u8868 */\n items: ReviewItem[]\n /** \u4E3B\u9898\uFF1Alight \u6216 dark */\n theme?: Theme\n}\n\n/**\n * MarqueeReview \u7EC4\u4EF6 Props\n */\nexport interface MarqueeReviewProps {\n /** \u8BC4\u8BBA\u6570\u636E */\n data: MarqueeReviewData\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n\nconst _chunk = <T,>(array: T[], size: number): T[][] => {\n return Array.from({ length: Math.ceil(array.length / size) }, (_, index) =>\n array.slice(index * size, (index + 1) * size)\n )\n}\n\nconst StarIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n)\n\nconst unStarIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"13\" viewBox=\"0 0 14 13\" fill=\"none\">\n <path\n d=\"M6.07501 0.418036C6.35012 -0.139398 7.145 -0.139397 7.42011 0.418037L8.9242 3.46565C9.03344 3.68701 9.24462 3.84043 9.4889 3.87593L12.8521 4.36464C13.4673 4.45403 13.7129 5.21 13.2678 5.64391L10.8341 8.01614C10.6574 8.18844 10.5767 8.43669 10.6184 8.67999L11.1929 12.0296C11.298 12.6423 10.655 13.1095 10.1047 12.8203L7.09656 11.2388C6.87807 11.1239 6.61705 11.1239 6.39855 11.2388L3.39038 12.8203C2.84016 13.1095 2.19709 12.6423 2.30217 12.0296L2.87668 8.67999C2.91841 8.43669 2.83775 8.18844 2.66098 8.01614L0.227318 5.64391C-0.21782 5.21 0.0278133 4.45403 0.642979 4.36464L4.00622 3.87593C4.2505 3.84043 4.46167 3.68701 4.57092 3.46565L6.07501 0.418036Z\"\n fill=\"#75787F\"\n />\n </svg>\n)\n\ninterface CardProps {\n item: ReviewItem\n}\n\nconst Card = ({ item }: CardProps) => {\n return (\n <div className=\"rounded-box bg-container-primary text-info-primary min-l:p-[24px] laptop:h-[240px] desktop:h-[240px] lg-desktop:h-[240px] flex h-[240px] grow flex-col justify-between p-[16px]\">\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col\">\n <Text size={4} html={item.name} className=\"laptop:block hidden\" />\n <Text size={2} html={item.name} className=\"laptop:hidden block\" />\n <div className=\"mt-2 flex gap-1\">\n {new Array(item.rating || 5).fill(0).map((_, index) => (\n <StarIcon key={index} />\n ))}\n {new Array(5 - (item.rating || 5)).fill(0).map((_, index) => (\n <span key={index}>{unStarIcon()}</span>\n ))}\n </div>\n </div>\n <Avatar size=\"small\" className=\" laptop:size-[48px] size-[40px]\">\n <AvatarImage src={item.avatar?.url} alt={item.avatar?.alt || ''} />\n <AvatarFallback>{(item.name ?? '').slice(0, 2).toUpperCase()}</AvatarFallback>\n </Avatar>\n </div>\n <div>\n <Heading as=\"h6\" size={2} html={`${item.comment}`} className=\"line-clamp-5 min-h-[120px] text-wrap\" />\n </div>\n </div>\n )\n}\n\n/**\n * MarqueeReview - \u5782\u76F4\u6EDA\u52A8\u7684\u8BC4\u8BBA\u8F6E\u64AD\u7EC4\u4EF6\n *\n * \u7528\u4E8E\u5C55\u793A\u7528\u6237\u8BC4\u8BBA,\u652F\u6301\u591A\u5217\u5782\u76F4\u65E0\u9650\u6EDA\u52A8\u6548\u679C\u3002\n *\n * @example\n * ```tsx\n * <MarqueeReview\n * data={{\n * title: \"\u5BA2\u6237\u8BC4\u4EF7\",\n * subtitle: \"\u770B\u770B\u7528\u6237\u600E\u4E48\u8BF4\",\n * items: [\n * {\n * name: \"\u5F20\u4E09\",\n * avatar: \"/avatar1.jpg\",\n * comment: \"\u975E\u5E38\u597D\u7528\u7684\u4EA7\u54C1!\",\n * rating: 5\n * }\n * ]\n * }}\n * />\n * ```\n */\nfunction MarqueeReview({ data, className }: MarqueeReviewProps) {\n const { title, subtitle, items = [], theme = 'light' } = data\n\n const chunkItems = _chunk(\n items.length < FIX_ITEMS_LENGTH ? [...items, ...items.slice(FIX_ITEMS_LENGTH - items.length)] : items,\n COUNT\n )\n .slice(0, 3)\n .map(item => [...item, ...item])\n\n return (\n <section\n className={cn('text-info-primary flex flex-col items-center justify-center py-3', className, {\n 'aiui-dark': theme === 'dark',\n })}\n >\n <Heading as=\"h1\" size={4} html={title} className=\"laptop:text-center w-full text-left\" />\n <Text\n size={2}\n html={subtitle}\n className=\"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]\"\n />\n <div\n className={cn(\n 'mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden'\n )}\n >\n {chunkItems.map((items, index) => (\n <div\n key={index}\n className={cn('animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4', {\n 'top-10': index === 0 || index === 2,\n 'hidden desktop:flex': index === 1,\n 'hidden tablet:flex': index === 2,\n })}\n >\n {items.map((item, innerIndex) => (\n <Card key={innerIndex} item={item} />\n ))}\n </div>\n ))}\n </div>\n </section>\n )\n}\n\nexport default withLayout(MarqueeReview)\n"],
|
|
5
|
+
"mappings": "AAsDI,cAAAA,EA2BM,QAAAC,MA3BN,oBAtDJ,OAAS,QAAAC,EAAM,WAAAC,EAAS,UAAAC,EAAQ,eAAAC,EAAa,kBAAAC,MAAsB,4BACnE,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAG3B,MAAMC,EAAmB,EACnBC,EAAQ,EAwCRC,EAAS,CAAKC,EAAYC,IACvB,MAAM,KAAK,CAAE,OAAQ,KAAK,KAAKD,EAAM,OAASC,CAAI,CAAE,EAAG,CAACC,EAAGC,IAChEH,EAAM,MAAMG,EAAQF,GAAOE,EAAQ,GAAKF,CAAI,CAC9C,EAGIG,EAAW,IACfhB,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,SAAAA,EAAC,QACC,EAAE,6oBACF,KAAK,UACP,EACF,EAGIiB,EAAa,IACjBjB,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QACC,EAAE,mpBACF,KAAK,UACP,EACF,EAOIkB,EAAO,CAAC,CAAE,KAAAC,CAAK,IAEjBlB,EAAC,OAAI,UAAU,kLACb,UAAAA,EAAC,OAAI,UAAU,uBACb,UA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AC,WACC,UAAWM,EAAG,mEAAoEe,EAAW,CAC3F,YAAaI,IAAU,MACzB,CAAC,EAED,UAAA1B,EAACG,EAAA,CAAQ,GAAG,KAAK,KAAM,EAAG,KAAMoB,EAAO,UAAU,sCAAsC,EACvFvB,EAACE,EAAA,CACC,KAAM,EACN,KAAMsB,EACN,UAAU,8KACZ,EACAxB,EAAC,OACC,UAAWO,EACT,2HACF,EAEC,SAAAoB,EAAW,IAAI,CAACF,EAAOV,IACtBf,EAAC,OAEC,UAAWO,EAAG,mEAAoE,CAChF,SAAUQ,IAAU,GAAKA,IAAU,EACnC,sBAAuBA,IAAU,EACjC,qBAAsBA,IAAU,CAClC,CAAC,EAEA,SAAAU,EAAM,IAAI,CAACN,EAAMS,IAChB5B,EAACkB,EAAA,CAAsB,KAAMC,GAAlBS,CAAwB,CACpC,GATIb,CAUP,CACD,EACH,GACF,CAEJ,CAEA,IAAOc,EAAQrB,EAAWY,CAAa",
|
|
6
|
+
"names": ["jsx", "jsxs", "Text", "Heading", "Avatar", "AvatarImage", "AvatarFallback", "cn", "withLayout", "FIX_ITEMS_LENGTH", "COUNT", "_chunk", "array", "size", "_", "index", "StarIcon", "unStarIcon", "Card", "item", "MarqueeReview", "data", "className", "title", "subtitle", "items", "theme", "chunkItems", "innerIndex", "MarqueeReview_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MediaPlayerBaseProps } from './types.js';
|
|
3
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
data?: Record<string, any> | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as Me,jsx as e,jsxs as u}from"react/jsx-runtime";import{useState as p,useRef as n,useMemo as ue,useEffect as E,forwardRef as me,useImperativeHandle as ge}from"react";import{debounce as fe}from"lodash";import{cn as w}from"../../helpers/utils.js";import{withLayout as ve}from"../../shared/Styles.js";import xe from"../../components/button.js";import{VideoModal as ye}from"../VideoModal/index.js";import{convertLexicalToHTML as K}from"@payloadcms/richtext-lexical/html";import{useInView as be}from"react-intersection-observer";import{useExposure as he}from"../../hooks/useExposure.js";import Q from"../../helpers/ScrollLoadVideo.js";import{gsap as I}from"gsap";import{SplitText as we}from"gsap/dist/SplitText";import{ScrollTrigger as W}from"gsap/dist/ScrollTrigger";const He="media_player_base",Te="video",X=({defaultConverters:H})=>({...H,text:T=>{const{node:t}=T;return t.$&&t.$.color?`<span class="lexical-${t.$.color}">${t.text}</span>`:t.text}}),ke=me(({className:H="",id:T,onBtnClick:t,data:{title:m,videoTitle:g,btnText:_,youtubeId:P,video:S,mobileVideo:Z,theme:V,img:$,shape:B,titleAnimation:f,...A}},ee)=>{const{sticky:i}=A,[C,D]=p(!1),[F,te]=p(0),[re,oe]=p(0),[v,ne]=p(0),[j,U]=p(!1),x=n(null),Y=n(null),r=n(null),y=n(null),q=n(null),b=n(null),k=n(null),M=n(null),{ref:se,inView:s}=be();ge(ee,()=>r.current);const h=typeof m=="string"?m:m&&K({data:m,converters:X}),L=typeof g=="string"?g:g&&K({data:g,converters:X});E(()=>{s?(x.current?.play(),D(!0)):(x.current?.pause(),D(!1))},[s]);const N=fe(()=>{if(r.current){const a=r.current.getBoundingClientRect(),l=window.innerHeight,c=window.scrollY||window.pageYOffset,o=a.bottom+c,d=document.documentElement.scrollHeight-o;te(d>l?l:d)}if(r.current){const a=r.current.clientHeight,l=window.innerHeight;oe(a+l)}},600);E(()=>(N(),window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[]),E(()=>{function a(){if(!y.current||f!=="fade-in")return;const c=y.current?.clientHeight||80;b.current=new we(y.current,{type:"words",wordsClass:"word"});const o=b.current.words;I.set(o,{opacity:0}),k.current=W.create({trigger:r.current,start:"top center-=10%",end:`top+=${c*1.5+80}px center-=10%`,scrub:!0,onUpdate:O=>{const d=O.progress,G=o.length,ie=1/G,J=.5;o.forEach((ae,ce)=>{const de=ce/G*(1-J),pe=ie*(1+J);let z=(d-de)/pe;z=Math.max(0,Math.min(z,1)),I.set(ae,{opacity:z})}),I.set(Y.current,{opacity:d})}})}function l(){M.current=W.create({trigger:r.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:c=>{const o=c.progress;console.log("progress__",o),ne(o)}})}return s&&(a(),l()),()=>{b.current&&b.current.revert(),k.current&&k.current.kill(),M.current&&M.current.kill()}},[f,s]),he(q,{componentType:Te,componentName:He,componentTitle:L});const le=ue(()=>s&&v>0&&v<.9?3:s?2:1,[v,s]),R="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return u(Me,{children:[i&&e("div",{ref:r,className:w("relative z-10",R,{"aiui-dark":V==="dark","rounded-box":B==="rounded"},H),children:e("div",{ref:se,children:!f&&u("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[h&&!C&&e("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:h}}),L&&C&&e("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:L}}),_&&e(xe,{variant:"link",className:w("member-equity-button-secondary text-btn-primary-foreground"),onClick:()=>{U(!0),t&&t?.()},children:_})]})})}),u("div",{style:i?{marginBottom:`-${F}px`,marginTop:`-${re}px`,zIndex:le}:{},className:"relative",children:[e("div",{className:"sticky top-0 ",children:u("div",{id:T,className:w("relative overflow-hidden",i?"h-screen w-full":R,{"aiui-dark":V==="dark","rounded-box":B==="rounded"}),children:[f==="fade-in"&&h&&e("div",{ref:y,className:"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:h}}),u("div",{className:"media-cover left-0 top-0 h-screen w-screen",style:{height:`${102-v*100}vh`},children:[e(Q,{videoRef:x,poster:$?.url||"",src:S?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(Q,{videoRef:x,poster:$?.url||"",src:Z?.url||S?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e("div",{ref:Y,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),e("div",{className:w(i&&"relative box-content block",R),style:i?{height:`${F}px`}:{},ref:q})]}),j&&P&&e(ye,{visible:j,youTubeId:P,onCloseModal:()=>U(!1)})]})});var De=ve(ke);export{De as default};
|
|
2
|
+
//# sourceMappingURL=index.backup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/MediaPlayerBase/index.backup.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { useState, useRef, useMemo, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport { debounce } from 'lodash'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Button from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerBaseProps } from './types.js'\n// import { Right } from './right.js'\nimport { useInView } from 'react-intersection-observer'\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\n\nconst componentName = 'media_player_base'\nconst componentType = 'video'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst MediaPlayerBase = forwardRef<HTMLDivElement, MediaPlayerBaseProps>(\n (\n {\n className = '',\n id,\n onBtnClick,\n data: { title, videoTitle, btnText, youtubeId, video, mobileVideo, theme, img, shape, titleAnimation, ...rest },\n },\n ref\n ) => {\n const { sticky } = rest\n const [isPlaying, setIsPlaying] = useState(false)\n const [btb, setbtb] = useState(0)\n const [titleHeight, setTitleHeight] = useState(0)\n const [videoHeightProgress, setVideoHeightProgress] = useState(0)\n const [visible, setVisible] = useState<boolean>(false)\n\n const videoRef = useRef<HTMLVideoElement>(null)\n const bgRef = useRef<HTMLImageElement>(null)\n const titleRef = useRef<HTMLDivElement>(null)\n const titleFadeInRef = useRef<HTMLDivElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const heightTriggerRef = useRef<ScrollTrigger | null>(null)\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => titleRef.current as HTMLDivElement)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n const videoTitle_html =\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n useEffect(() => {\n if (inView) {\n videoRef.current?.play()\n setIsPlaying(true)\n } else {\n videoRef.current?.pause()\n setIsPlaying(false)\n }\n }, [inView])\n\n const debouncedHandleResize = debounce(() => {\n if (titleRef.current) {\n const rect = titleRef.current.getBoundingClientRect()\n const screenHeight = window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n }\n if (titleRef.current) {\n const titleHeight = titleRef.current.clientHeight\n const screenHeight = window.innerHeight\n setTitleHeight(titleHeight + screenHeight)\n }\n }, 600)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n if (!titleFadeInRef.current || titleAnimation !== 'fade-in') return\n const height = titleFadeInRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleFadeInRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'top center-=10%',\n end: `top+=${height * 1.5 + 80}px center-=10%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n gsap.set(bgRef.current, { opacity: progress })\n },\n })\n }\n\n function gsapVideoHeightResize() {\n heightTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom',\n end: `bottom top`,\n // markers: true,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n console.log('progress__', progress)\n setVideoHeightProgress(progress)\n },\n })\n }\n\n if (inView) {\n gsapResize()\n gsapVideoHeightResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n heightTriggerRef.current && heightTriggerRef.current.kill()\n }\n }, [titleAnimation, inView])\n\n useExposure(trackRef, {\n componentType,\n componentName,\n componentTitle: videoTitle_html,\n })\n\n const zIndexVideo = useMemo(() => {\n if (inView && videoHeightProgress > 0 && videoHeightProgress < 0.9) return 3\n if (inView) return 2\n return 1\n }, [videoHeightProgress, inView])\n\n const aspect =\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n return (\n <>\n {sticky && (\n <div\n ref={titleRef}\n className={cn(\n 'relative z-10',\n aspect,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n },\n className\n )}\n >\n <div ref={inViewRef}>\n {!titleAnimation && (\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center\">\n {title_html && !isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n {videoTitle_html && isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: videoTitle_html }}\n />\n )}\n {btnText && (\n <Button\n variant=\"link\"\n className={cn('member-equity-button-secondary text-btn-primary-foreground')}\n onClick={() => {\n setVisible(true)\n // if (isPlaying) {\n // if (videoRef.current) {\n // videoRef.current.pause()\n // }\n // setIsPlaying(false)\n // } else {\n // if (videoRef.current) {\n // videoRef.current.play()\n // }\n // setIsPlaying(true)\n // }\n onBtnClick && onBtnClick?.()\n }}\n >\n {btnText}\n {/* <Right /> */}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n <div\n style={\n sticky\n ? {\n marginBottom: `-${btb}px`,\n marginTop: `-${titleHeight}px`,\n zIndex: zIndexVideo,\n }\n : {}\n }\n className=\"relative\"\n >\n <div className=\"sticky top-0 \">\n <div\n id={id}\n className={cn('relative overflow-hidden', sticky ? 'h-screen w-full' : aspect, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n {titleAnimation === 'fade-in' && title_html && (\n <div\n ref={titleFadeInRef}\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n <div\n className=\"media-cover left-0 top-0 h-screen w-screen\"\n style={{ height: `${102 - videoHeightProgress * 100}vh` }}\n >\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={video?.url!}\n className=\"tablet:block hidden size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={mobileVideo?.url || video?.url!}\n className=\"tablet:hidden block size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <div\n ref={bgRef}\n className=\"absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'rgba(0, 0, 0, 0.2)',\n }}\n />\n </div>\n </div>\n </div>\n <div\n className={cn(sticky && 'relative box-content block', aspect)}\n style={sticky ? { height: `${btb}px` } : {}}\n ref={trackRef}\n />\n </div>\n {visible && youtubeId && (\n <VideoModal visible={visible} youTubeId={youtubeId} onCloseModal={() => setVisible(false)} />\n )}\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerBase)\n"],
|
|
5
|
+
"mappings": "aAmLM,mBAAAA,GAkBc,OAAAC,EAFJ,QAAAC,MAhBV,oBAlLN,OAAS,YAAAC,EAAU,UAAAC,EAAQ,WAAAC,GAAS,aAAAC,EAAW,cAAAC,GAAY,uBAAAC,OAA2B,QACtF,OAAS,YAAAC,OAAgB,SACzB,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,OAAkB,yBAC3B,OAAOC,OAAY,6BACnB,OAAS,cAAAC,OAAkB,yBAC3B,OAAS,wBAAAC,MAA4B,oCAGrC,OAAS,aAAAC,OAAiB,8BAE1B,OAAS,eAAAC,OAAmB,6BAC5B,OAAOC,MAAqB,mCAC5B,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,OAAiB,sBAC1B,OAAS,iBAAAC,MAAqB,0BAE9B,MAAMC,GAAgB,oBAChBC,GAAgB,QAEhBC,EAAyC,CAAC,CAAE,kBAAAC,CAAkB,KAAO,CACzE,GAAGA,EACH,KAAMC,GAAQ,CACZ,KAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OAAIC,EAAK,GAAKA,EAAK,EAAE,MACZ,wBAAwBA,EAAK,EAAE,KAAK,KAAKA,EAAK,IAAI,UAEpDA,EAAK,IACd,CACF,GAEMC,GAAkBpB,GACtB,CACE,CACE,UAAAqB,EAAY,GACZ,GAAAC,EACA,WAAAC,EACA,KAAM,CAAE,MAAAC,EAAO,WAAAC,EAAY,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,MAAAC,EAAO,IAAAC,EAAK,MAAAC,EAAO,eAAAC,EAAgB,GAAGC,CAAK,CAChH,EACA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["Fragment", "jsx", "jsxs", "useState", "useRef", "useMemo", "useEffect", "forwardRef", "useImperativeHandle", "debounce", "cn", "withLayout", "Button", "VideoModal", "convertLexicalToHTML", "useInView", "useExposure", "ScrollLoadVideo", "gsap", "SplitText", "ScrollTrigger", "componentName", "componentType", "htmlConverters", "defaultConverters", "args", "node", "MediaPlayerBase", "className", "id", "onBtnClick", "title", "videoTitle", "btnText", "youtubeId", "video", "mobileVideo", "theme", "img", "shape", "titleAnimation", "rest", "ref", "sticky", "isPlaying", "setIsPlaying", "btb", "setbtb", "titleHeight", "setTitleHeight", "videoHeightProgress", "setVideoHeightProgress", "visible", "setVisible", "videoRef", "bgRef", "titleRef", "titleFadeInRef", "trackRef", "splitTextInstance", "scrollTriggerRef", "heightTriggerRef", "inViewRef", "inView", "title_html", "videoTitle_html", "debouncedHandleResize", "rect", "screenHeight", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "gsapVideoHeightResize", "zIndexVideo", "aspect", "index_backup_default"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { MediaPlayerBaseProps } from './types.js';
|
|
2
3
|
declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
3
|
-
className?: string;
|
|
4
|
-
data?: Record<string, any
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
data?: Record<string, any> | undefined;
|
|
5
6
|
}, "ref"> & import("react").RefAttributes<any>>;
|
|
6
7
|
export default _default;
|