@gem-sdk/components 22.0.0-dev.68 → 22.0.0-dev.70
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/article/components/ArticleContent.js +1 -1
- package/dist/cjs/article/components/ArticleExcerpt.js +1 -1
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/common/components/Loading.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/common/helpers.js +1 -0
- package/dist/cjs/common/hooks/useElementWidth.js +1 -0
- package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
- package/dist/cjs/dialog/common/styles.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/modern/index.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/index.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/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/common/helpers.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-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/sticky/common/styles.js +1 -1
- package/dist/esm/article/components/ArticleContent.js +1 -1
- package/dist/esm/article/components/ArticleExcerpt.js +1 -1
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/common/components/Loading.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/common/helpers.js +1 -0
- package/dist/esm/common/hooks/useElementWidth.js +1 -0
- package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
- package/dist/esm/dialog/common/styles.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/modern/index.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/index.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/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/common/helpers.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-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/sticky/common/styles.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";import{RELATED_TAG_PRODUCT_SETTING as r}from"../constants/index.js";import"react/jsx-runtime";import
|
|
1
|
+
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";import{RELATED_TAG_PRODUCT_SETTING as r}from"../constants/index.js";import"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as d}from"../../../../common/const.js";import"@gem-sdk/core";import"react";let c=e=>{let{setting:r,styles:c}=e,l=r?.productSetting??{},i=l.productSrc===d.RelatedProduct,n=o(r?.dot,r?.dotStyle),p={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete p.childItem;let a={...c,sizeSetting:{...t({adaptiveHeight:c?.adaptiveHeight,height:c?.height,fullWidth:{desktop:!0}})},spacing:c?.spacing};return delete a.backgroundColor,delete a.backgroundImage,{isRelatedProduct:i,productSetting:l,dotStyle:n,carouselConfigSetting:p,carouselConfigStyle:a}},l=t=>{let{setting:o,styles:c}=t,l=o?.productSetting,p=l?.relatedTag,a=l?.hasRelatedExclude,u=(p&&p[0]===r.Collection?l?.relatedCollectionExclude:l?.relatedTagsExclude)??"",s=u?.split(",").map(t=>t.trim()).toString(),m=l?.productSrc??d.Collection,g=l?.collectionId?.replace(i,"")??"latest",h=l?.productSrc===d.PickProduct&&l?.productIds?.length===0,P=c?.layout==="grid",I=e(o?.numberOfProducts,4),S=m===d.PickProduct&&l?.productIds?.length?l?.productIds.map(t=>t.replace(n,"")):[],C=m===d.PickProduct&&l?.productHandles?.length?l?.productHandles:[],k=o?.orderBy&&o?.orderBy!=="none",f=(l?.productSrc===d.Collection||l?.productSrc===d.DynamicCollection)&&k?o?.orderBy?.split("_"):"none",y=k&&f?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",E=f?.[f.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:s,collectionID:g,isLatestProducts:h,isGrid:P,numberOfProducts:I,productListId:S,productListHandles:C,sortedBy:y,isReverse:E,productSrc:m,productSetting:l,isSorted:k,relatedTag:p,productNumber:m===d.PickProduct?h?4:l?.numOfSelectedProducts??4:I,collectionHandle:l?.collectionHandle}},i="gid://shopify/Collection/",n="gid://shopify/Product/";export{i as PREFIX_COLLECTION_ID,n as PREFIX_PRODUCT_ID,c as getData,l as getDataLiquid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import d from"../../../common/components/Loading.js";import"react";import"../../../common/const.js";import s from"../../../grid/components/row/Row.js";import{If as
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import d from"../../../common/components/Loading.js";import"react";import"../../../common/const.js";import{getElementLabel as s}from"../../../common/helpers.js";import c from"../../../grid/components/row/Row.js";import{If as n}from"@gem-sdk/system";import l from"next/dynamic";import{useProductSetting as p}from"./hook/useProductSetting.js";import{getData as u}from"./common/helpers.js";let a=l(()=>import("../ProductNotFound.js"),{loading:d}),h=l=>{let{builderProps:h,children:f,setting:g,style:j,builderAttrs:b}=l,{isAuto:P}=g??{},{isLoadingProduct:y,isProductPage:k,isProductNotFound:x,showProductNotFound:A,errorLoadProduct:D,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:S}=p(l),{rowSetting:E,rowStyles:F}=u(l);return k&&P?r(o,{children:e(f)?r(m,{}):f}):r(o,{children:n(!x,r(o,{children:y?r(d,{label:s(h?.builderData)}):r(o,{children:D?t("div",{children:["Error: ",D?.message]}):v?r(i,{...C,children:r(c,{builderProps:h,builderAttrs:b,style:j,styles:F,setting:E,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(f)?r(m,{}):f})}):null})}),r(o,{children:n(A,r(a,{builderAttrs:b,productSrc:"PickProduct",onClose:()=>S(!1),children:f}))}))})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import{useState as
|
|
1
|
+
import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import{useState as o,useMemo as a}from"react";import d from"./useProductQuery.js";import"react/jsx-runtime";import"../../../../common/const.js";import{isQueryLoading as i}from"../../../../common/helpers.js";let c=c=>{let{setting:m}=c,{productSetting:s,quantity:u,readOnly:n,isSyncProduct:p}=m??{},P=t(),l=r(t=>t.dynamicProduct),{isEditMode:h}=e(),y=s?.productId??"latest",S=s?.productStatus=="dynamic"?{...s,...l}:s,f=S?.initialVariantId,j=S?.initialVariantBaseId,{productData:{data:g,isLoading:I,error:k}}=d({productId:y}),[x,D]=o(!0),Q=i({hasQuery:!!y,data:g,error:k,isLoading:I}),V=(k||!g&&!Q)&&h,$=a(()=>({product:g,initialVariantId:f,initialVariantBaseId:j,quantity:u,readOnly:n,isSyncProduct:p,key:`uid-${g?.id}-${f??""}`,hasPreSelected:s?.hasPreSelected}),[j,f,p,g,s?.hasPreSelected,u,n]);return{forceProductSetting:S,isProductPage:"PRODUCT"===P,isProductNotFound:V,showProductNotFound:x,isLoadingProduct:Q,product:g,errorLoadProduct:k,isEditor:h,productProviderData:$,setShowProductNotFound:D}};export{c as useProductSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getGradientImageBgrStyleByDevice as t,getStyleBackgroundByDevice as e,makeStyle as l}from"@gem-sdk/core";import"react/jsx-runtime";import
|
|
1
|
+
import{getGradientImageBgrStyleByDevice as t,getStyleBackgroundByDevice as e,makeStyle as l}from"@gem-sdk/core";import"react/jsx-runtime";import{ELEMENT_Z_INDEX as o}from"../../common/const.js";import"react";import{getBackgroundTranslated as a}from"../../helpers.js";import{Sticky as r}from"../settings/configs/translate.js";let p=t=>"top"==t?"sticky":"fixed",s=(t,e,l)=>{let o={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:p(l)};switch(e){case"after-first-cart-button":case"after-first-scroll":case"between-sections":o[`--d${t}`]="none";break;case"always":o[`--d${t}`]="block"}return o},i=(t,e)=>({...s("",t?.desktop,e?.desktop),...s("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...s("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),b=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),n=t=>({...b(t?.desktop,""),...b(t?.tablet??t?.desktop,"-tablet"),...b(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),m=t=>{let{position:e,display:l}=t;return{margin:"0 auto",...n(e),...i(l,e),"z-index":o.STICKY}},d=({setting:o,style:p,uid:s,pageContext:i,type:b="React"})=>{let{background:n}=o||{},m="Liquid"===b?a({background:n,uid:s,enableTranslate:!!r?.background?.id,pageContext:i,isTranslateVideo:!1}):n;return{...l({m:"0 auto"}),...c(p),...f(p),...e(m||n),...t(m||n)}},c=t=>{let e={};return["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"].forEach(l=>{t?.[l]&&(e[l]=t[l])}),e},f=t=>{let e={...t};return["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"].forEach(t=>{delete e?.[t]}),e};export{i as displayConditionStyle,f as filterStyles,m as getContainerStyles,d as getContentStyles,s as getDisplayStyle,c as getStylePadding};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "22.0.0-dev.
|
|
3
|
+
"version": "22.0.0-dev.70",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@gem-sdk/core": "22.0.0-dev.64",
|
|
30
|
-
"@gem-sdk/styles": "22.0.0-dev.
|
|
30
|
+
"@gem-sdk/styles": "22.0.0-dev.69",
|
|
31
31
|
"@gem-sdk/system": "22.0.0-dev.63",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"postcss-import": "16.1.1",
|