@gem-sdk/components 19.0.0-dev.8 → 19.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.
Files changed (82) hide show
  1. package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
  2. package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
  3. package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
  4. package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
  5. package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +1 -1
  6. package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
  7. package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
  8. package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
  9. package/dist/cjs/carousel-v3/index.js +1 -1
  10. package/dist/cjs/code/common/helpers.js +1 -0
  11. package/dist/cjs/code/components/CSSCode.js +1 -1
  12. package/dist/cjs/code/hooks/useCSSCode.js +4 -10
  13. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  14. package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
  15. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  16. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +12 -12
  17. package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
  18. package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
  19. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +5 -7
  20. package/dist/cjs/product/components/product-button/ProductButton.liquid.js +11 -8
  21. package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
  22. package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
  23. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
  24. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  25. package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +2 -2
  26. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
  27. package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +7 -7
  28. package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  29. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  30. package/dist/cjs/product/components/product-list/ProductList.liquid.js +9 -10
  31. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  32. package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +9 -10
  33. package/dist/cjs/product/components/product-list-v3/common/classes.js +1 -1
  34. package/dist/cjs/product/index.js +1 -1
  35. package/dist/cjs/third-party/components/EcomsendBackInStockAlert.js +1 -1
  36. package/dist/cjs/third-party/configs/EcomsendBackInStockAlert.js +1 -1
  37. package/dist/cjs/third-party/settings/EcomsendBackInStockAlert/index.js +4 -4
  38. package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
  39. package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
  40. package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
  41. package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
  42. package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +4 -4
  43. package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
  44. package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
  45. package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
  46. package/dist/esm/carousel-v3/index.js +1 -1
  47. package/dist/esm/code/common/helpers.js +1 -0
  48. package/dist/esm/code/components/CSSCode.js +1 -1
  49. package/dist/esm/code/hooks/useCSSCode.js +4 -10
  50. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  51. package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
  52. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  53. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
  54. package/dist/esm/product/components/product-badge/common/classes.js +1 -1
  55. package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
  56. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +3 -5
  57. package/dist/esm/product/components/product-button/ProductButton.liquid.js +11 -8
  58. package/dist/esm/product/components/product-button/common/helpers.js +1 -1
  59. package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
  60. package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
  61. package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  62. package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +2 -2
  63. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +2 -2
  64. package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +6 -6
  65. package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  66. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  67. package/dist/esm/product/components/product-list/ProductList.liquid.js +17 -18
  68. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  69. package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +17 -18
  70. package/dist/esm/product/components/product-list-v3/common/classes.js +1 -1
  71. package/dist/esm/product/index.js +1 -1
  72. package/dist/esm/third-party/components/EcomsendBackInStockAlert.js +1 -1
  73. package/dist/esm/third-party/configs/EcomsendBackInStockAlert.js +1 -1
  74. package/dist/esm/third-party/settings/EcomsendBackInStockAlert/index.js +4 -4
  75. package/dist/types/index.d.ts +5 -5
  76. package/package.json +5 -5
  77. package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +0 -2
  78. package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +0 -1
  79. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +0 -1
  80. package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +0 -2
  81. package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +0 -1
  82. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +0 -1
@@ -1,6 +1,6 @@
1
- import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as g}from"./common/helpers.js";let u=u=>{let{setting:p,styles:f,pageContext:m}=u,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:S,sortedBy:x,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:H,collectionHandle:I}=g(u),F=()=>i`
2
- ${e("RelatedProduct"===L,`
3
- assign relatedTag = '${H}'
1
+ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let g=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:A,productNumber:L,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>i`
2
+ ${e("RelatedProduct"===A,`
3
+ assign relatedTag = '${I}'
4
4
  assign assignProduct = product
5
5
  assign idAssignProduct = assignProduct.id
6
6
  paginate collections.all.products by 10000
@@ -95,7 +95,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
95
95
  assign products = products
96
96
  endpaginate
97
97
  `)}
98
- `,{productListWrapStyle:j,productListContentStyle:w,productListWrapAlignStyle:q}=c(u),{productListWrapClass:G}=l(u);return i`
98
+ `,{productListWrapStyle:w,productListContentStyle:H,productListWrapAlignStyle:q}=c(g),{productListWrapClass:G}=l(g);return i`
99
99
  ${e(s,`
100
100
  <script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>
