@anker-in/headless-ui 1.0.26-alpha.1762236947129 → 1.0.26-alpha.1762243303200
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/AiuiProvider/index.d.ts +4 -0
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +118 -0
- package/dist/cjs/biz-components/Listing/BizProductProvider.js +2 -0
- package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.d.ts +10 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.d.ts +25 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +12 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.d.ts +30 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +37 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +40 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +30 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +43 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +37 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +6 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +4 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +10 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +12 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/components/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/const.d.ts +29 -0
- package/dist/cjs/biz-components/Listing/const.js +2 -0
- package/dist/cjs/biz-components/Listing/const.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/use-options.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/hooks/use-options.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/use-options.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.d.ts +50 -0
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/useCopy.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +7 -0
- package/dist/cjs/biz-components/Listing/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/index.js +2 -0
- package/dist/cjs/biz-components/Listing/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/graphql.d.ts +7473 -0
- package/dist/cjs/biz-components/Listing/types/graphql.js +2 -0
- package/dist/cjs/biz-components/Listing/types/graphql.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/product.d.ts +141 -0
- package/dist/cjs/biz-components/Listing/types/product.js +2 -0
- package/dist/cjs/biz-components/Listing/types/product.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +2 -0
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/type-helper.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/types/type-helper.js +2 -0
- package/dist/cjs/biz-components/Listing/types/type-helper.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types.d.ts +28 -0
- package/dist/cjs/biz-components/Listing/types.js +2 -0
- package/dist/cjs/biz-components/Listing/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/utils/helper.d.ts +36 -0
- package/dist/cjs/biz-components/Listing/utils/helper.js +2 -0
- package/dist/cjs/biz-components/Listing/utils/helper.js.map +7 -0
- package/dist/cjs/biz-components/Listing/utils/index.d.ts +37 -0
- package/dist/cjs/biz-components/Listing/utils/index.js +2 -0
- package/dist/cjs/biz-components/Listing/utils/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/utils/textFormat.d.ts +73 -0
- package/dist/cjs/biz-components/Listing/utils/textFormat.js +2 -0
- package/dist/cjs/biz-components/Listing/utils/textFormat.js.map +7 -0
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +1 -1
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +2 -2
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +2 -2
- package/dist/cjs/biz-components/index.d.ts +17 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/checkbox.d.ts +1 -0
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +4 -0
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +118 -0
- package/dist/esm/biz-components/Listing/BizProductProvider.js +2 -0
- package/dist/esm/biz-components/Listing/BizProductProvider.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.d.ts +10 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.d.ts +25 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +12 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.d.ts +30 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +37 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +40 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +30 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +43 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +37 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +6 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js +1 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +4 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +10 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +1 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +12 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +1 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/components/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/const.d.ts +29 -0
- package/dist/esm/biz-components/Listing/const.js +2 -0
- package/dist/esm/biz-components/Listing/const.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/use-options.d.ts +3 -0
- package/dist/esm/biz-components/Listing/hooks/use-options.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/use-options.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant.d.ts +5 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/useBenefits.d.ts +50 -0
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/useCopy.d.ts +5 -0
- package/dist/esm/biz-components/Listing/hooks/useCopy.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +7 -0
- package/dist/esm/biz-components/Listing/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/index.js +2 -0
- package/dist/esm/biz-components/Listing/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/graphql.d.ts +7473 -0
- package/dist/esm/biz-components/Listing/types/graphql.js +2 -0
- package/dist/esm/biz-components/Listing/types/graphql.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/product.d.ts +141 -0
- package/dist/esm/biz-components/Listing/types/product.js +2 -0
- package/dist/esm/biz-components/Listing/types/product.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js +2 -0
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/type-helper.d.ts +5 -0
- package/dist/esm/biz-components/Listing/types/type-helper.js +1 -0
- package/dist/esm/biz-components/Listing/types/type-helper.js.map +7 -0
- package/dist/esm/biz-components/Listing/types.d.ts +28 -0
- package/dist/esm/biz-components/Listing/types.js +1 -0
- package/dist/esm/biz-components/Listing/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/utils/helper.d.ts +36 -0
- package/dist/esm/biz-components/Listing/utils/helper.js +2 -0
- package/dist/esm/biz-components/Listing/utils/helper.js.map +7 -0
- package/dist/esm/biz-components/Listing/utils/index.d.ts +37 -0
- package/dist/esm/biz-components/Listing/utils/index.js +2 -0
- package/dist/esm/biz-components/Listing/utils/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/utils/textFormat.d.ts +73 -0
- package/dist/esm/biz-components/Listing/utils/textFormat.js +2 -0
- package/dist/esm/biz-components/Listing/utils/textFormat.js.map +7 -0
- package/dist/esm/biz-components/TabWithImage/TabWithImage.js +1 -1
- package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +2 -2
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +2 -2
- package/dist/esm/biz-components/index.d.ts +17 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/checkbox.d.ts +1 -0
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +3 -3
- package/dist/tokens/base.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum DiscountType {
|
|
2
|
+
fixedAmount = "fixed_amount",
|
|
3
|
+
percentage = "percentage",
|
|
4
|
+
fixedDiscountAmount = "fix_discount_amount"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CouponChannel {
|
|
7
|
+
LIGHTNING_DEAL = "LIGHTNING_DEAL",
|
|
8
|
+
DEAL = "LIGHTNING_DEAL",
|
|
9
|
+
COUPON = "COUPON",
|
|
10
|
+
PED = "PED",
|
|
11
|
+
WS24 = "WS24",
|
|
12
|
+
WSTD = "WSTD",
|
|
13
|
+
WSCH = "WSCH"
|
|
14
|
+
}
|
|
15
|
+
export declare const PRICE_SYMBOL: {
|
|
16
|
+
us: string;
|
|
17
|
+
uk: string;
|
|
18
|
+
ca: string;
|
|
19
|
+
eu: string;
|
|
20
|
+
pl: string;
|
|
21
|
+
fr: string;
|
|
22
|
+
de: string;
|
|
23
|
+
vn: string;
|
|
24
|
+
cl: string;
|
|
25
|
+
sg: string;
|
|
26
|
+
ae: string;
|
|
27
|
+
es: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const COLOR_LABEL: string[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var f=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var I=(e,r)=>{for(var E in r)f(e,E,{get:r[E],enumerable:!0})},O=(e,r,E,L)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of _(r))!D.call(e,c)&&c!==E&&f(e,c,{get:()=>r[c],enumerable:!(L=N(r,c))||L.enumerable});return e};var S=e=>O(f({},"__esModule",{value:!0}),e);var W={};I(W,{COLOR_LABEL:()=>G,CouponChannel:()=>A,DiscountType:()=>x,PRICE_SYMBOL:()=>m});module.exports=S(W);var x=(L=>(L.fixedAmount="fixed_amount",L.percentage="percentage",L.fixedDiscountAmount="fix_discount_amount",L))(x||{}),A=(t=>(t.LIGHTNING_DEAL="LIGHTNING_DEAL",t.DEAL="LIGHTNING_DEAL",t.COUPON="COUPON",t.PED="PED",t.WS24="WS24",t.WSTD="WSTD",t.WSCH="WSCH",t))(A||{});const m={us:"$",uk:"\xA3",ca:"$",eu:"\u20AC",pl:"z\u0142",fr:"\u20AC",de:"\u20AC",vn:"\u20AB",cl:"$",sg:"$",ae:"AED",es:"\u20AC"},G=["color","colour","couleur","cor","colore","farbe","\uC0C9","\u8272","\u30AB\u30E9\u30FC","f\xE4rg","farve"];
|
|
2
|
+
//# sourceMappingURL=const.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 fixedDiscountAmount = 'fix_discount_amount',\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,aACbA,EAAA,oBAAsB,sBAHZA,OAAA,IAMAD,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
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MediaContentType } from '../types/graphql';
|
|
2
|
+
import type { Replace } from '../types/type-helper';
|
|
3
|
+
import type { Product, ProductMedia, ProductVariant } from '../types/product';
|
|
4
|
+
export type ImageMedia = Replace<ProductMedia, 'mediaContentType', MediaContentType.Image>;
|
|
5
|
+
export type VideoMedia = Replace<ProductMedia, 'mediaContentType', MediaContentType.Video>;
|
|
6
|
+
export declare function useVariantMedia({ product, variant }: {
|
|
7
|
+
product: Product;
|
|
8
|
+
variant: ProductVariant;
|
|
9
|
+
}): {
|
|
10
|
+
productList: ImageMedia[];
|
|
11
|
+
sceneList: ImageMedia[];
|
|
12
|
+
keyFeaturesList: ImageMedia[];
|
|
13
|
+
videoList: VideoMedia[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
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 n=require("../types/graphql"),p=require("../utils/helper"),s=require("react");function x({product:e,variant:t}){const i=e?.media?.filter(o=>o.mediaContentType===n.MediaContentType.Image),d=[i?.[0]],a=i?.slice(1,d.length),M=i?.slice(2,d.length),g=e?.media?.filter(o=>o.mediaContentType===n.MediaContentType.Video),[y,L]=(0,s.useState)(d||[]),[u,I]=(0,s.useState)(a||[]),[l,V]=(0,s.useState)(g||[]),[f,C]=(0,s.useState)(M||[]);return(0,s.useEffect)(()=>{const o=(0,p.getVariantMediaList)({product:e,variant:t}),m=o?.filter(r=>r.mediaContentType===n.MediaContentType.Image);L(m?.[0]?[m[0]]:[]),I(m?.slice(1,m?.length)||[]),C([]),V(o?.filter(r=>r.mediaContentType===n.MediaContentType.Video)||[])},[e,t]),{productList:y,sceneList:u,videoList:l,keyFeaturesList:f}}
|
|
2
|
+
//# sourceMappingURL=use-variant-media.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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([])\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,EAAmB,CAAC,CAAC,EACrBF,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
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ProductVariant, FreeGift, Bundle } from '../types/product';
|
|
2
|
+
interface BenefitsParams {
|
|
3
|
+
variant: ProductVariant;
|
|
4
|
+
}
|
|
5
|
+
interface BenefitItemConfig<T extends Record<string, any> = Record<string, any>> {
|
|
6
|
+
enable: boolean;
|
|
7
|
+
config?: T;
|
|
8
|
+
}
|
|
9
|
+
interface BenefitsResult {
|
|
10
|
+
/**
|
|
11
|
+
* 通用优惠券
|
|
12
|
+
*/
|
|
13
|
+
commonCoupon?: BenefitItemConfig;
|
|
14
|
+
/**
|
|
15
|
+
* 买赠
|
|
16
|
+
*/
|
|
17
|
+
freeGift: BenefitItemConfig<FreeGift>;
|
|
18
|
+
/**
|
|
19
|
+
* 捆绑折扣
|
|
20
|
+
*/
|
|
21
|
+
bundle: BenefitItemConfig<Bundle>;
|
|
22
|
+
/**
|
|
23
|
+
* 会员价
|
|
24
|
+
*/
|
|
25
|
+
memberDiscount: BenefitItemConfig;
|
|
26
|
+
/**
|
|
27
|
+
* 积分抵现
|
|
28
|
+
*/
|
|
29
|
+
creditsRedemption: BenefitItemConfig;
|
|
30
|
+
/**
|
|
31
|
+
* 高标物流
|
|
32
|
+
*/
|
|
33
|
+
paidShipping: BenefitItemConfig;
|
|
34
|
+
/**
|
|
35
|
+
* 满赠
|
|
36
|
+
*/
|
|
37
|
+
fullGift: BenefitItemConfig;
|
|
38
|
+
/**
|
|
39
|
+
* 满减折扣
|
|
40
|
+
*/
|
|
41
|
+
levelDiscount: BenefitItemConfig;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 商品权益
|
|
45
|
+
* 获取当前sku 所有的权益
|
|
46
|
+
* 包括 通用优惠券,会员价,满减,捆绑折扣,买赠 ,满赠 ,积分抵现
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
export declare const useBenefits: ({ variant }: BenefitsParams) => BenefitsResult;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var G=(e,n)=>{for(var l in n)r(e,l,{get:n[l],enumerable:!0})},P=(e,n,l,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of S(n))!x.call(e,i)&&i!==l&&r(e,i,{get:()=>n[i],enumerable:!(o=I(n,i))||o.enumerable});return e};var R=e=>P(r({},"__esModule",{value:!0}),e);var M={};G(M,{useBenefits:()=>y});module.exports=R(M);var m=require("../BizProductProvider"),d=require("../utils/helper"),p=require("../../AiuiProvider/index.js");const y=({variant:e})=>{const{coupon:n,product:l,bundle:o,isLogin:i,freeGift:f,memberFunctionResult:a,creditsRedemptionAmount:c,discount:g}=(0,m.useBizProductContext)(),{codeSavings:b}=g||{},{trackingData:s}=(0,p.useAiuiContext)(),B=Math.max(a?.withCouponMemberTotalSave??0,a?.withoutCouponMaxMemberTotalSave??0),h=!!(s?.paidShipping&&e.requiresShipping&&!e?.metafields?.global?.presell&&!e?.metafields?.global?.HideShipping),u=s?.freeGift,C=u?.excludeProducts?.map(t=>typeof t=="object"&&"sku"in t?t.sku:t)??[],v=s?.levelDiscount&&(0,d.checkItemAvailableForProduct)({product:l,variant:e,item:s?.levelDiscount}),D=!i&&(b||0)<(a?.withCouponMemberTotalSave||0);return{commonCoupon:{enable:!!n,config:n??{}},freeGift:{enable:!!f&&!!f?.giftList?.length,config:f},bundle:{enable:!!o&&!!o?.bundleList?.length&&Math.max(...o?.bundleList?.map(t=>t.savings??0))>0,config:o},memberDiscount:{enable:D,config:{amount:B,description:a?.labels?.find(t=>t.key==="benefit_tab_string")?.value}},creditsRedemption:{enable:!!c&&c>0,config:{amount:c,label:s?.creditsRedemptionLabel}},paidShipping:{enable:h,config:{}},fullGift:{enable:!!(u&&!C.includes(e.sku)),config:u??{}},levelDiscount:{enable:!!v,config:s?.levelDiscount??{}}}};
|
|
2
|
+
//# sourceMappingURL=useBenefits.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/Listing/hooks/useBenefits.ts"],
|
|
4
|
+
"sourcesContent": ["import { useBizProductContext } from '../BizProductProvider'\nimport type { ProductVariant, FreeGift, Bundle } from '../types/product'\nimport { checkItemAvailableForProduct } from '../utils/helper'\n\nimport { useAiuiContext } from '../../AiuiProvider/index.js'\n\ninterface BenefitsParams {\n variant: ProductVariant\n}\n\ninterface BenefitItemConfig<T extends Record<string, any> = Record<string, any>> {\n enable: boolean\n config?: T // \u539F\u59CB\u914D\u7F6E\n}\n\ninterface BenefitsResult {\n /**\n * \u901A\u7528\u4F18\u60E0\u5238\n */\n commonCoupon?: BenefitItemConfig\n /**\n * \u4E70\u8D60\n */\n freeGift: BenefitItemConfig<FreeGift>\n /**\n * \u6346\u7ED1\u6298\u6263\n */\n bundle: BenefitItemConfig<Bundle>\n /**\n * \u4F1A\u5458\u4EF7\n */\n memberDiscount: BenefitItemConfig\n /**\n * \u79EF\u5206\u62B5\u73B0\n */\n creditsRedemption: BenefitItemConfig\n /**\n * \u9AD8\u6807\u7269\u6D41\n */\n paidShipping: BenefitItemConfig\n\n /**\n * \u6EE1\u8D60\n */\n fullGift: BenefitItemConfig\n\n /**\n * \u6EE1\u51CF\u6298\u6263\n */\n levelDiscount: BenefitItemConfig\n}\n\n/**\n * \u5546\u54C1\u6743\u76CA\n * \u83B7\u53D6\u5F53\u524Dsku \u6240\u6709\u7684\u6743\u76CA\n * \u5305\u62EC \u901A\u7528\u4F18\u60E0\u5238\uFF0C\u4F1A\u5458\u4EF7\uFF0C\u6EE1\u51CF\uFF0C\u6346\u7ED1\u6298\u6263\uFF0C\u4E70\u8D60 \uFF0C\u6EE1\u8D60 \uFF0C\u79EF\u5206\u62B5\u73B0\n * @returns\n */\nexport const useBenefits = ({ variant }: BenefitsParams): BenefitsResult => {\n const { coupon, product, bundle, isLogin, freeGift, memberFunctionResult, creditsRedemptionAmount, discount } =\n useBizProductContext()\n const { codeSavings } = discount || {}\n\n const { trackingData } = useAiuiContext()\n\n const total = Math.max(\n memberFunctionResult?.withCouponMemberTotalSave ?? 0,\n memberFunctionResult?.withoutCouponMaxMemberTotalSave ?? 0\n )\n\n // \u9AD8\u6807\u7269\u6D41\n const showPaidShipping = Boolean(\n trackingData?.paidShipping &&\n variant.requiresShipping &&\n !variant?.metafields?.global?.presell &&\n !variant?.metafields?.global?.HideShipping\n )\n\n // \u811A\u672C\u6EE1\u8D60\n const fullGift = trackingData?.freeGift\n const excludeProducts =\n fullGift?.excludeProducts?.map((item: any) => (typeof item === 'object' && 'sku' in item ? item.sku : item)) ?? []\n\n const showLevelDiscount =\n trackingData?.levelDiscount && checkItemAvailableForProduct({ product, variant, item: trackingData?.levelDiscount })\n\n // \u672A\u767B\u5F55\u4E14code\u4F18\u60E0\u5C0F\u4E8E\u4F1A\u5458\u4EF7\u4F18\u60E0\u65F6\uFF0C\u5C55\u793A\u4F1A\u5458\u4EF7\u4F18\u60E0\n const showMemberDiscount = !isLogin && (codeSavings || 0) < (memberFunctionResult?.withCouponMemberTotalSave || 0)\n\n return {\n commonCoupon: {\n enable: Boolean(coupon),\n config: coupon ?? {},\n },\n freeGift: {\n enable: Boolean(freeGift) && !!freeGift?.giftList?.length,\n config: freeGift,\n },\n bundle: {\n enable:\n Boolean(bundle) &&\n !!bundle?.bundleList?.length &&\n Math.max(...bundle?.bundleList?.map(item => item.savings ?? 0)) > 0, // \u6709\u4F18\u60E0\u624D\u5C55\u793A\n config: bundle,\n },\n memberDiscount: {\n enable: showMemberDiscount,\n // enable: total > 0,\n config: {\n amount: total,\n description: memberFunctionResult?.labels?.find((item: any) => item.key === 'benefit_tab_string')?.value,\n },\n },\n creditsRedemption: {\n enable: Boolean(creditsRedemptionAmount) && creditsRedemptionAmount! > 0,\n config: { amount: creditsRedemptionAmount, label: trackingData?.creditsRedemptionLabel },\n },\n paidShipping: {\n enable: showPaidShipping,\n config: {},\n },\n fullGift: {\n enable: Boolean(fullGift && !excludeProducts.includes(variant.sku)),\n config: fullGift ?? {},\n },\n levelDiscount: {\n enable: Boolean(showLevelDiscount),\n config: trackingData?.levelDiscount ?? {},\n },\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAqC,iCAErCC,EAA6C,2BAE7CC,EAA+B,uCAsDxB,MAAMJ,EAAc,CAAC,CAAE,QAAAK,CAAQ,IAAsC,CAC1E,KAAM,CAAE,OAAAC,EAAQ,QAAAC,EAAS,OAAAC,EAAQ,QAAAC,EAAS,SAAAC,EAAU,qBAAAC,EAAsB,wBAAAC,EAAyB,SAAAC,CAAS,KAC1G,wBAAqB,EACjB,CAAE,YAAAC,CAAY,EAAID,GAAY,CAAC,EAE/B,CAAE,aAAAE,CAAa,KAAI,kBAAe,EAElCC,EAAQ,KAAK,IACjBL,GAAsB,2BAA6B,EACnDA,GAAsB,iCAAmC,CAC3D,EAGMM,EAAmB,GACvBF,GAAc,cACZV,EAAQ,kBACR,CAACA,GAAS,YAAY,QAAQ,SAC9B,CAACA,GAAS,YAAY,QAAQ,cAI5Ba,EAAWH,GAAc,SACzBI,EACJD,GAAU,iBAAiB,IAAKE,GAAe,OAAOA,GAAS,UAAY,QAASA,EAAOA,EAAK,IAAMA,CAAK,GAAK,CAAC,EAE7GC,EACJN,GAAc,kBAAiB,gCAA6B,CAAE,QAAAR,EAAS,QAAAF,EAAS,KAAMU,GAAc,aAAc,CAAC,EAG/GO,EAAqB,CAACb,IAAYK,GAAe,IAAMH,GAAsB,2BAA6B,GAEhH,MAAO,CACL,aAAc,CACZ,OAAQ,EAAQL,EAChB,OAAQA,GAAU,CAAC,CACrB,EACA,SAAU,CACR,OAAQ,EAAQI,GAAa,CAAC,CAACA,GAAU,UAAU,OACnD,OAAQA,CACV,EACA,OAAQ,CACN,OACE,EAAQF,GACR,CAAC,CAACA,GAAQ,YAAY,QACtB,KAAK,IAAI,GAAGA,GAAQ,YAAY,IAAIY,GAAQA,EAAK,SAAW,CAAC,CAAC,EAAI,EACpE,OAAQZ,CACV,EACA,eAAgB,CACd,OAAQc,EAER,OAAQ,CACN,OAAQN,EACR,YAAaL,GAAsB,QAAQ,KAAMS,GAAcA,EAAK,MAAQ,oBAAoB,GAAG,KACrG,CACF,EACA,kBAAmB,CACjB,OAAQ,EAAQR,GAA4BA,EAA2B,EACvE,OAAQ,CAAE,OAAQA,EAAyB,MAAOG,GAAc,sBAAuB,CACzF,EACA,aAAc,CACZ,OAAQE,EACR,OAAQ,CAAC,CACX,EACA,SAAU,CACR,OAAQ,GAAQC,GAAY,CAACC,EAAgB,SAASd,EAAQ,GAAG,GACjE,OAAQa,GAAY,CAAC,CACvB,EACA,cAAe,CACb,OAAQ,EAAQG,EAChB,OAAQN,GAAc,eAAiB,CAAC,CAC1C,CACF,CACF",
|
|
6
|
+
"names": ["useBenefits_exports", "__export", "useBenefits", "__toCommonJS", "import_BizProductProvider", "import_helper", "import_AiuiProvider", "variant", "coupon", "product", "bundle", "isLogin", "freeGift", "memberFunctionResult", "creditsRedemptionAmount", "discount", "codeSavings", "trackingData", "total", "showPaidShipping", "fullGift", "excludeProducts", "item", "showLevelDiscount", "showMemberDiscount"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var d=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},n=(e,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of p(r))!m.call(e,c)&&c!==t&&s(e,c,{get:()=>r[c],enumerable:!(u=f(r,c))||u.enumerable});return e};var y=(e,r,t)=>(t=e!=null?a(l(e)):{},n(r||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),T=e=>n(s({},"__esModule",{value:!0}),e);var g={};d(g,{default:()=>b});module.exports=T(g);var i=y(require("copy-to-clipboard")),o=require("react");const C=()=>{const e=(0,o.useRef)(),[r,t]=(0,o.useState)(!1),u=(0,o.useCallback)(c=>{(0,i.default)(c),e.current&&clearTimeout(e.current),t(!0),e.current=setTimeout(()=>{t(!1)},2e3)},[]);return(0,o.useEffect)(()=>()=>{e.current&&clearTimeout(e.current)},[]),{copy:u,copied:r}};var b=C;
|
|
2
|
+
//# sourceMappingURL=useCopy.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/Listing/hooks/useCopy.ts"],
|
|
4
|
+
"sourcesContent": ["import clipboard from 'copy-to-clipboard'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nconst useCopy = () => {\n const copyTimer = useRef<any>()\n const [copied, setCopied] = useState(false)\n\n const copy = useCallback((val: string) => {\n clipboard(val)\n\n if (copyTimer.current) {\n clearTimeout(copyTimer.current)\n }\n\n setCopied(true)\n copyTimer.current = setTimeout(() => {\n setCopied(false)\n }, 2000)\n }, [])\n\n useEffect(() => {\n return () => {\n if (copyTimer.current) {\n clearTimeout(copyTimer.current)\n }\n }\n }, [])\n\n return {\n copy,\n copied,\n }\n}\n\nexport default useCopy\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,gCACtBC,EAAyD,iBAEzD,MAAMC,EAAU,IAAM,CACpB,MAAMC,KAAY,UAAY,EACxB,CAACC,EAAQC,CAAS,KAAI,YAAS,EAAK,EAEpCC,KAAO,eAAaC,GAAgB,IACxC,EAAAC,SAAUD,CAAG,EAETJ,EAAU,SACZ,aAAaA,EAAU,OAAO,EAGhCE,EAAU,EAAI,EACdF,EAAU,QAAU,WAAW,IAAM,CACnCE,EAAU,EAAK,CACjB,EAAG,GAAI,CACT,EAAG,CAAC,CAAC,EAEL,sBAAU,IACD,IAAM,CACPF,EAAU,SACZ,aAAaA,EAAU,OAAO,CAElC,EACC,CAAC,CAAC,EAEE,CACL,KAAAG,EACA,OAAAF,CACF,CACF,EAEA,IAAON,EAAQI",
|
|
6
|
+
"names": ["useCopy_exports", "__export", "useCopy_default", "__toCommonJS", "import_copy_to_clipboard", "import_react", "useCopy", "copyTimer", "copied", "setCopied", "copy", "val", "clipboard"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var j=Object.create;var d=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var V=(e,o)=>{for(var t in o)d(e,t,{get:o[t],enumerable:!0})},p=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of J(o))!Q.call(e,r)&&r!==t&&d(e,r,{get:()=>o[r],enumerable:!(n=F(o,r))||n.enumerable});return e};var E=(e,o,t)=>(t=e!=null?j(K(e)):{},p(o||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),H=e=>p(d({},"__esModule",{value:!0}),e);var W={};V(W,{default:()=>U});module.exports=H(W);var i=require("react/jsx-runtime"),m=require("../AiuiProvider/index.js"),c=require("./components/index.js"),u=E(require("./BizProductProvider.js")),y=require("./components/index.js"),a=require("react-responsive");const l=({product:e,renderRating:o,variant:t,selectedOptions:n,setSelectedOptions:r,isLogin:X,finalPrice:f,coupon:P,comparePrice:v,totalSavings:C,savingDetail:S,freeGift:g,bundle:h,checkedBundle:k,checkedGift:B,setCheckedBundle:N,setCheckedGift:x,compareData:I,selectedVariants:A,onAddToCart:D,onBuyNow:b,openModal:w,setSavingDetail:M,openSignInPopup:R,openAuthCodePopup:z,renderAffirm:G,renderKlarna:L,renderPaypal:O})=>{const{locale:Y}=(0,m.useAiuiContext)(),s=(0,a.useMediaQuery)({query:"(max-width: 768px)"}),T=(0,a.useMediaQuery)({query:"(min-width: 1440px)"});return(0,i.jsx)(u.default,{product:e,isMobile:s,isDesktop:T,freeGift:g,renderRating:o,finalPrice:f,comparePrice:v,totalSavings:C,savingDetail:S,variant:t,selectedOptions:n,setSelectedOptions:r,bundle:h,coupon:P,checkedBundle:k,checkedGift:B,setCheckedBundle:N,setCheckedGift:x,compareData:I,selectedVariants:A,onAddToCart:D,onBuyNow:b,openModal:w,setSavingDetail:M,openSignInPopup:R,openAuthCodePopup:z,renderAffirm:G,renderKlarna:L,renderPaypal:O,children:(0,i.jsxs)("div",{id:"ipc-listing",children:[(0,i.jsx)(c.PurchaseBar,{onSpyNavItemClick:q=>{console.log(q)}}),s&&(0,i.jsx)("div",{className:"fixed bottom-0 left-0 w-full z-[60]",children:(0,i.jsx)(c.ProductActions,{})}),(0,i.jsx)(y.ProductCard,{})]})})};l.displayName="Listing";var U=l;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 BizProductProvider, { type ProductContextType } from './BizProductProvider.js'\nimport { ProductCard } from './components/index.js'\n\nimport { useMediaQuery } from 'react-responsive'\n\nconst Listing: React.FC<Omit<ProductContextType, 'joinedRecommendBuyProducts' | 'setJoinedRecommendBuyProducts'>> = ({\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 openModal,\n setSavingDetail,\n openSignInPopup,\n openAuthCodePopup,\n renderAffirm,\n renderKlarna,\n renderPaypal,\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 <BizProductProvider\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 openModal={openModal}\n setSavingDetail={setSavingDetail}\n openSignInPopup={openSignInPopup}\n openAuthCodePopup={openAuthCodePopup}\n renderAffirm={renderAffirm}\n renderKlarna={renderKlarna}\n renderPaypal={renderPaypal}\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 </BizProductProvider>\n )\n}\n\nListing.displayName = 'Listing'\n\nexport default Listing\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA+EM,IAAAI,EAAA,6BA/ENC,EAA+B,oCAC/BC,EAA4C,iCAE5CC,EAA4D,sCAC5DD,EAA4B,iCAE5BE,EAA8B,4BAE9B,MAAMC,EAA8G,CAAC,CACnH,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,EACA,UAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,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,QAAS/B,EACT,SAAU6B,EACV,UAAWC,EACX,SAAUnB,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,EACV,UAAWC,EACX,gBAAiBC,EACjB,gBAAiBC,EACjB,kBAAmBC,EACnB,aAAcC,EACd,aAAcC,EACd,aAAcC,EAEd,oBAAC,OAAI,GAAG,cACN,oBAAC,eAAY,kBArCQK,GAA0B,CACnD,QAAQ,IAAIA,CAAG,CACjB,EAmCyD,EAClDH,MACC,OAAC,OAAI,UAAU,sCACb,mBAAC,mBAAe,EAClB,KAEF,OAAC,gBAAY,GACf,EACF,CAEJ,EAEA9B,EAAQ,YAAc,UAEtB,IAAOP,EAAQO",
|
|
6
|
+
"names": ["Listing_exports", "__export", "Listing_default", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_BizProductProvider", "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", "openModal", "setSavingDetail", "openSignInPopup", "openAuthCodePopup", "renderAffirm", "renderKlarna", "renderPaypal", "locale", "isMobile", "isDesktop", "BizProductProvider", "tab"]
|
|
7
|
+
}
|