@anker-in/headless-ui 1.2.2 → 1.2.3
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/Faq/Faq.js +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +5 -0
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +11 -4
- package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
- package/dist/cjs/biz-components/Marquee/Marquee.js.map +3 -3
- package/dist/cjs/biz-components/Marquee/index.d.ts +1 -1
- package/dist/cjs/biz-components/Marquee/index.js +1 -1
- package/dist/cjs/biz-components/Marquee/index.js.map +2 -2
- package/dist/cjs/biz-components/Marquee/type.d.ts +22 -4
- package/dist/cjs/biz-components/Marquee/type.js +1 -1
- package/dist/cjs/biz-components/Marquee/type.js.map +1 -1
- package/dist/cjs/biz-components/Media/index.js +1 -1
- package/dist/cjs/biz-components/Media/index.js.map +2 -2
- package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.d.ts +9 -0
- package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js +2 -0
- package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +7 -0
- package/dist/cjs/biz-components/MediaTextOverlay/index.d.ts +2 -0
- package/dist/cjs/biz-components/MediaTextOverlay/index.js +2 -0
- package/dist/cjs/biz-components/MediaTextOverlay/index.js.map +7 -0
- package/dist/cjs/biz-components/MediaTextOverlay/types.d.ts +24 -0
- package/dist/cjs/biz-components/MediaTextOverlay/types.js +2 -0
- package/dist/cjs/biz-components/MediaTextOverlay/types.js.map +7 -0
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +1 -0
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/index.d.ts +2 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/esm/biz-components/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/types.d.ts +5 -0
- 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/Marquee/Marquee.d.ts +11 -4
- package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
- package/dist/esm/biz-components/Marquee/Marquee.js.map +3 -3
- package/dist/esm/biz-components/Marquee/index.d.ts +1 -1
- package/dist/esm/biz-components/Marquee/index.js +1 -1
- package/dist/esm/biz-components/Marquee/index.js.map +3 -3
- package/dist/esm/biz-components/Marquee/type.d.ts +22 -4
- package/dist/esm/biz-components/Media/index.js +1 -1
- package/dist/esm/biz-components/Media/index.js.map +2 -2
- package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.d.ts +9 -0
- package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js +2 -0
- package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +7 -0
- package/dist/esm/biz-components/MediaTextOverlay/index.d.ts +2 -0
- package/dist/esm/biz-components/MediaTextOverlay/index.js +2 -0
- package/dist/esm/biz-components/MediaTextOverlay/index.js.map +7 -0
- package/dist/esm/biz-components/MediaTextOverlay/types.d.ts +24 -0
- package/dist/esm/biz-components/MediaTextOverlay/types.js +1 -0
- package/dist/esm/biz-components/MediaTextOverlay/types.js.map +7 -0
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +1 -0
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/index.d.ts +2 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/package.json +1 -1
- package/style.css +49 -8
- package/tailwind.config.js +10 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ShelfDisplay/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger } from '../../components/tabs.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useRollout } from '../../hooks/useRollout.js'\nimport { ShelfDisplayWrapItem, ShelfDisplayHorizontalItem } from './shelfDisplayItem.js'\nimport type { ShelfDisplayProps, ShelfDisplayItem } from './shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst sanitizeCssSelector = (value?: string | number) => {\n if (value === undefined || value === null) return 'default'\n const sanitized = String(value).replace(/[^a-zA-Z0-9_-]/g, '')\n return sanitized || 'default'\n}\n\nconst createInstanceId = () => `shelf-display-${Math.random().toString(36).slice(2, 9)}`\n\nconst ShelfDisplay = React.forwardRef<HTMLDivElement, ShelfDisplayProps>(\n (\n {\n key,\n data,\n event,\n buildData,\n breakpoints,\n className = '',\n recommendedData,\n target = '_self',\n metafields,\n isDisplayGudgments = false,\n isDisplayBackImage = false,\n onAddCart,\n onBuyNow,\n onLearnMore,\n ...rest\n },\n ref\n ) => {\n const {\n productsTab = [],\n productsCard = [],\n title,\n isShowTab = true,\n tabShape = 'square',\n isShowTag = false,\n isShowOriginalPrice = true,\n isShowRecommendedCard = false,\n ...other\n } = data\n\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const isView = useRef<boolean>(false)\n const isRecommend = useRef<boolean>(false)\n const innerRef = useRef<HTMLDivElement>(null)\n const instanceIdRef = useRef<string>(createInstanceId())\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const [viewRef, inView] = useRollout<HTMLDivElement>({ threshold: 0 })\n\n const isOnce = currentItems?.length <= 1 && isDisplayGudgments\n const isShowGudgments = !isMobile && currentItems?.length <= 2 && isDisplayGudgments\n\n const showItemLength = (size?: number) => {\n switch (size) {\n case 1440:\n return isShowGudgments ? currentItems?.length : 4\n case 1024:\n return isShowGudgments ? currentItems?.length : 3\n default:\n return isShowGudgments ? currentItems?.length : 2.3\n }\n }\n\n const gackViewEvent = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'view_item_list',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: recommendedData?.map((item, index) => {\n const findData = item?.variants?.find((v: any) => v?.sku === item?.sku)\n const variant = findData || item?.variants?.[0]\n return {\n item_id: item?.sku || variant?.sku,\n item_name: item?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: index + 1,\n }\n }),\n },\n })\n }\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[], flag: boolean) => {\n if (flag) {\n const newCurrentData = recommendedData?.map?.(item => {\n return {\n ...item,\n isShowRecommended: true,\n }\n })\n setCurrentItems(newCurrentData?.length ? newCurrentData || [] : [])\n } else {\n const isArray = Array.isArray(currentData)\n if (isArray) {\n const newCurrentData = currentData\n ?.map?.(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n isShowRecommended: false,\n custom_name: item.custom_name,\n custom_description: item.custom_description,\n custom_image: item.custom_image,\n custom_theme: item.custom_theme,\n custom_primary_link: item?.custom_primary_link || '',\n custom_secondary_link: item?.custom_secondary_link || '',\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData?.length ? newCurrentData || [] : [])\n } else {\n setCurrentItems([])\n }\n }\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (inView && recommendedData?.length && !isView.current) {\n isView.current = true\n gackViewEvent()\n }\n }, [inView, recommendedData])\n\n // \u7B97\u6CD5\u6570\u636E\u4F1A\u7A0D\u5FAE\u5EF6\u8FDF\uFF0C\u6240\u4EE5\u9700\u76D1\u542CrecommendedData\uFF0C\u4E3A\u4E86\u9632\u6B62\u5728\u6709\u7B97\u6CD5\u6570\u636E\u4E14\u5BF9\u9ED8\u8BA4\u6E32\u67D3\u7B2C\u4E00\u4E2A\u540E\u53CD\u590D\u89E6\u53D1\uFF0C\u7528isRecommend\u5173\u95ED\n useEffect(() => {\n if (isRecommend.current) return\n if (!isRecommend.current && recommendedData?.length) {\n isRecommend.current = true\n }\n if (isShowTab) {\n const currentTab = productsTab?.find(item => item?.tab === tabId) || productsTab?.[0]\n setTabId(currentTab?.tab || '')\n handleCurrentTab(currentTab?.data || [], currentTab?.isShowRecommendedTab)\n return\n }\n handleCurrentTab(productsCard, isShowRecommendedCard)\n }, [recommendedData])\n\n useEffect(() => {\n if (isShowTab) {\n const currentTab = productsTab?.find(item => item?.tab === tabId) || productsTab?.[0]\n handleCurrentTab(currentTab?.data || [], currentTab?.isShowRecommendedTab)\n return\n }\n handleCurrentTab(productsCard, isShowRecommendedCard)\n // buildData \u66F4\u65B0\u65F6\u9700\u8981\u91CD\u65B0\u8BA1\u7B97\u5F53\u524D\u5217\u8868\n }, [buildData])\n\n const safeTabKey = sanitizeCssSelector(tabId)\n const swiperInstanceId = `${instanceIdRef.current}-${safeTabKey}`\n\n return (\n <div\n ref={innerRef}\n {...rest}\n className={cn('shelf-display-wrap text-info-primary w-full', className, {\n 'aiui-dark': data?.theme === 'dark',\n })}\n >\n {title && <Title data={{ title: title }} />}\n {isShowTab && productsTab?.length > 0 && (\n <Tabs\n value={tabId}\n onValueChange={value => {\n const currentTab = productsTab?.find(item => item?.tab === value)\n if (currentTab) {\n setTabId(value)\n handleCurrentTab(currentTab.data || [], currentTab.isShowRecommendedTab)\n if (!currentTab.isShowRecommendedTab) {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.title,\n component_position: 1,\n navigation: value,\n },\n })\n return\n }\n gackViewEvent()\n }\n }}\n shape={tabShape === 'rounded' ? 'rounded' : 'square'}\n >\n <TabsList>\n {productsTab.map(item => (\n <TabsTrigger key={item?.id || item?.tab} value={item?.tab}>\n {item?.tab || ''}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n )}\n <div\n ref={viewRef as any}\n className=\"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]\"\n >\n <SwiperBox\n key={swiperInstanceId}\n data={{\n list: currentItems,\n configuration: {\n ...other,\n event: event,\n isShowTag,\n isShowOriginalPrice,\n target: target,\n metafields: metafields,\n itemLength: currentItems?.length,\n isDisplayBackImage: isDisplayBackImage,\n onAddCart,\n onBuyNow,\n onLearnMore,\n },\n }}\n id={swiperInstanceId}\n className={`${isShowTab ? 'mt-6' : ''} shelf-display-swiper-box !overflow-visible`}\n itemClassName={isShowGudgments ? 'flex-1' : ''}\n Slide={isShowGudgments ? ShelfDisplayHorizontalItem : ShelfDisplayWrapItem}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: isOnce ? 1 : 1.2,\n },\n 768: {\n spaceBetween: isOnce ? 0 : 16,\n freeMode: false,\n slidesPerView: showItemLength(),\n },\n 1024: {\n spaceBetween: isOnce ? 0 : 16,\n freeMode: false,\n slidesPerView: showItemLength(1024),\n },\n 1440: {\n spaceBetween: isOnce ? 0 : 16,\n freeMode: false,\n slidesPerView: showItemLength(1440),\n },\n }\n }\n />\n </div>\n </div>\n )\n }\n)\n\nShelfDisplay.displayName = 'ShelfDisplay'\nexport default withLayout(ShelfDisplay)\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger } from '../../components/tabs.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useRollout } from '../../hooks/useRollout.js'\nimport { ShelfDisplayWrapItem, ShelfDisplayHorizontalItem } from './shelfDisplayItem.js'\nimport type { ShelfDisplayProps, ShelfDisplayItem } from './shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst sanitizeCssSelector = (value?: string | number) => {\n if (value === undefined || value === null) return 'default'\n const sanitized = String(value).replace(/[^a-zA-Z0-9_-]/g, '')\n return sanitized || 'default'\n}\n\nconst createInstanceId = () => `shelf-display-${Math.random().toString(36).slice(2, 9)}`\n\nconst ShelfDisplay = React.forwardRef<HTMLDivElement, ShelfDisplayProps>(\n (\n {\n key,\n data,\n event,\n buildData,\n breakpoints,\n className = '',\n recommendedData,\n target = '_self',\n metafields,\n isDisplayGudgments = false,\n isDisplayBackImage = false,\n onAddCart,\n onBuyNow,\n onLearnMore,\n ...rest\n },\n ref\n ) => {\n const {\n productsTab = [],\n productsCard = [],\n title,\n isShowTab = true,\n tabShape = 'square',\n isShowTag = false,\n isShowOriginalPrice = true,\n isShowRecommendedCard = false,\n ...other\n } = data\n\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const isView = useRef<boolean>(false)\n const isRecommend = useRef<boolean>(false)\n const innerRef = useRef<HTMLDivElement>(null)\n const instanceIdRef = useRef<string>(createInstanceId())\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const [viewRef, inView] = useRollout<HTMLDivElement>({ threshold: 0 })\n\n const isOnce = currentItems?.length <= 1 && isDisplayGudgments\n const isShowGudgments = !isMobile && currentItems?.length <= 2 && isDisplayGudgments\n\n const showItemLength = (size?: number) => {\n switch (size) {\n case 1440:\n return isShowGudgments ? currentItems?.length : 4\n case 1024:\n return isShowGudgments ? currentItems?.length : 3\n default:\n return isShowGudgments ? currentItems?.length : 2.3\n }\n }\n\n const gackViewEvent = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'view_item_list',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: recommendedData?.map((item, index) => {\n const findData = item?.variants?.find((v: any) => v?.sku === item?.sku)\n const variant = findData || item?.variants?.[0]\n return {\n item_id: item?.sku || variant?.sku,\n item_name: item?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: index + 1,\n }\n }),\n },\n })\n }\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[], flag: boolean) => {\n if (flag) {\n const newCurrentData = recommendedData?.map?.(item => {\n return {\n ...item,\n isShowRecommended: true,\n }\n })\n setCurrentItems(newCurrentData?.length ? newCurrentData || [] : [])\n } else {\n const isArray = Array.isArray(currentData)\n if (isArray) {\n const newCurrentData = currentData\n ?.map?.(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n isShowRecommended: false,\n custom_name: item.custom_name,\n custom_description: item.custom_description,\n custom_image: item.custom_image,\n custom_theme: item.custom_theme,\n custom_primary_link: item?.custom_primary_link || '',\n custom_secondary_link: item?.custom_secondary_link || '',\n custom_bg_image: item?.custom_bg_image || '',\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData?.length ? newCurrentData || [] : [])\n } else {\n setCurrentItems([])\n }\n }\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (inView && recommendedData?.length && !isView.current) {\n isView.current = true\n gackViewEvent()\n }\n }, [inView, recommendedData])\n\n // \u7B97\u6CD5\u6570\u636E\u4F1A\u7A0D\u5FAE\u5EF6\u8FDF\uFF0C\u6240\u4EE5\u9700\u76D1\u542CrecommendedData\uFF0C\u4E3A\u4E86\u9632\u6B62\u5728\u6709\u7B97\u6CD5\u6570\u636E\u4E14\u5BF9\u9ED8\u8BA4\u6E32\u67D3\u7B2C\u4E00\u4E2A\u540E\u53CD\u590D\u89E6\u53D1\uFF0C\u7528isRecommend\u5173\u95ED\n useEffect(() => {\n if (isRecommend.current) return\n if (!isRecommend.current && recommendedData?.length) {\n isRecommend.current = true\n }\n if (isShowTab) {\n const currentTab = productsTab?.find(item => item?.tab === tabId) || productsTab?.[0]\n setTabId(currentTab?.tab || '')\n handleCurrentTab(currentTab?.data || [], currentTab?.isShowRecommendedTab)\n return\n }\n handleCurrentTab(productsCard, isShowRecommendedCard)\n }, [recommendedData])\n\n useEffect(() => {\n if (isShowTab) {\n const currentTab = productsTab?.find(item => item?.tab === tabId) || productsTab?.[0]\n handleCurrentTab(currentTab?.data || [], currentTab?.isShowRecommendedTab)\n return\n }\n handleCurrentTab(productsCard, isShowRecommendedCard)\n // buildData \u66F4\u65B0\u65F6\u9700\u8981\u91CD\u65B0\u8BA1\u7B97\u5F53\u524D\u5217\u8868\n }, [buildData])\n\n const safeTabKey = sanitizeCssSelector(tabId)\n const swiperInstanceId = `${instanceIdRef.current}-${safeTabKey}`\n\n return (\n <div\n ref={innerRef}\n {...rest}\n className={cn('shelf-display-wrap text-info-primary w-full', className, {\n 'aiui-dark': data?.theme === 'dark',\n })}\n >\n {title && <Title data={{ title: title }} />}\n {isShowTab && productsTab?.length > 0 && (\n <Tabs\n value={tabId}\n onValueChange={value => {\n const currentTab = productsTab?.find(item => item?.tab === value)\n if (currentTab) {\n setTabId(value)\n handleCurrentTab(currentTab.data || [], currentTab.isShowRecommendedTab)\n if (!currentTab.isShowRecommendedTab) {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.title,\n component_position: 1,\n navigation: value,\n },\n })\n return\n }\n gackViewEvent()\n }\n }}\n shape={tabShape === 'rounded' ? 'rounded' : 'square'}\n >\n <TabsList>\n {productsTab.map(item => (\n <TabsTrigger key={item?.id || item?.tab} value={item?.tab}>\n {item?.tab || ''}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n )}\n <div\n ref={viewRef as any}\n className=\"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]\"\n >\n <SwiperBox\n key={swiperInstanceId}\n data={{\n list: currentItems,\n configuration: {\n ...other,\n event: event,\n isShowTag,\n isShowOriginalPrice,\n target: target,\n metafields: metafields,\n itemLength: currentItems?.length,\n isDisplayBackImage: isDisplayBackImage,\n onAddCart,\n onBuyNow,\n onLearnMore,\n },\n }}\n id={swiperInstanceId}\n className={`${isShowTab ? 'mt-6' : ''} shelf-display-swiper-box !overflow-visible`}\n itemClassName={isShowGudgments ? 'flex-1' : ''}\n Slide={isShowGudgments ? ShelfDisplayHorizontalItem : ShelfDisplayWrapItem}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: isOnce ? 1 : 1.2,\n },\n 768: {\n spaceBetween: isOnce ? 0 : 16,\n freeMode: false,\n slidesPerView: showItemLength(),\n },\n 1024: {\n spaceBetween: isOnce ? 0 : 16,\n freeMode: false,\n slidesPerView: showItemLength(1024),\n },\n 1440: {\n spaceBetween: isOnce ? 0 : 16,\n freeMode: false,\n slidesPerView: showItemLength(1440),\n },\n }\n }\n />\n </div>\n </div>\n )\n }\n)\n\nShelfDisplay.displayName = 'ShelfDisplay'\nexport default withLayout(ShelfDisplay)\n"],
|
|
5
|
+
"mappings": "aAoLM,OAOY,OAAAA,EAPZ,QAAAC,OAAA,oBAnLN,OAAOC,IAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,EAAQ,uBAAAC,OAA2B,QACxE,OAAS,MAAAC,OAAU,yBACnB,OAAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,OAAmB,2BAC5C,OAAOC,OAAW,oBAClB,OAAOC,OAAe,wBACtB,OAAS,cAAAC,OAAkB,yBAC3B,OAAS,WAAAC,MAAe,wBACxB,OAAS,iBAAAC,OAAqB,mBAC9B,OAAS,cAAAC,OAAkB,4BAC3B,OAAS,wBAAAC,GAAsB,8BAAAC,OAAkC,wBAGjE,MAAMC,GAAgB,QAChBC,GAAgB,gBAEhBC,GAAuBC,GACAA,GAAU,KAAa,UAChC,OAAOA,CAAK,EAAE,QAAQ,kBAAmB,EAAE,GACzC,UAGhBC,GAAmB,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xs", "React", "useState", "useEffect", "useRef", "useImperativeHandle", "cn", "Tabs", "TabsList", "TabsTrigger", "Title", "SwiperBox", "withLayout", "gaTrack", "useMediaQuery", "useRollout", "ShelfDisplayWrapItem", "ShelfDisplayHorizontalItem", "componentType", "componentName", "sanitizeCssSelector", "value", "createInstanceId", "ShelfDisplay", "key", "data", "event", "buildData", "breakpoints", "className", "recommendedData", "target", "metafields", "isDisplayGudgments", "isDisplayBackImage", "onAddCart", "onBuyNow", "onLearnMore", "rest", "ref", "productsTab", "productsCard", "title", "isShowTab", "tabShape", "isShowTag", "isShowOriginalPrice", "isShowRecommendedCard", "other", "tabId", "setTabId", "currentItems", "setCurrentItems", "isView", "isRecommend", "innerRef", "instanceIdRef", "isMobile", "viewRef", "inView", "isOnce", "isShowGudgments", "showItemLength", "size", "gackViewEvent", "item", "index", "variant", "v", "handleCurrentTab", "currentData", "flag", "newCurrentData", "findData", "params", "currentTab", "safeTabKey", "swiperInstanceId", "ShelfDisplay_default"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplay.ts"],
|
|
4
|
-
"sourcesContent": ["import Decimal from 'decimal.js'\nimport type { ContainerProps, CurrencyDisplayType } from '../../types/props.js'\n/* eslint-disable no-useless-escape */\nimport { PRICE_SYMBOL, formatPrice, languageTerritory } from '../../helpers/index.js'\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n currencyDisplay,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n currencyDisplay?: CurrencyDisplayType\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n let discount = null\n const currentLocale = languageTerritory(locale)\n if (currentLocale) {\n const formatDiscount = new Intl.NumberFormat(currentLocale, {\n style: 'percent',\n })\n discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n }\n // \u6298\u6263\u91D1\u989D\n let discountAmount\n if (hasDiscount) {\n const savePriceAmount = new Decimal(baseAmount).sub(amount || 0).toNumber()\n discountAmount = formatPrice({\n amount: savePriceAmount,\n currencyDisplay,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n })\n }\n\n const price = formatPrice({ amount, currencyCode, currencyDisplay, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n currencyDisplay,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount, discountAmount }\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number, data: ShelfDisplayType, coupon: any) => void\n secondaryButton?: (v: any, index: number, data: ShelfDisplayType, coupon: any) => void\n}\n\nexport interface ShelfDisplayItem {\n custom_primary_link?: string\n custom_secondary_link?: string\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n custom_name?: string\n custom_description?: string\n custom_image?: string\n custom_theme?: string\n}\n\nexport type ShelfDisplayType = {\n title?: string\n isShowTab?: boolean\n isShowTag?: boolean\n isShowRecommendedCard?: boolean\n isShowOriginalPrice?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any[]\n productsCard?: any[]\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n primaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n secondaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n theme?: 'light' | 'dark'\n containerProps?: ContainerProps\n}\n\nexport interface ShelfDisplayProps extends React.HTMLAttributes<HTMLDivElement> {\n data: ShelfDisplayType\n buildData?: {\n categories: any[]\n products: any[]\n }\n recommendedData?: any[]\n /**\n * \u6309\u94AE\u4E8B\u4EF6\n * @deprecated \u8BF7\u4F7F\u7528 onAddCart / onBuyNow / onLearnMore \u914D\u5408 primaryFun / secondaryFun \u66FF\u4EE3\n */\n event?: EventType\n key?: string\n target?: '_self' | '_blank'\n breakpoints?: {\n [key: number]: {\n spaceBetween: number\n freeMode: boolean\n slidesPerView: number\n }\n }\n metafields?: any\n isDisplayGudgments?: boolean\n isDisplayBackImage?: boolean\n\n /** \u52A0\u5165\u8D2D\u7269\u8F66\u56DE\u8C03 */\n onAddCart?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void\n /** \u7ACB\u5373\u8D2D\u4E70\u56DE\u8C03 */\n onBuyNow?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void\n /** \u4E86\u89E3\u66F4\u591A\u56DE\u8C03 */\n onLearnMore?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void\n}\n"],
|
|
4
|
+
"sourcesContent": ["import Decimal from 'decimal.js'\nimport type { ContainerProps, CurrencyDisplayType } from '../../types/props.js'\n/* eslint-disable no-useless-escape */\nimport { PRICE_SYMBOL, formatPrice, languageTerritory } from '../../helpers/index.js'\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n currencyDisplay,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n currencyDisplay?: CurrencyDisplayType\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n let discount = null\n const currentLocale = languageTerritory(locale)\n if (currentLocale) {\n const formatDiscount = new Intl.NumberFormat(currentLocale, {\n style: 'percent',\n })\n discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n }\n // \u6298\u6263\u91D1\u989D\n let discountAmount\n if (hasDiscount) {\n const savePriceAmount = new Decimal(baseAmount).sub(amount || 0).toNumber()\n discountAmount = formatPrice({\n amount: savePriceAmount,\n currencyDisplay,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n })\n }\n\n const price = formatPrice({ amount, currencyCode, currencyDisplay, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n currencyDisplay,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount, discountAmount }\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number, data: ShelfDisplayType, coupon: any) => void\n secondaryButton?: (v: any, index: number, data: ShelfDisplayType, coupon: any) => void\n}\n\nexport interface ShelfDisplayItem {\n custom_primary_link?: string\n custom_secondary_link?: string\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n custom_name?: string\n custom_description?: string\n custom_image?: string\n custom_theme?: string\n custom_bg_image?: string\n}\n\nexport type ShelfDisplayType = {\n title?: string\n isShowTab?: boolean\n isShowTag?: boolean\n isShowRecommendedCard?: boolean\n isShowOriginalPrice?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any[]\n productsCard?: any[]\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n primaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n secondaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n theme?: 'light' | 'dark'\n containerProps?: ContainerProps\n}\n\nexport interface ShelfDisplayProps extends React.HTMLAttributes<HTMLDivElement> {\n data: ShelfDisplayType\n buildData?: {\n categories: any[]\n products: any[]\n }\n recommendedData?: any[]\n /**\n * \u6309\u94AE\u4E8B\u4EF6\n * @deprecated \u8BF7\u4F7F\u7528 onAddCart / onBuyNow / onLearnMore \u914D\u5408 primaryFun / secondaryFun \u66FF\u4EE3\n */\n event?: EventType\n key?: string\n target?: '_self' | '_blank'\n breakpoints?: {\n [key: number]: {\n spaceBetween: number\n freeMode: boolean\n slidesPerView: number\n }\n }\n metafields?: any\n isDisplayGudgments?: boolean\n isDisplayBackImage?: boolean\n\n /** \u52A0\u5165\u8D2D\u7269\u8F66\u56DE\u8C03 */\n onAddCart?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void\n /** \u7ACB\u5373\u8D2D\u4E70\u56DE\u8C03 */\n onBuyNow?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void\n /** \u4E86\u89E3\u66F4\u591A\u56DE\u8C03 */\n onLearnMore?: (params: ShelfDisplayItem, index: number, data: ShelfDisplayType, coupon: any) => void\n}\n"],
|
|
5
5
|
"mappings": "AAAA,OAAOA,MAAa,aAGpB,OAAS,gBAAAC,EAAc,eAAAC,EAAa,qBAAAC,MAAyB,yBAEtD,SAASC,EAAmB,CACjC,OAAAC,EACA,WAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,OAAAC,EACA,sBAAAC,EACA,sBAAAC,EACA,oBAAAC,CACF,EASG,CACD,GAAI,OAAO,KAAS,IAClB,MAAO,CACL,MAAO,GAAGX,EAAaQ,CAAM,CAAC,GAAGJ,CAAM,GACvC,UAAW,GAAGJ,EAAaQ,CAAM,CAAC,GAAGH,CAAU,GAC/C,SAAU,GAAGL,EAAaQ,CAAM,CAAC,GAAGH,EAAaD,GAAU,CAAC,EAC9D,EAGF,MAAMQ,EAAcP,EAAaD,EACjC,IAAIS,EAAW,KACf,MAAMC,EAAgBZ,EAAkBM,CAAM,EAC9C,GAAIM,EAAe,CACjB,MAAMC,EAAiB,IAAI,KAAK,aAAaD,EAAe,CAC1D,MAAO,SACT,CAAC,EACDD,EAAWD,EAAcG,EAAe,QAAQV,EAAaD,GAAUC,CAAU,EAAI,IACvF,CAEA,IAAIW,EACJ,GAAIJ,EAAa,CACf,MAAMK,EAAkB,IAAIlB,EAAQM,CAAU,EAAE,IAAID,GAAU,CAAC,EAAE,SAAS,EAC1EY,EAAiBf,EAAY,CAC3B,OAAQgB,EACR,gBAAAV,EACA,aAAcD,GAAgB,MAC9B,OAAAE,EACA,sBAAuB,CACzB,CAAC,CACH,CAEA,MAAMU,EAAQjB,EAAY,CAAE,OAAAG,EAAQ,aAAAE,EAAc,gBAAAC,EAAiB,OAAAC,EAAQ,oBAAAG,CAAoB,CAAC,EAC1FQ,EAAYP,EACdX,EAAY,CACV,OAAQI,EACR,aAAAC,EACA,gBAAAC,EACA,OAAAC,EACA,sBAAAC,EACA,sBAAAC,EACA,oBAAAC,CACF,CAAC,EACD,OAEJ,MAAO,CAAE,MAAAO,EAAO,UAAAC,EAAW,SAAAN,EAAU,eAAAG,CAAe,CACtD",
|
|
6
6
|
"names": ["Decimal", "PRICE_SYMBOL", "formatPrice", "languageTerritory", "formatVariantPrice", "amount", "baseAmount", "currencyCode", "currencyDisplay", "locale", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "hasDiscount", "discount", "currentLocale", "formatDiscount", "discountAmount", "savePriceAmount", "price", "basePrice"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as ie,jsx as r,jsxs as h}from"react/jsx-runtime";import{useAiuiContext as ne}from"../AiuiProvider/index.js";import{formatVariantPrice as ae}from"./shelfDisplay.js";import oe from"../../components/picture.js";import re from"../../components/badge.js";import{cn as g}from"../../helpers/utils.js";import{Text as ce}from"../../components/text.js";import G from"../../components/button.js";import{gaTrack as pe}from"../../shared/track.js";import{trackUrlRef as me}from"../../shared/trackUrlRef.js";import{Heading as de}from"../../components/heading.js";import{useExposure as ue}from"../../hooks/useExposure.js";import{useRef as fe,useEffect as he,useMemo as J,useState as le}from"react";const K="image",Q="product_shelf",X=999999999e-2,xe=e=>{const t=e?.sku,b=e?.variants,k=b?.find(N=>N?.sku===t),D=k?.image?.url||b?.[0]?.image?.url||"",I=k?.image?.altText||b?.[0]?.image?.altText||e?.custom_name||e?.title||"";return{imageUrl:D,altText:I}},$e=({data:e,configuration:t})=>{const{isDisplayBackImage:b=!1,itemShape:k,metafields:D,isTopTag:I=!1,isShowTag:N,isShowOriginalPrice:O,isShowShortTitle:w=!1}=t||{},{locale:_="es",copyWriting:Y,currencyDisplay:U}=ne(),{discounts:z,discountsCopy:P}=D||{},H=fe(null),[E,p]=le([]),[L,Z]=le(""),R=(s,o,l,i)=>{const{primaryFun:c,onAddCart:d,onBuyNow:f,onLearnMore:W,event:se}=t||{};if(c){if(c==="AddCart"&&d)return d(s,o+1,l,i);if(c==="BuyNow"&&f)return f(s,o+1,l,i);if(c==="LearnMore"&&W)return W(s,o+1,l,i)}se?.primaryButton?.(s,o+1,l,i)},ee=(s,o,l,i)=>{const{secondaryFun:c,onAddCart:d,onBuyNow:f,onLearnMore:W,event:se}=t||{};if(c){if(c==="AddCart"&&d)return d(s,o+1,l,i);if(c==="BuyNow"&&f)return f(s,o+1,l,i);if(c==="LearnMore"&&W)return W(s,o+1,l,i)}se?.secondaryButton?.(s,o+1,l,i)},m=J(()=>{const s=e?.variants||[];if(s.length)return e?.sku?s?.find?.(o=>o?.sku===e?.sku)||s[0]:s?.[0]},[e?.sku,e?.variants]),u=m?.id?.split?.("/")||[],A=u?.[u?.length-1],S=!m?.availableForSale||m?.price?.amount===X||m?.price===X,x=m?.coupons?.[0],M=!!(O&&x),V=e?.price?.currencyCode||"USD",T=J(()=>ae({locale:_,amount:M?x?.variant_price4wscode:m?.price,baseAmount:M?m?.price:0,currencyCode:V,currencyDisplay:U}),[V,_,M,x?.variant_price4wscode,m]),{price:F,basePrice:te,discount:B,discountAmount:y}=T,{imageUrl:C,altText:$}=xe(e),v=e?.custom_name||e?.title,j=w&&m?.metafields?.infos?.page_short_title||v,q=e?.custom_description||e?.description,n=()=>{if(x?.value_type==="fixed_amount"){const s=y||"",o=s.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(o){const[,l,i,c]=o;let d=i;return i.endsWith(".00")?d=i.replace(/\.00$/,""):i.endsWith(",00")&&(d=i.replace(/,00$/,"")),`${l}${d}${c}`}return s}return B||""};he(()=>{let s=[];if(B||y){const l=`${n()} ${z?.off||P?.off||""}`;Z(l),s.push(l)}const o=e?.tags?.filter?.(l=>l?.startsWith?.("CLtag"))?.map?.(l=>l?.replace?.("CLtag:",""))?.slice?.(0,B?1:2);p(s.concat(o))},[e?.tags,B,y,z?.off,P?.off]),ue(H,{componentType:K,componentName:Q,componentTitle:v,componentDescription:q,position:t?.index+1});const a=()=>h(ie,{children:[N&&E?.length>0?r("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:E?.map?.((s,o)=>r(re,{className:"shelf-items-tag",children:s},o))}):null,j?r(de,{as:"h3",title:j||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] line-clamp-2 h-12",html:j||""}):null,r(ce,{size:2,className:"lg-desktop:text-lg desktop:h-[24px] lg-desktop:h-[28px] desktop:text-base shelf-display-product-description line-clamp-1 h-[20px] text-sm",html:q||""}),r("div",{className:"mb-2 mt-4 flex items-center",children:S?r("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:Y?.soldOutText}):h(ie,{children:[r("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:m?.availableForSale&&F||""}),r("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:m?.availableForSale&&te||""})]})}),h("div",{className:g("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?r(G,{disabled:S&&t?.secondaryFun!=="LearnMore",variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:()=>!e?.custom_secondary_link&&ee(e,t?.index,t,x),className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?r(G,{disabled:S&&t?.primaryFun!=="LearnMore",variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:()=>!e?.custom_primary_link&&R(e,t?.index,t,x),className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]});return r("div",{ref:H,className:g("bg-background tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",k==="round"?"rounded-2xl":"rounded-none","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"),children:b?r("div",{className:"absolute inset-0 box-border overflow-hidden",children:h("div",{className:"relative inset-0 size-full",children:[r(oe,{source:C,alt:$,className:"flex h-full justify-center object-cover [&_img]:w-auto"}),r("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:a()})]})}):h("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[L&&I&&r(re,{className:"shelf-prices-tag absolute left-4 top-4 z-10",children:L||""}),r("div",{className:g("lg-desktop:h-[195px] shelf-display-item-image relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden"),children:r("a",{"aria-label":v,target:t?.target,href:me(`${_==="us"||!_?"":`/${_}`}/products/${e?.handle}?variant=${A}`,`${K}_${Q}`),onClick:()=>{pe({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:r(oe,{source:C,alt:$,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),a()]})},e?.id||e?.handle)},De=({data:e,configuration:t})=>{const{itemShape:b,itemLength:k,metafields:D,isShowShortTitle:I}=t||{},{discounts:N,discountsCopy:O}=D||{},{locale:w="us",copyWriting:_,currencyDisplay:Y}=ne(),[U,z]=le([]),P=fe(null),H=(n,a,s,o)=>{const{primaryFun:l,onAddCart:i,onBuyNow:c,onLearnMore:d,event:f}=t||{};if(l){if(l==="AddCart"&&i)return i(n,a+1,s,o);if(l==="BuyNow"&&c)return c(n,a+1,s,o);if(l==="LearnMore"&&d)return d(n,a+1,s,o)}f?.primaryButton?.(n,a+1,s,o)},E=(n,a,s,o)=>{const{secondaryFun:l,onAddCart:i,onBuyNow:c,onLearnMore:d,event:f}=t||{};if(l){if(l==="AddCart"&&i)return i(n,a+1,s,o);if(l==="BuyNow"&&c)return c(n,a+1,s,o);if(l==="LearnMore"&&d)return d(n,a+1,s,o)}f?.secondaryButton?.(n,a+1,s,o)},p=J(()=>{const n=e?.variants||[];if(n.length)return e?.sku&&n.find(a=>a?.sku===e?.sku)||n[0]},[e?.sku,e?.variants]),L=p?.id?.split?.("/")||[],Z=L?.[L?.length-1],R=!p?.availableForSale||p?.price?.amount===X||p?.price===X,ee=t?.isShowTag,m=t?.isShowOriginalPrice,u=p?.coupons?.[0],A=!!(m&&u),S=e?.price?.currencyCode||"USD",x=J(()=>ae({locale:w,amount:A?u?.variant_price4wscode:p?.price,baseAmount:A?p?.price:0,currencyCode:S,currencyDisplay:Y}),[S,w,A,u?.variant_price4wscode,p]),{price:M,basePrice:V,discount:T,discountAmount:F}=x,{imageUrl:te,altText:B}=xe(e),y=e?.custom_name||e?.title,C=I&&p?.metafields?.infos?.page_short_title||y,$=e?.custom_description||e?.description;ue(P,{componentType:K,componentName:Q,componentTitle:y,componentDescription:$,position:t?.index+1});const v=()=>k>=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"},j=()=>k>=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",q=()=>{if(u?.value_type==="fixed_amount"){const n=F||"",a=n.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(a){const[,s,o,l]=a;let i=o;return o.endsWith(".00")?i=o.replace(/\.00$/,""):o.endsWith(",00")&&(i=o.replace(/,00$/,"")),`${s}${i}${l}`}return n}return T||""};return he(()=>{let n=[];if(T||F){const s=`${q()} ${N?.off||O?.off||""}`;n.push(s)}const a=e?.tags?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,T?1:2);z(n.concat(a))},[e?.tags,T,F,N?.off,O?.off]),r("div",{ref:P,className:g(v().wrap,b==="round"?"rounded-2xl":"rounded-none","shelf-display-item","bg-container-secondary-1 tablet:hover:bg-info-white gap-6 duration-300","md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden"),children:h("div",{className:g(j(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[r("div",{className:g(v().imgItem,"desktop:mb-0 relative mb-1 overflow-hidden"),children:r("a",{"aria-label":y,target:t?.target,href:me(`${w==="us"||!w?"":`/${w}`}/products/${e?.handle}?variant=${Z}`,`${K}_${Q}`),onClick:()=>{pe({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||p?.sku,item_name:e?.name,item_variant:p?.name,price:p?.price,index:t?.index+1}]}})},children:r(oe,{source:te,alt:B,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),h("div",{className:g("flex flex-col items-start justify-center",v().boxItem),children:[ee&&r("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:U?.length>0&&U?.map?.((n,a)=>r(re,{className:"shelf-items-tag",children:n},a))}),C?r(de,{as:"h3",title:C||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] mb-1 line-clamp-2 h-[48px]",html:C||""}):null,$?r(ce,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:$||""}):null,r("div",{className:"mb-2 mt-5 flex items-center",children:R?r("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_?.soldOutText}):h(ie,{children:[r("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:p?.availableForSale&&M||""}),r("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:p?.availableForSale&&V||""})]})}),h("div",{className:g("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?r(G,{variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:()=>!e?.custom_secondary_link&&E(e,t?.index,t,u),className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?r(G,{disabled:R,variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:()=>!e?.custom_primary_link&&H(e,t?.index,t,u),className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{De as ShelfDisplayHorizontalItem,$e as ShelfDisplayWrapItem,xe as getProductImage};
|
|
1
|
+
import{Fragment as ae,jsx as r,jsxs as x}from"react/jsx-runtime";import{useAiuiContext as ce}from"../AiuiProvider/index.js";import{formatVariantPrice as pe}from"./shelfDisplay.js";import ie from"../../components/picture.js";import le from"../../components/badge.js";import{cn as h}from"../../helpers/utils.js";import{Text as me}from"../../components/text.js";import K from"../../components/button.js";import{gaTrack as de}from"../../shared/track.js";import{trackUrlRef as ue}from"../../shared/trackUrlRef.js";import{Heading as fe}from"../../components/heading.js";import{useExposure as he}from"../../hooks/useExposure.js";import{useRef as xe,useEffect as ye,useMemo as Q,useState as ne}from"react";const X="image",Y="product_shelf",Z=999999999e-2,ge=e=>{const t=e?.sku,b=e?.variants,k=b?.find(N=>N?.sku===t),I=k?.image?.url||b?.[0]?.image?.url||"",P=k?.image?.altText||b?.[0]?.image?.altText||e?.custom_name||e?.title||"";return{imageUrl:I,altText:P}},Ie=({data:e,configuration:t})=>{const{isDisplayBackImage:b=!1,itemShape:k,metafields:I,isTopTag:P=!1,isShowTag:N,isShowOriginalPrice:U,isShowShortTitle:w=!1}=t||{},{locale:_="es",copyWriting:ee,currencyDisplay:z}=ce(),{discounts:H,discountsCopy:L}=I||{},E=xe(null),[R,p]=ne([]),[A,te]=ne(""),V=(s,o,i,n)=>{const{primaryFun:c,onAddCart:d,onBuyNow:f,onLearnMore:O,event:re}=t||{};if(c){if(c==="AddCart"&&d)return d(s,o+1,i,n);if(c==="BuyNow"&&f)return f(s,o+1,i,n);if(c==="LearnMore"&&O)return O(s,o+1,i,n)}re?.primaryButton?.(s,o+1,i,n)},se=(s,o,i,n)=>{const{secondaryFun:c,onAddCart:d,onBuyNow:f,onLearnMore:O,event:re}=t||{};if(c){if(c==="AddCart"&&d)return d(s,o+1,i,n);if(c==="BuyNow"&&f)return f(s,o+1,i,n);if(c==="LearnMore"&&O)return O(s,o+1,i,n)}re?.secondaryButton?.(s,o+1,i,n)},m=Q(()=>{const s=e?.variants||[];if(s.length)return e?.sku?s?.find?.(o=>o?.sku===e?.sku)||s[0]:s?.[0]},[e?.sku,e?.variants]),u=m?.id?.split?.("/")||[],M=u?.[u?.length-1],S=!m?.availableForSale||m?.price?.amount===Z||m?.price===Z,y=m?.coupons?.[0],F=!!(U&&y),q=e?.price?.currencyCode||"USD",T=Q(()=>pe({locale:_,amount:F?y?.variant_price4wscode:m?.price,baseAmount:F?m?.price:0,currencyCode:q,currencyDisplay:z}),[q,_,F,y?.variant_price4wscode,m]),{price:j,basePrice:oe,discount:B,discountAmount:g}=T,{imageUrl:C,altText:$}=ge(e),v=e?.custom_name||e?.title,W=w&&m?.metafields?.infos?.page_short_title||v,G=e?.custom_description||e?.description,D=()=>{if(y?.value_type==="fixed_amount"){const s=g||"",o=s.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(o){const[,i,n,c]=o;let d=n;return n.endsWith(".00")?d=n.replace(/\.00$/,""):n.endsWith(",00")&&(d=n.replace(/,00$/,"")),`${i}${d}${c}`}return s}return B||""};ye(()=>{let s=[];if(B||g){const i=`${D()} ${H?.off||L?.off||""}`;te(i),s.push(i)}const o=e?.tags?.filter?.(i=>i?.startsWith?.("CLtag"))?.map?.(i=>i?.replace?.("CLtag:",""))?.slice?.(0,B?1:2);p(s.concat(o))},[e?.tags,B,g,H?.off,L?.off]),he(E,{componentType:X,componentName:Y,componentTitle:v,componentDescription:G,position:t?.index+1});const J=()=>x(ae,{children:[N&&R?.length>0?r("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:R?.map?.((s,o)=>r(le,{className:"shelf-items-tag",children:s},o))}):null,W?r(fe,{as:"h3",title:W||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] text-info-primary line-clamp-2 h-12",html:W||""}):null,r(me,{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:G||""}),r("div",{className:"mb-2 mt-4 flex items-center",children:S?r("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:ee?.soldOutText}):x(ae,{children:[r("div",{className:"final-price tablet:text-xl text-info-primary text-xl font-bold",children:m?.availableForSale&&j||""}),r("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:m?.availableForSale&&oe||""})]})}),x("div",{className:h("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?r(K,{disabled:S&&t?.secondaryFun!=="LearnMore",variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:()=>!e?.custom_secondary_link&&se(e,t?.index,t,y),className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?r(K,{disabled:S&&t?.primaryFun!=="LearnMore",variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:()=>!e?.custom_primary_link&&V(e,t?.index,t,y),className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]}),l=e?.custom_bg_image,a=e?.custom_theme;return r("div",{ref:E,className:h("box-border w-full cursor-pointer overflow-hidden duration-300",k==="round"?"rounded-2xl":"rounded-none","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",l?"bg-cover bg-center bg-no-repeat":"bg-background tablet:hover:bg-info-white",{"aiui-dark":a==="dark"}),style:l?{backgroundImage:`url(${l})`}:void 0,children:b?r("div",{className:"absolute inset-0 box-border overflow-hidden",children:x("div",{className:"relative inset-0 size-full",children:[r(ie,{source:C,alt:$,className:h("flex h-full justify-center object-cover [&_img]:w-auto",{"opacity-0":l})}),r("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:J()})]})}):x("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[A&&P&&r(le,{className:"shelf-prices-tag absolute left-4 top-4 z-10",children:A||""}),r("div",{className:h("lg-desktop:h-[195px] shelf-display-item-image relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden",{"opacity-0":l}),children:r("a",{"aria-label":v,target:t?.target,href:ue(`${_==="us"||!_?"":`/${_}`}/products/${e?.handle}?variant=${M}`,`${X}_${Y}`),onClick:()=>{de({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:r(ie,{source:C,alt:$,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),J()]})},e?.id||e?.handle)},Pe=({data:e,configuration:t})=>{const{itemShape:b,itemLength:k,metafields:I,isShowShortTitle:P}=t||{},{discounts:N,discountsCopy:U}=I||{},{locale:w="us",copyWriting:_,currencyDisplay:ee}=ce(),[z,H]=ne([]),L=xe(null),E=(l,a,s,o)=>{const{primaryFun:i,onAddCart:n,onBuyNow:c,onLearnMore:d,event:f}=t||{};if(i){if(i==="AddCart"&&n)return n(l,a+1,s,o);if(i==="BuyNow"&&c)return c(l,a+1,s,o);if(i==="LearnMore"&&d)return d(l,a+1,s,o)}f?.primaryButton?.(l,a+1,s,o)},R=(l,a,s,o)=>{const{secondaryFun:i,onAddCart:n,onBuyNow:c,onLearnMore:d,event:f}=t||{};if(i){if(i==="AddCart"&&n)return n(l,a+1,s,o);if(i==="BuyNow"&&c)return c(l,a+1,s,o);if(i==="LearnMore"&&d)return d(l,a+1,s,o)}f?.secondaryButton?.(l,a+1,s,o)},p=Q(()=>{const l=e?.variants||[];if(l.length)return e?.sku&&l.find(a=>a?.sku===e?.sku)||l[0]},[e?.sku,e?.variants]),A=p?.id?.split?.("/")||[],te=A?.[A?.length-1],V=!p?.availableForSale||p?.price?.amount===Z||p?.price===Z,se=t?.isShowTag,m=t?.isShowOriginalPrice,u=p?.coupons?.[0],M=!!(m&&u),S=e?.price?.currencyCode||"USD",y=Q(()=>pe({locale:w,amount:M?u?.variant_price4wscode:p?.price,baseAmount:M?p?.price:0,currencyCode:S,currencyDisplay:ee}),[S,w,M,u?.variant_price4wscode,p]),{price:F,basePrice:q,discount:T,discountAmount:j}=y,{imageUrl:oe,altText:B}=ge(e),g=e?.custom_name||e?.title,C=P&&p?.metafields?.infos?.page_short_title||g,$=e?.custom_description||e?.description;he(L,{componentType:X,componentName:Y,componentTitle:g,componentDescription:$,position:t?.index+1});const v=()=>k>=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"},W=()=>k>=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",G=()=>{if(u?.value_type==="fixed_amount"){const l=j||"",a=l.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(a){const[,s,o,i]=a;let n=o;return o.endsWith(".00")?n=o.replace(/\.00$/,""):o.endsWith(",00")&&(n=o.replace(/,00$/,"")),`${s}${n}${i}`}return l}return T||""};ye(()=>{let l=[];if(T||j){const s=`${G()} ${N?.off||U?.off||""}`;l.push(s)}const a=e?.tags?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,T?1:2);H(l.concat(a))},[e?.tags,T,j,N?.off,U?.off]);const D=e?.custom_bg_image,J=e?.custom_theme;return r("div",{ref:L,className:h(v().wrap,b==="round"?"rounded-2xl":"rounded-none","shelf-display-item","duration-300","md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden",D?"bg-cover bg-center bg-no-repeat":"bg-container-secondary-1 tablet:hover:bg-info-white",{"aiui-dark":J==="dark"}),style:D?{backgroundImage:`url(${D})`}:void 0,children:x("div",{className:h(W(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[r("div",{className:h(v().imgItem,"desktop:mb-0 relative mb-1 overflow-hidden",{"opacity-0":D}),children:r("a",{"aria-label":g,target:t?.target,href:ue(`${w==="us"||!w?"":`/${w}`}/products/${e?.handle}?variant=${te}`,`${X}_${Y}`),onClick:()=>{de({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||p?.sku,item_name:e?.name,item_variant:p?.name,price:p?.price,index:t?.index+1}]}})},children:r(ie,{source:oe,alt:B,className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),x("div",{className:h("flex flex-col items-start justify-center",v().boxItem),children:[se&&r("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:z?.length>0&&z?.map?.((l,a)=>r(le,{className:"shelf-items-tag",children:l},a))}),C?r(fe,{as:"h3",title:C||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] text-info-primary mb-1 line-clamp-2 h-[48px]",html:C||""}):null,$?r(me,{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:$||""}):null,r("div",{className:"mb-2 mt-5 flex items-center",children:V?r("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_?.soldOutText}):x(ae,{children:[r("div",{className:"final-price tablet:text-xl text-info-primary text-xl font-bold",children:p?.availableForSale&&F||""}),r("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:p?.availableForSale&&q||""})]})}),x("div",{className:h("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?r(K,{variant:"secondary",href:e?.custom_secondary_link,as:e?.custom_secondary_link?"a":"button",onClick:()=>!e?.custom_secondary_link&&R(e,t?.index,t,u),className:t.direction==="vertical"?"w-full":"",children:t?.secondaryButton||""}):null,t?.primaryButton?r(K,{disabled:V,variant:"primary",href:e?.custom_primary_link,as:e?.custom_primary_link?"a":"button",onClick:()=>!e?.custom_primary_link&&E(e,t?.index,t,u),className:t.direction==="vertical"?"w-full":"",children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{Pe as ShelfDisplayHorizontalItem,Ie as ShelfDisplayWrapItem,ge 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 } = 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\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 }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant]\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 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\">\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] 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 line-clamp-1 h-[20px] text-sm\"\n html={displayDescription || ''}\n />\n <div className=\"mb-2 mt-4 flex items-center\">\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-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\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 </div>\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={() =>\n !data?.custom_secondary_link && onSecondaryButton(data, configuration?.index, configuration, coupon)\n }\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={() =>\n !data?.custom_primary_link && onPrimaryButton(data, configuration?.index, configuration, coupon)\n }\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'bg-background tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\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 )}\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=\"flex h-full justify-center object-cover [&_img]:w-auto\"\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\">{currentPriceTag || ''}</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 )}\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 { itemShape, itemLength, metafields, isShowShortTitle } = 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\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 }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant]\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 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 return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'shelf-display-item',\n 'bg-container-secondary-1 tablet:hover:bg-info-white gap-6 duration-300',\n 'md-tablet:h-[360px] relative box-border w-full cursor-pointer overflow-hidden'\n )}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div className={cn(showSizeClass().imgItem, 'desktop:mb-0 relative mb-1 overflow-hidden')}>\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\">\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] 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 line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\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-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\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 </div>\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 variant=\"secondary\"\n href={data?.custom_secondary_link}\n as={data?.custom_secondary_link ? 'a' : 'button'}\n onClick={() =>\n !data?.custom_secondary_link && onSecondaryButton(data, configuration?.index, configuration, coupon)\n }\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n disabled={isSoldOut}\n variant=\"primary\"\n href={data?.custom_primary_link}\n as={data?.custom_primary_link ? 'a' : 'button'}\n onClick={() =>\n !data?.custom_primary_link && onPrimaryButton(data, configuration?.index, configuration, coupon)\n }\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": "AAsLc,OAwBF,YAAAA,GAxBE,OAAAC,EAwBF,QAAAC,MAxBE,oBAtLd,OAAS,kBAAAC,OAAsB,2BAC/B,OAAS,sBAAAC,OAA0B,oBACnC,OAAOC,OAAa,8BACpB,OAAOC,OAAW,4BAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,OAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,OAAe,wBACxB,OAAS,eAAAC,OAAmB,8BAC5B,OAAS,WAAAC,OAAe,8BAExB,OAAS,eAAAC,OAAmB,6BAC5B,OAAS,UAAAC,GAAQ,aAAAC,GAAW,WAAAC,EAAS,YAAAC,OAAgB,QAErD,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,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,EAAUH,GAAS,OAAO,SAAWD,IAAW,CAAC,GAAG,OAAO,SAAWF,GAAM,aAAeA,GAAM,OAAS,GAEhH,MAAO,CACL,SAAAK,EACA,QAAAC,CACF,CACF,EAEaC,GAAuB,CAAC,CAAE,KAAAP,EAAM,cAAAQ,CAAc,IAA0C,CACnG,KAAM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I,UAAU,kEACZ,SAAA0D,GAAS,kBAAmBQ,GAAS,GACxC,EACAlE,EAAC,OAAI,UAAU,sFACZ,SAAA0D,GAAS,kBAAmBS,GAAa,GAC5C,GACF,EAEJ,EAEAlE,EAAC,OACC,UAAWK,EACT,0BACA,2CACAuB,EAAc,YAAc,WAAa,WAAa,EACxD,EAEC,UAAAA,GAAe,gBACd7B,EAACQ,EAAA,CACC,QAAQ,YACR,KAAMa,GAAM,sBACZ,GAAIA,GAAM,sBAAwB,IAAM,SACxC,QAAS,IACP,CAACA,GAAM,uBAAyBmC,EAAkBnC,EAAMQ,GAAe,MAAOA,EAAeqB,CAAM,EAErG,UAAWrB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,cACd7B,EAACQ,EAAA,CACC,SAAUsD,EACV,QAAQ,UACR,KAAMzC,GAAM,oBACZ,GAAIA,GAAM,oBAAsB,IAAM,SACtC,QAAS,IACP,CAACA,GAAM,qBAAuB0B,EAAgB1B,EAAMQ,GAAe,MAAOA,EAAeqB,CAAM,EAEjG,UAAWrB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA3HKR,GAAM,IAAMA,GAAM,MA4HzB,CAEJ",
|
|
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", "locale", "copyWriting", "currencyDisplay", "discounts", "discountsCopy", "ref", "showTags", "setShowTags", "currentPriceTag", "setCurrentPriceTag", "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", "bottomContent", "ShelfDisplayHorizontalItem", "itemLength", "showSizeClass", "handleWrapClass"]
|
|
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 } = 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\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 }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant]\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 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\">\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 {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 <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 </div>\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={() =>\n !data?.custom_secondary_link && onSecondaryButton(data, configuration?.index, configuration, coupon)\n }\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={() =>\n !data?.custom_primary_link && onPrimaryButton(data, configuration?.index, configuration, coupon)\n }\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 itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\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\">{currentPriceTag || ''}</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 { itemShape, itemLength, metafields, isShowShortTitle } = 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\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 }),\n [currencyCode, locale, shouldUseCouponPrice, coupon?.variant_price4wscode, variant]\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 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 itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\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\">\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 {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 <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 </div>\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 variant=\"secondary\"\n href={data?.custom_secondary_link}\n as={data?.custom_secondary_link ? 'a' : 'button'}\n onClick={() =>\n !data?.custom_secondary_link && onSecondaryButton(data, configuration?.index, configuration, coupon)\n }\n className={configuration.direction === 'vertical' ? 'w-full' : ''}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n disabled={isSoldOut}\n variant=\"primary\"\n href={data?.custom_primary_link}\n as={data?.custom_primary_link ? 'a' : 'button'}\n onClick={() =>\n !data?.custom_primary_link && onPrimaryButton(data, configuration?.index, configuration, coupon)\n }\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": "AAsLc,OAwBF,YAAAA,GAxBE,OAAAC,EAwBF,QAAAC,MAxBE,oBAtLd,OAAS,kBAAAC,OAAsB,2BAC/B,OAAS,sBAAAC,OAA0B,oBACnC,OAAOC,OAAa,8BACpB,OAAOC,OAAW,4BAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,OAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,OAAe,wBACxB,OAAS,eAAAC,OAAmB,8BAC5B,OAAS,WAAAC,OAAe,8BAExB,OAAS,eAAAC,OAAmB,6BAC5B,OAAS,UAAAC,GAAQ,aAAAC,GAAW,WAAAC,EAAS,YAAAC,OAAgB,QAErD,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,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,EAAUH,G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AAM,qBAAuB0B,EAAgB1B,EAAMQ,GAAe,MAAOA,EAAeqB,CAAM,EAEjG,UAAWrB,EAAc,YAAc,WAAa,SAAW,GAE9D,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GAlIKR,GAAM,IAAMA,GAAM,MAmIzB,CAEJ",
|
|
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", "locale", "copyWriting", "currencyDisplay", "discounts", "discountsCopy", "ref", "showTags", "setShowTags", "currentPriceTag", "setCurrentPriceTag", "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", "bottomContent", "custom_bg_image", "custom_theme", "ShelfDisplayHorizontalItem", "itemLength", "showSizeClass", "handleWrapClass"]
|
|
7
7
|
}
|
|
@@ -127,6 +127,8 @@ export type { SceneShelfV3Data, SceneShelfV3Props, ProductTab as SceneShelfV3Pro
|
|
|
127
127
|
export type { SceneShelfV3SemanticName, ProductCardData as SceneShelfV3ProductCardData, } from './SceneShelfV3/ProductCard.js';
|
|
128
128
|
export { default as MediaEndorsement } from './MediaEndorsement/index.js';
|
|
129
129
|
export type { MediaEndorsementProps, MediaEndorsementData, MediaEndorsementItem, MediaEndorsementSemanticName, } from './MediaEndorsement/index.js';
|
|
130
|
+
export { default as MediaTextOverlay } from './MediaTextOverlay/index.js';
|
|
131
|
+
export type { MediaTextOverlayProps, MediaTextOverlayData, MediaTextOverlayItem, MediaTextOverlaySemanticName, ResponsiveMedia, } from './MediaTextOverlay/index.js';
|
|
130
132
|
export type { CopyConfig as MediaShelfCopyConfig, ButtonFunctionType as MediaShelfButtonFunctionType, } from './MediaShelf/types.js';
|
|
131
133
|
export type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js';
|
|
132
134
|
export { default as ImageOverlayShelf, type ButtonFunctionType as ImageOverlayShelfButtonFunctionType, } from './ImageOverlayShelf/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as a}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 l}from"./BrandEquity/index.js";import{default as
|
|
1
|
+
import{default as a}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 l}from"./BrandEquity/index.js";import{default as m}from"./MemberEquity/index.js";import{default as x}from"./Slogan/index.js";import{default as h}from"./Title/index.js";import{default as P}from"./Spacer/index.js";import{default as g}from"./ShelfDisplay/index.js";import{default as v}from"./Evaluate/index.js";import{default as B}from"./Category/index.js";import{default as j}from"./HeroBanner/index.js";import{default as F}from"./AccordionCards/index.js";import{default as b}from"./Graphic/index.js";import{default as k}from"./MediaPlayerBase/index.js";import{default as L}from"./MediaPlayerSticky/index.js";import{default as V}from"./MediaPlayerMulti/index.js";import{default as N}from"./Marquee/index.js";import{default as W}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 ae}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 ue}from"./AiuiProvider/index.js";import{default as ne}from"./Tabs/index.js";import{default as ye}from"./CreativeModule/index.js";import{default as Se}from"./GraphicOverlay/index.js";import{default as Ce}from"./Specs/index.js";import{default as Me}from"./TabsGroup/index.js";import{default as Te}from"./Listing/BizProductProvider.js";import{default as Ie}from"./Listing/components/PurchaseBar/index.js";import{default as De}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as Ge}from"./Listing/components/ProductCard/index.js";import{default as Ae}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as we}from"./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js";import{default as Oe}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as qe}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as Ee}from"./Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js";import{default as Re}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as Ke}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as ze}from"./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js";import{default as Ye}from"./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js";import{default as Qe}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as Ze}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as et}from"./Listing/components/ProductCard/ProductDetail/index.js";import{default as rt}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as ot}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab.js";import{default as pt}from"./Listing/components/PaidShipping/index.js";import{default as ft}from"./Listing/components/ProductCard/ProductPaidShipping/index.js";import{default as ct}from"./GraphicMore/index.js";import{default as ut}from"./Features/index.js";import{default as nt}from"./AplusDesc/index.js";import{default as yt}from"./GiftBox/index.js";import{default as St}from"./SelectStore/index.js";import{default as Ct}from"./DownLoad/index.js";import{default as Mt}from"./FootCharger/index.js";import{default as Tt}from"./BrandCardLink/index.js";import*as Bt from"./IPRedirect/index.js";import{default as jt}from"./WheelLottery/index.js";import{default as Ft}from"./ProductLottery/index.js";import{default as bt}from"./ProductCompare/index.js";import{default as kt}from"./Ksp/index.js";import{default as Lt}from"./ImageTextFeature/index.js";import{default as Vt}from"./FeatureCards/index.js";import{default as Nt}from"./FeaturedBlogPosts/index.js";import{default as Wt}from"./ImageWithText/index.js";import{default as Ht}from"./VideoFeature/index.js";import{default as _t}from"./TabsWithMedia/index.js";import{default as Ut}from"./TabWithImage/index.js";import{default as Jt}from"./FeatureShowcase/index.js";import{default as Xt}from"./ProductHero/index.js";import{default as $t}from"./SpecsComparison/index.js";import{default as tr}from"./MediaSceneSwitcher/index.js";import{default as ar}from"./MediaSceneSwitcherV2/index.js";import{default as ir}from"./ThreeDCarousel/index.js";import{default as sr}from"./ProductNav/index.js";import{default as dr}from"./AnchorNavigation/index.js";import{default as lr}from"./PromotionalBar/index.js";import{default as mr}from"./EventSchedule/index.js";import{default as xr}from"./SecondaryBanner/index.js";import{default as hr}from"./BuyOneGetOneShelf/index.js";import{default as Pr}from"./ActiveShelf/index.js";import{default as gr}from"./MediaShelf/index.js";import{default as vr,CreditsProductCard as Tr}from"./CreditsShelf/index.js";import{default as Ir,SceneProductCard as jr}from"./SceneShelf/index.js";import{default as Fr,SceneShelfV2ProductCard as Gr}from"./SceneShelfV2/index.js";import{default as Ar}from"./SceneShelfV3/index.js";import{default as wr}from"./MediaEndorsement/index.js";import{default as Or}from"./MediaTextOverlay/index.js";import{default as qr}from"./ImageOverlayShelf/index.js";import{default as Er}from"./ImageTextOverlay/index.js";import{default as Rr}from"./MiniCart/index.js";import{default as Kr}from"./MiniCart/CircleProgress.js";import{default as zr,MiniCartDialog as Ur}from"./MiniCart/MiniCartDialog.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":"TabsBlock","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-active-shelf":"ActiveShelf","ipc-media-shelf":"MediaShelf","ipc-bogo-shelf":"BuyOneGetOneShelf","ipc-media-endorsement":"MediaEndorsement","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-featured-blog-posts":"FeaturedBlogPosts"};export{F as AccordionCards,Pr as ActiveShelf,d as ActivityMechanism,a as ActivitySchedule,ue as AiuiProvider,dr as AnchorNavigation,nt as AplusDesc,ot as BenefitsTab,Te as BizProductProvider,Tt as BrandCardLink,l as BrandEquity,hr as BuyOneGetOneShelf,B as Category,ye as CreativeModule,Tr as CreditsProductCard,vr as CreditsShelf,Ct as DownLoad,v as Evaluate,mr as EventSchedule,_ as Faq,Vt as FeatureCards,Jt as FeatureShowcase,Nt as FeaturedBlogPosts,ut as Features,Mt as FootCharger,ae as FooterNavigation,yt as GiftBox,i as GiftShelf,s as GiftTierShelf,b as Graphic,$ as GraphicAttractionBlock,ct as GraphicMore,Se as GraphicOverlay,te as HeaderNavigation,j as HeroBanner,se as IPC_SEARCH_PAGE,Bt as IPRedirect,qr as ImageOverlayShelf,Lt as ImageTextFeature,Er as ImageTextOverlay,Wt as ImageWithText,kt as Ksp,N as Marquee,Y as MarqueeImageContent,U as MarqueeItem,W as MarqueeReview,J as MarqueeTextContent,wr as MediaEndorsement,k as MediaPlayerBase,V as MediaPlayerMulti,L as MediaPlayerSticky,tr as MediaSceneSwitcher,ar as MediaSceneSwitcherV2,gr as MediaShelf,Or as MediaTextOverlay,m as MemberEquity,Rr as MiniCart,Kr as MiniCartCircleProgress,zr as MiniCartDialog,Ur as MiniCartDialogComponent,X as MultiLayoutGraphicBlock,e as PAYLOAD_COMPONENT_MAP,pt as PaidShipping,De as ProductActions,Ye as ProductBanner,we as ProductBenefits,Ae as ProductBenefitsTabs,Ke as ProductBundle,Ge as ProductCard,bt as ProductCompare,ze as ProductCoupon,et as ProductDetail,Ee as ProductExchangePurchase,qe as ProductFreeGift,Ze as ProductGallery,Qe as ProductGridBox,Xt as ProductHero,Oe as ProductHighlight,Ft as ProductLottery,sr as ProductNav,Re as ProductOptions,ft as ProductPaidShipping,rt as ProductSummary,lr as PromotionalBar,Ie as PurchaseBar,jr as SceneProductCard,Ir as SceneShelf,Fr as SceneShelfV2,Gr as SceneShelfV2ProductCard,Ar as SceneShelfV3,ie as SearchPage,fe as SearchPageTabType,xr as SecondaryBanner,St as SelectStore,g as ShelfDisplay,x as Slogan,P as Spacer,Ce as Specs,$t as SpecsComparison,Me as TabGroup,Ut as TabWithImage,ne as Tabs,_t as TabsWithMedia,ir as ThreeDCarousel,h as Title,Ht as VideoFeature,jt as WheelLottery,H as WhyChoose,ce as withLayout};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as ActivitySchedule } from './ActivitySchedule/index.js'\nexport type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js'\nexport { default as GiftShelf } from './GiftShelf/index.js'\nexport type {\n GiftShelfProps,\n GiftShelfData,\n GiftShelfItem,\n CountdownConfig,\n ResponsiveBackgroundImage as GiftShelfResponsiveBackgroundImage,\n} from './GiftShelf/types.js'\nexport { default as GiftTierShelf } from './GiftTierShelf/index.js'\nexport type { GiftTierShelfProps, GiftTierShelfData, GiftTierItem, GiftTierProduct } from './GiftTierShelf/types.js'\nexport { default as ActivityMechanism } from './ActivityMechanism/index.js'\nexport type {\n ActivityMechanismProps,\n ActivityMechanismItem,\n ActivityMechanismSemanticName,\n ResponsiveBackgroundImage,\n} from './ActivityMechanism/types.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as MarqueeReview } from './MarqueeReview/index.js'\nexport type { MarqueeReviewProps, MarqueeReviewData, ReviewItem } from './MarqueeReview/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as BizProductProvider } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js'\nexport { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\nexport { default as ProductPaidShipping } from './Listing/components/ProductCard/ProductPaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as BrandCardLink } from './BrandCardLink/index.js'\nexport type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink/types.js'\n\nexport * as IPRedirect from './IPRedirect/index.js'\n\nexport { default as WheelLottery } from './WheelLottery/index.js'\nexport type {\n WheelLotteryProps,\n WheelLotteryHandle,\n Prize,\n ChanceMethod,\n WinningInfo,\n UserData,\n} from './WheelLottery/types.js'\nexport { default as ProductLottery } from './ProductLottery/index.js'\nexport type { ProductLotteryProps, ProductLotteryHandle, MediaConfig, CtaButtonConfig } from './ProductLottery/types.js'\nexport { default as ProductCompare } from './ProductCompare/index.js'\nexport type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js'\nexport { default as Ksp } from './Ksp/index.js'\nexport type { KspProps, KspData, KspCardItem } from './Ksp/index.js'\nexport { default as ImageTextFeature } from './ImageTextFeature/index.js'\nexport type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js'\nexport { default as FeatureCards } from './FeatureCards/index.js'\nexport type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js'\nexport { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js'\nexport type {\n FeaturedBlogPostsProps,\n FeaturedBlogPostsData,\n FeaturedBlogPostItem,\n FeaturedBlogPostSpan,\n} from './FeaturedBlogPosts/index.js'\nexport { default as ImageWithText } from './ImageWithText/index.js'\nexport type { ImageWithTextProps } from './ImageWithText/index.js'\nexport { default as VideoFeature } from './VideoFeature/index.js'\nexport type { VideoFeatureProps } from './VideoFeature/index.js'\nexport { default as TabsWithMedia } from './TabsWithMedia/index.js'\nexport type { TabsWithMediaProps, TabItem, TimeIndex } from './TabsWithMedia/index.js'\nexport { default as TabWithImage } from './TabWithImage/index.js'\nexport type { TabWithImageProps, TabWithImageDataItem } from './TabWithImage/index.js'\nexport { default as FeatureShowcase } from './FeatureShowcase/index.js'\nexport type { FeatureShowcaseProps, FeatureShowcaseItem } from './FeatureShowcase/index.js'\nexport { default as ProductHero } from './ProductHero/index.js'\nexport type { ProductHeroProps } from './ProductHero/index.js'\nexport { default as SpecsComparison } from './SpecsComparison/index.js'\nexport type {\n SpecsComparisonProps,\n SpecsComparisonMenuItem,\n SpecsComparisonLeftMenuItem,\n} from './SpecsComparison/index.js'\nexport { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js'\nexport type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js'\nexport { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js'\nexport type {\n MediaSceneSwitcherV2Props,\n MediaSceneSwitcherV2Data,\n MediaSceneSwitcherV2Item,\n MediaSceneSwitcherV2Layout,\n} from './MediaSceneSwitcherV2/index.js'\nexport { default as ThreeDCarousel } from './ThreeDCarousel/index.js'\nexport type { ThreeDCarouselProps } from './ThreeDCarousel/index.js'\nexport { default as ProductNav } from './ProductNav/index.js'\nexport type { ProductNavProps, TabLink, AnchorItem, BuyButton } from './ProductNav/index.js'\nexport { default as AnchorNavigation } from './AnchorNavigation/index.js'\nexport { default as PromotionalBar } from './PromotionalBar/index.js'\nexport { default as EventSchedule } from './EventSchedule/index.js'\nexport { default as SecondaryBanner } from './SecondaryBanner/index.js'\nexport { default as BuyOneGetOneShelf } from './BuyOneGetOneShelf/index.js'\nexport { default as ActiveShelf } from './ActiveShelf/index.js'\nexport { default as MediaShelf } from './MediaShelf/index.js'\nexport { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/index.js'\nexport type {\n CreditsShelfSemanticName,\n CreditsProductCardData,\n CopyConfig as CreditsShelfCopyConfig,\n ButtonFunctionType as CreditsShelfButtonFunctionType,\n} from './CreditsShelf/index.js'\nexport { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js'\nexport type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js'\nexport { default as SceneShelfV2, SceneShelfV2ProductCard } from './SceneShelfV2/index.js'\nexport type {\n SceneShelfV2SemanticName,\n SceneShelfV2Data,\n SceneShelfV2Product,\n SceneShelfV2Props,\n} from './SceneShelfV2/index.js'\nexport { default as SceneShelfV3 } from './SceneShelfV3/index.js'\nexport type { SceneShelfV3Data, SceneShelfV3Props, ProductTab as SceneShelfV3ProductTab } from './SceneShelfV3/index.js'\nexport type {\n SceneShelfV3SemanticName,\n ProductCardData as SceneShelfV3ProductCardData,\n} from './SceneShelfV3/ProductCard.js'\n\nexport { default as MediaEndorsement } from './MediaEndorsement/index.js'\nexport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './MediaEndorsement/index.js'\n\n// Copy configuration types and defaults\nexport type {\n CopyConfig as MediaShelfCopyConfig,\n ButtonFunctionType as MediaShelfButtonFunctionType,\n} from './MediaShelf/types.js'\nexport type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js'\n\nexport {\n default as ImageOverlayShelf,\n type ButtonFunctionType as ImageOverlayShelfButtonFunctionType,\n} from './ImageOverlayShelf/index.js'\n\nexport { default as ImageTextOverlay } from './ImageTextOverlay/index.js'\nexport type {\n ImageTextOverlayProps,\n ImageTextOverlayData,\n ImageTextOverlayItem,\n ImageTextOverlaySemanticName,\n ImageTextOverlayBackgroundImage,\n} from './ImageTextOverlay/types.js'\n\n// MiniCart \u7EC4\u4EF6\u53CA\u7C7B\u578B\u5BFC\u51FA\nexport { default as MiniCart } from './MiniCart/index.js'\nexport type { Cart, CartLineItem, MiniCartData, MiniCartProps, CircleProgressConfig } from './MiniCart/index.js'\nexport { default as MiniCartCircleProgress } from './MiniCart/CircleProgress.js'\nexport type { CircleProgressProps as MiniCartCircleProgressProps } from './MiniCart/CircleProgress.js'\nexport { default as MiniCartDialog, MiniCartDialog as MiniCartDialogComponent } from './MiniCart/MiniCartDialog.js'\nexport type {\n MiniCartDialogProps,\n MiniCartDialogCopy,\n MiniCartDialogSemanticName,\n CartData,\n} from './MiniCart/MiniCartDialog.js'\n\n/**\n * \u7EC4\u4EF6\u6620\u5C04\u5BF9\u8C61\n */\n\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-accordioncards': 'AccordionCards',\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'HeroBanner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-giftshelf': 'GiftShelf',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'TabsBlock',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n 'ipc-product-nav': 'ProductNav',\n 'ipc-brand-card-link': 'BrandCardLink',\n 'ipc-ipredirect': 'IPRedirect',\n ksp: 'Ksp',\n 'ipc-secondary-banner': 'SecondaryBanner',\n /**\n * \u6D3B\u52A8\u8D27\u67B6\n */\n 'ipc-active-shelf': 'ActiveShelf',\n 'ipc-media-shelf': 'MediaShelf',\n /**\n * \u6D3B\u52A8\u4E70\u8D60\u8D27\u67B6\n */\n 'ipc-bogo-shelf': 'BuyOneGetOneShelf',\n 'ipc-media-endorsement': 'MediaEndorsement',\n 'ipc-media-scene-switcher-v2': 'MediaSceneSwitcherV2',\n 'ipc-featured-blog-posts': 'FeaturedBlogPosts',\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAoB,WAAXA,MAAmC,8BAE5C,OAAoB,WAAXA,MAA4B,uBAQrC,OAAoB,WAAXA,MAAgC,2BAEzC,OAAoB,WAAXA,MAAoC,+BAO7C,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,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B,WAAXA,OAA6B,wBACtC,OAAoB,WAAXA,GAAyB,sBAAAQ,OAA0B,0BAO5D,OAAoB,WAAXR,GAAuB,oBAAAS,OAAwB,wBAExD,OAAoB,WAAXT,GAAyB,2BAAAU,OAA+B,0BAOjE,OAAoB,WAAXV,OAA+B,0BAOxC,OAAoB,WAAXA,OAAmC,
|
|
4
|
+
"sourcesContent": ["export { default as ActivitySchedule } from './ActivitySchedule/index.js'\nexport type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js'\nexport { default as GiftShelf } from './GiftShelf/index.js'\nexport type {\n GiftShelfProps,\n GiftShelfData,\n GiftShelfItem,\n CountdownConfig,\n ResponsiveBackgroundImage as GiftShelfResponsiveBackgroundImage,\n} from './GiftShelf/types.js'\nexport { default as GiftTierShelf } from './GiftTierShelf/index.js'\nexport type { GiftTierShelfProps, GiftTierShelfData, GiftTierItem, GiftTierProduct } from './GiftTierShelf/types.js'\nexport { default as ActivityMechanism } from './ActivityMechanism/index.js'\nexport type {\n ActivityMechanismProps,\n ActivityMechanismItem,\n ActivityMechanismSemanticName,\n ResponsiveBackgroundImage,\n} from './ActivityMechanism/types.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as MarqueeReview } from './MarqueeReview/index.js'\nexport type { MarqueeReviewProps, MarqueeReviewData, ReviewItem } from './MarqueeReview/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as BizProductProvider } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js'\nexport { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\nexport { default as ProductPaidShipping } from './Listing/components/ProductCard/ProductPaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as BrandCardLink } from './BrandCardLink/index.js'\nexport type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink/types.js'\n\nexport * as IPRedirect from './IPRedirect/index.js'\n\nexport { default as WheelLottery } from './WheelLottery/index.js'\nexport type {\n WheelLotteryProps,\n WheelLotteryHandle,\n Prize,\n ChanceMethod,\n WinningInfo,\n UserData,\n} from './WheelLottery/types.js'\nexport { default as ProductLottery } from './ProductLottery/index.js'\nexport type { ProductLotteryProps, ProductLotteryHandle, MediaConfig, CtaButtonConfig } from './ProductLottery/types.js'\nexport { default as ProductCompare } from './ProductCompare/index.js'\nexport type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js'\nexport { default as Ksp } from './Ksp/index.js'\nexport type { KspProps, KspData, KspCardItem } from './Ksp/index.js'\nexport { default as ImageTextFeature } from './ImageTextFeature/index.js'\nexport type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js'\nexport { default as FeatureCards } from './FeatureCards/index.js'\nexport type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js'\nexport { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js'\nexport type {\n FeaturedBlogPostsProps,\n FeaturedBlogPostsData,\n FeaturedBlogPostItem,\n FeaturedBlogPostSpan,\n} from './FeaturedBlogPosts/index.js'\nexport { default as ImageWithText } from './ImageWithText/index.js'\nexport type { ImageWithTextProps } from './ImageWithText/index.js'\nexport { default as VideoFeature } from './VideoFeature/index.js'\nexport type { VideoFeatureProps } from './VideoFeature/index.js'\nexport { default as TabsWithMedia } from './TabsWithMedia/index.js'\nexport type { TabsWithMediaProps, TabItem, TimeIndex } from './TabsWithMedia/index.js'\nexport { default as TabWithImage } from './TabWithImage/index.js'\nexport type { TabWithImageProps, TabWithImageDataItem } from './TabWithImage/index.js'\nexport { default as FeatureShowcase } from './FeatureShowcase/index.js'\nexport type { FeatureShowcaseProps, FeatureShowcaseItem } from './FeatureShowcase/index.js'\nexport { default as ProductHero } from './ProductHero/index.js'\nexport type { ProductHeroProps } from './ProductHero/index.js'\nexport { default as SpecsComparison } from './SpecsComparison/index.js'\nexport type {\n SpecsComparisonProps,\n SpecsComparisonMenuItem,\n SpecsComparisonLeftMenuItem,\n} from './SpecsComparison/index.js'\nexport { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js'\nexport type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js'\nexport { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js'\nexport type {\n MediaSceneSwitcherV2Props,\n MediaSceneSwitcherV2Data,\n MediaSceneSwitcherV2Item,\n MediaSceneSwitcherV2Layout,\n} from './MediaSceneSwitcherV2/index.js'\nexport { default as ThreeDCarousel } from './ThreeDCarousel/index.js'\nexport type { ThreeDCarouselProps } from './ThreeDCarousel/index.js'\nexport { default as ProductNav } from './ProductNav/index.js'\nexport type { ProductNavProps, TabLink, AnchorItem, BuyButton } from './ProductNav/index.js'\nexport { default as AnchorNavigation } from './AnchorNavigation/index.js'\nexport { default as PromotionalBar } from './PromotionalBar/index.js'\nexport { default as EventSchedule } from './EventSchedule/index.js'\nexport { default as SecondaryBanner } from './SecondaryBanner/index.js'\nexport { default as BuyOneGetOneShelf } from './BuyOneGetOneShelf/index.js'\nexport { default as ActiveShelf } from './ActiveShelf/index.js'\nexport { default as MediaShelf } from './MediaShelf/index.js'\nexport { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/index.js'\nexport type {\n CreditsShelfSemanticName,\n CreditsProductCardData,\n CopyConfig as CreditsShelfCopyConfig,\n ButtonFunctionType as CreditsShelfButtonFunctionType,\n} from './CreditsShelf/index.js'\nexport { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js'\nexport type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js'\nexport { default as SceneShelfV2, SceneShelfV2ProductCard } from './SceneShelfV2/index.js'\nexport type {\n SceneShelfV2SemanticName,\n SceneShelfV2Data,\n SceneShelfV2Product,\n SceneShelfV2Props,\n} from './SceneShelfV2/index.js'\nexport { default as SceneShelfV3 } from './SceneShelfV3/index.js'\nexport type { SceneShelfV3Data, SceneShelfV3Props, ProductTab as SceneShelfV3ProductTab } from './SceneShelfV3/index.js'\nexport type {\n SceneShelfV3SemanticName,\n ProductCardData as SceneShelfV3ProductCardData,\n} from './SceneShelfV3/ProductCard.js'\n\nexport { default as MediaEndorsement } from './MediaEndorsement/index.js'\nexport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './MediaEndorsement/index.js'\n\nexport { default as MediaTextOverlay } from './MediaTextOverlay/index.js'\nexport type {\n MediaTextOverlayProps,\n MediaTextOverlayData,\n MediaTextOverlayItem,\n MediaTextOverlaySemanticName,\n ResponsiveMedia,\n} from './MediaTextOverlay/index.js'\n\n// Copy configuration types and defaults\nexport type {\n CopyConfig as MediaShelfCopyConfig,\n ButtonFunctionType as MediaShelfButtonFunctionType,\n} from './MediaShelf/types.js'\nexport type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js'\n\nexport {\n default as ImageOverlayShelf,\n type ButtonFunctionType as ImageOverlayShelfButtonFunctionType,\n} from './ImageOverlayShelf/index.js'\n\nexport { default as ImageTextOverlay } from './ImageTextOverlay/index.js'\nexport type {\n ImageTextOverlayProps,\n ImageTextOverlayData,\n ImageTextOverlayItem,\n ImageTextOverlaySemanticName,\n ImageTextOverlayBackgroundImage,\n} from './ImageTextOverlay/types.js'\n\n// MiniCart \u7EC4\u4EF6\u53CA\u7C7B\u578B\u5BFC\u51FA\nexport { default as MiniCart } from './MiniCart/index.js'\nexport type { Cart, CartLineItem, MiniCartData, MiniCartProps, CircleProgressConfig } from './MiniCart/index.js'\nexport { default as MiniCartCircleProgress } from './MiniCart/CircleProgress.js'\nexport type { CircleProgressProps as MiniCartCircleProgressProps } from './MiniCart/CircleProgress.js'\nexport { default as MiniCartDialog, MiniCartDialog as MiniCartDialogComponent } from './MiniCart/MiniCartDialog.js'\nexport type {\n MiniCartDialogProps,\n MiniCartDialogCopy,\n MiniCartDialogSemanticName,\n CartData,\n} from './MiniCart/MiniCartDialog.js'\n\n/**\n * \u7EC4\u4EF6\u6620\u5C04\u5BF9\u8C61\n */\n\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-accordioncards': 'AccordionCards',\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'HeroBanner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-giftshelf': 'GiftShelf',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'TabsBlock',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n 'ipc-product-nav': 'ProductNav',\n 'ipc-brand-card-link': 'BrandCardLink',\n 'ipc-ipredirect': 'IPRedirect',\n ksp: 'Ksp',\n 'ipc-secondary-banner': 'SecondaryBanner',\n /**\n * \u6D3B\u52A8\u8D27\u67B6\n */\n 'ipc-active-shelf': 'ActiveShelf',\n 'ipc-media-shelf': 'MediaShelf',\n /**\n * \u6D3B\u52A8\u4E70\u8D60\u8D27\u67B6\n */\n 'ipc-bogo-shelf': 'BuyOneGetOneShelf',\n 'ipc-media-endorsement': 'MediaEndorsement',\n 'ipc-media-scene-switcher-v2': 'MediaSceneSwitcherV2',\n 'ipc-featured-blog-posts': 'FeaturedBlogPosts',\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAAmC,8B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AA+B,uBAC/B,0BAA2B,mBAC7B",
|
|
6
6
|
"names": ["default", "MarqueeItem", "MarqueeImageContent", "MarqueeTextContent", "IPC_SEARCH_PAGE", "SearchPageTabType", "withLayout", "IPRedirect", "CreditsProductCard", "SceneProductCard", "SceneShelfV2ProductCard", "MiniCartDialog", "PAYLOAD_COMPONENT_MAP"]
|
|
7
7
|
}
|