@anker-in/headless-ui 1.0.19-temp-101407 → 1.0.19-temp-101408
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.js.map +2 -2
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +1 -1
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +3 -3
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/FooterNavigation/types.d.ts +1 -2
- package/dist/cjs/biz-components/FooterNavigation/types.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +5 -6
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +1 -2
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js.map +3 -3
- 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/HeaderNavigation/types.d.ts +2 -16
- package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +4 -4
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Subscribe/index.d.ts +1 -7
- package/dist/cjs/biz-components/Subscribe/index.js +1 -1
- package/dist/cjs/biz-components/Subscribe/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +2 -2
- package/dist/cjs/biz-components/Title/types.d.ts +1 -3
- 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/index.d.ts +0 -25
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- package/dist/cjs/components/dialog.d.ts +1 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/index.d.ts +0 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/helpers/utils.d.ts +0 -1
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/stories/shelfDisplay.stories.js +1 -644
- package/dist/cjs/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/cjs/stories/tabs.stories.js +1 -1
- package/dist/cjs/stories/tabs.stories.js.map +3 -3
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +1 -1
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +3 -3
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/FooterNavigation/types.d.ts +1 -2
- package/dist/esm/biz-components/FooterNavigation/types.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +5 -6
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +1 -2
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js.map +3 -3
- 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/HeaderNavigation/types.d.ts +2 -16
- package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +9 -9
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Subscribe/index.d.ts +1 -7
- package/dist/esm/biz-components/Subscribe/index.js +1 -1
- package/dist/esm/biz-components/Subscribe/index.js.map +3 -3
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +2 -2
- package/dist/esm/biz-components/Title/types.d.ts +1 -3
- package/dist/esm/biz-components/index.d.ts +0 -25
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +2 -2
- package/dist/esm/components/dialog.d.ts +1 -3
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +3 -3
- package/dist/esm/components/index.d.ts +0 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/helpers/utils.d.ts +0 -1
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/stories/shelfDisplay.stories.js +1 -644
- package/dist/esm/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/esm/stories/tabs.stories.js +1 -1
- package/dist/esm/stories/tabs.stories.js.map +3 -3
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/tokens/base.css +1 -1
- package/package.json +1 -1
- package/style.css +0 -4
- package/dist/cjs/biz-components/AplusDesc/index.js +0 -2
- package/dist/cjs/biz-components/AplusDesc/index.js.map +0 -7
- package/dist/cjs/biz-components/DownLoad/index.js +0 -2
- package/dist/cjs/biz-components/DownLoad/index.js.map +0 -7
- package/dist/cjs/biz-components/Features/index.js +0 -2
- package/dist/cjs/biz-components/Features/index.js.map +0 -7
- package/dist/cjs/biz-components/FootCharger/index.js +0 -2
- package/dist/cjs/biz-components/FootCharger/index.js.map +0 -7
- package/dist/cjs/biz-components/GiftBox/index.js +0 -2
- package/dist/cjs/biz-components/GiftBox/index.js.map +0 -7
- package/dist/cjs/biz-components/GraphicMore/index.js +0 -2
- package/dist/cjs/biz-components/GraphicMore/index.js.map +0 -7
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js +0 -2
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js.map +0 -7
- package/dist/cjs/biz-components/Listing/ProductProvider.js +0 -2
- package/dist/cjs/biz-components/Listing/ProductProvider.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/const.js +0 -2
- package/dist/cjs/biz-components/Listing/const.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-options.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-options.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +0 -7
- package/dist/cjs/biz-components/Listing/index.js +0 -2
- package/dist/cjs/biz-components/Listing/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/graphql.js +0 -2
- package/dist/cjs/biz-components/Listing/types/graphql.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/product.js +0 -2
- package/dist/cjs/biz-components/Listing/types/product.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +0 -2
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/type-helper.js +0 -2
- package/dist/cjs/biz-components/Listing/types/type-helper.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types.js +0 -2
- package/dist/cjs/biz-components/Listing/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/helper.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/helper.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/index.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/index.js.map +0 -7
- package/dist/cjs/biz-components/NavigationSearch/index.js +0 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +0 -7
- package/dist/cjs/biz-components/NavigationSearch/types.js +0 -2
- package/dist/cjs/biz-components/NavigationSearch/types.js.map +0 -7
- package/dist/cjs/biz-components/SearchPage/index.js +0 -2
- package/dist/cjs/biz-components/SearchPage/index.js.map +0 -7
- package/dist/cjs/biz-components/SearchPage/types.js +0 -2
- package/dist/cjs/biz-components/SearchPage/types.js.map +0 -7
- package/dist/cjs/biz-components/SelectStore/index.js +0 -2
- package/dist/cjs/biz-components/SelectStore/index.js.map +0 -7
- package/dist/cjs/biz-components/Specs/dropdown.js +0 -3
- package/dist/cjs/biz-components/Specs/dropdown.js.map +0 -7
- package/dist/cjs/biz-components/Specs/index.js +0 -2
- package/dist/cjs/biz-components/Specs/index.js.map +0 -7
- package/dist/cjs/components/loadingDots.js +0 -42
- package/dist/cjs/components/loadingDots.js.map +0 -7
- package/dist/cjs/stories/aplusdesc.stories.js +0 -2
- package/dist/cjs/stories/aplusdesc.stories.js.map +0 -7
- package/dist/cjs/stories/download.stories.js +0 -2
- package/dist/cjs/stories/download.stories.js.map +0 -7
- package/dist/cjs/stories/features.stories.js +0 -2
- package/dist/cjs/stories/features.stories.js.map +0 -7
- package/dist/cjs/stories/footcharger.stories.js +0 -2
- package/dist/cjs/stories/footcharger.stories.js.map +0 -7
- package/dist/cjs/stories/giftbox.stories.js +0 -2
- package/dist/cjs/stories/giftbox.stories.js.map +0 -7
- package/dist/cjs/stories/graphicMore.stories.js +0 -2
- package/dist/cjs/stories/graphicMore.stories.js.map +0 -7
- package/dist/cjs/stories/selectstore.stories.js +0 -2
- package/dist/cjs/stories/selectstore.stories.js.map +0 -7
- package/dist/esm/biz-components/AplusDesc/index.js +0 -2
- package/dist/esm/biz-components/AplusDesc/index.js.map +0 -7
- package/dist/esm/biz-components/DownLoad/index.js +0 -2
- package/dist/esm/biz-components/DownLoad/index.js.map +0 -7
- package/dist/esm/biz-components/Features/index.js +0 -2
- package/dist/esm/biz-components/Features/index.js.map +0 -7
- package/dist/esm/biz-components/FootCharger/index.js +0 -2
- package/dist/esm/biz-components/FootCharger/index.js.map +0 -7
- package/dist/esm/biz-components/GiftBox/index.js +0 -2
- package/dist/esm/biz-components/GiftBox/index.js.map +0 -7
- package/dist/esm/biz-components/GraphicMore/index.js +0 -2
- package/dist/esm/biz-components/GraphicMore/index.js.map +0 -7
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js +0 -2
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js.map +0 -7
- package/dist/esm/biz-components/Listing/ProductProvider.js +0 -2
- package/dist/esm/biz-components/Listing/ProductProvider.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/const.js +0 -2
- package/dist/esm/biz-components/Listing/const.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-options.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-options.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-variant.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/useCopy.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +0 -7
- package/dist/esm/biz-components/Listing/index.js +0 -2
- package/dist/esm/biz-components/Listing/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/graphql.js +0 -2
- package/dist/esm/biz-components/Listing/types/graphql.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/product.js +0 -2
- package/dist/esm/biz-components/Listing/types/product.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js +0 -2
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/type-helper.js +0 -1
- package/dist/esm/biz-components/Listing/types/type-helper.js.map +0 -7
- package/dist/esm/biz-components/Listing/types.js +0 -1
- package/dist/esm/biz-components/Listing/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/helper.js +0 -2
- package/dist/esm/biz-components/Listing/utils/helper.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/index.js +0 -2
- package/dist/esm/biz-components/Listing/utils/index.js.map +0 -7
- package/dist/esm/biz-components/NavigationSearch/index.js +0 -2
- package/dist/esm/biz-components/NavigationSearch/index.js.map +0 -7
- package/dist/esm/biz-components/NavigationSearch/types.js +0 -2
- package/dist/esm/biz-components/NavigationSearch/types.js.map +0 -7
- package/dist/esm/biz-components/SearchPage/index.js +0 -2
- package/dist/esm/biz-components/SearchPage/index.js.map +0 -7
- package/dist/esm/biz-components/SearchPage/types.js +0 -2
- package/dist/esm/biz-components/SearchPage/types.js.map +0 -7
- package/dist/esm/biz-components/SelectStore/index.js +0 -2
- package/dist/esm/biz-components/SelectStore/index.js.map +0 -7
- package/dist/esm/biz-components/Specs/dropdown.js +0 -3
- package/dist/esm/biz-components/Specs/dropdown.js.map +0 -7
- package/dist/esm/biz-components/Specs/index.js +0 -2
- package/dist/esm/biz-components/Specs/index.js.map +0 -7
- package/dist/esm/components/loadingDots.js +0 -42
- package/dist/esm/components/loadingDots.js.map +0 -7
- package/dist/esm/stories/aplusdesc.stories.js +0 -2
- package/dist/esm/stories/aplusdesc.stories.js.map +0 -7
- package/dist/esm/stories/download.stories.js +0 -2
- package/dist/esm/stories/download.stories.js.map +0 -7
- package/dist/esm/stories/features.stories.js +0 -2
- package/dist/esm/stories/features.stories.js.map +0 -7
- package/dist/esm/stories/footcharger.stories.js +0 -2
- package/dist/esm/stories/footcharger.stories.js.map +0 -7
- package/dist/esm/stories/giftbox.stories.js +0 -2
- package/dist/esm/stories/giftbox.stories.js.map +0 -7
- package/dist/esm/stories/graphicMore.stories.js +0 -2
- package/dist/esm/stories/graphicMore.stories.js.map +0 -7
- package/dist/esm/stories/selectstore.stories.js +0 -2
- package/dist/esm/stories/selectstore.stories.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Picture } from '../../../../../../components'\nimport { handle } from '../../../../utils/helper.js'\nimport { useState } from 'react'\nimport { cn as classNames } from '../../../../../../helpers'\nimport { useAiuiContext } from '../../../../../AiuiProvider/index.js'\n\nexport const ShopifyColorOption = ({\n onClick,\n label,\n className,\n}: {\n onClick?: () => void\n label: string\n className?: string\n}) => {\n const [imgLoadError, setImgLoadError] = useState({})\n\n const { locale, storeDomain } = useAiuiContext()\n const imagePath = `https://${storeDomain}/cdn/shop/files/${handle(label)}.png`\n return (\n <div className='relative'>\n <button\n className={classNames(\n `relative flex h-[36px] w-[36px] items-center justify-center rounded-full bg-center bg-no-repeat outline outline-2 outline-offset-4 outline-white`,\n !onClick && 'cursor-default',\n className,\n )}\n aria-label={`switch to ${label}`}\n onClick={onClick ? onClick : () => {}}\n title={label}\n // If the image fails to load, set the background color to the color of the label\n style={imgLoadError[label as keyof typeof imgLoadError] ? { background: label } : {}}\n >\n {!imgLoadError[label as keyof typeof imgLoadError] && (\n <>\n <Picture\n className='w-full'\n source={imagePath}\n onError={({ currentTarget }) => {\n currentTarget.onerror = null // prevents looping\n setImgLoadError((prev) => ({ ...prev, [label]: true }))\n }}\n />\n </>\n )}\n </button>\n <div className='absolute inset-0 rounded-full shadow-[inset_0_0_4px_rgba(0,0,0,0.08),inset_0_2px_2px_rgba(0,0,0,0.12)]'></div>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAoBI,IAAAI,EAAA,6BApBJC,EAAwB,wCACxBC,EAAuB,uCACvBC,EAAyB,iBACzBC,EAAiC,qCACjCC,EAA+B,gDAExB,MAAMP,EAAqB,CAAC,CACjC,QAAAQ,EACA,MAAAC,EACA,UAAAC,CACF,IAIM,CACJ,KAAM,CAACC,EAAcC,CAAe,KAAI,YAAS,CAAC,CAAC,EAE7C,CAAE,OAAAC,EAAQ,YAAAC,CAAY,KAAI,kBAAe,EACzCC,EAAY,WAAWD,CAAW,sBAAmB,UAAOL,CAAK,CAAC,OACxE,SACE,QAAC,OAAI,UAAU,WACb,oBAAC,UACC,aAAW,EAAAO,IACT,mJACA,CAACR,GAAW,iBACZE,CACF,EACA,aAAY,aAAaD,CAAK,GAC9B,QAASD,IAAoB,IAAM,CAAC,GACpC,MAAOC,EAEP,MAAOE,EAAaF,CAAkC,EAAI,CAAE,WAAYA,CAAM,EAAI,CAAC,EAElF,UAACE,EAAaF,CAAkC,MAC/C,mBACE,mBAAC,WACC,UAAU,SACV,OAAQM,EACR,QAAS,CAAC,CAAE,cAAAE,CAAc,IAAM,CAC9BA,EAAc,QAAU,KACxBL,EAAiBM,IAAU,CAAE,GAAGA,EAAM,CAACT,CAAK,EAAG,EAAK,EAAE,CACxD,EACF,EACF,EAEJ,KACA,OAAC,OAAI,UAAU,yGAAyG,GAC1H,CAEJ",
|
|
6
|
-
"names": ["ShopifyColorOption_exports", "__export", "ShopifyColorOption", "__toCommonJS", "import_jsx_runtime", "import_components", "import_helper", "import_react", "import_helpers", "import_AiuiProvider", "onClick", "label", "className", "imgLoadError", "setImgLoadError", "locale", "storeDomain", "imagePath", "classNames", "currentTarget", "prev"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(a,o)=>{for(var l in o)s(a,l,{get:o[l],enumerable:!0})},x=(a,o,l,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of n(o))!g.call(a,r)&&r!==l&&s(a,r,{get:()=>o[r],enumerable:!(i=d(o,r))||i.enumerable});return a};var p=a=>x(s({},"__esModule",{value:!0}),a);var f={};c(f,{SpecsModal:()=>b});module.exports=p(f);var t=require("react/jsx-runtime"),e=require("../../../../../../components"),m=require("../../../../ProductProvider");const b=()=>{const{product:a}=(0,m.useProductContext)();return(0,t.jsxs)(e.Dialog,{children:[(0,t.jsx)(e.DialogTrigger,{children:(0,t.jsx)("button",{className:"text-base leading-[1.4] font-bold",children:"Specs"})}),(0,t.jsxs)(e.DialogContent,{overlayClassName:"z-[100]",className:"max-h-[80vh] z-[110] overflow-y-scroll tablet:min-w-[600px] min-w-[90vw]",children:[(0,t.jsx)(e.DialogHeader,{className:"border-b border-[#E8E8E8]",children:(0,t.jsx)(e.DialogTitle,{children:"Specs"})}),(0,t.jsx)(e.Grid,{className:"gap-[40px]",children:a.metafields?.global?.specifications?.map(({key:o,value:l})=>(0,t.jsxs)(e.GridItem,{span:12,className:"flex w-full py-[24px] border-b border-[#E8E8E8]",children:[(0,t.jsx)(e.Text,{className:"flex-1 text-[16px] font-bold text-[#595959]",children:o}),(0,t.jsx)("div",{className:"flex-1 flex items-center",children:(0,t.jsx)(e.Text,{className:"text-[16px] font-semibold text-[#595959]",html:l?.trim().toLowerCase()==="true"?"\u2714\uFE0F":l?.trim().toLowerCase()==="false"?"\u274C":l})})]}))})]})]})};
|
|
2
|
-
//# sourceMappingURL=SpecsModal.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n Grid,\n GridItem,\n Text,\n} from '../../../../../../components'\nimport { useProductContext } from '../../../../ProductProvider'\n\nexport const SpecsModal = () => {\n const { product } = useProductContext()\n\n return (\n <Dialog>\n <DialogTrigger>\n <button className=\"text-base leading-[1.4] font-bold\">Specs</button>\n </DialogTrigger>\n <DialogContent\n overlayClassName=\"z-[100]\"\n className=\"max-h-[80vh] z-[110] overflow-y-scroll tablet:min-w-[600px] min-w-[90vw]\"\n >\n <DialogHeader className=\"border-b border-[#E8E8E8]\">\n <DialogTitle>Specs</DialogTitle>\n </DialogHeader>\n <Grid className=\"gap-[40px]\">\n {product.metafields?.global?.specifications?.map(({ key, value }: { key: string; value: string }) => (\n <GridItem span={12} className=\"flex w-full py-[24px] border-b border-[#E8E8E8]\">\n <Text className=\"flex-1 text-[16px] font-bold text-[#595959]\">{key}</Text>\n <div className=\"flex-1 flex items-center\">\n <Text\n className=\"text-[16px] font-semibold text-[#595959]\"\n html={\n value?.trim().toLowerCase() === 'true'\n ? '\u2714\uFE0F'\n : value?.trim().toLowerCase() === 'false'\n ? '\u274C'\n : value\n }\n />\n </div>\n </GridItem>\n ))}\n </Grid>\n </DialogContent>\n </Dialog>\n )\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAkBQ,IAAAI,EAAA,6BAlBRC,EASO,wCACPC,EAAkC,uCAE3B,MAAMJ,EAAa,IAAM,CAC9B,KAAM,CAAE,QAAAK,CAAQ,KAAI,qBAAkB,EAEtC,SACE,QAAC,UACC,oBAAC,iBACC,mBAAC,UAAO,UAAU,oCAAoC,iBAAK,EAC7D,KACA,QAAC,iBACC,iBAAiB,UACjB,UAAU,2EAEV,oBAAC,gBAAa,UAAU,4BACtB,mBAAC,eAAY,iBAAK,EACpB,KACA,OAAC,QAAK,UAAU,aACb,SAAAA,EAAQ,YAAY,QAAQ,gBAAgB,IAAI,CAAC,CAAE,IAAAC,EAAK,MAAAC,CAAM,OAC7D,QAAC,YAAS,KAAM,GAAI,UAAU,kDAC5B,oBAAC,QAAK,UAAU,8CAA+C,SAAAD,EAAI,KACnE,OAAC,OAAI,UAAU,2BACb,mBAAC,QACC,UAAU,2CACV,KACEC,GAAO,KAAK,EAAE,YAAY,IAAM,OAC5B,eACAA,GAAO,KAAK,EAAE,YAAY,IAAM,QAC9B,SACAA,EAEV,EACF,GACF,CACD,EACH,GACF,GACF,CAEJ",
|
|
6
|
-
"names": ["SpecsModal_exports", "__export", "SpecsModal", "__toCommonJS", "import_jsx_runtime", "import_components", "import_ProductProvider", "product", "key", "value"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var B=Object.create;var S=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var _=(t,a)=>{for(var l in a)S(t,l,{get:a[l],enumerable:!0})},V=(t,a,l,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of j(a))!$.call(t,i)&&i!==l&&S(t,i,{get:()=>a[i],enumerable:!(n=D(a,i))||n.enumerable});return t};var O=(t,a,l)=>(l=t!=null?B(F(t)):{},V(a||!t||!t.__esModule?S(l,"default",{value:t,enumerable:!0}):l,t)),W=t=>V(S({},"__esModule",{value:!0}),t);var U={};_(U,{default:()=>Q});module.exports=W(U);var e=require("react/jsx-runtime"),G=require("../../../../AiuiProvider/index.js"),b=require("../../../../../components"),r=require("react"),v=require("swiper/react"),d=require("swiper/modules"),x=require("../../../../../helpers/index.js"),C=require("./types.js"),g=require("@radix-ui/react-tabs"),N=require("../../../ProductProvider.js"),E=require("../../../hooks/use-variant-media.js"),I=require("./components/SpecsModal.js"),R=O(require("./components/CompareModal.js")),z=require("../../../utils/index.js");const Y=t=>(0,e.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,e.jsx)("rect",{x:"48",y:"48",width:"48",height:"48",rx:"24",transform:"rotate(-180 48 48)",fill:"white"}),(0,e.jsx)("path",{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",fill:"currentColor"})]}),Z=t=>(0,e.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,e.jsx)("rect",{width:"48",height:"48",rx:"24",transform:"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)",fill:"white"}),(0,e.jsx)("path",{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",fill:"currentColor"})]}),H=()=>{const{copyWriting:t}=(0,G.useAiuiContext)(),{product:a,variant:l,isMobile:n}=(0,N.useProductContext)(),i=(0,E.useVariantMedia)({product:a,variant:l}),[T,k]=(0,r.useState)(null),c=l?.metafields?.component?.custom_media_list;let p,f,w,y;c&&c?.available?(p=c?.product||[],f=c?.scenarios||[],w=c?.keyFeatures||[],y=c?.video||[]):(p=i?.productList,f=i?.sceneList,w=i?.keyFeaturesList,y=i?.videoList);const P=(0,r.useMemo)(()=>[...p,...f,...y],[p,f,y]),M={productList:p,keyFeaturesList:w,sceneList:f,videoList:y},u=(0,r.useMemo)(()=>(a?.payload?.components?.find(s=>s.componentKey==="ProductGallery")?.data||[])?.map(s=>({...s,galleries:M[s?.galleries]||[]})).filter(s=>s.galleries.length>0),[a?.payload,p,f,y]),o=(0,r.useRef)({}),[h,L]=(0,r.useState)(u?.[0]),A=(m,s)=>{switch(m?.galleryTabType){case C.GalleryTabType.GALLERY_IMAGE:return(0,e.jsx)(q,{...m,onCurrentTabLoopEnd:()=>{L(u?.[s])},onCurrentTabLoopStart:()=>{L(u?.[s])},index:s});case C.GalleryTabType.GALLERY_VIDEO:return(0,e.jsx)(J,{...m});default:return null}};return(0,e.jsx)("div",{id:"ipc-product-gallery",children:(0,e.jsxs)(g.Root,{className:"relative",defaultValue:u?.[0]?.tabValue,children:[(0,e.jsx)("div",{className:"h-[420px] tablet:h-[620px] desktop:h-[560px] lg-desktop:h-[700px] bg-[#EAEAEC] desktop:relative ",children:u.map((m,s)=>(0,e.jsx)(g.Content,{className:"h-full",value:m.tabValue,children:A(m,s)},m.tabValue))}),(0,e.jsx)(K,{galleryTabs:u,activeGalleryTab:h,setActiveGalleryTab:L})]})})},K=({galleryTabs:t,activeGalleryTab:a,setActiveGalleryTab:l})=>(0,e.jsxs)("div",{className:"absolute z-[2] bottom-4 left-4 right-4 flex justify-between items-center tablet:mt-3 desktop:static",children:[(0,e.jsx)(g.List,{className:"rounded-full bg-[#EAEAEC] p-1",children:t?.map(n=>(0,e.jsx)(g.Trigger,{className:(0,x.cn)("lg-desktop:px-7 lg-desktop:pb-[14px] rounded-full font-bold lg-desktop:pt-[15px] lg-desktop:text-[16px] px-5 pb-[10px] pt-[11px] text-[14px] leading-tight",n.tabValue===a?.tabValue&&"bg-white"),onClick:()=>l(n),value:n.tabValue,children:n.tabLabel},n.tabValue))}),(0,e.jsxs)("div",{className:"laptop:gap-2 hidden laptop:flex",children:[(0,e.jsx)(I.SpecsModal,{})," |",(0,e.jsx)(R.default,{})]})]}),q=(0,r.forwardRef)((t,a)=>{const{locale:l="us",copyWriting:n}=(0,G.useAiuiContext)(),{variant:i,totalSavings:T}=(0,N.useProductContext)(),k=(0,r.useRef)(null),[c,p]=(0,r.useState)(null),[f,w]=(0,r.useState)(!0),[y,P]=(0,r.useState)(!1),[M,u]=(0,r.useState)(null);return(0,e.jsxs)("div",{className:"h-full",children:[(0,e.jsx)(v.Swiper,{ref:a,className:"desktop:rounded-2xl h-full",navigation:{nextEl:`.ipc-product-gallery-${t?.id}-custom-swiper-button-next`,prevEl:`.ipc-product-gallery-${t?.id}-custom-swiper-button-prev`},onSwiper:u,onProgress:o=>{w(o.isBeginning),P(o.isEnd)},pagination:{clickable:!0,el:k.current},onSlideChange:o=>{o&&(o.isEnd?t?.onCurrentTabLoopEnd?.():o.isBeginning&&t?.onCurrentTabLoopStart?.())},thumbs:{swiper:c},modules:[d.Mousewheel,d.Thumbs,d.Navigation,d.Pagination],mousewheel:{forceToAxis:!0},breakpoints:{0:{slidesPerView:1,freeMode:!1}},children:t?.galleries?.map((o,h)=>(0,e.jsx)(v.SwiperSlide,{className:"h-full",children:(0,e.jsx)(b.Picture,{source:o?.image?.url,alt:o?.image?.altText,className:"h-full",imgClassName:"object-contain h-full "})},t?.id+"SwiperSlideItem"+h))}),!t.index&&i.availableForSale&&T&&(0,e.jsx)(b.Badge,{size:"lg",className:"absolute bg-brand text-white top-3 left-4 z-[2]",children:`${(0,z.formatPrice)({amount:T,currencyCode:i?.price?.currencyCode,locale:l})} ${n?.off}`}),(0,e.jsx)("div",{className:(0,x.cn)("hidden tablet:block tablet:absolute tablet:top-1/2 tablet:left-6 z-10 -translate-y-1/2 cursor-pointer",`ipc-product-gallery-${t?.id}-custom-swiper-button-prev`),children:(0,e.jsx)(Y,{className:"tablet:size-10 lg-desktop:size-12"})}),(0,e.jsx)("div",{className:(0,x.cn)("hidden tablet:block tablet:absolute tablet:top-1/2 tablet:right-6 z-10 -translate-y-1/2 cursor-pointer",`ipc-product-gallery-${t?.id}-custom-swiper-button-next`),children:(0,e.jsx)(Z,{className:"tablet:size-10 lg-desktop:size-12"})}),(0,e.jsxs)("div",{className:"absolute bottom-[94px] tablet:bottom-[70px] left-4 right-4 z-10 items-center tablet:flex justify-between desktop:bottom-[20px] desktop:right-[6] desktop:left-[6]",children:[(0,e.jsx)("div",{className:"hidden tablet:block",children:(0,e.jsx)(v.Swiper,{className:"flex items-center justify-between",onSwiper:p,spaceBetween:12,slidesPerView:6,freeMode:!0,watchSlidesProgress:!0,modules:[d.Navigation,d.Thumbs],children:t?.galleries?.map((o,h)=>(0,e.jsx)(v.SwiperSlide,{className:"!w-auto [&.swiper-slide-thumb-active]:border [&.swiper-slide-thumb-active]:border-brand",children:(0,e.jsx)(b.Picture,{source:o.image?.url,alt:o.image?.altText,className:"size-10 lg-desktop:size-12 rounded",imgClassName:"object-contain h-full"})},t?.id+"SwiperSlideThumbItem"+h))})}),!t?.index&&(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(b.Picture,{source:t?.comment?.avatar?.url,className:"size-10 rounded-full shrink-0",imgClassName:"object-cover "}),(0,e.jsx)(b.Text,{html:t?.comment?.content,className:"text-sm lg-desktop:text-base max-w-[528px] font-bold text-[#6D6D6F] line-clamp-2"})]})]}),(0,e.jsx)("div",{ref:k,className:"tablet:hidden text-center absolute !bottom-[70px] left-4 right-4 z-10"})]})}),J=t=>(0,e.jsx)("div",{className:"h-full",children:(0,e.jsx)("video",{controls:!0,className:"size-full",children:(0,e.jsx)("track",{kind:"captions"})})}),le=t=>(0,e.jsx)("div",{children:"3D View"});var Q=H;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { Text, Picture, Button, Badge } from '../../../../../components'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n type RefObject,\n useEffect,\n type Dispatch,\n type SetStateAction,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination } 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 { useProductContext } from '../../../ProductProvider.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'\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'\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, isMobile } = useProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(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 keyFeaturesList: keyFeaturesList,\n sceneList: sceneList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => ({\n ...item,\n galleries: galleryMap[item?.galleries] || [],\n }))\n .filter((item: any) => item.galleries.length > 0)\n }, [product?.payload, productList, sceneList, videoList])\n\n // \u4E3A\u6BCF\u4E2A galleryTab \u521B\u5EFA\u5BF9\u5E94\u7684 ref\n const gallerySwiperRefs = useRef<{ [key: string]: SwiperRef | null }>({})\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\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:\n return (\n <ProductGalleryTabImage\n {...tab}\n onCurrentTabLoopEnd={() => {\n setActiveGalleryTab(galleryTabs?.[index])\n }}\n onCurrentTabLoopStart={() => {\n setActiveGalleryTab(galleryTabs?.[index])\n }}\n index={index}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return <ProductGalleryTabVideo {...tab} />\n // case GalleryTabType.GALLERY_3D_VIEW:\n // return <ProductGalleryTab3DView {...item} />\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" defaultValue={galleryTabs?.[0]?.tabValue}>\n {/* <Swiper\n className=\"h-[420px] laptop:h-[700px] bg-[#EAEAEC] rounded-2xl\"\n onSwiper={setSwiper}\n loop={true}\n // onProgress={swiper => {\n // setStart(swiper.isBeginning)\n // setEnd(swiper.isEnd)\n // }}\n modules={[Mousewheel]}\n mousewheel={{\n forceToAxis: true,\n }}\n >\n {galleryTabs.map((item, index) => {\n return (\n <Content forceMount key={item.tabValue} value={item.tabValue}>\n <SwiperSlide key={index}>{renderGalleryForTab(activeGalleryTab)}</SwiperSlide>\n </Content>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'absolute top-1/2 left-6 z-10 -translate-y-1/2 cursor-pointer',\n `ipc-product-gallery-custom-swiper-button-prev`\n )}\n >\n <SwiperLeftButtonIcon\n className=\"size-12\"\n onClick={() => {\n if (activeGalleryTab?.tabValue) {\n const currentRef = gallerySwiperRefs.current[activeGalleryTab.tabValue]\n currentRef?.swiper?.slidePrev()\n }\n }}\n />\n </div>\n <div\n className={cn(\n 'absolute top-1/2 right-6 z-10 -translate-y-1/2 cursor-pointer',\n `ipc-product-gallery-custom-swiper-button-next`\n )}\n >\n <SwiperRightButtonIcon\n className=\"size-12\"\n onClick={() => {\n if (activeGalleryTab?.tabValue) {\n const currentRef = gallerySwiperRefs.current[activeGalleryTab.tabValue]\n currentRef?.swiper?.slideNext()\n }\n }}\n />\n </div> */}\n <div className=\"h-[420px] tablet:h-[620px] desktop:h-[560px] lg-desktop:h-[700px] bg-[#EAEAEC] desktop:relative \">\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 galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n />\n </Root>\n </div>\n )\n}\n\nconst ProductGalleryTab = ({\n galleryTabs,\n activeGalleryTab,\n setActiveGalleryTab,\n}: {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n}) => {\n return (\n <div className=\"absolute z-[2] bottom-4 left-4 right-4 flex justify-between items-center tablet:mt-3 desktop:static\">\n <List className=\"rounded-full bg-[#EAEAEC] p-1\">\n {galleryTabs?.map(item => {\n return (\n <Trigger\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] rounded-full font-bold lg-desktop:pt-[15px] lg-desktop:text-[16px] px-5 pb-[10px] pt-[11px] text-[14px] leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={() => setActiveGalleryTab(item)}\n key={item.tabValue}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </List>\n <div className=\"laptop:gap-2 hidden laptop:flex\">\n <SpecsModal /> |\n <CompareModal />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n return (\n <div className=\"h-full\">\n <Swiper\n ref={ref}\n className=\"desktop:rounded-2xl 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 onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n onSlideChange={swiper => {\n if (swiper) {\n if (swiper.isEnd) {\n props?.onCurrentTabLoopEnd?.()\n } else if (swiper.isBeginning) {\n props?.onCurrentTabLoopStart?.()\n }\n }\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 return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <Picture\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-contain h-full \"\n />\n </SwiperSlide>\n )\n })}\n </Swiper>\n {!props.index && variant.availableForSale && totalSavings && (\n <Badge size=\"lg\" className=\"absolute bg-brand text-white top-3 left-4 z-[2]\">\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 'hidden tablet:block tablet:absolute tablet:top-1/2 tablet:left-6 z-10 -translate-y-1/2 cursor-pointer',\n `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'hidden tablet:block tablet:absolute tablet:top-1/2 tablet:right-6 z-10 -translate-y-1/2 cursor-pointer',\n `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n >\n <SwiperRightButtonIcon className=\"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=\"absolute bottom-[94px] tablet:bottom-[70px] left-4 right-4 z-10 items-center tablet:flex justify-between desktop:bottom-[20px] desktop:right-[6] desktop:left-[6]\">\n <div className=\"hidden tablet:block\">\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=\"!w-auto [&.swiper-slide-thumb-active]:border [&.swiper-slide-thumb-active]:border-brand\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"size-10 lg-desktop:size-12 rounded\"\n imgClassName=\"object-contain 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=\"size-10 rounded-full shrink-0\"\n imgClassName=\"object-cover \"\n />\n <Text\n html={props?.comment?.content}\n className=\"text-sm lg-desktop:text-base max-w-[528px] font-bold text-[#6D6D6F] line-clamp-2\"\n />\n </div>\n )}\n </div>\n <div ref={paginationRef} className=\"tablet:hidden text-center absolute !bottom-[70px] left-4 right-4 z-10\" />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n return (\n <div className=\"h-full\">\n <video controls className=\"size-full\">\n <track kind=\"captions\" />\n {/* <source src={props?.galleryVideo?.url} type=\"video/mp4\" />\n <source src={props?.galleryVideo?.url} type=\"video/webm\" />\n <source src={props?.galleryVideo?.url} type=\"video/ogg\" /> */}\n </video>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default ProductGallery\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["ProductGallery_exports", "__export", "ProductGallery_default", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_react", "import_modules", "import_helpers", "import_types", "import_react_tabs", "import_ProductProvider", "import_use_variant_media", "import_SpecsModal", "import_CompareModal", "import_utils", "SwiperLeftButtonIcon", "props", "SwiperRightButtonIcon", "ProductGallery", "copyWriting", "product", "variant", "isMobile", "defaultMediaData", "swiper", "setSwiper", "customMediaList", "productList", "sceneList", "keyFeaturesList", "videoList", "allMedia", "galleryMap", "galleryTabs", "item", "gallerySwiperRefs", "activeGalleryTab", "setActiveGalleryTab", "renderGalleryForTab", "tab", "index", "ProductGalleryTabImage", "ProductGalleryTabVideo", "ProductGalleryTab", "CompareModal", "ref", "locale", "totalSavings", "paginationRef", "thumbsSwiper", "setThumbsSwiper", "isStart", "setStart", "isEnd", "setEnd", "jIndex", "ProductGalleryTab3DView"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var p=(a,e)=>{for(var i in e)o(a,i,{get:e[i],enumerable:!0})},s=(a,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!g.call(a,r)&&r!==i&&o(a,r,{get:()=>e[r],enumerable:!(t=n(e,r))||t.enumerable});return a};var m=a=>s(o({},"__esModule",{value:!0}),a);var b={};p(b,{GalleryTabType:()=>l});module.exports=m(b);var l=(t=>(t.GALLERY_IMAGE="ipc-gallery-tab-image",t.GALLERY_VIDEO="ipc-gallery-tab-video",t.GALLERY_3D_VIEW="ipc-gallery-tab-3d-view",t))(l||{});
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Img, Video } from '../../../../../types/props.js'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\n\nexport interface ProductGalleryProps {\n data: {\n gallerySections: {\n title: string\n }[]\n }\n}\n\nexport interface ProductGalleryTabItemProps {\n index: number\n galleryTabType: GalleryTabType\n galleries: ImageMedia[] | VideoMedia[]\n onCurrentTabLoopStart?: () => void\n onCurrentTabLoopEnd?: () => void\n id: string\n comment?: {\n content: string\n avatar: Img\n }\n tabLabel: string\n tabValue: string\n // galleryImgs?: Img[]\n // galleryVideo?: Video\n // gallery3DView?: Video\n}\n\nexport interface GalleryTabItemProps {\n tabLabel: string\n tabValue: string\n id: string\n galleryTabType: GalleryTabType\n galleries: ImageMedia[] | VideoMedia[]\n}[]\n\nexport enum GalleryTabType {\n GALLERY_IMAGE = 'ipc-gallery-tab-image',\n GALLERY_VIDEO = 'ipc-gallery-tab-video',\n GALLERY_3D_VIEW = 'ipc-gallery-tab-3d-view',\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAqCO,IAAKE,OACVA,EAAA,cAAgB,wBAChBA,EAAA,cAAgB,wBAChBA,EAAA,gBAAkB,0BAHRA,OAAA",
|
|
6
|
-
"names": ["types_exports", "__export", "GalleryTabType", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var m=(o,t)=>{for(var e in t)s(o,e,{get:t[e],enumerable:!0})},k=(o,t,e,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of r(t))!i.call(o,a)&&a!==e&&s(o,a,{get:()=>t[a],enumerable:!(c=l(t,a))||c.enumerable});return o};var x=o=>k(s({},"__esModule",{value:!0}),o);var R={};m(R,{default:()=>N});module.exports=x(R);var p=require("react/jsx-runtime"),d=require("../../../../components");const G=({BoxLeftGallery:o,BoxRightDetail:t,BoxBottomSummary:e})=>(0,p.jsxs)("div",{id:"ipc-product-card",className:"desktop:mt-6 desktop:px-16 lg-desktop:px-[calc(50%-832px)]",children:[(0,p.jsxs)(d.Grid,{className:"laptop:gap-6",children:[(0,p.jsx)(d.GridItem,{className:"col-span-12 tablet:px-8 laptop:px-16 desktop:px-0 desktop:col-start-1 desktop:col-span-8 desktop:sticky desktop:top-[124px] h-fit",children:o}),(0,p.jsx)(d.GridItem,{className:"col-span-12 desktop:col-start-9 desktop:col-span-4",children:t})]}),e]});var N=G;
|
|
2
|
-
//# sourceMappingURL=ProductGridBox.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/biz-components/Listing/components/ProductCard/ProductGridBox.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Grid, GridItem } from '../../../../components'\n\nconst ProductGridBox = ({\n BoxLeftGallery,\n BoxRightDetail,\n BoxBottomSummary,\n}: {\n BoxLeftGallery: React.ReactNode\n BoxRightDetail: React.ReactNode\n BoxBottomSummary: React.ReactNode\n}) => {\n return (\n <div id=\"ipc-product-card\" className=\"desktop:mt-6 desktop:px-16 lg-desktop:px-[calc(50%-832px)]\">\n <Grid className=\"laptop:gap-6\">\n <GridItem className=\"col-span-12 tablet:px-8 laptop:px-16 desktop:px-0 desktop:col-start-1 desktop:col-span-8 desktop:sticky desktop:top-[124px] h-fit\">\n {BoxLeftGallery}\n </GridItem>\n <GridItem className=\"col-span-12 desktop:col-start-9 desktop:col-span-4\">{BoxRightDetail}</GridItem>\n </Grid>\n {BoxBottomSummary}\n </div>\n )\n}\n\nexport default ProductGridBox\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAaM,IAAAI,EAAA,6BAbNC,EAA+B,kCAE/B,MAAMC,EAAiB,CAAC,CACtB,eAAAC,EACA,eAAAC,EACA,iBAAAC,CACF,OAMI,QAAC,OAAI,GAAG,mBAAmB,UAAU,6DACnC,qBAAC,QAAK,UAAU,eACd,oBAAC,YAAS,UAAU,oIACjB,SAAAF,EACH,KACA,OAAC,YAAS,UAAU,qDAAsD,SAAAC,EAAe,GAC3F,EACCC,GACH,EAIJ,IAAOP,EAAQI",
|
|
6
|
-
"names": ["ProductGridBox_exports", "__export", "ProductGridBox_default", "__toCommonJS", "import_jsx_runtime", "import_components", "ProductGridBox", "BoxLeftGallery", "BoxRightDetail", "BoxBottomSummary"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var C=(s,a)=>{for(var i in a)f(s,i,{get:a[i],enumerable:!0})},w=(s,a,i,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of h(a))!S.call(s,r)&&r!==i&&f(s,r,{get:()=>a[r],enumerable:!(o=k(a,r))||o.enumerable});return s};var P=s=>w(f({},"__esModule",{value:!0}),s);var F={};C(F,{default:()=>D});module.exports=P(F);var e=require("react/jsx-runtime"),t=require("../../../../../components"),x=require("../../../ProductProvider"),j=require("react"),p=require("../../../utils"),g=require("../../../../AiuiProvider"),v=require("../../../../../helpers");const B=({})=>{const{locale:s="us",copyWriting:a}=(0,g.useAiuiContext)(),{product:i,variant:o,finalPrice:r,selectedOptions:m,onAddToCart:u,onBuyNow:d,productSummaryStatus:l,setProductSummaryStatus:c}=(0,x.useProductContext)();return o.availableForSale?(0,e.jsx)("div",{className:"ipc-product-summary bg-[#F5F5F7] mt-16",children:(0,e.jsxs)(t.Grid,{className:"px-4 py-6 tablet:p-8",children:[(0,e.jsxs)(t.GridItem,{className:"col-span-12 desktop:col-start-1 desktop:col-span-5",children:[(0,e.jsx)(t.Heading,{className:"font-bold text-[24px] lg-desktop:text-[48px] laptop:text-[32px] desktop:text-[40px] leading-[1] mb-4 [&>span]:text-[#D1D1D1]",html:`${i.title} is ready <br/><span>Just the way you want it.</span>`}),(0,e.jsx)("div",{className:"aspect-[644/320]",children:(0,e.jsx)(t.Picture,{source:o.image?.url||i?.images?.[0]?.url,className:"h-full w-full",imgClassName:"object-contain h-full"})})]}),(0,e.jsxs)(t.GridItem,{className:"col-span-12 mt-8 desktop:col-start-7 laptop:mt-0 desktop:col-span-6 flex flex-col gap-6 justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"shrink-0 flex items-center gap-4",children:[(0,e.jsx)(t.Picture,{source:o.image?.url||i?.images?.[0]?.url,className:"size-16 object-cover"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(t.Text,{className:"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]",html:i.title}),(0,e.jsx)(t.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]",html:`x1 | ${m.color||m.colour||m.couleur}`})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(t.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,p.formatPrice)({amount:r,currencyCode:o.price.currencyCode,locale:s})}),(0,e.jsx)(t.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:o.price.amount,currencyCode:o.price.currencyCode,locale:s})})]})]}),l?.giftSummary&&(0,e.jsx)(b,{giftOperation:()=>c?.({...l,giftSummary:!1}),giftStatus:l.giftSummary}),l?.bundleSummary&&(0,e.jsx)(y,{bundleOperation:()=>c?.({...l,bundleSummary:!1}),bundleStatus:l.bundleSummary})]}),(!l?.bundleSummary||!l?.giftSummary)&&(0,e.jsxs)("div",{className:"mt-6",children:[(0,e.jsx)(t.Text,{className:"text-sm desktop:text-[18px] font-bold",html:"Recommend Buy"}),(0,e.jsxs)("div",{className:"flex flex-col gap-6 mt-6",children:[!l.giftSummary&&(0,e.jsx)(b,{giftOperation:()=>c?.({...l,giftSummary:!0}),giftStatus:l.giftSummary}),!l?.bundleSummary&&(0,e.jsx)(y,{bundleOperation:()=>c?.({...l,bundleSummary:!0}),bundleStatus:l.bundleSummary})]})]})]}),(0,e.jsxs)("div",{className:"text-right",children:[(0,e.jsx)(t.Text,{className:"laptop:text-xl desktop:text-2xl font-bold text-right",html:`${a?.totalPrice} ${(0,p.formatPrice)({amount:r,currencyCode:o.price.currencyCode,locale:s})}`}),(0,e.jsx)(t.Text,{className:"text-base desktop:text-2xl ml-1 font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:o.price.amount,currencyCode:o.price.currencyCode,locale:s})}),(0,e.jsxs)("div",{className:"flex gap-3 mt-2",children:[(0,e.jsx)(t.Button,{size:"lg",variant:"secondary",className:"w-1/2",onClick:()=>u?.(),children:a?.addToCart}),(0,e.jsx)(t.Button,{size:"lg",variant:"primary",className:"w-1/2",onClick:()=>d?.(),children:a?.shopNow})]})]})]})]})}):null},y=({bundleOperation:s,bundleStatus:a})=>{const{bundle:i,variant:o,setCheckedBundle:r,checkedBundle:m}=(0,x.useProductContext)(),{bundleList:u}=i||{},d=u?.filter(n=>n.variants.slice(1,n.variants.length).every(N=>N.variant.availableForSale));if(!d?.length)return null;const[l]=d,c=(m||l)?.variants.filter(n=>n.variant.sku!==o.sku);return(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[c?.map(n=>(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(t.Picture,{source:n?.variant?.image?.url,className:"size-16 object-cover"}),(0,e.jsx)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:(0,e.jsx)(t.Text,{className:"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]",html:n.variant.product.title})})]},n.variant.id)),(0,e.jsx)(t.Button,{size:a?"icon":"lg",variant:a?"link":"primary",onClick:()=>{r?.(a?void 0:l),s(l)},className:(0,v.cn)("shrink-0",{underline:a}),children:a?"Remove":"Add +"})]})},b=({giftOperation:s,giftStatus:a})=>{const{freeGift:i,setCheckedGift:o,checkedGift:r}=(0,x.useProductContext)(),{giftList:m=[],freeLabel:u}=i||{};if(!m?.length)return null;const[d]=m.filter(c=>c.availableForSale),l=r||d;return(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(t.Picture,{source:l?.image?.url,className:"size-16 object-cover"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(t.Text,{className:"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]",html:l?.product?.title}),(0,e.jsx)(t.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]",html:`x1 | ${u}`})]})]}),(0,e.jsx)(t.Button,{size:a?"icon":"lg",variant:a?"link":"primary",onClick:()=>{o?.(a?void 0:m[0]),s(m[0])},className:(0,v.cn)("shrink-0",{underline:a}),children:a?"Remove":"Add +"})]})};var D=B;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductSummary/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Text, Button, Container, Grid, GridItem, Picture, Heading } from '../../../../../components'\nimport type { ProductSummaryProps } from './types'\nimport { useProductContext } from '../../../ProductProvider'\nimport { useMemo, useState } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { useAiuiContext } from '../../../../AiuiProvider'\nimport type { BundleListItem, ProductVariant } from '../../../types/product'\nimport { cn } from '../../../../../helpers'\n\nconst ProductSummary = ({}: ProductSummaryProps) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const {\n product,\n variant,\n finalPrice,\n selectedOptions,\n onAddToCart,\n onBuyNow,\n productSummaryStatus,\n setProductSummaryStatus,\n } = useProductContext()\n\n const isAvailable = variant.availableForSale\n if (!isAvailable) return null\n return (\n <div className=\"ipc-product-summary bg-[#F5F5F7] mt-16\">\n <Grid className=\"px-4 py-6 tablet:p-8\">\n <GridItem className=\"col-span-12 desktop:col-start-1 desktop:col-span-5\">\n <Heading\n className=\"font-bold text-[24px] lg-desktop:text-[48px] laptop:text-[32px] desktop:text-[40px] leading-[1] mb-4 [&>span]:text-[#D1D1D1]\"\n html={`${product.title} is ready <br/><span>Just the way you want it.</span>`}\n />\n <div className=\"aspect-[644/320]\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"h-full w-full\"\n imgClassName=\"object-contain h-full\"\n />\n </div>\n </GridItem>\n <GridItem className=\"col-span-12 mt-8 desktop:col-start-7 laptop:mt-0 desktop:col-span-6 flex flex-col gap-6 justify-between\">\n <div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"shrink-0 flex items-center gap-4\">\n <Picture source={variant.image?.url || product?.images?.[0]?.url} className=\"size-16 object-cover\" />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n html={product.title}\n />\n <Text\n className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\"\n html={`x1 | ${selectedOptions.color || selectedOptions.colour || selectedOptions.couleur}`}\n />\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale })}\n />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: variant.price.amount,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n </div>\n </div>\n {productSummaryStatus?.giftSummary && (\n <ProductGiftSummary\n giftOperation={() => setProductSummaryStatus?.({ ...productSummaryStatus, giftSummary: false })}\n giftStatus={productSummaryStatus.giftSummary}\n />\n )}\n {productSummaryStatus?.bundleSummary && (\n <ProductBundleSummary\n bundleOperation={() => setProductSummaryStatus?.({ ...productSummaryStatus, bundleSummary: false })}\n bundleStatus={productSummaryStatus.bundleSummary}\n />\n )}\n </div>\n {(!productSummaryStatus?.bundleSummary || !productSummaryStatus?.giftSummary) && (\n <div className=\"mt-6\">\n <Text className=\"text-sm desktop:text-[18px] font-bold\" html={'Recommend Buy'} />\n <div className=\"flex flex-col gap-6 mt-6\">\n {!productSummaryStatus.giftSummary && (\n <ProductGiftSummary\n giftOperation={() => setProductSummaryStatus?.({ ...productSummaryStatus, giftSummary: true })}\n giftStatus={productSummaryStatus.giftSummary}\n />\n )}\n {!productSummaryStatus?.bundleSummary && (\n <ProductBundleSummary\n bundleOperation={() =>\n setProductSummaryStatus?.({ ...productSummaryStatus, bundleSummary: true })\n }\n bundleStatus={productSummaryStatus.bundleSummary}\n />\n )}\n </div>\n </div>\n )}\n </div>\n <div className=\"text-right\">\n <Text\n className=\"laptop:text-xl desktop:text-2xl font-bold text-right\"\n html={`${copyWriting?.totalPrice} ${formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale })}`}\n />\n\n <Text\n className=\"text-base desktop:text-2xl ml-1 font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: variant.price.amount,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n <div className=\"flex gap-3 mt-2\">\n <Button size=\"lg\" variant=\"secondary\" className=\"w-1/2\" onClick={() => onAddToCart?.()}>\n {copyWriting?.addToCart}\n </Button>\n <Button size=\"lg\" variant=\"primary\" className=\"w-1/2\" onClick={() => onBuyNow?.()}>\n {copyWriting?.shopNow}\n </Button>\n </div>\n </div>\n </GridItem>\n </Grid>\n </div>\n )\n}\n\nconst ProductBundleSummary = ({\n bundleOperation,\n bundleStatus,\n}: {\n bundleOperation: (bundle: BundleListItem) => void\n bundleStatus: boolean\n}) => {\n const { bundle, variant, setCheckedBundle, checkedBundle } = useProductContext()\n const { bundleList } = bundle || {}\n const availableBundleList = bundleList?.filter(bundle =>\n bundle.variants.slice(1, bundle.variants.length).every(v => v.variant.availableForSale)\n )\n if (!availableBundleList?.length) return null\n const [firstAvailableBundle] = availableBundleList\n const bundleVariants = (checkedBundle || firstAvailableBundle)?.variants.filter(v => v.variant.sku !== variant.sku)\n\n return (\n <div className=\"flex items-center justify-between\">\n {bundleVariants?.map(bundleVariant => {\n return (\n <div className=\"flex items-center gap-4\" key={bundleVariant.variant.id}>\n <Picture source={bundleVariant?.variant?.image?.url} className=\"size-16 object-cover\" />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n html={bundleVariant.variant.product.title}\n />\n </div>\n </div>\n )\n })}\n <Button\n size={bundleStatus ? 'icon' : 'lg'}\n variant={bundleStatus ? 'link' : 'primary'}\n onClick={() => {\n setCheckedBundle?.(bundleStatus ? undefined : firstAvailableBundle)\n bundleOperation(firstAvailableBundle)\n }}\n className={cn('shrink-0', {\n underline: bundleStatus,\n })}\n >\n {bundleStatus ? 'Remove' : 'Add +'}\n </Button>\n </div>\n )\n}\n\nconst ProductGiftSummary = ({\n giftOperation,\n giftStatus,\n}: {\n giftOperation: (gift: ProductVariant) => void\n giftStatus: boolean\n}) => {\n const { freeGift, setCheckedGift, checkedGift } = useProductContext()\n const { giftList = [], freeLabel } = freeGift || {}\n if (!giftList?.length) return null\n const [firstAvailableGift] = giftList.filter(gift => gift.availableForSale)\n const gift = checkedGift || firstAvailableGift\n\n return (\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <Picture source={gift?.image?.url} className=\"size-16 object-cover\" />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n html={gift?.product?.title}\n />\n <Text\n className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\"\n html={`x1 | ${freeLabel}`}\n />\n </div>\n </div>\n <Button\n size={giftStatus ? 'icon' : 'lg'}\n variant={giftStatus ? 'link' : 'primary'}\n onClick={() => {\n setCheckedGift?.(giftStatus ? undefined : giftList[0])\n giftOperation(giftList[0])\n }}\n className={cn('shrink-0', {\n underline: giftStatus,\n })}\n >\n {giftStatus ? 'Remove' : 'Add +'}\n </Button>\n </div>\n )\n}\n\nexport default ProductSummary\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2BQ,IAAAI,EAAA,6BA3BRC,EAA0E,qCAE1EC,EAAkC,oCAClCC,EAAkC,iBAClCC,EAA4B,0BAC5BC,EAA+B,oCAE/BC,EAAmB,kCAEnB,MAAMC,EAAiB,CAAC,CAAC,IAA2B,CAClD,KAAM,CAAE,OAAAC,EAAS,KAAM,YAAAC,CAAY,KAAI,kBAAe,EAChD,CACJ,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,gBAAAC,EACA,YAAAC,EACA,SAAAC,EACA,qBAAAC,EACA,wBAAAC,CACF,KAAI,qBAAkB,EAGtB,OADoBN,EAAQ,oBAG1B,OAAC,OAAI,UAAU,yCACb,oBAAC,QAAK,UAAU,uBACd,qBAAC,YAAS,UAAU,qDAClB,oBAAC,WACC,UAAU,+HACV,KAAM,GAAGD,EAAQ,KAAK,wDACxB,KACA,OAAC,OAAI,UAAU,mBACb,mBAAC,WACC,OAAQC,EAAQ,OAAO,KAAOD,GAAS,SAAS,CAAC,GAAG,IACpD,UAAU,gBACV,aAAa,wBACf,EACF,GACF,KACA,QAAC,YAAS,UAAU,0GAClB,qBAAC,OACC,qBAAC,OAAI,UAAU,sBACb,qBAAC,OAAI,UAAU,oCACb,qBAAC,OAAI,UAAU,mCACb,oBAAC,WAAQ,OAAQC,EAAQ,OAAO,KAAOD,GAAS,SAAS,CAAC,GAAG,IAAK,UAAU,uBAAuB,KACnG,QAAC,OAAI,UAAU,0DACb,oBAAC,QACC,UAAU,mEACV,KAAMA,EAAQ,MAChB,KACA,OAAC,QACC,UAAU,8EACV,KAAM,QAAQG,EAAgB,OAASA,EAAgB,QAAUA,EAAgB,OAAO,GAC1F,GACF,GACF,KACA,QAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,uCACV,QAAM,eAAY,CAAE,OAAQD,EAAY,aAAcD,EAAQ,MAAM,aAAc,OAAAH,CAAO,CAAC,EAC5F,KACA,OAAC,QACC,UAAU,mEACV,QAAM,eAAY,CAChB,OAAQG,EAAQ,MAAM,OACtB,aAAcA,EAAQ,MAAM,aAC5B,OAAAH,CACF,CAAC,EACH,GACF,GACF,EACCQ,GAAsB,gBACrB,OAACE,EAAA,CACC,cAAe,IAAMD,IAA0B,CAAE,GAAGD,EAAsB,YAAa,EAAM,CAAC,EAC9F,WAAYA,EAAqB,YACnC,EAEDA,GAAsB,kBACrB,OAACG,EAAA,CACC,gBAAiB,IAAMF,IAA0B,CAAE,GAAGD,EAAsB,cAAe,EAAM,CAAC,EAClG,aAAcA,EAAqB,cACrC,GAEJ,GACE,CAACA,GAAsB,eAAiB,CAACA,GAAsB,iBAC/D,QAAC,OAAI,UAAU,OACb,oBAAC,QAAK,UAAU,wCAAwC,KAAM,gBAAiB,KAC/E,QAAC,OAAI,UAAU,2BACZ,WAACA,EAAqB,gBACrB,OAACE,EAAA,CACC,cAAe,IAAMD,IAA0B,CAAE,GAAGD,EAAsB,YAAa,EAAK,CAAC,EAC7F,WAAYA,EAAqB,YACnC,EAED,CAACA,GAAsB,kBACtB,OAACG,EAAA,CACC,gBAAiB,IACfF,IAA0B,CAAE,GAAGD,EAAsB,cAAe,EAAK,CAAC,EAE5E,aAAcA,EAAqB,cACrC,GAEJ,GACF,GAEJ,KACA,QAAC,OAAI,UAAU,aACb,oBAAC,QACC,UAAU,uDACV,KAAM,GAAGP,GAAa,UAAU,OAAI,eAAY,CAAE,OAAQG,EAAY,aAAcD,EAAQ,MAAM,aAAc,OAAAH,CAAO,CAAC,CAAC,GAC3H,KAEA,OAAC,QACC,UAAU,wEACV,QAAM,eAAY,CAChB,OAAQG,EAAQ,MAAM,OACtB,aAAcA,EAAQ,MAAM,aAC5B,OAAAH,CACF,CAAC,EACH,KACA,QAAC,OAAI,UAAU,kBACb,oBAAC,UAAO,KAAK,KAAK,QAAQ,YAAY,UAAU,QAAQ,QAAS,IAAMM,IAAc,EAClF,SAAAL,GAAa,UAChB,KACA,OAAC,UAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,QAAQ,QAAS,IAAMM,IAAW,EAC7E,SAAAN,GAAa,QAChB,GACF,GACF,GACF,GACF,EACF,EA7GuB,IA+G3B,EAEMU,EAAuB,CAAC,CAC5B,gBAAAC,EACA,aAAAC,CACF,IAGM,CACJ,KAAM,CAAE,OAAAC,EAAQ,QAAAX,EAAS,iBAAAY,EAAkB,cAAAC,CAAc,KAAI,qBAAkB,EACzE,CAAE,WAAAC,CAAW,EAAIH,GAAU,CAAC,EAC5BI,EAAsBD,GAAY,OAAOH,GAC7CA,EAAO,SAAS,MAAM,EAAGA,EAAO,SAAS,MAAM,EAAE,MAAMK,GAAKA,EAAE,QAAQ,gBAAgB,CACxF,EACA,GAAI,CAACD,GAAqB,OAAQ,OAAO,KACzC,KAAM,CAACE,CAAoB,EAAIF,EACzBG,GAAmBL,GAAiBI,IAAuB,SAAS,OAAOD,GAAKA,EAAE,QAAQ,MAAQhB,EAAQ,GAAG,EAEnH,SACE,QAAC,OAAI,UAAU,oCACZ,UAAAkB,GAAgB,IAAIC,MAEjB,QAAC,OAAI,UAAU,0BACb,oBAAC,WAAQ,OAAQA,GAAe,SAAS,OAAO,IAAK,UAAU,uBAAuB,KACtF,OAAC,OAAI,UAAU,0DACb,mBAAC,QACC,UAAU,mEACV,KAAMA,EAAc,QAAQ,QAAQ,MACtC,EACF,IAP4CA,EAAc,QAAQ,EAQpE,CAEH,KACD,OAAC,UACC,KAAMT,EAAe,OAAS,KAC9B,QAASA,EAAe,OAAS,UACjC,QAAS,IAAM,CACbE,IAAmBF,EAAe,OAAYO,CAAoB,EAClER,EAAgBQ,CAAoB,CACtC,EACA,aAAW,MAAG,WAAY,CACxB,UAAWP,CACb,CAAC,EAEA,SAAAA,EAAe,SAAW,QAC7B,GACF,CAEJ,EAEMH,EAAqB,CAAC,CAC1B,cAAAa,EACA,WAAAC,CACF,IAGM,CACJ,KAAM,CAAE,SAAAC,EAAU,eAAAC,EAAgB,YAAAC,CAAY,KAAI,qBAAkB,EAC9D,CAAE,SAAAC,EAAW,CAAC,EAAG,UAAAC,CAAU,EAAIJ,GAAY,CAAC,EAClD,GAAI,CAACG,GAAU,OAAQ,OAAO,KAC9B,KAAM,CAACE,CAAkB,EAAIF,EAAS,OAAOG,GAAQA,EAAK,gBAAgB,EACpEA,EAAOJ,GAAeG,EAE5B,SACE,QAAC,OAAI,UAAU,oCACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,WAAQ,OAAQC,GAAM,OAAO,IAAK,UAAU,uBAAuB,KACpE,QAAC,OAAI,UAAU,0DACb,oBAAC,QACC,UAAU,mEACV,KAAMA,GAAM,SAAS,MACvB,KACA,OAAC,QACC,UAAU,8EACV,KAAM,QAAQF,CAAS,GACzB,GACF,GACF,KACA,OAAC,UACC,KAAML,EAAa,OAAS,KAC5B,QAASA,EAAa,OAAS,UAC/B,QAAS,IAAM,CACbE,IAAiBF,EAAa,OAAYI,EAAS,CAAC,CAAC,EACrDL,EAAcK,EAAS,CAAC,CAAC,CAC3B,EACA,aAAW,MAAG,WAAY,CACxB,UAAWJ,CACb,CAAC,EAEA,SAAAA,EAAa,SAAW,QAC3B,GACF,CAEJ,EAEA,IAAOlC,EAAQS",
|
|
6
|
-
"names": ["ProductSummary_exports", "__export", "ProductSummary_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_ProductProvider", "import_react", "import_utils", "import_AiuiProvider", "import_helpers", "ProductSummary", "locale", "copyWriting", "product", "variant", "finalPrice", "selectedOptions", "onAddToCart", "onBuyNow", "productSummaryStatus", "setProductSummaryStatus", "ProductGiftSummary", "ProductBundleSummary", "bundleOperation", "bundleStatus", "bundle", "setCheckedBundle", "checkedBundle", "bundleList", "availableBundleList", "v", "firstAvailableBundle", "bundleVariants", "bundleVariant", "giftOperation", "giftStatus", "freeGift", "setCheckedGift", "checkedGift", "giftList", "freeLabel", "firstAvailableGift", "gift"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var P=(e,r,c,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of p(r))!u.call(e,o)&&o!==c&&a(e,o,{get:()=>r[o],enumerable:!(t=m(r,o))||t.enumerable});return e};var d=e=>P(a({},"__esModule",{value:!0}),e);var f={};module.exports=d(f);
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductSummary/types.ts"],
|
|
4
|
-
"sourcesContent": ["export interface ProductSummaryProps {\n}\n"],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["types_exports", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.create;var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,n=Object.prototype.hasOwnProperty;var N=(t,o)=>{for(var d in o)a(t,d,{get:o[d],enumerable:!0})},l=(t,o,d,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of f(o))!n.call(t,r)&&r!==d&&a(t,r,{get:()=>o[r],enumerable:!(c=x(o,r))||c.enumerable});return t};var e=(t,o,d)=>(d=t!=null?u(G(t)):{},l(o||!t||!t.__esModule?a(d,"default",{value:t,enumerable:!0}):d,t)),P=t=>l(a({},"__esModule",{value:!0}),t);var g={};N(g,{default:()=>I});module.exports=P(g);var p=require("react/jsx-runtime"),s=require("../../../../components"),m=e(require("./ProductGallery/index.js")),i=e(require("./ProductDetail/index.js")),k=e(require("./ProductSummary/index.js"));const y=()=>(0,p.jsxs)("div",{id:"ipc-product-card",className:"desktop:mt-6 desktop:px-16 lg-desktop:px-[calc(50%-832px)]",children:[(0,p.jsxs)(s.Grid,{className:"laptop:gap-6",children:[(0,p.jsx)(s.GridItem,{className:"col-span-12 tablet:px-8 laptop:px-16 desktop:px-0 desktop:col-start-1 desktop:col-span-8 desktop:sticky desktop:top-[124px] h-fit",children:(0,p.jsx)(m.default,{})}),(0,p.jsx)(s.GridItem,{className:"col-span-12 desktop:col-start-9 desktop:col-span-4",children:(0,p.jsx)(i.default,{})})]}),(0,p.jsx)(k.default,{})]});var I=y;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/biz-components/Listing/components/ProductCard/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Grid, GridItem } from '../../../../components'\nimport ProductGallery from './ProductGallery/index.js'\nimport ProductDetail from './ProductDetail/index.js'\nimport ProductSummary from './ProductSummary/index.js'\n\n\n\nconst ProductCard = () => {\n return (\n <div id=\"ipc-product-card\" className=\"desktop:mt-6 desktop:px-16 lg-desktop:px-[calc(50%-832px)]\">\n <Grid className=\"laptop:gap-6\">\n <GridItem className=\"col-span-12 tablet:px-8 laptop:px-16 desktop:px-0 desktop:col-start-1 desktop:col-span-8 desktop:sticky desktop:top-[124px] h-fit\">\n <ProductGallery />\n </GridItem>\n <GridItem className=\"col-span-12 desktop:col-start-9 desktop:col-span-4\">\n <ProductDetail />\n </GridItem>\n </Grid>\n <ProductSummary />\n </div>\n )\n}\n\nexport default ProductCard\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAUM,IAAAI,EAAA,6BAVNC,EAA+B,kCAC/BC,EAA2B,wCAC3BC,EAA0B,uCAC1BC,EAA2B,wCAI3B,MAAMC,EAAc,OAEhB,QAAC,OAAI,GAAG,mBAAmB,UAAU,6DACnC,qBAAC,QAAK,UAAU,eACd,oBAAC,YAAS,UAAU,oIAClB,mBAAC,EAAAC,QAAA,EAAe,EAClB,KACA,OAAC,YAAS,UAAU,qDAClB,mBAAC,EAAAC,QAAA,EAAe,EAClB,GACF,KACA,OAAC,EAAAC,QAAA,EAAe,GAClB,EAIJ,IAAOV,EAAQO",
|
|
6
|
-
"names": ["ProductCard_exports", "__export", "ProductCard_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_ProductGallery", "import_ProductDetail", "import_ProductSummary", "ProductCard", "ProductGallery", "ProductDetail", "ProductSummary"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var y=Object.create;var n=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var P=(t,e)=>{for(var a in e)n(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of C(e))!h.call(t,r)&&r!==a&&n(t,r,{get:()=>e[r],enumerable:!(i=N(e,r))||i.enumerable});return t};var S=(t,e,a)=>(a=t!=null?y(w(t)):{},d(e||!t||!t.__esModule?n(a,"default",{value:t,enumerable:!0}):a,t)),B=t=>d(n({},"__esModule",{value:!0}),t);var k={};P(k,{default:()=>F});module.exports=B(k);var o=require("react/jsx-runtime"),l=require("../../../../../components"),u=require("../../../../AiuiProvider/index.js"),b=require("../../../ProductProvider.js"),x=require("react"),c=require("../../../utils"),f=S(require("decimal.js"));const A=()=>{const{copyWriting:t,locale:e="us"}=(0,u.useAiuiContext)(),{variant:a,finalPrice:i,totalSavings:r,comparePrice:s,onAddToCart:p,onBuyNow:v,savingDetail:m}=(0,b.useProductContext)(),g=(0,x.useMemo)(()=>new f.default(s).minus(m.freeGift).toNumber(),[s,m]);return(0,o.jsxs)("div",{className:"bg-white py-3 px-4 tablet:p-0 tablet:flex tablet:items-center tablet:gap-4",children:[a.availableForSale?(0,o.jsxs)("div",{className:"flex items-center justify-between tablet:flex-col desktop:items-end",children:[(0,o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,o.jsx)(l.Text,{className:"text-xl font-bold leading-[1.2] tablet:text-2xl",html:(0,c.formatPrice)({amount:i,currencyCode:a.price.currencyCode,locale:e})}),(0,o.jsx)(l.Text,{className:"text-xl font-bold line-through text-[#999] leading-[1.2] tablet:text-2xl",html:(0,c.formatPrice)({amount:g,currencyCode:a.price.currencyCode,locale:e})})]}),(0,o.jsx)(l.Text,{className:"text-brand-0 text-base leading-[1.4] font-bold tablet:text-2xl",html:`${t?.totalSavings} ${(0,c.formatPrice)({amount:r,currencyCode:a.price.currencyCode,locale:e})}`})]}):(0,o.jsx)(l.Text,{className:"text-[20px] font-bold text-[#999999]",html:t?.soldOut??"Sold Out"}),(0,o.jsxs)("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[(0,o.jsx)(l.Button,{variant:"secondary",disabled:!a.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>p?.(),children:t?.addToCart??"Add to Cart"}),(0,o.jsx)(l.Button,{variant:"primary",disabled:!a.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>v?.(),children:t?.buyNow??"Buy Now"})]})]})};var F=A;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ProductActions/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Text, Button } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useProductContext } from '../../../ProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport Decimal from 'decimal.js'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const { variant, finalPrice, totalSavings, comparePrice, onAddToCart, onBuyNow, savingDetail } = useProductContext()\n\n const comparePriceRemovedFreeGift = useMemo(\n () => new Decimal(comparePrice).minus(savingDetail.freeGift).toNumber(),\n [comparePrice, savingDetail]\n )\n\n return (\n <div className=\"bg-white py-3 px-4 tablet:p-0 tablet:flex tablet:items-center tablet:gap-4\">\n {variant.availableForSale ? (\n <div className=\"flex items-center justify-between tablet:flex-col desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl font-bold leading-[1.2] tablet:text-2xl\"\n html={formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale })}\n />\n <Text\n className=\"text-xl font-bold line-through text-[#999] leading-[1.2] tablet:text-2xl\"\n html={formatPrice({\n amount: comparePriceRemovedFreeGift,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n </div>\n <Text\n className=\"text-brand-0 text-base leading-[1.4] font-bold tablet:text-2xl\"\n html={`${copyWriting?.totalSavings} ${formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale })}`}\n />\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </div>\n )\n}\n\nexport default ProductActions\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoBU,IAAAI,EAAA,6BApBVC,EAA6B,qCAC7BC,EAA+B,6CAC/BC,EAAkC,uCAClCC,EAAwB,iBACxBC,EAA4B,0BAC5BC,EAAoB,yBAEpB,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,KAAI,kBAAe,EAChD,CAAE,QAAAC,EAAS,WAAAC,EAAY,aAAAC,EAAc,aAAAC,EAAc,YAAAC,EAAa,SAAAC,EAAU,aAAAC,CAAa,KAAI,qBAAkB,EAE7GC,KAA8B,WAClC,IAAM,IAAI,EAAAC,QAAQL,CAAY,EAAE,MAAMG,EAAa,QAAQ,EAAE,SAAS,EACtE,CAACH,EAAcG,CAAY,CAC7B,EAEA,SACE,QAAC,OAAI,UAAU,6EACZ,UAAAN,EAAQ,oBACP,QAAC,OAAI,UAAU,sEACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,kDACV,QAAM,eAAY,CAAE,OAAQC,EAAY,aAAcD,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,EAC5F,KACA,OAAC,QACC,UAAU,2EACV,QAAM,eAAY,CAChB,OAAQQ,EACR,aAAcP,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,GACF,KACA,OAAC,QACC,UAAU,iEACV,KAAM,GAAGD,GAAa,YAAY,OAAI,eAAY,CAAE,OAAQI,EAAc,aAAcF,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CAAC,GAC/H,GACF,KAEA,OAAC,QAAK,UAAU,uCAAuC,KAAMD,GAAa,SAAW,WAAY,KAEnG,QAAC,OAAI,UAAU,2CACb,oBAAC,UACC,QAAQ,YACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMI,IAAc,EAE5B,SAAAN,GAAa,WAAa,cAC7B,KACA,OAAC,UACC,QAAQ,UACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMK,IAAW,EAEzB,SAAAP,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOV,EAAQS",
|
|
6
|
-
"names": ["ProductActions_exports", "__export", "ProductActions_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_AiuiProvider", "import_ProductProvider", "import_react", "import_utils", "import_decimal", "ProductActions", "copyWriting", "locale", "variant", "finalPrice", "totalSavings", "comparePrice", "onAddToCart", "onBuyNow", "savingDetail", "comparePriceRemovedFreeGift", "Decimal"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var k=(o,e)=>{for(var a in e)c(o,a,{get:e[a],enumerable:!0})},C=(o,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of y(e))!g.call(o,l)&&l!==a&&c(o,l,{get:()=>e[l],enumerable:!(s=h(e,l))||s.enumerable});return o};var w=o=>C(c({},"__esModule",{value:!0}),o);var E={};k(E,{DesktopScrollSpyNav:()=>b,MobileScrollSpyNav:()=>u});module.exports=w(E);var t=require("react/jsx-runtime"),A=require("../../../../AiuiProvider/index.js"),p=require("../../../../../helpers/index.js"),n=require("react"),f=require("gsap"),m=require("../../../ProductProvider.js");const u=({tabs:o,purchaseBarHeight:e,onSpyNavItemClick:a})=>{const[s,l]=(0,n.useState)(!1),[r,v]=(0,n.useState)(o?.[0]),d=(0,n.useRef)(null),{renderRating:x}=(0,m.useProductContext)(),N=(0,n.useCallback)(i=>{v(i),a?.(i),l(!1)},[]),S=(0,n.useCallback)(()=>{l(!s),f.gsap.fromTo(d?.current,{height:0},{height:"auto",duration:.5,ease:"power2.inOut"})},[s]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{className:"text-sm h-[28px] font-bold leading-[28px] px-[10px] border rounded-full border-black",onClick:S,children:r?.label}),(0,t.jsxs)("div",{className:(0,p.cn)("absolute top-full w-full flex flex-col z-[60] bg-black/60 left-0",{hidden:!s}),style:{height:`calc(100dvh - ${e}px)`},children:[(0,t.jsxs)("div",{ref:d,className:"border-t overflow-hidden border-[#E4E5E6] flex flex-col bg-white",children:[o?.map(i=>(0,t.jsx)("button",{className:"text-sm hover:bg-[#EAEAEC] p-4 text-left font-bold",onClick:()=>N(i),children:i.label},i.id)),(0,t.jsx)("button",{className:"text-sm hover:bg-[#EAEAEC] p-4 text-left font-bold",children:x})]}),(0,t.jsx)("div",{className:"flex-1",onClick:()=>l(!1)})]})]})},b=({tabs:o,onSpyNavItemClick:e})=>{const[a,s]=(0,n.useState)(o?.[0]),l=(0,n.useCallback)(r=>{s(r),e?.(r)},[]);return(0,t.jsx)("div",{className:"flex gap-8",children:o?.map(r=>(0,t.jsxs)("button",{className:"text-sm relative py-[10px] font-bold",onClick:()=>l(r),children:[r.label,(0,t.jsx)("div",{className:(0,p.cn)("absolute bottom-0 left-0 w-0 transition-all duration-300 ease-in-out h-[2px] bg-brand-0",{"w-full":a?.id===r.id})})]},r.id))})};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { cn } from '../../../../../helpers/index.js'\nimport { useState, useCallback, useRef } from 'react'\nimport { gsap } from 'gsap'\nimport type { ScrollSpyNavItem, ScrollSpyNavProps } from './types.js'\nimport { useProductContext } from '../../../ProductProvider.js'\n\nconst MobileScrollSpyNav = ({ tabs, purchaseBarHeight, onSpyNavItemClick }: ScrollSpyNavProps) => {\n const [dropdownOpen, setDropdownOpen] = useState(false)\n const [activeTab, setActiveTab] = useState(tabs?.[0])\n const dropdownRef = useRef<HTMLDivElement>(null)\n const { renderRating } = useProductContext()\n \n const onTabClick = useCallback((tab: ScrollSpyNavItem) => {\n setActiveTab(tab)\n onSpyNavItemClick?.(tab)\n setDropdownOpen(false)\n }, [])\n\n const onDropdownOpen = useCallback(() => {\n setDropdownOpen(!dropdownOpen)\n gsap.fromTo(dropdownRef?.current, { height: 0 }, { height: 'auto', duration: 0.5, ease: 'power2.inOut' })\n }, [dropdownOpen])\n\n return (\n <div>\n <button\n className=\"text-sm h-[28px] font-bold leading-[28px] px-[10px] border rounded-full border-black\"\n onClick={onDropdownOpen}\n >\n {activeTab?.label}\n </button>\n <div\n className={cn('absolute top-full w-full flex flex-col z-[60] bg-black/60 left-0', {\n ['hidden']: !dropdownOpen,\n })}\n style={{\n height: `calc(100dvh - ${purchaseBarHeight}px)`,\n }}\n >\n <div ref={dropdownRef} className=\"border-t overflow-hidden border-[#E4E5E6] flex flex-col bg-white\">\n {tabs?.map(tab => (\n <button\n className=\"text-sm hover:bg-[#EAEAEC] p-4 text-left font-bold\"\n key={tab.id}\n onClick={() => onTabClick(tab)}\n >\n {tab.label}\n </button>\n ))}\n <button className=\"text-sm hover:bg-[#EAEAEC] p-4 text-left font-bold\">{renderRating}</button>\n </div>\n <div className=\"flex-1\" onClick={() => setDropdownOpen(false)} />\n </div>\n </div>\n )\n}\n\nconst DesktopScrollSpyNav = ({ tabs, onSpyNavItemClick }: ScrollSpyNavProps) => {\n const [activeTab, setActiveTab] = useState(tabs?.[0])\n\n const onTabClick = useCallback((tab: ScrollSpyNavItem) => {\n setActiveTab(tab)\n onSpyNavItemClick?.(tab)\n }, [])\n\n return (\n <div className=\"flex gap-8\">\n {tabs?.map(tab => (\n <button className=\"text-sm relative py-[10px] font-bold\" key={tab.id} onClick={() => onTabClick(tab)}>\n {tab.label}\n <div\n className={cn('absolute bottom-0 left-0 w-0 transition-all duration-300 ease-in-out h-[2px] bg-brand-0', {\n 'w-full': activeTab?.id === tab.id,\n })}\n />\n </button>\n ))}\n </div>\n )\n}\n\nexport { MobileScrollSpyNav, DesktopScrollSpyNav }\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,uBAAAC,IAAA,eAAAC,EAAAJ,GA0BM,IAAAK,EAAA,6BA1BNC,EAA+B,6CAC/BC,EAAmB,2CACnBC,EAA8C,iBAC9CC,EAAqB,gBAErBC,EAAkC,uCAElC,MAAMP,EAAqB,CAAC,CAAE,KAAAQ,EAAM,kBAAAC,EAAmB,kBAAAC,CAAkB,IAAyB,CAChG,KAAM,CAACC,EAAcC,CAAe,KAAI,YAAS,EAAK,EAChD,CAACC,EAAWC,CAAY,KAAI,YAASN,IAAO,CAAC,CAAC,EAC9CO,KAAc,UAAuB,IAAI,EACzC,CAAE,aAAAC,CAAa,KAAI,qBAAkB,EAErCC,KAAa,eAAaC,GAA0B,CACxDJ,EAAaI,CAAG,EAChBR,IAAoBQ,CAAG,EACvBN,EAAgB,EAAK,CACvB,EAAG,CAAC,CAAC,EAECO,KAAiB,eAAY,IAAM,CACvCP,EAAgB,CAACD,CAAY,EAC7B,OAAK,OAAOI,GAAa,QAAS,CAAE,OAAQ,CAAE,EAAG,CAAE,OAAQ,OAAQ,SAAU,GAAK,KAAM,cAAe,CAAC,CAC1G,EAAG,CAACJ,CAAY,CAAC,EAEjB,SACE,QAAC,OACC,oBAAC,UACC,UAAU,uFACV,QAASQ,EAER,SAAAN,GAAW,MACd,KACA,QAAC,OACC,aAAW,MAAG,mEAAoE,CAC/E,OAAW,CAACF,CACf,CAAC,EACD,MAAO,CACL,OAAQ,iBAAiBF,CAAiB,KAC5C,EAEA,qBAAC,OAAI,IAAKM,EAAa,UAAU,mEAC9B,UAAAP,GAAM,IAAIU,MACT,OAAC,UACC,UAAU,qDAEV,QAAS,IAAMD,EAAWC,CAAG,EAE5B,SAAAA,EAAI,OAHAA,EAAI,EAIX,CACD,KACD,OAAC,UAAO,UAAU,qDAAsD,SAAAF,EAAa,GACvF,KACA,OAAC,OAAI,UAAU,SAAS,QAAS,IAAMJ,EAAgB,EAAK,EAAG,GACjE,GACF,CAEJ,EAEMb,EAAsB,CAAC,CAAE,KAAAS,EAAM,kBAAAE,CAAkB,IAAyB,CAC9E,KAAM,CAACG,EAAWC,CAAY,KAAI,YAASN,IAAO,CAAC,CAAC,EAE9CS,KAAa,eAAaC,GAA0B,CACxDJ,EAAaI,CAAG,EAChBR,IAAoBQ,CAAG,CACzB,EAAG,CAAC,CAAC,EAEL,SACE,OAAC,OAAI,UAAU,aACZ,SAAAV,GAAM,IAAIU,MACT,QAAC,UAAO,UAAU,uCAAoD,QAAS,IAAMD,EAAWC,CAAG,EAChG,UAAAA,EAAI,SACL,OAAC,OACC,aAAW,MAAG,0FAA2F,CACvG,SAAUL,GAAW,KAAOK,EAAI,EAClC,CAAC,EACH,IAN4DA,EAAI,EAOlE,CACD,EACH,CAEJ",
|
|
6
|
-
"names": ["ScrollSpyNav_exports", "__export", "DesktopScrollSpyNav", "MobileScrollSpyNav", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_helpers", "import_react", "import_gsap", "import_ProductProvider", "tabs", "purchaseBarHeight", "onSpyNavItemClick", "dropdownOpen", "setDropdownOpen", "activeTab", "setActiveTab", "dropdownRef", "renderRating", "onTabClick", "tab", "onDropdownOpen"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var c=(e,r,i,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of p(r))!S.call(e,t)&&t!==i&&l(e,t,{get:()=>r[t],enumerable:!(a=o(r,t))||a.enumerable});return e};var n=e=>c(l({},"__esModule",{value:!0}),e);var s={};module.exports=n(s);
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.ts"],
|
|
4
|
-
"sourcesContent": ["export interface ScrollSpyNavItem {\n label: string\n href: string\n id: string\n}\n\nexport interface ScrollSpyNavProps {\n tabs: ScrollSpyNavItem[]\n purchaseBarHeight?: number\n onSpyNavItemClick?: (tab: ScrollSpyNavItem) => void\n}\n"],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["types_exports", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var g=(a,e)=>{for(var r in e)c(a,r,{get:e[r],enumerable:!0})},x=(a,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of y(e))!v.call(a,o)&&o!==r&&c(a,o,{get:()=>e[o],enumerable:!(l=h(e,o))||l.enumerable});return a};var N=a=>x(c({},"__esModule",{value:!0}),a);var B={};g(B,{default:()=>S});module.exports=N(B);var t=require("react/jsx-runtime"),s=require("react"),p=require("../../../../components"),M=require("gsap"),z=require("../../../AiuiProvider/index.js"),I=require("../../../../helpers/index.js"),u=require("../index.js"),d=require("../../ProductProvider.js"),i=require("./ScrollSpyNav/index.js");const P=({onSpyNavItemClick:a})=>{const[e,r]=(0,s.useState)(0),{isMobile:l,product:o,renderRating:f,isDesktop:m}=(0,d.useProductContext)(),n=(0,s.useMemo)(()=>o?.payload?.components?.find(b=>b.componentKey==="PurchaseBar")?.data||[],[o?.payload]);return(0,s.useEffect)(()=>{r(document.querySelector("#purchase-bar")?.clientHeight||0)},[]),(0,t.jsx)("div",{id:"purchase-bar",className:"bg-white sticky top-0 left-0 w-full z-[52]",children:(0,t.jsx)(p.Container,{className:"py-3 desktop:pt-6 desktop:pb-0",children:(0,t.jsxs)("div",{className:"flex gap-[10px] items-center tablet:justify-between tablet:gap-0 tablet:w-full",children:[(0,t.jsxs)("div",{className:"flex-1 tablet:flex-none",children:[(0,t.jsx)(p.Heading,{size:2,className:"line-clamp-2 tablet:max-w-[406px] desktop:max-w-none",html:o?.title}),m&&(0,t.jsxs)("div",{className:"flex justify-between gap-8 items-center",children:[(0,t.jsx)(i.DesktopScrollSpyNav,{tabs:n,onSpyNavItemClick:a}),f]})]}),m?(0,t.jsx)(u.ProductActions,{}):(0,t.jsx)(i.MobileScrollSpyNav,{tabs:n,purchaseBarHeight:e,onSpyNavItemClick:a})]})})})};var S=P;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/biz-components/Listing/components/PurchaseBar/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useCallback, useEffect, useRef, useState, useMemo } from 'react'\nimport { Text, Heading, Button, Container } from '../../../../components'\nimport type { PurchaseBarProps, ScrollSpyNavProps, ScrollSpyNavItem } from './types.js'\nimport { gsap } from 'gsap'\nimport { useAiuiContext } from '../../../AiuiProvider/index.js'\nimport { cn } from '../../../../helpers/index.js'\nimport { ProductActions } from '../index.js'\nimport { useProductContext } from '../../ProductProvider.js'\nimport { MobileScrollSpyNav, DesktopScrollSpyNav } from './ScrollSpyNav/index.js'\n\nconst PurchaseBar = ({ onSpyNavItemClick }: PurchaseBarProps) => {\n const [purchaseBarHeight, setPurchaseBarHeight] = useState(0)\n const { isMobile, product, renderRating, isDesktop } = useProductContext()\n\n const PurchaseBarData = useMemo(() => {\n return product?.payload?.components?.find((item: any) => item.componentKey === 'PurchaseBar')?.data || []\n }, [product?.payload])\n\n useEffect(() => {\n setPurchaseBarHeight(document.querySelector('#purchase-bar')?.clientHeight || 0)\n }, [])\n\n return (\n <div id=\"purchase-bar\" className=\"bg-white sticky top-0 left-0 w-full z-[52]\">\n <Container className=\"py-3 desktop:pt-6 desktop:pb-0\">\n <div className=\"flex gap-[10px] items-center tablet:justify-between tablet:gap-0 tablet:w-full\">\n <div className=\"flex-1 tablet:flex-none\">\n <Heading size={2} className=\"line-clamp-2 tablet:max-w-[406px] desktop:max-w-none\" html={product?.title} />\n {isDesktop && (\n <div className=\"flex justify-between gap-8 items-center\">\n <DesktopScrollSpyNav tabs={PurchaseBarData} onSpyNavItemClick={onSpyNavItemClick} />\n {renderRating}\n </div>\n )}\n </div>\n {!isDesktop ? (\n <MobileScrollSpyNav\n tabs={PurchaseBarData}\n purchaseBarHeight={purchaseBarHeight}\n onSpyNavItemClick={onSpyNavItemClick}\n />\n ) : (\n <ProductActions />\n )}\n </div>\n </Container>\n </div>\n )\n}\n\nexport default PurchaseBar\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2BY,IAAAI,EAAA,6BA3BZC,EAAkE,iBAClEC,EAAiD,kCAEjDC,EAAqB,gBACrBC,EAA+B,0CAC/BC,EAAmB,wCACnBC,EAA+B,uBAC/BC,EAAkC,oCAClCC,EAAwD,mCAExD,MAAMC,EAAc,CAAC,CAAE,kBAAAC,CAAkB,IAAwB,CAC/D,KAAM,CAACC,EAAmBC,CAAoB,KAAI,YAAS,CAAC,EACtD,CAAE,SAAAC,EAAU,QAAAC,EAAS,aAAAC,EAAc,UAAAC,CAAU,KAAI,qBAAkB,EAEnEC,KAAkB,WAAQ,IACvBH,GAAS,SAAS,YAAY,KAAMI,GAAcA,EAAK,eAAiB,aAAa,GAAG,MAAQ,CAAC,EACvG,CAACJ,GAAS,OAAO,CAAC,EAErB,sBAAU,IAAM,CACdF,EAAqB,SAAS,cAAc,eAAe,GAAG,cAAgB,CAAC,CACjF,EAAG,CAAC,CAAC,KAGH,OAAC,OAAI,GAAG,eAAe,UAAU,6CAC/B,mBAAC,aAAU,UAAU,iCACnB,oBAAC,OAAI,UAAU,iFACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,WAAQ,KAAM,EAAG,UAAU,uDAAuD,KAAME,GAAS,MAAO,EACxGE,MACC,QAAC,OAAI,UAAU,0CACb,oBAAC,uBAAoB,KAAMC,EAAiB,kBAAmBP,EAAmB,EACjFK,GACH,GAEJ,EACEC,KAOA,OAAC,mBAAe,KANhB,OAAC,sBACC,KAAMC,EACN,kBAAmBN,EACnB,kBAAmBD,EACrB,GAIJ,EACF,EACF,CAEJ,EAEA,IAAOZ,EAAQW",
|
|
6
|
-
"names": ["PurchaseBar_exports", "__export", "PurchaseBar_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_gsap", "import_AiuiProvider", "import_helpers", "import__", "import_ProductProvider", "import_ScrollSpyNav", "PurchaseBar", "onSpyNavItemClick", "purchaseBarHeight", "setPurchaseBarHeight", "isMobile", "product", "renderRating", "isDesktop", "PurchaseBarData", "item"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var s=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of i(r))!l.call(e,a)&&a!==o&&c(e,a,{get:()=>r[a],enumerable:!(t=p(r,a))||t.enumerable});return e};var n=e=>s(c({},"__esModule",{value:!0}),e);var S={};module.exports=n(S);
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/biz-components/Listing/components/PurchaseBar/types.ts"],
|
|
4
|
-
"sourcesContent": ["export interface PurchaseBarProps {\n onSpyNavItemClick?: (tab: ScrollSpyNavItem) => void\n}\n\nexport interface ScrollSpyNavItem {\n label: string\n href: string\n id: string\n}\n\nexport interface ScrollSpyNavProps extends Pick<PurchaseBarProps, 'onSpyNavItemClick'> {\n tabs: ScrollSpyNavItem[]\n purchaseBarHeight: number\n}\n"],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["types_exports", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var m=Object.create;var e=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var i=(r,a)=>{for(var o in a)e(r,o,{get:a[o],enumerable:!0})},u=(r,a,o,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of x(a))!h.call(r,t)&&t!==o&&e(r,t,{get:()=>a[t],enumerable:!(f=p(a,t))||f.enumerable});return r};var d=(r,a,o)=>(o=r!=null?m(P(r)):{},u(a||!r||!r.__esModule?e(o,"default",{value:r,enumerable:!0}):o,r)),n=r=>u(e({},"__esModule",{value:!0}),r);var A={};i(A,{ProductActions:()=>c.default,ProductCard:()=>l.default,PurchaseBar:()=>s.default});module.exports=n(A);var s=d(require("./PurchaseBar/index.js")),c=d(require("./PurchaseBar/ProductActions/index.js")),l=d(require("./ProductCard/index.js"));
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/biz-components/Listing/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as PurchaseBar } from './PurchaseBar/index.js'\nexport { default as ProductActions } from './PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './ProductCard/index.js'"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mGAAAE,EAAAF,GAAA,IAAAG,EAAuC,qCACvCC,EAA0C,oDAC1CC,EAAuC",
|
|
6
|
-
"names": ["components_exports", "__export", "__toCommonJS", "import_PurchaseBar", "import_ProductActions", "import_ProductCard"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var L in r)t(e,L,{get:r[L],enumerable:!0})},x=(e,r,L,N)=>{if(r&&typeof r=="object"||typeof r=="function")for(let E of O(r))!S.call(e,E)&&E!==L&&t(e,E,{get:()=>r[E],enumerable:!(N=I(r,E))||N.enumerable});return e};var G=e=>x(t({},"__esModule",{value:!0}),e);var H={};f(H,{COLOR_LABEL:()=>_,CouponChannel:()=>D,DiscountType:()=>A,PRICE_SYMBOL:()=>W});module.exports=G(H);var A=(L=>(L.fixedAmount="fixed_amount",L.percentage="percentage",L))(A||{}),D=(c=>(c.LIGHTNING_DEAL="LIGHTNING_DEAL",c.DEAL="LIGHTNING_DEAL",c.COUPON="COUPON",c.PED="PED",c.WS24="WS24",c.WSTD="WSTD",c.WSCH="WSCH",c))(D||{});const W={us:"$",uk:"\xA3",ca:"$",eu:"\u20AC",pl:"z\u0142",fr:"\u20AC",de:"\u20AC",vn:"\u20AB",cl:"$",sg:"$",ae:"AED",es:"\u20AC"},_=["color","colour","couleur","cor","colore","farbe","\uC0C9","\u8272","\u30AB\u30E9\u30FC","f\xE4rg","farve"];
|
|
2
|
-
//# sourceMappingURL=const.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/Listing/const.ts"],
|
|
4
|
-
"sourcesContent": ["export enum DiscountType {\n fixedAmount = 'fixed_amount',\n percentage = 'percentage',\n}\n\nexport enum CouponChannel {\n LIGHTNING_DEAL = 'LIGHTNING_DEAL',\n DEAL = 'LIGHTNING_DEAL',\n COUPON = 'COUPON',\n PED = 'PED',\n WS24 = 'WS24',\n WSTD = 'WSTD',\n WSCH = 'WSCH',\n}\n\nexport const PRICE_SYMBOL = {\n us: '$',\n uk: '\u00A3',\n ca: '$',\n eu: '\u20AC',\n pl: 'z\u0142',\n fr: '\u20AC',\n de: '\u20AC',\n vn: '\u20AB',\n cl: '$',\n sg: '$',\n ae: 'AED',\n es: '\u20AC',\n}\n\nexport const COLOR_LABEL = [\n 'color',\n 'colour',\n 'couleur',\n 'cor',\n 'colore',\n 'farbe',\n '\uC0C9',\n '\u8272',\n '\u30AB\u30E9\u30FC',\n 'f\u00E4rg',\n 'farve',\n]"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAN,GAAO,IAAKI,OACVA,EAAA,YAAc,eACdA,EAAA,WAAa,aAFHA,OAAA,IAKAD,OACVA,EAAA,eAAiB,iBACjBA,EAAA,KAAO,iBACPA,EAAA,OAAS,SACTA,EAAA,IAAM,MACNA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,KAAO,OAPGA,OAAA,IAUL,MAAME,EAAe,CAC1B,GAAI,IACJ,GAAI,OACJ,GAAI,IACJ,GAAI,SACJ,GAAI,UACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,IACJ,GAAI,IACJ,GAAI,MACJ,GAAI,QACN,EAEaH,EAAc,CACzB,QACA,SACA,UACA,MACA,SACA,QACA,SACA,SACA,qBACA,UACA,OACF",
|
|
6
|
-
"names": ["const_exports", "__export", "COLOR_LABEL", "CouponChannel", "DiscountType", "PRICE_SYMBOL", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var P=(o,t)=>{for(var n in t)e(o,n,{get:t[n],enumerable:!0})},h=(o,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of y(t))!S.call(o,i)&&i!==n&&e(o,i,{get:()=>t[i],enumerable:!(r=v(t,i))||r.enumerable});return o};var l=o=>h(e({},"__esModule",{value:!0}),o);var V={};P(V,{useSelectedOptions:()=>D});module.exports=l(V);var s=require("../utils/helper"),u=require("query-string"),a=require("react"),d=require("../utils");function D(o,t){const[n,r]=(0,a.useState)({});return(0,a.useEffect)(()=>{const i=(0,u.parse)(window.location.search);let p=o.variants[0];if(i.variant){const O=(0,s.btoaID)(i.variant),f=o.variants.find(m=>t?m.sku===t:m.id===O);f&&(p=f)}const c=(0,d.optionsConstructor)(p.options);(0,s.isObjEmpty)(c)||r(c)},[o,t]),[n,r]}
|
|
2
|
-
//# sourceMappingURL=use-options.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/biz-components/Listing/hooks/use-options.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Options, Product, ProductVariant } from '../types/product'\nimport { btoaID, isObjEmpty } from '../utils/helper'\nimport { parse } from 'query-string'\nimport { type Dispatch, type SetStateAction, useEffect, useState } from 'react'\n\nimport { optionsConstructor } from '../utils'\n\nexport function useSelectedOptions(product: Product, sku?: string) {\n /**\n * \u6839\u636E query string \u521D\u59CB\u5316 selectedOptions\n * \u5982\u679C\u4F20\u5165 sku \u5219\u6839\u636E sku \u83B7\u53D6 variant\uFF0C\u5426\u5219\u9ED8\u8BA4\u6839\u636E query \u7684 variant \u83B7\u53D6\n */\n const [options, setOptions] = useState<Options>({})\n\n useEffect(() => {\n const query = parse(window.location.search) as { variant?: string }\n // \u9875\u9762\u521D\u59CB\u5316\u8BFB\u53D6 query \u4E2D\u7684 variant, \u5982\u679C\u6CA1\u6709\u627E\u5230\u5BF9\u5E94 query \u4E2D id \u7684 variant\uFF0C\u9ED8\u8BA4\u9009\u4E2D\u7B2C\u4E00\u4E2A\n let variant = product.variants[0]\n if (query.variant) {\n const variantId = btoaID(query.variant)\n\n const foundVariant = product.variants.find((variant: ProductVariant) =>\n sku ? variant.sku === sku : variant.id === variantId,\n )\n if (foundVariant) {\n variant = foundVariant\n }\n }\n\n // \u66F4\u65B0\u5F53\u524D variant \u5BF9\u5E94\u7684 options\n const options = optionsConstructor(variant.options)\n\n if (!isObjEmpty(options)) {\n setOptions(options)\n }\n }, [product, sku])\n\n return [options, setOptions] as [Options, Dispatch<SetStateAction<Options>>]\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAAmC,2BACnCC,EAAsB,wBACtBC,EAAwE,iBAExEC,EAAmC,oBAE5B,SAASL,EAAmBM,EAAkBC,EAAc,CAKjE,KAAM,CAACC,EAASC,CAAU,KAAI,YAAkB,CAAC,CAAC,EAElD,sBAAU,IAAM,CACd,MAAMC,KAAQ,SAAM,OAAO,SAAS,MAAM,EAE1C,IAAIC,EAAUL,EAAQ,SAAS,CAAC,EAChC,GAAII,EAAM,QAAS,CACjB,MAAME,KAAY,UAAOF,EAAM,OAAO,EAEhCG,EAAeP,EAAQ,SAAS,KAAMK,GAC1CJ,EAAMI,EAAQ,MAAQJ,EAAMI,EAAQ,KAAOC,CAC7C,EACIC,IACFF,EAAUE,EAEd,CAGA,MAAML,KAAU,sBAAmBG,EAAQ,OAAO,KAE7C,cAAWH,CAAO,GACrBC,EAAWD,CAAO,CAEtB,EAAG,CAACF,EAASC,CAAG,CAAC,EAEV,CAACC,EAASC,CAAU,CAC7B",
|
|
6
|
-
"names": ["use_options_exports", "__export", "useSelectedOptions", "__toCommonJS", "import_helper", "import_query_string", "import_react", "import_utils", "product", "sku", "options", "setOptions", "query", "variant", "variantId", "foundVariant"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var i in t)c(e,i,{get:t[i],enumerable:!0})},F=(e,t,i,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of P(t))!h.call(e,a)&&a!==i&&c(e,a,{get:()=>t[a],enumerable:!(d=T(t,a))||d.enumerable});return e};var k=e=>F(c({},"__esModule",{value:!0}),e);var R={};v(R,{useVariantMedia:()=>x});module.exports=k(R);var m=require("../types/graphql"),p=require("../utils/helper"),s=require("react");function x({product:e,variant:t}){const i=e?.media?.filter(o=>o.mediaContentType===m.MediaContentType.Image),d=[i?.[0]],a=i?.slice(1,d.length),M=i?.slice(2,d.length),g=e?.media?.filter(o=>o.mediaContentType===m.MediaContentType.Video),[y,L]=(0,s.useState)(d||[]),[u,l]=(0,s.useState)(a||[]),[I,V]=(0,s.useState)(g||[]),[f,C]=(0,s.useState)(M||[]);return(0,s.useEffect)(()=>{const o=(0,p.getVariantMediaList)({product:e,variant:t}),n=o?.filter(r=>r.mediaContentType===m.MediaContentType.Image);L(n?.[0]?[n[0]]:[]),l(n?.slice(1,n?.length)||[]),C(n?.slice(2,n?.length)||[]),V(o?.filter(r=>r.mediaContentType===m.MediaContentType.Video)||[])},[e,t]),{productList:y,sceneList:u,videoList:I,keyFeaturesList:f}}
|
|
2
|
-
//# sourceMappingURL=use-variant-media.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/biz-components/Listing/hooks/use-variant-media.ts"],
|
|
4
|
-
"sourcesContent": ["import { MediaContentType } from '../types/graphql'\nimport { getVariantMediaList } from '../utils/helper'\nimport type { Replace } from '../types/type-helper'\nimport type { Product, ProductMedia, ProductVariant } from '../types/product'\nimport { useEffect, useState } from 'react'\n\nexport type ImageMedia = Replace<ProductMedia, 'mediaContentType', MediaContentType.Image>\nexport type VideoMedia = Replace<ProductMedia, 'mediaContentType', MediaContentType.Video>\n\nexport function useVariantMedia({ product, variant }: { product: Product; variant: ProductVariant }): {\n productList: ImageMedia[]\n sceneList: ImageMedia[]\n keyFeaturesList: ImageMedia[]\n videoList: VideoMedia[]\n} {\n const mediaList = product?.media?.filter((media) => media.mediaContentType === MediaContentType.Image)\n const productImageList = [mediaList?.[0]] as ImageMedia[]\n const scenes = mediaList?.slice(1, productImageList.length) as ImageMedia[]\n const keyFeatures = mediaList?.slice(2, productImageList.length) as ImageMedia[]\n const videos = product?.media?.filter((media) => media.mediaContentType === MediaContentType.Video) as VideoMedia[]\n const [imageList, setImageList] = useState<ImageMedia[]>(productImageList || [])\n const [sceneList, setSeneList] = useState<ImageMedia[]>(scenes || [])\n const [videoList, setVideoList] = useState<VideoMedia[]>(videos || [])\n const [keyFeaturesList, setKeyFeaturesList] = useState<ImageMedia[]>(keyFeatures || [])\n useEffect(() => {\n const mediaList = getVariantMediaList({ product, variant })\n\n const imageList = mediaList?.filter((media) => media.mediaContentType === MediaContentType.Image) as ImageMedia[]\n setImageList(imageList?.[0] ? [imageList[0]] : [])\n setSeneList(imageList?.slice(1, imageList?.length) || [])\n setKeyFeaturesList(imageList?.slice(2, imageList?.length) || [])\n setVideoList(\n (mediaList?.filter((media) => media.mediaContentType === MediaContentType.Video) as VideoMedia[]) || [],\n )\n }, [product, variant])\n\n return { productList: imageList, sceneList, videoList: videoList, keyFeaturesList }\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAiC,4BACjCC,EAAoC,2BAGpCC,EAAoC,iBAK7B,SAASJ,EAAgB,CAAE,QAAAK,EAAS,QAAAC,CAAQ,EAKjD,CACA,MAAMC,EAAYF,GAAS,OAAO,OAAQG,GAAUA,EAAM,mBAAqB,mBAAiB,KAAK,EAC/FC,EAAmB,CAACF,IAAY,CAAC,CAAC,EAClCG,EAASH,GAAW,MAAM,EAAGE,EAAiB,MAAM,EACpDE,EAAcJ,GAAW,MAAM,EAAGE,EAAiB,MAAM,EACzDG,EAASP,GAAS,OAAO,OAAQG,GAAUA,EAAM,mBAAqB,mBAAiB,KAAK,EAC5F,CAACK,EAAWC,CAAY,KAAI,YAAuBL,GAAoB,CAAC,CAAC,EACzE,CAACM,EAAWC,CAAW,KAAI,YAAuBN,GAAU,CAAC,CAAC,EAC9D,CAACO,EAAWC,CAAY,KAAI,YAAuBN,GAAU,CAAC,CAAC,EAC/D,CAACO,EAAiBC,CAAkB,KAAI,YAAuBT,GAAe,CAAC,CAAC,EACtF,sBAAU,IAAM,CACd,MAAMJ,KAAY,uBAAoB,CAAE,QAAAF,EAAS,QAAAC,CAAQ,CAAC,EAEpDO,EAAYN,GAAW,OAAQC,GAAUA,EAAM,mBAAqB,mBAAiB,KAAK,EAChGM,EAAaD,IAAY,CAAC,EAAI,CAACA,EAAU,CAAC,CAAC,EAAI,CAAC,CAAC,EACjDG,EAAYH,GAAW,MAAM,EAAGA,GAAW,MAAM,GAAK,CAAC,CAAC,EACxDO,EAAmBP,GAAW,MAAM,EAAGA,GAAW,MAAM,GAAK,CAAC,CAAC,EAC/DK,EACGX,GAAW,OAAQC,GAAUA,EAAM,mBAAqB,mBAAiB,KAAK,GAAsB,CAAC,CACxG,CACF,EAAG,CAACH,EAASC,CAAO,CAAC,EAEd,CAAE,YAAaO,EAAW,UAAAE,EAAW,UAAWE,EAAW,gBAAAE,CAAgB,CACpF",
|
|
6
|
-
"names": ["use_variant_media_exports", "__export", "useVariantMedia", "__toCommonJS", "import_graphql", "import_helper", "import_react", "product", "variant", "mediaList", "media", "productImageList", "scenes", "keyFeatures", "videos", "imageList", "setImageList", "sceneList", "setSeneList", "videoList", "setVideoList", "keyFeaturesList", "setKeyFeaturesList"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var f=(t,r)=>{for(var a in r)s(t,a,{get:r[a],enumerable:!0})},m=(t,r,a,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of p(r))!u.call(t,i)&&i!==a&&s(t,i,{get:()=>r[i],enumerable:!(o=c(r,i))||o.enumerable});return t};var d=t=>m(s({},"__esModule",{value:!0}),t);var v={};f(v,{useVariant:()=>V});module.exports=d(v);var e=require("react"),n=require("../utils/index");function V({product:t,selectedOptions:r}){const[a,o]=(0,e.useState)((0,n.getFirstAvailableVariant)(t));return(0,e.useEffect)(()=>{const i=(0,n.getVariantFromSelectedOptions)({product:t,selectedOptions:r});i&&i.id!==a.id&&o(i)},[r,t.variants,a,t]),a}
|
|
2
|
-
//# sourceMappingURL=use-variant.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/biz-components/Listing/hooks/use-variant.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Options, Product, ProductVariant } from '../types/product'\nimport { useEffect, useState } from 'react'\n\nimport { getFirstAvailableVariant, getVariantFromSelectedOptions } from '../utils/index'\n\nexport function useVariant({\n product,\n selectedOptions,\n}: {\n product: Product\n selectedOptions: Options\n}): ProductVariant {\n const [variant, setVariant] = useState(getFirstAvailableVariant(product))\n\n // \u6839\u636E\u5DF2\u9009\u7684 option \u83B7\u53D6\u5F53\u524D\u7684 variant\n useEffect(() => {\n const v = getVariantFromSelectedOptions({ product, selectedOptions })\n if (v && v.id !== variant.id) {\n setVariant(v)\n }\n }, [selectedOptions, product.variants, variant, product])\n\n return variant\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAAoC,iBAEpCC,EAAwE,0BAEjE,SAASH,EAAW,CACzB,QAAAI,EACA,gBAAAC,CACF,EAGmB,CACjB,KAAM,CAACC,EAASC,CAAU,KAAI,eAAS,4BAAyBH,CAAO,CAAC,EAGxE,sBAAU,IAAM,CACd,MAAMI,KAAI,iCAA8B,CAAE,QAAAJ,EAAS,gBAAAC,CAAgB,CAAC,EAChEG,GAAKA,EAAE,KAAOF,EAAQ,IACxBC,EAAWC,CAAC,CAEhB,EAAG,CAACH,EAAiBD,EAAQ,SAAUE,EAASF,CAAO,CAAC,EAEjDE,CACT",
|
|
6
|
-
"names": ["use_variant_exports", "__export", "useVariant", "__toCommonJS", "import_react", "import_utils", "product", "selectedOptions", "variant", "setVariant", "v"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var y=(o,r)=>{for(var t in r)n(o,t,{get:r[t],enumerable:!0})},C=(o,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of c(r))!u.call(o,e)&&e!==t&&n(o,e,{get:()=>r[e],enumerable:!(s=p(r,e))||s.enumerable});return o};var d=o=>C(n({},"__esModule",{value:!0}),o);var b={};y(b,{default:()=>E});module.exports=d(b);var l=require("react");const f=()=>{const[o,r]=(0,l.useState)(!1),[t,s]=(0,l.useState)(null),e=(0,l.useCallback)(async i=>{try{await navigator.clipboard.writeText(i),r(!0),s(null)}catch(a){r(!1),s(a instanceof Error?a:new Error("Copy failed"))}finally{setTimeout(()=>{r(!1)},2e3)}},[]);return{isCopied:o,copyError:t,copyToClipboard:e,reset:()=>{r(!1),s(null)}}};var E=f;
|
|
2
|
-
//# sourceMappingURL=useCopy.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/biz-components/Listing/hooks/useCopy.ts"],
|
|
4
|
-
"sourcesContent": ["import { useState, useCallback } from 'react'\n\ntype UseCopyReturn = {\n isCopied: boolean\n copyError: Error | null\n copyToClipboard: (text: string) => Promise<void>\n reset: () => void\n}\n\nconst useCopy = (): UseCopyReturn => {\n const [isCopied, setIsCopied] = useState<boolean>(false)\n const [copyError, setCopyError] = useState<Error | null>(null)\n\n // \u5B9A\u4E49\u590D\u5236\u5230\u526A\u8D34\u677F\u7684\u51FD\u6570\n const copyToClipboard = useCallback(async (text: string) => {\n try {\n await navigator.clipboard.writeText(text)\n setIsCopied(true)\n setCopyError(null) // \u6E05\u9664\u9519\u8BEF\u72B6\u6001\n } catch (error: any) {\n setIsCopied(false)\n setCopyError(error instanceof Error ? error : new Error('Copy failed'))\n } finally {\n setTimeout(() => {\n setIsCopied(false)\n }, 2000)\n }\n }, [])\n\n // \u91CD\u7F6E\u590D\u5236\u72B6\u6001\n const reset = () => {\n setIsCopied(false)\n setCopyError(null)\n }\n\n return { isCopied, copyError, copyToClipboard, reset }\n}\n\nexport default useCopy\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsC,iBAStC,MAAMC,EAAU,IAAqB,CACnC,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAkB,EAAK,EACjD,CAACC,EAAWC,CAAY,KAAI,YAAuB,IAAI,EAGvDC,KAAkB,eAAY,MAAOC,GAAiB,CAC1D,GAAI,CACF,MAAM,UAAU,UAAU,UAAUA,CAAI,EACxCJ,EAAY,EAAI,EAChBE,EAAa,IAAI,CACnB,OAASG,EAAY,CACnBL,EAAY,EAAK,EACjBE,EAAaG,aAAiB,MAAQA,EAAQ,IAAI,MAAM,aAAa,CAAC,CACxE,QAAE,CACA,WAAW,IAAM,CACfL,EAAY,EAAK,CACnB,EAAG,GAAI,CACT,CACF,EAAG,CAAC,CAAC,EAQL,MAAO,CAAE,SAAAD,EAAU,UAAAE,EAAW,gBAAAE,EAAiB,MALjC,IAAM,CAClBH,EAAY,EAAK,EACjBE,EAAa,IAAI,CACnB,CAEqD,CACvD,EAEA,IAAOP,EAAQG",
|
|
6
|
-
"names": ["useCopy_exports", "__export", "useCopy_default", "__toCommonJS", "import_react", "useCopy", "isCopied", "setIsCopied", "copyError", "setCopyError", "copyToClipboard", "text", "error"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var L=Object.create;var s=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var R=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of O(e))!q.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(c=M(e,r))||c.enumerable});return t};var z=(t,e,o)=>(o=t!=null?L(T(t)):{},p(e||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),F=t=>p(s({},"__esModule",{value:!0}),t);var V={};R(V,{default:()=>Q});module.exports=F(V);var i=require("react/jsx-runtime"),m=require("../AiuiProvider/index.js"),a=require("./components/index.js"),u=z(require("./ProductProvider.js")),y=require("./components/index.js"),d=require("react-responsive");const l=({product:t,renderRating:e,variant:o,selectedOptions:c,setSelectedOptions:r,isLogin:j,finalPrice:f,coupon:v,comparePrice:P,totalSavings:S,savingDetail:C,freeGift:k,bundle:g,checkedBundle:h,checkedGift:N,setCheckedBundle:x,setCheckedGift:B,compareData:I,selectedVariants:b,onAddToCart:w,onBuyNow:D})=>{const{locale:E}=(0,m.useAiuiContext)(),n=(0,d.useMediaQuery)({query:"(max-width: 768px)"}),A=(0,d.useMediaQuery)({query:"(min-width: 1440px)"});return(0,i.jsx)(u.default,{product:t,isMobile:n,isDesktop:A,freeGift:k,renderRating:e,finalPrice:f,comparePrice:P,totalSavings:S,savingDetail:C,variant:o,selectedOptions:c,setSelectedOptions:r,bundle:g,coupon:v,checkedBundle:h,checkedGift:N,setCheckedBundle:x,setCheckedGift:B,compareData:I,selectedVariants:b,onAddToCart:w,onBuyNow:D,children:(0,i.jsxs)("div",{id:"ipc-listing",children:[(0,i.jsx)(a.PurchaseBar,{onSpyNavItemClick:G=>{console.log(G)}}),n&&(0,i.jsx)("div",{className:"fixed bottom-0 left-0 w-full z-[60]",children:(0,i.jsx)(a.ProductActions,{})}),(0,i.jsx)(y.ProductCard,{})]})})};l.displayName="Listing";var Q=l;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/Listing/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { PurchaseBar, ProductActions } from './components/index.js'\nimport type { ScrollSpyNavItem } from './components/PurchaseBar/types.js'\nimport ProductProvider, { type ProductContextType } from './ProductProvider.js'\nimport { ProductCard } from './components/index.js'\n\nimport { useMediaQuery } from 'react-responsive'\n\n\nconst Listing: React.FC<Omit<ProductContextType, 'productSummaryStatus' | 'setProductSummaryStatus'>> = ({\n product,\n renderRating,\n variant,\n selectedOptions,\n setSelectedOptions,\n isLogin,\n finalPrice,\n coupon,\n comparePrice,\n totalSavings,\n savingDetail,\n freeGift,\n bundle,\n checkedBundle,\n checkedGift,\n setCheckedBundle,\n setCheckedGift,\n compareData,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n}) => {\n const { locale } = useAiuiContext()\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isDesktop = useMediaQuery({ query: '(min-width: 1440px)' })\n\n const onSpyNavItemClick = (tab: ScrollSpyNavItem) => {\n console.log(tab)\n }\n\n return (\n <ProductProvider\n product={product}\n isMobile={isMobile}\n isDesktop={isDesktop}\n freeGift={freeGift}\n renderRating={renderRating}\n finalPrice={finalPrice}\n comparePrice={comparePrice}\n totalSavings={totalSavings}\n savingDetail={savingDetail}\n variant={variant}\n selectedOptions={selectedOptions}\n setSelectedOptions={setSelectedOptions}\n bundle={bundle}\n coupon={coupon}\n checkedBundle={checkedBundle}\n checkedGift={checkedGift}\n setCheckedBundle={setCheckedBundle}\n setCheckedGift={setCheckedGift}\n compareData={compareData}\n selectedVariants={selectedVariants}\n onAddToCart={onAddToCart}\n onBuyNow={onBuyNow}\n >\n <div id=\"ipc-listing\">\n <PurchaseBar onSpyNavItemClick={onSpyNavItemClick} />\n {isMobile && (\n <div className=\"fixed bottom-0 left-0 w-full z-[60]\">\n <ProductActions />\n </div>\n )}\n <ProductCard />\n </div>\n </ProductProvider>\n )\n}\n\n\n\nListing.displayName = 'Listing'\n\n\nexport default Listing\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAkEM,IAAAI,EAAA,6BAlENC,EAA+B,oCAC/BC,EAA4C,iCAE5CC,EAAyD,mCACzDD,EAA4B,iCAE5BE,EAA8B,4BAG9B,MAAMC,EAAkG,CAAC,CACvG,QAAAC,EACA,aAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,QAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,SAAAC,EACA,OAAAC,EACA,cAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,SAAAC,CACF,IAAM,CACJ,KAAM,CAAE,OAAAC,CAAO,KAAI,kBAAe,EAE5BC,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EACxDC,KAAY,iBAAc,CAAE,MAAO,qBAAsB,CAAC,EAMhE,SACE,OAAC,EAAAC,QAAA,CACC,QAASxB,EACT,SAAUsB,EACV,UAAWC,EACX,SAAUZ,EACV,aAAcV,EACd,WAAYK,EACZ,aAAcE,EACd,aAAcC,EACd,aAAcC,EACd,QAASR,EACT,gBAAiBC,EACjB,mBAAoBC,EACpB,OAAQQ,EACR,OAAQL,EACR,cAAeM,EACf,YAAaC,EACb,iBAAkBC,EAClB,eAAgBC,EAChB,YAAaC,EACb,iBAAkBC,EAClB,YAAaC,EACb,SAAUC,EAEV,oBAAC,OAAI,GAAG,cACN,oBAAC,eAAY,kBA9BQK,GAA0B,CACnD,QAAQ,IAAIA,CAAG,CACjB,EA4ByD,EAClDH,MACC,OAAC,OAAI,UAAU,sCACb,mBAAC,mBAAe,EAClB,KAEF,OAAC,gBAAa,GAChB,EACF,CAEJ,EAIAvB,EAAQ,YAAc,UAGtB,IAAOP,EAAQO",
|
|
6
|
-
"names": ["Listing_exports", "__export", "Listing_default", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_ProductProvider", "import_react_responsive", "Listing", "product", "renderRating", "variant", "selectedOptions", "setSelectedOptions", "isLogin", "finalPrice", "coupon", "comparePrice", "totalSavings", "savingDetail", "freeGift", "bundle", "checkedBundle", "checkedGift", "setCheckedBundle", "setCheckedGift", "compareData", "selectedVariants", "onAddToCart", "onBuyNow", "locale", "isMobile", "isDesktop", "ProductProvider", "tab"]
|
|
7
|
-
}
|