@gem-sdk/components 2.0.0-staging.1096 → 2.0.0-staging.1098

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.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),Loading=require("../../common/components/Loading.js"),React=require("react"),ArticleNotFound=require("./ArticleNotFound.js");const ArticleList=e=>{let t=core.useEditorMode(),{styles:i,setting:r,className:l,children:o,builderProps:a,advanced:n,builderAttrs:s}=e??{},{articleSetting:d,numberOfArticle:c}=r??{},{articleIds:u,articlePickType:g}=d??{},{border:m,rounded:p,hasBoxShadow:h,boxShadow:y}=n??{},b=core.composeAdvanceStyle({border:m,rounded:p,hasBoxShadow:h,boxShadow:y,"spacing-setting":n?.["spacing-setting"]}),x={first:u?.length||50,where:{baseIDIn:[...d?.articleIds??[]]},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},j={first:1,where:{baseID:d?.blogId},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"},articlesOrderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},[v,f]=React.useState(!0),A=core.useBlogsQuery("latest"===g?j:null,{revalidateOnMount:!0}),R=core.useArticlesQuery("manually"===g?x:null,{revalidateOnMount:!0}),S=A.data?.blogs?.edges?.[0]?.node,D="manually"===g?R.isLoading:A.isLoading,w="manually"===g?R.isValidating:A.isValidating,T="manually"===g?R.error:A.error,k=A?.data?.blogs?.edges?.[0]?.node,B="latest"===g?core.flattenConnection(k?.articles):core.flattenConnection(R?.data?.articles),L=(e,t)=>({...e??{},blog:{title:t?.title??"",handle:t?.handle??""}}),P="latest"===g?B?.filter((e,t)=>t<+(c||4)).map(e=>L(e,k)):"manually"===g&&d?.articleIds?.length?u?.map(e=>{let t=B?.find(t=>t?.baseID===e);return L(t,t?.blogs?.edges?.[0]?.node)}).filter(Boolean):B.filter((e,t)=>t<(d?.numOfSelectedArticles||4)).map(e=>L(e,e?.blogs?.edges?.[0]?.node));return P?.length||D||"edit"!=t?jsxRuntime.jsxs("div",{...s,className:a?.builderData?.uid,children:[w||D?jsxRuntime.jsx(Loading.default,{}):T?jsxRuntime.jsxs("div",{children:["Error: ",T?.message]}):P?.length?jsxRuntime.jsx(core.ArticleListProvider,{styles:{horizontalGutter:i?.horizontalGutter,verticalGutter:i?.verticalGutter,spacing:i?.spacing,width:i?.width,height:i?.height},settings:{slidesToShow:r?.slideToShow??{desktop:4,tablet:3,mobile:1}},articles:P,children:jsxRuntime.jsx("div",{"data-id":a?.uid,className:"gp-relative",children:jsxRuntime.jsx("div",{style:{...b,...core.makeStyleWithDefault("w",core.makeWidth(i?.width),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...core.makeStyleResponsive("rg",i?.horizontalGutter),...core.makeStyleResponsive("cg",i?.verticalGutter),...core.getStyleBackgroundByDevice(r?.background),...core.getGradientBgrStyleByDevice(r?.background),...core.makeStyleResponsive("gtc",{desktop:`repeat(${core.getResponsiveValueByScreen(r?.slideToShow,"desktop")}, minmax(0, 1fr))`,tablet:r?.slideToShow?.tablet&&`repeat(${core.getResponsiveValueByScreen(r?.slideToShow,"tablet")}, minmax(0, 1fr))`,mobile:r?.slideToShow?.mobile&&`repeat(${core.getResponsiveValueByScreen(r?.slideToShow,"mobile")}, minmax(0, 1fr))`})},className:core.cls(l,"gp-m-auto gp-grid gp-w-full"),children:P.map(e=>jsxRuntime.jsx(core.ArticleProvider,{article:e,readOnly:!0,children:jsxRuntime.jsx("div",{"data-component-type":"component","data-component-tag":"Article","data-component-label":"Article","data-component-no-setting":!0,"data-article-id":e?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:core.isEmptyChildren(o)?jsxRuntime.jsx(ChildrenDroppable.default,{}):o})},e?.id))})})}):jsxRuntime.jsx("div",{children:"Articles not found"}),core.filterToolbarPreview(o,!0)]}):v?jsxRuntime.jsx(ArticleNotFound.default,{blogHandle:S?.handle,onClose:()=>f(!1),articlePickType:g??"manually",children:o}):null};exports.default=ArticleList;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),Loading=require("../../common/components/Loading.js"),React=require("react"),ArticleNotFound=require("./ArticleNotFound.js");const ArticleList=e=>{let t=core.useEditorMode(),{styles:i,setting:r,className:l,children:o,builderProps:a,advanced:n,builderAttrs:s}=e??{},{articleSetting:d,numberOfArticle:c}=r??{},{articleIds:u,articlePickType:m}=d??{},{border:g,rounded:p,hasBoxShadow:h,boxShadow:b}=n??{},x=core.composeAdvanceStyle({border:g,rounded:p,hasBoxShadow:h,boxShadow:b,"spacing-setting":n?.["spacing-setting"]}),y={first:u?.length||50,where:{baseIDIn:[...d?.articleIds??[]]},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},j={first:1,where:{baseID:d?.blogId},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"},articlesOrderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},[v,f]=React.useState(!0),R=core.useBlogsQuery("latest"===m?j:null,{revalidateOnMount:!0}),A=core.useArticlesQuery("manually"===m?y:null,{revalidateOnMount:!0}),S=R.data?.blogs?.edges?.[0]?.node,D="manually"===m?A.isLoading:R.isLoading,w="manually"===m?A.isValidating:R.isValidating,T="manually"===m?A.error:R.error,k=R?.data?.blogs?.edges?.[0]?.node,B="latest"===m?core.flattenConnection(k?.articles):core.flattenConnection(A?.data?.articles),P=(e,t)=>({...e??{},blog:{title:t?.title??"",handle:t?.handle??""}}),L="latest"===m?B?.filter((e,t)=>t<+(c||4)).map(e=>P(e,k)):"manually"===m&&d?.articleIds?.length?u?.map(e=>{let t=B?.find(t=>t?.baseID===e);return P(t,t?.blogs?.edges?.[0]?.node)}).filter(Boolean):B.filter((e,t)=>t<(d?.numOfSelectedArticles||4)).map(e=>P(e,e?.blogs?.edges?.[0]?.node));return L?.length||D||"edit"!=t?jsxRuntime.jsxs("div",{...s,className:a?.builderData?.uid,children:[w||D?jsxRuntime.jsx(Loading.default,{}):T?jsxRuntime.jsxs("div",{children:["Error: ",T?.message]}):L?.length?jsxRuntime.jsx(core.ArticleListProvider,{styles:{horizontalGutter:i?.horizontalGutter,verticalGutter:i?.verticalGutter,spacing:i?.spacing,width:i?.width,height:i?.height},settings:{slidesToShow:r?.slideToShow??{desktop:4,tablet:3,mobile:1}},articles:L,children:jsxRuntime.jsx("div",{"data-id":a?.uid,className:"gp-relative",children:jsxRuntime.jsx("div",{style:{...x,...core.makeStyleWithDefault("w",core.makeWidth(i?.width),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...core.makeStyleResponsive("rg",i?.horizontalGutter),...core.makeStyleResponsive("cg",i?.verticalGutter),...core.getStyleBackgroundByDevice(r?.background),...core.getGradientBgrStyleByDevice(r?.background),...core.makeStyleResponsive("gtc",{desktop:`repeat(${core.getResponsiveValueByScreen(r?.slideToShow,"desktop")}, minmax(0, 1fr))`,tablet:r?.slideToShow?.tablet&&`repeat(${core.getResponsiveValueByScreen(r?.slideToShow,"tablet")}, minmax(0, 1fr))`,mobile:r?.slideToShow?.mobile&&`repeat(${core.getResponsiveValueByScreen(r?.slideToShow,"mobile")}, minmax(0, 1fr))`})},className:core.cls(l,"gp-m-auto gp-grid gp-w-full"),children:L.map(e=>jsxRuntime.jsx(core.ArticleProvider,{article:e,readOnly:!0,children:jsxRuntime.jsx("div",{"data-component-type":"component","data-component-tag":"Article","data-component-label":"Article","data-component-no-setting":!0,"data-article-id":e?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:core.isEmptyChildren(o)?jsxRuntime.jsx(ChildrenDroppable.default,{}):o})},e?.id))})})}):jsxRuntime.jsx("div",{children:"Articles not found"}),core.filterToolbarPreview(o,!0)]}):v?jsxRuntime.jsxs("div",{...s,className:a?.builderData?.uid,children:[jsxRuntime.jsx(ArticleNotFound.default,{blogHandle:S?.handle,onClose:()=>f(!1),articlePickType:m??"manually",children:o}),core.filterToolbarPreview(o,!0)]}):null};exports.default=ArticleList;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const getTextIconNotFound=e=>"react"===e?"Icons not found":helpers.getStaticLocale("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:o,pageContext:t,key:n,type:i})=>{let{childItem:s,translate:c}=e??{};return"react"===i?s?.[n]:helpers.getDynamicSourceLocales({val:s?.[n],uid:o?.uid,settingId:`childItem_${n}`,pageContext:t,translate:c,isReplaceLocationOrigin:!0})},getvalueMap=({setting:e})=>{let{childConfig:o,iconType:t,iconSvg:n}=e??{};return t&&"matching"!==t?"different"===t?o:void 0:Array(o?.length).fill(n)},composePostionIconList=(e,o,t)=>{let n={};return core.composePositionLineHeight({compose:n,lineHeight:e,device:"desktop",position:o,iconWidth:t}),core.composePositionLineHeight({compose:n,lineHeight:e,device:"tablet",position:o,iconWidth:t}),core.composePositionLineHeight({compose:n,lineHeight:e,device:"mobile",position:o,iconWidth:t}),n};exports.composePostionIconList=composePostionIconList,exports.getTextIconNotFound=getTextIconNotFound,exports.getTextIconTranslations=getTextIconTranslations,exports.getvalueMap=getvalueMap;
1
+ "use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const getTextIconNotFound=e=>"react"===e?"Icons not found":helpers.getStaticLocale("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:t,pageContext:o,key:i,type:n})=>{let{childItem:s,translate:c}=e??{};return"react"===n?s?.[i]:helpers.getDynamicSourceLocales({val:s?.[i],uid:t?.uid,settingId:`childItem_${i}`,pageContext:o,translate:c,isReplaceLocationOrigin:!0})},getvalueMap=({setting:e})=>{let{childConfig:t,iconType:o,iconSvg:i}=e??{};return o&&"matching"!==o?"different"===o?t:void 0:Array(t?.length).fill(i)},composePostionIconList=(e,t,o)=>{let i={...o,desktop:o?.desktop??0,tablet:o?.tablet??o?.desktop??0,mobile:o?.mobile??o?.tablet??o?.desktop??0},n={};return core.composePositionLineHeight({compose:n,lineHeight:e,device:"desktop",position:t,iconWidth:i}),core.composePositionLineHeight({compose:n,lineHeight:e,device:"tablet",position:t,iconWidth:i}),core.composePositionLineHeight({compose:n,lineHeight:e,device:"mobile",position:t,iconWidth:i}),n};exports.composePostionIconList=composePostionIconList,exports.getTextIconNotFound=getTextIconNotFound,exports.getTextIconTranslations=getTextIconTranslations,exports.getvalueMap=getvalueMap;
@@ -13,7 +13,7 @@
13
13
  <rect x="66.6665" y="33" width="29.3333" height="6" rx="3" fill="#494949"/>