101
101
  ${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height-v7-5.js' | asset_url }}" defer="defer"></script>`:""}
@@ -107,16 +107,16 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
107
107
  ${e(!!f?.preloadBgImage,`${e(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
108
108
  <div
109
109
  class="${G}"
110
- style="${j}"
110
+ style="${w}"
111
111
  >
112
112
  <div class='gp-flex gp-w-full' style="${q}">
113
113
  <div
114
- style="${w}"
114
+ style="${H}"
115
115
  >
116
116
  {%- assign gpBkProduct = product -%}
117
117
  {%- assign gpBkProducts = products -%}
118
- ${(()=>{let e=I?`
119
- assign target_collection = collections['${I}']
118
+ ${(()=>{let e=F?`
119
+ assign target_collection = collections['${F}']
120
120
  if target_collection == empty
121
121
  for collection in collections
122
122
  if collection.id == ${_}
@@ -134,13 +134,12 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
134
134
  endfor
135
135
  `;return i`
136
136
  {%- liquid
137
- assign productHandles = '${S.toString()}'| split: ','
137
+ assign productHandles = '${x.toString()}'| split: ','
138
138
  assign products = null
139
139
  assign target_collection = null
140
- assign productSrc = '${L}'
140
+ assign productSrc = '${A}'
141
141
  assign c = 0
142
- assign limit = ${A??4}
143
- assign isSettingSameHeightProductList = ${p?.sameHeight??!1}
142
+ assign limit = ${L??4}
144
143
 
145
144
  if request.page_type == 'collection' or preview_page_type == 'collection'
146
145
  assign target_collection = collection
@@ -152,11 +151,11 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
152
151
  endif
153
152
  endif
154
153
  paginate target_collection.products by ${E||4}
155
- assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
154
+ assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
156
155
  endpaginate
157
156
  else
158
157
  if productSrc == 'RelatedProduct'
159
- ${F()}
158
+ ${j()}
160
159
  elsif productSrc == 'PickProduct'
161
160
  unless ${y}
162
161
  assign products = null | sort
@@ -179,7 +178,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
179
178
  ${e}
180
179
  endif
181
180
  paginate target_collection.products by ${E||4}
182
- assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
181
+ assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
183
182
  endpaginate
184
183
  endif
185
184
  endif
@@ -188,14 +187,14 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
188
187
  ${i`
189
188
  {%- if products == null -%}
190
189
  {%- if count == 0 and ${k.length} == 0 -%}
191
- {% if '${L}' == 'RelatedProduct' -%}
190
+ {% if '${A}' == 'RelatedProduct' -%}
192
191
  <div>${o("ProductList","no_related_products")}</div>
193
192
  {% else %}
194
193
  <div>${o("ProductList","no_products_found")}</div>
195
194
  {%- endif -%}
196
195
  {%- endif -%}
197
196
  {%-else-%}
198
- ${r(v,i`${n({...u,productListId:k,productSrc:L})}`,i`${a({...u,productListId:k,productSrc:L})}`)}
197
+ ${r(v,i`${n({...g,productListId:k,productSrc:A})}`,i`${a({...g,productListId:k,productSrc:A})}`)}
199
198
  {%- endif -%}
200
199
  `}
201
200
  {%- assign product = gpBkProduct -%}
@@ -203,4 +202,4 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
203
202
  </div>
204
203
  </div>
205
204
  </div>
206
- `};export{u as default};
205
+ `};export{g as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as a,useEffect as i}from"react";import{useRenderMode as s,useCurrentDevice as c,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,useCollectionQuery as b,flattenConnection as k,ProductListProvider as I,filterToolbarPreview as T}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import v from"next/head";import O from"./ProductListGridLayout.js";import w 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 N}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let W=o(()=>import("../ProductNotFound.js"),{loading:d}),j=o=>{let{children:j,styles:x,builderProps:G,setting:A,builderAttrs:M}=o,{isRelatedProduct:B,productSetting:H}=N(o),Q=H.relatedTag&&H.relatedTag[0],{isEditMode:z,isPreviewSharePageMode:D}=s(),F=c(),R=n(),$=u(e=>e.dynamicProduct),_=u(e=>e.dynamicCollection),[V,q]=l(1),[U,J]=l(!0),[K,X]=l(),[Y,Z]=l(!1),ee="GP_FUNNEL_PAGE"===R;"GP_COLLECTION"==R&&(H.productSrc="DynamicCollection",H.collectionId=_?.collectionId??"latest");let et=H?.productSrc??"Collection",er=$?.productId&&$?.productId!==H.relatedProductId?$?.productId:H.relatedProductId,eo=m(),ed=u(e=>e.publicStoreFrontData),el=a(()=>g(ed)?h(ed):eo,[ed]),{data:ea}=p(B&&er?er:void 0,{revalidateOnMount:z||D},el),ei=H.relatedTag&&"tags"===H.relatedTag[0]&&(!ea?.tags||ea?.tags.length===0),es=H.relatedTag&&"collection"===H.relatedTag[0]&&(!ea?.collections?.edges||ea?.collections.edges.length===0),ec=H.relatedTag&&"vendor"===H.relatedTag[0]&&!ea?.vendor,en=f(K,{revalidateOnMount:z||D},el),eu=z||D,em=P("PickProduct"===et?H?.productIds:void 0,{revalidateOnMount:eu},{defaultSelectedProductCount:H?.numOfSelectedProducts}),eg=a(()=>({id:H?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[H?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),eh=b("PickProduct"!==et?eg:void 0,{revalidateOnMount:eu});i(()=>{if(B&&ea&&H.relatedTag&&"recommended-product"!==H.relatedType){let e;switch(Z(!1),H.hasRelatedExclude&&(e=H?.relatedExclude&&H.relatedExclude.split(",").map(e=>e.trim())),H.relatedTag[0]){case"vendor":X({first:A?.numberOfProducts,where:{vendor:H.relatedTag&&"vendor"===H.relatedTag[0]?ea?.vendor:"",idNEQ:ea.id}});break;case"collection":{let t=ea?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ea.tags||0===ea.tags.length){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags},{nameNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags}]}]}})}}},[ea,H.relatedType,H.relatedTag,A?.numberOfProducts,H.relatedExclude,H.hasRelatedExclude,B]);let ep="PickProduct"===et?em.isValidating:eh.isValidating,ef="PickProduct"===et?em.isLoading:eh.isLoading,eP="PickProduct"===et?em.error:eh.error,eb=eh.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?k(em.data?.products):k(eb?.products),eI=u(e=>e.assignedProductIds),eT=u(e=>e.isApplyAllProducts),ey=a(()=>(eI??[]).length>0&&!eT||eT,[eI,eT]),ev=en?.data?.products&&ey?k(en?.data?.products):[],eO=B?ev:"PickProduct"===et&&H?.productIds?.length?H?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(H?.numOfSelectedProducts??4)),ew=a(()=>Y&&B&&z||!eO.length&&!ef&&U&&z,[U,ef,Y,B,z,eO.length]),eS=a(()=>!eO||Y&&B,[Y,B,eO]),eC=a(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((eO?.length??0)/+(A?.slidesToShow?.[F]??1));return Array.from(Array(eO?.length??0)).map((r,o)=>(o>=+(A?.slidesToShow?.[F]??1)*(e+1)&&++e,{gridRow:`${1+V*e}/${V+1+V*e}`,marginBottom:e+1<t?L(x?.horizontalGutter,F):void 0}))},[A?.sameHeight,A?.slidesToShow,V,eO?.length,F,x?.horizontalGutter]),eE=a(()=>ep||ef||eP||!eO||Y&&B,[eP,ef,Y,B,ep,eO]),eN=ea?.collections?.edges.map(e=>e.node?.id)??[];i(()=>{eE||setTimeout(()=>{let{builderData:e}=G??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&q(r.childElementCount||1)},z?0:500)},[G,eE,z,eN]);let eL=a(()=>({collection:eb,products:eO,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:x?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:x?.horizontalGutter,verticalGutter:x?.verticalGutter,fullWidth:x?.fullWidth,spacing:x?.spacing,width:x?.width,height:x?.height}}),[eb,eO,A,x]);if(G?.isPreview&&ee)return e(t,{});if(ew)return e(t,{children:C(U,e(W,{builderAttrs:M,collectionHandle:eb?.handle,productSrc:et,onClose:()=>J(!1),children:j,relatedTagString:Q,assignProductNoTags:ei||es||ec,noAssignedProduct:!er}))});let{productListWrapStyle:eW,productListContentStyle:ej,productListWrapAlignStyle:ex}=S(o),{productListWrapClass:eG}=E(o);return r("div",{...M,className:eG,style:eW,children:[!!x?.preloadBgImage&&r(v,{children:[!!x.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage.desktop.image.src,as:"image"}),!!x.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.tablet?.image?.src,as:"image"}),!!x.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.mobile?.image?.src,as:"image"})]}),ep||ef?e(d,{}):eP?r("div",{children:["Error: ",eP?.message]}):eS?e("div",{children:"Products not found"}):e(I,{...eL,children:e("div",{className:"gp-flex gp-w-full",style:ex,children:r("div",{style:ej,children:[ee&&e(y,{}),e(t,{children:C(x?.layout==="grid",e(O,{...o,productSortedById:eO,generateGridRowArray:eC}),e(w,{...o,productSortedById:eO}))})]})})}),T(j,!0)]})};export{j as default};
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as a,useEffect as i}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,useCollectionQuery as b,flattenConnection as k,ProductListProvider as I,filterToolbarPreview as T}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import v from"next/head";import O from"./ProductListGridLayout.js";import w 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 N}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let W=o(()=>import("../ProductNotFound.js"),{loading:d}),j=o=>{let{children:j,styles:x,builderProps:G,setting:A,builderAttrs:M}=o,{isRelatedProduct:B,productSetting:Q}=N(o),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:D,isPreviewSharePageMode:F}=c(),H=s(),R=n(),$=u(e=>e.dynamicProduct),_=u(e=>e.dynamicCollection),[V,q]=l(1),[U,J]=l(!0),[K,X]=l(),[Y,Z]=l(!1),ee="GP_FUNNEL_PAGE"===R;"GP_COLLECTION"==R&&(Q.productSrc="DynamicCollection",Q.collectionId=_?.collectionId??"latest");let et=Q?.productSrc??"Collection",er=$?.productId&&$?.productId!==Q.relatedProductId?$?.productId:Q.relatedProductId,eo=m(),ed=u(e=>e.publicStoreFrontData),el=a(()=>g(ed)?h(ed):eo,[ed]),{data:ea}=p(B&&er?er:void 0,{revalidateOnMount:D||F},el),ei=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ea?.tags||ea?.tags.length===0),ec=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ea?.collections?.edges||ea?.collections.edges.length===0),es=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ea?.vendor,en=f(K,{revalidateOnMount:D||F},el),eu=D||F,em=P("PickProduct"===et?Q?.productIds:void 0,{revalidateOnMount:eu},{defaultSelectedProductCount:Q?.numOfSelectedProducts}),eg=a(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),eh=b("PickProduct"!==et?eg:void 0,{revalidateOnMount:eu});i(()=>{if(B&&ea&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(Z(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":X({first:A?.numberOfProducts,where:{vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ea?.vendor:"",idNEQ:ea.id}});break;case"collection":{let t=ea?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ea.tags||0===ea.tags.length){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags},{nameNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags}]}]}})}}},[ea,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,B]);let ep="PickProduct"===et?em.isValidating:eh.isValidating,ef="PickProduct"===et?em.isLoading:eh.isLoading,eP="PickProduct"===et?em.error:eh.error,eb=eh.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?k(em.data?.products):k(eb?.products),eI=u(e=>e.assignedProductIds),eT=u(e=>e.isApplyAllProducts),ey=a(()=>(eI??[]).length>0&&!eT||eT,[eI,eT]),ev=en?.data?.products&&ey?k(en?.data?.products):[],eO=B?ev:"PickProduct"===et&&Q?.productIds?.length?Q?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),ew=a(()=>Y&&B&&D||!eO.length&&!ef&&U&&D,[U,ef,Y,B,D,eO.length]),eS=a(()=>!eO||Y&&B,[Y,B,eO]),eC=a(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((eO?.length??0)/+(A?.slidesToShow?.[H]??1));return Array.from(Array(eO?.length??0)).map((r,o)=>(o>=+(A?.slidesToShow?.[H]??1)*(e+1)&&++e,{gridRow:`${1+V*e}/${V+1+V*e}`,marginBottom:e+1<t?L(x?.horizontalGutter,H):void 0}))},[A?.sameHeight,A?.slidesToShow,V,eO?.length,H,x?.horizontalGutter]),eE=a(()=>ep||ef||eP||!eO||Y&&B,[eP,ef,Y,B,ep,eO]),eN=ea?.collections?.edges.map(e=>e.node?.id)??[];i(()=>{eE||setTimeout(()=>{let{builderData:e}=G??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&q(r.childElementCount||1)},D?0:500)},[G,eE,D,eN]);let eL=a(()=>({collection:eb,products:eO,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:x?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent},styles:{horizontalGutter:x?.horizontalGutter,verticalGutter:x?.verticalGutter,fullWidth:x?.fullWidth,spacing:x?.spacing,width:x?.width,height:x?.height}}),[eb,eO,A,x]);if(G?.isPreview&&ee)return e(t,{});if(ew)return e(t,{children:C(U,e(W,{builderAttrs:M,collectionHandle:eb?.handle,productSrc:et,onClose:()=>J(!1),children:j,relatedTagString:z,assignProductNoTags:ei||ec||es,noAssignedProduct:!er}))});let{productListWrapStyle:eW,productListContentStyle:ej,productListWrapAlignStyle:ex}=S(o),{productListWrapClass:eG}=E(o);return r("div",{...M,className:eG,style:eW,children:[!!x?.preloadBgImage&&r(v,{children:[!!x.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage.desktop.image.src,as:"image"}),!!x.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.tablet?.image?.src,as:"image"}),!!x.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.mobile?.image?.src,as:"image"})]}),ep||ef?e(d,{}):eP?r("div",{children:["Error: ",eP?.message]}):eS?e("div",{children:"Products not found"}):e(I,{...eL,children:e("div",{className:"gp-flex gp-w-full",style:ex,children:r("div",{style:ej,children:[ee&&e(y,{}),e(t,{children:C(x?.layout==="grid",e(O,{...o,productSortedById:eO,generateGridRowArray:eC}),e(w,{...o,productSortedById:eO}))})]})})}),T(j,!0)]})};export{j as default};
@@ -1,6 +1,6 @@
1
- import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as g}from"./common/helpers.js";let u=u=>{let{setting:p,styles:f,pageContext:m}=u,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:S,sortedBy:x,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:H,collectionHandle:I}=g(u),F=()=>i`
2
- ${e("RelatedProduct"===L,`
3
- assign relatedTag = '${H}'
1
+ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let g=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:A,productNumber:L,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>i`
2
+ ${e("RelatedProduct"===A,`
3
+ assign relatedTag = '${I}'
4
4
  assign assignProduct = product
5
5
  assign idAssignProduct = assignProduct.id
6
6
  paginate collections.all.products by 10000
@@ -95,7 +95,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
95
95
  assign products = products
96
96
  endpaginate
97
97
  `)}
98
- `,{productListWrapStyle:j,productListContentStyle:w,productListWrapAlignStyle:q}=c(u),{productListWrapClass:G}=l(u);return i`
98
+ `,{productListWrapStyle:w,productListContentStyle:H,productListWrapAlignStyle:q}=c(g),{productListWrapClass:G}=l(g);return i`
99
99
  ${e(s,`
100
100
  <script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>
101
101
  ${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height-v7-5.js' | asset_url }}" defer="defer"></script>`:""}
@@ -107,16 +107,16 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
107
107
  ${e(!!f?.preloadBgImage,`${e(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
108
108
  <div
109
109
  class="${G}"
110
- style="${j}"
110
+ style="${w}"
111
111
  >
112
112
  <div class='gp-flex gp-w-full' style="${q}">
113
113
  <div
114
- style="${w}"
114
+ style="${H}"
115
115
  >
116
116
  {%- assign gpBkProduct = product -%}
117
117
  {%- assign gpBkProducts = products -%}
118
- ${(()=>{let e=I?`
119
- assign target_collection = collections['${I}']
118
+ ${(()=>{let e=F?`
119
+ assign target_collection = collections['${F}']
120
120
  if target_collection == empty
121
121
  for collection in collections
122
122
  if collection.id == ${_}
@@ -134,13 +134,12 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
134
134
  endfor
135
135
  `;return i`
136
136
  {%- liquid
137
- assign productHandles = '${S.toString()}'| split: ','
137
+ assign productHandles = '${x.toString()}'| split: ','
138
138
  assign products = null
139
139
  assign target_collection = null
140
- assign productSrc = '${L}'
140
+ assign productSrc = '${A}'
141
141
  assign c = 0
142
- assign limit = ${A??4}
143
- assign isSettingSameHeightProductList = ${p?.sameHeight??!1}
142
+ assign limit = ${L??4}
144
143
 
145
144
  if request.page_type == 'collection' or preview_page_type == 'collection'
146
145
  assign target_collection = collection
@@ -152,11 +151,11 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
152
151
  endif
153
152
  endif
154
153
  paginate target_collection.products by ${E||4}
155
- assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
154
+ assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
156
155
  endpaginate
157
156
  else
158
157
  if productSrc == 'RelatedProduct'
159
- ${F()}
158
+ ${j()}
160
159
  elsif productSrc == 'PickProduct'
161
160
  unless ${y}
162
161
  assign products = null | sort
@@ -179,7 +178,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
179
178
  ${e}
180
179
  endif
181
180
  paginate target_collection.products by ${E||4}
182
- assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
181
+ assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
183
182
  endpaginate
184
183
  endif
185
184
  endif
@@ -188,14 +187,14 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
188
187
  ${i`
189
188
  {%- if products == null -%}
190
189
  {%- if count == 0 and ${k.length} == 0 -%}
191
- {% if '${L}' == 'RelatedProduct' -%}
190
+ {% if '${A}' == 'RelatedProduct' -%}
192
191
  <div>${o("ProductList","no_related_products")}</div>
193
192
  {% else %}
194
193
  <div>${o("ProductList","no_products_found")}</div>
195
194
  {%- endif -%}
196
195
  {%- endif -%}
197
196
  {%-else-%}
198
- ${r(v,i`${n({...u,productListId:k,productSrc:L})}`,i`${a({...u,productListId:k,productSrc:L})}`)}
197
+ ${r(v,i`${n({...g,productListId:k,productSrc:A})}`,i`${a({...g,productListId:k,productSrc:A})}`)}
199
198
  {%- endif -%}
200
199
  `}
201
200
  {%- assign product = gpBkProduct -%}
@@ -203,4 +202,4 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
203
202
  </div>
204
203
  </div>
205
204
  </div>
206
- `};export{u as default};
205
+ `};export{g as default};
@@ -1 +1 @@
1
- import{createClass as e}from"@gem-sdk/system";let g=g=>{let{setting:t,className:s,builderProps:i,advanced:p,styles:r}=g,l=e({...s&&{[s]:!0},...p?.cssClass&&{[p.cssClass]:!0},"!gp-m-auto gp-grid gp-w-full":!0,"gp-grid-flow-row":t?.sameHeight}),a=e({"gp-relative gp-flex":!0,[`${i?.builderData?.uid}`]:!0}),d=e({"gp-contents":t?.sameHeight&&r?.layout==="grid"}),o=e({"gp-justify-center":!0,"gp-overflow-hidden":!t?.sameHeight}),m=e({"gp-contents [&>*>div]:gp-contents [&>*]:gp-grid-rows-[subgrid] [&>*]:gp-gap-y-0":t?.sameHeight&&r?.layout==="grid",[`gp-child-item-${i?.uid}`]:!0});return{gridLayoutClass:l,productItemClass:m,carouselClass:o,productListWrapClass:a,gpProductClass:d}};export{g as getClass};
1
+ import{createClass as e}from"@gem-sdk/system";let g=g=>{let{setting:t,className:i,builderProps:s,advanced:p,styles:r}=g,d=e({...i&&{[i]:!0},...p?.cssClass&&{[p.cssClass]:!0},"!gp-m-auto gp-grid gp-w-full":!0,"gp-grid-flow-row":t?.sameHeight}),l=e({"gp-relative gp-flex":!0,[`${s?.builderData?.uid}`]:!0}),a=e({"gp-contents":t?.sameHeight&&r?.layout==="grid"}),o=e({"gp-justify-center":!0,"gp-overflow-hidden":!t?.sameHeight}),m=e({"gp-contents [&>*>div]:gp-contents [&>*>div>div[gp-el-wrapper]]:gp-h-fit [&>*]:gp-grid-rows-[subgrid] [&>*]:gp-gap-y-0":t?.sameHeight&&r?.layout==="grid",[`gp-child-item-${s?.uid}`]:!0});return{gridLayoutClass:d,productItemClass:m,carouselClass:o,productListWrapClass:l,gpProductClass:a}};export{g as getClass};
@@ -1 +1 @@
1
- export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../carousel-v3/components/swiper/Swiper.js";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import m from"./settings/ProductImages.js";import c from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import p from"./settings/ProductDescription.js";import u from"./settings/ProductProperties.js";import d from"./settings/ProductTag.js";import a from"./settings/ProductListV3.js";import P from"./settings/ProductList.js";import g from"./settings/DynamicCheckout.js";import j from"./settings/Vendor.js";import f from"./settings/Sku.js";import l from"./components/product-bundle/setting/ProductBundleDiscount.js";import V from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import k from"./settings/ProductViewMore.js";import x from"./settings/ProductBadge.js";import b from"./components/file-upload/settings/index.js";let v={Product:t,ProductQuantity:o,ProductTitle:r,ProductButton:s,ProductPrice:i,ProductVariants:e,ProductImages:m,ProductImagesV2:n,ProductImagesV3:c,ProductDescription:p,ProductProperties:u,ProductTag:d,ProductListV3:a,ProductList:P,DynamicCheckout:g,ProductVendor:j,ProductSku:f,ProductBundleDiscount:l,ProductBundleDiscountItem:V,ProductViewMore:k,ProductBadge:x,FileUpload:b};export{v as productSetting};
1
+ export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import m from"./settings/ProductImages.js";import c from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import d from"./settings/ProductDescription.js";import p from"./settings/ProductProperties.js";import u from"./settings/ProductTag.js";import a from"./settings/ProductListV3.js";import P from"./settings/ProductList.js";import g from"./settings/DynamicCheckout.js";import j from"./settings/Vendor.js";import f from"./settings/Sku.js";import l from"./components/product-bundle/setting/ProductBundleDiscount.js";import V from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import k from"./settings/ProductViewMore.js";import x from"./settings/ProductBadge.js";import b from"./components/file-upload/settings/index.js";let y={Product:t,ProductQuantity:o,ProductTitle:r,ProductButton:s,ProductPrice:i,ProductVariants:e,ProductImages:m,ProductImagesV2:n,ProductImagesV3:c,ProductDescription:d,ProductProperties:p,ProductTag:u,ProductListV3:a,ProductList:P,DynamicCheckout:g,ProductVendor:j,ProductSku:f,ProductBundleDiscount:l,ProductBundleDiscountItem:V,ProductViewMore:k,ProductBadge:x,FileUpload:b};export{y as productSetting};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as r,Fragment as e}from"react/jsx-runtime";import{makeStyleResponsive as o}from"@gem-sdk/core";import t from"./ThirdPartyPreview.js";import c from"../configs/EcomsendBackInStockAlert.js";let i=()=>r(e,{children:r("div",{className:"gp-p-2",children:r(t,{setting:{label:"EcomSend Back in Stock Alert",iconSvg:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${c.logoUrl}">`}})})}),l=({setting:e})=>r("div",{style:{...o("ta",e?.align)},children:r(i,{})});export{l as default};
2
+ import{jsx as r,Fragment as e}from"react/jsx-runtime";import{makeStyleResponsive as o}from"@gem-sdk/core";import t from"./ThirdPartyPreview.js";import i from"../configs/EcomsendBackInStockAlert.js";let l=()=>r(e,{children:r("div",{className:"gp-p-2",children:r(t,{setting:{label:i.label,iconSvg:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${i.logoUrl}">`}})})}),c=({setting:e})=>r("div",{style:{...o("ta",e?.align)},children:r(l,{})});export{c as default};
@@ -1 +1 @@
1
- var e={id:"ecomsend-back-in-stock-alert",label:"EcomSend Back in Stock Alert",logoUrl:"https://cdn.shopify.com/app-store/listing_images/d4d2bcc6f71dda4f30b09bd429b37065/icon/CLeo2LeKhIsDEAE=.png?width=22&height=22",tag:"EcomsendBackInStockAlert"};export{e as default};
1
+ var o={id:"ecomsend-back-in-stock-alert",label:"Notify Me AI Back in Stock: SW",logoUrl:"https://cdn.shopify.com/s/files/1/2005/9307/files/SendWill_logo.png?v=1780629197",tag:"EcomsendBackInStockAlert"};export{o as default};
@@ -1,4 +1,4 @@
1
- import e from"../../configs/EcomsendBackInStockAlert.js";import t from"./uiV2.js";let l={tag:e.tag,label:e.label,icon:'<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/d4d2bcc6f71dda4f30b09bd429b37065/icon/CLeo2LeKhIsDEAE=.png?width=22&height=22">',editorConfigs:{placeholder:{flowTag:["Product"]},component:{isThirdParty:!0}},presets:[{id:e.id,name:e.label,hideTextContent:!0,icon:{desktop:`<div class="w-full flex flex-col items-center">
2
- <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/d4d2bcc6f71dda4f30b09bd429b37065/icon/CLeo2LeKhIsDEAE=.png?width=22&height=22">
3
- <span class="preset-item-title">EcomSend Back in Stock Alert</span>
4
- </div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Product Restore Email",value:"product-restore-email"}],default:"product-restore-email"},{id:"productId",label:"Product ID",type:"input"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"",appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"",appName:e.label},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:[],uiV2:t};export{l as default};
1
+ import e from"../../configs/EcomsendBackInStockAlert.js";import t from"./uiV2.js";import{get3rdPartyInstallLink as l}from"../../common/helpers.js";let o={tag:e.tag,label:e.label,icon:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${e.logoUrl}">`,editorConfigs:{placeholder:{flowTag:["Product"]},component:{isThirdParty:!0}},presets:[{id:e.id,name:e.label,hideTextContent:!0,icon:{desktop:`<div class="w-full flex flex-col items-center">
2
+ <img class="w-24 border border-dark-200 rounded-medium" src="${e.logoUrl}">
3
+ <span class="preset-item-title">${e.label}</span>
4
+ </div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Product Restore Email",value:"product-restore-email"}],default:"product-restore-email"},{id:"productId",label:"Product ID",type:"input"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:l({handle:"es-back-in-stock-notify-me"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/email-13",appName:e.label},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:[],uiV2:t};export{o as default};
@@ -877,7 +877,7 @@ type CarouselProps$1 = BasePropsWrap<CarouselSettingProps$1, CarouselStyleProps$
877
877
  isProductList?: boolean;
878
878
  thumbsSwiper?: string;
879
879
  productBadgeLiquid?: string;
880
- renderByLayout?: ObjectDevices<boolean>;
880
+ shouldInitByLayout?: ObjectDevices<boolean>;
881
881
  } & {
882
882
  rootId?: string;
883
883
  rootClass?: string;
@@ -930,7 +930,7 @@ declare const Carousel$3: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProp
930
930
  isProductList?: boolean;
931
931
  thumbsSwiper?: string;
932
932
  productBadgeLiquid?: string;
933
- renderByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
933
+ shouldInitByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
934
934
  } & {
935
935
  rootId?: string;
936
936
  rootClass?: string;
@@ -6417,7 +6417,7 @@ declare const _default$4: {
6417
6417
  isProductList?: boolean;
6418
6418
  thumbsSwiper?: string;
6419
6419
  productBadgeLiquid?: string;
6420
- renderByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
6420
+ shouldInitByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
6421
6421
  } & {
6422
6422
  rootId?: string;
6423
6423
  rootClass?: string;
@@ -6614,7 +6614,7 @@ declare const _default$3: {
6614
6614
  isProductList?: boolean;
6615
6615
  thumbsSwiper?: string;
6616
6616
  productBadgeLiquid?: string;
6617
- renderByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
6617
+ shouldInitByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
6618
6618
  } & {
6619
6619
  rootId?: string;
6620
6620
  rootClass?: string;
@@ -7609,7 +7609,7 @@ declare const _default$2: {
7609
7609
  isProductList?: boolean;
7610
7610
  thumbsSwiper?: string;
7611
7611
  productBadgeLiquid?: string;
7612
- renderByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
7612
+ shouldInitByLayout?: _gem_sdk_core.ObjectDevices<boolean>;
7613
7613
  } & {
7614
7614
  rootId?: string;
7615
7615
  rootClass?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "19.0.0-dev.8",
3
+ "version": "19.0.0-staging.10",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,9 +26,9 @@
26
26
  "i18n:extract": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/translate/extract-texts-to-locales.js && node ./scripts/translate/en-keys-usage.js"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "19.0.0-dev.8",
30
- "@gem-sdk/styles": "19.0.0-dev.7",
31
- "@gem-sdk/system": "19.0.0-dev.0",
29
+ "@gem-sdk/core": "19.0.0-staging.10",
30
+ "@gem-sdk/styles": "19.0.0-staging.8",
31
+ "@gem-sdk/system": "19.0.0-staging.8",
32
32
  "@types/react-transition-group": "^4.4.12",
33
33
  "postcss-import": "16.1.1",
34
34
  "@thedutchcoder/postcss-rem-to-px": "0.0.2",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@gem-sdk/keen-slider": "^6.8.8",
43
- "@gem-sdk/swiper": "0.0.15",
43
+ "@gem-sdk/swiper": "0.0.14-staging.2",
44
44
  "react-transition-group": "^4.4.5",
45
45
  "react-youtube": "10.1.0"
46
46
  },
@@ -1,2 +0,0 @@
1
- 'use client';
2
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),s=require("../hooks/useProductOfferSubscriptionBlocksObserver.js");const t=r.createContext(void 0);exports.ProductOfferSubscriptionPresenceProvider=({children:r,containerRef:o})=>{let u=s.useProductOfferSubscriptionBlocksObserver(o);return e.jsx(t.Provider,{value:u,children:r})},exports.useProductOfferSubscriptionPresence=()=>r.useContext(t);
@@ -1 +0,0 @@
1
- "use strict";var t=require("../../../constants/index.js");exports.scanSubscriptionBlocks=e=>{let r=e.querySelectorAll('[id^="product-subscription-"][data-selling-type]'),s=!1,i=!1;return r.forEach(e=>{let r=e.getAttribute("data-selling-type");r===t.SubscriptionEnum.ONE_TIME&&(s=!0),r===t.SubscriptionEnum.SUBSCRIPTION&&(i=!0)}),{hasOneTimeBlock:s,hasSubscriptionBlock:i,hasBoth:s&&i}};
@@ -1 +0,0 @@
1
- "use strict";var e=require("react"),r=require("../helpers/scanSubscriptionBlocks.js");exports.useProductOfferSubscriptionBlocksObserver=t=>{let[s,c]=e.useState(()=>({hasOneTimeBlock:!1,hasSubscriptionBlock:!1,hasBoth:!1}));return e.useLayoutEffect(()=>{let e=t.current;if(!e)return;let s=()=>{c(r.scanSubscriptionBlocks(e))};s();let u=new MutationObserver(s);return u.observe(e,{childList:!0,subtree:!0}),()=>{u.disconnect()}},[t]),s};
@@ -1,2 +0,0 @@
1
- 'use client';
2
- import{jsx as r}from"react/jsx-runtime";import{useContext as e,createContext as o}from"react";import{useProductOfferSubscriptionBlocksObserver as t}from"../hooks/useProductOfferSubscriptionBlocksObserver.js";let i=o(void 0),c=({children:e,containerRef:o})=>{let c=t(o);return r(i.Provider,{value:c,children:e})},s=()=>e(i);export{c as ProductOfferSubscriptionPresenceProvider,s as useProductOfferSubscriptionPresence};
@@ -1 +0,0 @@
1
- import{SubscriptionEnum as t}from"../../../constants/index.js";let e=e=>{let r=e.querySelectorAll('[id^="product-subscription-"][data-selling-type]'),l=!1,o=!1;return r.forEach(e=>{let r=e.getAttribute("data-selling-type");r===t.ONE_TIME&&(l=!0),r===t.SUBSCRIPTION&&(o=!0)}),{hasOneTimeBlock:l,hasSubscriptionBlock:o,hasBoth:l&&o}};export{e as scanSubscriptionBlocks};
@@ -1 +0,0 @@
1
- import{useState as e,useLayoutEffect as r}from"react";import{scanSubscriptionBlocks as t}from"../helpers/scanSubscriptionBlocks.js";let s=s=>{let[o,c]=e(()=>({hasOneTimeBlock:!1,hasSubscriptionBlock:!1,hasBoth:!1}));return r(()=>{let e=s.current;if(!e)return;let r=()=>{c(t(e))};r();let o=new MutationObserver(r);return o.observe(e,{childList:!0,subtree:!0}),()=>{o.disconnect()}},[s]),o};export{s as useProductOfferSubscriptionBlocksObserver};