@anker-in/headless-ui 1.3.56 → 1.3.58
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/AccessoriesShelf/components/AccessoriesProductGrid/index.d.ts +11 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.d.ts +23 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/index.d.ts +40 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/types.d.ts +107 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AddToCartSuccessPopover/index.d.ts +82 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AddToCartSuccessPopover/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/AddToCartSuccessPopover/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/MainProductArea/index.d.ts +22 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/MainProductArea/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/MainProductArea/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/PromoBanner/index.d.ts +10 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/PromoBanner/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/PromoBanner/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/SectionHeader/index.d.ts +9 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/SectionHeader/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/components/SectionHeader/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/index.d.ts +9 -0
- package/dist/cjs/biz-components/AccessoriesShelf/index.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/index.js.map +7 -0
- package/dist/cjs/biz-components/AccessoriesShelf/types.d.ts +16 -0
- package/dist/cjs/biz-components/AccessoriesShelf/types.js +2 -0
- package/dist/cjs/biz-components/AccessoriesShelf/types.js.map +7 -0
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.js +1 -1
- package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.js.map +2 -2
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/CartGiftSection.d.ts +15 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/CartGiftSection.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/CartGiftSection.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/GiftConfirmDialog.d.ts +11 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/GiftConfirmDialog.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/GiftConfirmDialog.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/GiftOptionRow.d.ts +14 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/GiftOptionRow.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/GiftOptionRow.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartGiftSection/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/CartItemRow.d.ts +56 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/CartItemRow.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/CartItemRow.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/CartItemGiftShipping.d.ts +4 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/CartItemGiftShipping.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/CartItemGiftShipping.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/types.d.ts +10 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/types.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/types.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemInfo/CartItemInfo.d.ts +11 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemInfo/CartItemInfo.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemInfo/CartItemInfo.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemInfo/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemInfo/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemInfo/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemKsp/CartItemKsp.d.ts +13 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemKsp/CartItemKsp.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemKsp/CartItemKsp.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemKsp/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemKsp/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemKsp/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/CartItemRemoveConfirm.d.ts +4 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/CartItemRemoveConfirm.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/CartItemRemoveConfirm.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/types.d.ts +11 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/types.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/types.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemShipping/CartItemShipping.d.ts +8 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemShipping/CartItemShipping.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemShipping/CartItemShipping.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemShipping/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemShipping/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/components/CartItemShipping/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartItemRow/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartPerksSection/CartPerksSection.d.ts +34 -0
- package/dist/cjs/biz-components/CartDetail/CartPerksSection/CartPerksSection.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartPerksSection/CartPerksSection.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartPerksSection/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartPerksSection/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartPerksSection/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartPriceSummary/CartPriceSummary.d.ts +49 -0
- package/dist/cjs/biz-components/CartDetail/CartPriceSummary/CartPriceSummary.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartPriceSummary/CartPriceSummary.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartPriceSummary/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartPriceSummary/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartPriceSummary/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartSummaryHeader/CartSummaryHeader.d.ts +26 -0
- package/dist/cjs/biz-components/CartDetail/CartSummaryHeader/CartSummaryHeader.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartSummaryHeader/CartSummaryHeader.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartSummaryHeader/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartSummaryHeader/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartSummaryHeader/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartThirdParty/CartThirdParty.d.ts +10 -0
- package/dist/cjs/biz-components/CartDetail/CartThirdParty/CartThirdParty.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartThirdParty/CartThirdParty.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/CartThirdParty/index.d.ts +2 -0
- package/dist/cjs/biz-components/CartDetail/CartThirdParty/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/CartThirdParty/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/index.d.ts +16 -0
- package/dist/cjs/biz-components/CartDetail/index.js +2 -0
- package/dist/cjs/biz-components/CartDetail/index.js.map +7 -0
- package/dist/cjs/biz-components/CartDetail/types.d.ts +132 -0
- package/dist/cjs/biz-components/CartDetail/types.js +2 -0
- package/dist/cjs/biz-components/CartDetail/types.js.map +7 -0
- package/dist/cjs/biz-components/CreditsShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/CreditsShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +2 -2
- package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/MediaShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/MediaShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/SceneShelf/ProductsPanel.js +1 -1
- package/dist/cjs/biz-components/SceneShelf/ProductsPanel.js.map +2 -2
- package/dist/cjs/biz-components/SceneShelfV2/index.js +1 -1
- package/dist/cjs/biz-components/SceneShelfV2/index.js.map +2 -2
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js +1 -1
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +2 -2
- package/dist/cjs/biz-components/index.d.ts +6 -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/index.d.ts +3 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/input-number.d.ts +22 -0
- package/dist/cjs/components/input-number.js +1 -1
- package/dist/cjs/components/input-number.js.map +3 -3
- package/dist/cjs/components/input.d.ts +5 -0
- package/dist/cjs/components/input.js +1 -1
- package/dist/cjs/components/input.js.map +3 -3
- package/dist/cjs/components/popover.d.ts +17 -2
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +3 -3
- package/dist/cjs/components/toast.d.ts +25 -0
- package/dist/cjs/components/toast.js +2 -0
- package/dist/cjs/components/toast.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.d.ts +11 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.d.ts +23 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/index.d.ts +40 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/types.d.ts +107 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js +1 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AddToCartSuccessPopover/index.d.ts +82 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AddToCartSuccessPopover/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/AddToCartSuccessPopover/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/MainProductArea/index.d.ts +22 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/MainProductArea/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/MainProductArea/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/PromoBanner/index.d.ts +10 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/PromoBanner/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/PromoBanner/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/SectionHeader/index.d.ts +9 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/SectionHeader/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/components/SectionHeader/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/index.d.ts +9 -0
- package/dist/esm/biz-components/AccessoriesShelf/index.js +2 -0
- package/dist/esm/biz-components/AccessoriesShelf/index.js.map +7 -0
- package/dist/esm/biz-components/AccessoriesShelf/types.d.ts +16 -0
- package/dist/esm/biz-components/AccessoriesShelf/types.js +1 -0
- package/dist/esm/biz-components/AccessoriesShelf/types.js.map +7 -0
- package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.js +1 -1
- package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.js.map +2 -2
- package/dist/esm/biz-components/CartDetail/CartGiftSection/CartGiftSection.d.ts +15 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/CartGiftSection.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/CartGiftSection.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/GiftConfirmDialog.d.ts +11 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/GiftConfirmDialog.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/GiftConfirmDialog.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftConfirmDialog/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/GiftOptionRow.d.ts +14 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/GiftOptionRow.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/GiftOptionRow.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/components/GiftOptionRow/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartGiftSection/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/CartItemRow.d.ts +56 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/CartItemRow.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/CartItemRow.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/CartItemGiftShipping.d.ts +4 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/CartItemGiftShipping.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/CartItemGiftShipping.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/types.d.ts +10 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/types.js +1 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemGiftShipping/types.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemInfo/CartItemInfo.d.ts +11 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemInfo/CartItemInfo.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemInfo/CartItemInfo.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemInfo/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemInfo/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemInfo/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemKsp/CartItemKsp.d.ts +13 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemKsp/CartItemKsp.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemKsp/CartItemKsp.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemKsp/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemKsp/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemKsp/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/CartItemRemoveConfirm.d.ts +4 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/CartItemRemoveConfirm.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/CartItemRemoveConfirm.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/types.d.ts +11 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/types.js +1 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemRemoveConfirm/types.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemShipping/CartItemShipping.d.ts +8 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemShipping/CartItemShipping.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemShipping/CartItemShipping.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemShipping/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemShipping/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/components/CartItemShipping/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartItemRow/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartPerksSection/CartPerksSection.d.ts +34 -0
- package/dist/esm/biz-components/CartDetail/CartPerksSection/CartPerksSection.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartPerksSection/CartPerksSection.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartPerksSection/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartPerksSection/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartPerksSection/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartPriceSummary/CartPriceSummary.d.ts +49 -0
- package/dist/esm/biz-components/CartDetail/CartPriceSummary/CartPriceSummary.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartPriceSummary/CartPriceSummary.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartPriceSummary/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartPriceSummary/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartPriceSummary/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartSummaryHeader/CartSummaryHeader.d.ts +26 -0
- package/dist/esm/biz-components/CartDetail/CartSummaryHeader/CartSummaryHeader.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartSummaryHeader/CartSummaryHeader.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartSummaryHeader/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartSummaryHeader/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartSummaryHeader/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartThirdParty/CartThirdParty.d.ts +10 -0
- package/dist/esm/biz-components/CartDetail/CartThirdParty/CartThirdParty.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartThirdParty/CartThirdParty.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/CartThirdParty/index.d.ts +2 -0
- package/dist/esm/biz-components/CartDetail/CartThirdParty/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/CartThirdParty/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/index.d.ts +16 -0
- package/dist/esm/biz-components/CartDetail/index.js +2 -0
- package/dist/esm/biz-components/CartDetail/index.js.map +7 -0
- package/dist/esm/biz-components/CartDetail/types.d.ts +132 -0
- package/dist/esm/biz-components/CartDetail/types.js +1 -0
- package/dist/esm/biz-components/CartDetail/types.js.map +7 -0
- package/dist/esm/biz-components/CreditsShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/CreditsShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
- package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/MediaShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/MediaShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/SceneShelf/ProductsPanel.js +1 -1
- package/dist/esm/biz-components/SceneShelf/ProductsPanel.js.map +2 -2
- package/dist/esm/biz-components/SceneShelfV2/index.js +1 -1
- package/dist/esm/biz-components/SceneShelfV2/index.js.map +2 -2
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.js +1 -1
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +2 -2
- package/dist/esm/biz-components/index.d.ts +6 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/breadcrumb.d.ts +12 -0
- package/dist/esm/components/breadcrumb.js +2 -0
- package/dist/esm/components/breadcrumb.js.map +7 -0
- package/dist/esm/components/index.d.ts +3 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/input-number.d.ts +22 -0
- package/dist/esm/components/input-number.js +1 -1
- package/dist/esm/components/input-number.js.map +3 -3
- package/dist/esm/components/input.d.ts +5 -0
- package/dist/esm/components/input.js +1 -1
- package/dist/esm/components/input.js.map +3 -3
- package/dist/esm/components/popover.d.ts +17 -2
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.js.map +3 -3
- package/dist/esm/components/toast.d.ts +25 -0
- package/dist/esm/components/toast.js +2 -0
- package/dist/esm/components/toast.js.map +7 -0
- package/package.json +1 -1
- package/style.css +285 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/SceneShelfV3/ProductCard.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn, getLocalizedPath } from '../../helpers/index.js'\nimport { Button, Badge, Card, CardContent, Picture, Text, Heading } from '../../components/index.js'\nimport type { BadgeProps } from '../../components/badge.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { ButtonFunctionType, CopyConfig } from './types.js'\nimport type { Theme } from '../../types/props.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\n/**\n * \u8BED\u4E49\u5316\u7C7B\u540D\n */\nexport type SceneShelfV3SemanticName =\n | 'root'\n | 'title'\n | 'description'\n | 'tabsList'\n | 'promotionalBar'\n | 'productGrid'\n | 'viewMore'\n | 'productCard'\n | 'productTitle'\n | 'productDescription'\n | 'productPriceLabel'\n | 'productPrice'\n | 'priceWrapper'\n | 'originalPrice'\n | 'buttonGroup'\n | 'secondaryButton'\n | 'primaryButton'\n\n/**\n * \u5E93\u5B58\u5C55\u793A\u6A21\u5F0F\n */\nexport type StockDisplayMode = 'always' | 'never' | 'below-quantity' | 'below-percentage'\n\n/**\n * \u4EA7\u54C1\u5361\u7247\u6570\u636E\u63A5\u53E3\uFF08\u76F4\u63A5\u5339\u914D mock.json \u7ED3\u6784\uFF09\n */\nexport interface ProductCardData {\n sku?: string\n id: string\n /** \u4EA7\u54C1\u6807\u9898 */\n title: string\n /**\n * \u4EA7\u54C1\u63CF\u8FF0\n */\n description?: string\n /** \u4EA7\u54C1\u56FE\u7247 URL */\n imageUrl: string\n /** \u4EA7\u54C1\u56FE\u7247 alt \u6587\u672C */\n imageAlt: string\n /** \u5F53\u524D\u4EF7\u683C */\n currentPrice: string\n /** \u539F\u4EF7\uFF08\u683C\u5F0F\u5316\u5B57\u7B26\u4E32\uFF0C\u5982 \"$129.99\"\uFF0C\u7528\u4E8E\u663E\u793A\u5220\u9664\u7EBF\u4EF7\u683C\uFF09 */\n originalPrice?: string\n /** \u6807\u7B7E\u5217\u8868 */\n tags: Array<{\n label: string\n variant?: 'outline' | 'fill' | 'promotional'\n promotionalType?: BadgeProps['promotionalType']\n }>\n /** \u4EA7\u54C1\u8BE6\u60C5\u9875\u94FE\u63A5 */\n href: string\n /** \u662F\u5426\u552E\u7F44 */\n soldOut: boolean\n\n // ===== \u53EF\u9009\u5B57\u6BB5\uFF08CMS \u53EF\u80FD\u914D\u7F6E\uFF09 =====\n /** \u81EA\u5B9A\u4E49\u4EA7\u54C1\u540D\u79F0 */\n custom_name?: string\n /** \u81EA\u5B9A\u4E49\u4EA7\u54C1\u63CF\u8FF0 */\n custom_description?: string\n /** \u4EF7\u683C\u6807\u7B7E\uFF08\u5982 \"Member Price\"\uFF09 */\n priceLabel?: string\n /** \u5E93\u5B58\u4FE1\u606F\uFF08\u5982\u679C\u540E\u7AEF\u63D0\u4F9B\uFF09 */\n totalInventory?: number\n quantityAvailable?: number\n}\n\n/**\n * \u4EA7\u54C1\u5361\u7247\u7EC4\u4EF6 Props\n */\nexport interface ProductCardProps {\n product: ProductCardData\n className?: string\n showTags?: boolean\n stockDisplayMode?: StockDisplayMode\n stockThresholdValue?: number\n /** \u70B9\u51FB\u4E86\u89E3\u66F4\u591A\u56DE\u8C03\uFF08\u652F\u6301\u5F02\u6B65\uFF09 */\n onLearnMore?: (link: string) => void | Promise<void>\n /** \u70B9\u51FB\u7ACB\u5373\u8D2D\u4E70\u56DE\u8C03\uFF08\u652F\u6301\u5F02\u6B65\uFF09 */\n onShopNow?: (product: ProductCardData) => void | Promise<void>\n /** \u70B9\u51FB\u52A0\u5165\u8D2D\u7269\u8F66\u56DE\u8C03\uFF08\u652F\u6301\u5F02\u6B65\uFF09 */\n onAddToCart?: (product: ProductCardData) => void | Promise<void>\n classNames?: Partial<Record<SceneShelfV3SemanticName, string>>\n secondaryButtonText?: string\n secondaryButtonFun?: ButtonFunctionType\n primaryButtonText?: string\n primaryButtonFun?: ButtonFunctionType\n showOriginalPrice?: boolean\n copy?: CopyConfig\n onProductImageClick?: (product: ProductCardData) => void\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u8BED\u8A00\u73AF\u5883 */\n locale?: string\n /** \u5F53\u524D\u4E0B\u6807 */\n index?: number\n /** tabName */\n tabName?: string\n}\n\n/**\n * SceneShelfV3 \u4EA7\u54C1\u5361\u7247\u7EC4\u4EF6\n */\nexport const ProductCard = React.forwardRef<HTMLDivElement, ProductCardProps>(\n (\n {\n product,\n className,\n showTags = true,\n onLearnMore,\n onShopNow,\n onAddToCart,\n classNames,\n secondaryButtonText,\n secondaryButtonFun,\n primaryButtonText,\n primaryButtonFun,\n showOriginalPrice,\n copy,\n onProductImageClick,\n theme = 'light',\n locale = 'us',\n index = 0,\n tabName,\n },\n ref\n ) => {\n const [primaryLoading, setPrimaryLoading] = React.useState(false)\n const [secondaryLoading, setSecondaryLoading] = React.useState(false)\n const { trackingData } = useAiuiContext()\n\n const pageGroup = trackingData?.pageGroup\n\n const availableForSale = !product.soldOut\n\n const handleButtonClick = React.useCallback(\n async (buttonFun?: ButtonFunctionType, buttonType?: 'primary' | 'secondary') => {\n if (!buttonFun) return\n const setLoading = buttonType === 'primary' ? setPrimaryLoading : setSecondaryLoading\n setLoading(true)\n try {\n switch (buttonFun) {\n case 'buyNow':\n await onShopNow?.(product)\n break\n case 'addCart':\n await onAddToCart?.(product)\n break\n case 'learnMore':\n await onLearnMore?.(product.href)\n break\n }\n } finally {\n setLoading(false)\n }\n },\n [product, onShopNow, onAddToCart, onLearnMore]\n )\n\n const trackedHref = React.useMemo(\n () => getLocalizedPath(trackUrlRef(product.href, pageGroup + '_' + 'shelf' + '_' + 'scene_shelf_v3'), locale),\n [product.href, pageGroup, locale]\n )\n\n const onProductClick = React.useCallback(() => {\n onProductImageClick?.(product)\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n item_list_name: 'Scene_Shelf_3_Products',\n page_group: pageGroup,\n items: [\n {\n item_id: product.sku,\n item_name: product.title,\n item_variant: product.id,\n price: product.currentPrice,\n index: index,\n },\n ],\n tab_name: tabName,\n position: index,\n })\n }, [onProductImageClick, product, pageGroup, index, tabName])\n\n return (\n <Card\n ref={ref}\n className={cn(\n 'bg-container-primary flex h-full flex-col overflow-hidden border-none hover:bg-white',\n className,\n classNames?.productCard,\n {\n 'hover:bg-container-secondary-0 ': theme === 'dark',\n }\n )}\n >\n <CardContent className=\"desktop:p-6 relative flex flex-1 flex-col justify-between p-4\">\n <div className=\"product-image-wrapper lg-desktop:size-[196px] mx-auto size-[138px] cursor-pointer overflow-hidden\">\n <a\n onClick={onProductClick}\n {...(!onProductImageClick && {\n href: trackedHref,\n })}\n rel=\"noreferrer\"\n >\n <Picture\n source={product.imageUrl}\n alt={product.imageAlt}\n className=\"aspect-square size-full object-contain\"\n imgClassName=\"w-full h-full object-contain\"\n />\n </a>\n </div>\n\n {/* \u6807\u7B7E */}\n <div className=\"lg-desktop:h-[28px] mb-1 flex h-[24px] gap-1\">\n {showTags &&\n product.tags?.map((tag, index) => (\n <Badge\n key={index}\n size=\"sm\"\n variant={tag.variant || 'outline'}\n className={cn(tag.variant === 'promotional' ? 'ml-2' : '')}\n promotionalType={tag.promotionalType}\n >\n {tag.label}\n </Badge>\n ))}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"flex h-full flex-1 grow flex-col justify-between\">\n <div className=\"mb-4\">\n <Heading\n as=\"h3\"\n size={2}\n className={cn(\n 'text-info-primary laptop:line-clamp-2 mb-2 line-clamp-3 min-h-[2.4em]',\n classNames?.productTitle\n )}\n html={product.custom_name || product.title}\n />\n {(product?.custom_description || product?.description) && (\n <Text\n size={2}\n className={cn(\n 'text-info-secondary desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]',\n classNames?.productDescription\n )}\n html={product.custom_description || product.description}\n />\n )}\n </div>\n\n {/* \u4EF7\u683C\u533A\u57DF */}\n <div>\n <div className={cn('mb-2', classNames?.productPrice)}>\n <div className={cn('flex items-baseline gap-2', classNames?.priceWrapper)}>\n {availableForSale ? (\n <>\n <Heading size={2} className=\"text-info-primary\" as=\"h6\">\n {product.currentPrice}\n </Heading>\n {showOriginalPrice && product.originalPrice && (\n <Heading\n size={2}\n className={cn('text-info-tertiary line-through', classNames?.originalPrice)}\n as=\"h6\"\n >\n {product.originalPrice}\n </Heading>\n )}\n </>\n ) : (\n <Heading size={2} className=\"text-info-tertiary\">\n {copy?.outOfStockLabel ?? 'Sold Out'}\n </Heading>\n )}\n </div>\n </div>\n\n {product?.priceLabel && availableForSale && (\n <Text\n size={4}\n className={cn(\n 'text-marketing-1 desktop:text-[16px] lg-desktop:text-[18px] mt-2 text-[14px]',\n classNames?.productPriceLabel\n )}\n >\n {product.priceLabel}\n </Text>\n )}\n\n {/* \u6309\u94AE\u533A\u57DF */}\n <div\n className={cn(\n 'lg-desktop:gap-3 laptop:flex-row laptop:flex-nowrap flex flex-col flex-wrap gap-2',\n classNames?.buttonGroup\n )}\n >\n {secondaryButtonText && (\n <Button\n variant=\"secondary\"\n size=\"base\"\n className={cn(\n 'laptop:w-fit laptop:grow-0 w-full flex-1 whitespace-nowrap',\n classNames?.secondaryButton\n )}\n onClick={() => {\n handleButtonClick(secondaryButtonFun, 'secondary')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: pageGroup || 'Home Page',\n component_type: 'copy',\n component_name: 'scene_shelf_product',\n component_title: product.custom_name || product.title,\n component_description: product.custom_description || '',\n button_name: secondaryButtonText,\n SKU: product.sku || '',\n position: index,\n },\n })\n }}\n disabled={product.soldOut && secondaryButtonFun !== 'learnMore'}\n loading={secondaryLoading}\n >\n {secondaryButtonText}\n </Button>\n )}\n {primaryButtonText && (\n <Button\n variant=\"primary\"\n size=\"base\"\n className={cn(\n 'laptop:w-fit laptop:grow-0 w-full flex-1 whitespace-nowrap',\n classNames?.primaryButton\n )}\n onClick={() => {\n handleButtonClick(primaryButtonFun, 'primary')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: pageGroup || 'Home Page',\n component_type: 'copy',\n component_name: 'scene_shelf_product',\n component_title: product.custom_name || product.title,\n component_description: product.custom_description || '',\n button_name: primaryButtonText,\n SKU: product.sku || '',\n position: index,\n },\n })\n }}\n disabled={product.soldOut && primaryButtonFun !== 'learnMore'}\n loading={primaryLoading}\n >\n {primaryButtonText}\n </Button>\n )}\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n )\n }\n)\n\nProductCard.displayName = 'SceneShelfV3.ProductCard'\n\nexport default ProductCard\n"],
|
|
5
|
-
"mappings": "aA6Nc,OAsDM,YAAAA,EAtDN,OAAAC,EA2BF,QAAAC,MA3BE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,aAAeA,EAAQ,MACvC,GACEA,GAAS,oBAAsBA,GAAS,cACxChB,EAACU,EAAA,CACC,KAAM,EACN,UAAWP,EACT,0FACAmB,GAAY,kBACd,EACA,KAAMN,EAAQ,oBAAsBA,EAAQ,YAC9C,GAEJ,EAGAf,EAAC,OACC,UAAAD,EAAC,OAAI,UAAWG,EAAG,OAAQmB,GAAY,YAAY,EACjD,SAAAtB,EAAC,OAAI,UAAWG,EAAG,4BAA6BmB,GAAY,YAAY,EACrE,SAAAmB,EACCxC,EAAAF,EAAA,CACE,UAAAC,EAACW,EAAA,CAAQ,KAAM,EAAG,UAAU,oBAAoB,GAAG,KAChD,SAAAK,EAAQ,aACX,EACCW,GAAqBX,EAAQ,eAC5BhB,EAACW,EAAA,CACC,KAAM,EACN,UAAWR,EAAG,kCAAmCmB,GAAY,aAAa,EAC1E,GAAG,KAEF,SAAAN,EAAQ,cACX,GAEJ,EAEAhB,EAACW,EAAA,CAAQ,KAAM,EAAG,UAAU,qBACzB,SAAAiB,GAAM,iBAAmB,WAC5B,EAEJ,EACF,EAECZ,GAAS,YAAcyB,GACtBzC,EAACU,EAAA,CACC,KAAM,EACN,UAAWP,EACT,+EACAmB,GAAY,iBACd,EAEC,SAAAN,EAAQ,WACX,EAIFf,EAAC,OACC,UAAWE,EACT,oFACAmB,GAAY,WACd,EAEC,UAAAC,GACCvB,EAACK,EAAA,CACC,QAAQ,YACR,KAAK,OACL,UAAWF,EACT,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn, getLocalizedPath } from '../../helpers/index.js'\nimport { Button, Badge, Card, CardContent, Picture, Text, Heading } from '../../components/index.js'\nimport type { BadgeProps } from '../../components/badge.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { ButtonFunctionType, CopyConfig } from './types.js'\nimport type { Theme } from '../../types/props.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\n/**\n * \u8BED\u4E49\u5316\u7C7B\u540D\n */\nexport type SceneShelfV3SemanticName =\n | 'root'\n | 'title'\n | 'description'\n | 'tabsList'\n | 'promotionalBar'\n | 'productGrid'\n | 'viewMore'\n | 'productCard'\n | 'productTitle'\n | 'productDescription'\n | 'productPriceLabel'\n | 'productPrice'\n | 'priceWrapper'\n | 'originalPrice'\n | 'buttonGroup'\n | 'secondaryButton'\n | 'primaryButton'\n\n/**\n * \u5E93\u5B58\u5C55\u793A\u6A21\u5F0F\n */\nexport type StockDisplayMode = 'always' | 'never' | 'below-quantity' | 'below-percentage'\n\n/**\n * \u4EA7\u54C1\u5361\u7247\u6570\u636E\u63A5\u53E3\uFF08\u76F4\u63A5\u5339\u914D mock.json \u7ED3\u6784\uFF09\n */\nexport interface ProductCardData {\n sku?: string\n id: string\n /** \u4EA7\u54C1\u6807\u9898 */\n title: string\n /**\n * \u4EA7\u54C1\u63CF\u8FF0\n */\n description?: string\n /** \u4EA7\u54C1\u56FE\u7247 URL */\n imageUrl: string\n /** \u4EA7\u54C1\u56FE\u7247 alt \u6587\u672C */\n imageAlt: string\n /** \u5F53\u524D\u4EF7\u683C */\n currentPrice: string\n /** \u539F\u4EF7\uFF08\u683C\u5F0F\u5316\u5B57\u7B26\u4E32\uFF0C\u5982 \"$129.99\"\uFF0C\u7528\u4E8E\u663E\u793A\u5220\u9664\u7EBF\u4EF7\u683C\uFF09 */\n originalPrice?: string\n /** \u6807\u7B7E\u5217\u8868 */\n tags: Array<{\n label: string\n variant?: 'outline' | 'fill' | 'promotional'\n promotionalType?: BadgeProps['promotionalType']\n }>\n /** \u4EA7\u54C1\u8BE6\u60C5\u9875\u94FE\u63A5 */\n href: string\n /** \u662F\u5426\u552E\u7F44 */\n soldOut: boolean\n\n // ===== \u53EF\u9009\u5B57\u6BB5\uFF08CMS \u53EF\u80FD\u914D\u7F6E\uFF09 =====\n /** \u81EA\u5B9A\u4E49\u4EA7\u54C1\u540D\u79F0 */\n custom_name?: string\n /** \u81EA\u5B9A\u4E49\u4EA7\u54C1\u63CF\u8FF0 */\n custom_description?: string\n /** \u4EF7\u683C\u6807\u7B7E\uFF08\u5982 \"Member Price\"\uFF09 */\n priceLabel?: string\n /** \u5E93\u5B58\u4FE1\u606F\uFF08\u5982\u679C\u540E\u7AEF\u63D0\u4F9B\uFF09 */\n totalInventory?: number\n quantityAvailable?: number\n}\n\n/**\n * \u4EA7\u54C1\u5361\u7247\u7EC4\u4EF6 Props\n */\nexport interface ProductCardProps {\n product: ProductCardData\n className?: string\n showTags?: boolean\n stockDisplayMode?: StockDisplayMode\n stockThresholdValue?: number\n /** \u70B9\u51FB\u4E86\u89E3\u66F4\u591A\u56DE\u8C03\uFF08\u652F\u6301\u5F02\u6B65\uFF09 */\n onLearnMore?: (link: string) => void | Promise<void>\n /** \u70B9\u51FB\u7ACB\u5373\u8D2D\u4E70\u56DE\u8C03\uFF08\u652F\u6301\u5F02\u6B65\uFF09 */\n onShopNow?: (product: ProductCardData) => void | Promise<void>\n /** \u70B9\u51FB\u52A0\u5165\u8D2D\u7269\u8F66\u56DE\u8C03\uFF08\u652F\u6301\u5F02\u6B65\uFF09 */\n onAddToCart?: (product: ProductCardData) => void | Promise<void>\n classNames?: Partial<Record<SceneShelfV3SemanticName, string>>\n secondaryButtonText?: string\n secondaryButtonFun?: ButtonFunctionType\n primaryButtonText?: string\n primaryButtonFun?: ButtonFunctionType\n showOriginalPrice?: boolean\n copy?: CopyConfig\n onProductImageClick?: (product: ProductCardData) => void\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u8BED\u8A00\u73AF\u5883 */\n locale?: string\n /** \u5F53\u524D\u4E0B\u6807 */\n index?: number\n /** tabName */\n tabName?: string\n}\n\n/**\n * SceneShelfV3 \u4EA7\u54C1\u5361\u7247\u7EC4\u4EF6\n */\nexport const ProductCard = React.forwardRef<HTMLDivElement, ProductCardProps>(\n (\n {\n product,\n className,\n showTags = true,\n onLearnMore,\n onShopNow,\n onAddToCart,\n classNames,\n secondaryButtonText,\n secondaryButtonFun,\n primaryButtonText,\n primaryButtonFun,\n showOriginalPrice,\n copy,\n onProductImageClick,\n theme = 'light',\n locale = 'us',\n index = 0,\n tabName,\n },\n ref\n ) => {\n const [primaryLoading, setPrimaryLoading] = React.useState(false)\n const [secondaryLoading, setSecondaryLoading] = React.useState(false)\n const { trackingData } = useAiuiContext()\n\n const pageGroup = trackingData?.pageGroup\n\n const availableForSale = !product.soldOut\n\n const handleButtonClick = React.useCallback(\n async (buttonFun?: ButtonFunctionType, buttonType?: 'primary' | 'secondary') => {\n if (!buttonFun) return\n const setLoading = buttonType === 'primary' ? setPrimaryLoading : setSecondaryLoading\n setLoading(true)\n try {\n switch (buttonFun) {\n case 'buyNow':\n await onShopNow?.(product)\n break\n case 'addCart':\n await onAddToCart?.(product)\n break\n case 'learnMore':\n await onLearnMore?.(product.href)\n break\n }\n } finally {\n setLoading(false)\n }\n },\n [product, onShopNow, onAddToCart, onLearnMore]\n )\n\n const trackedHref = React.useMemo(\n () => getLocalizedPath(trackUrlRef(product.href, pageGroup + '_' + 'shelf' + '_' + 'scene_shelf_v3'), locale),\n [product.href, pageGroup, locale]\n )\n\n const onProductClick = React.useCallback(() => {\n onProductImageClick?.(product)\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n item_list_name: 'Scene_Shelf_3_Products',\n page_group: pageGroup,\n items: [\n {\n item_id: product.sku,\n item_name: product.title,\n item_variant: product.id,\n price: product.currentPrice,\n index: index,\n },\n ],\n tab_name: tabName,\n position: index,\n })\n }, [onProductImageClick, product, pageGroup, index, tabName])\n\n return (\n <Card\n ref={ref}\n className={cn(\n 'bg-container-primary flex h-full flex-col overflow-hidden border-none hover:bg-white',\n className,\n classNames?.productCard,\n {\n 'hover:bg-container-secondary-0 ': theme === 'dark',\n }\n )}\n >\n <CardContent className=\"desktop:p-6 relative flex flex-1 flex-col justify-between p-4\">\n <div className=\"product-image-wrapper lg-desktop:size-[196px] mx-auto size-[138px] cursor-pointer overflow-hidden\">\n <a\n onClick={onProductClick}\n {...(!onProductImageClick && {\n href: trackedHref,\n })}\n rel=\"noreferrer\"\n >\n <Picture\n source={product.imageUrl}\n alt={product.imageAlt}\n className=\"aspect-square size-full object-contain\"\n imgClassName=\"w-full h-full object-contain\"\n />\n </a>\n </div>\n\n {/* \u6807\u7B7E */}\n <div className=\"lg-desktop:h-[28px] mb-1 flex h-[24px] gap-1\">\n {showTags &&\n product.tags?.map((tag, index) => (\n <Badge\n key={index}\n size=\"sm\"\n variant={tag.variant || 'outline'}\n className={cn(tag.variant === 'promotional' ? 'ml-2' : '')}\n promotionalType={tag.promotionalType}\n >\n {tag.label}\n </Badge>\n ))}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"flex h-full flex-1 grow flex-col justify-between\">\n <div className=\"mb-4\">\n <Heading\n as=\"h3\"\n size={2}\n className={cn(\n 'text-info-primary laptop:line-clamp-2 mb-2 line-clamp-3 min-h-[2.4em]',\n classNames?.productTitle\n )}\n html={product.custom_name || product.title}\n />\n {(product?.custom_description || product?.description) && (\n <Text\n size={2}\n className={cn(\n 'text-info-secondary desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]',\n classNames?.productDescription\n )}\n html={product.custom_description || product.description}\n />\n )}\n </div>\n\n {/* \u4EF7\u683C\u533A\u57DF */}\n <div>\n <div className={cn('mb-2', classNames?.productPrice)}>\n <div className={cn('flex items-baseline gap-2', classNames?.priceWrapper)}>\n {availableForSale ? (\n <>\n <Heading size={2} className=\"text-info-primary\" as=\"h6\">\n {product.currentPrice}\n </Heading>\n {showOriginalPrice && product.originalPrice && (\n <Heading\n size={2}\n className={cn('text-info-tertiary line-through', classNames?.originalPrice)}\n as=\"h6\"\n >\n {product.originalPrice}\n </Heading>\n )}\n </>\n ) : (\n <Heading size={2} className=\"text-info-tertiary\">\n {copy?.outOfStockLabel ?? 'Sold Out'}\n </Heading>\n )}\n </div>\n </div>\n\n {product?.priceLabel && availableForSale && (\n <Text\n size={4}\n className={cn(\n 'text-marketing-1 desktop:text-[16px] lg-desktop:text-[18px] mt-2 text-[14px]',\n classNames?.productPriceLabel\n )}\n >\n {product.priceLabel}\n </Text>\n )}\n\n {/* \u6309\u94AE\u533A\u57DF */}\n <div\n className={cn(\n 'lg-desktop:gap-3 laptop:flex-row laptop:flex-nowrap flex flex-col flex-wrap gap-2',\n classNames?.buttonGroup\n )}\n >\n {secondaryButtonText && (\n <Button\n variant=\"secondary\"\n size=\"base\"\n className={cn(\n 'laptop:flex-1 laptop:min-w-0 laptop:whitespace-normal laptop:text-center w-full min-w-0 whitespace-normal text-center',\n classNames?.secondaryButton\n )}\n onClick={() => {\n handleButtonClick(secondaryButtonFun, 'secondary')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: pageGroup || 'Home Page',\n component_type: 'copy',\n component_name: 'scene_shelf_product',\n component_title: product.custom_name || product.title,\n component_description: product.custom_description || '',\n button_name: secondaryButtonText,\n SKU: product.sku || '',\n position: index,\n },\n })\n }}\n disabled={product.soldOut && secondaryButtonFun !== 'learnMore'}\n loading={secondaryLoading}\n >\n {secondaryButtonText}\n </Button>\n )}\n {primaryButtonText && (\n <Button\n variant=\"primary\"\n size=\"base\"\n className={cn(\n 'laptop:flex-1 laptop:min-w-0 laptop:whitespace-normal laptop:text-center w-full min-w-0 whitespace-normal text-center',\n classNames?.primaryButton\n )}\n onClick={() => {\n handleButtonClick(primaryButtonFun, 'primary')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: pageGroup || 'Home Page',\n component_type: 'copy',\n component_name: 'scene_shelf_product',\n component_title: product.custom_name || product.title,\n component_description: product.custom_description || '',\n button_name: primaryButtonText,\n SKU: product.sku || '',\n position: index,\n },\n })\n }}\n disabled={product.soldOut && primaryButtonFun !== 'learnMore'}\n loading={primaryLoading}\n >\n {primaryButtonText}\n </Button>\n )}\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n )\n }\n)\n\nPro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D,sBAAuBA,EAAQ,oBAAsB,GACrD,YAAaO,EACb,IAAKP,EAAQ,KAAO,GACpB,SAAUgB,CACZ,CACF,CAAC,CACH,EACA,SAAUhB,EAAQ,SAAWQ,IAAuB,YACpD,QAASa,EAER,SAAAd,EACH,EAEDE,GACCzB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,OACL,UAAWF,EACT,wHACAmB,GAAY,aACd,EACA,QAAS,IAAM,CACboB,EAAkBhB,EAAkB,SAAS,EAC7Cb,EAAQ,CACN,MAAO,WACP,WAAY,kBACZ,iBAAkB,CAChB,WAAY2B,GAAa,YACzB,eAAgB,OAChB,eAAgB,sBAChB,gBAAiBxB,EAAQ,aAAeA,EAAQ,MAChD,sBAAuBA,EAAQ,oBAAsB,GACrD,YAAaS,EACb,IAAKT,EAAQ,KAAO,GACpB,SAAUgB,CACZ,CACF,CAAC,CACH,EACA,SAAUhB,EAAQ,SAAWU,IAAqB,YAClD,QAASS,EAER,SAAAV,EACH,GAEJ,GACF,GACF,GACF,EACF,CAEJ,CACF,EAEAV,EAAY,YAAc,2BAE1B,IAAOkC,GAAQlC",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "React", "cn", "getLocalizedPath", "Button", "Badge", "Card", "CardContent", "Picture", "Text", "Heading", "trackUrlRef", "gaTrack", "useAiuiContext", "ProductCard", "product", "className", "showTags", "onLearnMore", "onShopNow", "onAddToCart", "classNames", "secondaryButtonText", "secondaryButtonFun", "primaryButtonText", "primaryButtonFun", "showOriginalPrice", "copy", "onProductImageClick", "theme", "locale", "index", "tabName", "ref", "primaryLoading", "setPrimaryLoading", "secondaryLoading", "setSecondaryLoading", "trackingData", "pageGroup", "availableForSale", "handleButtonClick", "buttonFun", "buttonType", "setLoading", "trackedHref", "onProductClick", "tag", "ProductCard_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as ge,jsx as i,jsxs as b}from"react/jsx-runtime";import{useAiuiContext as ve}from"../AiuiProvider/index.js";import{formatVariantPrice as be}from"./shelfDisplay.js";import he from"../../components/picture.js";import xe from"../../components/badge.js";import{cn as v}from"../../helpers/utils.js";import{Text as ke}from"../../components/text.js";import ie from"../../components/button.js";import{gaTrack as we}from"../../shared/track.js";import{trackUrlRef as _e}from"../../shared/trackUrlRef.js";import{Heading as Se}from"../../components/heading.js";import{useExposure as Ne}from"../../hooks/useExposure.js";import{useRef as Te,useEffect as Be,useMemo as oe,useState as B}from"react";const ne="image",le="product_shelf",ae=999999999e-2,Ce=e=>{const t=e?.sku,C=e?.variants,P=C?.find(L=>L?.sku===t),W=P?.image?.url||C?.[0]?.image?.url||"",U=P?.image?.altText||C?.[0]?.image?.altText||e?.custom_name||e?.title||"";return{imageUrl:W,altText:U}},ze=({data:e,configuration:t})=>{const{isDisplayBackImage:C=!1,itemShape:P,metafields:W,isTopTag:U=!1,isShowTag:L,isShowOriginalPrice:Q,isShowShortTitle:ce=!1,formatPrice:$,renderOriginalPrice:z,renderPriceLabel:X,renderPrice:y}=t||{},{locale:_="es",copyWriting:me,currencyDisplay:Y}=ve(),{discounts:Z,discountsCopy:H}=W||{},E=Te(null),[R,ee]=B([]),[V,pe]=B(""),[te,c]=B(!1),[q,se]=B(!1),D=(s,r,o,l)=>{const{primaryFun:p,onAddCart:d,onBuyNow:g,onLearnMore:K,event:ye}=t||{};if(p){if(p==="AddCart"&&d)return d(s,r+1,o,l);if(p==="BuyNow"&&g)return g(s,r+1,o,l);if(p==="LearnMore"&&K)return K(s,r+1,o,l)}ye?.primaryButton?.(s,r+1,o,l)},de=(s,r,o,l)=>{const{secondaryFun:p,onAddCart:d,onBuyNow:g,onLearnMore:K,event:ye}=t||{};if(p){if(p==="AddCart"&&d)return d(s,r+1,o,l);if(p==="BuyNow"&&g)return g(s,r+1,o,l);if(p==="LearnMore"&&K)return K(s,r+1,o,l)}ye?.secondaryButton?.(s,r+1,o,l)},m=oe(()=>{const s=e?.variants||[];if(s.length)return e?.sku?s?.find?.(r=>r?.sku===e?.sku)||s[0]:s?.[0]},[e?.sku,e?.variants]),u=m?.id?.split?.("/")||[],G=u?.[u?.length-1],S=!m?.availableForSale||m?.price?.amount===ae||m?.price===ae,h=m?.coupons?.[0],N=!!(Q&&h),T=e?.price?.currencyCode||"USD",k=oe(()=>be({locale:_,amount:N?h?.variant_price4wscode:m?.price,baseAmount:N?m?.price:0,currencyCode:T,currencyDisplay:Y,customFormatPrice:$}),[T,_,N,h?.variant_price4wscode,m,$]),{price:x,basePrice:I,discount:w,discountAmount:f}=k,{imageUrl:A,altText:F}=Ce(e),M=e?.custom_name||e?.title,J=ce&&m?.metafields?.infos?.page_short_title||M,j=e?.custom_description||e?.description,ue=()=>{if(h?.value_type==="fixed_amount"){const s=f||"",r=s.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(r){const[,o,l,p]=r;let d=l;return l.endsWith(".00")?d=l.replace(/\.00$/,""):l.endsWith(",00")&&(d=l.replace(/,00$/,"")),`${o}${d}${p}`}return s}return w||""};Be(()=>{let s=[];if(w||f){const o=`${ue()} ${Z?.off||H?.off||""}`;pe(o),s.push(o)}const r=e?.tags?.filter?.(o=>o?.startsWith?.("CLtag"))?.map?.(o=>o?.replace?.("CLtag:",""))?.slice?.(0,w?1:2);ee(s.concat(r))},[e?.tags,w,f,Z?.off,H?.off]),Ne(E,{componentType:ne,componentName:le,componentTitle:M,componentDescription:j,position:t?.index+1});const fe=async()=>{if(!te&&!e?.custom_primary_link){c(!0);try{await D(e,t?.index,t,h)}finally{c(!1)}}},O=async()=>{if(!q&&!e?.custom_secondary_link){se(!0);try{await de(e,t?.index,t,h)}finally{se(!1)}}},re=()=>b(ge,{children:[L&&R?.length>0?i("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:R?.map?.((s,r)=>i(xe,{className:"shelf-items-tag",variant:"fill",children:s},r))}):null,J?i(Se,{as:"h3",title:J||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] text-info-primary line-clamp-2 h-12",html:J||""}):null,i(ke,{size:2,className:"lg-desktop:text-lg desktop:h-[24px] lg-desktop:h-[28px] desktop:text-base shelf-display-product-description text-info-primary line-clamp-1 h-[20px] text-sm",html:j||""}),i("div",{className:"mb-2 mt-4 flex items-center",children:y?y(e,{price:x,basePrice:I,discount:w,discountAmount:f,variant:m,coupon:h,isSoldOut:S}):S?i("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:me?.soldOutText}):b(ge,{children:[i("div",{className:"final-price tablet:text-xl text-info-primary text-xl font-bold",children:m?.availableForSale&&x||""}),z?z(e,{price:x,basePrice:I,discount:w,discountAmount:f}):I&&i("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:m?.availableForSale&&I||""})]})}),!y&&X?.(e,m),b("div",{className:v("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?i(ie,{disabled:S&&t?.secondaryFun!=="LearnMore",variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:O,loading:q,className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?i(ie,{disabled:S&&t?.primaryFun!=="LearnMore",variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:fe,loading:te,className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]}),n=e?.custom_bg_image,a=e?.custom_theme;return i("div",{ref:E,className:v("box-border w-full cursor-pointer overflow-hidden duration-300","rounded-box","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px] shelf-display-item",n?"bg-cover bg-center bg-no-repeat":"bg-background tablet:hover:bg-info-white",{"aiui-dark":a==="dark"}),style:n?{backgroundImage:`url(${n})`}:void 0,children:C?i("div",{className:"absolute inset-0 box-border overflow-hidden",children:b("div",{className:"relative inset-0 size-full",children:[i(he,{source:A,alt:F,className:v("flex h-full justify-center object-cover [&_img]:w-auto",{"opacity-0":n})}),i("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:re()})]})}):b("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[V&&U&&i(xe,{className:"shelf-prices-tag absolute left-4 top-4 z-10",variant:"fill",children:V||""}),i("div",{className:v("lg-desktop:h-[195px] shelf-display-item-image relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden",{"opacity-0":n}),children:i("a",{"aria-label":M,target:t?.target,href:_e(`${_==="us"||!_?"":`/${_}`}/products/${e?.handle}?variant=${G}`,`${ne}_${le}`),onClick:()=>{we({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||m?.sku,item_name:e?.name,item_variant:m?.name,price:m?.price,index:t?.index+1}]}})},children:i(he,{source:A,alt:F,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),re()]})},e?.id||e?.handle)},He=({data:e,configuration:t})=>{const{itemShape:C,itemLength:P,metafields:W,isShowShortTitle:U,formatPrice:L,renderOriginalPrice:Q,renderPriceLabel:ce,renderPrice:$}=t||{},{discounts:z,discountsCopy:X}=W||{},{locale:y="us",copyWriting:_,currencyDisplay:me}=ve(),[Y,Z]=B([]),H=Te(null),[E,R]=B(!1),[ee,V]=B(!1),pe=(n,a,s,r)=>{const{primaryFun:o,onAddCart:l,onBuyNow:p,onLearnMore:d,event:g}=t||{};if(o){if(o==="AddCart"&&l)return l(n,a+1,s,r);if(o==="BuyNow"&&p)return p(n,a+1,s,r);if(o==="LearnMore"&&d)return d(n,a+1,s,r)}g?.primaryButton?.(n,a+1,s,r)},te=(n,a,s,r)=>{const{secondaryFun:o,onAddCart:l,onBuyNow:p,onLearnMore:d,event:g}=t||{};if(o){if(o==="AddCart"&&l)return l(n,a+1,s,r);if(o==="BuyNow"&&p)return p(n,a+1,s,r);if(o==="LearnMore"&&d)return d(n,a+1,s,r)}g?.secondaryButton?.(n,a+1,s,r)},c=oe(()=>{const n=e?.variants||[];if(n.length)return e?.sku&&n.find(a=>a?.sku===e?.sku)||n[0]},[e?.sku,e?.variants]),q=c?.id?.split?.("/")||[],se=q?.[q?.length-1],D=!c?.availableForSale||c?.price?.amount===ae||c?.price===ae,de=t?.isShowTag,m=t?.isShowOriginalPrice,u=c?.coupons?.[0],G=!!(m&&u),S=e?.price?.currencyCode||"USD",h=oe(()=>be({locale:y,amount:G?u?.variant_price4wscode:c?.price,baseAmount:G?c?.price:0,currencyCode:S,currencyDisplay:me,customFormatPrice:L}),[S,y,G,u?.variant_price4wscode,c,L]),{price:N,basePrice:T,discount:k,discountAmount:x}=h,{imageUrl:I,altText:w}=Ce(e),f=e?.custom_name||e?.title,A=U&&c?.metafields?.infos?.page_short_title||f,F=e?.custom_description||e?.description;Ne(H,{componentType:ne,componentName:le,componentTitle:f,componentDescription:F,position:t?.index+1});const M=async()=>{if(!E&&!e?.custom_primary_link){R(!0);try{await pe(e,t?.index,t,u)}finally{R(!1)}}},J=async()=>{if(!ee&&!e?.custom_secondary_link){V(!0);try{await te(e,t?.index,t,u)}finally{V(!1)}}},j=()=>P>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},ue=()=>P>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col",fe=()=>{if(u?.value_type==="fixed_amount"){const n=x||"",a=n.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(a){const[,s,r,o]=a;let l=r;return r.endsWith(".00")?l=r.replace(/\.00$/,""):r.endsWith(",00")&&(l=r.replace(/,00$/,"")),`${s}${l}${o}`}return n}return k||""};Be(()=>{let n=[];if(k||x){const s=`${fe()} ${z?.off||X?.off||""}`;n.push(s)}const a=e?.tags?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,k?1:2);Z(n.concat(a))},[e?.tags,k,x,z?.off,X?.off]);const O=e?.custom_bg_image,re=e?.custom_theme;return i("div",{ref:H,className:v(j().wrap,"rounded-box","shelf-display-item","duration-300","md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden",O?"bg-cover bg-center bg-no-repeat":"bg-container-secondary-1 tablet:hover:bg-info-white",{"aiui-dark":re==="dark"}),style:O?{backgroundImage:`url(${O})`}:void 0,children:b("div",{className:v(ue(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[i("div",{className:v(j().imgItem,"desktop:mb-0 relative mb-1 overflow-hidden",{"opacity-0":O}),children:i("a",{"aria-label":f,target:t?.target,href:_e(`${y==="us"||!y?"":`/${y}`}/products/${e?.handle}?variant=${se}`,`${ne}_${le}`),onClick:()=>{we({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||c?.sku,item_name:e?.name,item_variant:c?.name,price:c?.price,index:t?.index+1}]}})},children:i(he,{source:I,alt:w,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),b("div",{className:v("flex flex-col items-start justify-center",j().boxItem),children:[de&&i("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:Y?.length>0&&Y?.map?.((n,a)=>i(xe,{className:"shelf-items-tag",variant:"fill",children:n},a))}),A?i(Se,{as:"h3",title:A||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] text-info-primary mb-1 line-clamp-2 h-[48px]",html:A||""}):null,F?i(ke,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description text-info-primary line-clamp-1 h-5 text-sm",html:F||""}):null,i("div",{className:"mb-2 mt-5 flex items-center",children:$?$(e,{price:N,basePrice:T,discount:k,discountAmount:x,variant:c,coupon:u,isSoldOut:D}):D?i("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_?.soldOutText}):b(ge,{children:[i("div",{className:"final-price tablet:text-xl text-info-primary text-xl font-bold",children:c?.availableForSale&&N||""}),Q?Q(e,{price:N,basePrice:T,discount:k,discountAmount:x}):T&&i("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:c?.availableForSale&&T||""})]})}),!$&&ce?.(e,c),b("div",{className:v("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?i(ie,{disabled:D&&t?.secondaryFun!=="LearnMore",variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:J,loading:ee,className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?i(ie,{disabled:D&&t?.primaryFun!=="LearnMore",variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:M,loading:E,className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{He as ShelfDisplayHorizontalItem,ze as ShelfDisplayWrapItem,Ce as getProductImage};
|
|
1
|
+
import{Fragment as ge,jsx as i,jsxs as b}from"react/jsx-runtime";import{useAiuiContext as ve}from"../AiuiProvider/index.js";import{formatVariantPrice as be}from"./shelfDisplay.js";import he from"../../components/picture.js";import xe from"../../components/badge.js";import{cn as v}from"../../helpers/utils.js";import{Text as ke}from"../../components/text.js";import ie from"../../components/button.js";import{gaTrack as we}from"../../shared/track.js";import{trackUrlRef as _e}from"../../shared/trackUrlRef.js";import{Heading as Se}from"../../components/heading.js";import{useExposure as Ne}from"../../hooks/useExposure.js";import{useRef as Te,useEffect as Be,useMemo as oe,useState as B}from"react";const ne="image",le="product_shelf",ae=999999999e-2,Ce=e=>{const t=e?.sku,C=e?.variants,P=C?.find(L=>L?.sku===t),W=P?.image?.url||C?.[0]?.image?.url||"",U=P?.image?.altText||C?.[0]?.image?.altText||e?.custom_name||e?.title||"";return{imageUrl:W,altText:U}},ze=({data:e,configuration:t})=>{const{isDisplayBackImage:C=!1,itemShape:P,metafields:W,isTopTag:U=!1,isShowTag:L,isShowOriginalPrice:Q,isShowShortTitle:ce=!1,formatPrice:$,renderOriginalPrice:z,renderPriceLabel:X,renderPrice:y}=t||{},{locale:_="es",copyWriting:me,currencyDisplay:Y}=ve(),{discounts:Z,discountsCopy:H}=W||{},E=Te(null),[R,ee]=B([]),[V,pe]=B(""),[te,c]=B(!1),[q,se]=B(!1),D=(s,r,o,l)=>{const{primaryFun:p,onAddCart:d,onBuyNow:g,onLearnMore:K,event:ye}=t||{};if(p){if(p==="AddCart"&&d)return d(s,r+1,o,l);if(p==="BuyNow"&&g)return g(s,r+1,o,l);if(p==="LearnMore"&&K)return K(s,r+1,o,l)}ye?.primaryButton?.(s,r+1,o,l)},de=(s,r,o,l)=>{const{secondaryFun:p,onAddCart:d,onBuyNow:g,onLearnMore:K,event:ye}=t||{};if(p){if(p==="AddCart"&&d)return d(s,r+1,o,l);if(p==="BuyNow"&&g)return g(s,r+1,o,l);if(p==="LearnMore"&&K)return K(s,r+1,o,l)}ye?.secondaryButton?.(s,r+1,o,l)},m=oe(()=>{const s=e?.variants||[];if(s.length)return e?.sku?s?.find?.(r=>r?.sku===e?.sku)||s[0]:s?.[0]},[e?.sku,e?.variants]),u=m?.id?.split?.("/")||[],G=u?.[u?.length-1],S=!m?.availableForSale||m?.price?.amount===ae||m?.price===ae,h=m?.coupons?.[0],N=!!(Q&&h),T=e?.price?.currencyCode||"USD",k=oe(()=>be({locale:_,amount:N?h?.variant_price4wscode:m?.price,baseAmount:N?m?.price:0,currencyCode:T,currencyDisplay:Y,customFormatPrice:$}),[T,_,N,h?.variant_price4wscode,m,$]),{price:x,basePrice:I,discount:w,discountAmount:f}=k,{imageUrl:A,altText:F}=Ce(e),M=e?.custom_name||e?.title,J=ce&&m?.metafields?.infos?.page_short_title||M,j=e?.custom_description||e?.description,ue=()=>{if(h?.value_type==="fixed_amount"){const s=f||"",r=s.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(r){const[,o,l,p]=r;let d=l;return l.endsWith(".00")?d=l.replace(/\.00$/,""):l.endsWith(",00")&&(d=l.replace(/,00$/,"")),`${o}${d}${p}`}return s}return w||""};Be(()=>{let s=[];if(w||f){const o=`${ue()} ${Z?.off||H?.off||""}`;pe(o),s.push(o)}const r=e?.tags?.filter?.(o=>o?.startsWith?.("CLtag"))?.map?.(o=>o?.replace?.("CLtag:",""))?.slice?.(0,w?1:2)||[];ee(s.concat(r))},[e?.tags,w,f,Z?.off,H?.off]),Ne(E,{componentType:ne,componentName:le,componentTitle:M,componentDescription:j,position:t?.index+1});const fe=async()=>{if(!te&&!e?.custom_primary_link){c(!0);try{await D(e,t?.index,t,h)}finally{c(!1)}}},O=async()=>{if(!q&&!e?.custom_secondary_link){se(!0);try{await de(e,t?.index,t,h)}finally{se(!1)}}},re=()=>b(ge,{children:[L&&R?.length>0?i("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:R?.map?.((s,r)=>i(xe,{className:"shelf-items-tag",variant:"fill",children:s},r))}):null,J?i(Se,{as:"h3",title:J||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] text-info-primary line-clamp-2 h-12",html:J||""}):null,i(ke,{size:2,className:"lg-desktop:text-lg desktop:h-[24px] lg-desktop:h-[28px] desktop:text-base shelf-display-product-description text-info-primary line-clamp-1 h-[20px] text-sm",html:j||""}),i("div",{className:"mb-2 mt-4 flex items-center",children:y?y(e,{price:x,basePrice:I,discount:w,discountAmount:f,variant:m,coupon:h,isSoldOut:S}):S?i("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:me?.soldOutText}):b(ge,{children:[i("div",{className:"final-price tablet:text-xl text-info-primary text-xl font-bold",children:m?.availableForSale&&x||""}),z?z(e,{price:x,basePrice:I,discount:w,discountAmount:f}):I&&i("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:m?.availableForSale&&I||""})]})}),!y&&X?.(e,m),b("div",{className:v("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?i(ie,{disabled:S&&t?.secondaryFun!=="LearnMore",variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:O,loading:q,className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?i(ie,{disabled:S&&t?.primaryFun!=="LearnMore",variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:fe,loading:te,className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]}),n=e?.custom_bg_image,a=e?.custom_theme;return i("div",{ref:E,className:v("box-border w-full cursor-pointer overflow-hidden duration-300","rounded-box","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px] shelf-display-item",n?"bg-cover bg-center bg-no-repeat":"bg-background tablet:hover:bg-info-white",{"aiui-dark":a==="dark"}),style:n?{backgroundImage:`url(${n})`}:void 0,children:C?i("div",{className:"absolute inset-0 box-border overflow-hidden",children:b("div",{className:"relative inset-0 size-full",children:[i(he,{source:A,alt:F,className:v("flex h-full justify-center object-cover [&_img]:w-auto",{"opacity-0":n})}),i("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:re()})]})}):b("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[V&&U&&i(xe,{className:"shelf-prices-tag absolute left-4 top-4 z-10",variant:"fill",children:V||""}),i("div",{className:v("lg-desktop:h-[195px] shelf-display-item-image relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden",{"opacity-0":n}),children:i("a",{"aria-label":M,target:t?.target,href:_e(`${_==="us"||!_?"":`/${_}`}/products/${e?.handle}?variant=${G}`,`${ne}_${le}`),onClick:()=>{we({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||m?.sku,item_name:e?.name,item_variant:m?.name,price:m?.price,index:t?.index+1}]}})},children:i(he,{source:A,alt:F,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),re()]})},e?.id||e?.handle)},He=({data:e,configuration:t})=>{const{itemShape:C,itemLength:P,metafields:W,isShowShortTitle:U,formatPrice:L,renderOriginalPrice:Q,renderPriceLabel:ce,renderPrice:$}=t||{},{discounts:z,discountsCopy:X}=W||{},{locale:y="us",copyWriting:_,currencyDisplay:me}=ve(),[Y,Z]=B([]),H=Te(null),[E,R]=B(!1),[ee,V]=B(!1),pe=(n,a,s,r)=>{const{primaryFun:o,onAddCart:l,onBuyNow:p,onLearnMore:d,event:g}=t||{};if(o){if(o==="AddCart"&&l)return l(n,a+1,s,r);if(o==="BuyNow"&&p)return p(n,a+1,s,r);if(o==="LearnMore"&&d)return d(n,a+1,s,r)}g?.primaryButton?.(n,a+1,s,r)},te=(n,a,s,r)=>{const{secondaryFun:o,onAddCart:l,onBuyNow:p,onLearnMore:d,event:g}=t||{};if(o){if(o==="AddCart"&&l)return l(n,a+1,s,r);if(o==="BuyNow"&&p)return p(n,a+1,s,r);if(o==="LearnMore"&&d)return d(n,a+1,s,r)}g?.secondaryButton?.(n,a+1,s,r)},c=oe(()=>{const n=e?.variants||[];if(n.length)return e?.sku&&n.find(a=>a?.sku===e?.sku)||n[0]},[e?.sku,e?.variants]),q=c?.id?.split?.("/")||[],se=q?.[q?.length-1],D=!c?.availableForSale||c?.price?.amount===ae||c?.price===ae,de=t?.isShowTag,m=t?.isShowOriginalPrice,u=c?.coupons?.[0],G=!!(m&&u),S=e?.price?.currencyCode||"USD",h=oe(()=>be({locale:y,amount:G?u?.variant_price4wscode:c?.price,baseAmount:G?c?.price:0,currencyCode:S,currencyDisplay:me,customFormatPrice:L}),[S,y,G,u?.variant_price4wscode,c,L]),{price:N,basePrice:T,discount:k,discountAmount:x}=h,{imageUrl:I,altText:w}=Ce(e),f=e?.custom_name||e?.title,A=U&&c?.metafields?.infos?.page_short_title||f,F=e?.custom_description||e?.description;Ne(H,{componentType:ne,componentName:le,componentTitle:f,componentDescription:F,position:t?.index+1});const M=async()=>{if(!E&&!e?.custom_primary_link){R(!0);try{await pe(e,t?.index,t,u)}finally{R(!1)}}},J=async()=>{if(!ee&&!e?.custom_secondary_link){V(!0);try{await te(e,t?.index,t,u)}finally{V(!1)}}},j=()=>P>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},ue=()=>P>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col",fe=()=>{if(u?.value_type==="fixed_amount"){const n=x||"",a=n.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(a){const[,s,r,o]=a;let l=r;return r.endsWith(".00")?l=r.replace(/\.00$/,""):r.endsWith(",00")&&(l=r.replace(/,00$/,"")),`${s}${l}${o}`}return n}return k||""};Be(()=>{let n=[];if(k||x){const s=`${fe()} ${z?.off||X?.off||""}`;n.push(s)}const a=e?.tags?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,k?1:2)||[];Z(n.concat(a))},[e?.tags,k,x,z?.off,X?.off]);const O=e?.custom_bg_image,re=e?.custom_theme;return i("div",{ref:H,className:v(j().wrap,"rounded-box","shelf-display-item","duration-300","md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden",O?"bg-cover bg-center bg-no-repeat":"bg-container-secondary-1 tablet:hover:bg-info-white",{"aiui-dark":re==="dark"}),style:O?{backgroundImage:`url(${O})`}:void 0,children:b("div",{className:v(ue(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[i("div",{className:v(j().imgItem,"desktop:mb-0 relative mb-1 overflow-hidden",{"opacity-0":O}),children:i("a",{"aria-label":f,target:t?.target,href:_e(`${y==="us"||!y?"":`/${y}`}/products/${e?.handle}?variant=${se}`,`${ne}_${le}`),onClick:()=>{we({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||c?.sku,item_name:e?.name,item_variant:c?.name,price:c?.price,index:t?.index+1}]}})},children:i(he,{source:I,alt:w,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),b("div",{className:v("flex flex-col items-start justify-center",j().boxItem),children:[de&&i("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:Y?.length>0&&Y?.map?.((n,a)=>i(xe,{className:"shelf-items-tag",variant:"fill",children:n},a))}),A?i(Se,{as:"h3",title:A||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] text-info-primary mb-1 line-clamp-2 h-[48px]",html:A||""}):null,F?i(ke,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description text-info-primary line-clamp-1 h-5 text-sm",html:F||""}):null,i("div",{className:"mb-2 mt-5 flex items-center",children:$?$(e,{price:N,basePrice:T,discount:k,discountAmount:x,variant:c,coupon:u,isSoldOut:D}):D?i("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_?.soldOutText}):b(ge,{children:[i("div",{className:"final-price tablet:text-xl text-info-primary text-xl font-bold",children:c?.availableForSale&&N||""}),Q?Q(e,{price:N,basePrice:T,discount:k,discountAmount:x}):T&&i("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:c?.availableForSale&&T||""})]})}),!$&&ce?.(e,c),b("div",{className:v("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?i(ie,{disabled:D&&t?.secondaryFun!=="LearnMore",variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:J,loading:ee,className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?i(ie,{disabled:D&&t?.primaryFun!=="LearnMore",variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:M,loading:E,className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{He as ShelfDisplayHorizontalItem,ze as ShelfDisplayWrapItem,Ce as getProductImage};
|
|
2
2
|
//# sourceMappingURL=shelfDisplayItem.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplayItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef, useEffect, useMemo, useState } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\n// \u516C\u5171\u51FD\u6570\uFF1A\u83B7\u53D6\u4EA7\u54C1\u56FE\u7247URL\u548CaltText\nexport const getProductImage = (data: any) => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n const imageUrl = findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n const altText = findSku?.image?.altText || skuArray?.[0]?.image?.altText || data?.custom_name || data?.title || ''\n\n return {\n imageUrl,\n altText,\n }\n}\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const {\n isDisplayBackImage = false,\n itemShape,\n metafields,\n isTopTag = false,\n isShowTag,\n isShowOriginalPrice,\n isShowShortTitle = false,\n formatPrice,\n renderOriginalPrice,\n renderPriceLabel,\n renderPrice,\n } = configuration || {}\n const { locale = 'es', copyWriting, currencyDisplay } = useAiuiContext()\n const { discounts, discountsCopy } = metafields || {}\n const ref = useRef<HTMLDivElement>(null)\n const [showTags, setShowTags] = useState<string[]>([])\n const [currentPriceTag, setCurrentPriceTag] = useState<string>('')\n const [primaryLoading, setPrimaryLoading] = useState(false)\n const [secondaryLoading, setSecondaryLoading] = useState(false)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { primaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E primaryFun \u503C\uFF09\n if (primaryFun) {\n if (primaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (primaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (primaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.primaryButton?.(params, index + 1, data, coupon)\n }\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { secondaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E secondaryFun \u503C\uFF09\n if (secondaryFun) {\n if (secondaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.secondaryButton?.(params, index + 1, data, coupon)\n }\n\n const variant = useMemo(() => {\n const variants = data?.variants || []\n if (!variants.length) {\n return undefined\n }\n if (!data?.sku) {\n return variants?.[0]\n }\n return variants?.find?.((item: any) => item?.sku === data?.sku) || variants[0]\n }, [data?.sku, data?.variants])\n\n const variantArr = variant?.id?.split?.('/') || []\n const variantId = variantArr?.[variantArr?.length - 1]\n\n const isSoldOut =\n !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE || variant?.price === SOLD_OUT_PRICE\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const shouldUseCouponPrice = Boolean(isShowOriginalPrice && coupon)\n const currencyCode = data?.price?.currencyCode || 'USD'\n\n const priceInfo = useMemo(\n () =>\n formatVariantPrice({\n locale,\n amount: shouldUseCouponPrice ? coupon?.variant_price4wscode : variant?.price,\n baseAmount: shouldUseCouponPrice ? variant?.price : 0,\n currencyCode,\n currencyDisplay,\n customFormatPrice: formatPrice,\n }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant, formatPrice]\n )\n\n const { price, basePrice, discount, discountAmount } = priceInfo\n\n const { imageUrl, altText } = getProductImage(data)\n\n const displayTitle = data?.custom_name || data?.title\n const currentDisplayTitle = isShowShortTitle\n ? variant?.metafields?.infos?.page_short_title || displayTitle\n : displayTitle\n const displayDescription = data?.custom_description || data?.description\n\n const showPrice = () => {\n if (coupon?.value_type === 'fixed_amount') {\n const amountStr = discountAmount || ''\n const match = amountStr.match(/^(.*?)(\\d[\\d.,]*)(.*)$/)\n if (match) {\n const [, prefix, numeric, suffix] = match\n let updatedNumeric = numeric\n if (numeric.endsWith('.00')) {\n updatedNumeric = numeric.replace(/\\.00$/, '')\n } else if (numeric.endsWith(',00')) {\n updatedNumeric = numeric.replace(/,00$/, '')\n }\n return `${prefix}${updatedNumeric}${suffix}`\n }\n return amountStr\n }\n return discount || ''\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount || discountAmount) {\n const discountTag = `${showPrice()} ${discounts?.off || discountsCopy?.off || ''}`\n setCurrentPriceTag(discountTag)\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount, discountAmount, discounts?.off, discountsCopy?.off])\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const handlePrimaryClick = async () => {\n if (primaryLoading) return\n if (data?.custom_primary_link) return\n setPrimaryLoading(true)\n try {\n await onPrimaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setPrimaryLoading(false)\n }\n }\n\n const handleSecondaryClick = async () => {\n if (secondaryLoading) return\n if (data?.custom_secondary_link) return\n setSecondaryLoading(true)\n try {\n await onSecondaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setSecondaryLoading(false)\n }\n }\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag && showTags?.length > 0 ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => (\n <Badge key={index} className=\"shelf-items-tag\" variant=\"fill\">\n {item}\n </Badge>\n ))}\n </div>\n ) : null}\n {currentDisplayTitle ? (\n <Heading\n as=\"h3\"\n title={currentDisplayTitle || ''}\n size={2}\n className=\"shelf-display-product-title lg-desktop:h-[58px] text-info-primary line-clamp-2 h-12\"\n html={currentDisplayTitle || ''}\n />\n ) : null}\n <Text\n size={2}\n className=\"lg-desktop:text-lg desktop:h-[24px] lg-desktop:h-[28px] desktop:text-base shelf-display-product-description text-info-primary line-clamp-1 h-[20px] text-sm\"\n html={displayDescription || ''}\n />\n <div className=\"mb-2 mt-4 flex items-center\">\n {renderPrice ? (\n renderPrice(data, { price, basePrice, discount, discountAmount, variant, coupon, isSoldOut })\n ) : isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n {renderOriginalPrice\n ? renderOriginalPrice(data, { price, basePrice, discount, discountAmount })\n : basePrice && (\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n )}\n </>\n )}\n </div>\n {!renderPrice && renderPriceLabel?.(data, variant)}\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.secondaryFun !== 'LearnMore'}\n variant=\"secondary\"\n href={data?.custom_secondary_link}\n as={data?.custom_secondary_link ? 'a' : 'button'}\n onClick={handleSecondaryClick}\n loading={secondaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.primaryFun !== 'LearnMore'}\n variant=\"primary\"\n href={data?.custom_primary_link}\n as={data?.custom_primary_link ? 'a' : 'button'}\n onClick={handlePrimaryClick}\n loading={primaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n const custom_bg_image = data?.custom_bg_image\n const custom_theme = data?.custom_theme\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'box-border w-full cursor-pointer overflow-hidden duration-300',\n 'rounded-box',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px] shelf-display-item',\n custom_bg_image ? 'bg-cover bg-center bg-no-repeat' : 'bg-background tablet:hover:bg-info-white',\n { 'aiui-dark': custom_theme === 'dark' }\n )}\n style={custom_bg_image ? { backgroundImage: `url(${custom_bg_image})` } : undefined}\n >\n {isDisplayBackImage ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture\n source={imageUrl}\n alt={altText}\n className={cn('flex h-full justify-center object-cover [&_img]:w-auto', {\n 'opacity-0': custom_bg_image,\n })}\n />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n {currentPriceTag && isTopTag && (\n <Badge className=\"shelf-prices-tag absolute left-4 top-4 z-10\" variant=\"fill\">\n {currentPriceTag || ''}\n </Badge>\n )}\n <div\n className={cn(\n 'lg-desktop:h-[195px] shelf-display-item-image relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden',\n { 'opacity-0': custom_bg_image }\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}?variant=${variantId}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n source={imageUrl}\n alt={altText}\n className=\"flex h-full justify-center object-cover [&_img]:w-auto\"\n />\n </a>\n </div>\n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const {\n itemShape,\n itemLength,\n metafields,\n isShowShortTitle,\n formatPrice,\n renderOriginalPrice,\n renderPriceLabel,\n renderPrice,\n } = configuration || {}\n const { discounts, discountsCopy } = metafields || {}\n const { locale = 'us', copyWriting, currencyDisplay } = useAiuiContext()\n const [showTags, setShowTags] = useState<string[]>([])\n const ref = useRef<HTMLDivElement>(null)\n const [primaryLoading, setPrimaryLoading] = useState(false)\n const [secondaryLoading, setSecondaryLoading] = useState(false)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { primaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E primaryFun \u503C\uFF09\n if (primaryFun) {\n if (primaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (primaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (primaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.primaryButton?.(params, index + 1, data, coupon)\n }\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { secondaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E secondaryFun \u503C\uFF09\n if (secondaryFun) {\n if (secondaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.secondaryButton?.(params, index + 1, data, coupon)\n }\n\n const variant = useMemo(() => {\n const variants = data?.variants || []\n if (!variants.length) {\n return undefined\n }\n if (!data?.sku) {\n return variants[0]\n }\n return variants.find((item: any) => item?.sku === data?.sku) || variants[0]\n }, [data?.sku, data?.variants])\n\n const variantArr = variant?.id?.split?.('/') || []\n const variantId = variantArr?.[variantArr?.length - 1]\n\n const isSoldOut =\n !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE || variant?.price === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const shouldUseCouponPrice = Boolean(isShowOriginalPrice && coupon)\n const currencyCode = data?.price?.currencyCode || 'USD'\n\n const priceInfo = useMemo(\n () =>\n formatVariantPrice({\n locale,\n amount: shouldUseCouponPrice ? coupon?.variant_price4wscode : variant?.price,\n baseAmount: shouldUseCouponPrice ? variant?.price : 0,\n currencyCode,\n currencyDisplay,\n customFormatPrice: formatPrice,\n }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant, formatPrice]\n )\n\n const { price, basePrice, discount, discountAmount } = priceInfo\n\n const { imageUrl, altText } = getProductImage(data)\n\n const displayTitle = data?.custom_name || data?.title\n const currentDisplayTitle = isShowShortTitle\n ? variant?.metafields?.infos?.page_short_title || displayTitle\n : displayTitle\n const displayDescription = data?.custom_description || data?.description\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const handlePrimaryClick = async () => {\n if (primaryLoading) return\n if (data?.custom_primary_link) return\n setPrimaryLoading(true)\n try {\n await onPrimaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setPrimaryLoading(false)\n }\n }\n\n const handleSecondaryClick = async () => {\n if (secondaryLoading) return\n if (data?.custom_secondary_link) return\n setSecondaryLoading(true)\n try {\n await onSecondaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setSecondaryLoading(false)\n }\n }\n\n const showSizeClass = (): {\n boxItem: string\n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n\n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n const showPrice = () => {\n if (coupon?.value_type === 'fixed_amount') {\n const amountStr = discountAmount || ''\n const match = amountStr.match(/^(.*?)(\\d[\\d.,]*)(.*)$/)\n if (match) {\n const [, prefix, numeric, suffix] = match\n let updatedNumeric = numeric\n if (numeric.endsWith('.00')) {\n updatedNumeric = numeric.replace(/\\.00$/, '')\n } else if (numeric.endsWith(',00')) {\n updatedNumeric = numeric.replace(/,00$/, '')\n }\n return `${prefix}${updatedNumeric}${suffix}`\n }\n return amountStr\n }\n return discount || ''\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount || discountAmount) {\n const discountTag = `${showPrice()} ${discounts?.off || discountsCopy?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount, discountAmount, discounts?.off, discountsCopy?.off])\n\n const custom_bg_image = data?.custom_bg_image\n const custom_theme = data?.custom_theme\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n 'rounded-box',\n 'shelf-display-item',\n 'duration-300',\n 'md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden',\n custom_bg_image ? 'bg-cover bg-center bg-no-repeat' : 'bg-container-secondary-1 tablet:hover:bg-info-white',\n { 'aiui-dark': custom_theme === 'dark' }\n )}\n style={custom_bg_image ? { backgroundImage: `url(${custom_bg_image})` } : undefined}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div\n className={cn(showSizeClass().imgItem, 'desktop:mb-0 relative mb-1 overflow-hidden', {\n 'opacity-0': custom_bg_image,\n })}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}?variant=${variantId}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n source={imageUrl}\n alt={altText}\n className=\"flex h-full justify-center object-cover [&_img]:w-auto\"\n />\n </a>\n </div>\n <div className={cn('flex flex-col items-start justify-center', showSizeClass().boxItem)}>\n {isShowTag && (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.length > 0 &&\n showTags?.map?.((item: any, index: number) => (\n <Badge key={index} className=\"shelf-items-tag\" variant=\"fill\">\n {item}\n </Badge>\n ))}\n </div>\n )}\n {currentDisplayTitle ? (\n <Heading\n as=\"h3\"\n title={currentDisplayTitle || ''}\n size={2}\n className=\"shelf-display-product-title lg-desktop:h-[58px] text-info-primary mb-1 line-clamp-2 h-[48px]\"\n html={currentDisplayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description text-info-primary line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {renderPrice ? (\n renderPrice(data, { price, basePrice, discount, discountAmount, variant, coupon, isSoldOut })\n ) : isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n {renderOriginalPrice\n ? renderOriginalPrice(data, { price, basePrice, discount, discountAmount })\n : basePrice && (\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n )}\n </>\n )}\n </div>\n {!renderPrice && renderPriceLabel?.(data, variant)}\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.secondaryFun !== 'LearnMore'}\n variant=\"secondary\"\n href={data?.custom_secondary_link}\n as={data?.custom_secondary_link ? 'a' : 'button'}\n onClick={handleSecondaryClick}\n loading={secondaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.primaryFun !== 'LearnMore'}\n variant=\"primary\"\n href={data?.custom_primary_link}\n as={data?.custom_primary_link ? 'a' : 'button'}\n onClick={handlePrimaryClick}\n loading={primaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAmNc,OA0BF,YAAAA,GA1BE,OAAAC,EA0BF,QAAAC,MA1BE,oBAnNd,OAAS,kBAAAC,OAAsB,2BAC/B,OAAS,sBAAAC,OAA0B,oBACnC,OAAOC,OAAa,8BACpB,OAAOC,OAAW,4BAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,OAAY,2BACrB,OAAOC,OAAY,6BACnB,OAAS,WAAAC,OAAe,wBACxB,OAAS,eAAAC,OAAmB,8BAC5B,OAAS,WAAAC,OAAe,8BAExB,OAAS,eAAAC,OAAmB,6BAC5B,OAAS,UAAAC,GAAQ,aAAAC,GAAW,WAAAC,GAAS,YAAAC,MAAgB,QAErD,MAAMC,GAAgB,QAChBC,GAAgB,gBAEhBC,GAAiB,aAGVC,GAAmBC,GAAc,CAC5C,MAAMC,EAAMD,GAAM,IACZE,EAAWF,GAAM,SACjBG,EAAUD,GAAU,KAAME,GAAcA,GAAM,MAAQH,CAAG,EACzDI,EAAWF,GAAS,OAAO,KAAOD,IAAW,CAAC,GAAG,OAAO,KAAO,GAC/DI,E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SAAU8D,GAAazC,GAAe,eAAiB,YACvD,QAAQ,YACR,KAAMR,GAAM,sBACZ,GAAIA,GAAM,sBAAwB,IAAM,SACxC,QAASuE,EACT,QAASvC,GACT,UAAWxB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,cACd7B,EAACQ,GAAA,CACC,SAAU8D,GAAazC,GAAe,aAAe,YACrD,QAAQ,UACR,KAAMR,GAAM,oBACZ,GAAIA,GAAM,oBAAsB,IAAM,SACtC,QAASsE,EACT,QAASxC,EACT,UAAWtB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GAxIKR,GAAM,IAAMA,GAAM,MAyIzB,CAEJ",
|
|
4
|
+
"sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef, useEffect, useMemo, useState } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\n// \u516C\u5171\u51FD\u6570\uFF1A\u83B7\u53D6\u4EA7\u54C1\u56FE\u7247URL\u548CaltText\nexport const getProductImage = (data: any) => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n const imageUrl = findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n const altText = findSku?.image?.altText || skuArray?.[0]?.image?.altText || data?.custom_name || data?.title || ''\n\n return {\n imageUrl,\n altText,\n }\n}\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const {\n isDisplayBackImage = false,\n itemShape,\n metafields,\n isTopTag = false,\n isShowTag,\n isShowOriginalPrice,\n isShowShortTitle = false,\n formatPrice,\n renderOriginalPrice,\n renderPriceLabel,\n renderPrice,\n } = configuration || {}\n const { locale = 'es', copyWriting, currencyDisplay } = useAiuiContext()\n const { discounts, discountsCopy } = metafields || {}\n const ref = useRef<HTMLDivElement>(null)\n const [showTags, setShowTags] = useState<string[]>([])\n const [currentPriceTag, setCurrentPriceTag] = useState<string>('')\n const [primaryLoading, setPrimaryLoading] = useState(false)\n const [secondaryLoading, setSecondaryLoading] = useState(false)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { primaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E primaryFun \u503C\uFF09\n if (primaryFun) {\n if (primaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (primaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (primaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.primaryButton?.(params, index + 1, data, coupon)\n }\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { secondaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E secondaryFun \u503C\uFF09\n if (secondaryFun) {\n if (secondaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.secondaryButton?.(params, index + 1, data, coupon)\n }\n\n const variant = useMemo(() => {\n const variants = data?.variants || []\n if (!variants.length) {\n return undefined\n }\n if (!data?.sku) {\n return variants?.[0]\n }\n return variants?.find?.((item: any) => item?.sku === data?.sku) || variants[0]\n }, [data?.sku, data?.variants])\n\n const variantArr = variant?.id?.split?.('/') || []\n const variantId = variantArr?.[variantArr?.length - 1]\n\n const isSoldOut =\n !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE || variant?.price === SOLD_OUT_PRICE\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const shouldUseCouponPrice = Boolean(isShowOriginalPrice && coupon)\n const currencyCode = data?.price?.currencyCode || 'USD'\n\n const priceInfo = useMemo(\n () =>\n formatVariantPrice({\n locale,\n amount: shouldUseCouponPrice ? coupon?.variant_price4wscode : variant?.price,\n baseAmount: shouldUseCouponPrice ? variant?.price : 0,\n currencyCode,\n currencyDisplay,\n customFormatPrice: formatPrice,\n }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant, formatPrice]\n )\n\n const { price, basePrice, discount, discountAmount } = priceInfo\n\n const { imageUrl, altText } = getProductImage(data)\n\n const displayTitle = data?.custom_name || data?.title\n const currentDisplayTitle = isShowShortTitle\n ? variant?.metafields?.infos?.page_short_title || displayTitle\n : displayTitle\n const displayDescription = data?.custom_description || data?.description\n\n const showPrice = () => {\n if (coupon?.value_type === 'fixed_amount') {\n const amountStr = discountAmount || ''\n const match = amountStr.match(/^(.*?)(\\d[\\d.,]*)(.*)$/)\n if (match) {\n const [, prefix, numeric, suffix] = match\n let updatedNumeric = numeric\n if (numeric.endsWith('.00')) {\n updatedNumeric = numeric.replace(/\\.00$/, '')\n } else if (numeric.endsWith(',00')) {\n updatedNumeric = numeric.replace(/,00$/, '')\n }\n return `${prefix}${updatedNumeric}${suffix}`\n }\n return amountStr\n }\n return discount || ''\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount || discountAmount) {\n const discountTag = `${showPrice()} ${discounts?.off || discountsCopy?.off || ''}`\n setCurrentPriceTag(discountTag)\n handleTags.push(discountTag)\n }\n const newTags =\n data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2) || []\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount, discountAmount, discounts?.off, discountsCopy?.off])\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const handlePrimaryClick = async () => {\n if (primaryLoading) return\n if (data?.custom_primary_link) return\n setPrimaryLoading(true)\n try {\n await onPrimaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setPrimaryLoading(false)\n }\n }\n\n const handleSecondaryClick = async () => {\n if (secondaryLoading) return\n if (data?.custom_secondary_link) return\n setSecondaryLoading(true)\n try {\n await onSecondaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setSecondaryLoading(false)\n }\n }\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag && showTags?.length > 0 ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => (\n <Badge key={index} className=\"shelf-items-tag\" variant=\"fill\">\n {item}\n </Badge>\n ))}\n </div>\n ) : null}\n {currentDisplayTitle ? (\n <Heading\n as=\"h3\"\n title={currentDisplayTitle || ''}\n size={2}\n className=\"shelf-display-product-title lg-desktop:h-[58px] text-info-primary line-clamp-2 h-12\"\n html={currentDisplayTitle || ''}\n />\n ) : null}\n <Text\n size={2}\n className=\"lg-desktop:text-lg desktop:h-[24px] lg-desktop:h-[28px] desktop:text-base shelf-display-product-description text-info-primary line-clamp-1 h-[20px] text-sm\"\n html={displayDescription || ''}\n />\n <div className=\"mb-2 mt-4 flex items-center\">\n {renderPrice ? (\n renderPrice(data, { price, basePrice, discount, discountAmount, variant, coupon, isSoldOut })\n ) : isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n {renderOriginalPrice\n ? renderOriginalPrice(data, { price, basePrice, discount, discountAmount })\n : basePrice && (\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n )}\n </>\n )}\n </div>\n {!renderPrice && renderPriceLabel?.(data, variant)}\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.secondaryFun !== 'LearnMore'}\n variant=\"secondary\"\n href={data?.custom_secondary_link}\n as={data?.custom_secondary_link ? 'a' : 'button'}\n onClick={handleSecondaryClick}\n loading={secondaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.primaryFun !== 'LearnMore'}\n variant=\"primary\"\n href={data?.custom_primary_link}\n as={data?.custom_primary_link ? 'a' : 'button'}\n onClick={handlePrimaryClick}\n loading={primaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n const custom_bg_image = data?.custom_bg_image\n const custom_theme = data?.custom_theme\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'box-border w-full cursor-pointer overflow-hidden duration-300',\n 'rounded-box',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px] shelf-display-item',\n custom_bg_image ? 'bg-cover bg-center bg-no-repeat' : 'bg-background tablet:hover:bg-info-white',\n { 'aiui-dark': custom_theme === 'dark' }\n )}\n style={custom_bg_image ? { backgroundImage: `url(${custom_bg_image})` } : undefined}\n >\n {isDisplayBackImage ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture\n source={imageUrl}\n alt={altText}\n className={cn('flex h-full justify-center object-cover [&_img]:w-auto', {\n 'opacity-0': custom_bg_image,\n })}\n />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n {currentPriceTag && isTopTag && (\n <Badge className=\"shelf-prices-tag absolute left-4 top-4 z-10\" variant=\"fill\">\n {currentPriceTag || ''}\n </Badge>\n )}\n <div\n className={cn(\n 'lg-desktop:h-[195px] shelf-display-item-image relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden',\n { 'opacity-0': custom_bg_image }\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}?variant=${variantId}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n source={imageUrl}\n alt={altText}\n className=\"flex h-full justify-center object-cover [&_img]:w-auto\"\n />\n </a>\n </div>\n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const {\n itemShape,\n itemLength,\n metafields,\n isShowShortTitle,\n formatPrice,\n renderOriginalPrice,\n renderPriceLabel,\n renderPrice,\n } = configuration || {}\n const { discounts, discountsCopy } = metafields || {}\n const { locale = 'us', copyWriting, currencyDisplay } = useAiuiContext()\n const [showTags, setShowTags] = useState<string[]>([])\n const ref = useRef<HTMLDivElement>(null)\n const [primaryLoading, setPrimaryLoading] = useState(false)\n const [secondaryLoading, setSecondaryLoading] = useState(false)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { primaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E primaryFun \u503C\uFF09\n if (primaryFun) {\n if (primaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (primaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (primaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.primaryButton?.(params, index + 1, data, coupon)\n }\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => {\n const { secondaryFun, onAddCart, onBuyNow, onLearnMore, event } = configuration || {}\n\n // \u4F18\u5148\u4F7F\u7528 function props\uFF08\u6839\u636E secondaryFun \u503C\uFF09\n if (secondaryFun) {\n if (secondaryFun === 'AddCart' && onAddCart) {\n return onAddCart(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'BuyNow' && onBuyNow) {\n return onBuyNow(params, index + 1, data, coupon)\n }\n if (secondaryFun === 'LearnMore' && onLearnMore) {\n return onLearnMore(params, index + 1, data, coupon)\n }\n }\n\n // \u517C\u5BB9\u65E7\u7684 event \u903B\u8F91\n event?.secondaryButton?.(params, index + 1, data, coupon)\n }\n\n const variant = useMemo(() => {\n const variants = data?.variants || []\n if (!variants.length) {\n return undefined\n }\n if (!data?.sku) {\n return variants[0]\n }\n return variants.find((item: any) => item?.sku === data?.sku) || variants[0]\n }, [data?.sku, data?.variants])\n\n const variantArr = variant?.id?.split?.('/') || []\n const variantId = variantArr?.[variantArr?.length - 1]\n\n const isSoldOut =\n !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE || variant?.price === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const shouldUseCouponPrice = Boolean(isShowOriginalPrice && coupon)\n const currencyCode = data?.price?.currencyCode || 'USD'\n\n const priceInfo = useMemo(\n () =>\n formatVariantPrice({\n locale,\n amount: shouldUseCouponPrice ? coupon?.variant_price4wscode : variant?.price,\n baseAmount: shouldUseCouponPrice ? variant?.price : 0,\n currencyCode,\n currencyDisplay,\n customFormatPrice: formatPrice,\n }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant, formatPrice]\n )\n\n const { price, basePrice, discount, discountAmount } = priceInfo\n\n const { imageUrl, altText } = getProductImage(data)\n\n const displayTitle = data?.custom_name || data?.title\n const currentDisplayTitle = isShowShortTitle\n ? variant?.metafields?.infos?.page_short_title || displayTitle\n : displayTitle\n const displayDescription = data?.custom_description || data?.description\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const handlePrimaryClick = async () => {\n if (primaryLoading) return\n if (data?.custom_primary_link) return\n setPrimaryLoading(true)\n try {\n await onPrimaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setPrimaryLoading(false)\n }\n }\n\n const handleSecondaryClick = async () => {\n if (secondaryLoading) return\n if (data?.custom_secondary_link) return\n setSecondaryLoading(true)\n try {\n await onSecondaryButton(data, configuration?.index, configuration, coupon)\n } finally {\n setSecondaryLoading(false)\n }\n }\n\n const showSizeClass = (): {\n boxItem: string\n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n\n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n const showPrice = () => {\n if (coupon?.value_type === 'fixed_amount') {\n const amountStr = discountAmount || ''\n const match = amountStr.match(/^(.*?)(\\d[\\d.,]*)(.*)$/)\n if (match) {\n const [, prefix, numeric, suffix] = match\n let updatedNumeric = numeric\n if (numeric.endsWith('.00')) {\n updatedNumeric = numeric.replace(/\\.00$/, '')\n } else if (numeric.endsWith(',00')) {\n updatedNumeric = numeric.replace(/,00$/, '')\n }\n return `${prefix}${updatedNumeric}${suffix}`\n }\n return amountStr\n }\n return discount || ''\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount || discountAmount) {\n const discountTag = `${showPrice()} ${discounts?.off || discountsCopy?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags =\n data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2) || []\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount, discountAmount, discounts?.off, discountsCopy?.off])\n\n const custom_bg_image = data?.custom_bg_image\n const custom_theme = data?.custom_theme\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n 'rounded-box',\n 'shelf-display-item',\n 'duration-300',\n 'md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden',\n custom_bg_image ? 'bg-cover bg-center bg-no-repeat' : 'bg-container-secondary-1 tablet:hover:bg-info-white',\n { 'aiui-dark': custom_theme === 'dark' }\n )}\n style={custom_bg_image ? { backgroundImage: `url(${custom_bg_image})` } : undefined}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div\n className={cn(showSizeClass().imgItem, 'desktop:mb-0 relative mb-1 overflow-hidden', {\n 'opacity-0': custom_bg_image,\n })}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}?variant=${variantId}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n source={imageUrl}\n alt={altText}\n className=\"flex h-full justify-center object-cover [&_img]:w-auto\"\n />\n </a>\n </div>\n <div className={cn('flex flex-col items-start justify-center', showSizeClass().boxItem)}>\n {isShowTag && (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.length > 0 &&\n showTags?.map?.((item: any, index: number) => (\n <Badge key={index} className=\"shelf-items-tag\" variant=\"fill\">\n {item}\n </Badge>\n ))}\n </div>\n )}\n {currentDisplayTitle ? (\n <Heading\n as=\"h3\"\n title={currentDisplayTitle || ''}\n size={2}\n className=\"shelf-display-product-title lg-desktop:h-[58px] text-info-primary mb-1 line-clamp-2 h-[48px]\"\n html={currentDisplayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description text-info-primary line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {renderPrice ? (\n renderPrice(data, { price, basePrice, discount, discountAmount, variant, coupon, isSoldOut })\n ) : isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n {renderOriginalPrice\n ? renderOriginalPrice(data, { price, basePrice, discount, discountAmount })\n : basePrice && (\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n )}\n </>\n )}\n </div>\n {!renderPrice && renderPriceLabel?.(data, variant)}\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.secondaryFun !== 'LearnMore'}\n variant=\"secondary\"\n href={data?.custom_secondary_link}\n as={data?.custom_secondary_link ? 'a' : 'button'}\n onClick={handleSecondaryClick}\n loading={secondaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n disabled={isSoldOut && configuration?.primaryFun !== 'LearnMore'}\n variant=\"primary\"\n href={data?.custom_primary_link}\n as={data?.custom_primary_link ? 'a' : 'button'}\n onClick={handlePrimaryClick}\n loading={primaryLoading}\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAoNc,OA0BF,YAAAA,GA1BE,OAAAC,EA0BF,QAAAC,MA1BE,oBApNd,OAAS,kBAAAC,OAAsB,2BAC/B,OAAS,sBAAAC,OAA0B,oBACnC,OAAOC,OAAa,8BACpB,OAAOC,OAAW,4BAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,OAAY,2BACrB,OAAOC,OAAY,6BACnB,OAAS,WAAAC,OAAe,wBACxB,OAAS,eAAAC,OAAmB,8BAC5B,OAAS,WAAAC,OAAe,8BAExB,OAAS,eAAAC,OAAmB,6BAC5B,OAAS,UAAAC,GAAQ,aAAAC,GAAW,WAAAC,GAAS,YAAAC,MAAgB,QAErD,MAAMC,GAAgB,QAChBC,GAAgB,gBAEhBC,GAAiB,aAGVC,GAAmBC,GAAc,CAC5C,MAAMC,EAAMD,GAAM,IACZE,EAAWF,GAAM,SACjBG,EAAUD,GAAU,KAAME,GAAcA,GAA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ACC,UAAWK,EACT,0BACA,2CACAuB,EAAc,YAAc,WAAa,WAAa,EACxD,EAEC,UAAAA,GAAe,gBACd7B,EAACQ,GAAA,CACC,SAAU8D,GAAazC,GAAe,eAAiB,YACvD,QAAQ,YACR,KAAMR,GAAM,sBACZ,GAAIA,GAAM,sBAAwB,IAAM,SACxC,QAASuE,EACT,QAASvC,GACT,UAAWxB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,cACd7B,EAACQ,GAAA,CACC,SAAU8D,GAAazC,GAAe,aAAe,YACrD,QAAQ,UACR,KAAMR,GAAM,oBACZ,GAAIA,GAAM,oBAAsB,IAAM,SACtC,QAASsE,EACT,QAASxC,EACT,UAAWtB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GAxIKR,GAAM,IAAMA,GAAM,MAyIzB,CAEJ",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "useAiuiContext", "formatVariantPrice", "Picture", "Badge", "cn", "Text", "Button", "gaTrack", "trackUrlRef", "Heading", "useExposure", "useRef", "useEffect", "useMemo", "useState", "componentType", "componentName", "SOLD_OUT_PRICE", "getProductImage", "data", "sku", "skuArray", "findSku", "item", "imageUrl", "altText", "ShelfDisplayWrapItem", "configuration", "isDisplayBackImage", "itemShape", "metafields", "isTopTag", "isShowTag", "isShowOriginalPrice", "isShowShortTitle", "formatPrice", "renderOriginalPrice", "renderPriceLabel", "renderPrice", "locale", "copyWriting", "currencyDisplay", "discounts", "discountsCopy", "ref", "showTags", "setShowTags", "currentPriceTag", "setCurrentPriceTag", "primaryLoading", "setPrimaryLoading", "secondaryLoading", "setSecondaryLoading", "onPrimaryButton", "params", "index", "coupon", "primaryFun", "onAddCart", "onBuyNow", "onLearnMore", "event", "onSecondaryButton", "secondaryFun", "variant", "variants", "variantArr", "variantId", "isSoldOut", "shouldUseCouponPrice", "currencyCode", "priceInfo", "price", "basePrice", "discount", "discountAmount", "displayTitle", "currentDisplayTitle", "displayDescription", "showPrice", "amountStr", "match", "prefix", "numeric", "suffix", "updatedNumeric", "handleTags", "discountTag", "newTags", "handlePrimaryClick", "handleSecondaryClick", "bottomContent", "custom_bg_image", "custom_theme", "ShelfDisplayHorizontalItem", "itemLength", "showSizeClass", "handleWrapClass"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { AccessoriesProductGrid, SectionHeader, PromoBanner, MainProductArea, AddToCartSuccessPopover, } from './AccessoriesShelf/index.js';
|
|
2
|
+
export type { UserType, BannerConfig, BannerAction, AddToCartSuccessPopoverProps, AddToCartSuccessCopyConfig, AddToCartSuccessSemanticName, } from './AccessoriesShelf/index.js';
|
|
1
3
|
export { default as ActivitySchedule } from './ActivitySchedule/index.js';
|
|
2
4
|
export type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js';
|
|
3
5
|
export { default as GiftShelf } from './GiftShelf/index.js';
|
|
@@ -140,6 +142,8 @@ export type { MediaTextOverlayProps, MediaTextOverlayData, MediaTextOverlayItem,
|
|
|
140
142
|
export type { CopyConfig as MediaShelfCopyConfig, ButtonFunctionType as MediaShelfButtonFunctionType, } from './MediaShelf/types.js';
|
|
141
143
|
export type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js';
|
|
142
144
|
export { default as ImageOverlayShelf, type ButtonFunctionType as ImageOverlayShelfButtonFunctionType, } from './ImageOverlayShelf/index.js';
|
|
145
|
+
export { default as AccessoryShelf, AccessoryProductCard } from './AccessoriesShelf/components/AccessoryShelf/index.js';
|
|
146
|
+
export type { AccessoryShelfProps, AccessoryProductData, AccessoryCardSemanticName, AccessoryCopyConfig, AccessoryProductCardProps, } from './AccessoriesShelf/components/AccessoryShelf';
|
|
143
147
|
export { default as ImageTextOverlay } from './ImageTextOverlay/index.js';
|
|
144
148
|
export type { ImageTextOverlayProps, ImageTextOverlayData, ImageTextOverlayItem, ImageTextOverlaySemanticName, ImageTextOverlayBackgroundImage, } from './ImageTextOverlay/types.js';
|
|
145
149
|
export { default as MiniCart } from './MiniCart/index.js';
|
|
@@ -204,6 +208,8 @@ export declare const PAYLOAD_COMPONENT_MAP: {
|
|
|
204
208
|
'ipc-media-text-overlay': string;
|
|
205
209
|
ProductCompare: string;
|
|
206
210
|
};
|
|
211
|
+
export { CartSummaryHeader, CartItemRow, CartGiftSection, CartPerksSection, CartThirdPartyBanner, CartPriceSummary, } from './CartDetail/index.js';
|
|
212
|
+
export type { CartSummaryHeaderProps, CartItemRowProps, CartGiftSectionProps, CartPerksSectionProps, CartPerk, CartThirdPartyProps, GiftOption, GiftSlotConfig, CartPriceSummaryProps, } from './CartDetail/index.js';
|
|
207
213
|
export { useAiuiContext } from './AiuiProvider/index.js';
|
|
208
214
|
export type { ContainerProps } from '../shared/Styles.js';
|
|
209
215
|
export { default as ModalRegisterSubscribe } from './ModalRegisterSubscribe/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as o}from"./ActivitySchedule/index.js";import{default as i}from"./GiftShelf/index.js";import{default as s}from"./GiftTierShelf/index.js";import{default as d}from"./ActivityMechanism/index.js";import{default as u}from"./BrandEquity/index.js";import{default as l}from"./MemberEquity/index.js";import{default as x}from"./Slogan/index.js";import{default as P}from"./Title/index.js";import{default as h}from"./Spacer/index.js";import{default as g}from"./ShelfDisplay/index.js";import{default as B}from"./Evaluate/index.js";import{default as T}from"./Category/index.js";import{default as j}from"./HeroBanner/index.js";import{default as F}from"./AccordionCards/index.js";import{default as G}from"./Graphic/index.js";import{default as L}from"./MediaPlayerBase/index.js";import{default as V}from"./MediaPlayerSticky/index.js";import{default as O}from"./MediaPlayerMulti/index.js";import{default as E}from"./Marquee/index.js";import{default as q}from"./MarqueeReview/index.js";import{default as H}from"./WhyChoose/index.js";import{default as _}from"./Faq/index.js";import{MarqueeItem as U,MarqueeImageContent as Y,MarqueeTextContent as J}from"./Marquee/index.js";import{default as X}from"./MultiLayoutGraphicBlock/index.js";import{default as $}from"./GraphicAttractionBlock/index.js";import{default as te}from"./HeaderNavigation/index.js";import{default as oe}from"./FooterNavigation/index.js";import{default as ie}from"./SearchPage/index.js";import{IPC_SEARCH_PAGE as se,SearchPageTabType as fe}from"./SearchPage/types.js";import{withLayout as ce}from"../shared/Styles.js";import{default as ne}from"./AiuiProvider/index.js";import{default as me}from"./Tabs/index.js";import{default as ye}from"./SwiperBox/index.js";import{VideoModal as Se}from"./VideoModal/index.js";import{default as Ce}from"./CreativeModule/index.js";import{default as Me}from"./GraphicOverlay/index.js";import{default as ve}from"./Specs/index.js";import{default as Ie}from"./TabsGroup/index.js";import{default as be,useBizProductContext as Fe}from"./Listing/BizProductProvider.js";import{default as Ge}from"./Listing/components/PurchaseBar/index.js";import{default as Le}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as Ve}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as Oe}from"./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js";import{default as Ee}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as qe}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as He}from"./Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js";import{default as _e}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as Ue}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as Je}from"./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js";import{default as Xe}from"./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js";import{default as $e}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as tt}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as ot}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as it}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab.js";import{default as st}from"./Listing/components/PaidShipping/index.js";import{default as dt}from"./Listing/components/CartActionButtons/index.js";import{NotifyMeDialog as ut}from"./NotifyMeDialog/index.js";import{default as lt}from"./Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js";import{default as xt}from"./Listing/components/ProductCard/ProductPaidShipping/index.js";import{default as Pt}from"./GraphicMore/index.js";import{default as ht}from"./Features/index.js";import{default as gt}from"./AplusDesc/index.js";import{default as Bt}from"./GiftBox/index.js";import{default as Tt}from"./SelectStore/index.js";import{default as jt}from"./DownLoad/index.js";import{default as Ft}from"./FootCharger/index.js";import{default as Gt}from"./BrandCardLink/index.js";import*as At from"./IPRedirect/index.js";import{default as kt}from"./WheelLottery/index.js";import{default as wt}from"./ProductLottery/index.js";import{default as Wt}from"./ProductCompare/index.js";import{default as Nt}from"./Ksp/index.js";import{default as Rt}from"./ImageTextFeature/index.js";import{default as Kt}from"./FeatureCards/index.js";import{default as zt}from"./FeaturedBlogPosts/index.js";import{default as Yt}from"./ImageWithText/index.js";import{default as Qt}from"./VideoFeature/index.js";import{default as Zt}from"./TabsWithMedia/index.js";import{default as er}from"./TabWithImage/index.js";import{default as rr}from"./FeatureShowcase/index.js";import{default as ar}from"./ProductHero/index.js";import{default as pr}from"./SpecsComparison/index.js";import{default as fr}from"./MediaSceneSwitcher/index.js";import{default as cr}from"./MediaSceneSwitcherV2/index.js";import{default as nr}from"./ThreeDCarousel/index.js";import{default as mr}from"./ProductNav/index.js";import{default as yr}from"./AnchorNavigation/index.js";import{default as Sr}from"./PromotionalBar/index.js";import{default as Cr}from"./EventSchedule/index.js";import{default as Mr}from"./SecondaryBanner/index.js";import{default as vr}from"./BuyOneGetOneShelf/index.js";import{default as Ir}from"./ActiveShelf/index.js";import{default as br}from"./MediaShelf/index.js";import{default as Dr,CreditsProductCard as Gr}from"./CreditsShelf/index.js";import{default as Lr,SceneProductCard as kr}from"./SceneShelf/index.js";import{default as wr,SceneShelfV2ProductCard as Or}from"./SceneShelfV2/index.js";import{default as Er}from"./SceneShelfV3/index.js";import{default as qr}from"./MediaEndorsement/index.js";import{default as Hr}from"./MediaTextOverlay/index.js";import{default as _r}from"./ImageOverlayShelf/index.js";import{default as Ur}from"./ImageTextOverlay/index.js";import{default as Jr}from"./MiniCart/index.js";import{default as Xr}from"./MiniCart/CircleProgress.js";import{default as $r,MiniCartDialog as eo}from"./MiniCart/MiniCartDialog.js";import{default as ro}from"./WebPushPopup/index.js";import{useEmarsysWebPush as ao}from"../hooks/useEmarsysWebPush.js";const e={"ipc-accordioncards":"AccordionCards","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-collection-banner":"CollectionBanner","ipc-collection-shelves":"CollectionShelves","ipc-creativemodule":"CreativeModule","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-giftshelf":"GiftShelf","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose","ipc-product-nav":"ProductNav","ipc-brand-card-link":"BrandCardLink","ipc-ipredirect":"IPRedirect",ksp:"Ksp","ipc-secondary-banner":"SecondaryBanner","ipc-media-endorsement":"MediaEndorsement","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-featured-blog-posts":"FeaturedBlogPosts","ipc-media-text-overlay":"MediaTextOverlay",ProductCompare:"ProductCompare"};import{useAiuiContext as po}from"./AiuiProvider/index.js";import{default as fo}from"./ModalRegisterSubscribe/index.js";import{default as uo}from"./ModalSubscribeConfirm/index.js";import{default as lo}from"./ModalCoupon/index.js";import{default as xo}from"./ModalSmsSubscribe/index.js";import{default as Po}from"./ModalVerify/index.js";export{F as AccordionCards,Ir as ActiveShelf,d as ActivityMechanism,o as ActivitySchedule,ne as AiuiProvider,yr as AnchorNavigation,gt as AplusDesc,it as BenefitsTab,be as BizProductProvider,Gt as BrandCardLink,u as BrandEquity,vr as BuyOneGetOneShelf,dt as CartActionButtons,T as Category,Ce as CreativeModule,Gr as CreditsProductCard,Dr as CreditsShelf,jt as DownLoad,B as Evaluate,Cr as EventSchedule,_ as Faq,Kt as FeatureCards,rr as FeatureShowcase,zt as FeaturedBlogPosts,ht as Features,Ft as FootCharger,oe as FooterNavigation,Bt as GiftBox,i as GiftShelf,s as GiftTierShelf,G as Graphic,$ as GraphicAttractionBlock,Pt as GraphicMore,Me as GraphicOverlay,te as HeaderNavigation,j as HeroBanner,se as IPC_SEARCH_PAGE,At as IPRedirect,_r as ImageOverlayShelf,Rt as ImageTextFeature,Ur as ImageTextOverlay,Yt as ImageWithText,Nt as Ksp,E as Marquee,Y as MarqueeImageContent,U as MarqueeItem,q as MarqueeReview,J as MarqueeTextContent,qr as MediaEndorsement,L as MediaPlayerBase,O as MediaPlayerMulti,V as MediaPlayerSticky,fr as MediaSceneSwitcher,cr as MediaSceneSwitcherV2,br as MediaShelf,Hr as MediaTextOverlay,l as MemberEquity,Jr as MiniCart,Xr as MiniCartCircleProgress,$r as MiniCartDialog,eo as MiniCartDialogComponent,lo as ModalCoupon,fo as ModalRegisterSubscribe,xo as ModalSmsSubscribe,uo as ModalSubscribeConfirm,Po as ModalVerify,X as MultiLayoutGraphicBlock,ut as NotifyMeDialog,e as PAYLOAD_COMPONENT_MAP,st as PaidShipping,Le as ProductActions,Xe as ProductBanner,Oe as ProductBenefits,Ve as ProductBenefitsTabs,Ue as ProductBundle,Wt as ProductCompare,Je as ProductCoupon,qe as ProductFreeGift,He as ProductFunctionFreeGift,tt as ProductGallery,$e as ProductGridBox,ar as ProductHero,Ee as ProductHighlight,wt as ProductLottery,mr as ProductNav,_e as ProductOptions,xt as ProductPaidShipping,lt as ProductServiceBenefits,ot as ProductSummary,Sr as PromotionalBar,Ge as PurchaseBar,kr as SceneProductCard,Lr as SceneShelf,wr as SceneShelfV2,Or as SceneShelfV2ProductCard,Er as SceneShelfV3,ie as SearchPage,fe as SearchPageTabType,Mr as SecondaryBanner,Tt as SelectStore,g as ShelfDisplay,x as Slogan,h as Spacer,ve as Specs,pr as SpecsComparison,ye as SwiperBox,Ie as TabGroup,er as TabWithImage,me as Tabs,Zt as TabsWithMedia,nr as ThreeDCarousel,P as Title,Qt as VideoFeature,Se as VideoModal,ro as WebPushPopup,kt as WheelLottery,H as WhyChoose,po as useAiuiContext,Fe as useBizProductContext,ao as useEmarsysWebPush,ce as withLayout};
|
|
1
|
+
import{AccessoriesProductGrid as o,SectionHeader as a,PromoBanner as i,MainProductArea as s,AddToCartSuccessPopover as p}from"./AccessoriesShelf/index.js";import{default as d}from"./ActivitySchedule/index.js";import{default as n}from"./GiftShelf/index.js";import{default as m}from"./GiftTierShelf/index.js";import{default as x}from"./ActivityMechanism/index.js";import{default as P}from"./BrandEquity/index.js";import{default as h}from"./MemberEquity/index.js";import{default as g}from"./Slogan/index.js";import{default as B}from"./Title/index.js";import{default as T}from"./Spacer/index.js";import{default as A}from"./ShelfDisplay/index.js";import{default as b}from"./Evaluate/index.js";import{default as F}from"./Category/index.js";import{default as k}from"./HeroBanner/index.js";import{default as w}from"./AccordionCards/index.js";import{default as O}from"./Graphic/index.js";import{default as W}from"./MediaPlayerBase/index.js";import{default as q}from"./MediaPlayerSticky/index.js";import{default as H}from"./MediaPlayerMulti/index.js";import{default as U}from"./Marquee/index.js";import{default as z}from"./MarqueeReview/index.js";import{default as J}from"./WhyChoose/index.js";import{default as X}from"./Faq/index.js";import{MarqueeItem as $,MarqueeImageContent as ee,MarqueeTextContent as te}from"./Marquee/index.js";import{default as oe}from"./MultiLayoutGraphicBlock/index.js";import{default as ie}from"./GraphicAttractionBlock/index.js";import{default as pe}from"./HeaderNavigation/index.js";import{default as de}from"./FooterNavigation/index.js";import{default as ne}from"./SearchPage/index.js";import{IPC_SEARCH_PAGE as me,SearchPageTabType as le}from"./SearchPage/types.js";import{withLayout as ye}from"../shared/Styles.js";import{default as Se}from"./AiuiProvider/index.js";import{default as Ce}from"./Tabs/index.js";import{default as Me}from"./SwiperBox/index.js";import{VideoModal as ve}from"./VideoModal/index.js";import{default as Ie}from"./CreativeModule/index.js";import{default as je}from"./GraphicOverlay/index.js";import{default as De}from"./Specs/index.js";import{default as Ge}from"./TabsGroup/index.js";import{default as Le,useBizProductContext as we}from"./Listing/BizProductProvider.js";import{default as Oe}from"./Listing/components/PurchaseBar/index.js";import{default as We}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as qe}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as He}from"./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js";import{default as Ue}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as ze}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as Je}from"./Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js";import{default as Xe}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as $e}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as tt}from"./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js";import{default as ot}from"./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js";import{default as it}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as pt}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as dt}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as nt}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab.js";import{default as mt}from"./Listing/components/PaidShipping/index.js";import{default as xt}from"./Listing/components/CartActionButtons/index.js";import{NotifyMeDialog as Pt}from"./NotifyMeDialog/index.js";import{default as ht}from"./Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js";import{default as gt}from"./Listing/components/ProductCard/ProductPaidShipping/index.js";import{default as Bt}from"./GraphicMore/index.js";import{default as Tt}from"./Features/index.js";import{default as At}from"./AplusDesc/index.js";import{default as bt}from"./GiftBox/index.js";import{default as Ft}from"./SelectStore/index.js";import{default as kt}from"./DownLoad/index.js";import{default as wt}from"./FootCharger/index.js";import{default as Ot}from"./BrandCardLink/index.js";import*as Nt from"./IPRedirect/index.js";import{default as Et}from"./WheelLottery/index.js";import{default as Rt}from"./ProductLottery/index.js";import{default as Kt}from"./ProductCompare/index.js";import{default as _t}from"./Ksp/index.js";import{default as Yt}from"./ImageTextFeature/index.js";import{default as Qt}from"./FeatureCards/index.js";import{default as Zt}from"./FeaturedBlogPosts/index.js";import{default as er}from"./ImageWithText/index.js";import{default as rr}from"./VideoFeature/index.js";import{default as ar}from"./TabsWithMedia/index.js";import{default as sr}from"./TabWithImage/index.js";import{default as fr}from"./FeatureShowcase/index.js";import{default as cr}from"./ProductHero/index.js";import{default as ur}from"./SpecsComparison/index.js";import{default as lr}from"./MediaSceneSwitcher/index.js";import{default as yr}from"./MediaSceneSwitcherV2/index.js";import{default as Sr}from"./ThreeDCarousel/index.js";import{default as Cr}from"./ProductNav/index.js";import{default as Mr}from"./AnchorNavigation/index.js";import{default as vr}from"./PromotionalBar/index.js";import{default as Ir}from"./EventSchedule/index.js";import{default as jr}from"./SecondaryBanner/index.js";import{default as Dr}from"./BuyOneGetOneShelf/index.js";import{default as Gr}from"./ActiveShelf/index.js";import{default as Lr}from"./MediaShelf/index.js";import{default as Vr,CreditsProductCard as Or}from"./CreditsShelf/index.js";import{default as Wr,SceneProductCard as Er}from"./SceneShelf/index.js";import{default as Rr,SceneShelfV2ProductCard as Hr}from"./SceneShelfV2/index.js";import{default as Ur}from"./SceneShelfV3/index.js";import{default as zr}from"./MediaEndorsement/index.js";import{default as Jr}from"./MediaTextOverlay/index.js";import{default as Xr}from"./ImageOverlayShelf/index.js";import{default as $r,AccessoryProductCard as eo}from"./AccessoriesShelf/components/AccessoryShelf/index.js";import{default as ro}from"./ImageTextOverlay/index.js";import{default as ao}from"./MiniCart/index.js";import{default as so}from"./MiniCart/CircleProgress.js";import{default as fo,MiniCartDialog as co}from"./MiniCart/MiniCartDialog.js";import{default as uo}from"./WebPushPopup/index.js";import{useEmarsysWebPush as lo}from"../hooks/useEmarsysWebPush.js";const e={"ipc-accordioncards":"AccordionCards","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-collection-banner":"CollectionBanner","ipc-collection-shelves":"CollectionShelves","ipc-creativemodule":"CreativeModule","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-giftshelf":"GiftShelf","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose","ipc-product-nav":"ProductNav","ipc-brand-card-link":"BrandCardLink","ipc-ipredirect":"IPRedirect",ksp:"Ksp","ipc-secondary-banner":"SecondaryBanner","ipc-media-endorsement":"MediaEndorsement","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-featured-blog-posts":"FeaturedBlogPosts","ipc-media-text-overlay":"MediaTextOverlay",ProductCompare:"ProductCompare"};import{CartSummaryHeader as yo,CartItemRow as Po,CartGiftSection as So,CartPerksSection as ho,CartThirdPartyBanner as Co,CartPriceSummary as go}from"./CartDetail/index.js";import{useAiuiContext as Bo}from"./AiuiProvider/index.js";import{default as To}from"./ModalRegisterSubscribe/index.js";import{default as Ao}from"./ModalSubscribeConfirm/index.js";import{default as bo}from"./ModalCoupon/index.js";import{default as Fo}from"./ModalSmsSubscribe/index.js";import{default as ko}from"./ModalVerify/index.js";export{o as AccessoriesProductGrid,eo as AccessoryProductCard,$r as AccessoryShelf,w as AccordionCards,Gr as ActiveShelf,x as ActivityMechanism,d as ActivitySchedule,p as AddToCartSuccessPopover,Se as AiuiProvider,Mr as AnchorNavigation,At as AplusDesc,nt as BenefitsTab,Le as BizProductProvider,Ot as BrandCardLink,P as BrandEquity,Dr as BuyOneGetOneShelf,xt as CartActionButtons,So as CartGiftSection,Po as CartItemRow,ho as CartPerksSection,go as CartPriceSummary,yo as CartSummaryHeader,Co as CartThirdPartyBanner,F as Category,Ie as CreativeModule,Or as CreditsProductCard,Vr as CreditsShelf,kt as DownLoad,b as Evaluate,Ir as EventSchedule,X as Faq,Qt as FeatureCards,fr as FeatureShowcase,Zt as FeaturedBlogPosts,Tt as Features,wt as FootCharger,de as FooterNavigation,bt as GiftBox,n as GiftShelf,m as GiftTierShelf,O as Graphic,ie as GraphicAttractionBlock,Bt as GraphicMore,je as GraphicOverlay,pe as HeaderNavigation,k as HeroBanner,me as IPC_SEARCH_PAGE,Nt as IPRedirect,Xr as ImageOverlayShelf,Yt as ImageTextFeature,ro as ImageTextOverlay,er as ImageWithText,_t as Ksp,s as MainProductArea,U as Marquee,ee as MarqueeImageContent,$ as MarqueeItem,z as MarqueeReview,te as MarqueeTextContent,zr as MediaEndorsement,W as MediaPlayerBase,H as MediaPlayerMulti,q as MediaPlayerSticky,lr as MediaSceneSwitcher,yr as MediaSceneSwitcherV2,Lr as MediaShelf,Jr as MediaTextOverlay,h as MemberEquity,ao as MiniCart,so as MiniCartCircleProgress,fo as MiniCartDialog,co as MiniCartDialogComponent,bo as ModalCoupon,To as ModalRegisterSubscribe,Fo as ModalSmsSubscribe,Ao as ModalSubscribeConfirm,ko as ModalVerify,oe as MultiLayoutGraphicBlock,Pt as NotifyMeDialog,e as PAYLOAD_COMPONENT_MAP,mt as PaidShipping,We as ProductActions,ot as ProductBanner,He as ProductBenefits,qe as ProductBenefitsTabs,$e as ProductBundle,Kt as ProductCompare,tt as ProductCoupon,ze as ProductFreeGift,Je as ProductFunctionFreeGift,pt as ProductGallery,it as ProductGridBox,cr as ProductHero,Ue as ProductHighlight,Rt as ProductLottery,Cr as ProductNav,Xe as ProductOptions,gt as ProductPaidShipping,ht as ProductServiceBenefits,dt as ProductSummary,i as PromoBanner,vr as PromotionalBar,Oe as PurchaseBar,Er as SceneProductCard,Wr as SceneShelf,Rr as SceneShelfV2,Hr as SceneShelfV2ProductCard,Ur as SceneShelfV3,ne as SearchPage,le as SearchPageTabType,jr as SecondaryBanner,a as SectionHeader,Ft as SelectStore,A as ShelfDisplay,g as Slogan,T as Spacer,De as Specs,ur as SpecsComparison,Me as SwiperBox,Ge as TabGroup,sr as TabWithImage,Ce as Tabs,ar as TabsWithMedia,Sr as ThreeDCarousel,B as Title,rr as VideoFeature,ve as VideoModal,uo as WebPushPopup,Et as WheelLottery,J as WhyChoose,Bo as useAiuiContext,we as useBizProductContext,lo as useEmarsysWebPush,ye as withLayout};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|