@gem-sdk/components 19.1.0-dev.5 → 19.1.0-dev.7
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/accordion/next.js +1 -1
- package/dist/cjs/article/components/ArticleContent.js +2 -2
- package/dist/cjs/article/components/ArticleExcerpt.js +1 -1
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/index.js +1 -1
- package/dist/cjs/article/next.js +1 -1
- package/dist/cjs/breadcrumb/next.js +1 -1
- package/dist/cjs/button/next.js +1 -1
- package/dist/cjs/carousel/next.js +1 -1
- package/dist/cjs/carousel-v3/next.js +1 -1
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/cart/next.js +1 -1
- package/dist/cjs/code/next.js +1 -1
- package/dist/cjs/collection/next.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/countdown-timer/next.js +1 -1
- package/dist/cjs/coupon/next.js +1 -1
- package/dist/cjs/dialog/index.js +1 -1
- package/dist/cjs/dialog/next.js +1 -1
- package/dist/cjs/estimate-delivery/next.js +1 -1
- package/dist/cjs/form/next.js +1 -1
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -1
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/header/index.js +1 -1
- package/dist/cjs/header/next.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/hero-banner/next.js +1 -1
- package/dist/cjs/icon/next.js +1 -1
- package/dist/cjs/icon-list/next.js +1 -1
- package/dist/cjs/icon-list-hoz/next.js +1 -1
- package/dist/cjs/icon-list-v2/next.js +1 -1
- package/dist/cjs/image/common/const.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image-comparison/next.js +1 -1
- package/dist/cjs/image-detection/next.js +1 -1
- package/dist/cjs/input/next.js +1 -1
- package/dist/cjs/line/next.js +1 -1
- package/dist/cjs/link/next.js +1 -1
- package/dist/cjs/marquee/next.js +1 -1
- package/dist/cjs/menu/next.js +1 -1
- package/dist/cjs/modal/next.js +1 -1
- package/dist/cjs/pagination/next.js +1 -1
- package/dist/cjs/post-purchase/advanced-list/next.js +1 -1
- package/dist/cjs/post-purchase/button/next.js +1 -1
- package/dist/cjs/post-purchase/buyer-consent/next.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/components/CalloutBox.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/next.js +1 -1
- package/dist/cjs/post-purchase/countdown-timer/next.js +1 -1
- package/dist/cjs/post-purchase/image/next.js +1 -1
- package/dist/cjs/post-purchase/line/next.js +1 -1
- package/dist/cjs/post-purchase/link/next.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/FeatureImage.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/next.js +1 -1
- package/dist/cjs/post-purchase/text/next.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/utils/injectBadgeStateExtras.js +1 -0
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +5 -5
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +10 -10
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list-v3/constants/index.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
- package/dist/cjs/product/components/product-quick-view/ProductQuickView.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductQuery.js +1 -0
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/radio/next.js +1 -1
- package/dist/cjs/select/next.js +1 -1
- package/dist/cjs/shop-pay-installment/next.js +1 -1
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/sticky/index.js +1 -1
- package/dist/cjs/sticky/next.js +1 -1
- package/dist/cjs/stock-counter/next.js +1 -1
- package/dist/cjs/tab/next.js +1 -1
- package/dist/cjs/textarea/next.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party-instant/next.js +1 -1
- package/dist/cjs/third-party-slot/next.js +1 -1
- package/dist/cjs/video/next.js +1 -1
- package/dist/esm/accordion/next.js +1 -1
- package/dist/esm/article/components/ArticleContent.js +2 -2
- package/dist/esm/article/components/ArticleExcerpt.js +1 -1
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/index.js +1 -1
- package/dist/esm/article/next.js +1 -1
- package/dist/esm/breadcrumb/next.js +1 -1
- package/dist/esm/button/next.js +1 -1
- package/dist/esm/carousel/next.js +1 -1
- package/dist/esm/carousel-v3/next.js +1 -1
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/cart/next.js +1 -1
- package/dist/esm/code/next.js +1 -1
- package/dist/esm/collection/next.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/countdown-timer/next.js +1 -1
- package/dist/esm/coupon/next.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/dialog/next.js +1 -1
- package/dist/esm/estimate-delivery/next.js +1 -1
- package/dist/esm/form/next.js +1 -1
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -1
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/header/index.js +1 -1
- package/dist/esm/header/next.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/hero-banner/next.js +1 -1
- package/dist/esm/icon/next.js +1 -1
- package/dist/esm/icon-list/next.js +1 -1
- package/dist/esm/icon-list-hoz/next.js +1 -1
- package/dist/esm/icon-list-v2/next.js +1 -1
- package/dist/esm/image/common/const.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image-comparison/next.js +1 -1
- package/dist/esm/image-detection/next.js +1 -1
- package/dist/esm/input/next.js +1 -1
- package/dist/esm/line/next.js +1 -1
- package/dist/esm/link/next.js +1 -1
- package/dist/esm/marquee/next.js +1 -1
- package/dist/esm/menu/next.js +1 -1
- package/dist/esm/modal/next.js +1 -1
- package/dist/esm/pagination/next.js +1 -1
- package/dist/esm/post-purchase/advanced-list/next.js +1 -1
- package/dist/esm/post-purchase/button/next.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/next.js +1 -1
- package/dist/esm/post-purchase/callout-banner/components/CalloutBox.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/callout-banner/next.js +1 -1
- package/dist/esm/post-purchase/countdown-timer/next.js +1 -1
- package/dist/esm/post-purchase/image/next.js +1 -1
- package/dist/esm/post-purchase/line/next.js +1 -1
- package/dist/esm/post-purchase/link/next.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/FeatureImage.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/next.js +1 -1
- package/dist/esm/post-purchase/text/next.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +15 -15
- package/dist/esm/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +12 -12
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +12 -12
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list-v3/constants/index.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
- package/dist/esm/product/components/product-quick-view/ProductQuickView.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductQuery.js +1 -0
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/radio/next.js +1 -1
- package/dist/esm/select/next.js +1 -1
- package/dist/esm/shop-pay-installment/next.js +1 -1
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/sticky/index.js +1 -1
- package/dist/esm/sticky/next.js +1 -1
- package/dist/esm/stock-counter/next.js +1 -1
- package/dist/esm/tab/next.js +1 -1
- package/dist/esm/textarea/next.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party-instant/next.js +1 -1
- package/dist/esm/third-party-slot/next.js +1 -1
- package/dist/esm/video/next.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLiquid as i,makeStyleResponsive as r,DEVICES as l,getResponsiveValueByScreen as a,cloneDeep as s}from"@gem-sdk/core";import{getDynamicSourceLocales as o,createSettingId as n}from"../../helpers.js";import{Image as g}from"../settings/configs/translate.js";import{REGEX_IS_NON_RESIZABLE_IMAGE as c}from"./const.js";let
|
|
1
|
+
import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLiquid as i,makeStyleResponsive as r,DEVICES as l,getResponsiveValueByScreen as a,cloneDeep as s}from"@gem-sdk/core";import{getDynamicSourceLocales as o,createSettingId as n}from"../../helpers.js";import{Image as g}from"../settings/configs/translate.js";import{REGEX_IS_NON_RESIZABLE_IMAGE as c,REGEX_IS_NON_RESIZABLE_IMAGE_BY_QUERY as d}from"./const.js";let u=t=>{let i={...t},r=!0;return i&&Object.keys(i??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=i[e]??{};"0px"!==t&&(r=!1)}}),r?e(i):{}},m=({styles:e,setting:i})=>{let{srcSet:r,image:l}=i??{},{customAspectRadio:a,shape:s}=e??{},o={desktop:f({device:"desktop",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.desktop:l,custom:a}),tablet:f({device:"tablet",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.tablet:l,custom:a}),mobile:f({device:"mobile",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.mobile:l,custom:a})};return s?t(s):o},f=({device:e,aspect:t,custom:i,auto:r})=>{let l=t?.[e];return"auto"===l?r?.height?`${r.width}/${r.height}`:void 0:"custom"===l?i?.[e]?.height?`${i?.[e]?.width}/${i?.[e]?.height}`:void 0:l},p=({layout:e,isDisableObjectFit:t})=>t?{}:r("objf",e),h=({isDisableAspectStyle:e,aspectRatio:t,objectFits:i,width:r,height:a})=>{if(e)return{};let s={};return l.forEach(e=>{let l=`--objf${"desktop"!==e?`-${e}`:""}`,o=i?.[l]||i?.["--objf"];if(t?.[e]==="auto"&&"contain"===o){s[e]="auto";return}s[e]=t?.[e]!=="auto"&&t?.[e]?t[e]:`${r}/${a}`}),s},b=e=>JSON.stringify(e||{}).replace(/"/g,"""),A=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="g-${e}-${t}">
|
|
4
4
|
<stop stop-color="rgba(51, 51, 51, 0)" offset="20%" />
|
|
@@ -9,4 +9,4 @@ import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLi
|
|
|
9
9
|
<rect width="${e}" height="${t}" fill="rgba(51, 51, 51, 0)" />
|
|
10
10
|
<rect id="r" width="${e}" height="${t}" fill="url(#g-${e}-${t})" />
|
|
11
11
|
<animate xlink:href="#r" attributeName="x" from="-${e}" to="${e}" dur="1s" repeatCount="indefinite" />
|
|
12
|
-
</svg>`,
|
|
12
|
+
</svg>`,w=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),$=(e,t)=>`data:image/svg+xml;base64,${w(A(e,t))}`,_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",S="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",E={DEFAULT_SIZES:"100vw",DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH_PROPS:800,DEFAULT_HEIGHT_PROPS:533},x=e=>{let{srcSet:t,fallbackImg:i}=e;return{getDeviceSource:e=>{let{isLiquid:r}=e??{},l=R(t?.desktop,"desktop",!r)||i||S,a=R(t?.tablet,"tablet",!r)||R(t?.desktop,"tablet",!r)||i||S,s=R(t?.mobile,"mobile",!r)||R(t?.tablet,"mobile",!r)||R(t?.desktop,"mobile",!r)||i||S;return{srcTablet:a,srcMobile:s,srcDesktop:l}}}},I=({setting:e,uid:t,pageContext:i})=>{if(!e||!g)return{};let r=s(e);for(let e in r.srcSet){let l=r.srcSet[e];if(l&&l.src){let r=o({val:l.src,uid:t,settingId:g?.srcSet?.id?`${g.srcSet.id}_${e}_src`:"",pageContext:i??{}});l.src=String(r)}}let l=o({val:r.alt,uid:t,settingId:n({id:g?.alt?.id}),pageContext:i??{}});r.alt=String(l);let a=o({val:r.title,uid:t,settingId:n({id:g?.title?.id}),pageContext:i??{}});return r.title=String(a),r},k=(e,t,i)=>e?C(e,t):F(i),v=e=>c.test(e),y=e=>d.test(e),C=(e,t)=>{let i=T(e);return v(e)?"FILE_CONTENT"==t?`{{ '${i}' | file_url }} 768w, {{ '${i}' | file_url }} 1024w, {{ '${i}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${i}' | file_img_url: '768x' }} 768w, {{ '${i}' | file_img_url: '1024x' }} 1024w, {{ '${i}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x' }} 768w, {{ '${e}' | asset_img_url: '1024x' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},F=e=>e,R=(e,t,r)=>{if(e?.metafieldDefinitionKey)return N(e?.metafieldDefinitionKey);let l=e?.backupFilePath??e?.src??"";if(r)l=e?.src||"";else{let t=e?.src??"";if(i(t))return t;if(e?.backupFileKey){let t=j(e.backupFileKey,e?.src??"");"THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(l=`{{ "${T(t)}" | file_url }}`):l=`{{ "${t}" | asset_url }}`}}if(t&&l?.includes("cdn.shopify")&&!y(l))switch(t){case"tablet":l=l?.includes("?")?`${l}&width=1024`:`${l}?width=1024`;break;case"mobile":l=l?.includes("?")?`${l}&width=768`:`${l}?width=768`}return l},N=e=>`{{${e} | file_url}}`,T=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),j=(e,t)=>{let i=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return i&&i!=e?i:e};function L(e,t){let i=D({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(v(i))return i;let r=D({str:i,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return r}let D=e=>{let t=e.str,i=e.str.match(e.reg)?.length;if(i){let r,l=1;for(;null!==(r=e.reg.exec(e.str));){if(l===i){let i=e.reg.lastIndex,l=i-r[0].length;e.isAdd&&(e.newString="_"+e.newString+r),t=t.slice(0,l)+e.newString+t.slice(i,t.length)}l++}}return t},W=(e,t)=>{let i=z(),r=t?.[i]||"auto";if("auto"===r||r.includes("%"))return e;let l=Number(r.replace("px",""));return l>e?e:Number(r.replace("px",""))},O=e=>{let{itemWidthParam:t,imageWidthSetting:i,qualityType:r,qualityPercent:l}=e,s=z(),o=W(t,i),n=a(r,s,"finest"),g=a(l,s,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*o)||1;case"medium":return Math.round(o)||1;case"custom":return Math.round(o*(Number(g)/100))||1}},B=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},K=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},P=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},U=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},G=e=>{let{shapeByLayout:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),s=K(t),o=P(l);a.forEach(e=>{q({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},M=e=>{let{ftShape:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),s=B(t),o=U(l);a.forEach(e=>{q({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},q=e=>{let{item:t,settingWidth:i,width:r,qualityType:l,qualityPercent:a}=e,s=z(),o=t.querySelector("img");if(o){let e=O({itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}),t=o.getAttribute("base-src");if(!t)return;let n=H(e,t),g=Q(t,n,s);o.setAttribute("srcset",g)}},H=(e,t)=>"auto"===e?t:L(t,`${e}x`),Q=(e,t,i)=>`${"mobile"===i&&e!==t?t:L(e,"768x")} 767w, ${"tablet"===i&&e!==t?t:L(e,"1024x")} 1023w, ${"desktop"===i&&e!==t?t:L(e,"1920x")} 1440w`,z=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";export{S as FALLBACK_IMAGE,_ as IMAGE_PLACEHOLDER,E as NEXT_IMAGE_CONFIG,f as composeAspectRatio,$ as createBlurDataURL,x as getAdaptiveImageData,m as getAspectRatio,h as getAspectRatioNextImage,z as getCurrentDevice,R as getImageSrc,O as getImageWidthFollowByQuality,j as getNewBackupFileKey,p as getResponsiveObjectFit,I as getSettingTranslatedImageAndSeo,k as getSrcSet,M as handleSetSrcForFeatureProductImage,G as handleSetSrcForProductImageList,v as isCannotResizeImage,y as isCannotResizeImageByQuery,u as overwriteDefaultRadius,T as replaceBackupFileKeyFileContent,L as resizeImage,b as safeStringify,A as shimmer,w as toBase64};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let r=o(()=>import("./components/ImageComparison.js"),{loading:m});var t={ImageComparison:r};export{t as default};
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let r=o(()=>import("./components/ImageComparison.js"),{loading:m});var t={ImageComparison:r};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/ImageDetection.js"),{loading:t});var e={ImageDetection:m};export{e as default};
|
package/dist/esm/input/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Input.js"),{loading:t});var r={Input:m};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Input.js"),{loading:t});var r={Input:m};export{r as default};
|
package/dist/esm/line/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Line.js"),{loading:m});var r={Line:t};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Line.js"),{loading:m});var r={Line:t};export{r as default};
|
package/dist/esm/link/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/next-link/index.js"),{loading:m});var n={Link:t};export{n as default};
|
package/dist/esm/marquee/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Marquee.js"),{loading:m}),e=o(()=>import("./components/MarqueeItem.js"),{loading:m});var r={Marquee:t,MarqueeItem:e};export{r as default};
|
package/dist/esm/menu/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Menu.js"),{loading:m});var r={Menu:t};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Menu.js"),{loading:m});var r={Menu:t};export{r as default};
|
package/dist/esm/modal/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Modal.js"),{loading:m});var r={Modal:t};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Modal.js"),{loading:m});var r={Modal:t};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Pagination.js"),{loading:t});var
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Pagination.js"),{loading:t});var n={Pagination:m};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/AdvancedListPostPurchase.js"),{loading:t}),s=o(()=>import("./components/PostPurchaseAdvancedListItem.js"),{loading:t});var e={PostPurchaseAdvancedList:m,PostPurchaseAdvancedListItem:s};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Button.js"),{loading:t});var r={PostPurchaseButton:m};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/Button.js"),{loading:t});var r={PostPurchaseButton:m};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/BuyerConsent.js"),{loading:t});var r={PostPurchaseBuyerConsent:m};export{r as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as o}from"react/jsx-runtime";import{createClass as m,createStyle as r}from"@gem-sdk/system";import"react";import"@gem-sdk/core";import t from"../../../grid/components/row/Row.js";import{getCalloutBoxWrapperClasses as
|
|
2
|
+
import{jsx as o}from"react/jsx-runtime";import{createClass as m,createStyle as r}from"@gem-sdk/system";import"react";import"@gem-sdk/core";import"../../../common/const.js";import t from"../../../grid/components/row/Row.js";import{getCalloutBoxWrapperClasses as s}from"../common/classes.js";import{getCalloutBoxContainerStyles as e}from"../common/styles.js";let i=i=>{let{styles:c}=i,l=m(s(c)),p=r(e(c));return o("div",{className:l,style:p,children:o(t,{...i})})};export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@gem-sdk/system";import"react";import"@gem-sdk/core";import"next/head";import"next/image";import"next/link";import"react-youtube";import"./common/styles.js";import t from"./settings/CalloutBox.js";import o from"./settings/CalloutText.js";let e={PostPurchaseCalloutBox:t,PostPurchaseCalloutText:o};export{e as postPurchaseCalloutBoxSetting};
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/system";import"react";import"@gem-sdk/core";import"../../common/const.js";import"next/head";import"next/image";import"next/link";import"react-youtube";import"./common/styles.js";import t from"./settings/CalloutBox.js";import o from"./settings/CalloutText.js";let e={PostPurchaseCalloutBox:t,PostPurchaseCalloutText:o};export{e as postPurchaseCalloutBoxSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/CalloutBox.js"),{loading:t}),r=o(()=>import("./components/CalloutText.js"),{loading:t});var
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/CalloutBox.js"),{loading:t}),r=o(()=>import("./components/CalloutText.js"),{loading:t});var n={PostPurchaseCalloutBox:m,PostPurchaseCalloutText:r};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/PostPurchaseCountdownTimer.js"),{loading:t});var r={PostPurchaseCountdownTimer:m};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import m from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Image.js"),{loading:m});var r={PostPurchaseImage:t};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import m from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let t=o(()=>import("./components/Image.js"),{loading:m});var r={PostPurchaseImage:t};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/PostPurchaseLine.js"),{loading:t});var r={PostPurchaseLine:m};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/PostPurchaseLink.js"),{loading:t});var r={PostPurchaseLink:m};export{r as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import t from"./ImageListCarousel.js";import{createStyle as o}from"@gem-sdk/system";import{useFeatureImagePostPurchase as r}from"../../hooks/useFeatureImagePostPurchase.js";import{useSlideCarousel as s}from"../../hooks/useSlideCarousel.js";import{getFeatureImageStyle as i}from"../../common/styles.js";let m=m=>{let{styles:a,setting:
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import t from"./ImageListCarousel.js";import{createStyle as o}from"@gem-sdk/system";import{useFeatureImagePostPurchase as r}from"../../hooks/useFeatureImagePostPurchase.js";import{useSlideCarousel as s}from"../../hooks/useSlideCarousel.js";import{getFeatureImageStyle as i}from"../../common/styles.js";let m=m=>{let{styles:a,setting:u,gallery:l}=m,n={...u,...a},{ftNavigation:p="none",ftSpacing:c="xtight",layoutType:d,ftAspectRatio:g,ftObjectFit:f,ftWidth:j}=n,{idxActive:h}=r({gallery:l}),{itemSlideList:v}=s({layoutType:d}),x=o(i({ftWidth:j}));return e("div",{style:x,children:e(t,{...m,productImages:l,aspectRatio:g,objectFit:f,spacing:c,navigation:p,vertical:!1,border:"none",itemPerSlide:v,idxActive:h,type:"feature-image"})})};export{m as default};
|
package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as o}from"react/jsx-runtime";import{createClass as r}from"@gem-sdk/system";import{useNavigationCarouselPostPurchase as s}from"../../../hooks/useNavigationCarouselPostPurchase.js";import{getNavigationClass as e}from"../../../common/classes.js";let t=t=>{let{type:m,navigation:a,vertical:i,hidden:l=!1}=t,{imgSrc:
|
|
2
|
+
import{jsx as o}from"react/jsx-runtime";import{createClass as r}from"@gem-sdk/system";import{useNavigationCarouselPostPurchase as s}from"../../../hooks/useNavigationCarouselPostPurchase.js";import{getNavigationClass as e}from"../../../common/classes.js";let t=t=>{let{type:m,navigation:a,vertical:i,hidden:l=!1,carouselType:n,productImages:c}=t,{imgSrc:u,handleClick:p,disabled:d}=s({type:m,vertical:i,productImages:c,carouselType:n}),f=r(e());return"none"===a||l?null:o("button",{className:f,disabled:d,onClick:p,children:o("img",{src:u,alt:`gp-arrow-${m}`})})};export{t as ArrowPostPurchase};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useEffect as r}from"react";import{postPurchaseSpacing as t}from"../../../../common/helper.js";import{createClass as m,createStyle as s}from"@gem-sdk/system";import{ArrowPostPurchase as
|
|
2
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useEffect as r}from"react";import{postPurchaseSpacing as t}from"../../../../common/helper.js";import{createClass as m,createStyle as s}from"@gem-sdk/system";import{ArrowPostPurchase as a}from"./Arrow.js";import{CarouselPostPurchase as i}from"./CarouselPostPurchase.js";import{useCarousel as p}from"../../../hooks/useCarousel.js";import{getImageListClass as c}from"../../../common/classes.js";import{getImageListStyle as n}from"../../../common/styles.js";let l=({styles:l,setting:u,productImages:d,objectFit:f="cover",aspectRatio:g,itemPerSlide:h=1,spacing:j,navigation:v="none",vertical:y=!1,border:P="none",idxActive:x,type:b})=>{let C={...l,...u},{layoutType:I}=C||{},{setMoveToIdx:k,setMaxIdx:w}=p(),N=t[j||"none"]??"0px",R="one-col"===I,T=m(c()),A=s(n({gap:N,vertical:y}));return r(()=>{let e=d.length-Number(h||0);w(e)},[d.length,h,w]),r(()=>{(x||0===x)&&1===h&&k(x)},[x,h,k]),e("div",{className:T,style:A,children:[o(a,{type:"prev",productImages:d,navigation:v,carouselType:b,vertical:y,hidden:R}),o(i,{productImages:d,itemPerRow:h,border:P,aspectRatio:g,objectFit:f,vertical:y}),o(a,{type:"next",productImages:d,navigation:v,carouselType:b,vertical:y,hidden:R})]})};export{l as CarouselWrapperPostPurchase};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import t from"../ImageListGrid.js";import i from"../ImageListCarousel.js";import{createClass as r}from"@gem-sdk/system";import{useProductImagePostPurchase as o}from"../../../hooks/useProductImagePostPurchase.js";import{getOnlyFeatureLayoutClass as m}from"../../../common/classes.js";let
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import t from"../ImageListGrid.js";import i from"../ImageListCarousel.js";import{createClass as r}from"@gem-sdk/system";import{useProductImagePostPurchase as o}from"../../../hooks/useProductImagePostPurchase.js";import{getOnlyFeatureLayoutClass as m}from"../../../common/classes.js";let s=s=>{let{setting:a,styles:l,gallery:c}=s,p={...a,...l},{isImageListCarousel:g}=o({imageList:c,setting:a}),d=r(m());return e("div",{className:d,children:g?e(i,{...s,productImages:c,aspectRatio:p?.ilAspectRatio,objectFit:p.ilObjectFit,spacing:p.ilSpacing,navigation:p?.ilNavigation,vertical:p?.layoutType!=="bottom-center",border:p?.ilBorder,itemPerSlide:p?.ilItemPerSlide,type:"images-list"}):e(t,{...s,productImages:c})})};export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as o,Fragment as t}from"react/jsx-runtime";import{createElement as e}from"react";import r from"../../../../../common/components/Loading.js";import"@gem-sdk/core";import{getProductOfferContainerClasses as m,getProductOfferWrapperClasses as s}from"../common/classes.js";import{createClass as
|
|
2
|
+
import{jsx as o,Fragment as t}from"react/jsx-runtime";import{createElement as e}from"react";import r from"../../../../../common/components/Loading.js";import"@gem-sdk/core";import"../../../../../common/const.js";import{getProductOfferContainerClasses as m,getProductOfferWrapperClasses as s}from"../common/classes.js";import{createClass as c,createStyle as a}from"@gem-sdk/system";import{getWrapperStyles as d,getContainerStyles as i}from"../common/styles.js";import{useProductOfferData as l}from"../hooks/useProductOfferData.js";import{ProductOfferItem as n}from"./ProductOfferItem.js";let p=p=>{let{styles:f,builderAttrs:u,builderProps:h,setting:j}=p,{isLoading:P,productSortedById:y,totalProduct:g}=l(),k=c({...m(h?.uid)}),v=c({...s()}),x=a({...d(f)}),O=a({...i(j)});return o(t,{children:P?o(r,{}):y?.length?o("div",{...u,className:k,style:O,children:o("div",{className:v,style:x,children:y?.map((o,t)=>e(n,{...p,product:o,index:t,key:t,totalProduct:g}))})}):o("div",{children:"You haven't set up a product yet. Please go back to the sales funnel details to add a product."})})};export{p as default};
|
package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as r}from"react/jsx-runtime";import{useRenderMode as
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{useRenderMode as t,isEmptyChildren as e,ProductProvider as o}from"@gem-sdk/core";import{useRef as i}from"react";import"../../../../../common/const.js";import m from"../../../../../grid/components/row/Row.js";import s from"../../../../../grid/components/ChildrenDroppable.js";import{createAttr as n,createClass as c}from"@gem-sdk/system";import{getProductOfferAttrs as d}from"../common/attrs.js";import{getProductOfferItemClasses as l}from"../common/classes.js";import{ProductOfferSubscriptionPresenceProvider as a}from"../context/PrdOfferSubscriptionPresenceContext.js";let f=f=>{let{product:p,setting:u,builderProps:j,children:h,index:b,totalProduct:g,builderAttrs:y,styles:x}=f,{isEditMode:I}=t(),{variantSelected:O,productOfferLayout:k,layout:v,...P}=u??{};Object.keys(v||{}).forEach(r=>{k?.[r]==="2col"&&v?.[r]&&(v[r].display="fill")});let w=O?.[p?.baseID??""]?.variantId,C=n({...d(p,j?.uid)}),D=c({...l(b,u,g)}),R=i(null),A=r("div",{ref:R,...I&&C,children:r(m,{builderAttrs:y,setting:{...P,layout:v},styles:x,children:e(h)?r(s,{}):h})});return r("div",{className:D,children:r(o,{product:p,readOnly:!0,initialVariantId:w??"Latest",uid:j?.uid,children:r(a,{containerRef:R,children:A})})},`uid-${p?.id}`)};export{f as ProductOfferItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{BUTTON_URL_MAP_POST_PURCHASE as
|
|
1
|
+
import{useMemo as e}from"react";import{BUTTON_URL_MAP_POST_PURCHASE as t}from"../constants/index.js";import{useCarousel as r}from"./useCarousel.js";import{useProductStore as o}from"@gem-sdk/core";let a=a=>{let{moveToIdx:s,maxIdx:i,setMoveToIdx:l}=r(),m=o(e=>e.setProductFeaturedImage),{type:u,vertical:n}=a,c="next"==u?s>=i:0===s,d=e(()=>t[u][n?"vertical":"horizontal"][c?"disabled":"enabled"],[u,n,c]);return{imgSrc:d,handleClick:()=>{let e="next"===u?s+1:s-1;if(l(e),"feature-image"===a.carouselType){let t=a.productImages?.[e];t&&m(t)}},disabled:c}};export{a as useNavigationCarouselPostPurchase};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"react";import"./components/product-subscription/types.js";import"./constants/index.js";import"./components/product-variant/components/variants/VariantItem.js";import"next/link";import"next/head";import"next/image";import"react-youtube";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import"../image/components/Img.js";import t from"./settings/product-title/ProductTitle.js";import o from"./settings/product-description/ProductDescription.js";import r from"./settings/product-price/ProductPrice.js";import s from"./settings/product-variants/ProductVariant.js";import i from"./settings/accept-button/index.js";import e from"./settings/product-quantity/index.js";import c from"./settings/product-offer/index.js";import n from"./settings/product-price-breakdown/index.js";import p from"./settings/product-discount-tag/ProductDiscountTag.js";import u from"./settings/product-subscription/index.js";import m from"./settings/product-image/ProductImages.js";let P={PostPurchaseProductTitle:t,PostPurchaseProductDescription:o,PostPurchaseProductPrice:r,PostPurchaseProductVariants:s,PostPurchaseAcceptButton:i,PostPurchaseProductQuantity:e,PostPurchaseProductPriceBreakdown:n,PostPurchaseProductOffer:c,PostPurchaseProductDiscountTag:p,PostPurchaseProductImages:m,PostPurchaseProductSubscription:u};export{P as postPurchaseProductSetting};
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"react";import"./components/product-subscription/types.js";import"./constants/index.js";import"./components/product-variant/components/variants/VariantItem.js";import"next/link";import"../../common/const.js";import"next/head";import"next/image";import"react-youtube";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import"../image/components/Img.js";import t from"./settings/product-title/ProductTitle.js";import o from"./settings/product-description/ProductDescription.js";import r from"./settings/product-price/ProductPrice.js";import s from"./settings/product-variants/ProductVariant.js";import i from"./settings/accept-button/index.js";import e from"./settings/product-quantity/index.js";import c from"./settings/product-offer/index.js";import n from"./settings/product-price-breakdown/index.js";import p from"./settings/product-discount-tag/ProductDiscountTag.js";import u from"./settings/product-subscription/index.js";import m from"./settings/product-image/ProductImages.js";let P={PostPurchaseProductTitle:t,PostPurchaseProductDescription:o,PostPurchaseProductPrice:r,PostPurchaseProductVariants:s,PostPurchaseAcceptButton:i,PostPurchaseProductQuantity:e,PostPurchaseProductPriceBreakdown:n,PostPurchaseProductOffer:c,PostPurchaseProductDiscountTag:p,PostPurchaseProductImages:m,PostPurchaseProductSubscription:u};export{P as postPurchaseProductSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let n=o(()=>import("./components/ProductTitle.js"),{loading:t}),r=o(()=>import("./components/ProductDescription.js"),{ssr:!1,loading:t}),i=o(()=>import("./components/ProductPrice.js"),{loading:t}),c=o(()=>import("./components/product-variant/components/ProductVariant.js"),{loading:t}),
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let n=o(()=>import("./components/ProductTitle.js"),{loading:t}),r=o(()=>import("./components/ProductDescription.js"),{ssr:!1,loading:t}),i=o(()=>import("./components/ProductPrice.js"),{loading:t}),c=o(()=>import("./components/product-variant/components/ProductVariant.js"),{loading:t}),m=o(()=>import("./components/AcceptButton.js"),{loading:t}),p=o(()=>import("./components/ProductQuantity.js"),{loading:t}),s=o(()=>import("./components/product-subscription/ProductSubscription.js"),{loading:t}),e=o(()=>import("./components/ProductPriceBreakdown.js"),{loading:t}),d=o(()=>import("./components/product-offer/components/ProductOffer.js"),{loading:t}),a=o(()=>import("./components/ProductDiscountTag.js"),{loading:t}),u=o(()=>import("./components/product-image/index.js"),{loading:t});var g={PostPurchaseProductTitle:n,PostPurchaseProductDescription:r,PostPurchaseProductPrice:i,PostPurchaseProductVariants:c,PostPurchaseAcceptButton:m,PostPurchaseProductQuantity:p,PostPurchaseProductPriceBreakdown:e,PostPurchaseProductOffer:d,PostPurchaseProductDiscountTag:a,PostPurchaseProductImages:u,PostPurchaseProductSubscription:s};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Text.js"),{loading:t}),
|
|
1
|
+
import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/Text.js"),{loading:t}),r=o(()=>import("./components/Text.js"),{loading:t});var e={PostPurchaseText:m,PostPurchaseHeading:r};export{e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useI18nStore as m,useProduct as o,useCurrentVariant as t,useMoneyFormat as r,useCurrentDevice as i,useProductBundleDiscount as l,useEditorMode as
|
|
2
|
+
import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useI18nStore as m,useProduct as o,useCurrentVariant as t,useMoneyFormat as r,useCurrentDevice as i,useProductBundleDiscount as l,useEditorMode as c,useRenderMode as a,usePageType as n,useSafeGetProductListSettings as d,filterToolbarPreview as p}from"@gem-sdk/core";import{getBadgeContent as h,getIsNoDiscountState as y}from"./utils/common.js";import"./constants.js";import f from"../../../common/components/NoDataState.js";import N from"../../../common/components/TooltipHover.js";import"../../../common/const.js";import{createClass as j,createStyle as u,createAttr as g,If as v}from"@gem-sdk/system";import{getEditTooltipAttrs as T,getSubWrapperAttrs as k,getContainerAttrs as x,getTextContentAttrs as C,getImageAttr as H}from"./common/attrs.js";import{getContainerClasses as S,getWrapperClasses as b,getSubWrapperClass as w,getTextContainerClasses as A,getTextWrapperClasses as B,getTextContentClasses as D,getImageContainerClasses as I,getImageClasses as M}from"./common/classes.js";import{getContainerStyle as P,getSubWrapperStyle as q,getContentStyleInternal as z,getTextBadgeWrapperStyles as E,getTextContentStyle as F,getImageContainerStyles as G}from"./common/styles.js";let J=J=>{let{t:K}=m(),{setting:L,styles:O,children:Q,builderAttrs:R,...U}=J,V=o(),W=t(),{moneyFormat:X}=r(),Y=i(),{useProductCompareAtPrice:Z}=l(),$=U?.["bundle-item"],_=c(),{isEditMode:ee}=a(),es="STATIC"===n(),{settings:em}=d(),eo=em?.sameHeight,et=h({detail:V,currentVariant:W,bundleItem:$,useProductCompareAtPrice:Z},L?.displayContent,X),er=y({props:J,product:V,currentVariant:W,moneyFormat:X,useProductCompareAtPrice:Z}),ei=j({...S({mode:_,isInstant:es,product:V,currentVariant:W,props:J,isSameHeightInProductList:eo})}),el=u({...P(J)}),ec=g({...T(J,ee)}),ea=j({...b(J)}),en=j({...w(J,Y)}),ed=u({...q({props:J,product:V,currentVariant:W,isEditMode:ee})}),ep=g({...k(J,V)}),eh=z(J),ey=j({...A()}),ef=g({...x(J)}),eN=j({...B()}),ej=u({...E({setting:L,styles:O})}),eu=j({...D(O)}),eg=u({...F({setting:L,styles:O})}),ev=g({...C()}),eT=j({...I()}),ek=u({...G({setting:L,styles:O})}),ex=j({...M()}),eC=g({...H({setting:L})});return V?e("div",{...ef,style:el,className:ei,children:[v(ee&&er,s(N,{...ec,children:s(f,{...R,elementType:"secondary",description:K("No discount"),rawMode:!0})}),s("div",{className:ea,children:e("div",{...ep,className:en,style:ed,children:[s("style",{children:eh}),v(L?.shape!=="image",s("div",{className:ey,children:s("div",{className:eN,style:ej,children:s("pre",{...ev,className:eu,style:eg,children:et})})}),s("div",{className:eT,style:ek,children:s("img",{...eC,className:ex,alt:""})}))]})})),p(Q,!0)]}):null};export{J as default};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{sanitizeLiquid as
|
|
1
|
+
import{sanitizeLiquid as t,RenderIf as e,template as s,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as a,getSettingPreloadData as o}from"../../../helpers.js";import{generateBadgeContent as n}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as c}from"./utils/renderBadgeLiquid.js";import{createClass as d,createStyle as p,createAttr as l,createStateOrContext as m}from"@gem-sdk/system";import{IS_LIQUID as u}from"./constants.js";import{getContainerStyle as g,getSubWrapperStyle as y,getContentStyleInternal as $,getTextBadgeWrapperStyles as v,getTextContentStyle as f,getImageContainerStyles as j}from"./common/styles.js";import{getContainerClasses as P,getWrapperClasses as S,getSubWrapperClass as D,getTextContainerClasses as V,getTextWrapperClasses as b,getTextContentClasses as h,getImageContainerClasses as C,getImageClasses as E}from"./common/classes.js";import{getSubWrapperAttrs as I,getContainerAttrs as L,getTextContentAttrs as k,getImageAttr as q}from"./common/attrs.js";import{checkDiscountContentProductBadge as B}from"./utils/common.js";import{injectBadgeStateExtras as K}from"./utils/injectBadgeStateExtras.js";import{ProductBadge as T}from"../../settings/product-badge/configs/translate.js";let _=_=>{let{styles:A,setting:N,builderProps:Q,pageContext:w}=_,x=N?.shape!=="image",G=x&&N?.displayContent?.trim()==="",H=B(N?.displayContent),O=d({...P({isInstant:!1,props:_})}),J=p({...g(_,u)}),M=d({...S(_)}),R=d({...D(_)}),Y=p({...y({props:_})}),z=l({...I(_)}),F=$(_),U=d({...V()}),W=l({...L(_)}),X=d({...b()}),Z=p({...v({setting:N,styles:A})}),tt=d({...h(A)}),te=p({...f({setting:N,styles:A})}),ts=l({...k()}),ti=d({...C()}),tr=p({...j({setting:N,styles:A})}),ta=d({...E()}),to=l({...q({setting:N})}),tn=m({minPrice:"{{ minPriceValue | escape }}",variantIDs:"{{ product.variants | map: 'id' | json | escape }}",variantInventoryQuantities:"{{ product.variants | map: 'inventory_quantity' | json | escape }}",amountDiscount:"{{ amountDiscountValue | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:N?.displayTrigger??[],uid:_.builderProps?.uid,productCreatedAt:"{{ product.created_at | date: '%Y-%m-%d' }}",isTextBadge:x,isSettingSameHeightProductList:"{{ isSettingSameHeightProductList }}"}),tc=K(JSON.stringify(tn)),{displayContent:td}=N??{},tp=a({val:td?.trim(),uid:Q?.uid,settingId:T?.displayContent?.id,isLiquid:!0,pageContext:w});return s`
|
|
2
2
|
{% if product %}
|
|
3
|
-
${n(
|
|
4
|
-
${
|
|
3
|
+
${n(tp,w?.isPreviewing)}
|
|
4
|
+
${c(N?.displayTrigger,!G,H)}
|
|
5
5
|
<gp-product-badge
|
|
6
6
|
${{...W}}
|
|
7
|
-
class="${
|
|
8
|
-
style="${
|
|
9
|
-
data-display-content="${
|
|
7
|
+
class="${O} {{ className }}"
|
|
8
|
+
style="${J}"
|
|
9
|
+
data-display-content="${w?.isPreviewing?tp:t(`{{${tp}}}`)}"
|
|
10
10
|
>
|
|
11
|
-
<script gp-data type="application/json">${
|
|
11
|
+
<script gp-data type="application/json">${tc}</script>
|
|
12
12
|
<div class="${M}">
|
|
13
13
|
<div
|
|
14
14
|
${{...z}}
|
|
@@ -16,24 +16,24 @@ import{sanitizeLiquid as e,dataStringify as t,RenderIf as s,template as i,isLoca
|
|
|
16
16
|
style="${Y}"
|
|
17
17
|
>
|
|
18
18
|
<style>${F}</style>
|
|
19
|
-
${
|
|
19
|
+
${e(x,s`
|
|
20
20
|
<div class="${U}">
|
|
21
21
|
<div
|
|
22
22
|
class="${X}"
|
|
23
23
|
style="${Z}"
|
|
24
24
|
>
|
|
25
25
|
<pre
|
|
26
|
-
${{...
|
|
27
|
-
class="${
|
|
28
|
-
style="${
|
|
26
|
+
${{...ts}}
|
|
27
|
+
class="${tt}"
|
|
28
|
+
style="${te}"
|
|
29
29
|
>{{ content | replace: percentDiscountKey, percentDiscountValue | replace: amountDiscountKey, amountDiscountValue | replace: inventoryQuantityKey, inventoryQuantityValue | replace: minPriceKey, minPriceValue }}</pre>
|
|
30
30
|
</div>
|
|
31
|
-
</div>`,
|
|
32
|
-
<img ${{...
|
|
31
|
+
</div>`,s`<div class="${ti}" style="${tr}">
|
|
32
|
+
<img ${{...to}} class="${ta}" alt="" />
|
|
33
33
|
</div>`)}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
</gp-product-badge>
|
|
37
|
-
${
|
|
37
|
+
${e(i,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
38
38
|
{% endif %}
|
|
39
|
-
`};export{
|
|
39
|
+
`};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=t=>{let e=t.slice(0,-1);return`${e},"productTags":{{ product.tags | json }}}`};export{t as injectBadgeStateExtras};
|
|
@@ -133,7 +133,7 @@ import{CompareType as e}from"../types.js";let i=i=>i===e.ABOVE?0:i===e.BELOW?2:1
|
|
|
133
133
|
{% assign conditionTriggers = conditionTriggers | append: "," | append: false %}
|
|
134
134
|
{% endif %}
|
|
135
135
|
|
|
136
|
-
`},c=e=>{let{searchTag:i}=e,n=i.map(e=>e.replaceAll("'","&#
|
|
136
|
+
`},c=e=>{let{searchTag:i}=e,n=i.map(e=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll("'","'").replaceAll('"',""")).join(", ");return`
|
|
137
137
|
{% assign productTags = product.tags | escape %}
|
|
138
138
|
{% assign searchTag = '${n}' %}
|
|
139
139
|
{% for tag in productTags %}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import r from"../../../text/components/Text.js";import{createStyle as
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import"../../../common/const.js";import r from"../../../text/components/Text.js";import{createStyle as m,createClass as n,If as d}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=m(a(y)),C=m(p(y)),I=n(c(y)),E=n(u()),G=n(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:d(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" "," "),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" "," "),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as i,WrapRenderChildren as t,RenderChildren as r}from"@gem-sdk/core";import{getConditionRenderGalleryImages as s,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as n,getSettingPreloadData as c}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as y}from"./composables/getProductImagesStyles.js";import{createAttr as $,LiquidIf as h,createClass as j,If as v,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,N={...G,...D},A=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(
|
|
4
|
+
"pageContext": ${JSON.stringify(n(_))},
|
|
5
5
|
"setting":${JSON.stringify(G)},
|
|
6
6
|
"styles":${JSON.stringify(D)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
8
|
-
"product":{{ product | json }},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
|
-
"collection": {{ collection | json }}
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=
|
|
13
|
-
${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return
|
|
14
|
-
`;return
|
|
15
|
-
${
|
|
12
|
+
`,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=s(N?.position,G?.type),q=k?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(N),R=u({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>i`
|
|
13
|
+
${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return i`${r({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
|
+
`;return i`
|
|
15
|
+
${v(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${S(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
@@ -27,18 +27,18 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as t,R
|
|
|
27
27
|
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
28
|
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
29
|
>
|
|
30
|
-
${
|
|
31
|
-
${
|
|
30
|
+
${p({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
|
|
31
|
+
${v(!U,i`
|
|
32
32
|
<div
|
|
33
33
|
class="${J}"
|
|
34
34
|
style="${I(M)}"
|
|
35
35
|
${{...q}}
|
|
36
36
|
>
|
|
37
37
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
|
|
38
|
-
${
|
|
38
|
+
${v(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
42
42
|
</gp-product-images-v3>
|
|
43
|
-
${
|
|
43
|
+
${v(e,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
44
|
`};export{C as default};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as s,WrapRenderChildren as r,RenderChildren as i}from"@gem-sdk/core";import{getConditionRenderGalleryImages as t,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as n}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as j,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(D?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(c(_))},
|
|
5
5
|
"setting":${JSON.stringify(b)},
|
|
6
6
|
"styles":${JSON.stringify(G)},
|
|
7
7
|
"productUrl":{{product.url | json | escape}},
|
|
8
|
-
"product":{{product | json | escape}},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json | escape }},"handle":{{ product.handle | json | escape }},"media":{{ product.media | json | escape }}}{% else %}null{% endif %},
|
|
9
9
|
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
|
-
"collection": {{ collection | json | escape}}
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json | escape }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=
|
|
13
|
-
${
|
|
14
|
-
`;return
|
|
15
|
-
${
|
|
16
|
-
${
|
|
12
|
+
`,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=t(E?.position,b?.type),k=U?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(E),R=u({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>s`
|
|
13
|
+
${r({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return s`${i({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
|
|
14
|
+
`;return s`
|
|
15
|
+
${j(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${S(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
19
|
`)}
|
|
@@ -27,18 +27,18 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,R
|
|
|
27
27
|
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
28
|
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
29
|
>
|
|
30
|
-
${
|
|
31
|
-
${
|
|
30
|
+
${p({builderPropUID:`gp-carousel-${D?.uid}`,...E,children:W(),pageContext:_})}
|
|
31
|
+
${j(!B,s`
|
|
32
32
|
<div
|
|
33
33
|
class="${J}"
|
|
34
34
|
style="${I(M)}"
|
|
35
35
|
${{...k}}
|
|
36
36
|
>
|
|
37
37
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${D?.uid}`,...E,pageContext:_}))}
|
|
38
|
-
${
|
|
38
|
+
${j(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
42
42
|
</gp-product-images-v3>
|
|
43
|
-
${
|
|
43
|
+
${j(e,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
44
|
`};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs 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 s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as k,flattenConnection as I,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as y}from"../../../common/const.js";import O from"../SalePageProductListWarning.js";import S from"next/head";import C from"./ProductListGridLayout.js";import E from"./ProductListCarouselLayout.js";import{getStyle as N}from"./common/styles.js";import{If as w}from"@gem-sdk/system";import{getClass as L}from"./common/classes.js";import{getData as j}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let x=r(()=>import("../ProductNotFound.js"),{loading:d}),G=r=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=r,{isRelatedProduct:H,productSetting:Q}=j(r),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=c(),$=s(),_=n(),V=u(e=>e.dynamicProduct),q=u(e=>e.dynamicCollection),[U,J]=l(1),[K,X]=l(!0),[Y,Z]=l(),[ee,et]=l(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[y.Collection,y.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=y.DynamicCollection);let er=Q?.productSrc??y.Collection;er===y.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=m(),ei=u(e=>e.publicStoreFrontData),ea=i(()=>g(ei)?h(ei):el,[ei]),{data:ec}=p(H&&ed?ed:void 0,{revalidateOnMount:F||R},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ec?.tags||ec?.tags.length===0),en=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ec?.collections?.edges||ec?.collections.edges.length===0),eu=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ec?.vendor,em=f(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=P(er===y.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?b:void 0}),ep=i(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=k(er!==y.PickProduct?ep:void 0,{revalidateOnMount:eg});a(()=>{if(H&&ec&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(et(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Z({first:A?.numberOfProducts,vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ec?.vendor:"",idNEQ:ec.id});break;case"collection":{let t=ec?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ec.tags||0===ec.tags.length){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags},{nameNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags}]}]})}}},[ec,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let eP=er===y.PickProduct?eh.isValidating:ef.isValidating,eb=er===y.PickProduct?eh.isLoading:ef.isLoading,ek=er===y.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===y.PickProduct?I(eh.data?.products):I(eI?.products),ev=em?.data?.products?I(em?.data?.products):void 0,ey=H&&ev?ev:er===y.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==y.PickProduct?eT:eT.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eO=i(()=>ee&&H&&F||!ey.length&&!eb&&K&&F,[K,eb,ee,H,F,ey.length]),eS=i(()=>!ey||ee&&H,[ee,H,ey]),eC=i(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(A?.slidesToShow?.[$]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(A?.slidesToShow?.[$]??1)*(e+1)&&++e,{gridRow:`${1+U*e}/${U+1+U*e}`,marginBottom:e+1<t?W(M?.horizontalGutter,$):void 0}))},[A?.sameHeight,A?.slidesToShow,U,ey?.length,$,M?.horizontalGutter]),eE=i(()=>eP||eb||ek||!ey||ee&&H,[ek,eb,ee,H,eP,ey]);a(()=>{eE||setTimeout(()=>{let{builderData:e}=B??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&J(o.childElementCount||1)},F?0:500)},[B,eE,F]);let eN=i(()=>({collection:eI,products:ey,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:M?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:M?.horizontalGutter,verticalGutter:M?.verticalGutter,fullWidth:M?.fullWidth,spacing:M?.spacing,width:M?.width,height:M?.height}}),[eI,ey,A,M]);if(B?.isPreview&&eo)return e(t,{});if(eO)return e(t,{children:w(K,e(x,{builderAttrs:D,collectionHandle:eI?.handle,productSrc:er,onClose:()=>X(!1),children:G,relatedTagString:z,assignProductNoTags:es||en||eu,noAssignedProduct:!ed}))});let{productListWrapStyle:ew,productListContentStyle:eL,productListWrapAlignStyle:ej}=N(r),{productListWrapClass:eW}=L(r);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(S,{children:[!!M.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage.desktop.image.src,as:"image"}),!!M.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.tablet?.image?.src,as:"image"}),!!M.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||eb?e(d,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(T,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:w(M?.layout==="grid",e(C,{...r,productSortedById:ey,generateGridRowArray:eC}),e(E,{...r,productSortedById:ey}))})]})})}),v(G,!0)]})};export{G as default};
|