@anker-in/headless-ui 1.0.26-alpha.1762236947129 → 1.0.26-alpha.1762257871632
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/AplusDesc/index.d.ts +22 -0
- package/dist/cjs/biz-components/AplusDesc/index.js +2 -0
- package/dist/cjs/biz-components/AplusDesc/index.js.map +7 -0
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
- package/dist/cjs/biz-components/CollectionShelves/index.d.ts +6 -0
- package/dist/cjs/biz-components/CollectionShelves/index.js +2 -0
- package/dist/cjs/biz-components/CollectionShelves/index.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +7 -0
- package/dist/cjs/biz-components/CollectionsBanner/index.js +2 -0
- package/dist/cjs/biz-components/CollectionsBanner/index.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +43 -0
- package/dist/cjs/biz-components/CollectionsBanner/types.js +2 -0
- package/dist/cjs/biz-components/CollectionsBanner/types.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +18 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +25 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/price.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
- package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +23 -0
- package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
- package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
- package/dist/cjs/biz-components/DownLoad/index.d.ts +20 -0
- package/dist/cjs/biz-components/DownLoad/index.js +2 -0
- package/dist/cjs/biz-components/DownLoad/index.js.map +7 -0
- package/dist/cjs/biz-components/Faq/Faq.js +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
- package/dist/cjs/biz-components/Features/index.d.ts +26 -0
- package/dist/cjs/biz-components/Features/index.js +2 -0
- package/dist/cjs/biz-components/Features/index.js.map +7 -0
- package/dist/cjs/biz-components/FootCharger/index.d.ts +12 -0
- package/dist/cjs/biz-components/FootCharger/index.js +2 -0
- package/dist/cjs/biz-components/FootCharger/index.js.map +7 -0
- package/dist/cjs/biz-components/GiftBox/index.d.ts +17 -0
- package/dist/cjs/biz-components/GiftBox/index.js +2 -0
- package/dist/cjs/biz-components/GiftBox/index.js.map +7 -0
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +22 -0
- package/dist/cjs/biz-components/GraphicMore/index.js +2 -0
- package/dist/cjs/biz-components/GraphicMore/index.js.map +7 -0
- 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/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/cjs/biz-components/Paginator/index.d.ts +7 -0
- package/dist/cjs/biz-components/Paginator/index.js +7 -0
- package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
- package/dist/cjs/biz-components/SelectStore/index.d.ts +20 -0
- package/dist/cjs/biz-components/SelectStore/index.js +2 -0
- package/dist/cjs/biz-components/SelectStore/index.js.map +7 -0
- 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.d.ts +11 -2
- 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/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/TextMarquee/index.d.ts +9 -0
- package/dist/cjs/biz-components/TextMarquee/index.js +2 -0
- package/dist/cjs/biz-components/TextMarquee/index.js.map +7 -0
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/types.d.ts +1 -0
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/index.d.ts +33 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/breadcrumb.d.ts +12 -0
- package/dist/cjs/components/breadcrumb.js +2 -0
- package/dist/cjs/components/breadcrumb.js.map +7 -0
- package/dist/cjs/components/checkbox.d.ts +1 -0
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/helpers/utils.d.ts +1 -0
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/hooks/useRollout.d.ts +1 -0
- package/dist/cjs/hooks/useRollout.js +2 -0
- package/dist/cjs/hooks/useRollout.js.map +7 -0
- 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/AplusDesc/index.d.ts +22 -0
- package/dist/esm/biz-components/AplusDesc/index.js +2 -0
- package/dist/esm/biz-components/AplusDesc/index.js.map +7 -0
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
- package/dist/esm/biz-components/CollectionShelves/index.d.ts +6 -0
- package/dist/esm/biz-components/CollectionShelves/index.js +2 -0
- package/dist/esm/biz-components/CollectionShelves/index.js.map +7 -0
- package/dist/esm/biz-components/CollectionsBanner/index.d.ts +7 -0
- package/dist/esm/biz-components/CollectionsBanner/index.js +2 -0
- package/dist/esm/biz-components/CollectionsBanner/index.js.map +7 -0
- package/dist/esm/biz-components/CollectionsBanner/types.d.ts +43 -0
- package/dist/esm/biz-components/CollectionsBanner/types.js +1 -0
- package/dist/esm/biz-components/CollectionsBanner/types.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +18 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterList.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
- package/dist/esm/biz-components/CollectionsFilters/component/helper.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +25 -0
- package/dist/esm/biz-components/CollectionsFilters/component/price.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
- package/dist/esm/biz-components/CollectionsFilters/index.d.ts +23 -0
- package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
- package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
- package/dist/esm/biz-components/DownLoad/index.d.ts +20 -0
- package/dist/esm/biz-components/DownLoad/index.js +2 -0
- package/dist/esm/biz-components/DownLoad/index.js.map +7 -0
- package/dist/esm/biz-components/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +3 -3
- package/dist/esm/biz-components/Features/index.d.ts +26 -0
- package/dist/esm/biz-components/Features/index.js +2 -0
- package/dist/esm/biz-components/Features/index.js.map +7 -0
- package/dist/esm/biz-components/FootCharger/index.d.ts +12 -0
- package/dist/esm/biz-components/FootCharger/index.js +2 -0
- package/dist/esm/biz-components/FootCharger/index.js.map +7 -0
- package/dist/esm/biz-components/GiftBox/index.d.ts +17 -0
- package/dist/esm/biz-components/GiftBox/index.js +2 -0
- package/dist/esm/biz-components/GiftBox/index.js.map +7 -0
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +2 -2
- package/dist/esm/biz-components/GraphicMore/index.d.ts +22 -0
- package/dist/esm/biz-components/GraphicMore/index.js +2 -0
- package/dist/esm/biz-components/GraphicMore/index.js.map +7 -0
- 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/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/esm/biz-components/Paginator/index.d.ts +7 -0
- package/dist/esm/biz-components/Paginator/index.js +7 -0
- package/dist/esm/biz-components/Paginator/index.js.map +7 -0
- package/dist/esm/biz-components/SelectStore/index.d.ts +20 -0
- package/dist/esm/biz-components/SelectStore/index.js +2 -0
- package/dist/esm/biz-components/SelectStore/index.js.map +7 -0
- 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.d.ts +11 -2
- 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/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/TextMarquee/index.d.ts +9 -0
- package/dist/esm/biz-components/TextMarquee/index.js +2 -0
- package/dist/esm/biz-components/TextMarquee/index.js.map +7 -0
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/Title/types.d.ts +1 -0
- package/dist/esm/biz-components/index.d.ts +33 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/breadcrumb.d.ts +12 -0
- package/dist/esm/components/breadcrumb.js +2 -0
- package/dist/esm/components/breadcrumb.js.map +7 -0
- package/dist/esm/components/checkbox.d.ts +1 -0
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/helpers/utils.d.ts +1 -0
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/hooks/useRollout.d.ts +1 -0
- package/dist/esm/hooks/useRollout.js +2 -0
- package/dist/esm/hooks/useRollout.js.map +7 -0
- package/dist/tokens/base.css +1 -1
- package/package.json +1 -1
- package/style.css +23 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/CollectionsFilters/component/helper.ts"],
|
|
4
|
+
"sourcesContent": ["import { languageTerritory } from '../../ShelfDisplay/shelfDisplay'\n\n\n//merge object\nexport const deepMerger = (obj1: any, obj2: any) => {\n if (obj1 === undefined) return obj2\n for (let key in obj2) {\n obj1[key] = obj1?.[key] || ''\n if (obj1[key].toString == '[object Object]') {\n obj1[key] = deepMerger(obj1[key], obj2[key])\n } else {\n obj1[key] = obj2?.[key] || ''\n }\n }\n return obj1\n}\n\nexport function paginate(arr: any[], pageSize: number, currentPage: number) {\n pageSize = Math.max(1, Math.floor(pageSize || 1));\n const total = arr.length;\n const totalPages = Math.max(1, Math.ceil(total / pageSize));\n\n // \u628A currentPage \u9650\u5236\u5728 [1, totalPages]\n currentPage = Math.floor(currentPage) || 1;\n if (currentPage < 1) currentPage = 1;\n if (currentPage > totalPages) currentPage = totalPages;\n\n const startIndex = (currentPage - 1) * pageSize;\n const endIndex = Math.min(startIndex + pageSize, total); // \u4E0D\u5305\u542B endIndex \u7684 slice \u7ED3\u675F\u4F4D\u7F6E\n\n const pageItems = arr.slice(startIndex, endIndex);\n\n return {\n pageItems,\n totalPages,\n currentPage,\n startIndex,\n endIndex: endIndex - 1, // \u66F4\u76F4\u89C2\u7684\u7ED3\u675F\u4E0B\u6807\uFF08\u5305\u542B\uFF09\n };\n}\n\nexport type FilterPriceTxt = {\n text: string\n gte: string\n lte: string\n}\n\nexport type FiltersPairMetafield = {\n collections: {\n [key: string]: {\n filter_params: string[]\n price?: [number[]]\n }\n }\n filters_label: { [key: string]: any }\n cabletype?: { [key: string]: any }\n length?: { [key: string]: any }\n videoports?: { [key: string]: any }\n datatransferspeed?: { [key: string]: any }\n connectivity?: { [key: string]: any }\n numberofports?: { [key: string]: any }\n porttype?: { [key: string]: any }\n numberofdevicespowered?: { [key: string]: any }\n chargingtechnology?: { [key: string]: any }\n capacity?: { [key: string]: any }\n product_type: { [key: string]: any }\n price: FilterPriceTxt\n filter_txt: { [key: string]: any }\n [key: string]: any\n}\n\nconst divideIntoFourEqualParts = (minValue: number, maxValue: number) => {\n // \u8BA1\u7B97\u533A\u95F4\u7684\u957F\u5EA6\n const range = maxValue - minValue\n // \u8BA1\u7B97\u6BCF\u4EFD\u7684\u957F\u5EA6\n const segmentLength = range / 4\n // \u521B\u5EFA\u4E00\u4E2A\u5B58\u50A8\u533A\u95F4\u7684\u6570\u7EC4\n const segments = []\n // \u5FAA\u73AF\u751F\u62104\u4E2A\u533A\u95F4\n for (let i = 0; i < 4; i++) {\n // \u8BA1\u7B97\u533A\u95F4\u7684\u6700\u5C0F\u503C\u548C\u6700\u5927\u503C\n let segmentMin = 0\n let segmentMax = 100\n if (i === 0) {\n segmentMin = Math.ceil(minValue + i * segmentLength - 1)\n } else {\n segmentMin = Math.ceil(minValue + i * segmentLength)\n }\n if (i === 3) {\n segmentMax = Math.ceil(minValue + (i + 1) * segmentLength + 1) - 0.01\n } else {\n segmentMax = Math.ceil(minValue + (i + 1) * segmentLength) - 0.01\n }\n\n // \u5B58\u50A8\u533A\u95F4\n segments.push([Math.round(segmentMin), Math.round(segmentMax * 100) / 100])\n }\n\n return segments\n}\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n}) {\n if (!currencyCode) return amount\n // nz\u7AD9\u70B9 \u7528 eu-US\u8BED\u8A00\u73AF\u5883\uFF0C\u5C55\u793ANZ$\u8D27\u5E01\u7B26\u53F7\n const formatCurrency = new Intl.NumberFormat(\n locale == 'nz' ? 'en-US' : languageTerritory(locale),\n {\n style: 'currency',\n currency: currencyCode,\n minimumFractionDigits:\n maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n }\n )\n\n let result = formatCurrency.format(amount)\n if (locale === 'nz') {\n result = result?.replace('NZ$', 'NZ$ ')\n }\n return locale === 'eu-de' || locale == 'eu-en'\n ? result?.toString()?.replace(/[\\s]/g, '')\n : result\n}\n\nconst normalizePriceOption = ({\n option,\n price_label,\n currencyCode = 'us',\n locale,\n}: {\n option: number[]\n price_label: FilterPriceTxt\n currencyCode?: string\n locale: string\n}) => {\n return option\n .map((val) => {\n if (val <= 0) return price_label.lte\n if (val >= 99999) return price_label.gte\n const value = formatPrice({\n locale,\n amount: val,\n currencyCode,\n })\n return value\n })\n .join(option[0] > 0 && option[1] < 99999 ? ' - ' : ' ')\n}\n\nexport const normalizeFilterPrice = ({\n filters_pair,\n products,\n locale = 'us',\n}: {\n filters_pair: FiltersPairMetafield\n locale?: string\n products?: any[]\n}) => {\n const { collections, filters_label, price: price_label } = filters_pair\n const currencyCode = products?.[0]?.price?.currencyCode\n let fp = 'price'\n let min: number = 0\n let max: number = 0\n products?.forEach((item: any) => {\n if (!min && item.price.value < 999999) min = Number(item.price.value)\n if (!max && item.price.value < 999999) max = Number(item.price.value)\n if (min > item.price.value && item.price.value < 999999)\n min = item.price.value\n if (max < item.price.value && item.price.value < 999999)\n max = item.price.value\n })\n const poptions = divideIntoFourEqualParts(min, max) || []\n return {\n label: filters_label[fp] || '',\n value: fp,\n options: poptions?.map((option: any) => ({\n value: option.join('|'),\n label: normalizePriceOption({\n option,\n price_label,\n currencyCode,\n locale,\n }),\n })),\n }\n}"],
|
|
5
|
+
"mappings": "AAAA,OAAS,qBAAAA,MAAyB,kCAI3B,MAAMC,EAAa,CAACC,EAAWC,IAAc,CAClD,GAAID,IAAS,OAAW,OAAOC,EAC/B,QAASC,KAAOD,EACdD,EAAKE,CAAG,EAAIF,IAAOE,CAAG,GAAK,GACvBF,EAAKE,CAAG,EAAE,UAAY,kBACxBF,EAAKE,CAAG,EAAIH,EAAWC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,CAAC,EACD,MAAMC,EAAW5B,EAAyByB,EAAKC,CAAG,GAAK,CAAC,EACxD,MAAO,CACL,MAAOH,EAAcC,CAAE,GAAK,GAC5B,MAAOA,EACP,QAASI,GAAU,IAAKZ,IAAiB,CACvC,MAAOA,EAAO,KAAK,GAAG,EACtB,MAAOD,EAAqB,CAC1B,OAAAC,EACA,YAAAC,EACA,aAAAP,EACA,OAAAC,CACF,CAAC,CACH,EAAE,CACJ,CACF",
|
|
6
|
+
"names": ["languageTerritory", "deepMerger", "obj1", "obj2", "key", "paginate", "arr", "pageSize", "currentPage", "total", "totalPages", "startIndex", "endIndex", "divideIntoFourEqualParts", "minValue", "maxValue", "segmentLength", "segments", "i", "segmentMin", "segmentMax", "formatPrice", "amount", "currencyCode", "locale", "maximumFractionDigits", "minimumFractionDigits", "result", "normalizePriceOption", "option", "price_label", "val", "normalizeFilterPrice", "filters_pair", "products", "collections", "filters_label", "fp", "min", "max", "item", "poptions"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FunctionMemberPriceResult, FunctionMemberPriceConfig, DiscountConfig, ProductVariant } from './priceProps';
|
|
2
|
+
export declare const languageCurrencyCode: (locale: string) => string;
|
|
3
|
+
export declare const languageTerritory: (locale: string) => string;
|
|
4
|
+
export declare function formatPrice({ amount, currencyCode, locale, maximumFractionDigits, minimumFractionDigits, }: {
|
|
5
|
+
amount: number;
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
locale: string;
|
|
8
|
+
maximumFractionDigits?: number;
|
|
9
|
+
minimumFractionDigits?: number;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function atobID(id?: string): string | null | undefined;
|
|
12
|
+
export declare const functionDiscountCalculate: ({ config, price, }: {
|
|
13
|
+
config: DiscountConfig;
|
|
14
|
+
price: number;
|
|
15
|
+
}) => number;
|
|
16
|
+
export declare const getFunctionMemberPriceDiscountConfig: ({ config, variant, }: {
|
|
17
|
+
config?: FunctionMemberPriceConfig[];
|
|
18
|
+
variant?: ProductVariant;
|
|
19
|
+
}) => DiscountConfig | undefined;
|
|
20
|
+
export declare const getFunctionMemberPrice: ({ shopMemberPriceDiscountConfig, currencyCode, variant, locale, }: {
|
|
21
|
+
shopMemberPriceDiscountConfig?: FunctionMemberPriceConfig[];
|
|
22
|
+
currencyCode?: string;
|
|
23
|
+
variant?: ProductVariant;
|
|
24
|
+
locale: string;
|
|
25
|
+
}) => false | FunctionMemberPriceResult;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import a from"decimal.js";import{DISCOUNT_TYPE as f,ROUND_SELECTED as d}from"./priceProps";const b=e=>({us:"USD",uk:"GBP",ca:"CAD",fr:"EUR",au:"AUD",it:"EUR",my:"MYR",vn:"VND",de:"EUR","eu-en":"EUR",eu:"EUR",nl:"EUR"})[e]||"USD",U=e=>({us:"en-US",uk:"en-GB",ca:"en-CA",fr:"fr-FR",au:"en-AU",my:"my",vn:"vn",it:"it-IT",de:"de-DE",eu:"en-DE",nl:"nl-NL"})[e]||"en-US";function m({amount:e,currencyCode:n,locale:t,maximumFractionDigits:i,minimumFractionDigits:c}){if(!t)return String(e);const u=n||b(t),o=new Intl.NumberFormat(["ca","au"].includes(t)?"en-US":U(t),{style:"currency",currency:u,minimumFractionDigits:i===0?0:c,maximumFractionDigits:i}).format(e)?.replace(/CA\$/g,"C$");if(t==="de"||t==="eu-en")return o?.replace(/[\s]/g,"");if(t==="it"||t==="fr"){let s=o?.toString()?.replace(/\s(?=€)/g,"")?.replace("."," ");return t==="fr"?s?.replace("\u20AC"," \u20AC"):s}return o}function y(e){return e?typeof e=="string"&&e.includes("/")?e?.split?.("/")?.pop()?.split?.("?")?.shift():e:null}const W=({config:e,price:n})=>{const{apply_price_ending:t,one_decimal_place:i,two_decimal_place:c,round_selected:u}=e.price_ending_conf||{};let r=new a(n);switch(e.discount_type){case f.PERCENTAGE:r=r.mul(100-e.discount_value).div(100);break;case f.FIXED_AMOUNT:r=r.sub(e.discount_value);break;case f.FIXED_PRICE:r=new a(e.discount_value);break;default:break}if(t){switch(u){case d.ROUND_HIGHEST:r=r.ceil();break;case d.ROUND_LOWEST:r=r.floor();break;case d.ROUND_NEAREST:r=r.round();break;default:r=new a(r.toFixed(2,a.ROUND_DOWN));break}const o=r.toString().split(".");r=new a(o[0]+"."+i+c)}return r.toNumber()},E=({config:e,variant:n})=>{if(!e||!n)return;let t;for(const i of e)if(t=i.result_detail.member_discounts?.find(c=>c.main_products.all_store_variant?c:c.main_products.variants.find(u=>String(u.variant_id)===y(n.id)))?.discount_conf,t)break;if(t)return t},w=({coupons:e=null,variant:n,product:t=void 0,handle:i="",channel:c=""})=>{if(e){let u=e?.[n?.sku]||e?.[t?.handle]||[];if(u.length>0)return u?.find(r=>r?.handle===i)||{};if(e?.length>0)return e?.find(r=>r?.sku===n?.sku&&r?.handle===i)||{}}else{const u="wsch";return(n?.metafields?.discountCodeApp||[])?.filter(s=>(!s?.ends_at||new Date(s?.ends_at).getTime()>new Date().getTime())&&new Date(s?.starts_at).getTime()<=new Date().getTime()&&s?.variant_shopify_id===+(y(n?.id||"")||"")&&(c?s?.title?.toLocaleLowerCase().includes(c):!s?.title?.toLocaleLowerCase().includes(u)))?.[0]}},h=new Map,A=({shopMemberPriceDiscountConfig:e,currencyCode:n,variant:t,locale:i})=>{const c=w({variant:t}),u=E({config:e,variant:t});if(!u)return h.set(t?.id,!1),!1;const r={amount:t?.price||0,priceWithCurrency:m({amount:t?.price||0,currencyCode:n||"USD",locale:i})},o=u?W({config:u,price:t?.price||0}):t?.price||0,s={amount:o,priceWithCurrency:m({amount:o,currencyCode:n||"USD",locale:i})};let l=o;c?.variant_price4wscode&&t&&(l=new a(o).minus(new a(t.price).minus(c.variant_price4wscode)).toNumber());const p={amount:l,priceWithCurrency:m({amount:l,currencyCode:n||"USD",locale:i})},g=new a(r.amount).sub(p.amount).toNumber(),C={amount:g,priceWithCurrency:m({amount:g,currencyCode:n||"USD",locale:i,maximumFractionDigits:2})},D=new a(r.amount).sub(s.amount).toNumber(),_={amount:D,priceWithCurrency:m({amount:D,currencyCode:n||"USD",locale:i,maximumFractionDigits:2})},P={hasMemberPrice:!!u,useCoupon:!0,originalPrice:r.amount,originalPriceWithCurrency:r.priceWithCurrency,salePrice:p.amount,salePriceWithCurrency:p.priceWithCurrency,salePriceWithoutCoupon:s.amount,salePriceWithoutCouponWithCurrency:s.priceWithCurrency,savePrice:C.amount,savePriceWithCurrency:C.priceWithCurrency,savePriceWithoutCoupon:_.amount,savePriceWithoutCouponWithCurrency:_.priceWithCurrency};return h.set(t?.id,P),P};export{y as atobID,m as formatPrice,W as functionDiscountCalculate,A as getFunctionMemberPrice,E as getFunctionMemberPriceDiscountConfig,b as languageCurrencyCode,U as languageTerritory};
|
|
2
|
+
//# sourceMappingURL=price.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/CollectionsFilters/component/price.ts"],
|
|
4
|
+
"sourcesContent": ["import Decimal from 'decimal.js'\nimport type { FunctionMemberPriceResult, FunctionMemberPriceConfig, DiscountConfig, ProductVariant } from './priceProps'\nimport { DISCOUNT_TYPE, ROUND_SELECTED } from './priceProps'\n\nexport const languageCurrencyCode = (locale: string) =>\n // https://www.iban.com/currency-codes\n ({\n us: 'USD',\n uk: 'GBP',\n ca: 'CAD',\n fr: 'EUR',\n au: 'AUD',\n it: 'EUR',\n my: 'MYR',\n vn: 'VND',\n de: 'EUR',\n 'eu-en': 'EUR',\n eu: 'EUR',\n nl: 'EUR',\n}[locale] || 'USD')\n \nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-US',\n uk: 'en-GB',\n ca: 'en-CA',\n fr: 'fr-FR',\n au: 'en-AU',\n my: 'my',\n vn: 'vn',\n it: 'it-IT',\n de: 'de-DE',\n eu: 'en-DE',\n nl: 'nl-NL',\n }[locale] || 'en-US')\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n}) {\n if (!locale) return String(amount)\n const cc = currencyCode || languageCurrencyCode(locale)\n const formatCurrency = new Intl.NumberFormat(\n // ca\u5730\u533A\u4F7F\u7528 en-US\uFF0C\u8D27\u5E01\u5355\u4F4D\u4F1A\u5C55\u793A CA$\n ['ca', 'au']?.includes(locale) ? 'en-US' : languageTerritory(locale),\n {\n style: 'currency',\n currency: cc,\n minimumFractionDigits:\n maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n }\n )\n\n const result = formatCurrency.format(amount)?.replace(/CA\\$/g, 'C$')\n if (locale === 'de' || locale === 'eu-en') return result?.replace(/[\\s]/g, '')\n if (locale === 'it' || locale === 'fr') {\n let priceStr = result\n ?.toString()\n ?.replace(/\\s(?=\u20AC)/g, '')\n ?.replace('.', ' ')\n if (locale === 'fr') {\n return priceStr?.replace('\u20AC', ' \u20AC')\n }\n return priceStr\n }\n\n return result\n}\n\nexport function atobID(id?: string) {\n if (!id) {\n return null\n }\n if (typeof id === 'string' && id.includes('/')) {\n return id?.split?.('/')?.pop()?.split?.('?')?.shift()\n }\n return id\n}\n\n// Function \u8BA1\u7B97\u6298\u540E\u4EF7\nexport const functionDiscountCalculate = ({\n config,\n price,\n}: {\n config: DiscountConfig\n price: number\n}) => {\n const {\n apply_price_ending,\n one_decimal_place,\n two_decimal_place,\n round_selected,\n } = config.price_ending_conf || {}\n\n let salePrice = new Decimal(price)\n\n switch (config.discount_type) {\n // \u767E\u5206\u6BD4\u6298\u6263\n case DISCOUNT_TYPE.PERCENTAGE:\n salePrice = salePrice.mul(100 - config.discount_value).div(100)\n break\n // \u56FA\u5B9A\u91D1\u989D\u6298\u6263\n case DISCOUNT_TYPE.FIXED_AMOUNT:\n salePrice = salePrice.sub(config.discount_value)\n break\n // \u56FA\u5B9A\u4EF7\u683C\u6298\u6263\n case DISCOUNT_TYPE.FIXED_PRICE:\n salePrice = new Decimal(config.discount_value)\n break\n default:\n break\n }\n\n if (apply_price_ending) {\n // \u5C0F\u6570\u4F4D\u53D6\u820D\n switch (round_selected) {\n case ROUND_SELECTED.ROUND_HIGHEST:\n salePrice = salePrice.ceil()\n break\n case ROUND_SELECTED.ROUND_LOWEST:\n salePrice = salePrice.floor()\n break\n case ROUND_SELECTED.ROUND_NEAREST:\n salePrice = salePrice.round()\n break\n default:\n salePrice = new Decimal(salePrice.toFixed(2, Decimal.ROUND_DOWN))\n break\n }\n\n const priceEnding = salePrice.toString().split('.')\n salePrice = new Decimal(\n priceEnding[0] + '.' + one_decimal_place + two_decimal_place\n )\n }\n\n return salePrice.toNumber()\n}\n\n// \u83B7\u53D6\u4F1A\u5458\u4EF7\u6298\u6263\u914D\u7F6E\nexport const getFunctionMemberPriceDiscountConfig = ({\n config,\n variant,\n}: {\n config?: FunctionMemberPriceConfig[]\n variant?: ProductVariant\n}) => {\n if (!config || !variant) {\n return\n }\n\n let memberPriceDiscountConfig: DiscountConfig | undefined\n\n for (const configItem of config) {\n memberPriceDiscountConfig = configItem.result_detail.member_discounts?.find(\n (discountItem: { main_products: { all_store_variant: any; variants: any[] } }) => {\n if (discountItem.main_products.all_store_variant) {\n return discountItem\n }\n\n return discountItem.main_products.variants.find(\n (variantConfig) =>\n String(variantConfig.variant_id) === atobID(variant.id as string)\n )\n }\n )?.discount_conf\n if (memberPriceDiscountConfig) {\n break\n }\n }\n\n if (!memberPriceDiscountConfig) return\n\n return memberPriceDiscountConfig\n}\n\nconst variantGetCoupon = ({\n coupons = null,\n variant,\n product = undefined,\n handle = '',\n channel = '',\n}: any) => {\n if (coupons) {\n let couponsData =\n coupons?.[variant?.sku] || coupons?.[product?.handle] || []\n if (couponsData.length > 0) {\n return couponsData?.find((i: { handle: any }) => i?.handle === handle) || {}\n } else if (coupons?.length > 0) {\n return (\n coupons?.find((i: { sku: any; handle: any }) => i?.sku === variant?.sku && i?.handle === handle) ||\n {}\n )\n }\n } else {\n const hideChannel = 'wsch'\n const discountCodeApp = variant?.metafields?.discountCodeApp || []\n\n const results = discountCodeApp?.filter((coupon: { ends_at: string | number | Date; starts_at: string | number | Date; variant_shopify_id: number; title: string }) => {\n const isActive =\n (!coupon?.ends_at ||\n new Date(coupon?.ends_at).getTime() > new Date().getTime()) &&\n new Date(coupon?.starts_at).getTime() <= new Date().getTime() &&\n coupon?.variant_shopify_id === +(atobID(variant?.id || '') || '')\n\n return (\n isActive &&\n (channel\n ? coupon?.title?.toLocaleLowerCase().includes(channel)\n : !coupon?.title?.toLocaleLowerCase().includes(hideChannel))\n )\n })\n\n return results?.[0]\n }\n}\n\nconst cacheMap = new Map<string, FunctionMemberPriceResult | false>()\n\n// \u8BA1\u7B97\u5355\u4EF6\u5546\u54C1\u7684\u4F1A\u5458\u4EF7\nexport const getFunctionMemberPrice = ({\n shopMemberPriceDiscountConfig,\n currencyCode,\n variant,\n locale,\n}: {\n shopMemberPriceDiscountConfig?: FunctionMemberPriceConfig[]\n currencyCode?: string\n variant?: ProductVariant\n locale: string\n}) => {\n const couponData = variantGetCoupon({ variant })\n\n // variant\u5BF9\u5E94\u7684\u4F1A\u5458\u4EF7\u6298\u6263\u914D\u7F6E\n const memberPriceDiscountConfig = getFunctionMemberPriceDiscountConfig({\n config: shopMemberPriceDiscountConfig,\n variant,\n })\n\n if (!memberPriceDiscountConfig) {\n cacheMap.set(variant?.id as string, false)\n return false as false\n }\n\n const originalPrice = {\n amount: variant?.price || 0,\n priceWithCurrency: formatPrice({\n amount: variant?.price || 0,\n currencyCode: currencyCode || 'USD',\n locale,\n }),\n }\n\n const salePriceWithoutCouponAmount = memberPriceDiscountConfig\n ? functionDiscountCalculate({\n config: memberPriceDiscountConfig,\n price: variant?.price || 0,\n })\n : variant?.price || 0\n const salePriceWithoutCoupon = {\n amount: salePriceWithoutCouponAmount,\n priceWithCurrency: formatPrice({\n amount: salePriceWithoutCouponAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n }),\n }\n\n // function \u4F1A\u5458\u4EF7\u662F\u5728\u539F\u4EF7\u7684\u57FA\u7840\u4E0A\u8FDB\u884C\u8BA1\u7B97\uFF0C\u6682\u4E0D\u652F\u6301\u6298\u540E\u4EF7\n let salePriceAmount = salePriceWithoutCouponAmount\n\n // \u51CF\u53BBcode\u7684\u4F18\u60E0\n if (couponData?.variant_price4wscode && variant) {\n salePriceAmount = new Decimal(salePriceWithoutCouponAmount)\n .minus(new Decimal(variant.price).minus(couponData.variant_price4wscode))\n .toNumber()\n }\n\n const salePrice = {\n amount: salePriceAmount,\n priceWithCurrency: formatPrice({\n amount: salePriceAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n }),\n }\n\n const savePriceAmount = new Decimal(originalPrice.amount)\n .sub(salePrice.amount)\n .toNumber()\n const savePrice = {\n amount: savePriceAmount,\n priceWithCurrency: formatPrice({\n amount: savePriceAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n }),\n }\n\n const savePriceWithoutCouponAmount = new Decimal(originalPrice.amount)\n .sub(salePriceWithoutCoupon.amount)\n .toNumber()\n const savePriceWithoutCoupon = {\n amount: savePriceWithoutCouponAmount,\n priceWithCurrency: formatPrice({\n amount: savePriceWithoutCouponAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n }),\n }\n\n const result: FunctionMemberPriceResult = {\n // \u662F\u5426\u5B58\u5728\u4F1A\u5458\u4EF7\n hasMemberPrice: !!memberPriceDiscountConfig,\n useCoupon: true,\n // \u539F\u4EF7\n originalPrice: originalPrice.amount,\n originalPriceWithCurrency: originalPrice.priceWithCurrency as string,\n // \u4F7F\u7528\u5238\u540E\u7684\u6298\u540E\u4EF7\n salePrice: salePrice.amount,\n salePriceWithCurrency: salePrice.priceWithCurrency as string,\n\n // \u4E0D\u4F7F\u7528\u5238\u7684\u6298\u540E\u4EF7\n salePriceWithoutCoupon: salePriceWithoutCoupon.amount,\n salePriceWithoutCouponWithCurrency:\n salePriceWithoutCoupon.priceWithCurrency as string,\n\n // \u5305\u542B\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePrice: savePrice.amount,\n savePriceWithCurrency: savePrice.priceWithCurrency as string,\n\n // \u4E0D\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePriceWithoutCoupon: savePriceWithoutCoupon.amount,\n savePriceWithoutCouponWithCurrency:\n savePriceWithoutCoupon.priceWithCurrency as string,\n }\n\n cacheMap.set(variant?.id as string, result)\n\n return result\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAa,aAEpB,OAAS,iBAAAC,EAAe,kBAAAC,MAAsB,eAEvC,MAAMC,EAAwBC,IAElC,CACC,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,QAAS,MACT,GAAI,MACJ,GAAI,KACR,GAAEA,CAAM,GAAK,MAEAC,EAAqBD,IAE/B,CACC,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,KACJ,GAAI,KACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,GAAEA,CAAM,GAAK,QAER,SAASE,EAAY,CAC1B,OAAAC,EACA,aAAAC,EACA,OAAAJ,EACA,sBAAAK,EACA,sBAAAC,CACF,EAMG,CACD,GAAI,CAACN,EAAQ,OAAO,OAAOG,CAAM,EACjC,MAAMI,EAAKH,GAAgBL,EAAqBC,CAAM,EAahDQ,EAZiB,IAAI,KAAK,aAE9B,CAAC,KAAM,IAAI,EAAG,SAASR,CAAM,EAAI,QAAUC,EAAkBD,CAAM,EACnE,CACE,MAAO,WACP,SAAUO,EACV,sBACEF,IAA0B,EAAI,EAAIC,EACpC,sBAAAD,CACF,CACF,EAE8B,OAAOF,CAAM,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0B,EAAY,CAChB,OAAQD,EACR,kBAAmB1C,EAAY,CAC7B,OAAQ0C,EACR,aAAcxC,GAAgB,MAC9B,OAAAJ,EACA,sBAAuB,CACzB,CAAC,CACH,EAEM8C,EAA+B,IAAIlD,EAAQ4C,EAAc,MAAM,EAClE,IAAIE,EAAuB,MAAM,EACjC,SAAS,EACNK,EAAyB,CAC7B,OAAQD,EACR,kBAAmB5C,EAAY,CAC7B,OAAQ4C,EACR,aAAc1C,GAAgB,MAC9B,OAAAJ,EACA,sBAAuB,CACzB,CAAC,CACH,EAEMQ,EAAoC,CAExC,eAAgB,CAAC,CAACe,EAClB,UAAW,GAEX,cAAeiB,EAAc,OAC7B,0BAA2BA,EAAc,kBAEzC,UAAWrB,EAAU,OACrB,sBAAuBA,EAAU,kBAGjC,uBAAwBuB,EAAuB,OAC/C,mCACEA,EAAuB,kBAGzB,UAAWG,EAAU,OACrB,sBAAuBA,EAAU,kBAGjC,uBAAwBE,EAAuB,OAC/C,mCACEA,EAAuB,iBAC3B,EAEA,OAAAX,EAAS,IAAId,GAAS,GAAcd,CAAM,EAEnCA,CACT",
|
|
6
|
+
"names": ["Decimal", "DISCOUNT_TYPE", "ROUND_SELECTED", "languageCurrencyCode", "locale", "languageTerritory", "formatPrice", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "cc", "result", "priceStr", "atobID", "id", "functionDiscountCalculate", "config", "price", "apply_price_ending", "one_decimal_place", "two_decimal_place", "round_selected", "salePrice", "priceEnding", "getFunctionMemberPriceDiscountConfig", "variant", "memberPriceDiscountConfig", "configItem", "discountItem", "variantConfig", "variantGetCoupon", "coupons", "product", "handle", "channel", "couponsData", "i", "hideChannel", "coupon", "cacheMap", "getFunctionMemberPrice", "shopMemberPriceDiscountConfig", "couponData", "originalPrice", "salePriceWithoutCouponAmount", "salePriceWithoutCoupon", "salePriceAmount", "savePriceAmount", "savePrice", "savePriceWithoutCouponAmount", "savePriceWithoutCoupon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
export declare enum RuleType {
|
|
2
|
+
AUTO_FREE_GIFT = 1,// 自动赠品
|
|
3
|
+
BUNDLE = 2,// 组合
|
|
4
|
+
VOLUME_DISCOUNT = 3,// 量价折扣
|
|
5
|
+
ORDER_DISCOUNT = 4,// 订单折扣
|
|
6
|
+
PRICE_DISCOUNT = 5
|
|
7
|
+
}
|
|
8
|
+
export type FunctionMemberPriceResult = {
|
|
9
|
+
hasMemberPrice: boolean;
|
|
10
|
+
useCoupon: boolean;
|
|
11
|
+
originalPrice: number;
|
|
12
|
+
originalPriceWithCurrency: string;
|
|
13
|
+
salePrice: number;
|
|
14
|
+
salePriceWithCurrency: string;
|
|
15
|
+
salePriceWithoutCoupon: number;
|
|
16
|
+
salePriceWithoutCouponWithCurrency: string;
|
|
17
|
+
savePrice: number;
|
|
18
|
+
savePriceWithCurrency: string;
|
|
19
|
+
savePriceWithoutCoupon: number;
|
|
20
|
+
savePriceWithoutCouponWithCurrency: string;
|
|
21
|
+
};
|
|
22
|
+
export declare enum ProductionsCombination {
|
|
23
|
+
SAME_PRODUCT = 0,// 相同产品
|
|
24
|
+
SAME_VARIANT = 1,// 相同变体
|
|
25
|
+
MIX_MATCH = 2
|
|
26
|
+
}
|
|
27
|
+
export declare enum DiscountOptions {
|
|
28
|
+
MINIMUM_QUANTITY = 1,
|
|
29
|
+
FIXED_QUANTITY = 2,
|
|
30
|
+
TIERED_QUANTITY = 3
|
|
31
|
+
}
|
|
32
|
+
export declare enum DISCOUNT_TYPE {
|
|
33
|
+
PERCENTAGE = 1,// 百分比
|
|
34
|
+
FIXED_AMOUNT = 2,// 固定金额
|
|
35
|
+
FIXED_PRICE = 3
|
|
36
|
+
}
|
|
37
|
+
export declare enum ROUND_SELECTED {
|
|
38
|
+
ROUND_HIGHEST = 1,// 向上取整
|
|
39
|
+
ROUND_LOWEST = 2,// 向下取整
|
|
40
|
+
ROUND_NEAREST = 3
|
|
41
|
+
}
|
|
42
|
+
export declare enum DISCOUNT_BASE_TYPE {
|
|
43
|
+
CURRENT_PRICE = 1,// 折后价
|
|
44
|
+
COMPARE_AT_PRICE = 2
|
|
45
|
+
}
|
|
46
|
+
export type TieredDiscount = {
|
|
47
|
+
quantity: number;
|
|
48
|
+
discount: number;
|
|
49
|
+
discount_type: DISCOUNT_TYPE;
|
|
50
|
+
};
|
|
51
|
+
type VariantItem = {
|
|
52
|
+
variant_id: string;
|
|
53
|
+
sku: string;
|
|
54
|
+
handle: string;
|
|
55
|
+
};
|
|
56
|
+
export type RuleCondition = {
|
|
57
|
+
with_special_url_params: string[];
|
|
58
|
+
without_special_url_params: string[];
|
|
59
|
+
with_user_tags: string[];
|
|
60
|
+
without_user_tags: string[];
|
|
61
|
+
};
|
|
62
|
+
export type DiscountConfig = {
|
|
63
|
+
discount_type: DISCOUNT_TYPE;
|
|
64
|
+
discount_value: number;
|
|
65
|
+
price_ending_conf: {
|
|
66
|
+
apply_price_ending: boolean;
|
|
67
|
+
conf_one_decimal_place: boolean;
|
|
68
|
+
conf_two_decimal_place: false;
|
|
69
|
+
one_decimal_place: number;
|
|
70
|
+
two_decimal_place: number;
|
|
71
|
+
round_selected: ROUND_SELECTED;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type FunctionDiscountConfig = {
|
|
75
|
+
rule_id: number;
|
|
76
|
+
rule_type: RuleType;
|
|
77
|
+
discount_labels: {
|
|
78
|
+
cart_checkout_label: string;
|
|
79
|
+
product_label: string;
|
|
80
|
+
sold_out_label: string;
|
|
81
|
+
};
|
|
82
|
+
discount_combinations: {
|
|
83
|
+
other_order_discounts: boolean;
|
|
84
|
+
other_product_discounts: boolean;
|
|
85
|
+
shipping_discounts: boolean;
|
|
86
|
+
};
|
|
87
|
+
rule_conditions: RuleCondition[];
|
|
88
|
+
};
|
|
89
|
+
export type VolumeConfig = {
|
|
90
|
+
result_detail: {
|
|
91
|
+
productions_combination: ProductionsCombination;
|
|
92
|
+
discount_options: DiscountOptions;
|
|
93
|
+
discount_exclude_customed_price: boolean;
|
|
94
|
+
tiered_discounts: TieredDiscount[];
|
|
95
|
+
main_product: {
|
|
96
|
+
variant_list: VariantItem[];
|
|
97
|
+
all_store_variant: boolean;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
} & FunctionDiscountConfig;
|
|
101
|
+
export type FunctionMemberPriceConfig = {
|
|
102
|
+
result_detail: {
|
|
103
|
+
member_discounts: {
|
|
104
|
+
main_products: {
|
|
105
|
+
variants: {
|
|
106
|
+
variant_id: string;
|
|
107
|
+
sku: string;
|
|
108
|
+
handle: string;
|
|
109
|
+
discount_value: number;
|
|
110
|
+
}[];
|
|
111
|
+
skip_variants: {
|
|
112
|
+
variant_id: string;
|
|
113
|
+
sku: string;
|
|
114
|
+
handle: string;
|
|
115
|
+
discount_value: number;
|
|
116
|
+
}[];
|
|
117
|
+
dynamic_conf: {
|
|
118
|
+
in_collections?: string[];
|
|
119
|
+
not_in_collections?: string[];
|
|
120
|
+
in_products?: string[];
|
|
121
|
+
not_in_products?: string[];
|
|
122
|
+
SKU: {
|
|
123
|
+
in?: string[];
|
|
124
|
+
not_in?: string[];
|
|
125
|
+
start_with?: string;
|
|
126
|
+
notstart_with?: string;
|
|
127
|
+
end_with?: string;
|
|
128
|
+
unend_with?: string;
|
|
129
|
+
contain?: string;
|
|
130
|
+
uncontain?: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
all_store_variant: boolean;
|
|
134
|
+
};
|
|
135
|
+
discount_conf: DiscountConfig;
|
|
136
|
+
}[];
|
|
137
|
+
limit_discount_max: number;
|
|
138
|
+
};
|
|
139
|
+
} & FunctionDiscountConfig;
|
|
140
|
+
export type PriceDiscountConfig = FunctionDiscountConfig & {
|
|
141
|
+
result_detail: {
|
|
142
|
+
main_product: {
|
|
143
|
+
variant_list: {
|
|
144
|
+
variant_id: string;
|
|
145
|
+
sku: string;
|
|
146
|
+
handle: string;
|
|
147
|
+
}[];
|
|
148
|
+
all_store_variant: boolean;
|
|
149
|
+
};
|
|
150
|
+
price_conf: {
|
|
151
|
+
discount_type: DISCOUNT_TYPE;
|
|
152
|
+
discount_base: DISCOUNT_BASE_TYPE;
|
|
153
|
+
discount_amount: number;
|
|
154
|
+
price_ending_conf: {
|
|
155
|
+
apply_price_ending: false;
|
|
156
|
+
one_decimal_place: number;
|
|
157
|
+
two_decimal_place: number;
|
|
158
|
+
round_selected: ROUND_SELECTED;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
export type ProductImage = {
|
|
164
|
+
url: string;
|
|
165
|
+
alt?: string;
|
|
166
|
+
};
|
|
167
|
+
export type ProductOption = {
|
|
168
|
+
__typename?: 'MultipleChoiceOption';
|
|
169
|
+
id: string;
|
|
170
|
+
displayName: string;
|
|
171
|
+
values: ProductOptionValues[];
|
|
172
|
+
};
|
|
173
|
+
export type ProductOptionValues = {
|
|
174
|
+
label: string;
|
|
175
|
+
hexColors?: string[];
|
|
176
|
+
};
|
|
177
|
+
export type ProductVariant = {
|
|
178
|
+
id: string | number;
|
|
179
|
+
options: ProductOption[];
|
|
180
|
+
availableForSale?: boolean;
|
|
181
|
+
quantityAvailable: number;
|
|
182
|
+
metafields?: Record<string, any>;
|
|
183
|
+
[key: string]: any;
|
|
184
|
+
};
|
|
185
|
+
export type ProductPrice = {
|
|
186
|
+
value: number;
|
|
187
|
+
currencyCode?: 'USD' | 'EUR' | 'ARS' | string;
|
|
188
|
+
retailPrice?: number;
|
|
189
|
+
salePrice?: number;
|
|
190
|
+
listPrice?: number;
|
|
191
|
+
extendedSalePrice?: number;
|
|
192
|
+
extendedListPrice?: number;
|
|
193
|
+
};
|
|
194
|
+
export type Product = any & {
|
|
195
|
+
id: string;
|
|
196
|
+
name: string;
|
|
197
|
+
description: string;
|
|
198
|
+
descriptionHtml?: string;
|
|
199
|
+
productType?: string;
|
|
200
|
+
sku?: string;
|
|
201
|
+
slug?: string;
|
|
202
|
+
handle?: string;
|
|
203
|
+
path?: string;
|
|
204
|
+
images: ProductImage[];
|
|
205
|
+
variants: ProductVariant[];
|
|
206
|
+
price: ProductPrice;
|
|
207
|
+
listPrice?: number;
|
|
208
|
+
options: ProductOption[];
|
|
209
|
+
preRender?: string;
|
|
210
|
+
seo?: any;
|
|
211
|
+
metafields?: {
|
|
212
|
+
[key: string]: any;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var i=(n=>(n[n.AUTO_FREE_GIFT=1]="AUTO_FREE_GIFT",n[n.BUNDLE=2]="BUNDLE",n[n.VOLUME_DISCOUNT=3]="VOLUME_DISCOUNT",n[n.ORDER_DISCOUNT=4]="ORDER_DISCOUNT",n[n.PRICE_DISCOUNT=5]="PRICE_DISCOUNT",n))(i||{}),r=(t=>(t[t.SAME_PRODUCT=0]="SAME_PRODUCT",t[t.SAME_VARIANT=1]="SAME_VARIANT",t[t.MIX_MATCH=2]="MIX_MATCH",t))(r||{}),o=(t=>(t[t.MINIMUM_QUANTITY=1]="MINIMUM_QUANTITY",t[t.FIXED_QUANTITY=2]="FIXED_QUANTITY",t[t.TIERED_QUANTITY=3]="TIERED_QUANTITY",t))(o||{}),s=(t=>(t[t.PERCENTAGE=1]="PERCENTAGE",t[t.FIXED_AMOUNT=2]="FIXED_AMOUNT",t[t.FIXED_PRICE=3]="FIXED_PRICE",t))(s||{}),a=(t=>(t[t.ROUND_HIGHEST=1]="ROUND_HIGHEST",t[t.ROUND_LOWEST=2]="ROUND_LOWEST",t[t.ROUND_NEAREST=3]="ROUND_NEAREST",t))(a||{}),u=(e=>(e[e.CURRENT_PRICE=1]="CURRENT_PRICE",e[e.COMPARE_AT_PRICE=2]="COMPARE_AT_PRICE",e))(u||{});export{u as DISCOUNT_BASE_TYPE,s as DISCOUNT_TYPE,o as DiscountOptions,r as ProductionsCombination,a as ROUND_SELECTED,i as RuleType};
|
|
2
|
+
//# sourceMappingURL=priceProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/CollectionsFilters/component/priceProps.ts"],
|
|
4
|
+
"sourcesContent": ["export enum RuleType {\n AUTO_FREE_GIFT = 1, // \u81EA\u52A8\u8D60\u54C1\n BUNDLE = 2, // \u7EC4\u5408\n VOLUME_DISCOUNT = 3, // \u91CF\u4EF7\u6298\u6263\n ORDER_DISCOUNT = 4, // \u8BA2\u5355\u6298\u6263\n PRICE_DISCOUNT = 5, // \u4EF7\u683C\u6298\u6263\n}\n\n\nexport type FunctionMemberPriceResult = {\n // \u662F\u5426\u5305\u542B\u4F1A\u5458\u4EF7\n hasMemberPrice: boolean\n // \u662F\u5426\u53EF\u4EE5\u53E0\u52A0\u5238\n useCoupon: boolean\n // \u539F\u4EF7\n originalPrice: number\n // \u539F\u4EF7\u5E26\u8D27\u5E01\u7B26\u53F7\n originalPriceWithCurrency: string\n // \u6298\u540E\u4EF7\n salePrice: number\n // \u6298\u540E\u4EF7\u5E26\u8D27\u5E01\u7B26\u53F7\n salePriceWithCurrency: string\n // \u4E0D\u4F7F\u7528\u5238\u7684\u6298\u540E\u4EF7\n salePriceWithoutCoupon: number\n // \u4E0D\u4F7F\u7528\u5238\u7684\u6298\u540E\u4EF7\u5E26\u8D27\u5E01\u7B26\u53F7\n salePriceWithoutCouponWithCurrency: string\n // \u5305\u542B\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePrice: number\n // \u5305\u542B\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\u5E26\u8D27\u5E01\u7B26\u53F7\n savePriceWithCurrency: string\n // \u4E0D\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePriceWithoutCoupon: number\n // \u4E0D\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\u5E26\u8D27\u5E01\u7B26\u53F7\n savePriceWithoutCouponWithCurrency: string\n}\n\nexport enum ProductionsCombination {\n SAME_PRODUCT, // \u76F8\u540C\u4EA7\u54C1\n SAME_VARIANT, // \u76F8\u540C\u53D8\u4F53\n MIX_MATCH, // \u7EC4\u5408\n}\n\nexport enum DiscountOptions {\n MINIMUM_QUANTITY = 1,\n FIXED_QUANTITY,\n TIERED_QUANTITY,\n}\n\nexport enum DISCOUNT_TYPE {\n PERCENTAGE = 1, // \u767E\u5206\u6BD4\n FIXED_AMOUNT, // \u56FA\u5B9A\u91D1\u989D\n FIXED_PRICE, // \u56FA\u5B9A\u4EF7\u683C\n}\n\nexport enum ROUND_SELECTED {\n ROUND_HIGHEST = 1, // \u5411\u4E0A\u53D6\u6574\n ROUND_LOWEST, // \u5411\u4E0B\u53D6\u6574\n ROUND_NEAREST, // \u56DB\u820D\u4E94\u5165\n}\n\nexport enum DISCOUNT_BASE_TYPE {\n CURRENT_PRICE = 1, // \u6298\u540E\u4EF7\n COMPARE_AT_PRICE = 2, // \u5404\u6E20\u9053\u62C9\u9F50\u7684\u539F\u4EF7\n}\n\n\nexport type TieredDiscount = {\n quantity: number //\u6570\u91CF\n discount: number //\u6298\u6263\n discount_type: DISCOUNT_TYPE\n}\n\n// \u5B9A\u4E49\u53D8\u4F53\u9879\u7C7B\u578B\ntype VariantItem = {\n variant_id: string // \u53D8\u4F53ID\n sku: string // \u5E93\u5B58\u5355\u4F4D\n handle: string // \u5904\u7406\u6807\u8BC6\n}\n\n// \u5B9A\u4E49\u89C4\u5219\u6761\u4EF6\u7C7B\u578B\nexport type RuleCondition = {\n with_special_url_params: string[] // \u5305\u542B\u7279\u6B8AURL\u53C2\u6570\n without_special_url_params: string[] // \u4E0D\u5305\u542B\u7279\u6B8AURL\u53C2\u6570\n with_user_tags: string[] // \u5305\u542B\u7528\u6237\u6807\u7B7E\n without_user_tags: string[] // \u4E0D\u5305\u542B\u7528\u6237\u6807\u7B7E\n}\n\n// \u4EF7\u683C\u8BA1\u7B97\u914D\u7F6E\uFF0C\u5C0F\u6570\u4F4D\u53D6\u820D\u89C4\u5219\nexport type DiscountConfig = {\n discount_type: DISCOUNT_TYPE\n discount_value: number\n price_ending_conf: {\n apply_price_ending: boolean\n conf_one_decimal_place: boolean\n conf_two_decimal_place: false\n one_decimal_place: number\n two_decimal_place: number\n round_selected: ROUND_SELECTED\n }\n}\n\n// function \u6298\u6263\u7C7B\u578B\u914D\u7F6E\u7684\u57FA\u7840\u7C7B\u578B\nexport type FunctionDiscountConfig = {\n // \u89C4\u5219ID\n rule_id: number\n // \u89C4\u5219\u7C7B\u578B\n rule_type: RuleType\n // \u6298\u6263\u6807\u7B7E\n discount_labels: {\n // \u8D2D\u7269\u8F66\u7ED3\u8D26\u6807\u7B7E\n cart_checkout_label: string\n // \u4EA7\u54C1\u6807\u7B7E\n product_label: string\n // \u552E\u7F44\u6807\u7B7E\n sold_out_label: string\n }\n // \u6298\u6263\u53EF\u7EC4\u5408\u89C4\u5219\n discount_combinations: {\n // \u662F\u5426\u4E0E\u5176\u4ED6\u8BA2\u5355\u6298\u6263\u7EC4\u5408\n other_order_discounts: boolean\n // \u662F\u5426\u4E0E\u5176\u4ED6\u4EA7\u54C1\u6298\u6263\u7EC4\u5408\n other_product_discounts: boolean\n // \u662F\u5426\u4E0E\u5176\u4ED6\u8FD0\u8D39\u6298\u6263\u7EC4\u5408\n shipping_discounts: boolean\n }\n // \u89C4\u5219\u6761\u4EF6\n rule_conditions: RuleCondition[]\n}\n\n// \u9636\u68AF\u6298\u6263\u7C7B\u578B\u914D\u7F6E\uFF08\u5C0Fb\uFF09\nexport type VolumeConfig = {\n // \u89C4\u5219\u7ED3\u679C\n result_detail: {\n //\u4EA7\u54C1\u53E0\u52A0\u8BA1\u6570\u89C4\u5219\n productions_combination: ProductionsCombination\n //\u6298\u6263\u5E94\u7528\u65B9\u5F0F\n discount_options: DiscountOptions\n //\u4E0D\u5305\u542B\u5B9A\u5236\u5316\u4EF7\u683C\n discount_exclude_customed_price: boolean //false.\u6298\u6263\u4E0D\u6392\u9664\u5B9A\u5236\u5316\u4EF7\u683C true.\u6298\u6263\u6392\u9664\u5B9A\u5236\u5316\u4EF7\u683C\n //\u6298\u6263\u9636\u68AF\u5217\u8868\uFF08\u5012\u5E8F\uFF0C\u4ECE\u5927\u5230\u5C0F\uFF09\n tiered_discounts: TieredDiscount[]\n main_product: {\n variant_list: VariantItem[] // \u53D8\u4F53\u5217\u8868\n all_store_variant: boolean // \u6240\u6709\u5546\u5E97\u53D8\u4F53\n }\n }\n} & FunctionDiscountConfig\n\nexport type FunctionMemberPriceConfig = {\n // \u89C4\u5219\u7ED3\u679C\n result_detail: {\n member_discounts: {\n main_products: {\n // \u6307\u5B9A\u751F\u6548\u7684 variant\n variants: {\n variant_id: string\n sku: string\n handle: string\n discount_value: number\n }[]\n // \u4E0D\u751F\u6548\u7684 variant\n skip_variants: {\n variant_id: string\n sku: string\n handle: string\n discount_value: number\n }[]\n // \u751F\u6548\u7684 variant \u7684\u52A8\u6001\u914D\u7F6E\u89C4\u5219\n dynamic_conf: {\n // \u5728\u6307\u5B9A collection \u4E2D\n in_collections?: string[]\n // \u4E0D\u5728\u6307\u5B9A collection \u4E2D\n not_in_collections?: string[]\n // \u5728\u6307\u5B9A\u4EA7\u54C1\u4E2D\n in_products?: string[]\n // \u4E0D\u5728\u6307\u5B9A\u4EA7\u54C1\u4E2D\n not_in_products?: string[]\n // SKU\u540D\u79F0\u89C4\u5219\n SKU: {\n // \u5FC5\u987B\u5728\u6307\u5B9ASKU\u8303\u56F4\u5185\n in?: string[]\n // \u5FC5\u987B\u4E0D\u5728\u6307\u5B9ASKU\u8303\u56F4\u5185\n not_in?: string[]\n // \u5FC5\u987B\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u5F00\u5934\n start_with?: string\n // \u5FC5\u987B\u4E0D\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u5F00\u5934\n notstart_with?: string\n // \u5FC5\u987B\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u7ED3\u675F\n end_with?: string\n // \u5FC5\u987B\u4E0D\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u7ED3\u675F\n unend_with?: string\n // \u5FC5\u987B\u5305\u542B\u6307\u5B9A\u5B57\u7B26\u4E32\n contain?: string\n // \u5FC5\u987B\u4E0D\u5305\u542B\u6307\u5B9A\u5B57\u7B26\u4E32\n uncontain?: string\n }\n }\n all_store_variant: boolean\n }\n discount_conf: DiscountConfig\n }[]\n limit_discount_max: number\n }\n} & FunctionDiscountConfig\n\n// \u76F4\u964D\u6298\u6263\nexport type PriceDiscountConfig = FunctionDiscountConfig & {\n result_detail: {\n main_product: {\n variant_list: {\n variant_id: string\n sku: string\n handle: string\n }[]\n all_store_variant: boolean\n }\n price_conf: {\n discount_type: DISCOUNT_TYPE\n discount_base: DISCOUNT_BASE_TYPE\n discount_amount: number\n price_ending_conf: {\n apply_price_ending: false\n one_decimal_place: number\n two_decimal_place: number\n round_selected: ROUND_SELECTED\n }\n }\n }\n}\n\nexport type ProductImage = {\n url: string\n alt?: string\n}\n\nexport type ProductOption = {\n __typename?: 'MultipleChoiceOption'\n id: string\n displayName: string\n values: ProductOptionValues[]\n}\n\nexport type ProductOptionValues = {\n label: string\n hexColors?: string[]\n}\n\nexport type ProductVariant = {\n id: string | number\n options: ProductOption[]\n availableForSale?: boolean\n quantityAvailable: number\n metafields?: Record<string, any>\n [key: string]: any\n}\n\nexport type ProductPrice = {\n value: number\n currencyCode?: 'USD' | 'EUR' | 'ARS' | string\n retailPrice?: number\n salePrice?: number\n listPrice?: number\n extendedSalePrice?: number\n extendedListPrice?: number\n}\n\nexport type Product = any & {\n id: string\n name: string\n description: string\n descriptionHtml?: string\n productType?: string\n sku?: string\n slug?: string\n handle?: string\n path?: string\n images: ProductImage[]\n variants: ProductVariant[]\n price: ProductPrice\n listPrice?: number\n options: ProductOption[]\n preRender?: string\n seo?: any\n metafields?: { [key: string]: any }\n}"],
|
|
5
|
+
"mappings": "AAAO,IAAKA,OACVA,IAAA,eAAiB,GAAjB,iBACAA,IAAA,OAAS,GAAT,SACAA,IAAA,gBAAkB,GAAlB,kBACAA,IAAA,eAAiB,GAAjB,iBACAA,IAAA,eAAiB,GAAjB,iBALUA,OAAA,IAoCAC,OACVA,IAAA,+BACAA,IAAA,+BACAA,IAAA,yBAHUA,OAAA,IAMAC,OACVA,IAAA,iBAAmB,GAAnB,mBACAA,IAAA,mCACAA,IAAA,qCAHUA,OAAA,IAMAC,OACVA,IAAA,WAAa,GAAb,aACAA,IAAA,+BACAA,IAAA,6BAHUA,OAAA,IAMAC,OACVA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,+BACAA,IAAA,iCAHUA,OAAA,IAMAC,OACVA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,iBAAmB,GAAnB,mBAFUA,OAAA",
|
|
6
|
+
"names": ["RuleType", "ProductionsCombination", "DiscountOptions", "DISCOUNT_TYPE", "ROUND_SELECTED", "DISCOUNT_BASE_TYPE"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type CollectionsFiltersProps = {
|
|
2
|
+
metafields: any;
|
|
3
|
+
result: any;
|
|
4
|
+
allResult: any;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
filterPrice: any;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
refreshStarRating?: () => void;
|
|
9
|
+
loadMore?: React.ReactNode;
|
|
10
|
+
noResultNode?: React.ReactNode;
|
|
11
|
+
data?: any;
|
|
12
|
+
onNextPage?: (v: string) => void;
|
|
13
|
+
onPrevPage?: (v: string) => void;
|
|
14
|
+
onFilteredChange?: (filtered: any) => void;
|
|
15
|
+
onSortAndReverseChange?: (sortKey: string, reverse: boolean) => void;
|
|
16
|
+
onPrimaryChange?: (item: any, sku: string) => void;
|
|
17
|
+
onSecondaryChange?: (item: any, sku: string) => void;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<CollectionsFiltersProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
20
|
+
className?: string;
|
|
21
|
+
data?: Record<string, any>;
|
|
22
|
+
} & import("react").RefAttributes<any>>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as l,jsxs as h}from"react/jsx-runtime";import $ from"./FilterList";import j from"./FilterHeader";import ee from"./FilterCardWrap";import{withLayout as te}from"../../shared/Styles.js";import oe from"./component/TabFilter";import{useState as o,useMemo as c,useEffect as O,useRef as w}from"react";import{handleSortKeyAndReverse as re,handleFilters as I,handleFilterOptions as ne,getComponentData as se}from"./component/filtersFun";function ae(L){const{data:i,result:n={},allResult:y={},loadMore:K=null,noResultNode:_=null,metafields:s={},filterPrice:v={},isLoading:b=!1,refreshStarRating:k,onFilteredChange:C,onSortAndReverseChange:M,onPrimaryChange:A,onSecondaryChange:V,onNextPage:z,onPrevPage:T}=L,{shop_filters_pair:a}=s,{data:F}=se(s,"FilterProduct"),[d,W]=o(!1),[E,P]=o(!1),[H,q]=o([]),[r,x]=o({}),[u,B]=o(0),[p,f]=o(1),[G,J]=o(!1),[Q,U]=o(!1),X=w(null),m=w(!1);c(()=>{const e=a?.filter_txt?.sortList,[t,Z]=re(e,u);M?.(t,Z)},[a?.filter_txt?.sortList,r,u]);const Y=e=>!e?.metafields?.seoSetting?.noindex,R=c(()=>y?.products?.filter(Y)?.length||0,[y?.products]),g=c(()=>ne(n,v,a,F),[v,n?.filters,a?.filter_txt?.offers?.name,a?.filter_txt?.offers?.onsale]),S=c(()=>g?.length?g?.map?.(e=>({...e,options:e?.options?.map?.(t=>({...t,checked:r?.[e?.value]?.indexOf?.(t?.value)>-1}))})):[],[r,g]),N=e=>{x?.({}),e&&f(1),C?.(I({}))},D=e=>{x(e),f(1),C?.(I(e))};return O(()=>{const t=(r?.offers||[])?.includes?.("onsale");J(t)},[r]),O(()=>{!m.current&&n?.products?.length&&(m.current=!0),m.current&&U(!0)},[n?.products]),h("div",{className:"size-full box-border",children:[l("div",{className:"laptop:mb-12 mb-6",children:l(oe,{tabs:i?.tabItems,filtered:r,filtersPair:S,filtersData:F,metafields:s,onTabClick:e=>D(e)})}),l(j,{total:R||0,metafields:s,closeFilter:d,sortKeyIndx:u,shopifyData:i,onSortChange:B,onCloseFilter:W,onClearFiltered:()=>N(),onMobileOpenDrawer:P}),h("div",{className:"flex-1 overflow-hidden tablet:flex desktop:gap-x-16 tablet:gap-x-8",children:[!d&&l($,{shopifyData:i,filtered:r,openOptions:H,closeFilter:d,filtersPair:S,mobileDrawerVisible:E,onFilteredChange:D,onClearFiltered:()=>N(!1),onOpenOptions:q,onCloseDrawer:P}),h("div",{className:"flex-1 overflow-y-auto relative",children:[l(ee,{page:p,result:n,shopifyData:i,total:R,isSale:G,ref:X,metafields:s,closeFilter:d,noResultNode:Q&&!b?_:null,refreshStarRating:k,onNextPage:e=>{f(p+1),z?.(e)},onPrevPage:e=>{f(p-1),T?.(e)},onPrimaryChange:(e,t)=>A?.(e,t),onSecondaryChange:(e,t)=>V?.(e,t)}),b&&K||null]})]})]})}var me=te(ae);export{me as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/CollectionsFilters/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import FilterList from './FilterList'\nimport FilterHeader from './FilterHeader'\nimport FilterCardWrap from './FilterCardWrap'\nimport { withLayout } from '../../shared/Styles.js'\nimport TabFilter from './component/TabFilter'\nimport { useState, useMemo, useEffect, useRef } from 'react'\nimport { handleSortKeyAndReverse, handleFilters, handleFilterOptions, getComponentData } from './component/filtersFun'\n\ntype CollectionsFiltersProps = {\n metafields: any\n result: any\n allResult: any\n pageSize?: number\n filterPrice: any\n isLoading?: boolean\n refreshStarRating?: () => void\n loadMore?: React.ReactNode\n noResultNode?: React.ReactNode\n data?: any\n onNextPage?: (v: string) => void\n onPrevPage?: (v: string) => void\n onFilteredChange?: (filtered: any) => void\n onSortAndReverseChange?: (sortKey: string, reverse: boolean) => void\n onPrimaryChange?: (item: any, sku: string) => void\n onSecondaryChange?: (item: any, sku: string) => void\n}\nfunction CollectionsFilters(props: CollectionsFiltersProps) {\n const {\n data,\n result = {},\n allResult = {},\n loadMore = null,\n noResultNode = null,\n metafields = {},\n filterPrice = {},\n isLoading = false,\n refreshStarRating,\n onFilteredChange,\n onSortAndReverseChange,\n onPrimaryChange,\n onSecondaryChange,\n onNextPage,\n onPrevPage,\n } = props\n\n const { shop_filters_pair } = metafields\n\n const { data: filterProductData } = getComponentData(metafields, 'FilterProduct')\n\n const [closeFilter, setCloseFilter] = useState<boolean>(false)\n const [mobileDrawerVisible, setMobileDrawerVisible] = useState<boolean>(false) // \u79FB\u52A8\u7AEF\u7B5B\u9009\u9009\u9879\u5C55\u793A\u72B6\u6001\n const [openOptions, setOpenOptions] = useState<any[]>([]) // \u5C55\u5F00\u7684\u7B5B\u9009\u9879\n const [filtered, setFiltered] = useState<any>({}) // \u9009\u62E9\u7684\u7B5B\u9009\u9009\u9879\n const [sortKeyIndx, setSortKeyIndx] = useState<number>(0) // \u6392\u5E8F\u65B9\u5F0F\n const [currentPage, setCurrentPage] = useState<number>(1)\n const [isSale, setIsSale] = useState<boolean>(false)\n const [isRefresh, setIsRefresh] = useState<boolean>(false)\n\n const filterCardWrapRef = useRef<any>(null)\n const initRefresh = useRef<boolean>(false)\n\n // \u5904\u7406\u6392\u5E8F\u6570\u636E\n useMemo(() => {\n const sortList = shop_filters_pair?.filter_txt?.sortList\n const [sortKey, reverse] = handleSortKeyAndReverse(sortList, sortKeyIndx)\n onSortAndReverseChange?.(sortKey, reverse)\n }, [shop_filters_pair?.filter_txt?.sortList, filtered, sortKeyIndx])\n\n const hasNoIndex = (product: { metafields: { seoSetting: { noindex: any } } }) => {\n return !product?.metafields?.seoSetting?.noindex\n }\n const totalCount = useMemo(() => {\n return allResult?.products?.filter(hasNoIndex)?.length || 0\n }, [allResult?.products])\n\n // \u5904\u7406\u7B5B\u9009\u9879\u6570\u636E\n const filtersOptions = useMemo(() => {\n return handleFilterOptions(result, filterPrice, shop_filters_pair, filterProductData)\n }, [\n filterPrice,\n result?.filters,\n shop_filters_pair?.filter_txt?.offers?.name,\n shop_filters_pair?.filter_txt?.offers?.onsale,\n ])\n\n const filtersPair = useMemo(() => {\n if (!filtersOptions?.length) return []\n return filtersOptions?.map?.((filter: any) => {\n return {\n ...filter,\n options: filter?.options?.map?.((opt: any) => {\n return {\n ...opt,\n checked: filtered?.[filter?.value]?.indexOf?.(opt?.value) > -1,\n }\n }),\n }\n })\n }, [filtered, filtersOptions])\n\n\n const clearFiltered = (flag?: boolean) => {\n setFiltered?.({})\n if (flag) {\n setCurrentPage(1)\n }\n onFilteredChange?.(handleFilters({}))\n }\n\n const filterChange = (v: any) => {\n setFiltered(v)\n setCurrentPage(1)\n onFilteredChange?.(handleFilters(v))\n }\n\n useEffect(() => {\n const offers = filtered?.offers || []\n const isShowSale = offers?.includes?.('onsale')\n setIsSale(isShowSale)\n }, [filtered])\n\n useEffect(() => {\n if (!initRefresh.current && result?.products?.length) {\n initRefresh.current = true\n }\n if (initRefresh.current) {\n setIsRefresh(true)\n }\n }, [result?.products])\n\n return (\n <div className=\"size-full box-border\">\n {/* \u5934\u90E8 */}\n <div className=\"laptop:mb-12 mb-6\">\n <TabFilter\n tabs={data?.tabItems}\n filtered={filtered}\n filtersPair={filtersPair}\n filtersData={filterProductData}\n metafields={metafields}\n onTabClick={v => filterChange(v)}\n />\n </div>\n <FilterHeader\n total={totalCount || 0}\n metafields={metafields}\n closeFilter={closeFilter}\n sortKeyIndx={sortKeyIndx}\n shopifyData={data}\n onSortChange={setSortKeyIndx}\n onCloseFilter={setCloseFilter}\n onClearFiltered={() => clearFiltered()}\n onMobileOpenDrawer={setMobileDrawerVisible}\n />\n {/* PC\u7B5B\u9009\u9009\u9879 */}\n <div className=\"flex-1 overflow-hidden tablet:flex desktop:gap-x-16 tablet:gap-x-8\">\n {!closeFilter && (\n <FilterList\n shopifyData={data}\n filtered={filtered}\n openOptions={openOptions}\n closeFilter={closeFilter}\n filtersPair={filtersPair}\n mobileDrawerVisible={mobileDrawerVisible}\n onFilteredChange={filterChange}\n onClearFiltered={() => clearFiltered(false)}\n onOpenOptions={setOpenOptions}\n onCloseDrawer={setMobileDrawerVisible}\n />\n )}\n <div className=\"flex-1 overflow-y-auto relative\">\n <FilterCardWrap\n page={currentPage}\n result={result}\n shopifyData={data}\n total={totalCount}\n isSale={isSale}\n ref={filterCardWrapRef}\n metafields={metafields}\n closeFilter={closeFilter}\n noResultNode={isRefresh && !isLoading ? noResultNode : null}\n refreshStarRating={refreshStarRating}\n onNextPage={v => {\n setCurrentPage(currentPage + 1)\n onNextPage?.(v)\n }}\n onPrevPage={v => {\n setCurrentPage(currentPage - 1)\n onPrevPage?.(v)\n }}\n onPrimaryChange={(e, data) => onPrimaryChange?.(e, data)}\n onSecondaryChange={(e, data) => onSecondaryChange?.(e, data)}\n />\n {isLoading ? loadMore || null : null}\n </div>\n </div>\n </div>\n )\n}\n\nexport default withLayout(CollectionsFilters)"],
|
|
5
|
+
"mappings": "AAsIQ,cAAAA,EAoCA,QAAAC,MApCA,oBAtIR,OAAOC,MAAgB,eACvB,OAAOC,MAAkB,iBACzB,OAAOC,OAAoB,mBAC3B,OAAS,cAAAC,OAAkB,yBAC3B,OAAOC,OAAe,wBACtB,OAAS,YAAAC,EAAU,WAAAC,EAAS,aAAAC,EAAW,UAAAC,MAAc,QACrD,OAAS,2BAAAC,GAAyB,iBAAAC,EAAe,uBAAAC,GAAqB,oBAAAC,OAAwB,yBAoB9F,SAASC,GAAmBC,EAAgC,CAC1D,KAAM,CACJ,KAAAC,EACA,OAAAC,EAAS,CAAC,EACV,UAAAC,EAAY,CAAC,EACb,SAAAC,EAAW,KACX,aAAAC,EAAe,KACf,WAAAC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b,SAAUuB,EACV,YAAaF,EACb,YAAaJ,EACb,YAAayB,EACb,oBAAqBvB,EACrB,iBAAkB4B,EAClB,gBAAiB,IAAMF,EAAc,EAAK,EAC1C,cAAevB,EACf,cAAeF,EACjB,EAEFpC,EAAC,OAAI,UAAU,kCACb,UAAAD,EAACI,GAAA,CACC,KAAMwC,EACN,OAAQ1B,EACR,YAAaD,EACb,MAAOwC,EACP,OAAQX,EACR,IAAKI,EACL,WAAY5B,EACZ,YAAaY,EACb,aAAcc,GAAa,CAACxB,EAAYH,EAAe,KACvD,kBAAmBI,EACnB,WAAYwC,GAAK,CACfpB,EAAeD,EAAc,CAAC,EAC9Bd,IAAamC,CAAC,CAChB,EACA,WAAYA,GAAK,CACfpB,EAAeD,EAAc,CAAC,EAC9Bb,IAAakC,CAAC,CAChB,EACA,gBAAiB,CAAC,EAAGhD,IAASW,IAAkB,EAAGX,CAAI,EACvD,kBAAmB,CAAC,EAAGA,IAASY,IAAoB,EAAGZ,CAAI,EAC7D,EACCO,GAAYJ,GAAY,MAC3B,GACF,GACF,CAEJ,CAEA,IAAO+C,GAAQ9D,GAAWU,EAAkB",
|
|
6
|
+
"names": ["jsx", "jsxs", "FilterList", "FilterHeader", "FilterCardWrap", "withLayout", "TabFilter", "useState", "useMemo", "useEffect", "useRef", "handleSortKeyAndReverse", "handleFilters", "handleFilterOptions", "getComponentData", "CollectionsFilters", "props", "data", "result", "allResult", "loadMore", "noResultNode", "metafields", "filterPrice", "isLoading", "refreshStarRating", "onFilteredChange", "onSortAndReverseChange", "onPrimaryChange", "onSecondaryChange", "onNextPage", "onPrevPage", "shop_filters_pair", "filterProductData", "closeFilter", "setCloseFilter", "mobileDrawerVisible", "setMobileDrawerVisible", "openOptions", "setOpenOptions", "filtered", "setFiltered", "sortKeyIndx", "setSortKeyIndx", "currentPage", "setCurrentPage", "isSale", "setIsSale", "isRefresh", "setIsRefresh", "filterCardWrapRef", "initRefresh", "sortList", "sortKey", "reverse", "hasNoIndex", "product", "totalCount", "filtersOptions", "filtersPair", "filter", "opt", "clearFiltered", "flag", "filterChange", "v", "isShowSale", "CollectionsFilters_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
export type DownLoadDataType = {
|
|
3
|
+
title: string;
|
|
4
|
+
text: string;
|
|
5
|
+
time: string;
|
|
6
|
+
link: string;
|
|
7
|
+
line: Img;
|
|
8
|
+
icon: Img;
|
|
9
|
+
};
|
|
10
|
+
type DownLoadType = {
|
|
11
|
+
data: {
|
|
12
|
+
list: DownLoadDataType[];
|
|
13
|
+
};
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<DownLoadType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
17
|
+
className?: string;
|
|
18
|
+
data?: Record<string, any>;
|
|
19
|
+
} & import("react").RefAttributes<any>>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as d,jsx as t,jsxs as p}from"react/jsx-runtime";import"../../helpers/utils.js";import{withLayout as n}from"../../shared/Styles.js";import{Text as l,Link as x}from"../../components/index.js";const r=a=>{const{data:o}=a,{list:i}=o;return t(d,{children:t("div",{className:"bg-[#EAEAEC] rounded-2xl w-full p-[12px] flex flex-col gap-[12px]",children:i?.map((e,s)=>t("div",{className:"w-full",children:p("div",{className:"w-full flex items-center justify-between py-[12px] px-[24px]",children:[p("div",{className:"flex items-center flex-row laptop:gap-[24px] gap-[12px]",children:[t(l,{html:e?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"}),t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"17",viewBox:"0 0 2 17",fill:"none",children:t("path",{d:"M1 0.5V16.5",stroke:"#3D3D3F"})}),t(l,{html:e?.text,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]}),p(x,{href:e?.link,target:"_blank",className:"flex items-center justify-center flex-row laptop:gap-[24px] gap-[4px]",children:[t(l,{html:e?.time,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"}),t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:t("path",{d:"M21 11.5C21.5523 11.5 22 11.9477 22 12.5V18.5C22 20.1569 20.6569 21.5 19 21.5H5C3.34315 21.5 2 20.1569 2 18.5V12.5C2 11.9477 2.44772 11.5 3 11.5C3.55228 11.5 4 11.9477 4 12.5V18.5C4 19.0523 4.44772 19.5 5 19.5H19C19.5523 19.5 20 19.0523 20 18.5V12.5C20 11.9477 20.4477 11.5 21 11.5ZM12.0039 2.25391C12.5562 2.25391 13.0039 2.70162 13.0039 3.25391V13.4736L16.4893 9.98828C16.8798 9.59777 17.5128 9.59779 17.9033 9.98828C18.2938 10.3788 18.2938 11.0118 17.9033 11.4023L13.4541 15.8516C12.6471 16.6583 11.3392 16.6582 10.5322 15.8516L6.08984 11.4092C5.69932 11.0187 5.69932 10.3856 6.08984 9.99512C6.48037 9.60466 7.11341 9.60462 7.50391 9.99512L11.0039 13.4951V3.25391C11.0039 2.70162 11.4516 2.25391 12.0039 2.25391Z",fill:"#1D1D1F"})})]})]})},s))})})};var v=n(r);export{v as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/DownLoad/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text ,Link} from '../../components/index.js'\n\nexport type DownLoadDataType = {\n title: string\n text: string\n time: string\n link: string\n line: Img\n icon: Img\n}\n\ntype DownLoadType = {\n data: {\n list:DownLoadDataType[]\n }\n className?: string\n}\n\nconst DownLoad = (props: DownLoadType) => {\n const { data } = props\n const { list } = data\n\n return (\n <>\n <div className=\"bg-[#EAEAEC] rounded-2xl w-full p-[12px] flex flex-col gap-[12px]\">\n {list?.map((item, index) => (\n <div key={index} className=\"w-full\">\n <div className=\"w-full flex items-center justify-between py-[12px] px-[24px]\">\n <div className=\"flex items-center flex-row laptop:gap-[24px] gap-[12px]\">\n <Text\n html={item?.title}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n {/* <Picture\n className=\"h-[16px]\"\n source={item.line?.url}\n alt={item.line?.alt || ''}\n /> */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2\" height=\"17\" viewBox=\"0 0 2 17\" fill=\"none\">\n <path d=\"M1 0.5V16.5\" stroke=\"#3D3D3F\"/>\n </svg>\n <Text\n html={item?.text}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n </div>\n\n <Link\n href={item?.link}\n target=\"_blank\"\n className=\"flex items-center justify-center flex-row laptop:gap-[24px] gap-[4px]\"\n >\n <Text\n html={item?.time}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n {/* <Picture\n className=\"w-[24px]\"\n imgClassName=\"w-full h-auto\"\n source={item.icon?.url}\n alt={item.icon?.alt || ''}\n /> */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <path d=\"M21 11.5C21.5523 11.5 22 11.9477 22 12.5V18.5C22 20.1569 20.6569 21.5 19 21.5H5C3.34315 21.5 2 20.1569 2 18.5V12.5C2 11.9477 2.44772 11.5 3 11.5C3.55228 11.5 4 11.9477 4 12.5V18.5C4 19.0523 4.44772 19.5 5 19.5H19C19.5523 19.5 20 19.0523 20 18.5V12.5C20 11.9477 20.4477 11.5 21 11.5ZM12.0039 2.25391C12.5562 2.25391 13.0039 2.70162 13.0039 3.25391V13.4736L16.4893 9.98828C16.8798 9.59777 17.5128 9.59779 17.9033 9.98828C18.2938 10.3788 18.2938 11.0118 17.9033 11.4023L13.4541 15.8516C12.6471 16.6583 11.3392 16.6582 10.5322 15.8516L6.08984 11.4092C5.69932 11.0187 5.69932 10.3856 6.08984 9.99512C6.48037 9.60466 7.11341 9.60462 7.50391 9.99512L11.0039 13.4951V3.25391C11.0039 2.70162 11.4516 2.25391 12.0039 2.25391Z\" fill=\"#1D1D1F\"/>\n </svg>\n </Link>\n </div>\n </div>\n ))}\n</div>\n\n </>\n )\n}\n\nexport default withLayout(DownLoad)\n"],
|
|
5
|
+
"mappings": "aA2BI,mBAAAA,EAMU,OAAAC,EADF,QAAAC,MALR,oBA1BJ,MAAmB,yBAEnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAkB,QAAAC,EAAM,QAAAC,MAAW,4BAkBnC,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,CAAK,EAAID,EACX,CAAE,KAAAE,CAAK,EAAID,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAC,EAAC,OAAI,UAAU,oEACd,SAAAQ,GAAM,IAAI,CAACC,EAAMC,IAChBV,EAAC,OAAgB,UAAU,SACzB,SAAAC,EAAC,OAAI,UAAU,+DACb,UAAAA,EAAC,OAAI,UAAU,0DACb,UAAAD,EAACG,EAAA,CACC,KAAMM,GAAM,MACZ,UAAU,yDACZ,EAMAT,EAAC,OAAI,MAAM,6BAA6B,MAAM,IAAI,OAAO,KAAK,QAAQ,WAAW,KAAK,OACpF,SAAAA,EAAC,QAAK,EAAE,cAAc,OAAO,UAAS,EACxC,EACAA,EAACG,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,yDACZ,GACF,EAEAR,EAACG,EAAA,CACC,KAAMK,GAAM,KACZ,OAAO,SACP,UAAU,wEAEV,UAAAT,EAACG,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,yDACZ,EAOAT,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QAAK,EAAE,8sBAA8sB,KAAK,UAAS,EACtuB,GACF,GACF,GAxCQU,CAyCV,CACL,EACH,EAEI,CAEJ,EAEA,IAAOC,EAAQT,EAAWG,CAAQ",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "withLayout", "Text", "Link", "DownLoad", "props", "data", "list", "item", "index", "DownLoad_default"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t,jsxs as d}from"react/jsx-runtime";import c,{useImperativeHandle as v,useRef as f,useState as x}from"react";import{Text as l}from"../../components/index.js";import{cn as i}from"../../helpers/index.js";import{withLayout as g}from"../../shared/Styles.js";const n=c.forwardRef(({data:a,className:e},o)=>{const s=f(null);return v(o,()=>s.current),t("div",{ref:s,className:i(e),children:t("div",{children:a?.productData?.map((m,p)=>t(r,{data:m},p))})})});n.displayName="Faq";const r=({data:a})=>{const[e,o]=x(!1);return t("div",{className:"tablet:py-6 border-b border-[#E4E5E6] py-4",children:d("div",{children:[d("div",{onClick:()=>{o(!e)},className:"tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-4",children:[t(l,{html:a?.title,className:"desktop:text-base lg-desktop:text-lg text-sm font-bold leading-[1.4] text-[#1D1D1F]"}),t("div",{className:" transition-transform duration-300",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:i("w-[20px] transition-transform duration-300",e&&"rotate-180"),width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",children:t("path",{d:"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z",fill:"#1D1D1F"})})})]}),t("div",{className:i("overflow-hidden transition-all duration-300",e?"mt-2 max-h-[500px] opacity-100":"max-h-0 opacity-0"),children:t(l,{html:a?.desc,className:"desktop:text-base lg-desktop:text-lg text-sm font-bold leading-[1.4] text-[#6D6D6F]"})})]})})};r.displayName="FaqItem";var F=g(n);export{r as FaqItem,F as default};
|
|
2
2
|
//# sourceMappingURL=Faq.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Faq/Faq.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport type { FaqProps, FaqItem as ItemType } from './types.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useState", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport type { FaqProps, FaqItem as ItemType } from './types.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(({ data, className }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n return (\n <div ref={innerRef} className={cn(className)}>\n <div>{data?.productData?.map((item: any, index: number) => <FaqItem key={index} data={item} />)}</div>\n </div>\n )\n})\n\nFaq.displayName = 'Faq'\n\nconst FaqItem = ({ data }: { data: ItemType }) => {\n const [open, setOpen] = useState(false)\n\n const handleToggle = () => {\n setOpen(!open)\n }\n\n return (\n <div className=\"tablet:py-6 border-b border-[#E4E5E6] py-4\">\n <div>\n <div\n onClick={handleToggle}\n className=\"tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-4\"\n >\n <Text\n html={data?.title}\n className=\"desktop:text-base lg-desktop:text-lg text-sm font-bold leading-[1.4] text-[#1D1D1F]\"\n />\n <div className=\" transition-transform duration-300\">\n {/* <Picture\n source={data?.img?.url}\n className={cn('w-[20px] transition-transform duration-300', open && 'rotate-180')}\n /> */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" className={cn('w-[20px] transition-transform duration-300', open && 'rotate-180')} width=\"20\" height=\"21\" viewBox=\"0 0 20 21\" fill=\"none\">\n <path d=\"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z\" fill=\"#1D1D1F\"/>\n </svg>\n </div>\n </div>\n\n {/* \u5E26\u8FC7\u6E21\u7684\u5185\u5BB9\u533A\u57DF */}\n <div\n className={cn(\n 'overflow-hidden transition-all duration-300',\n open ? 'mt-2 max-h-[500px] opacity-100' : 'max-h-0 opacity-0'\n )}\n >\n <Text\n html={data?.desc}\n className=\"desktop:text-base lg-desktop:text-lg text-sm font-bold leading-[1.4] text-[#6D6D6F]\"\n />\n </div>\n </div>\n </div>\n )\n}\n\nFaqItem.displayName = 'FaqItem'\n\nexport default withLayout(Faq)\nexport { FaqItem }\n"],
|
|
5
|
+
"mappings": "aAaiE,cAAAA,EAiBzD,QAAAC,MAjByD,oBAZjE,OAAOC,GAAS,uBAAAC,EAAqB,UAAAC,EAAQ,YAAAC,MAAgB,QAE7D,OAAkB,QAAAC,MAAY,4BAC9B,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAE3B,MAAMC,EAAMP,EAAM,WAAqC,CAAC,CAAE,KAAAQ,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnF,MAAMC,EAAWT,EAAuB,IAAI,EAC5C,OAAAD,EAAoBS,EAAK,IAAMC,EAAS,OAAQ,EAG9Cb,EAAC,OAAI,IAAKa,EAAU,UAAWN,EAAGI,CAAS,EACzC,SAAAX,EAAC,OAAK,SAAAU,GAAM,aAAa,IAAI,CAACI,EAAWC,IAAkBf,EAACgB,EAAA,CAAoB,KAAMF,GAAbC,CAAmB,CAAE,EAAE,EAClG,CAEJ,CAAC,EAEDN,EAAI,YAAc,MAElB,MAAMO,EAAU,CAAC,CAAE,KAAAN,CAAK,IAA0B,CAChD,KAAM,CAACO,EAAMC,CAAO,EAAIb,EAAS,EAAK,EAMtC,OACEL,EAAC,OAAI,UAAU,6CACb,SAAAC,EAAC,OACC,UAAAA,EAAC,OACC,QARa,IAAM,CACzBiB,EAAQ,CAACD,CAAI,CACf,EAOQ,UAAU,4EAEV,UAAAjB,EAACM,EAAA,CACC,KAAMI,GAAM,MACZ,UAAU,sFACZ,EACAV,EAAC,OAAI,UAAU,qCAKb,SAAAA,EAAC,OAAI,MAAM,6BAA6B,UAAWO,EAAG,6CAA8CU,GAAQ,YAAY,EAAG,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACzK,SAAAjB,EAAC,QAAK,EAAE,kUAAkU,KAAK,UAAS,EAC1V,EACF,GACF,EAGAA,EAAC,OACC,UAAWO,EACT,8CACAU,EAAO,iCAAmC,mBAC5C,EAEA,SAAAjB,EAACM,EAAA,CACC,KAAMI,GAAM,KACZ,UAAU,sFACZ,EACF,GACF,EACF,CAEJ,EAEAM,EAAQ,YAAc,UAEtB,IAAOG,EAAQX,EAAWC,CAAG",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useState", "Text", "cn", "withLayout", "Faq", "data", "className", "ref", "innerRef", "item", "index", "FaqItem", "open", "setOpen", "Faq_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
export type FeaturesDataType = {
|
|
3
|
+
img: Img;
|
|
4
|
+
mobileImg: Img;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
numberOne: string;
|
|
8
|
+
textOne: string;
|
|
9
|
+
numberTwo: string;
|
|
10
|
+
textTwo: string;
|
|
11
|
+
icon: Img;
|
|
12
|
+
};
|
|
13
|
+
type FeaturesType = {
|
|
14
|
+
data: {
|
|
15
|
+
title: string;
|
|
16
|
+
img: Img;
|
|
17
|
+
mobileImg: Img;
|
|
18
|
+
list: FeaturesDataType[];
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<FeaturesType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
23
|
+
className?: string;
|
|
24
|
+
data?: Record<string, any>;
|
|
25
|
+
} & import("react").RefAttributes<any>>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as n,jsx as t,jsxs as a}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as r}from"../../shared/Styles.js";import{Picture as p,Text as s}from"../../components/index.js";const x=d=>{const{data:l,className:g}=d,{list:i}=l;return t(n,{children:a("div",{className:"",children:[l?.title&&t("div",{className:"pb-[24px] desktop:w-[800px]",children:t(s,{html:l?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),l?.img?.url&&t(p,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),l?.mobileImg?.url&&t(p,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""}),t("div",{className:"",children:t("div",{className:"flex flex-col gap-4",children:i.map((e,o)=>a("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${o%2===0?"laptop:flex-row-reverse":""}`,children:[a("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[t(s,{html:e?.title,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),t(s,{html:e?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),e?.numberOne&&a("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[a("div",{className:"",children:[t(s,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(s,{html:e?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),a("div",{children:[t(s,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(s,{html:e?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),e?.icon?.url&&t("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:t(p,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),t("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:t(p,{className:"w-full h-full object-cover ",source:e?.img?.url,alt:e?.img?.alt||""})}),t("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:t(p,{className:"w-full h-full object-cover",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})})]},o))})})]})})};var f=r(x);export{f as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/Features/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=''>\n {data?.title && (\n <div className='pb-[24px] desktop:w-[800px]'>\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=''>\n <div className='flex flex-col gap-4'>\n {list.map((item, index) => (\n <div key={index} className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}>\n <div className='flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]'>\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && \n <div className='desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]'>\n <div className=''>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n \n \n </div>\n }\n {item?.icon?.url && \n <div className='pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]'><Picture className='w-[358px] desktop:w-[368px] lg-desktop:w-[488px]' source={item?.icon?.url} alt={item?.icon?.alt || ''} /></div>\n }\n </div>\n <div className='aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]'>\n <Picture className='w-full h-full object-cover ' source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className='aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]'>\n <Picture className='w-full h-full object-cover' source={item?.mobileImg?.url} alt={item?.mobileImg?.alt || ''} />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
|
|
5
|
+
"mappings": "aAkCI,mBAAAA,EAIQ,OAAAC,EAuCgB,QAAAC,MA3CxB,oBAjCJ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAwB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAU,GACZ,UAAAM,GAAM,OACHP,EAAC,OAAI,UAA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KA,GAAM,MAAM,KAAO,GAAI,EAAE,GAEnM,EACAV,EAAC,OAAI,UAAU,4GACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,8BAA8B,OAAQO,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EACxG,EACAV,EAAC,OAAI,UAAU,uEACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,6BAA6B,OAAQO,GAAM,WAAW,IAAK,IAAKA,GAAM,WAAW,KAAO,GAAI,EACnH,IA5DMC,CA6DV,CACH,EACL,EACA,GACF,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAQ",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "withLayout", "Picture", "Text", "Features", "props", "data", "className", "list", "item", "index", "Features_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type FootChargerType = {
|
|
2
|
+
data: {
|
|
3
|
+
title: string;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<FootChargerType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
data?: Record<string, any>;
|
|
11
|
+
} & import("react").RefAttributes<any>>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as l,jsx as t,jsxs as m}from"react/jsx-runtime";import"../../helpers/utils.js";import{withLayout as i}from"../../shared/Styles.js";import{Text as e}from"../../components/index.js";const p=o=>{const{data:s}=o,{title:a,text:r}=s;return t(l,{children:m("div",{className:"",children:[t("div",{children:t(e,{html:a,className:"text-[#6D6D6F] font-bold leading-[1.4] [&_span]:text-[#1D1D1F] text-[16px] desktop:text-[18px]"})}),t("div",{className:"mt-[24px]",children:t(e,{html:r,className:"text-[#3D3D3F] [&_*_strong]:!font-bold leading-[1.4] text-[14px]"})})]})})};var f=i(p);export{f as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|