14
14
  <rect x="72.333" y="42" width="18" height="6" rx="3" fill="#494949"/>
15
15
  </svg>
16
- `},components:[{tag:"ProductList",label:"Product List",settings:{columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}},sameHeightSubgridContainer:!0},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",left:"var(--g-s-s)",right:"var(--g-s-s)",bottom:"var(--g-s-s)"}},border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0,allowSameHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}]},{id:"related-product",name:{en:"Related Products"},icon:{desktop:`
16
+ `},components:[{tag:"ProductList",label:"Product List",settings:{columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}},sameHeightSubgridContainer:!0},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0,allowSameHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}]},{id:"related-product",name:{en:"Related Products"},icon:{desktop:`
17
17
  <svg width="126" height="80" viewBox="0 0 126 80" fill="none" xmlns="http://www.w3.org/2000/svg">
18
18
  <g clip-path="url(#clip0_19807_27615)">
19
19
  <path d="M0 0H126V80H0V0Z" fill="#212121"/>
@@ -34,4 +34,4 @@
34
34
  </clipPath>
35
35
  </defs>
36
36
  </svg>
37
- `},components:[{tag:"ProductList",label:"Product List",settings:{productSetting:{productSrc:"RelatedProduct"},columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",left:"var(--g-s-s)",right:"var(--g-s-s)",bottom:"var(--g-s-s)"}},border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{priceType:"regular",typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}],rootOverride:{label:"Related Products"}}];exports.ProductListPreset=ProductListPreset;
37
+ `},components:[{tag:"ProductList",label:"Product List",settings:{productSetting:{productSrc:"RelatedProduct"},columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{priceType:"regular",typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}],rootOverride:{label:"Related Products"}}];exports.ProductListPreset=ProductListPreset;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useEditorMode as i,composeAdvanceStyle as l,useBlogsQuery as a,useArticlesQuery as r,flattenConnection as o,ArticleListProvider as d,makeStyleWithDefault as n,makeWidth as s,makeStyleResponsive as c,getStyleBackgroundByDevice as m,getGradientBgrStyleByDevice as g,getResponsiveValueByScreen as p,cls as h,ArticleProvider as u,isEmptyChildren as b,filterToolbarPreview as f}from"@gem-sdk/core";import w from"../../grid/components/ChildrenDroppable.js";import A from"../../common/components/Loading.js";import{useState as T}from"react";import y from"./ArticleNotFound.js";let ArticleList=D=>{let v=i(),{styles:S,setting:O,className:k,children:I,builderProps:L,advanced:E,builderAttrs:P}=D??{},{articleSetting:G,numberOfArticle:_}=O??{},{articleIds:x,articlePickType:C}=G??{},{border:M,rounded:j,hasBoxShadow:B,boxShadow:F}=E??{},N=l({border:M,rounded:j,hasBoxShadow:B,boxShadow:F,"spacing-setting":E?.["spacing-setting"]}),z={first:x?.length||50,where:{baseIDIn:[...G?.articleIds??[]]},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},R={first:1,where:{baseID:G?.blogId},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"},articlesOrderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},[U,$]=T(!0),V=a("latest"===C?R:null,{revalidateOnMount:!0}),H=r("manually"===C?z:null,{revalidateOnMount:!0}),q=V.data?.blogs?.edges?.[0]?.node,J="manually"===C?H.isLoading:V.isLoading,K="manually"===C?H.isValidating:V.isValidating,Q="manually"===C?H.error:V.error,W=V?.data?.blogs?.edges?.[0]?.node,X="latest"===C?o(W?.articles):o(H?.data?.articles),Y=(e,t)=>({...e??{},blog:{title:t?.title??"",handle:t?.handle??""}}),Z="latest"===C?X?.filter((e,t)=>t<+(_||4)).map(e=>Y(e,W)):"manually"===C&&G?.articleIds?.length?x?.map(e=>{let t=X?.find(t=>t?.baseID===e);return Y(t,t?.blogs?.edges?.[0]?.node)}).filter(Boolean):X.filter((e,t)=>t<(G?.numOfSelectedArticles||4)).map(e=>Y(e,e?.blogs?.edges?.[0]?.node));return Z?.length||J||"edit"!=v?t("div",{...P,className:L?.builderData?.uid,children:[K||J?e(A,{}):Q?t("div",{children:["Error: ",Q?.message]}):Z?.length?e(d,{styles:{horizontalGutter:S?.horizontalGutter,verticalGutter:S?.verticalGutter,spacing:S?.spacing,width:S?.width,height:S?.height},settings:{slidesToShow:O?.slideToShow??{desktop:4,tablet:3,mobile:1}},articles:Z,children:e("div",{"data-id":L?.uid,className:"gp-relative",children:e("div",{style:{...N,...n("w",s(S?.width),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...c("rg",S?.horizontalGutter),...c("cg",S?.verticalGutter),...m(O?.background),...g(O?.background),...c("gtc",{desktop:`repeat(${p(O?.slideToShow,"desktop")}, minmax(0, 1fr))`,tablet:O?.slideToShow?.tablet&&`repeat(${p(O?.slideToShow,"tablet")}, minmax(0, 1fr))`,mobile:O?.slideToShow?.mobile&&`repeat(${p(O?.slideToShow,"mobile")}, minmax(0, 1fr))`})},className:h(k,"gp-m-auto gp-grid gp-w-full"),children:Z.map(t=>e(u,{article:t,readOnly:!0,children:e("div",{"data-component-type":"component","data-component-tag":"Article","data-component-label":"Article","data-component-no-setting":!0,"data-article-id":t?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:b(I)?e(w,{}):I})},t?.id))})})}):e("div",{children:"Articles not found"}),f(I,!0)]}):U?e(y,{blogHandle:q?.handle,onClose:()=>$(!1),articlePickType:C??"manually",children:I}):null};export{ArticleList as default};
2
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as i,composeAdvanceStyle as l,useBlogsQuery as a,useArticlesQuery as r,flattenConnection as o,filterToolbarPreview as d,ArticleListProvider as n,makeStyleWithDefault as s,makeWidth as c,makeStyleResponsive as m,getStyleBackgroundByDevice as g,getGradientBgrStyleByDevice as p,getResponsiveValueByScreen as h,cls as u,ArticleProvider as b,isEmptyChildren as f}from"@gem-sdk/core";import w from"../../grid/components/ChildrenDroppable.js";import A from"../../common/components/Loading.js";import{useState as T}from"react";import D from"./ArticleNotFound.js";let ArticleList=y=>{let v=i(),{styles:S,setting:O,className:k,children:I,builderProps:L,advanced:E,builderAttrs:P}=y??{},{articleSetting:G,numberOfArticle:_}=O??{},{articleIds:x,articlePickType:C}=G??{},{border:M,rounded:N,hasBoxShadow:j,boxShadow:B}=E??{},F=l({border:M,rounded:N,hasBoxShadow:j,boxShadow:B,"spacing-setting":E?.["spacing-setting"]}),z={first:x?.length||50,where:{baseIDIn:[...G?.articleIds??[]]},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},R={first:1,where:{baseID:G?.blogId},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"},articlesOrderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},[U,$]=T(!0),V=a("latest"===C?R:null,{revalidateOnMount:!0}),H=r("manually"===C?z:null,{revalidateOnMount:!0}),q=V.data?.blogs?.edges?.[0]?.node,J="manually"===C?H.isLoading:V.isLoading,K="manually"===C?H.isValidating:V.isValidating,Q="manually"===C?H.error:V.error,W=V?.data?.blogs?.edges?.[0]?.node,X="latest"===C?o(W?.articles):o(H?.data?.articles),Y=(e,t)=>({...e??{},blog:{title:t?.title??"",handle:t?.handle??""}}),Z="latest"===C?X?.filter((e,t)=>t<+(_||4)).map(e=>Y(e,W)):"manually"===C&&G?.articleIds?.length?x?.map(e=>{let t=X?.find(t=>t?.baseID===e);return Y(t,t?.blogs?.edges?.[0]?.node)}).filter(Boolean):X.filter((e,t)=>t<(G?.numOfSelectedArticles||4)).map(e=>Y(e,e?.blogs?.edges?.[0]?.node));return Z?.length||J||"edit"!=v?e("div",{...P,className:L?.builderData?.uid,children:[K||J?t(A,{}):Q?e("div",{children:["Error: ",Q?.message]}):Z?.length?t(n,{styles:{horizontalGutter:S?.horizontalGutter,verticalGutter:S?.verticalGutter,spacing:S?.spacing,width:S?.width,height:S?.height},settings:{slidesToShow:O?.slideToShow??{desktop:4,tablet:3,mobile:1}},articles:Z,children:t("div",{"data-id":L?.uid,className:"gp-relative",children:t("div",{style:{...F,...s("w",c(S?.width),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...m("rg",S?.horizontalGutter),...m("cg",S?.verticalGutter),...g(O?.background),...p(O?.background),...m("gtc",{desktop:`repeat(${h(O?.slideToShow,"desktop")}, minmax(0, 1fr))`,tablet:O?.slideToShow?.tablet&&`repeat(${h(O?.slideToShow,"tablet")}, minmax(0, 1fr))`,mobile:O?.slideToShow?.mobile&&`repeat(${h(O?.slideToShow,"mobile")}, minmax(0, 1fr))`})},className:u(k,"gp-m-auto gp-grid gp-w-full"),children:Z.map(e=>t(b,{article:e,readOnly:!0,children:t("div",{"data-component-type":"component","data-component-tag":"Article","data-component-label":"Article","data-component-no-setting":!0,"data-article-id":e?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:f(I)?t(w,{}):I})},e?.id))})})}):t("div",{children:"Articles not found"}),d(I,!0)]}):U?e("div",{...P,className:L?.builderData?.uid,children:[t(D,{blogHandle:q?.handle,onClose:()=>$(!1),articlePickType:C??"manually",children:I}),d(I,!0)]}):null};export{ArticleList as default};
@@ -1 +1 @@
1
- import{composePositionLineHeight as e}from"@gem-sdk/core";import{getDynamicSourceLocales as t,getStaticLocale as o}from"../../helpers.js";let getTextIconNotFound=e=>"react"===e?"Icons not found":o("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:o,pageContext:n,key:i,type:c})=>{let{childItem:r,translate:s}=e??{};return"react"===c?r?.[i]:t({val:r?.[i],uid:o?.uid,settingId:`childItem_${i}`,pageContext:n,translate:s,isReplaceLocationOrigin:!0})},getvalueMap=({setting:e})=>{let{childConfig:t,iconType:o,iconSvg:n}=e??{};return o&&"matching"!==o?"different"===o?t:void 0:Array(t?.length).fill(n)},composePostionIconList=(t,o,n)=>{let i={};return e({compose:i,lineHeight:t,device:"desktop",position:o,iconWidth:n}),e({compose:i,lineHeight:t,device:"tablet",position:o,iconWidth:n}),e({compose:i,lineHeight:t,device:"mobile",position:o,iconWidth:n}),i};export{composePostionIconList,getTextIconNotFound,getTextIconTranslations,getvalueMap};
1
+ import{composePositionLineHeight as t}from"@gem-sdk/core";import{getDynamicSourceLocales as e,getStaticLocale as o}from"../../helpers.js";let getTextIconNotFound=t=>"react"===t?"Icons not found":o("IconList","icons_not_found"),getTextIconTranslations=({setting:t,builderProps:o,pageContext:i,key:n,type:c})=>{let{childItem:s,translate:d}=t??{};return"react"===c?s?.[n]:e({val:s?.[n],uid:o?.uid,settingId:`childItem_${n}`,pageContext:i,translate:d,isReplaceLocationOrigin:!0})},getvalueMap=({setting:t})=>{let{childConfig:e,iconType:o,iconSvg:i}=t??{};return o&&"matching"!==o?"different"===o?e:void 0:Array(e?.length).fill(i)},composePostionIconList=(e,o,i)=>{let n={...i,desktop:i?.desktop??0,tablet:i?.tablet??i?.desktop??0,mobile:i?.mobile??i?.tablet??i?.desktop??0},c={};return t({compose:c,lineHeight:e,device:"desktop",position:o,iconWidth:n}),t({compose:c,lineHeight:e,device:"tablet",position:o,iconWidth:n}),t({compose:c,lineHeight:e,device:"mobile",position:o,iconWidth:n}),c};export{composePostionIconList,getTextIconNotFound,getTextIconTranslations,getvalueMap};
@@ -13,7 +13,7 @@ let ProductListPreset=[{id:"product-list",name:{en:"Product List"},icon:{desktop
13
13
  <rect x="66.6665" y="33" width="29.3333" height="6" rx="3" fill="#494949"/>
14
14
  <rect x="72.333" y="42" width="18" height="6" rx="3" fill="#494949"/>
15
15
  </svg>
16
- `},components:[{tag:"ProductList",label:"Product List",settings:{columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}},sameHeightSubgridContainer:!0},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",left:"var(--g-s-s)",right:"var(--g-s-s)",bottom:"var(--g-s-s)"}},border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0,allowSameHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}]},{id:"related-product",name:{en:"Related Products"},icon:{desktop:`
16
+ `},components:[{tag:"ProductList",label:"Product List",settings:{columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}},sameHeightSubgridContainer:!0},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0,allowSameHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}]},{id:"related-product",name:{en:"Related Products"},icon:{desktop:`
17
17
  <svg width="126" height="80" viewBox="0 0 126 80" fill="none" xmlns="http://www.w3.org/2000/svg">
18
18
  <g clip-path="url(#clip0_19807_27615)">
19
19
  <path d="M0 0H126V80H0V0Z" fill="#212121"/>
@@ -34,4 +34,4 @@ let ProductListPreset=[{id:"product-list",name:{en:"Product List"},icon:{desktop
34
34
  </clipPath>
35
35
  </defs>
36
36
  </svg>
37
- `},components:[{tag:"ProductList",label:"Product List",settings:{productSetting:{productSrc:"RelatedProduct"},columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",left:"var(--g-s-s)",right:"var(--g-s-s)",bottom:"var(--g-s-s)"}},border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{priceType:"regular",typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}],rootOverride:{label:"Related Products"}}];export{ProductListPreset};
37
+ `},components:[{tag:"ProductList",label:"Product List",settings:{productSetting:{productSrc:"RelatedProduct"},columns:{desktop:4,tablet:2,mobile:1},dot:{desktop:!1}},advanced:{"spacing-setting":{padding:{top:"var(--g-s-s)",bottom:"var(--g-s-s)"}}},childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{verticalGutter:{desktop:"var(--g-s-2xl)"}},advanced:{border:{desktop:{normal:{border:"none",borderLabel:"Style 1",borderType:"style-1",color:"line-1",isCustom:!1,width:"1px 1px 1px 1px"}}}},childrens:[{tag:"Col",label:"Block",settings:{fullHeight:!0},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{ftClickOpenLightBox:{desktop:"product-link"},ftLoop:{desktop:!1},ftDragToScroll:!1},styles:{position:{desktop:"only-feature",mobile:"only-feature"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h2"},styles:{typo:{type:"subheading-1"},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:2},color:{normal:"text-1"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},transform:"default"},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"}}},styles:{verticalGutter:{desktop:"16px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},fullWidth:{desktop:!0},width:{desktop:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{priceType:"regular",typo:{type:"paragraph-1"},color:{normal:"text-1"},lineColor:"highlight",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]},{tag:"Col",label:"Block",settings:{},styles:{justifyContent:{desktop:"center"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"paragraph-1"},color:{normal:"text-2"},lineColor:"text-2",textAlign:{desktop:"left"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},lineThrough:!0,thickness:1},advanced:{}}]}]},{tag:"ProductVariants",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"ProductButton",label:"Product Cart Button",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},settings:{actionEffect:"open-cart-drawer",label:"Add to cart",outOfStockLabel:"Out Of Stock",successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",iconVisible:!1,iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M448 128.001H362.667C362.667 69.1207 314.88 21.334 256 21.334C197.12 21.334 149.333 69.1207 149.333 128.001H64V469.334H448V128.001ZM256 64.0007C291.413 64.0007 320 92.5873 320 128.001H192C192 92.5873 220.587 64.0007 256 64.0007ZM256 277.334C197.12 277.334 149.333 229.547 149.333 170.667H192C192 206.081 220.587 234.667 256 234.667C291.413 234.667 320 206.081 320 170.667H362.667C362.667 229.547 314.88 277.334 256 277.334Z" /></svg>',iconAlign:"left"},styles:{globalSize:{desktop:{width:"100%"}},enableIcon:!0,enablePrice:!1,enableSeparator:!1}}]}]}]}],rootOverride:{label:"Related Products"}}];export{ProductListPreset};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.1096",
3
+ "version": "2.0.0-staging.1098",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",