@gem-sdk/components 17.0.0-dev.107 → 17.0.0-dev.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../text/components/Text.js"),t=require("@gem-sdk/system"),r=require("../common/classes.js"),l=require("../common/styles.js"),a=require("../common/helpers.js");exports.default=({builderAttrs:n,setting:o={},styles:c,builderProps:i})=>{let{link:m,label:u}=o,{textAlign:g,typo:x,width:y,direction:C}=c??{},d=a.getComponentTag(m),j=t.createClass({...r.getClasses({builderProps:i,styles:c})}),p=t.createStyle({...l.getStyle(y)}),S=t.createClass({...r.getComponentClasses(m)}),f=t.createStyle({...l.getComponentStyles()}),h=l.getTextStyle({textAlign:g,typo:x}),q=t.createClass({...r.getTextClasses(m)}),v=t.createClass({...r.getElementMarginClasses()});return e.jsx("div",{...n,className:j,children:e.jsxs("div",{style:p,children:[e.jsx(d,{href:m,target:"_blank",rel:"noreferrer",className:S,style:f,children:e.jsx(s.default,{styles:{...h,direction:C},setting:{text:u},textClass:q})}),x?.fontSize===a.PostPurchaseFontSizeValue.XLarge&&e.jsx("div",{className:v})]})})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../text/components/Text.js"),t=require("@gem-sdk/system"),r=require("../common/classes.js"),l=require("../common/styles.js"),a=require("../common/helpers.js");exports.default=({builderAttrs:n,setting:o={},styles:c,builderProps:i})=>{let{link:m,label:u}=o,{textAlign:g,typo:x,width:y}=c??{},C=a.getComponentTag(m),d=t.createClass({...r.getClasses({builderProps:i,styles:c})}),j=t.createStyle({...l.getStyle(y)}),p=t.createClass({...r.getComponentClasses(m)}),S=t.createStyle({...l.getComponentStyles()}),f=l.getTextStyle({textAlign:g,typo:x}),h=t.createClass({...r.getTextClasses(m)}),q=t.createClass({...r.getElementMarginClasses()});return e.jsx("div",{...n,className:d,children:e.jsxs("div",{style:j,children:[e.jsx(C,{href:m,target:"_blank",rel:"noreferrer",className:p,style:S,children:e.jsx(s.default,{styles:{...f},setting:{text:u},textClass:h})}),x?.fontSize===a.PostPurchaseFontSizeValue.XLarge&&e.jsx("div",{className:q})]})})};
@@ -1 +1 @@
1
- "use strict";exports.PostPurchaseLinkSettings=[{id:"setting",controls:[{id:"link",label:"Link",type:"input",default:"",placeholder:"E.g. gempages.net"},{id:"label",label:"Text",type:"textarea",default:"Preview Sample",autoHeight:!0,lazyUpdate:!0,placeholder:"E.g. Preview"}]},{id:"style",controls:[{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",fontWeight:"normal",textTransform:"none",textColor:"defaultLink"},hiddenSetting:["textColor","fontWeight","textTransform"]},{id:"textAlign",label:"Alignment",type:"option:value",options:[{value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]}]}];
1
+ "use strict";exports.PostPurchaseLinkSettings=[{id:"setting",controls:[{id:"link",label:"Link",type:"input",default:"",placeholder:"E.g. gempages.net"},{id:"label",label:"Text",type:"textarea",default:"Preview Sample",autoHeight:!0,lazyUpdate:!0,placeholder:"E.g. Preview"}]},{id:"style",controls:[{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",fontWeight:"normal",textTransform:"none",textColor:"defaultLink"},hiddenSetting:["textColor","fontWeight","textTransform"]},{id:"textAlign",label:"Alignment",type:"option:value",options:[{value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]}]}];
@@ -1 +1 @@
1
- "use strict";exports.PostPurchaseLinkUIV2=[{label:"Insert Link",controls:[{label:"Link",setting:{id:"link"}}]},{label:"Content",controls:[{type:"control",label:"Label",setting:{id:"label"}}]},{label:"Text",controls:[{type:"control",label:"Direction",setting:{id:"direction"},controlChangeTrigger:{options:{noRecordHistory:!0}}},{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:"Align"}]},{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"}}]},{controls:[{label:"Align",conditionEnable:"!(parseInt(width) >= 100 && width?.includes(\"%\")) && width !== '1px'",setting:{id:"align"},options:{fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];
1
+ "use strict";exports.PostPurchaseLinkUIV2=[{label:"Insert Link",controls:[{label:"Link",setting:{id:"link"}}]},{label:"Content",controls:[{type:"control",label:"Label",setting:{id:"label"}}]},{label:"Text",controls:[{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:"Align"}]},{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"}}]},{controls:[{label:"Align",conditionEnable:"!(parseInt(width) >= 100 && width?.includes(\"%\")) && width !== '1px'",setting:{id:"align"},options:{fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("@gem-sdk/core"),require("next/link");var t=require("../../../../../video/components/Video.js"),l=r.memo(l=>{let{url:u,aspectRatio:s}=l,i=r.useMemo(()=>u.includes("youtu.be")?"youtube":u.includes("vimeo")?"vimeo":"html5",[u]);return e.jsx("div",{className:"gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center",children:e.jsx(t.default,{setting:{type:i,html5Url:u,youtubeUrl:u,vimeoUrl:u,preload:!0,controls:!0,aspectRatio:s},className:"gp-w-full"})})});exports.default=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("@gem-sdk/core"),require("next/link");var t=require("../../../../../video/components/Video.js"),l=r.memo(l=>{let{url:u,aspectRatio:s,thumbnail:i}=l,o=r.useMemo(()=>u.includes("youtu.be")?"youtube":u.includes("vimeo")?"vimeo":"html5",[u]);return e.jsx("div",{className:"gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center",children:e.jsx(t.default,{setting:{type:o,html5Url:u,youtubeUrl:u,vimeoUrl:u,preload:!0,controls:!0,aspectRatio:s,poster:i?{src:i}:void 0},className:"gp-w-full"})})});exports.default=l;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("react"),o=require("../../../../../image/components/NextImage.js"),s=require("./MediaIcon.js"),a=require("../../common/productFeaturedImage.js"),i=require("./ProductFeatureVideo.js");const n={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var c=r.memo(({image:c,imageShowWhenHover:l,setting:u,aspectRatio:h})=>{let f=t.useProduct(),d=t.useCurrentDevice(),p=t.useShopStore(e=>e.storefrontUrl),{isEditMode:g,isPreviewSharePageMode:m}=t.useRenderMode(),y=r.useMemo(()=>"none"!==t.getResponsiveValueByScreen(u.ftClickOpenLightBox,d),[d,u.ftClickOpenLightBox]),v=r.useMemo(()=>!g&&["VIDEO","EXTERNAL_VIDEO"].includes(c?.contentType||"")&&!y,[g,c?.contentType,y]),x=r.useMemo(()=>c?{...c,src:v?c.src:a.isFeatureMedia(c?.contentType)?c?.previewImage:c.src}:n,[c,v]),b=r.useMemo(()=>{if(m)return"javascript:void(0)";if(!p)return"#";let e=new URL(p);return f?`${e.protocol}//${e.host}/products/${f.handle}`:"#"},[p,f,m]),j=r.useMemo(()=>u?.hoverEffect!=="none"&&!a.isFeatureMedia(x?.contentType),[x?.contentType,u?.hoverEffect]),E=r.useMemo(()=>u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!a.isFeatureMedia(x?.contentType),[x?.contentType,u?.hoverEffect,u?.zoomType]),T=r.useCallback(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),M=r.useMemo(()=>l?"other"!==u.hoverEffect?T(x):T(l):n.src,[l,x,u.hoverEffect,T]);return e.jsx(e.Fragment,{children:(r=>{if("product-link"===t.getResponsiveValueByScreen(u.ftClickOpenLightBox,d)){let t=u.ftClickOpenNewTab?"_blank":"_self";return e.jsx("a",{title:f?.title,href:b,className:"gp-w-full",target:t,children:r})}return r})(e.jsx(e.Fragment,{children:v?e.jsx(i.default,{type:x?.contentType,url:x.src??"",aspectRatio:h}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{draggable:"false",src:x.src,width:x?.width,height:x?.height,alt:x?.alt,setting:{aspectRatio:h,layout:u?.ftLayout},priority:u?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e.jsx(s.default,{contentType:x?.contentType??""}),j&&e.jsx(o.default,{draggable:"false",src:M,width:u?.hoverEffect==="other"?l?.width:x.width,height:u?.hoverEffect==="other"?l?.height:x.height,alt:u?.hoverEffect==="other"?l?.alt:x.alt,setting:{layout:u.ftLayout,aspectRatio:h},style:{width:"100%",height:"100%"},className:t.cls("hover-image featured-image-only !gp-max-w-none",a.getZoomImageClass()),priority:u?.preload}),E&&e.jsx("div",{className:t.cls(a.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${x?.src}")`})}})]})}))})});exports.default=c;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("react"),o=require("../../../../../image/components/NextImage.js"),s=require("./MediaIcon.js"),a=require("../../common/productFeaturedImage.js"),i=require("./ProductFeatureVideo.js");const n={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var c=r.memo(({image:c,imageShowWhenHover:l,setting:u,aspectRatio:h})=>{let f=t.useProduct(),p=t.useCurrentDevice(),d=t.useShopStore(e=>e.storefrontUrl),{isEditMode:g,isPreviewSharePageMode:m}=t.useRenderMode(),y=r.useMemo(()=>"none"!==t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p),[p,u.ftClickOpenLightBox]),v=r.useMemo(()=>!g&&["VIDEO","EXTERNAL_VIDEO"].includes(c?.contentType||"")&&!y,[g,c?.contentType,y]),b=r.useMemo(()=>c?{...c,src:v?c.src:a.isFeatureMedia(c?.contentType)?c?.previewImage:c.src}:n,[c,v]),x=r.useMemo(()=>{if(m)return"javascript:void(0)";if(!d)return"#";let e=new URL(d);return f?`${e.protocol}//${e.host}/products/${f.handle}`:"#"},[d,f,m]),j=r.useMemo(()=>u?.hoverEffect!=="none"&&!a.isFeatureMedia(b?.contentType),[b?.contentType,u?.hoverEffect]),E=r.useMemo(()=>u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!a.isFeatureMedia(b?.contentType),[b?.contentType,u?.hoverEffect,u?.zoomType]),T=r.useCallback(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),w=r.useMemo(()=>l?"other"!==u.hoverEffect?T(b):T(l):n.src,[l,b,u.hoverEffect,T]);return e.jsx(e.Fragment,{children:(r=>{if("product-link"===t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p)){let t=u.ftClickOpenNewTab?"_blank":"_self";return e.jsx("a",{title:f?.title,href:x,className:"gp-w-full",target:t,children:r})}return r})(e.jsx(e.Fragment,{children:v?e.jsx(i.default,{type:b?.contentType,url:b.src??"",thumbnail:b?.previewImage,aspectRatio:h}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{draggable:"false",src:b.src,width:b?.width,height:b?.height,alt:b?.alt,setting:{aspectRatio:h,layout:u?.ftLayout},priority:u?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e.jsx(s.default,{contentType:b?.contentType??""}),j&&e.jsx(o.default,{draggable:"false",src:w,width:u?.hoverEffect==="other"?l?.width:b.width,height:u?.hoverEffect==="other"?l?.height:b.height,alt:u?.hoverEffect==="other"?l?.alt:b.alt,setting:{layout:u.ftLayout,aspectRatio:h},style:{width:"100%",height:"100%"},className:t.cls("hover-image featured-image-only !gp-max-w-none",a.getZoomImageClass()),priority:u?.preload}),E&&e.jsx("div",{className:t.cls(a.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${b?.src}")`})}})]})}))})});exports.default=c;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("../../../../../carousel-v3/components/item/CarouselItem.js"),s=require("../../../../../image/components/NextImage.js");require("../../../../../modal/components/confirm.js");var l=require("../../../../../modal/components/Modal.js"),d=require("react"),r=require("../../common/productFeaturedImage.js"),n=require("../child/ProductFeatureVideo.js"),a=require("../child/MediaIcon.js");exports.default=({builderPropUID:u,productImages:p,open:c,imageRatio:m,onHandleClose:g})=>{let h=t.useFeaturedImageGlobal(),b=d.useMemo(()=>{let e=p?.findIndex(e=>e.id===h?.id);return e&&e>0?e:0},[p,h]),j={desktop:p&&p.length>1,mobile:p&&p?.length>1,tablet:p&&p?.length>1},f=t.useEditorMode(),x=e=>"edit"!==f&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e.jsx(l.default,{setting:{open:c},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{g(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:b,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:b},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:b,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:p?.map(o=>e.jsx(i.default,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:x(o)?e.jsx(n.default,{type:o?.contentType,url:o.src??"",aspectRatio:m}):e.jsxs(e.Fragment,{children:[e.jsx(s.default,{src:r.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:m},className:t.cls("gp-h-full gp-w-full gp-object-contain")},o?.id),e.jsx(a.default,{contentType:o?.contentType??""})]})},o?.id))})})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("../../../../../carousel-v3/components/item/CarouselItem.js"),l=require("../../../../../image/components/NextImage.js");require("../../../../../modal/components/confirm.js");var s=require("../../../../../modal/components/Modal.js"),d=require("react"),r=require("../../common/productFeaturedImage.js"),n=require("../child/ProductFeatureVideo.js"),a=require("../child/MediaIcon.js");exports.default=({builderPropUID:u,productImages:p,open:c,imageRatio:m,onHandleClose:g})=>{let h=t.useFeaturedImageGlobal(),b=d.useMemo(()=>{let e=p?.findIndex(e=>e.id===h?.id);return e&&e>0?e:0},[p,h]),j={desktop:p&&p.length>1,mobile:p&&p?.length>1,tablet:p&&p?.length>1},f=t.useEditorMode(),x=e=>"edit"!==f&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e.jsx(s.default,{setting:{open:c},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{g(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:b,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:b},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:b,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:p?.map(o=>e.jsx(i.default,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:x(o)?e.jsx(n.default,{type:o?.contentType,url:o.src??"",thumbnail:o?.previewImage,aspectRatio:m}):e.jsxs(e.Fragment,{children:[e.jsx(l.default,{src:r.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:m},className:t.cls("gp-h-full gp-w-full gp-object-contain")},o?.id),e.jsx(a.default,{contentType:o?.contentType??""})]})},o?.id))})})};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import r from"../../text/components/Text.js";import{createClass as s,createStyle as m}from"@gem-sdk/system";import{getClasses as o,getComponentClasses as l,getTextClasses as i,getElementMarginClasses as n}from"../common/classes.js";import{getStyle as a,getComponentStyles as c,getTextStyle as f}from"../common/styles.js";import{PostPurchaseFontSizeValue as p,getComponentTag as d}from"../common/helpers.js";let x=({builderAttrs:x,setting:h={},styles:j,builderProps:y})=>{let{link:g,label:k}=h,{textAlign:u,typo:v,width:N,direction:L}=j??{},b=d(g),z=s({...o({builderProps:y,styles:j})}),C=m({...a(N)}),S=s({...l(g)}),T=m({...c()}),X=f({textAlign:u,typo:v}),_=s({...i(g)}),q=s({...n()});return e("div",{...x,className:z,children:t("div",{style:C,children:[e(b,{href:g,target:"_blank",rel:"noreferrer",className:S,style:T,children:e(r,{styles:{...X,direction:L},setting:{text:k},textClass:_})}),v?.fontSize===p.XLarge&&e("div",{className:q})]})})};export{x as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import r from"../../text/components/Text.js";import{createClass as s,createStyle as m}from"@gem-sdk/system";import{getClasses as o,getComponentClasses as l,getTextClasses as i,getElementMarginClasses as n}from"../common/classes.js";import{getStyle as a,getComponentStyles as c,getTextStyle as f}from"../common/styles.js";import{PostPurchaseFontSizeValue as p,getComponentTag as d}from"../common/helpers.js";let x=({builderAttrs:x,setting:h={},styles:j,builderProps:y})=>{let{link:g,label:k}=h,{textAlign:u,typo:v,width:N}=j??{},L=d(g),b=s({...o({builderProps:y,styles:j})}),z=m({...a(N)}),C=s({...l(g)}),S=m({...c()}),T=f({textAlign:u,typo:v}),X=s({...i(g)}),_=s({...n()});return e("div",{...x,className:b,children:t("div",{style:z,children:[e(L,{href:g,target:"_blank",rel:"noreferrer",className:C,style:S,children:e(r,{styles:{...T},setting:{text:k},textClass:X})}),v?.fontSize===p.XLarge&&e("div",{className:_})]})})};export{x as default};
@@ -1 +1 @@
1
- let e=[{id:"setting",controls:[{id:"link",label:"Link",type:"input",default:"",placeholder:"E.g. gempages.net"},{id:"label",label:"Text",type:"textarea",default:"Preview Sample",autoHeight:!0,lazyUpdate:!0,placeholder:"E.g. Preview"}]},{id:"style",controls:[{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",fontWeight:"normal",textTransform:"none",textColor:"defaultLink"},hiddenSetting:["textColor","fontWeight","textTransform"]},{id:"textAlign",label:"Alignment",type:"option:value",options:[{value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]}]}];export{e as PostPurchaseLinkSettings};
1
+ let e=[{id:"setting",controls:[{id:"link",label:"Link",type:"input",default:"",placeholder:"E.g. gempages.net"},{id:"label",label:"Text",type:"textarea",default:"Preview Sample",autoHeight:!0,lazyUpdate:!0,placeholder:"E.g. Preview"}]},{id:"style",controls:[{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",fontWeight:"normal",textTransform:"none",textColor:"defaultLink"},hiddenSetting:["textColor","fontWeight","textTransform"]},{id:"textAlign",label:"Alignment",type:"option:value",options:[{value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]}]}];export{e as PostPurchaseLinkSettings};
@@ -1 +1 @@
1
- let t=[{label:"Insert Link",controls:[{label:"Link",setting:{id:"link"}}]},{label:"Content",controls:[{type:"control",label:"Label",setting:{id:"label"}}]},{label:"Text",controls:[{type:"control",label:"Direction",setting:{id:"direction"},controlChangeTrigger:{options:{noRecordHistory:!0}}},{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:"Align"}]},{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"}}]},{controls:[{label:"Align",conditionEnable:"!(parseInt(width) >= 100 && width?.includes(\"%\")) && width !== '1px'",setting:{id:"align"},options:{fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{t as PostPurchaseLinkUIV2};
1
+ let t=[{label:"Insert Link",controls:[{label:"Link",setting:{id:"link"}}]},{label:"Content",controls:[{type:"control",label:"Label",setting:{id:"label"}}]},{label:"Text",controls:[{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:"Align"}]},{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"}}]},{controls:[{label:"Align",conditionEnable:"!(parseInt(width) >= 100 && width?.includes(\"%\")) && width !== '1px'",setting:{id:"align"},options:{fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{t as PostPurchaseLinkUIV2};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{memo as t,useMemo as r}from"react";import"@gem-sdk/core";import"next/link";import o from"../../../../../video/components/Video.js";var l=t(t=>{let{url:l,aspectRatio:i}=t,m=r(()=>l.includes("youtu.be")?"youtube":l.includes("vimeo")?"vimeo":"html5",[l]);return e("div",{className:"gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center",children:e(o,{setting:{type:m,html5Url:l,youtubeUrl:l,vimeoUrl:l,preload:!0,controls:!0,aspectRatio:i},className:"gp-w-full"})})});export{l as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{memo as t,useMemo as r}from"react";import"@gem-sdk/core";import"next/link";import o from"../../../../../video/components/Video.js";var l=t(t=>{let{url:l,aspectRatio:i,thumbnail:m}=t,s=r(()=>l.includes("youtu.be")?"youtube":l.includes("vimeo")?"vimeo":"html5",[l]);return e("div",{className:"gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center",children:e(o,{setting:{type:s,html5Url:l,youtubeUrl:l,vimeoUrl:l,preload:!0,controls:!0,aspectRatio:i,poster:m?{src:m}:void 0},className:"gp-w-full"})})});export{l as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{memo as f,useMemo as h,useCallback as p}from"react";import m from"../../../../../image/components/NextImage.js";import g from"./MediaIcon.js";import{isFeatureMedia as d,getZoomImageClass as y,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import v from"./ProductFeatureVideo.js";let E={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var T=f(({image:f,imageShowWhenHover:T,setting:b,aspectRatio:w})=>{let I=o(),k=i(),x=a(e=>e.storefrontUrl),{isEditMode:L,isPreviewSharePageMode:N}=c(),O=h(()=>"none"!==n(b.ftClickOpenLightBox,k),[k,b.ftClickOpenLightBox]),j=h(()=>!L&&["VIDEO","EXTERNAL_VIDEO"].includes(f?.contentType||"")&&!O,[L,f?.contentType,O]),R=h(()=>f?{...f,src:j?f.src:d(f?.contentType)?f?.previewImage:f.src}:E,[f,j]),C=h(()=>{if(N)return"javascript:void(0)";if(!x)return"#";let e=new URL(x);return I?`${e.protocol}//${e.host}/products/${I.handle}`:"#"},[x,I,N]),$=h(()=>b?.hoverEffect!=="none"&&!d(R?.contentType),[R?.contentType,b?.hoverEffect]),_=h(()=>b?.hoverEffect=="zoom"&&b?.zoomType=="glasses"&&!d(R?.contentType),[R?.contentType,b?.hoverEffect,b?.zoomType]),z=p(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),A=h(()=>T?"other"!==b.hoverEffect?z(R):z(T):E.src,[T,R,b.hoverEffect,z]);return e(t,{children:(t=>{if("product-link"===n(b.ftClickOpenLightBox,k)){let r=b.ftClickOpenNewTab?"_blank":"_self";return e("a",{title:I?.title,href:C,className:"gp-w-full",target:r,children:t})}return t})(e(t,{children:j?e(v,{type:R?.contentType,url:R.src??"",aspectRatio:w}):r(t,{children:[e(m,{draggable:"false",src:R.src,width:R?.width,height:R?.height,alt:R?.alt,setting:{aspectRatio:w,layout:b?.ftLayout},priority:b?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(g,{contentType:R?.contentType??""}),$&&e(m,{draggable:"false",src:A,width:b?.hoverEffect==="other"?T?.width:R.width,height:b?.hoverEffect==="other"?T?.height:R.height,alt:b?.hoverEffect==="other"?T?.alt:R.alt,setting:{layout:b.ftLayout,aspectRatio:w},style:{width:"100%",height:"100%"},className:l("hover-image featured-image-only !gp-max-w-none",y()),priority:b?.preload}),_&&e("div",{className:l(u(),"room-len"),style:{...s({bgi:`url("${R?.src}")`})}})]})}))})});export{T as default};
2
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{memo as h,useMemo as f,useCallback as p}from"react";import m from"../../../../../image/components/NextImage.js";import g from"./MediaIcon.js";import{isFeatureMedia as d,getZoomImageClass as u,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import v from"./ProductFeatureVideo.js";let E={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var T=h(({image:h,imageShowWhenHover:T,setting:b,aspectRatio:w})=>{let I=o(),k=i(),x=a(e=>e.storefrontUrl),{isEditMode:L,isPreviewSharePageMode:N}=c(),O=f(()=>"none"!==n(b.ftClickOpenLightBox,k),[k,b.ftClickOpenLightBox]),j=f(()=>!L&&["VIDEO","EXTERNAL_VIDEO"].includes(h?.contentType||"")&&!O,[L,h?.contentType,O]),R=f(()=>h?{...h,src:j?h.src:d(h?.contentType)?h?.previewImage:h.src}:E,[h,j]),C=f(()=>{if(N)return"javascript:void(0)";if(!x)return"#";let e=new URL(x);return I?`${e.protocol}//${e.host}/products/${I.handle}`:"#"},[x,I,N]),$=f(()=>b?.hoverEffect!=="none"&&!d(R?.contentType),[R?.contentType,b?.hoverEffect]),_=f(()=>b?.hoverEffect=="zoom"&&b?.zoomType=="glasses"&&!d(R?.contentType),[R?.contentType,b?.hoverEffect,b?.zoomType]),z=p(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),A=f(()=>T?"other"!==b.hoverEffect?z(R):z(T):E.src,[T,R,b.hoverEffect,z]);return e(t,{children:(t=>{if("product-link"===n(b.ftClickOpenLightBox,k)){let r=b.ftClickOpenNewTab?"_blank":"_self";return e("a",{title:I?.title,href:C,className:"gp-w-full",target:r,children:t})}return t})(e(t,{children:j?e(v,{type:R?.contentType,url:R.src??"",thumbnail:R?.previewImage,aspectRatio:w}):r(t,{children:[e(m,{draggable:"false",src:R.src,width:R?.width,height:R?.height,alt:R?.alt,setting:{aspectRatio:w,layout:b?.ftLayout},priority:b?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(g,{contentType:R?.contentType??""}),$&&e(m,{draggable:"false",src:A,width:b?.hoverEffect==="other"?T?.width:R.width,height:b?.hoverEffect==="other"?T?.height:R.height,alt:b?.hoverEffect==="other"?T?.alt:R.alt,setting:{layout:b.ftLayout,aspectRatio:w},style:{width:"100%",height:"100%"},className:l("hover-image featured-image-only !gp-max-w-none",u()),priority:b?.preload}),_&&e("div",{className:l(y(),"room-len"),style:{...s({bgi:`url("${R?.src}")`})}})]})}))})});export{T as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import d from"../../../../../carousel-v3/components/root/Carousel.js";import n from"../../../../../carousel-v3/components/item/CarouselItem.js";import r from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import p from"../../../../../modal/components/Modal.js";import{useMemo as m}from"react";import{isFeatureMedia as a}from"../../common/productFeaturedImage.js";import c from"../child/ProductFeatureVideo.js";import g from"../child/MediaIcon.js";let h=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=i(),E=m(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j=l(),C=e=>"edit"!==j&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(p,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(d,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(n,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:C(i)?e(c,{type:i?.contentType,url:i.src??"",aspectRatio:f}):t(o,{children:[e(r,{src:a(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:f},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(g,{contentType:i?.contentType??""})]})},i?.id))})})};export{h as default};
2
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import d from"../../../../../carousel-v3/components/root/Carousel.js";import n from"../../../../../carousel-v3/components/item/CarouselItem.js";import r from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import p from"../../../../../modal/components/Modal.js";import{useMemo as m}from"react";import{isFeatureMedia as a}from"../../common/productFeaturedImage.js";import c from"../child/ProductFeatureVideo.js";import g from"../child/MediaIcon.js";let h=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=i(),E=m(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j=l(),v=e=>"edit"!==j&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(p,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(d,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(n,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:v(i)?e(c,{type:i?.contentType,url:i.src??"",thumbnail:i?.previewImage,aspectRatio:f}):t(o,{children:[e(r,{src:a(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:f},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(g,{contentType:i?.contentType??""})]})},i?.id))})})};export{h as default};
@@ -2651,7 +2651,6 @@ type PostPurchaseLinkStyleProps = {
2651
2651
  typo?: PostPurchaseTypo;
2652
2652
  textAlign?: 'left' | 'center' | 'right';
2653
2653
  width?: ObjectDevices<string>;
2654
- direction?: 'ltr' | 'rtl';
2655
2654
  };
2656
2655
  type PostPurchaseLinkProps = BasePropsWrap<PostPurchaseLinkSettingProps, PostPurchaseLinkStyleProps>;
2657
2656
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "17.0.0-dev.107",
3
+ "version": "17.0.0-dev.109",
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": "17.0.0-dev.106",
30
- "@gem-sdk/styles": "17.0.0-dev.93",
30
+ "@gem-sdk/styles": "17.0.0-dev.108",
31
31
  "@gem-sdk/system": "17.0.0-dev.93",
32
32
  "@types/react-transition-group": "^4.4.12",
33
33
  "postcss-import": "16.1.1",