@anker-in/headless-ui 1.1.67 → 1.1.68
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/BuyOneGetOneShelf/index.js +1 -1
- package/dist/cjs/biz-components/BuyOneGetOneShelf/index.js.map +2 -2
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.d.ts +56 -0
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +2 -0
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/SidebarDropdown.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/SidebarDropdown.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +2 -2
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/Listing/utils/index.js +1 -1
- package/dist/cjs/biz-components/Listing/utils/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaEndorsement/index.d.ts +11 -0
- package/dist/cjs/biz-components/MediaEndorsement/index.js +23 -0
- package/dist/cjs/biz-components/MediaEndorsement/index.js.map +7 -0
- package/dist/cjs/biz-components/MediaEndorsement/types.d.ts +44 -0
- package/dist/cjs/biz-components/MediaEndorsement/types.js +2 -0
- package/dist/cjs/biz-components/MediaEndorsement/types.js.map +7 -0
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +59 -0
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js +2 -0
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js.map +7 -0
- package/dist/cjs/biz-components/MediaShelf/ProductCard.d.ts +2 -0
- package/dist/cjs/biz-components/MediaShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/MediaShelf/ProductCard.js.map +3 -3
- package/dist/cjs/biz-components/MediaShelf/index.js +1 -1
- package/dist/cjs/biz-components/MediaShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/index.d.ts +7 -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/BuyOneGetOneShelf/index.js +1 -1
- package/dist/esm/biz-components/BuyOneGetOneShelf/index.js.map +2 -2
- package/dist/esm/biz-components/FeaturedBlogPosts/index.d.ts +56 -0
- package/dist/esm/biz-components/FeaturedBlogPosts/index.js +2 -0
- package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/SidebarDropdown.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/SidebarDropdown.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/Listing/utils/index.js +1 -1
- package/dist/esm/biz-components/Listing/utils/index.js.map +3 -3
- package/dist/esm/biz-components/MediaEndorsement/index.d.ts +11 -0
- package/dist/esm/biz-components/MediaEndorsement/index.js +23 -0
- package/dist/esm/biz-components/MediaEndorsement/index.js.map +7 -0
- package/dist/esm/biz-components/MediaEndorsement/types.d.ts +44 -0
- package/dist/esm/biz-components/MediaEndorsement/types.js +1 -0
- package/dist/esm/biz-components/MediaEndorsement/types.js.map +7 -0
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +59 -0
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js +2 -0
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js.map +7 -0
- package/dist/esm/biz-components/MediaShelf/ProductCard.d.ts +2 -0
- package/dist/esm/biz-components/MediaShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/MediaShelf/ProductCard.js.map +3 -3
- package/dist/esm/biz-components/MediaShelf/index.js +1 -1
- package/dist/esm/biz-components/MediaShelf/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/index.d.ts +7 -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/dist/cjs/biz-components/ShelfDisplay/tabSwitch.d.ts +0 -9
- package/dist/cjs/biz-components/ShelfDisplay/tabSwitch.js +0 -2
- package/dist/cjs/biz-components/ShelfDisplay/tabSwitch.js.map +0 -7
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.d.ts +0 -9
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.js +0 -2
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.js.map +0 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var oe=Object.create;var
|
|
1
|
+
"use strict";"use client";var oe=Object.create;var T=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var me=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty;var pe=(t,n)=>{for(var i in n)T(t,i,{get:n[i],enumerable:!0})},A=(t,n,i,h)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of ce(n))!fe.call(t,c)&&c!==i&&T(t,c,{get:()=>n[c],enumerable:!(h=le(n,c))||h.enumerable});return t};var R=(t,n,i)=>(i=t!=null?oe(me(t)):{},A(n||!t||!t.__esModule?T(i,"default",{value:t,enumerable:!0}):i,t)),ue=t=>A(T({},"__esModule",{value:!0}),t);var be={};pe(be,{default:()=>_e});module.exports=ue(be);var o=require("react/jsx-runtime"),s=R(require("react")),q=require("../../helpers/utils.js"),d=require("../../components/tabs.js"),O=R(require("../Title/index.js")),K=R(require("../SwiperBox/index.js")),Q=require("../../shared/Styles.js"),D=require("../../shared/track.js"),W=require("react-responsive"),Z=require("../../hooks/useRollout.js"),S=require("./shelfDisplayItem.js");const de="image",he="product_shelf",ge=t=>t==null?"default":String(t).replace(/[^a-zA-Z0-9_-]/g,"")||"default",we=()=>`shelf-display-${Math.random().toString(36).slice(2,9)}`,$=s.default.forwardRef(({key:t,data:n,event:i,buildData:h,breakpoints:c,className:j="",recommendedData:p,target:F="_self",metafields:G,isDisplayGudgments:M=!1,isDisplayBackImage:J=!1},U)=>{const{productsTab:m=[],productsCard:x=[],title:P,isShowTab:_=!0,tabShape:X="square",isShowTag:Y=!1,isShowOriginalPrice:ee=!0,isShowRecommendedCard:C=!1,...te}=n,[b,H]=(0,s.useState)(""),[f,v]=(0,s.useState)([]),L=(0,s.useRef)(!1),k=(0,s.useRef)(!1),V=(0,s.useRef)(null),ne=(0,s.useRef)(we()),se=(0,W.useMediaQuery)({query:"(max-width: 768px)"}),[ae,B]=(0,Z.useRollout)({threshold:0}),y=f?.length<=1&&M,g=!se&&f?.length<=2&&M,I=e=>{switch(e){case 1440:return g?f?.length:4;case 1024:return g?f?.length:3;default:return g?f?.length:2.3}},E=()=>{(0,D.gaTrack)({event:"ga4Event",event_name:"view_item_list",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:p?.map((e,a)=>{const l=e?.variants?.find(r=>r?.sku===e?.sku)||e?.variants?.[0];return{item_id:e?.sku||l?.sku,item_name:e?.name,item_variant:l?.name,price:l?.price,index:a+1}})}})},w=(e,a)=>{if(a){const u=p?.map?.(l=>({...l,isShowRecommended:!0}));v(u?.length?u||[]:[])}else if(Array.isArray(e)){const l=e?.map?.(r=>{const z=h?.products?.find(ie=>ie?.handle===r?.handle);if(z)return{sku:r.sku,isShowRecommended:!1,custom_name:r.custom_name,custom_description:r.custom_description,custom_image:r.custom_image,custom_theme:r.custom_theme,custom_primary_link:r?.custom_primary_link||"",custom_secondary_link:r?.custom_secondary_link||"",...z}})?.filter(r=>r);v(l?.length?l||[]:[])}else v([])};(0,s.useImperativeHandle)(U,()=>V.current),(0,s.useEffect)(()=>{B&&p?.length&&!L.current&&(L.current=!0,E())},[B,p]),(0,s.useEffect)(()=>{if(!k.current){if(!k.current&&p?.length&&(k.current=!0),_){const e=m?.find(a=>a?.tab===b)||m?.[0];H(e?.tab||""),w(e?.data||[],e?.isShowRecommendedTab);return}w(x,C)}},[p]),(0,s.useEffect)(()=>{if(_){const e=m?.find(a=>a?.tab===b)||m?.[0];w(e?.data||[],e?.isShowRecommendedTab);return}w(x,C)},[h]);const re=ge(b),N=`${ne.current}-${re}`;return(0,o.jsxs)("div",{ref:V,className:(0,q.cn)("shelf-display-wrap text-info-primary w-full",j,{"aiui-dark":n?.theme==="dark"}),children:[P&&(0,o.jsx)(O.default,{data:{title:P}}),_&&m?.length>0&&(0,o.jsx)(d.Tabs,{value:b,onValueChange:e=>{const a=m?.find(u=>u?.tab===e);if(a){if(H(e),w(a.data||[],a.isShowRecommendedTab),!a.isShowRecommendedTab){(0,D.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:de,component_name:he,component_title:n?.title,component_position:1,navigation:e}});return}E()}},shape:X==="rounded"?"rounded":"square",children:(0,o.jsx)(d.TabsList,{children:m.map(e=>(0,o.jsx)(d.TabsTrigger,{value:e?.tab,children:e?.tab||""},e?.id||e?.tab))})}),(0,o.jsx)("div",{ref:ae,className:"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]",children:(0,o.jsx)(K.default,{data:{list:f,configuration:{...te,event:i,isShowTag:Y,isShowOriginalPrice:ee,target:F,metafields:G,itemLength:f?.length,isDisplayBackImage:J}},id:N,className:`${_?"mt-6":""} shelf-display-swiper-box !overflow-visible`,itemClassName:g?"flex-1":"",Slide:g?S.ShelfDisplayHorizontalItem:S.ShelfDisplayWrapItem,breakpoints:c||{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:y?1:1.2},768:{spaceBetween:y?0:16,freeMode:!1,slidesPerView:I()},1024:{spaceBetween:y?0:16,freeMode:!1,slidesPerView:I(1024)},1440:{spaceBetween:y?0:16,freeMode:!1,slidesPerView:I(1440)}}},N)})]})});$.displayName="ShelfDisplay";var _e=(0,Q.withLayout)($);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -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 TabSwitch from './tabSwitch.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 },\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 className={cn('shelf-display-wrap w-full', className, { 'aiui-dark': data?.theme === 'dark' })}\n >\n {title && <Title data={{ title: title }} />}\n {isShowTab && (\n <div className=\"md-tablet:w-full md-tablet:overflow-hidden\">\n <TabSwitch\n value={tabId}\n tabs={productsTab}\n tabShape={tabShape}\n onTabClick={v => {\n setTabId(v?.tab)\n handleCurrentTab(v?.data || [], v?.isShowRecommendedTab)\n if (!v?.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: v?.tab,\n },\n })\n return\n }\n gackViewEvent()\n }}\n />\n </div>\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 },\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": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA+KM,IAAAI,EAAA,6BA9KNC,EAAwE,oBACxEC,EAAmB,kCACnBC,
|
|
6
|
-
"names": ["ShelfDisplay_exports", "__export", "ShelfDisplay_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "
|
|
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 },\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 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 },\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": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GA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e,IAAI,CACpC,CACF,GA7CGe,CA+CP,EACF,GACF,CAEJ,CACF,EAEAnD,EAAa,YAAc,eAC3B,IAAOlB,MAAQ,cAAWkB,CAAY",
|
|
6
|
+
"names": ["ShelfDisplay_exports", "__export", "ShelfDisplay_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_tabs", "import_Title", "import_SwiperBox", "import_Styles", "import_track", "import_react_responsive", "import_useRollout", "import_shelfDisplayItem", "componentType", "componentName", "sanitizeCssSelector", "value", "createInstanceId", "ShelfDisplay", "React", "key", "data", "event", "buildData", "breakpoints", "className", "recommendedData", "target", "metafields", "isDisplayGudgments", "isDisplayBackImage", "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", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -69,6 +69,8 @@ export { default as ImageTextFeature } from './ImageTextFeature/index.js';
|
|
|
69
69
|
export type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js';
|
|
70
70
|
export { default as FeatureCards } from './FeatureCards/index.js';
|
|
71
71
|
export type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js';
|
|
72
|
+
export { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js';
|
|
73
|
+
export type { FeaturedBlogPostsProps, FeaturedBlogPostsData, FeaturedBlogPostItem, FeaturedBlogPostSpan, } from './FeaturedBlogPosts/index.js';
|
|
72
74
|
export { default as ImageWithText } from './ImageWithText/index.js';
|
|
73
75
|
export type { ImageWithTextProps } from './ImageWithText/index.js';
|
|
74
76
|
export { default as VideoFeature } from './VideoFeature/index.js';
|
|
@@ -85,6 +87,8 @@ export { default as SpecsComparison } from './SpecsComparison/index.js';
|
|
|
85
87
|
export type { SpecsComparisonProps, SpecsComparisonMenuItem, SpecsComparisonLeftMenuItem, } from './SpecsComparison/index.js';
|
|
86
88
|
export { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js';
|
|
87
89
|
export type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js';
|
|
90
|
+
export { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js';
|
|
91
|
+
export type { MediaSceneSwitcherV2Props, MediaSceneSwitcherV2Data, MediaSceneSwitcherV2Item, MediaSceneSwitcherV2Layout, } from './MediaSceneSwitcherV2/index.js';
|
|
88
92
|
export { default as ThreeDCarousel } from './ThreeDCarousel/index.js';
|
|
89
93
|
export type { ThreeDCarouselProps } from './ThreeDCarousel/index.js';
|
|
90
94
|
export { default as ProductNav } from './ProductNav/index.js';
|
|
@@ -100,6 +104,8 @@ export { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/inde
|
|
|
100
104
|
export type { CreditsShelfSemanticName, CreditsProductCardData, CopyConfig as CreditsShelfCopyConfig, ButtonFunctionType as CreditsShelfButtonFunctionType, } from './CreditsShelf/index.js';
|
|
101
105
|
export { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js';
|
|
102
106
|
export type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js';
|
|
107
|
+
export { default as MediaEndorsement } from './MediaEndorsement/index.js';
|
|
108
|
+
export type { MediaEndorsementProps, MediaEndorsementData, MediaEndorsementItem, MediaEndorsementSemanticName, } from './MediaEndorsement/index.js';
|
|
103
109
|
export type { CopyConfig as MediaShelfCopyConfig, ButtonFunctionType as MediaShelfButtonFunctionType, } from './MediaShelf/types.js';
|
|
104
110
|
export type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js';
|
|
105
111
|
export { default as ImageOverlayShelf, type ButtonFunctionType as ImageOverlayShelfButtonFunctionType, } from './ImageOverlayShelf/index.js';
|
|
@@ -161,4 +167,5 @@ export declare const PAYLOAD_COMPONENT_MAP: {
|
|
|
161
167
|
* 活动买赠货架
|
|
162
168
|
*/
|
|
163
169
|
'ipc-bogo-shelf': string;
|
|
170
|
+
'ipc-media-endorsement': string;
|
|
164
171
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var We=Object.create;var p=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Ke=Object.prototype.hasOwnProperty;var _e=(r,t)=>{for(var a in t)p(r,a,{get:t[a],enumerable:!0})},l=(r,t,a,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of He(t))!Ke.call(r,i)&&i!==a&&p(r,i,{get:()=>t[i],enumerable:!(u=Ve(t,i))||u.enumerable});return r};var e=(r,t,a)=>(a=r!=null?We(Re(r)):{},l(t||!r||!r.__esModule?p(a,"default",{value:r,enumerable:!0}):a,r)),ze=r=>l(p({},"__esModule",{value:!0}),r);var Je={};_e(Je,{AccordionCards:()=>g.default,ActiveShelf:()=>ke.default,AiuiProvider:()=>L.default,AnchorNavigation:()=>je.default,AplusDesc:()=>se.default,BenefitsTab:()=>ae.default,BizProductProvider:()=>R.default,BrandCardLink:()=>le.default,BrandEquity:()=>n.default,BuyOneGetOneShelf:()=>Ge.default,Category:()=>S.default,CreativeModule:()=>O.default,CreditsProductCard:()=>d.CreditsProductCard,CreditsShelf:()=>d.default,DownLoad:()=>ce.default,Evaluate:()=>C.default,EventSchedule:()=>we.default,Faq:()=>D.default,FeatureCards:()=>he.default,FeatureShowcase:()=>ge.default,FeaturedBlogPosts:()=>ye.default,Features:()=>pe.default,FootCharger:()=>ue.default,FooterNavigation:()=>k.default,GiftBox:()=>de.default,Graphic:()=>B.default,GraphicAttractionBlock:()=>A.default,GraphicMore:()=>ie.default,GraphicOverlay:()=>W.default,HeaderNavigation:()=>G.default,HeroBanner:()=>M.default,IPC_SEARCH_PAGE:()=>s.IPC_SEARCH_PAGE,IPRedirect:()=>Qe,ImageOverlayShelf:()=>Le.default,ImageTextFeature:()=>xe.default,ImageWithText:()=>Pe.default,Ksp:()=>me.default,Marquee:()=>v.default,MarqueeImageContent:()=>o.MarqueeImageContent,MarqueeItem:()=>o.MarqueeItem,MarqueeReview:()=>b.default,MarqueeTextContent:()=>o.MarqueeTextContent,MediaEndorsement:()=>Ee.default,MediaPlayerBase:()=>T.default,MediaPlayerMulti:()=>I.default,MediaPlayerSticky:()=>F.default,MediaSceneSwitcher:()=>Fe.default,MediaSceneSwitcherV2:()=>Ie.default,MediaShelf:()=>qe.default,MemberEquity:()=>m.default,MiniCart:()=>Ne.default,MiniCartCircleProgress:()=>Oe.default,MiniCartDialog:()=>c.default,MiniCartDialogComponent:()=>c.MiniCartDialog,MultiLayoutGraphicBlock:()=>w.default,PAYLOAD_COMPONENT_MAP:()=>Ye,PaidShipping:()=>oe.default,ProductActions:()=>_.default,ProductBenefitsTabs:()=>Y.default,ProductBundle:()=>Z.default,ProductCard:()=>z.default,ProductCompare:()=>ne.default,ProductDetail:()=>re.default,ProductExchangePurchase:()=>U.default,ProductFreeGift:()=>Q.default,ProductGallery:()=>ee.default,ProductGridBox:()=>$.default,ProductHero:()=>Be.default,ProductHighlight:()=>J.default,ProductNav:()=>be.default,ProductOptions:()=>X.default,ProductSummary:()=>te.default,PromotionalBar:()=>De.default,PurchaseBar:()=>K.default,SceneProductCard:()=>f.SceneProductCard,SceneShelf:()=>f.default,SearchPage:()=>q.default,SearchPageTabType:()=>s.SearchPageTabType,SecondaryBanner:()=>Ae.default,SelectStore:()=>fe.default,ShelfDisplay:()=>P.default,Slogan:()=>x.default,Spacer:()=>y.default,Specs:()=>V.default,SpecsComparison:()=>Te.default,TabGroup:()=>H.default,TabWithImage:()=>Me.default,Tabs:()=>N.default,TabsWithMedia:()=>Se.default,ThreeDCarousel:()=>ve.default,Title:()=>h.default,VideoFeature:()=>Ce.default,WhyChoose:()=>j.default,withLayout:()=>E.withLayout});module.exports=ze(Je);var n=e(require("./BrandEquity/index.js")),m=e(require("./MemberEquity/index.js")),x=e(require("./Slogan/index.js")),h=e(require("./Title/index.js")),y=e(require("./Spacer/index.js")),P=e(require("./ShelfDisplay/index.js")),C=e(require("./Evaluate/index.js")),S=e(require("./Category/index.js")),M=e(require("./HeroBanner/index.js")),g=e(require("./AccordionCards/index.js")),B=e(require("./Graphic/index.js")),T=e(require("./MediaPlayerBase/index.js")),F=e(require("./MediaPlayerSticky/index.js")),I=e(require("./MediaPlayerMulti/index.js")),v=e(require("./Marquee/index.js")),b=e(require("./MarqueeReview/index.js")),j=e(require("./WhyChoose/index.js")),D=e(require("./Faq/index.js")),o=require("./Marquee/index.js"),w=e(require("./MultiLayoutGraphicBlock/index.js")),A=e(require("./GraphicAttractionBlock/index.js")),G=e(require("./HeaderNavigation/index.js")),k=e(require("./FooterNavigation/index.js")),q=e(require("./SearchPage/index.js")),s=require("./SearchPage/types.js"),E=require("../shared/Styles.js"),L=e(require("./AiuiProvider/index.js")),N=e(require("./Tabs/index.js")),O=e(require("./CreativeModule/index.js")),W=e(require("./GraphicOverlay/index.js")),V=e(require("./Specs/index.js")),H=e(require("./TabsGroup/index.js")),R=e(require("./Listing/BizProductProvider.js")),K=e(require("./Listing/components/PurchaseBar/index.js")),_=e(require("./Listing/components/PurchaseBar/ProductActions/index.js")),z=e(require("./Listing/components/ProductCard/index.js")),Y=e(require("./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js")),J=e(require("./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js")),Q=e(require("./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js")),U=e(require("./Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js")),X=e(require("./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js")),Z=e(require("./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js")),$=e(require("./Listing/components/ProductCard/ProductGridBox.js")),ee=e(require("./Listing/components/ProductCard/ProductGallery/index.js")),re=e(require("./Listing/components/ProductCard/ProductDetail/index.js")),te=e(require("./Listing/components/ProductCard/ProductSummary/index.js")),ae=e(require("./Listing/components/ProductCard/ProductDetail/BenefitsTab.js")),oe=e(require("./Listing/components/PaidShipping/index.js")),ie=e(require("./GraphicMore/index.js")),pe=e(require("./Features/index.js")),se=e(require("./AplusDesc/index.js")),de=e(require("./GiftBox/index.js")),fe=e(require("./SelectStore/index.js")),ce=e(require("./DownLoad/index.js")),ue=e(require("./FootCharger/index.js")),le=e(require("./BrandCardLink/index.js")),Qe=e(require("./IPRedirect/index.js")),ne=e(require("./ProductCompare/index.js")),me=e(require("./Ksp/index.js")),xe=e(require("./ImageTextFeature/index.js")),he=e(require("./FeatureCards/index.js")),ye=e(require("./FeaturedBlogPosts/index.js")),Pe=e(require("./ImageWithText/index.js")),Ce=e(require("./VideoFeature/index.js")),Se=e(require("./TabsWithMedia/index.js")),Me=e(require("./TabWithImage/index.js")),ge=e(require("./FeatureShowcase/index.js")),Be=e(require("./ProductHero/index.js")),Te=e(require("./SpecsComparison/index.js")),Fe=e(require("./MediaSceneSwitcher/index.js")),Ie=e(require("./MediaSceneSwitcherV2/index.js")),ve=e(require("./ThreeDCarousel/index.js")),be=e(require("./ProductNav/index.js")),je=e(require("./AnchorNavigation/index.js")),De=e(require("./PromotionalBar/index.js")),we=e(require("./EventSchedule/index.js")),Ae=e(require("./SecondaryBanner/index.js")),Ge=e(require("./BuyOneGetOneShelf/index.js")),ke=e(require("./ActiveShelf/index.js")),qe=e(require("./MediaShelf/index.js")),d=e(require("./CreditsShelf/index.js")),f=e(require("./SceneShelf/index.js")),Ee=e(require("./MediaEndorsement/index.js")),Le=e(require("./ImageOverlayShelf/index.js")),Ne=e(require("./MiniCart/index.js")),Oe=e(require("./MiniCart/CircleProgress.js")),c=e(require("./MiniCart/MiniCartDialog.js"));const Ye={"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-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose","ipc-product-nav":"ProductNav","ipc-brand-card-link":"BrandCardLink","ipc-ipredirect":"IPRedirect",ksp:"Ksp","ipc-secondary-banner":"SecondaryBanner","ipc-active-shelf":"ActiveShelf","ipc-media-shelf":"MediaShelf","ipc-bogo-shelf":"BuyOneGetOneShelf","ipc-media-endorsement":"MediaEndorsement"};
|
|
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 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 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 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'\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 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 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 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'\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\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-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': 'Tabs',\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}\n"],
|
|
5
|
-
"mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,
|
|
6
|
-
"names": ["biz_components_exports", "__export", "IPRedirect", "PAYLOAD_COMPONENT_MAP", "__toCommonJS", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_MarqueeReview", "import_WhyChoose", "import_Faq", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_HeaderNavigation", "import_FooterNavigation", "import_SearchPage", "import_types", "import_Styles", "import_AiuiProvider", "import_Tabs", "import_CreativeModule", "import_GraphicOverlay", "import_Specs", "import_TabsGroup", "import_BizProductProvider", "import_PurchaseBar", "import_ProductActions", "import_ProductCard", "import_ProductBenefitsTabs", "import_ProductHighlight", "import_ProductFreeGift", "import_ProductExchangePurchase", "import_ProductOptions", "import_ProductBundle", "import_ProductGridBox", "import_ProductGallery", "import_ProductDetail", "import_ProductSummary", "import_BenefitsTab", "import_PaidShipping", "import_GraphicMore", "import_Features", "import_AplusDesc", "import_GiftBox", "import_SelectStore", "import_DownLoad", "import_FootCharger", "import_BrandCardLink", "import_ProductCompare", "import_Ksp", "import_ImageTextFeature", "import_FeatureCards", "import_ImageWithText", "import_VideoFeature", "import_TabsWithMedia", "import_TabWithImage", "import_FeatureShowcase", "import_ProductHero", "import_SpecsComparison", "import_MediaSceneSwitcher", "import_ThreeDCarousel", "import_ProductNav", "import_AnchorNavigation", "import_PromotionalBar", "import_EventSchedule", "import_SecondaryBanner", "import_BuyOneGetOneShelf", "import_ActiveShelf", "import_MediaShelf", "import_CreditsShelf", "import_SceneShelf", "import_ImageOverlayShelf", "import_MiniCart", "import_CircleProgress", "import_MiniCartDialog"]
|
|
4
|
+
"sourcesContent": ["export { 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 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 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'\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 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'\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\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-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': 'Tabs',\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}\n"],
|
|
5
|
+
"mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,+5BAAAE,GAAA,2tBAAAC,GAAA,8jCAAAC,GAAAJ,IAAA,IAAAK,EAAuC,qCACvCC,EAAwC,sCACxCC,EAAkC,gCAClCC,EAAiC,+BACjCC,EAAkC,gCAClCC,EAAwC,sCACxCC,EAAoC,kCACpCC,EAAoC,kCACpCC,EAAsC,oCACtCC,EAA0C,wCAC1CC,EAAmC,iCACnCC,EAA2C,yCAC3CC,EAA6C,2CAC7CC,EAA4C,0CAC5CC,EAAmC,iCACnCC,EAAyC,uCAEzCC,EAAqC,mCACrCC,EAA+B,6BAC/BH,EAAqE,8BACrEI,EAAmD,iDAEnDC,EAAkD,gDAElDC,EAA4C,0CAC5CC,EAA4C,0CAC5CC,EAAsC,oCAEtCC,EAAmD,iCAEnDC,EAA2B,+BAC3BC,EAAwC,sCACxCC,EAAgC,8BAChCC,EAA0C,wCAC1CC,EAA0C,wCAC1CC,EAAiC,+BACjCC,EAAoC,mCAEpCC,EAA8C,8CAC9CC,EAAuC,wDACvCC,EAA0C,uEAE1CC,EAAuC,wDACvCC,EAA+C,0FAC/CC,EAA4C,uFAC5CC,EAA2C,sFAC3CC,EAAmD,8FACnDC,EAA0C,qFAC1CC,EAAyC,oFACzCC,EAA0C,iEAC1CC,GAA0C,uEAC1CC,GAAyC,sEACzCC,GAA0C,uEAC1CC,GAAuC,4EACvCC,GAAwC,yDAExCC,GAAuC,qCACvCC,GAAoC,kCACpCC,GAAqC,mCACrCC,GAAmC,iCACnCC,GAAuC,qCACvCC,GAAoC,kCACpCC,GAAuC,qCACvCC,GAAyC,uCAGzCzD,GAA4B,oCAE5B0D,GAA0C,wCAE1CC,GAA+B,6BAE/BC,GAA4C,0CAE5CC,GAAwC,sCAExCC,GAA6C,2CAO7CC,GAAyC,uCAEzCC,GAAwC,sCAExCC,GAAyC,uCAEzCC,GAAwC,sCAExCC,GAA2C,yCAE3CC,GAAuC,qCAEvCC,GAA2C,yCAM3CC,GAA8C,4CAE9CC,GAAgD,8CAOhDC,GAA0C,wCAE1CC,GAAsC,oCAEtCC,GAA4C,0CAC5CC,GAA0C,wCAC1CC,GAAyC,uCACzCC,GAA2C,yCAC3CC,GAA6C,2CAC7CC,GAAuC,qCACvCC,GAAsC,oCACtCC,EAA4D,sCAO5DC,EAAwD,oCAGxDC,GAA4C,0CAe5CC,GAGO,2CAGPC,GAAoC,kCAEpCC,GAAkD,2CAElDC,EAAqF,2CAY9E,MAAMtF,GAAwB,CACnC,qBAAsB,iBACtB,gBAAiB,YACjB,aAAc,aACd,mBAAoB,cACpB,eAAgB,WAChB,wBAAyB,mBACzB,yBAA0B,oBAC1B,qBAAsB,iBACtB,eAAgB,WAChB,eAAgB,WAChB,UAAW,MACX,eAAgB,WAChB,kBAAmB,cACnB,eAAgB,yBAChB,cAAe,UACf,cAAe,UACf,kBAAmB,cACnB,qBAAsB,iBACtB,cAAe,UACf,sBAAuB,kBACvB,uBAAwB,mBACxB,wBAAyB,oBACzB,oBAAqB,eACrB,gBAAiB,0BACjB,uBAAwB,kBACxB,kBAAmB,cACnB,mBAAoB,eACpB,aAAc,SACd,aAAc,SACd,YAAa,QACb,WAAY,OACZ,mBAAoB,cACpB,YAAa,QACb,gBAAiB,YACjB,kBAAmB,aACnB,sBAAuB,gBACvB,iBAAkB,aAClB,IAAK,MACL,uBAAwB,kBAIxB,mBAAoB,cACpB,kBAAmB,aAInB,iBAAkB,oBAClB,wBAAyB,kBAC3B",
|
|
6
|
+
"names": ["biz_components_exports", "__export", "IPRedirect", "PAYLOAD_COMPONENT_MAP", "__toCommonJS", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_MarqueeReview", "import_WhyChoose", "import_Faq", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_HeaderNavigation", "import_FooterNavigation", "import_SearchPage", "import_types", "import_Styles", "import_AiuiProvider", "import_Tabs", "import_CreativeModule", "import_GraphicOverlay", "import_Specs", "import_TabsGroup", "import_BizProductProvider", "import_PurchaseBar", "import_ProductActions", "import_ProductCard", "import_ProductBenefitsTabs", "import_ProductHighlight", "import_ProductFreeGift", "import_ProductExchangePurchase", "import_ProductOptions", "import_ProductBundle", "import_ProductGridBox", "import_ProductGallery", "import_ProductDetail", "import_ProductSummary", "import_BenefitsTab", "import_PaidShipping", "import_GraphicMore", "import_Features", "import_AplusDesc", "import_GiftBox", "import_SelectStore", "import_DownLoad", "import_FootCharger", "import_BrandCardLink", "import_ProductCompare", "import_Ksp", "import_ImageTextFeature", "import_FeatureCards", "import_FeaturedBlogPosts", "import_ImageWithText", "import_VideoFeature", "import_TabsWithMedia", "import_TabWithImage", "import_FeatureShowcase", "import_ProductHero", "import_SpecsComparison", "import_MediaSceneSwitcher", "import_MediaSceneSwitcherV2", "import_ThreeDCarousel", "import_ProductNav", "import_AnchorNavigation", "import_PromotionalBar", "import_EventSchedule", "import_SecondaryBanner", "import_BuyOneGetOneShelf", "import_ActiveShelf", "import_MediaShelf", "import_CreditsShelf", "import_SceneShelf", "import_MediaEndorsement", "import_ImageOverlayShelf", "import_MiniCart", "import_CircleProgress", "import_MiniCartDialog"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as i,jsxs as B}from"react/jsx-runtime";import*as a from"react";import{cn as e}from"../../helpers/index.js";import c from"./ProductCard.js";import{Heading as d,Text as y}from"../../components/index.js";import{useExposure as O}from"../../hooks/useExposure.js";const h="shelf",S="buy_one_get_one_shelf",f=a.forwardRef(({className:p,classNames:t={},theme:s,title:o,subtitle:n,children:m,...l},u)=>{const r=a.useRef(null);return O(r,{componentType:h,componentName:S,componentTitle:o,componentDescription:n}),a.useImperativeHandle(u,()=>r.current),B("div",{ref:r,className:e("bogo-shelf-root w-full py-0",{"aiui-dark":s==="dark"},p,t?.root),...l,children:[o&&i(d,{as:"h2",html:o,className:e("bogo-shelf-title text-info-primary mb-4",t?.title)}),n&&i(y,{size:3,as:"p",html:n,className:e("bogo-shelf-description text-info-primary mb-6",t?.description)}),i("div",{className:e("flex flex-wrap justify-center gap-6","laptop:justify-start laptop:flex-row"),children:m})]})});f.displayName="BuyOneGetOneShelf.Root";const G={Root:f,ProductCard:c};var R=G;export{R as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/BuyOneGetOneShelf/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport ProductCard from './ProductCard.js'\nimport { Heading, Text } from '../../components/index.js'\nimport type { BuyOneGetOneShelfProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'shelf'\nconst componentName = 'buy_one_get_one_shelf'\n\n/**\n * BuyOneGetOneShelfRoot - \u4E70\u8D60\u8D27\u67B6\u6839\u5BB9\u5668\u7EC4\u4EF6\n *\n * @description \u7EC4\u5408\u5F0F\u8BBE\u8BA1\u7684\u4E70\u8D60\u8D27\u67B6\u5BB9\u5668\uFF0C\u8D1F\u8D23\u5E03\u5C40\u548C\u6807\u9898\u5C55\u793A\n * \u652F\u6301\u4F20\u5165\u591A\u4E2A BuyOneGetOneShelf.ProductCard \u5B50\u7EC4\u4EF6\n */\nconst BuyOneGetOneShelfRoot = React.forwardRef<HTMLDivElement, BuyOneGetOneShelfProps>(\n ({ className, classNames = {}, theme, title, subtitle, children, ...props }, ref) => {\n const boxRef = React.useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n React.useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <div\n ref={boxRef}\n className={cn(\n 'w-full py-0',\n {\n 'aiui-dark': theme === 'dark',\n },\n className,\n classNames?.root\n )}\n {...props}\n >\n {title && <Heading as=\"h2\" html={title} className={cn('
|
|
5
|
-
"mappings": "aAgCM,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport ProductCard from './ProductCard.js'\nimport { Heading, Text } from '../../components/index.js'\nimport type { BuyOneGetOneShelfProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'shelf'\nconst componentName = 'buy_one_get_one_shelf'\n\n/**\n * BuyOneGetOneShelfRoot - \u4E70\u8D60\u8D27\u67B6\u6839\u5BB9\u5668\u7EC4\u4EF6\n *\n * @description \u7EC4\u5408\u5F0F\u8BBE\u8BA1\u7684\u4E70\u8D60\u8D27\u67B6\u5BB9\u5668\uFF0C\u8D1F\u8D23\u5E03\u5C40\u548C\u6807\u9898\u5C55\u793A\n * \u652F\u6301\u4F20\u5165\u591A\u4E2A BuyOneGetOneShelf.ProductCard \u5B50\u7EC4\u4EF6\n */\nconst BuyOneGetOneShelfRoot = React.forwardRef<HTMLDivElement, BuyOneGetOneShelfProps>(\n ({ className, classNames = {}, theme, title, subtitle, children, ...props }, ref) => {\n const boxRef = React.useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n React.useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <div\n ref={boxRef}\n className={cn(\n 'bogo-shelf-root w-full py-0',\n {\n 'aiui-dark': theme === 'dark',\n },\n className,\n classNames?.root\n )}\n {...props}\n >\n {title && (\n <Heading as=\"h2\" html={title} className={cn('bogo-shelf-title text-info-primary mb-4', classNames?.title)} />\n )}\n {subtitle && (\n <Text\n size={3}\n as=\"p\"\n html={subtitle}\n className={cn('bogo-shelf-description text-info-primary mb-6', classNames?.description)}\n />\n )}\n {/* \u4E70\u8D60\u8D27\u67B6\u4EA7\u54C1\u533A\u57DF */}\n <div className={cn('flex flex-wrap justify-center gap-6', 'laptop:justify-start laptop:flex-row')}>\n {children}\n </div>\n </div>\n )\n }\n)\n\nBuyOneGetOneShelfRoot.displayName = 'BuyOneGetOneShelf.Root'\n\n// \u521B\u5EFA\u547D\u540D\u7A7A\u95F4\u5BF9\u8C61\uFF0C\u5305\u542B Root \u548C ProductCard \u7EC4\u4EF6\nconst BuyOneGetOneShelf = {\n Root: BuyOneGetOneShelfRoot,\n ProductCard: ProductCard,\n}\n\nexport default BuyOneGetOneShelf\n\n// Re-export types for external use\nexport type {\n FreeGift,\n FreeGiftWithSelection,\n ProductTag,\n BuyOneGetOneShelfSemanticName,\n BuyOneGetOneShelfRootSemanticName,\n BuyOneGetOneShelfProductCardSemanticName,\n ResponsiveImage,\n ResponsiveImages,\n BaseProductData,\n PureProductData,\n WithGiftData,\n ProductData,\n ProductCardData,\n CopyConfig,\n BogoItem,\n BuyOneGetOneShelfData,\n BuyOneGetOneShelfProps,\n BuyOneGetOneShelfCardProps,\n} from './types.js'\n"],
|
|
5
|
+
"mappings": "aAgCM,OAaI,OAAAA,EAbJ,QAAAC,MAAA,oBA9BN,UAAYC,MAAW,QACvB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAiB,mBACxB,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAE9B,OAAS,eAAAC,MAAmB,6BAE5B,MAAMC,EAAgB,QAChBC,EAAgB,wBAQhBC,EAAwBR,EAAM,WAClC,CAAC,CAAE,UAAAS,EAAW,WAAAC,EAAa,CAAC,EAAG,MAAAC,EAAO,MAAAC,EAAO,SAAAC,EAAU,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAAQ,CACnF,MAAMC,EAASjB,EAAM,OAAuB,IAAI,EAEhD,OAAAK,EAAYY,EAAQ,CAClB,cAAAX,EACA,cAAAC,EACA,eAAgBK,EAChB,qBAAsBC,CACxB,CAAC,EAEDb,EAAM,oBAAoBgB,EAAK,IAAMC,EAAO,OAAyB,EAGnElB,EAAC,OACC,IAAKkB,EACL,UAAWhB,EACT,8BACA,CACE,YAAaU,IAAU,MACzB,EACAF,EACAC,GAAY,IACd,EACC,GAAGK,EAEH,UAAAH,GACCd,EAACK,EAAA,CAAQ,GAAG,KAAK,KAAMS,EAAO,UAAWX,EAAG,0CAA2CS,GAAY,KAAK,EAAG,EAE5GG,GACCf,EAACM,EAAA,CACC,KAAM,EACN,GAAG,IACH,KAAMS,EACN,UAAWZ,EAAG,gDAAiDS,GAAY,WAAW,EACxF,EAGFZ,EAAC,OAAI,UAAWG,EAAG,sCAAuC,sCAAsC,EAC7F,SAAAa,EACH,GACF,CAEJ,CACF,EAEAN,EAAsB,YAAc,yBAGpC,MAAMU,EAAoB,CACxB,KAAMV,EACN,YAAaN,CACf,EAEA,IAAOiB,EAAQD",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "cn", "ProductCard", "Heading", "Text", "useExposure", "componentType", "componentName", "BuyOneGetOneShelfRoot", "className", "classNames", "theme", "title", "subtitle", "children", "props", "ref", "boxRef", "BuyOneGetOneShelf", "BuyOneGetOneShelf_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Img } from '../../types/props.js';
|
|
3
|
+
export type FeaturedBlogPostsSemanticName = 'root' | 'header' | 'title' | 'subtitle' | 'grid' | 'card' | 'cardImage' | 'cardContent' | 'cardTitle' | 'cardDescription' | 'cardMeta' | 'separator';
|
|
4
|
+
/**
|
|
5
|
+
* 卡片宽度比例
|
|
6
|
+
*/
|
|
7
|
+
export type FeaturedBlogPostSpan = 'full' | '2/3' | '1/3';
|
|
8
|
+
/**
|
|
9
|
+
* 博文卡片项数据接口
|
|
10
|
+
*/
|
|
11
|
+
export interface FeaturedBlogPostItem {
|
|
12
|
+
/** 封面图片 */
|
|
13
|
+
image: {
|
|
14
|
+
mobile?: Img;
|
|
15
|
+
pad?: Img;
|
|
16
|
+
laptop?: Img;
|
|
17
|
+
desktop?: Img;
|
|
18
|
+
lgDesktop?: Img;
|
|
19
|
+
};
|
|
20
|
+
/** 文章标题 */
|
|
21
|
+
title: string;
|
|
22
|
+
/** 文章描述 */
|
|
23
|
+
description?: string;
|
|
24
|
+
/** 日期信息(分类·日期·作者) */
|
|
25
|
+
date?: string;
|
|
26
|
+
/** 文章链接 */
|
|
27
|
+
link?: string;
|
|
28
|
+
/** 卡片宽度比例,默认 full */
|
|
29
|
+
width?: FeaturedBlogPostSpan;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* FeaturedBlogPosts 业务组件数据接口
|
|
33
|
+
*/
|
|
34
|
+
export interface FeaturedBlogPostsData {
|
|
35
|
+
/** 主标题 */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** 副标题 */
|
|
38
|
+
subtitle?: string;
|
|
39
|
+
/** 博文列表 */
|
|
40
|
+
items: FeaturedBlogPostItem[];
|
|
41
|
+
}
|
|
42
|
+
export interface FeaturedBlogPostsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
/** 业务数据 */
|
|
44
|
+
data: FeaturedBlogPostsData;
|
|
45
|
+
/** 语义化类名覆盖 */
|
|
46
|
+
classNames?: Partial<Record<FeaturedBlogPostsSemanticName, string>>;
|
|
47
|
+
/** 卡片点击回调 */
|
|
48
|
+
onItemClick?: (item: FeaturedBlogPostItem, index: number, event: React.MouseEvent) => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* FeaturedBlogPosts - 精选博文
|
|
52
|
+
*
|
|
53
|
+
* @description 展示经过筛选的优质文章,支持不同宽度和布局的卡片组合
|
|
54
|
+
*/
|
|
55
|
+
declare const FeaturedBlogPosts: React.ForwardRefExoticComponent<FeaturedBlogPostsProps & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
export default FeaturedBlogPosts;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{jsx as r,jsxs as p}from"react/jsx-runtime";import*as u from"react";import{cn as l}from"../../helpers/index.js";import y from"../../components/picture.js";import{Heading as h,Text as m}from"../../index.js";const P=o=>{const t=[{key:"lgDesktop",width:1920},{key:"desktop",width:1440},{key:"laptop",width:1024},{key:"pad",width:768},{key:"mobile",width:390}],s=t.filter(({key:a})=>o[a]?.url).map(({key:a,width:d})=>`${o[a].url} ${d}`);if(s.length>0)return s.join(", ");for(const{key:a}of t)if(o[a]?.url)return o[a].url;return""},F=(o,t)=>{const s=["desktop","laptop","pad","mobile","lgDesktop"];for(const a of s)if(o[a]?.alt)return o[a].alt;return t},I=(o="full")=>({full:"laptop:col-span-3","2/3":"laptop:col-span-2","1/3":"laptop:col-span-1"})[o],B=(o="full")=>o==="1/3"?"":"laptop:flex-row",w=(o="full")=>({full:"laptop:h-full laptop:w-2/3","2/3":"laptop:h-full laptop:w-1/2","1/3":"laptop:flex-1 h-[200px] lg-desktop:h-[240px]"})[o],k=u.forwardRef(({className:o,classNames:t={},data:s,onItemClick:a,...d},x)=>{const{title:n,subtitle:g,items:f}=s,b=u.useCallback((e,i)=>c=>{a?.(e,i,c)},[a]);return p("div",{ref:x,className:l("blog-posts-root","text-info-primary w-full",o,t.root),...d,children:[(n||g)&&p("div",{className:l("blog-posts-header mb-6",t.header),children:[n&&r(h,{as:"h2",size:4,html:n,className:l("blog-posts-title",t.title)}),g&&r(m,{as:"p",size:3,className:l("",t?.subtitle),html:g})]}),r("div",{className:l("blog-posts-grid","laptop:grid-cols-3 grid grid-cols-1 gap-4",t.grid),children:f.map((e,i)=>{const c=e.link?"a":"div",v=e.link?{href:e.link}:{};return p(u.Fragment,{children:[p(c,{...v,className:l("blog-posts-card rounded-box","flex cursor-pointer flex-col gap-4","laptop:h-[336px] desktop:h-[448px] lg-desktop:h-[560px]","laptop:bg-container-secondary-0 laptop:p-4 desktop:p-6 lg-desktop:p-8","laptop:overflow-hidden laptop:transition-opacity ",I(e.width||"full"),B(e.width||"full"),t.card),onClick:b(e,i),children:[r("div",{className:l("blog-posts-card-image","relative w-full overflow-hidden","h-[200px] shrink-0",w(e.width||"full"),t.cardImage),children:r(y,{source:P(e.image),alt:F(e.image,e.title),className:"rounded-box h-full object-cover",imgClassName:"h-full"})}),p("div",{className:l("blog-posts-card-content","desktop:gap-6 flex flex-col justify-center gap-4",t.cardContent),children:[p("div",{className:"desktop:gap-2 flex flex-col gap-1",children:[r(h,{size:2,as:"h6",className:l("blog-posts-card-title line-clamp-3",t.cardTitle),html:e.title}),e.description&&r(m,{className:l("blog-posts-card-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-3 text-[14px]",t.cardDescription),html:e.description})]}),e.date&&r(m,{className:l("blog-posts-card-meta","text-info-tertiary desktop:text-[16px] lg-desktop:text-[18px] text-[14px]",t.cardMeta),html:e.date})]})]}),i<f.length-1&&r("div",{className:l("blog-posts-separator","bg-lines-primary laptop:hidden h-px w-full",t.separator)})]},i)})})]})});k.displayName="FeaturedBlogPosts";var M=k;export{M as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/FeaturedBlogPosts/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport Picture from '../../components/picture.js'\nimport type { Img } from '../../types/props.js'\nimport { Heading, Text } from '../../index.js'\n\nexport type FeaturedBlogPostsSemanticName =\n | 'root'\n | 'header'\n | 'title'\n | 'subtitle'\n | 'grid'\n | 'card'\n | 'cardImage'\n | 'cardContent'\n | 'cardTitle'\n | 'cardDescription'\n | 'cardMeta'\n | 'separator'\n\n/**\n * \u5361\u7247\u5BBD\u5EA6\u6BD4\u4F8B\n */\nexport type FeaturedBlogPostSpan = 'full' | '2/3' | '1/3'\n\n/**\n * \u535A\u6587\u5361\u7247\u9879\u6570\u636E\u63A5\u53E3\n */\nexport interface FeaturedBlogPostItem {\n /** \u5C01\u9762\u56FE\u7247 */\n image: {\n mobile?: Img\n pad?: Img\n laptop?: Img\n desktop?: Img\n lgDesktop?: Img\n }\n /** \u6587\u7AE0\u6807\u9898 */\n title: string\n /** \u6587\u7AE0\u63CF\u8FF0 */\n description?: string\n /** \u65E5\u671F\u4FE1\u606F\uFF08\u5206\u7C7B\u00B7\u65E5\u671F\u00B7\u4F5C\u8005\uFF09 */\n date?: string\n /** \u6587\u7AE0\u94FE\u63A5 */\n link?: string\n /** \u5361\u7247\u5BBD\u5EA6\u6BD4\u4F8B\uFF0C\u9ED8\u8BA4 full */\n width?: FeaturedBlogPostSpan\n}\n\n/**\n * FeaturedBlogPosts \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface FeaturedBlogPostsData {\n /** \u4E3B\u6807\u9898 */\n title?: string\n /** \u526F\u6807\u9898 */\n subtitle?: string\n /** \u535A\u6587\u5217\u8868 */\n items: FeaturedBlogPostItem[]\n}\n\nexport interface FeaturedBlogPostsProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: FeaturedBlogPostsData\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u8986\u76D6 */\n classNames?: Partial<Record<FeaturedBlogPostsSemanticName, string>>\n /** \u5361\u7247\u70B9\u51FB\u56DE\u8C03 */\n onItemClick?: (item: FeaturedBlogPostItem, index: number, event: React.MouseEvent) => void\n}\n\n/**\n * \u54CD\u5E94\u5F0F\u56FE\u7247\u7C7B\u578B\n */\ntype ResponsiveImage = FeaturedBlogPostItem['image']\n\n/**\n * \u5C06\u54CD\u5E94\u5F0F\u56FE\u7247\u5BF9\u8C61\u8F6C\u4E3A Picture source \u683C\u5F0F\u5B57\u7B26\u4E32\n * \u683C\u5F0F: \"url1 1920, url2 1440, url3 1024, url4 768, url5 390\"\n */\nconst getImageSource = (image: ResponsiveImage): string => {\n const breakpoints: { key: keyof ResponsiveImage; width: number }[] = [\n { key: 'lgDesktop', width: 1920 },\n { key: 'desktop', width: 1440 },\n { key: 'laptop', width: 1024 },\n { key: 'pad', width: 768 },\n { key: 'mobile', width: 390 },\n ]\n\n const sources = breakpoints\n .filter(({ key }) => image[key]?.url)\n .map(({ key, width }) => `${image[key]!.url} ${width}`)\n\n // \u5982\u679C\u6709 sources\uFF0C\u8FD4\u56DE\u62FC\u63A5\u7ED3\u679C\uFF1B\u5426\u5219\u8FD4\u56DE\u7B2C\u4E00\u4E2A\u6709\u6548\u7684 url\n if (sources.length > 0) {\n return sources.join(', ')\n }\n\n // fallback: \u8FD4\u56DE\u4EFB\u610F\u4E00\u4E2A\u6709\u6548\u7684 url\n for (const { key } of breakpoints) {\n if (image[key]?.url) return image[key]!.url\n }\n\n return ''\n}\n\n/**\n * \u4ECE\u54CD\u5E94\u5F0F\u56FE\u7247\u5BF9\u8C61\u83B7\u53D6 alt \u6587\u672C\n */\nconst getImageAlt = (image: ResponsiveImage, fallback: string): string => {\n const keys: (keyof ResponsiveImage)[] = ['desktop', 'laptop', 'pad', 'mobile', 'lgDesktop']\n for (const key of keys) {\n if (image[key]?.alt) return image[key]!.alt!\n }\n return fallback\n}\n\n/**\n * \u6839\u636E span \u83B7\u53D6\u5361\u7247 grid \u5217\u6570 (laptop+)\n */\nconst getSpanClass = (span: FeaturedBlogPostSpan = 'full') => {\n const spanMap: Record<FeaturedBlogPostSpan, string> = {\n full: 'laptop:col-span-3',\n '2/3': 'laptop:col-span-2',\n '1/3': 'laptop:col-span-1',\n }\n return spanMap[span]\n}\n\n/**\n * \u6839\u636E span \u83B7\u53D6\u5361\u7247\u5E03\u5C40\u65B9\u5411 (laptop+)\n * 1/3: \u4E0A\u4E0B\u5E03\u5C40\uFF0C\u5176\u4ED6: \u5DE6\u53F3\u5E03\u5C40\n */\nconst getLayoutClass = (span: FeaturedBlogPostSpan = 'full') => {\n return span === '1/3' ? '' : 'laptop:flex-row'\n}\n\n/**\n * \u6839\u636E span \u83B7\u53D6\u56FE\u7247\u5C3A\u5BF8\u6837\u5F0F (laptop+)\n * full: \u5DE6\u53F3\u5E03\u5C40\uFF0C\u56FE\u7247\u5BBD\u5EA6\u5360 2/3\n * 2/3: \u5DE6\u53F3\u5E03\u5C40\uFF0C\u56FE\u7247\u5BBD\u5EA6\u5360 1/2\n * 1/3: \u4E0A\u4E0B\u5E03\u5C40\uFF0C\u56FE\u7247\u9AD8\u5EA6\u586B\u6EE1\u5269\u4F59\u7A7A\u95F4\n */\nconst getImageSizeClass = (span: FeaturedBlogPostSpan = 'full') => {\n const sizeMap: Record<FeaturedBlogPostSpan, string> = {\n full: 'laptop:h-full laptop:w-2/3',\n '2/3': 'laptop:h-full laptop:w-1/2',\n '1/3': 'laptop:flex-1 h-[200px] lg-desktop:h-[240px]',\n }\n return sizeMap[span]\n}\n\n/**\n * FeaturedBlogPosts - \u7CBE\u9009\u535A\u6587\n *\n * @description \u5C55\u793A\u7ECF\u8FC7\u7B5B\u9009\u7684\u4F18\u8D28\u6587\u7AE0\uFF0C\u652F\u6301\u4E0D\u540C\u5BBD\u5EA6\u548C\u5E03\u5C40\u7684\u5361\u7247\u7EC4\u5408\n */\nconst FeaturedBlogPosts = React.forwardRef<HTMLDivElement, FeaturedBlogPostsProps>(\n ({ className, classNames = {}, data, onItemClick, ...props }, ref) => {\n const { title, subtitle, items } = data\n\n const handleCardClick = React.useCallback(\n (item: FeaturedBlogPostItem, index: number) => (event: React.MouseEvent) => {\n onItemClick?.(item, index, event)\n },\n [onItemClick]\n )\n\n return (\n <div\n ref={ref}\n className={cn('blog-posts-root', 'text-info-primary w-full', className, classNames.root)}\n {...props}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n {(title || subtitle) && (\n <div className={cn('blog-posts-header mb-6', classNames.header)}>\n {title && <Heading as=\"h2\" size={4} html={title} className={cn('blog-posts-title', classNames.title)} />}\n {subtitle && <Text as=\"p\" size={3} className={cn('', classNames?.subtitle)} html={subtitle} />}\n </div>\n )}\n <div className={cn('blog-posts-grid', 'laptop:grid-cols-3 grid grid-cols-1 gap-4', classNames.grid)}>\n {items.map((item, index) => {\n const CardWrapper = item.link ? 'a' : 'div'\n const cardProps = item.link ? { href: item.link } : {}\n\n return (\n <React.Fragment key={index}>\n <CardWrapper\n {...cardProps}\n className={cn(\n 'blog-posts-card rounded-box',\n 'flex cursor-pointer flex-col gap-4',\n 'laptop:h-[336px] desktop:h-[448px] lg-desktop:h-[560px]',\n 'laptop:bg-container-secondary-0 laptop:p-4 desktop:p-6 lg-desktop:p-8',\n 'laptop:overflow-hidden laptop:transition-opacity ',\n getSpanClass(item.width || 'full'),\n getLayoutClass(item.width || 'full'),\n classNames.card\n )}\n onClick={handleCardClick(item, index)}\n >\n {/* \u56FE\u7247 */}\n <div\n className={cn(\n 'blog-posts-card-image',\n 'relative w-full overflow-hidden',\n 'h-[200px] shrink-0',\n getImageSizeClass(item.width || 'full'),\n classNames.cardImage\n )}\n >\n <Picture\n source={getImageSource(item.image)}\n alt={getImageAlt(item.image, item.title)}\n className=\"rounded-box h-full object-cover\"\n imgClassName=\"h-full\"\n />\n </div>\n\n {/* \u5185\u5BB9 */}\n <div\n className={cn(\n 'blog-posts-card-content',\n 'desktop:gap-6 flex flex-col justify-center gap-4',\n classNames.cardContent\n )}\n >\n <div className=\"desktop:gap-2 flex flex-col gap-1\">\n <Heading\n size={2}\n as=\"h6\"\n className={cn('blog-posts-card-title line-clamp-3', classNames.cardTitle)}\n html={item.title}\n />\n\n {item.description && (\n <Text\n className={cn(\n 'blog-posts-card-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-3 text-[14px]',\n classNames.cardDescription\n )}\n html={item.description}\n />\n )}\n </div>\n {item.date && (\n <Text\n className={cn(\n 'blog-posts-card-meta',\n 'text-info-tertiary desktop:text-[16px] lg-desktop:text-[18px] text-[14px]',\n classNames.cardMeta\n )}\n html={item.date}\n />\n )}\n </div>\n </CardWrapper>\n\n {/* \u5206\u5272\u7EBF - \u4EC5 mobile/tablet \u663E\u793A */}\n {index < items.length - 1 && (\n <div\n className={cn(\n 'blog-posts-separator',\n 'bg-lines-primary laptop:hidden h-px w-full',\n classNames.separator\n )}\n />\n )}\n </React.Fragment>\n )\n })}\n </div>\n </div>\n )\n }\n)\n\nFeaturedBlogPosts.displayName = 'FeaturedBlogPosts'\nexport default FeaturedBlogPosts\n"],
|
|
5
|
+
"mappings": "aAiLU,OACY,OAAAA,EADZ,QAAAC,MAAA,oBA/KV,UAAYC,MAAW,QACvB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BAEpB,OAAS,WAAAC,EAAS,QAAAC,MAAY,iBA2E9B,MAAMC,EAAkBC,GAAmC,CACzD,MAAMC,EAA+D,CACnE,CAAE,IAAK,YAAa,MAAO,IAAK,EAChC,CAAE,IAAK,UAAW,MAAO,IAAK,EAC9B,CAAE,IAAK,SAAU,MAAO,IAAK,EAC7B,CAAE,IAAK,MAAO,MAAO,GAAI,EACzB,CAAE,IAAK,SAAU,MAAO,GAAI,CAC9B,EAEMC,EAAUD,EACb,OAAO,CAAC,CAAE,IAAAE,CAAI,IAAMH,EAAMG,CAAG,GAAG,GAAG,EACnC,IAAI,CAAC,CAAE,IAAAA,EAAK,MAAAC,CAAM,IAAM,GAAGJ,EAAMG,CAAG,EAAG,GAAG,IAAIC,CAAK,EAAE,EAGxD,GAAIF,EAAQ,OAAS,EACnB,OAAOA,EAAQ,KAAK,IAAI,EAI1B,SAAW,CAAE,IAAAC,CAAI,IAAKF,EACpB,GAAID,EAAMG,CAAG,GAAG,IAAK,OAAOH,EAAMG,CAAG,EAAG,IAG1C,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
|
6
|
+
"names": ["jsx", "jsxs", "React", "cn", "Picture", "Heading", "Text", "getImageSource", "image", "breakpoints", "sources", "key", "width", "getImageAlt", "fallback", "keys", "getSpanClass", "span", "getLayoutClass", "getImageSizeClass", "FeaturedBlogPosts", "className", "classNames", "data", "onItemClick", "props", "ref", "title", "subtitle", "items", "handleCardClick", "item", "index", "event", "CardWrapper", "cardProps", "FeaturedBlogPosts_default"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as K,jsx as t,jsxs as d}from"react/jsx-runtime";import B,{useCallback as $,useEffect as E,useMemo as C,useRef as L,useState as D}from"react";import{Button as w,Container as R,Text as b,Link as F,Heading as O,Picture as W}from"../../components/index.js";import{cn as v,atobID as H,getLocalizedPath as N}from"../../helpers/utils.js";import{DownArrow as T}from"./icons/index.js";import{useNavContext as P}from"./NavProvider.js";import{useAiuiContext as _}from"../AiuiProvider/index.js";const V=B.memo(({sidebarCategoriesMetadata:l,seriesMetadata:f})=>{const{buildProps:g,onSidebarNavClick:S}=P(),{locale:p="us"}=_(),[x,h]=D([]),[o,m]=D(-1),k=L(null),y=L(null),u=$(()=>{const e=l?.subcategories;if(!e?.length)return;const r=e.findIndex(i=>!!i?.subSubCategories),a=e.findIndex(i=>!i?.subSubCategories),s=e.map((i,c)=>({index:c,open:r===c||a===c}));h(s)},[l]);E(()=>{u()},[u]);const n=C(()=>{const e=l?.subcategories?.[x?.find(a=>a.open)?.index||0],r=f?.find(a=>a?.label?.toLowerCase()===e?.label?.toLowerCase())||{};if(e?.collections){const a=g?.categories?.[e?.collections]||{};return{label:r?.label,isCollection:!0,banner:r?.banner,primary:r?.primary,series:[{products:a?.products}]}}else if(e?.subSubCategories){const a=e?.subSubCategories?.[o],s=f?.find(i=>i?.label?.toLowerCase()===a?.label?.toLowerCase())||{};if(a?.collections){const i=g?.categories?.[a?.collections]||{};return{label:s?.label,isCollection:!0,banner:s?.banner,primary:s?.primary,series:[{products:i?.products}]}}else return s}else return r},[l,x,o,f,g]),A=$((e,r)=>{const a=r?.subSubCategories?.length>0;m(a?0:-1);const s=y.current;h(i=>i.map((c,j)=>j===e?{...c,open:!c.open}:a?{...c,open:!1}:!s&&o===-1?{...c,open:!1}:s&&!s.hasSubSubCategories&&!a&&o===-1?{...c,open:!1}:c)),y.current={index:e,hasSubSubCategories:a}},[o]),z=(e,r)=>{h(a=>a.map(s=>s.index===e?{...s,open:!0}:{...s,open:!1})),m(r)};return d(R,{childClassName:"lg-desktop:gap-12 flex bg-white gap-8",children:[d("div",{className:"lg-desktop:basis-[356px] flex basis-[284px] flex-col gap-4 py-4",style:{userSelect:"none"},ref:k,children:[t("div",{className:"desktop:h-[416px] flex flex-col overflow-y-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:l?.subcategories?.map((e,r)=>{const a=Array.isArray(e?.subSubCategories)&&e?.subSubCategories?.length>0,s=x?.find(i=>i.index===r)?.open;return d("div",{children:[d("button",{className:v("rounded-sidebar-shelf flex w-full cursor-pointer items-center justify-between border-0 bg-transparent text-left",{"bg-[#F5F5F7]":!a&&s}),onClick:()=>{A(r,e),S?.(e,r)},"aria-expanded":a?s:void 0,"aria-haspopup":a?"true":void 0,children:[t(b,{html:e.label,className:"p-4 text-sm font-bold leading-[1.4]"}),a&&t(T,{"aria-hidden":"true",className:v("size-4",{"rotate-180":s})})]}),s&&t("div",{className:"flex flex-col",role:"menu",children:e.subSubCategories?.map((i,c)=>t("button",{onClick:()=>{z(r,c),S?.(i,c)},className:v("rounded-sidebar-shelf w-full cursor-pointer border-0 bg-transparent px-6 py-4 text-left leading-none hover:bg-[#F5F5F7]",{"bg-[#F5F5F7]":o===c}),role:"menuitem","aria-label":i.label,children:t(b,{html:i.label,className:"text-sm font-bold leading-[1.4] text-[#4A4C56]"})},`subSubItem-${r}-${c}`))})]},`${e?.label||""}subcategoryItem-${r}`)})}),l&&t("div",{className:"flex",children:d("div",{className:"flex flex-col gap-4",children:[l?.primary&&t(w,{as:"a",href:`${N(l?.primary?.url,p)}?ref=${l?.primary?.label}_shopall`,variant:"primary",size:"lg",className:"lg-desktop:text-base text-sm",children:l?.primary?.label}),l?.secondary&&t(w,{as:"a",href:l?.secondary?.url,variant:"link",size:"lg",iconClassName:"size-4",className:"lg-desktop:text-base justify-start !p-0 text-sm",children:l?.secondary?.label})]})})]}),d("div",{className:"flex-1 py-4",children:[Reflect.ownKeys(n).length>0&&d("div",{className:"mb-4 flex items-center justify-between",children:[(()=>{const e=d(K,{children:[t(b,{html:n?.label,className:"lg-desktop:text-2xl text-xl font-bold leading-[1.4]"}),n?.primary&&!n?.primary?.hide&&t(b,{className:"lg-desktop:text-base text-sm font-bold leading-[1.2]",html:n?.primary?.label})]});return n?.primary?.url?t(w,{as:"a",href:`${N(n?.primary?.url,p)}?ref=${n?.label}_viewmore`,variant:"link",size:"lg",iconClassName:"size-4",className:"flex items-center justify-start gap-2 !p-0 no-underline",children:e}):t("div",{className:"flex items-center gap-2",children:e})})(),l?.guide?.label&&t(F,{href:N(l?.guide?.url,p),className:"lg-desktop:text-base text-sm leading-[1.2] text-[#6D6D6F]",children:l?.guide?.label})]}),t("div",{className:"flex h-[426px] flex-col gap-4 overflow-y-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:n?.series?.map((e,r)=>d("div",{children:[e.label&&t(b,{html:e.label,as:"p",className:"mb-2 text-sm font-bold leading-[1.4] text-[#6D6D6F]"}),d("div",{className:"grid grid-cols-3 gap-4",children:[!!n?.banner&&t(F,{asChild:!n?.banner?.href,href:N(n?.banner?.href,p),children:d("div",{className:"relative [&_img]:hover:scale-110 [&_img]:hover:transition-all [&_img]:hover:duration-500",children:[t(W,{source:n?.banner?.imageUrl,className:"laptop:h-[120px] h-[114px]",imgClassName:"object-cover h-full"}),d("div",{className:"absolute inset-x-0 bottom-0 p-4",children:[t(O,{size:2,html:n?.banner?.title||"Buy in Guide",className:v("font-bold text-white",{"text-black":n?.banner?.theme==="dark"})}),t(b,{html:n?.banner?.desc||"20.000mAh",className:v("text-sm font-bold text-white",{"text-black":n?.banner?.theme==="dark"})})]})]})}),e.products?.map((a,s)=>t(G,{seriesLabel:n?.label,product:a,isCollection:n?.isCollection},`seriesProductItem-${e?.label||""}-${r}-${s}`))]})]},`seriesItem-${e?.label||""}-${r}`))})]})]})});V.displayName="SidebarDropdown";const G=({product:l,isCollection:f,position:g,seriesLabel:S})=>{const{locale:p="us"}=_(),{buildProps:x,onSeriesProductClick:h}=P();let o=f?l:x?.products?.find(u=>u.handle===l.handle);const m=o?.variants?.find(u=>u.sku===l.sku)||o?.variants?.[0],k=C(()=>`${N(`/products/${o?.handle}`,p)}?variant=${H(m?.id)}`,[o?.handle,m?.id,p]),y=C(()=>o?.tags?.filter?.(u=>u?.startsWith?.("CLtag"))?.map?.(u=>u?.replace?.("CLtag:",""))?.slice?.(0,2),[o?.tags]);return m?.availableForSale?t(F,{href:k,onClick:u=>{u.preventDefault(),window.open(k,"_self"),h?.(o,g||0,S)},className:"no-underline hover:text-current",children:d("div",{className:"rounded-sidebar-shelf flex shrink-0 items-center gap-4 bg-[#F5F5F7] px-4 py-3 [&_img]:hover:scale-110 [&_img]:hover:duration-500",children:[t("div",{className:"shrink-0",children:t("img",{src:`${m?.image?.url||l?.images?.[0]?.url}&width=200`,loading:"lazy",alt:o?.title||l?.name,width:90,height:90,className:"size-[96px] object-contain"})}),d("div",{className:"relative",children:[t("div",{className:"flex gap-1",children:Array.isArray(y)&&y?.map((u,n)=>t(b,{as:"p",html:u,className:"text-brand-0 mb-1 inline-block h-[24px] whitespace-nowrap rounded-full border-[1.6px] border-[#00BEFA] px-[6px] text-xs font-bold !leading-[22px]"},n))}),t(b,{className:"lg-desktop:h-[44px] lg-desktop:text-base line-clamp-2 h-[40px] text-sm font-bold leading-[1.4]",html:l?.custom_name||m?.metafields?.infos?.page_short_title||o?.title}),l?.desc&&t(b,{as:"p",html:l?.desc,className:"lg-desktop:text-sm mt-1 line-clamp-1 text-xs font-bold leading-[1.4] text-[#6D6D6F]"})]})]})}):null};export{G as SeriesProductItem,V as SidebarDropdown};
|
|
2
2
|
//# sourceMappingURL=SidebarDropdown.js.map
|