@gem-sdk/components 12.0.0-staging.1 → 12.0.0-staging.10
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/carousel-v3/components/item/CarouselItem.liquid.js +1 -0
- package/dist/cjs/carousel-v3/components/swiper/SwiperSlide.js +1 -1
- package/dist/cjs/countdown-timer/common/helpers.js +1 -1
- package/dist/cjs/countdown-timer/hooks/useCountDownTimer.js +1 -1
- package/dist/cjs/countdown-timer/hooks/useTimeLeft.js +1 -1
- package/dist/cjs/countdown-timer/settings/Countdown.js +1 -1
- package/dist/cjs/countdown-timer/settings/configs/setting.js +1 -1
- package/dist/cjs/countdown-timer/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +18 -18
- package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/common.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
- package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/cjs/product/components/product-title/ProductTitle.liquid.js +1 -1
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +4 -4
- package/dist/cjs/product/helpers/product-bundle.js +1 -1
- package/dist/cjs/product/settings/bundle-layout/horizontal-three.js +1 -1
- package/dist/cjs/product/settings/bundle-layout/horizontal-two.js +1 -1
- package/dist/esm/carousel-v3/components/item/CarouselItem.liquid.js +3 -2
- package/dist/esm/carousel-v3/components/swiper/SwiperSlide.js +1 -1
- package/dist/esm/countdown-timer/common/helpers.js +1 -1
- package/dist/esm/countdown-timer/hooks/useCountDownTimer.js +1 -1
- package/dist/esm/countdown-timer/hooks/useTimeLeft.js +1 -1
- package/dist/esm/countdown-timer/settings/Countdown.js +3 -3
- package/dist/esm/countdown-timer/settings/configs/setting.js +1 -1
- package/dist/esm/countdown-timer/settings/configs/ui-v2.js +1 -1
- package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +22 -22
- package/dist/esm/product/components/product-badge/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-badge/utils/common.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
- package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/esm/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/esm/product/components/product-title/ProductTitle.liquid.js +1 -1
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +9 -9
- package/dist/esm/product/helpers/product-bundle.js +1 -1
- package/dist/esm/product/settings/bundle-layout/horizontal-three.js +1 -1
- package/dist/esm/product/settings/bundle-layout/horizontal-two.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CompareType as e}from"../types.js";let getMinValueForInventory=i=>i===e.ABOVE?0:i===e.BELOW?2:1,renderBadgeInFirstTime=(e,i
|
|
1
|
+
import{CompareType as e}from"../types.js";let getMinValueForInventory=i=>i===e.ABOVE?0:i===e.BELOW?2:1,renderBadgeInFirstTime=(e,i)=>`
|
|
2
2
|
{% assign isShow = true %}
|
|
3
3
|
{% assign conditionTriggers = "" %}
|
|
4
4
|
{% assign isInventoryStatus = false %}
|
|
@@ -16,9 +16,8 @@ import{CompareType as e}from"../types.js";let getMinValueForInventory=i=>i===e.A
|
|
|
16
16
|
{% assign price = variant.price | times: 1.0 %}
|
|
17
17
|
{% assign salePrice = variant.compare_at_price | times: 1.0 %}
|
|
18
18
|
{% assign priceSave = salePrice | minus: price %}
|
|
19
|
-
{% assign
|
|
20
|
-
{%
|
|
21
|
-
{% if priceSave <= 0 or isDiscountContent == false or isTextBadge == false %}
|
|
19
|
+
{% assign isEmptyBadgeContent = ${!i} %}
|
|
20
|
+
{% if priceSave <= 0 or isEmptyBadgeContent == true %}
|
|
22
21
|
{% assign isShow = false %}
|
|
23
22
|
{% endif %}
|
|
24
23
|
{% if isShow %}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRenderMode as e,useProduct as t,useCurrency as r,useQuantity as i,useProductProperties as s,useCurrentVariant as n,useHasPreSelected as o,useStickyStore as a,useProductStore as u,useCreateCart as l,useAddToCart as c,useCurrentVariantInStock as
|
|
1
|
+
import{useRenderMode as e,useProduct as t,useCurrency as r,useQuantity as i,useProductProperties as s,useCurrentVariant as n,useHasPreSelected as o,useStickyStore as a,useProductStore as u,useCreateCart as l,useAddToCart as c,convertDecimalToNumber as m,useCurrentVariantInStock as b}from"@gem-sdk/core";import{useRef as d,useEffect as f,useCallback as p}from"react";import{addToCartTracking as v}from"../../../helpers/tracking.js";import{useDispatchAfterSubmitEvent as g}from"./useDispatchAfterSubmitEvent.js";import{useCartMessage as I}from"./useCartMessage.js";import{useCartOperations as k}from"./useCartOperations.js";let useBtnAddToCart=({styles:D,setting:S,builderProps:E})=>{let h=d(null),{isEditMode:j,isPreviewSharePageMode:y}=e(),C=t(),{currency:A}=r(),{quantity:M}=i(),O=s(),w=n(),{hasPreSelected:B}=o(),T=a(e=>e.setStickyVisible),q=u(e=>e.updateIsSubmit),x=g(E?.uid),{showMessage:L,notiComponent:U}=I(D,S),{handleSuccess:V,handleError:z,cartId:F}=k(S,L,x),{isMutating:G,trigger:H}=l({onSuccess:V,onError:z}),{isMutating:J,trigger:K}=c({onSuccess:V,onError:z});f(()=>{let e=new IntersectionObserver(e=>{let t=e[0];T(t?.isIntersecting)},{threshold:.1}),t=h.current;return h.current&&e.observe(h.current),()=>{t&&e.unobserve(t)}},[T]);let N=p(()=>{if(!w?.baseID||!M||!C?.baseID||void 0!==B&&!B||j||y)return;let e=O?.some(e=>e.required&&!e.value);if(q(!0),e)return;let t=O?.filter(e=>!!e.value)?.map(e=>({key:e.key,value:e.value}));v({quantity:M,currency:A,id:C?.baseID,name:C?.title,brand:C?.vendor,sku:w.sku,price:m(w?.price),variant:w.title});let r={quantity:M,attributes:t,variantId:w.baseID};S?.actionEffect!=="buy-now"&&F?K({cartId:F,lines:[r]}):H({items:[r]})},[j,y,F,A,M,O,B,C?.title,C?.vendor,C?.baseID,w?.sku,w?.price,w?.title,w?.baseID,S?.actionEffect,H,K,q]),P=b(),Q=G||J,R=w?S?.outOfStockLabel:"Unavailable";return{addToCartRef:h,isLoading:Q,isInStock:P,notiComponent:U,outOfStockLabel:R,addToCart:N}};export{useBtnAddToCart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMoneyFormat as e,useEditorMode as t,useProduct as r,useCurrentVariant as n,useQuantity as o,
|
|
1
|
+
import{useMoneyFormat as e,useEditorMode as t,useProduct as r,useCurrentVariant as n,useQuantity as o,convertDecimalToNumber as u,useFormatMoney as i,useProductBundleDiscount as p,formatMoney as c}from"@gem-sdk/core";import{useMemo as s}from"react";import{applyBundleDiscountAmount as a}from"../../../helpers/product-bundle.js";import{DiscountType as m}from"../../constants/product-bundle.js";let useGpDiscountTag=l=>{let{setting:d,...g}=l,{customContent:f}=d??{},b=g["bundle-item"],{moneyFormat:h}=e(),D=t(),$=r(),j=n(),{quantity:y,hasUpdatePrice:G}=o(),P=s(()=>G&&f?.unit!=="percentage"?y??1:1,[G,f?.unit,y]),T=u(j?.price)??0,k=u(j?.salePrice)??0,x=(k-T)*P,C=i(x<0?0:x,d?.moneyWithCurrentFormat||!1),F=s(()=>{if(!k&&0!==k||!T&&0!==T)return`${f?.unit==="percentage"?"0%":C}`;if(f?.unit==="percentage"){let e=Math.round(x/(k/100));return`${e<0?0:e}%`}return`${C}`},[f?.unit,C,T,x,k]),{useProductCompareAtPrice:I}=p(),{discountPercentAmount:M}=a({currentVariant:j,bundleItem:b,options:{moneyFormat:h,useProductCompareAtPrice:I}}),N=s(()=>{if(!b)return 0;let{discountPercentAmount:e,discountAmount:t}=a({currentVariant:j,bundleItem:b,options:{moneyFormat:h,useProductCompareAtPrice:I}}),{discountType:r}=b,{unit:n}=f||{};return r!==m.NoDiscount||I?"percentage"===n?`${e}%`:t:"percentage"===n?"0%":c("0",h)},[b,j,h,I,f]),W=s(()=>b?N:F,[N,b,F]),q=$?.baseID?.replace("gid://shopify/Product/",""),v=s(()=>{let e=b?M<=0:x<=0;return"edit"===D&&e},[b,M,D,x]);return{mode:D,product:$,salePrice:k,priceSave:x,currentProductId:q,unitCustomDisplay:W,shouldPlaceholderNoDiscount:v}};export{useGpDiscountTag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as n,usePageType as s,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as P,useProductsQuery as f,useCollectionQuery as b,flattenConnection as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as n,usePageType as s,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as P,useProductsQuery as f,useCollectionQuery as b,flattenConnection as T,ProductListProvider as k,filterToolbarPreview as I}from"@gem-sdk/core";import v from"../SalePageProductListWarning.js";import y from"next/head";import O from"./ProductListGridLayout.js";import N from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let ProductNotFound=r(()=>import("../ProductNotFound.js"),{loading:d}),ProductList=r=>{let{children:W,styles:j,builderProps:x,setting:G,builderAttrs:M}=r,{isRelatedProduct:A,productSetting:B}=w(r),F=B.relatedTag&&B.relatedTag[0],{isEditMode:H,isPreviewSharePageMode:Q}=c(),z=n(),D=s(),R=u(e=>e.dynamicProduct),$=u(e=>e.dynamicCollection),[_,V]=l(1),[q,U]=l(!0),[J,K]=l(),[X,Y]=l(!1),Z="GP_FUNNEL_PAGE"===D,ee="GP_COLLECTION"==D;ee&&(B.productSrc="DynamicCollection",B.collectionId=$?.collectionId??"latest");let et=B?.productSrc??"Collection",eo=R?.productId&&R?.productId!==B.relatedProductId?R?.productId:B.relatedProductId,er=m(),ed=u(e=>e.publicStoreFrontData),el=i(()=>g(ed)?h(ed):er,[ed]),{data:ei}=p(A&&eo?eo:void 0,{revalidateOnMount:H||Q},el),ea=B.relatedTag&&"tags"===B.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),ec=B.relatedTag&&"collection"===B.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=B.relatedTag&&"vendor"===B.relatedTag[0]&&!ei?.vendor,es=ea||ec||en,eu=P(J,{revalidateOnMount:H||Q},el),em=H||Q,eg=f("PickProduct"===et?B?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:B?.numOfSelectedProducts}),eh=i(()=>({id:B?.collectionId??"latest",numberOfProducts:G?.numberOfProducts??4,orderBy:G?.orderBy}),[B?.collectionId,Number(G?.numberOfProducts),G?.orderBy]),ep=b("PickProduct"!==et?eh:void 0,{revalidateOnMount:em});a(()=>{if(A&&ei&&B.relatedTag&&"recommended-product"!==B.relatedType){let e;switch(Y(!1),B.hasRelatedExclude&&(e=B?.relatedExclude&&B.relatedExclude.split(",").map(e=>e.trim())),B.relatedTag[0]){case"vendor":K({vendor:B.relatedTag&&"vendor"===B.relatedTag[0]?ei?.vendor:"",limit:G?.numberOfProducts,idNEQ:ei.id});break;case"collection":{let t;let o=ei?.collections?.edges.map(e=>e.node?.id);if(!o||o?.length===0){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o},{titleNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o}]}],limit:G?.numberOfProducts});break}case"tags":{let t;if(!ei.tags||0===ei.tags.length){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}],limit:G?.numberOfProducts})}}}},[ei,B.relatedType,B.relatedTag,G?.numberOfProducts,B.relatedExclude,B.hasRelatedExclude,A]);let eP="PickProduct"===et?eg.isValidating:ep.isValidating,ef="PickProduct"===et?eg.isLoading:ep.isLoading,eb="PickProduct"===et?eg.error:ep.error,eT=ep.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?T(eg.data?.products):T(eT?.products),eI=u(e=>e.assignedProductIds),ev=u(e=>e.isApplyAllProducts),ey=i(()=>(eI??[]).length>0&&!ev||ev,[eI,ev]),eO=eu?.data?.products&&ey?T(eu?.data?.products):[],eN=A?eO:"PickProduct"===et&&B?.productIds?.length?B?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(B?.numOfSelectedProducts??4)),eS=i(()=>X&&A&&H||!eN.length&&!ef&&q&&H,[q,ef,X,A,H,eN.length]),eC=i(()=>!eN||X&&A,[X,A,eN]),eE=i(()=>{if(!G?.sameHeight)return[];let e=0,t=Math.ceil((eN?.length??0)/+(G?.slidesToShow?.[z]??1));return Array.from(Array(eN?.length??0)).map((o,r)=>(r>=+(G?.slidesToShow?.[z]??1)*(e+1)&&++e,{gridRow:`${1+_*e}/${_+1+_*e}`,marginBottom:e+1<t?L(j?.horizontalGutter,z):void 0}))},[G?.sameHeight,G?.slidesToShow,_,eN?.length,z,j?.horizontalGutter]),ew=i(()=>eP||ef||eb||!eN||X&&A,[eb,ef,X,A,eP,eN]);a(()=>{if(ew||!G?.sameHeight)return;let e=null,t=setTimeout(()=>{let{builderData:t}=x??{},o=t?.childrens?.[0];if(!o)return;let r=document.querySelector(`[data-id=${o}] div`);r&&(V(r.childElementCount||1),e=new MutationObserver(()=>{let e=r.childElementCount||1;V(e)}),H&&e.observe(r,{childList:!0,subtree:!1}))},500);return()=>{clearTimeout(t),e&&e.disconnect()}},[x,ew,H,G?.sameHeight]);let eL=i(()=>({collection:eT,products:eN,settings:{loop:G?.loop??{desktop:!1},scrollMode:G?.scrollMode??{desktop:"snap"},slidesToShow:G?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:j?.layout,dot:G?.dot,dotStyle:G?.dotStyle,arrow:G?.arrow,controlOverContent:G?.controlOverContent},styles:{horizontalGutter:j?.horizontalGutter,verticalGutter:j?.verticalGutter,fullWidth:j?.fullWidth,spacing:j?.spacing,width:j?.width,height:j?.height}}),[eT,eN,G,j]);if(x?.isPreview&&Z)return e(t,{});if(eS)return e(t,{children:C(q,e(ProductNotFound,{builderAttrs:M,collectionHandle:eT?.handle,productSrc:et,onClose:()=>U(!1),children:W,relatedTagString:F,assignProductNoTags:es,noAssignedProduct:!eo}))});let{productListWrapStyle:eW,productListContentStyle:ej,productListWrapAlignStyle:ex}=S(r),{productListWrapClass:eG}=E(r),eM=()=>e(t,{children:C(j?.layout==="grid",e(O,{...r,productSortedById:eN,generateGridRowArray:eE}),e(N,{...r,productSortedById:eN}))});return o("div",{...M,className:eG,style:eW,children:[!!j?.preloadBgImage&&o(y,{children:[!!j.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage.desktop.image.src,as:"image"}),!!j.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.tablet?.image?.src,as:"image"}),!!j.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||ef?e(d,{}):eb?o("div",{children:["Error: ",eb?.message]}):eC?e("div",{children:"Products not found"}):e(k,{...eL,children:e("div",{className:"gp-flex gp-w-full",style:ex,children:o("div",{style:ej,children:[Z&&e(v,{}),eM()]})})}),I(W,!0)]})};export{ProductList as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as n,
|
|
1
|
+
import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as n,convertDecimalToNumber as o,useInteraction as u,useProduct as p,useShopStore as d,useFormatMoney as l}from"@gem-sdk/core";let useGpPrice=m=>{let{setting:s,builderProps:g}=m,b=e(null),h=c(),{quantity:y,hasUpdatePrice:P}=i(),v=a(),{useProductCompareAtPrice:f}=n(),w=m["bundle-item"],V=o(v?.price)??0,k=o(v?.salePrice)??0,q=s?.priceType==="compare",{trigger:T}=u(),x=p(),C=x?.baseID?.replace("gid://shopify/Product/",""),E=d(e=>e.showPriceCurrency),G=r(()=>w?.quantity?w.quantity:P&&y||1,[y,P,w?.quantity]),$=r(()=>{let e=Number(w?.discountValue);return w?.discountType==="percentage"?V*G*e/100:e},[w?.discountType,w?.discountValue,V,G]),j=r(()=>w?.discountValue?f?(k||V)*G:V*G:k*G,[w?.discountValue,V,G,k,f]),D=r(()=>{let e=V*G;return q?j:$?Math.max(0,e-$):e},[V,G,$,j,q]),I=r(()=>!!q&&(!(k>V)||!(k>=0)),[q,k,V]),M=(e,r)=>{T({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${g?.uid}"]`,element:b.current}),T({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${g?.uid}"]`,element:b.current})};t(e=>{e!==V&&M(V,"price")},[V]),t(e=>{e!==k&&M(k,"compare")},[k]);let N=()=>{if("edit"!==h)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:g?.uid,value:!D&&q,tag:"ProductPrice"}});window.dispatchEvent(e)},z=l(D??0,E||!1),A=q&&!D,B="edit"!==h&&A;return{elementRef:b,moneyFormatted:z,currentProductId:C,isNoComparePrice:A,isNoComparePriceILP:B,emitNoDataSignal:N,shouldHiddenComparePrice:I}};export{useGpPrice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as t,dataStringify as r,isLocalEnv as e,baseAssetURL as o}from"@gem-sdk/core";import{getStaticLocale as p,getSettingPreloadData as
|
|
1
|
+
import{template as t,dataStringify as r,isLocalEnv as e,baseAssetURL as o}from"@gem-sdk/core";import{getStaticLocale as p,getSettingPreloadData as s}from"../../../helpers.js";import i from"../../../text/components/Text.liquid.js";import{createAttr as l,createClass as d,createStateOrContext as u,LiquidUnless as c,If as m}from"@gem-sdk/system";import{getTextProps as a}from"./common/helpers.js";let ProductTitle=n=>{let{setting:$,builderProps:f}=n,g=`<p>${p("ProductTitle","product_not_found")}</p>`,k=()=>i(a(n)),P=l({href:"{{ product.url }}",title:"{{ product.title }}"}),j=$?.linkProduct,S=d({"gp-product-title-link-wrapper":!0}),T=u({setting:{linkProduct:$?.linkProduct},uid:f?.uid}),h=()=>{let t=e?"{{ 'gp-product-title-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-title-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`};return c("product",`${g}`,t`
|
|
2
2
|
<gp-product-title
|
|
3
3
|
gp-data='${r(T)}'
|
|
4
4
|
>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as t,baseAssetURL as
|
|
2
|
-
${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:
|
|
3
|
-
${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,
|
|
1
|
+
import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiveValueByScreen as o}from"@gem-sdk/core";import a from"../../../text/components/Text.liquid.js";import n from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as _,If as $}from"@gem-sdk/system";import{getAttrs as g}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as S,getDropdownGroupData as P}from"./common/main/getData.js";import{getWrapVariantOptionClass as b}from"./common/variants/classes.js";import{getStyleOfObject as A}from"../../helpers/function.js";import{getMarginBottomStyle as D}from"./common/variants/styles.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as V}from"./OptionVariantsOldFormat.liquid.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=E=>{let{builderProps:O,styles:T,setting:x,advanced:q}=E,{align:F,swatchItemWidth:G,dropdownItemWidth:C,swatchSpacing:I,optionTypo:k,marginBottom:L}=T??{},{label:J,optionType:z,showAsSwatches:M,layout:U,hasPreSelected:W}=x??{},R=q?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:Y}=O??{},H="groupOption"===z,K=()=>{let e={};return i.forEach(t=>{let s=o(G,t);e[t]="auto"===s}),e},Q=()=>{let e={};return i.forEach(t=>{e[t]=C?.[t]==="fill"}),e},B=x?.variantPresets?d(x?.variantPresets,T):[],X=B?.map(e=>({...e,presets:{[e.optionType]:e.presets[e.optionType]}})),Z={...x,variantPresets:X},ee=e=>{let t={"'":"'",'"':"""},s=e;for(let i in t)e.indexOf(i)>=0&&(s=s.replaceAll(i,t[i]));return s},et=()=>x?.variantPresets?.map(e=>`${ee(e.optionName)}($2)${e.optionType}`).join("($1)"),es=()=>x?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),ei=({showDropdown:t,isRenderDefault:s,typeOfOption:i})=>e`
|
|
2
|
+
${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:i,activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...Z,swatchAutoWidth:K(),optionTypo:k,isRenderDefault:s}))}
|
|
3
|
+
${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,eo=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:ei,variantPresetsLiquid:eo??""},en=m(j(F)),er=c(h(I,I)),ep=S(E,"Liquid"),el=m(b(U,F)),ed=()=>e`
|
|
4
4
|
${v(`{%- assign presets = "${et()}" | split: '($1)' -%}`)}
|
|
5
|
-
${v(`{% assign hiddenPresetOptions = "${
|
|
5
|
+
${v(`{% assign hiddenPresetOptions = "${es()}" | split: ',' %}`)}
|
|
6
6
|
|
|
7
7
|
${v(`{% assign all_option_names = options | map: 'name' %}
|
|
8
8
|
{% assign filtered_options_string = '' %}
|
|
@@ -33,7 +33,7 @@ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiv
|
|
|
33
33
|
<div
|
|
34
34
|
option-name="{{option.name | escape}}"
|
|
35
35
|
class="${el} ${_("hiddenPresetOptions contains option.name","gp-hidden")}"
|
|
36
|
-
style="${
|
|
36
|
+
style="${A(D(L))}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
|
|
37
37
|
>
|
|
38
38
|
${v("{%- assign showVariantClass = 'variant-display' -%}")}
|
|
39
39
|
${v("{%- assign optionName = option.name -%}")}
|
|
@@ -45,7 +45,7 @@ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiv
|
|
|
45
45
|
<div
|
|
46
46
|
variant-option-name="{{option.name | escape}}"
|
|
47
47
|
class="${en}"
|
|
48
|
-
style="${
|
|
48
|
+
style="${A(er)}"
|
|
49
49
|
>
|
|
50
50
|
${v("{%- assign values = option.values -%}")}
|
|
51
51
|
${v("{%- assign rootForloop = forloop.index0 -%}")}
|
|
@@ -59,16 +59,16 @@ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiv
|
|
|
59
59
|
{%- endif -%}
|
|
60
60
|
`)}
|
|
61
61
|
${$(!W,v("{%- assign selectedValue = null -%}"),"")}
|
|
62
|
-
${$(M,em(),
|
|
62
|
+
${$(M,em(),ei({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
63
63
|
</div>
|
|
64
64
|
</div>`)}
|
|
65
65
|
`,em=()=>e`
|
|
66
66
|
${_("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ea),V(ea))}
|
|
67
|
-
`,ec=m(w(F)),eu=
|
|
67
|
+
`,ec=m(w(F)),eu=P(E),ev=()=>`
|
|
68
68
|
<div className="${ec}">
|
|
69
69
|
${p(eu)}
|
|
70
70
|
</div>
|
|
71
|
-
`,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${
|
|
71
|
+
`,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${s}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
72
72
|
${v("{%- assign total_combinations = 1 -%}")}
|
|
73
73
|
${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
74
74
|
<gp-product-variants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatMoney as
|
|
1
|
+
import{convertDecimalToNumber as t,formatMoney as e}from"@gem-sdk/core";import{DiscountType as n}from"../components/constants/product-bundle.js";let noDiscount=t=>({discountPercentAmount:0,discountAmount:e("0",t)}),applyBundleDiscountAmount=o=>{let{currentVariant:u,bundleItem:c,options:r}=o;if(!r?.useProductCompareAtPrice&&c?.discountType===n.NoDiscount||!c||!u?.price)return noDiscount(r?.moneyFormat||"${{amount}}");let i=t(u?.price)??0,a=t(u?.salePrice)??i,m=Number(c?.quantity),s=calculateBundleFixedDiscount(i,c),d=discountPercentAmount(s,m*i),l=i*m-s,p=a*m;return a<=i&&s<=0?noDiscount(r?.moneyFormat||"${{amount}}"):{discountPercentAmount:r?.useProductCompareAtPrice?calculateDiffPercentPrice(l,p):d,discountAmount:r?.useProductCompareAtPrice?calculateDiffFixedPrice(l,p,r?.moneyFormat):e(s.toString(),r?.moneyFormat)}},calculateDiffPercentPrice=(t,e)=>{let n=(e-t)/e*100;return Math.round(n)},calculateDiffFixedPrice=(t,n,o)=>e((n-t).toString(),o),calculateBundleFixedDiscount=(t,e)=>{let o=parseInt(e?.discountValue);return e?.discountType===n.Percentage?t*e.quantity*o/100:e?.discountType===n.FixedAmount?o:0},discountPercentAmount=(t,e)=>Math.round(t/e*100);export{applyBundleDiscountAmount};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let horizontalThree=[{advanced:{},childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{
|
|
1
|
+
let horizontalThree=[{advanced:{},childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{},hasBoxShadow:{desktop:{normal:!1}},left:{desktop:"0px"},op:{desktop:"100%"},pos:{desktop:"relative"},right:{desktop:"0px"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"8px"}}},z:{desktop:1}},label:"Product Badge",settings:{contentType:"text",displayContent:"SALE {percent_discount}",translate:"displayContent",displayTrigger:[{conditionType:"exact_or_above",from:"1",priority:0,quantityType:"exact_or_above",to:"15",triggerEvent:"inventory_status",type:"in_stock"}],image:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"},positionWithImage:"outside",shape:"horizontal_rectangle"},styles:{align:{desktop:"left"},badgeColorV2:{desktop:"#FF614C"},borderRadius:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"custom"},hasShadow:!1,imageSize:{desktop:{disableShapeLinked:!0,height:"auto",shape:"original",shapeLinked:!0,width:"20%"}},position:{desktop:{bottomGap:"0",leftGap:"0",placement:"top-left",rightGap:"0",topGap:"0"}},shapeShadow:{angle:90,blur:"12px",color:"#121212",distance:"4px",spread:"0px",type:"shadow-1"},textColor:"text-3",textSize:{desktop:{disableShapeLinked:!0,gap:"",height:"Auto",hiddenShape:!0,padding:{bottom:"8px",left:"12px",right:"12px",top:"8px"},shape:"custom",shapeLinked:!1,width:"100%"}},typo:{attrs:{color:"text-3"},custom:{fontSize:{desktop:"15px"}},type:"paragraph-1"},textSizeV2:{desktop:{width:"100%",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},tag:"ProductBadge",uid:"gXAaVIfN3P",childrens:[]},{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}"},hasBoxShadow:{desktop:{normal:!1}},op:{desktop:"100%"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{}}}},label:"Image",settings:{image:{height:1678,src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237},imageLink:{link:"",target:"_self"},isAdaptive:!0,isNotLazyload:!1,priority:!1,quality:70,srcSet:{desktop:{height:240,src:"https://cdn.shopify.com/s/files/1/0617/5296/7323/files/gempages_516637113702155432-d6e2c48e-485d-4db2-a00e-9fe3bde2c3d5.png",storage:"FILE_CONTENT",width:241}}},styles:{align:{desktop:"center"},borderImg:{normal:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!1,width:"1px 1px 1px 1px"}},borderRadius:{radiusType:"none"},boxShadowImg:{normal:{angle:90,blur:"12px",color:"rgba(0, 0, 0, 0.20)",distance:"4px",spread:"0px",type:"shadow-1"}},hasActiveShadow:!1,hasBoxShadowImg:{normal:!1},objectFit:{desktop:"cover"},opacity:{normal:0},opacityColor:{normal:"#242424"},shadow:{angle:40,blur:"12px",color:"rgba(18, 18, 18, 0.77)",distance:"10px",spread:"10px",type:"custom"},shape:{desktop:{gap:"",height:"",shape:"original",shapeLinked:!0,width:"100%"}},wrapperBorder:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!0,position:"all",width:"1px 1px 1px 1px"}},tag:"Image",uid:"gdzIKI_0T_"},{childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"bundle-title",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{bold:!0,color:"#121212"},type:"subheading-2"}},tag:"Text",uid:"gn1nFyt3q6"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"<p>Deluxe choice</p>",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{color:"#121212"},type:"paragraph-1"}},tag:"Text",uid:"gRom-20zjM"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[{childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"}},defaultPresetConfig:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"},"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"},animation:{desktop:{enabled:!1,trigger:"appear",triggerConfig:{appear:{animation:"fade",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!0,easing:"ease-out",zoomDirection:"in",scale:{in:[80,100],out:[120,100]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}},hover:{animation:"none",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!1,easing:"ease-out",zoomDirection:"in",scale:{in:[100,120],out:[100,80]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}}}}},priceType:"compare"}}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gzjaV2bhnA"},{childrens:[{childrens:[],label:"Product Price",settings:{hasOnlyDefaultVariant:!1},styles:{color:{normal:"#242424"},hasTextShadow:{normal:!1},lineColor:"text-1",lineThrough:!0,priceType:"regular",textAlign:{desktop:"right"},textShadow:{normal:{type:"shadow-1"}},thickness:1,typo:{type:"subheading-2"}},tag:"ProductPrice",uid:"gPxDKeAt0Y"}],label:"Block",settings:{},tag:"Col",uid:"gaMYmxtRAS"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"center"},inlineAlignment:"start",layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[6,6],display:"fit"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!1,mobile:!1,tablet:!1},preloadBgImage:!1,verticalGutter:{desktop:"8px"},width:{desktop:"100%"}},tag:"Row",uid:"gQvPWxec6X"}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gY3R2wmMlG"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"space-between"},inlineAlignment:"start",layout:{desktop:{cols:[12],display:"fill"},mobile:{cols:[12],display:"fill"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!0,mobile:!0,tablet:!0},preloadBgImage:!1,verticalGutter:{desktop:"16px"},width:{}},tag:"Row"}];export{horizontalThree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let horizontalTwo=[{childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{
|
|
1
|
+
let horizontalTwo=[{childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{},hasBoxShadow:{desktop:{normal:!1}},left:{desktop:"0px"},op:{desktop:"100%"},pos:{desktop:"relative"},right:{desktop:"0px"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"8px"}}},z:{desktop:1}},label:"Product Badge",settings:{contentType:"text",displayContent:"SALE {percent_discount}",translate:"displayContent",displayTrigger:[{conditionType:"exact_or_above",from:"1",priority:0,quantityType:"exact_or_above",to:"15",triggerEvent:"inventory_status",type:"in_stock"}],image:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"},positionWithImage:"outside",shape:"horizontal_rectangle"},styles:{align:{desktop:"left"},badgeColorV2:{desktop:"#FF614C"},borderRadius:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"custom"},hasShadow:!1,imageSize:{desktop:{disableShapeLinked:!0,height:"auto",shape:"original",shapeLinked:!0,width:"20%"}},position:{desktop:{bottomGap:"0",leftGap:"0",placement:"top-left",rightGap:"0",topGap:"0"}},shapeShadow:{angle:90,blur:"12px",color:"#121212",distance:"4px",spread:"0px",type:"shadow-1"},textColor:"text-3",textSize:{desktop:{disableShapeLinked:!0,gap:"",height:"Auto",hiddenShape:!0,padding:{bottom:"8px",left:"12px",right:"12px",top:"8px"},shape:"custom",shapeLinked:!1,width:"100%"}},typo:{attrs:{color:"text-3"},custom:{fontSize:{desktop:"15px"}},type:"paragraph-1"},textSizeV2:{desktop:{width:"100%",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},tag:"ProductBadge",uid:"gXAaVIfN3P",childrens:[]},{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}"},hasBoxShadow:{desktop:{normal:!1}},op:{desktop:"100%"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{}}}},label:"Image",settings:{image:{height:1678,src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237},imageLink:{link:"",target:"_self"},isAdaptive:!0,isNotLazyload:!1,priority:!1,quality:70,srcSet:{desktop:{height:240,src:"https://cdn.shopify.com/s/files/1/0617/5296/7323/files/gempages_516637113702155432-b286a16e-98e6-48ba-889d-a36b64249436.png",storage:"FILE_CONTENT",width:241}}},styles:{align:{desktop:"center"},borderImg:{normal:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!1,width:"1px 1px 1px 1px"}},borderRadius:{radiusType:"none"},boxShadowImg:{normal:{angle:90,blur:"12px",color:"rgba(0, 0, 0, 0.20)",distance:"4px",spread:"0px",type:"shadow-1"}},hasActiveShadow:!1,hasBoxShadowImg:{normal:!1},objectFit:{desktop:"cover"},opacity:{normal:0},opacityColor:{normal:"#242424"},shadow:{angle:40,blur:"12px",color:"rgba(18, 18, 18, 0.77)",distance:"10px",spread:"10px",type:"custom"},shape:{desktop:{shape:"original",shapeLinked:!0}},wrapperBorder:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!0,position:"all",width:"1px 1px 1px 1px"}},tag:"Image",uid:"gRq0Y_6o_C"},{childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"bundle-title",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{bold:!0,color:"#121212"},type:"subheading-2"}},tag:"Text",uid:"gZCW_UZNgX"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"<p>Great value</p>",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{color:"#121212"},type:"paragraph-1"}},tag:"Text",uid:"gXozhYepEX"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[{childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"}},defaultPresetConfig:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-1"},lineThrough:!0,thickness:2,lineColor:"text-1",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"},"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"},animation:{desktop:{enabled:!1,trigger:"appear",triggerConfig:{appear:{animation:"fade",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!0,easing:"ease-out",zoomDirection:"in",scale:{in:[80,100],out:[120,100]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}},hover:{animation:"none",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!1,easing:"ease-out",zoomDirection:"in",scale:{in:[100,120],out:[100,80]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}}}}},priceType:"compare"}}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gU7z9j0jbp"},{childrens:[{childrens:[],label:"Product Price",settings:{priceType:"regular",hasOnlyDefaultVariant:!1},styles:{color:{normal:"#242424"},hasTextShadow:{normal:!1},lineColor:"text-1",lineThrough:!0,textAlign:{desktop:"right"},textShadow:{normal:{type:"shadow-1"}},thickness:1,typo:{type:"subheading-2"}},tag:"ProductPrice",uid:"gP9Tq9YUJq"}],label:"Block",settings:{},tag:"Col",uid:"gEOSPx4VOT"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"center"},inlineAlignment:"start",layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[6,6],display:"fit"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!1,mobile:!1,tablet:!1},preloadBgImage:!1,verticalGutter:{desktop:"8px"},width:{desktop:"100%"}},tag:"Row",uid:"gVq8mfQa7w"}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gM8gt27sCy"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"space-between"},inlineAlignment:"start",layout:{desktop:{cols:[12],display:"fill"},mobile:{cols:[12],display:"fill"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!0,mobile:!0,tablet:!0},preloadBgImage:!1,verticalGutter:{desktop:"16px"},width:{}},tag:"Row"}];export{horizontalTwo};
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "12.0.0-staging.
|
|
3
|
+
"version": "12.0.0-staging.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "12.0.0-staging.
|
|
29
|
+
"@gem-sdk/core": "12.0.0-staging.10",
|
|
30
30
|
"@gem-sdk/styles": "12.0.0-staging.0",
|
|
31
31
|
"@gem-sdk/system": "12.0.0-staging.0",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|