@gem-sdk/components 8.0.0-dev.40 → 8.0.0-dev.41
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/grid/components/row/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +9 -9
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/cjs/hero-banner/hooks/useHeroBannerItem.js +1 -0
- package/dist/cjs/hero-banner/settings/configs/presets/banner-video-pre-sales-page.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/presets/banner-video.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/video/common/classes.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/grid/components/row/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +12 -12
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/hero-banner/hooks/useHeroBannerItem.js +1 -0
- package/dist/esm/hero-banner/settings/configs/presets/banner-video-pre-sales-page.js +1 -1
- package/dist/esm/hero-banner/settings/configs/presets/banner-video.js +1 -1
- package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
- package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/esm/video/common/classes.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/types/index.d.ts +14 -12
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var system=require("@gem-sdk/system");const getClass=s=>{let{builderProps:e,advanced:l,className:g}=s,a=system.createClass({"gp-background-video gp-absolute gp-overflow-hidden gp-w-full gp-h-full left-0 top-0 !gp-block":!0}),
|
|
1
|
+
"use strict";var system=require("@gem-sdk/system");const getClass=s=>{let{builderProps:e,advanced:l,className:g}=s,a=system.createClass({"gp-background-video gp-absolute gp-overflow-hidden gp-w-full gp-h-full left-0 top-0 !gp-block":!0}),t=system.createClass({"gp-bg-video gp-relative gp-h-full":!0}),p=system.createClass({...g&&{[g]:!0},...e?.uid&&{[e.uid]:!0},"gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]":!0,...l?.cssClass&&{[l?.cssClass]:!0}}),r=system.createClass({"gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full":!0}),u=system.createClass({"gp-h-full gp-w-full !gp-max-w-none gp-background-article":!0}),o=system.createClass({"!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]":!0});return{rowClass:p,backgroundBoxClass:a,backgroundBoxInnerClass:t,sectionClass:r,wrapperYoutubeClasses:u,iframeYoutubeClasses:o}};exports.getClass=getClass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getClasses=({setting:e,builderProps:s,advancedCssClass:t})=>{let o="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return t&&(o+=` ${t}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(o),...helpers.getClassAlignBanner(helpers.getResponsiveSetting(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...helpers.getClassContentPosition(helpers.getContentPosition(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),enableTransitionHover=e=>{let{overlayColor:s}=e??{},t=s?.hover||s?.normal;return t&&"transparent"!==t&&"0%"!=helpers.getOpacityHover(e)},getOverlayClasses=e=>{let{overlayColor:s,hoverEffect:t}=e??{},{disableOpacity:o}=helpers.opacityEnabledData(e),a="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)]";return enableTransitionHover(e)&&(a+=" gp-transition-all gp-duration-300"),t&&(a+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),core.getGlobalColorStateClass("bg",s,o,!t)&&(a+=` ${core.getGlobalColorStateClass("bg",s,o,!t)}`),composeClasses(a)},getRowClasses=(e,s)=>{let{sizeSetting:t,background:o}=e??{},{verticalAlign:a}=s??{},l=helpers.getClassForContentByFitContent(t,o),r=helpers.getClassForStretchContent(a),g=helpers.getClassSpaceBetween(s?.layout||{},e?.contentPosition1Col||{}),p=helpers.getClassSpaceBetweenLeftRight(s?.layout||{}),n=`gp-hero-banner-row ${l} ${r}`;return{...composeClasses(n),...g,...p}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full gp-invisible -gp-z-1"),getBackgroundClasses=(e,s)=>{let t="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(t+=" gp_lazybg"),e&&(t+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(t)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getClasses=({setting:e,builderProps:s,advancedCssClass:t})=>{let o="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return t&&(o+=` ${t}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(o),...helpers.getClassAlignBanner(helpers.getResponsiveSetting(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...helpers.getClassContentPosition(helpers.getContentPosition(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),enableTransitionHover=e=>{let{overlayColor:s}=e??{},t=s?.hover||s?.normal;return t&&"transparent"!==t&&"0%"!=helpers.getOpacityHover(e)},getOverlayClasses=e=>{let{overlayColor:s,hoverEffect:t}=e??{},{disableOpacity:o}=helpers.opacityEnabledData(e),a="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)]";return enableTransitionHover(e)&&(a+=" gp-transition-all gp-duration-300"),t&&(a+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),core.getGlobalColorStateClass("bg",s,o,!t)&&(a+=` ${core.getGlobalColorStateClass("bg",s,o,!t)}`),composeClasses(a)},getRowClasses=(e,s)=>{let{sizeSetting:t,background:o}=e??{},{verticalAlign:a}=s??{},l=helpers.getClassForContentByFitContent(t,o),r=helpers.getClassForStretchContent(a),g=helpers.getClassSpaceBetween(s?.layout||{},e?.contentPosition1Col||{}),p=helpers.getClassSpaceBetweenLeftRight(s?.layout||{}),n=`gp-hero-banner-row ${l} ${r}`;return{...composeClasses(n),...g,...p}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full gp-invisible -gp-z-1"),getBackgroundClasses=(e,s)=>{let t="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(t+=" gp_lazybg"),e&&(t+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(t)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e=!1)=>{let s="gp-relative gp-h-full";return e&&(s+=" gp-hidden"),composeClasses(s)},getWrapperYoutubeClasses=()=>composeClasses("gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none"),getIframeYoutubeClasses=()=>composeClasses("gp-inset-0 gp-w-full gp-bg-black gp-h-full !gp-max-w-none"),getLazyBackgroundClasses=e=>{let s="gp-absolute gp-top-0 gp-invisible gp-w-full gp_lazyload gp-h-full gp_lazyforbg";return"tablet"===e&&(s+=" gp_lazybg_tl"),"mobile"===e&&(s+=" gp_lazybg_mb"),composeClasses(s)};exports.enableTransitionHover=enableTransitionHover,exports.getAdaptiveClasses=getAdaptiveClasses,exports.getAdaptivePictureClasses=getAdaptivePictureClasses,exports.getBackgroundClasses=getBackgroundClasses,exports.getClasses=getClasses,exports.getContainBackgroundClasses=getContainBackgroundClasses,exports.getContainerClasses=getContainerClasses,exports.getHtml5VideoClasses=getHtml5VideoClasses,exports.getIframeYoutubeClasses=getIframeYoutubeClasses,exports.getLazyBackgroundClasses=getLazyBackgroundClasses,exports.getLinkClasses=getLinkClasses,exports.getOverlayClasses=getOverlayClasses,exports.getRowClasses=getRowClasses,exports.getWrapperYoutubeClasses=getWrapperYoutubeClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../image/common/helpers.js"),constant=require("../../constant.js"),_const=require("./const.js");const getContentPosition=(e,t,o)=>{let i={};return core.DEVICES.map(l=>{let n=core.getResponsiveValueByScreen(e,l),a=core.getResponsiveValueByScreen(t,l),r=core.getResponsiveValueByScreen(o,l);i={...i,[l]:1>=(n?.cols?.length||1)?a:r}}),i},getAspectRatioSettings=(e,t)=>{let o={desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width},i={desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height},l={desktop:t?.desktop==="custom"?`${core.getResponsiveValueByScreen(o,"desktop")}/${core.getResponsiveValueByScreen(i,"desktop")}`:t?.desktop==="cover"?"unset":t?.desktop,tablet:t?.tablet==="custom"?`${core.getResponsiveValueByScreen(o,"tablet")}/${core.getResponsiveValueByScreen(i,"tablet")}`:t?.tablet==="cover"?"unset":t?.tablet,mobile:t?.mobile==="custom"?`${core.getResponsiveValueByScreen(o,"mobile")}/${core.getResponsiveValueByScreen(i,"mobile")}`:t?.mobile==="cover"?"unset":t?.mobile};return l},getEnableBgImageByDevice=(e,t)=>{if(!core.getResponsiveValueByScreen(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:helpers.createBlurDataURL(t?.desktop?.width??0,t?.desktop?.height??0),tablet:helpers.createBlurDataURL(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:helpers.createBlurDataURL(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,i)=>{if(!e)return"";let l=getBgImage(e),n=core.getResponsiveValueByScreen(e,t),a=o?`url(${imagePlaceholder(e)[t]})`:`url(${helpers.getImageSrc(core.getResponsiveValueByScreen(l,t),t,i)})`,r=n?.color?`, ${n.color}`:"";return n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type==="image"?`${a}${r}`:n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type!=="image"?`${n.color}`:n?.type==="image"?a:"url()"},getBackgroundImageHeroBanner=(e,t=!1,o=!1)=>{if(!e)return;let i={};return core.DEVICES.forEach(l=>{i={...i,[l]:getBgImageByScreen(e,l,t,o)}}),core.makeStyleResponsive("bgi",i)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=e?.[o]?.attachment;t={...t,[o]:"fixed"===i?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(e,t,o)=>{let i=core.getAspectRatioGlobalSize(t),l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=core.getResponsiveValueByScreen(t,l),a=!!getDataVideoHeroBannerResponsive(l,e),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s,p=g&&a;p&&(i={...i,[l]:"16/9"}),o&&o[l]&&getDataVideoHeroBannerResponsive(l,e)?.data?.videoType==="html5"&&(i={...i,[l]:o[l]})}),core.makeStyleResponsive("aspect",i)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},i=["desktop","mobile","tablet"];return i.forEach(i=>{let l=core.getResponsiveValueByScreen(e,i),n=!!getDataVideoHeroBannerResponsive(i,t),a=l?.shape,r=l?.height,s="original"===a&&"fit-content"!==r&&!n;o={...o,[i]:s?"block":"none"}}),core.makeStyleResponsive("d",o)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=e?.[o];i&&(t={...t,[o]:"default"===i?"var(--g-ct-w, 1200px)":i})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:i}=e,l=-i;if(o<l)return 0;if(o>t)return 100;let n=(o-l)/(t-l)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let o={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let l=isScaleImage({enableParallax:t,attachment:e[i]?.attachment});o={...o,[i]:t?"150%":l?"100vh":"100%"}}),core.makeStyleResponsive("h",o)},getWidthHeroBanner=(e,t)=>{let o={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let l=isScaleImage({enableParallax:t,attachment:e[i]?.attachment});o={...o,[i]:l?"100vw":"100%"}}),core.makeStyleResponsive("w",o)},getTopHeroBanner=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),core.makeStyleResponsive("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),i=getWidthHeroBanner(e,t),l=getTopHeroBanner(e);return{...o,...i,...l}},calcRounderClipPath=(e,t=0,o=0)=>{let i=t,l=t;if(t>o?i=o:l=o,e>=999){let t=e-i;return t>0?t:0}let n=e-l;return n>0?n:0},getClipPath=(e,t)=>{if(!t)return`${_const.DEFAULT_CLIP_PATH}`;let[o,i,l,n]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0")||0,o,n),c=calcRounderClipPath(parseInt(r??"0")||0,o,i),b=calcRounderClipPath(parseInt(s??"0")||0,i,l),d=calcRounderClipPath(parseInt(g??"0")||0,l,n);return[p,c,b,d].every(e=>0===e)?`${_const.DEFAULT_CLIP_PATH}`:`inset(0 0 0 round ${p}px ${c}px ${b}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),get1ColLayout=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let i=t[e]?.cols??[],l=i.length<=1,n=o[e];if(!l||!n)return;let a=["space-between","top","center","bottom"];return a.includes(n)?n:void 0},getClassSpaceBetween=(e,t)=>{let o=getResponsiveSetting(e),i=getResponsiveSetting(t),l={desktop:get1ColLayout({device:"desktop",settingLayoutRes:o,contentPosition1ColRes:i}),tablet:get1ColLayout({device:"tablet",settingLayoutRes:o,contentPosition1ColRes:i}),mobile:get1ColLayout({device:"mobile",settingLayoutRes:o,contentPosition1ColRes:i})},n={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},a={};return core.DEVICES.forEach(e=>{let t=l[e],o=n?.[t]?.[e];a[o]=!0}),a},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",i=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",l=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":i,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":l,"mobile:!gp-h-auto":!l}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=core.getResponsiveValueByScreen(e,o);t={...t,[o]:i}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let l=core.getResponsiveValueByScreen(e,i),n=!!getDataVideoHeroBannerResponsive(i,t),a=l?.shape,r=l?.height,s="original"===a&&"fit-content"!==r;o={...o,[i]:s&&!n}}),core.cls(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",i=e.tablet||o,l=e.mobile||i;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[i||"center"]}`]:!!i,[`mobile:gp-justify-${t[l||"center"]}`]:!!l}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,i=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:i}},showVideoType=e=>core.DEVICES.some(t=>{let o=core.getValueByDevice(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...i){clearTimeout(o),o=setTimeout(()=>e.apply(this,i),t)}}const fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:constant.HREF_TO_SALES_PAGE,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:i}},getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,i="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||i};exports.debounce=debounce,exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=formatHoverScale,exports.getAspectRatioSettings=getAspectRatioSettings,exports.getAttachmentDevice=getAttachmentDevice,exports.getBackgroundImageHeroBanner=getBackgroundImageHeroBanner,exports.getBannerLink=getBannerLink,exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getClassSpaceBetweenLeftRight=getClassSpaceBetweenLeftRight,exports.getClipPath=getClipPath,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getEnableBgImageByDevice=getEnableBgImageByDevice,exports.getOpacityHover=getOpacityHover,exports.getPercentageVisible=getPercentageVisible,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatioHeroBannerCustom=getStyleAspectRatioHeroBannerCustom,exports.getStyleHeroBannerBg=getStyleHeroBannerBg,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.horizontalAlign=horizontalAlign,exports.imagePlaceholder=imagePlaceholder,exports.isScaleImage=isScaleImage,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal,exports.opacityEnabledData=opacityEnabledData,exports.scrollToContentBanner=scrollToContentBanner,exports.showVideoType=showVideoType;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../image/common/helpers.js"),constant=require("../../constant.js"),_const=require("./const.js");const getContentPosition=(e,t,o)=>{let i={};return core.DEVICES.map(r=>{let a=core.getResponsiveValueByScreen(e,r),l=core.getResponsiveValueByScreen(t,r),n=core.getResponsiveValueByScreen(o,r);i={...i,[r]:1>=(a?.cols?.length||1)?l:n}}),i},getEnableBgImageByDevice=(e,t)=>{if(!core.getResponsiveValueByScreen(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:helpers.createBlurDataURL(t?.desktop?.width??0,t?.desktop?.height??0),tablet:helpers.createBlurDataURL(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:helpers.createBlurDataURL(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,i)=>{if(!e)return"";let r=getBgImage(e),a=core.getResponsiveValueByScreen(e,t),l=o?`url(${imagePlaceholder(e)[t]})`:`url(${helpers.getImageSrc(core.getResponsiveValueByScreen(r,t),t,i)})`,n=a?.color?`, ${a.color}`:"";return a?.color?.includes(core.GRADIENT_BGR_KEY)&&a?.type==="image"?`${l}${n}`:a?.color?.includes(core.GRADIENT_BGR_KEY)&&a?.type!=="image"?`${a.color}`:a?.type==="image"?l:"url()"},getBackgroundImageHeroBanner=(e,t=!1,o=!1)=>{if(!e)return;let i={};return core.DEVICES.forEach(r=>{i={...i,[r]:getBgImageByScreen(e,r,t,o)}}),core.makeStyleResponsive("bgi",i)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=e?.[o]?.attachment;t={...t,[o]:"fixed"===i?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getVideoRatioFromSizeSetting=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||"auto":void 0!==o?o:e?.shapeValue??t},applyVideoRatioForDevice=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:i})=>{let r=getVideoRatioFromSizeSetting(e,t);return r&&"auto"!==r?{...i,[o]:r}:i},getStyleAspectRatioHeroBannerCustom=(e,t)=>{let o=core.getAspectRatioGlobalSize(t),i=["desktop","mobile","tablet"];return i.forEach(i=>{let r=core.getResponsiveValueByScreen(t,i),a=!!getDataVideoHeroBannerResponsive(i,e);a&&(o=applyVideoRatioForDevice({shapeByDevice:r,fallbackRatio:o?.[i],device:i,currentResult:o}))}),core.makeStyleResponsive("aspect",o)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},i=["desktop","mobile","tablet"];return i.forEach(i=>{let r=core.getResponsiveValueByScreen(e,i),a=!!getDataVideoHeroBannerResponsive(i,t),l=r?.shape,n=r?.height,s="original"===l&&"fit-content"!==n&&!a;o={...o,[i]:s?"block":"none"}}),core.makeStyleResponsive("d",o)},getAspectRatioCandidate=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},collectAspectRatioByDevice=(e,t)=>{let o=!1,i=core.DEVICES.reduce((i,r)=>{let a=core.getResponsiveValueByScreen(e,r),l=core.getResponsiveValueByScreen(t,r),n=getAspectRatioCandidate(a,l?.type==="video");return n&&(i[r]=n,o=!0),i},{});return{aspectRatio:o?i:void 0}},collectYoutubeAspectRatio=(e,t,o)=>core.DEVICES.reduce((i,r)=>{let a=core.getValueByDevice(e,r),l=a?.type==="video"?a?.videoType:void 0,n=core.getValueByDevice(t,r),s=o?.[r];return s&&"youtube"===l&&"cover"!==n&&(i[r]=s),i},{}),getAspectRatio=(e,t)=>{let{aspectRatio:o}=collectAspectRatioByDevice(e,t);return o},getYoutubeAspectRatio=(e,t,o)=>{let i=collectYoutubeAspectRatio(e,t,o);return Object.keys(i).length?i:void 0},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=e?.[o];i&&(t={...t,[o]:"default"===i?"var(--g-ct-w, 1200px)":i})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:i}=e,r=-i;if(o<r)return 0;if(o>t)return 100;let a=(o-r)/(t-r)*100;return Math.min(Math.max(a,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let o={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let r=isScaleImage({enableParallax:t,attachment:e[i]?.attachment});o={...o,[i]:t?"150%":r?"100vh":"100%"}}),core.makeStyleResponsive("h",o)},getWidthHeroBanner=(e,t)=>{let o={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let r=isScaleImage({enableParallax:t,attachment:e[i]?.attachment});o={...o,[i]:r?"100vw":"100%"}}),core.makeStyleResponsive("w",o)},getTopHeroBanner=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),core.makeStyleResponsive("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),i=getWidthHeroBanner(e,t),r=getTopHeroBanner(e);return{...o,...i,...r}},calcRounderClipPath=(e,t=0,o=0)=>{let i=t,r=t;if(t>o?i=o:r=o,e>=999){let t=e-i;return t>0?t:0}let a=e-r;return a>0?a:0},getClipPath=(e,t)=>{if(!t)return`${_const.DEFAULT_CLIP_PATH}`;let[o,i,r,a]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:l,btrr:n,bbrr:s,bblr:p}=t,g=calcRounderClipPath(parseInt(l??"0")||0,o,a),c=calcRounderClipPath(parseInt(n??"0")||0,o,i),b=calcRounderClipPath(parseInt(s??"0")||0,i,r),d=calcRounderClipPath(parseInt(p??"0")||0,r,a);return[g,c,b,d].every(e=>0===e)?`${_const.DEFAULT_CLIP_PATH}`:`inset(0 0 0 round ${g}px ${c}px ${b}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),get1ColLayout=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let i=t[e]?.cols??[],r=i.length<=1,a=o[e];if(!r||!a)return;let l=["space-between","top","center","bottom"];return l.includes(a)?a:void 0},getClassSpaceBetween=(e,t)=>{let o=getResponsiveSetting(e),i=getResponsiveSetting(t),r={desktop:get1ColLayout({device:"desktop",settingLayoutRes:o,contentPosition1ColRes:i}),tablet:get1ColLayout({device:"tablet",settingLayoutRes:o,contentPosition1ColRes:i}),mobile:get1ColLayout({device:"mobile",settingLayoutRes:o,contentPosition1ColRes:i})},a={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},l={};return core.DEVICES.forEach(e=>{let t=r[e],o=a?.[t]?.[e];l[o]=!0}),l},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",i=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",r=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":i,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":r,"mobile:!gp-h-auto":!r}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=core.getResponsiveValueByScreen(e,o);t={...t,[o]:i}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let r=core.getResponsiveValueByScreen(e,i),a=!!getDataVideoHeroBannerResponsive(i,t),l=r?.shape,n=r?.height,s="original"===l&&"fit-content"!==n;o={...o,[i]:s&&!a}}),core.cls(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",i=e.tablet||o,r=e.mobile||i;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[i||"center"]}`]:!!i,[`mobile:gp-justify-${t[r||"center"]}`]:!!r}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,i=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:i}},showVideoType=e=>core.DEVICES.some(t=>{let o=core.getValueByDevice(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...i){clearTimeout(o),o=setTimeout(()=>e.apply(this,i),t)}}const fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:constant.HREF_TO_SALES_PAGE,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:i}},getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,i="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||i},getVideoAspectRatio=e=>{if(!e)return 16/9;let t=Number(e.getAttribute("width")),o=Number(e.getAttribute("height"));return t>0&&o>0?t/o:16/9},resetVideoIframeStyle=e=>{e&&(e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("transform"),e.style.removeProperty("position"))},setVideoWrapperStyle=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},resetVideoWrapperStyle=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},getContainerRatio=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},updateVideoIframeSize=({iframeEl:e,containerRatio:t,videoObjectFit:o})=>{let i,r;if(!e||!t)return;let a=getVideoAspectRatio(e);if("contain"===o){Object.assign(e.style,{position:"absolute",top:"50%",left:"50%",width:"100%",height:"100%",transform:"translate(-50%, -50%)"});return}t>=a?(i=112.00000000000001,r=1.12*(t/a)*100):(r=112.00000000000001,i=1.12*(a/t)*100),Object.assign(e.style,{position:"absolute",top:"50%",left:"50%",width:`${i}%`,height:`${r}%`,transform:"translate(-50%, -50%)"})};exports.collectAspectRatioByDevice=collectAspectRatioByDevice,exports.collectYoutubeAspectRatio=collectYoutubeAspectRatio,exports.debounce=debounce,exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=formatHoverScale,exports.getAspectRatio=getAspectRatio,exports.getAttachmentDevice=getAttachmentDevice,exports.getBackgroundImageHeroBanner=getBackgroundImageHeroBanner,exports.getBannerLink=getBannerLink,exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getClassSpaceBetweenLeftRight=getClassSpaceBetweenLeftRight,exports.getClipPath=getClipPath,exports.getContainerRatio=getContainerRatio,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getEnableBgImageByDevice=getEnableBgImageByDevice,exports.getOpacityHover=getOpacityHover,exports.getPercentageVisible=getPercentageVisible,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatioHeroBannerCustom=getStyleAspectRatioHeroBannerCustom,exports.getStyleHeroBannerBg=getStyleHeroBannerBg,exports.getVideoAspectRatio=getVideoAspectRatio,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.getYoutubeAspectRatio=getYoutubeAspectRatio,exports.horizontalAlign=horizontalAlign,exports.imagePlaceholder=imagePlaceholder,exports.isScaleImage=isScaleImage,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal,exports.opacityEnabledData=opacityEnabledData,exports.resetVideoIframeStyle=resetVideoIframeStyle,exports.resetVideoWrapperStyle=resetVideoWrapperStyle,exports.scrollToContentBanner=scrollToContentBanner,exports.setVideoWrapperStyle=setVideoWrapperStyle,exports.showVideoType=showVideoType,exports.updateVideoIframeSize=updateVideoIframeSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>void 0!==e||""===e))}const getStyle=(e,t,r)=>{let{sizeSetting:l
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>void 0!==e||""===e))}const getStyle=(e,t,r)=>{let{sizeSetting:l}=e??{},o={...r,...helpers.getVisibilityStyle(r),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(l,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(l))};return filterTruthyStyles(o)},getContainerStyle=e=>{let{sizeSetting:t,background:r,borderBg:l,cornerBg:o,shadowBg:a,hasActiveShadow:i}=e??{},y={...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t)),...helpers.getStyleAspectRatioHeroBannerCustom(r,t),...core.makeStyle({bs:l?.border??l?.border,bw:l?.width??l?.width,bc:core.getSingleColorVariable(l?.color)}),...core.getRadiusStyleActiveState({...o,active:{...o||{},radiusType:"custom"}}),...r?{...core.getStyleBgColor(r)}:{},...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:i})};return filterTruthyStyles(y)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r,hoverEffect:l}=e??{},{disableOpacity:o}=helpers.opacityEnabledData(e),a="number"!=typeof r?.normal||isNaN(r?.normal)?"string"==typeof r?.normal?`${parseInt(r?.normal)}%`:"0%":`${r?.normal}%`,i=core.makeStyleState("op",{normal:a,hover:helpers.getOpacityHover(e)}),y=core.getGlobalColorStateStyle("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete y?.["--bgc"],delete i?.["--op"]),l||(delete y?.["--hvr-bgc"],delete i?.["--hvr-op"]);let s={...y,...i,"--top":"0","--left":"0"};return filterTruthyStyles(s)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...core.getResponsiveStylePadding(t)};return filterTruthyStyles(r)},getAdaptiveStyle=e=>{let{sizeSetting:t,background:r}=e??{},l={...helpers.getDisplayStyleByFitContent(t,r),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t)),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(t,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"})};return filterTruthyStyles(l)},getBackgroundStyle=(e,t,r)=>{let{hoverEffectScale:l,background:o,hoverEffectDuration:a}=e??{},i=`${parseFloat(`${a}`)??.5}s`,y={...helpers.getStyleHeroBannerBg(helpers.getResponsiveSetting(o||{}),t),...core.getStyleBackgroundByDevice(o,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":i,"--scale":helpers.formatHoverScale(l),...core.makeStyleResponsive("pos",helpers.getAttachmentDevice(o)),transform:r,transition:`transform ${i} cubic-bezier(0,0,0,1)`};return filterTruthyStyles(y)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":helpers.getClipPath(t?.width,r)};return filterTruthyStyles(l)},mapVideoObjectFit=e=>{if(e)return{desktop:core.getValueByDevice(e,"desktop"),tablet:core.getValueByDevice(e,"tablet"),mobile:core.getValueByDevice(e,"mobile")}},getHtml5VideoStyle=(e,t)=>{let r=mapVideoObjectFit(t),l={...core.makeStyleResponsive("aspect",e),...r?core.makeStyleResponsive("objf",r):{}};return filterTruthyStyles(l)},getYoutubeIframeStyle=(e,t)=>{let r=mapVideoObjectFit(t),l={...core.makeStyleResponsive("aspect",e),...r?core.makeStyleResponsive("objf",r):{},"pointer-events":"none"};return filterTruthyStyles(l)};exports.getAdaptiveStyle=getAdaptiveStyle,exports.getBackgroundStyle=getBackgroundStyle,exports.getContainBackgroundStyle=getContainBackgroundStyle,exports.getContainerStyle=getContainerStyle,exports.getHtml5VideoStyle=getHtml5VideoStyle,exports.getOverlayStyle=getOverlayStyle,exports.getRowStyle=getRowStyle,exports.getStyle=getStyle,exports.getYoutubeIframeStyle=getYoutubeIframeStyle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),HeroBannerItem=require("./HeroBannerItem.js"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),system=require("@gem-sdk/system"),core=require("@gem-sdk/core"),helpers=require("../common/helpers.js"),useHeroBanner=require("../hooks/useHeroBanner.js");const HeroBanner=e=>{let{builderAttrs:s,builderProps:r,setting:t,styles:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),HeroBannerItem=require("./HeroBannerItem.js"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),system=require("@gem-sdk/system"),core=require("@gem-sdk/core"),helpers=require("../common/helpers.js"),useHeroBanner=require("../hooks/useHeroBanner.js"),React=require("react");const HeroBanner=e=>{let{builderAttrs:s,builderProps:r,setting:t,styles:a,style:n,children:o,advanced:l,enableLazyLoadImage:i=!0}=e,{isEditMode:u,isPreviewSharePageMode:c}=core.useRenderMode(),{enableLink:m}=t??{},d=helpers.getBannerLink(t),{cssClass:y}=l??{},j=core.useCurrentDevice(),{elementRef:f,transform:h,onMouseEnterParallax:R,onMouseLeaveParallax:g,dataVideo:B,bgRef:p,isShowVideoHtml5:q,openLinkBanner:x,layoutResponsive:C}=useHeroBanner.useHeroBanner(a,t,j),H=React.useRef(null),v=!!d?.link&&m&&!u&&!c,k=system.createAttr({...attrs.getAttr({uid:r?.uid||""})}),I=system.createAttr({...attrs.getAttrLink()}),L=system.createStyle({...styles.getStyle(a,t,n)}),b=system.createClass({...classes.getClasses({setting:t,builderProps:r,advancedCssClass:y})}),w=system.createClass({...classes.getLinkClasses()}),A=()=>jsxRuntime.jsx(HeroBannerItem.default,{setting:t,styles:a,children:o,rawChildren:e.rawChildren,builderProps:r,enableLazyLoadImage:i,elementRef:f,transform:h,dataVideo:B,layoutResponsive:C,bgRef:p,isShowVideoHtml5:q,heroBannerWrapperRef:H});return jsxRuntime.jsxs("div",{ref:H,...s,...k,className:b,style:L,onMouseEnter:R,onMouseLeave:g,children:[system.If(!v,A()),system.If(v,jsxRuntime.jsx("div",{...I,"aria-hidden":"true",onClick:x,className:w,children:A()})),core.filterToolbarPreview(o,!0)]})};exports.default=HeroBanner;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var HeroBannerItem_liquid=require("./HeroBannerItem.liquid.js"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),system=require("@gem-sdk/system"),core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("../common/helpers.js");const HeroBanner=e=>{let{builderAttrs:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var HeroBannerItem_liquid=require("./HeroBannerItem.liquid.js"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),system=require("@gem-sdk/system"),core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("../common/helpers.js");const HeroBanner=e=>{let{builderAttrs:t,builderProps:s,setting:r,styles:a,style:l,children:n,advanced:i,pageContext:o}=e,{enableLazyLoadImage:c}=o??{},{enableLink:d}=r??{},p=helpers$1.getBannerLink(r),{cssClass:g}=i??{},{urlData:u}=helpers.getInsertLinkData("",p),m=system.createStateOrContext({background:helpers$1.getResponsiveSetting(a?.background||{}),uid:s?.uid,enableParallax:Number(r?.speedParallax||0)>0,speedParallax:Number(r?.speedParallax)||0,hoverEffect:a?.hoverEffect,hoverEffectScale:a?.hoverEffectScale,layout:r?.layout,contentPosition1Col:a?.contentPosition1Col,contentPosition2Col:a?.contentPosition2Col,aspectRatio:r?.aspectRatio,sizeSetting:helpers$1.getResponsiveSetting(a?.sizeSetting||{}),videoObjectFit:helpers$1.getResponsiveSetting(a?.videoObjectFit||{}),target:p?.target??"_self",href:u?.href??"",linkType:p?.type??"",hoverEffectDuration:a?.hoverEffectDuration}),f=!!p?.link&&d,h=system.createAttr({...attrs.getAttr({uid:s?.uid||""})}),y=system.createAttr(attrs.getAttrLink()),v=system.createStyle({...styles.getStyle(a,r,l)}),$=system.createClass({...classes.getClasses({setting:r,builderProps:s,advancedCssClass:g})}),S=system.createClass({...classes.getLinkClasses()}),b=()=>HeroBannerItem_liquid.default({setting:r,styles:a,children:n,enableLazyLoadImage:c,rawChildren:e.rawChildren,builderProps:s});return core.template`
|
|
2
2
|
<gp-hero-banner
|
|
3
|
-
${{...
|
|
4
|
-
${{...
|
|
3
|
+
${{...t}}
|
|
4
|
+
${{...h}}
|
|
5
5
|
class="${$}"
|
|
6
6
|
style="${v}"
|
|
7
|
-
gp-data='${core.dataStringify(
|
|
7
|
+
gp-data='${core.dataStringify(m)}'
|
|
8
8
|
>
|
|
9
|
-
${system.If(!
|
|
10
|
-
${system.If(
|
|
9
|
+
${system.If(!f,b())}
|
|
10
|
+
${system.If(f,core.template`
|
|
11
11
|
<div
|
|
12
|
-
${{...
|
|
12
|
+
${{...y}}
|
|
13
13
|
aria-hidden="true"
|
|
14
14
|
class="${S}"
|
|
15
15
|
>
|
|
16
|
-
${
|
|
16
|
+
${b()}
|
|
17
17
|
</div>`)}
|
|
18
18
|
</gp-hero-banner>
|
|
19
|
-
${core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-hero-banner-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
19
|
+
${core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v2-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-hero-banner-v2-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
20
20
|
`)}
|
|
21
21
|
`};exports.default=HeroBanner;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),Row=require("../../grid/components/row/Row.js"),system=require("@gem-sdk/system"),AdaptiveImage=require("../../image/components/AdaptiveImage.js"),HTML5Embed=require("../../video/components/HTML5Embed.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js"),LiteYouTubeEmbed=require("../../video/components/LiteYouTubeEmbed.js"),helpers$1=require("../../video/common/helpers.js");const HeroBannerItem=e=>{core.useEditorMode();let{setting:s,styles:t,children:l,elementRef:a,transform:r,dataVideo:o,bgRef:i,isShowVideoHtml5:m,layoutResponsive:c}=e,{layout:y,verticalAlign:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),Row=require("../../grid/components/row/Row.js"),system=require("@gem-sdk/system"),AdaptiveImage=require("../../image/components/AdaptiveImage.js"),HTML5Embed=require("../../video/components/HTML5Embed.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js"),LiteYouTubeEmbed=require("../../video/components/LiteYouTubeEmbed.js"),helpers$1=require("../../video/common/helpers.js"),useHeroBannerItem=require("../hooks/useHeroBannerItem.js");const HeroBannerItem=e=>{core.useEditorMode();let{setting:s,styles:t,children:l,elementRef:a,transform:r,dataVideo:o,bgRef:i,isShowVideoHtml5:m,layoutResponsive:n,heroBannerWrapperRef:c}=e,{layout:y,verticalAlign:u,enableParallax:d,alt:p,title:g}=s??{},{background:v,overlayColor:j,verticalGutter:h,sizeSetting:C,contentWidth:b,hoverEffect:f,contentPosition1Col:x,contentPosition2Col:R,videoObjectFit:S}=t??{},I=system.createStyle({...styles.getContainerStyle(t)}),B=system.createClass({...classes.getContainerClasses(s,t)}),H=system.createStyle({...styles.getOverlayStyle(t)}),T=system.createClass({...classes.getOverlayClasses(t)}),k=system.createStyle({...styles.getRowStyle(t)}),q=system.createClass({...classes.getRowClasses(t,s)}),w=system.createStyle({...styles.getAdaptiveStyle(t)}),A=system.createClass({...classes.getAdaptivePictureClasses()}),L=system.createClass({...classes.getAdaptiveClasses()}),E=system.createClass({...classes.getBackgroundClasses(f,!1)}),N=system.createStyle({...helpers.getBackgroundImageHeroBanner(v,!1,!0),...styles.getBackgroundStyle(t,d,r)}),V=system.createClass({...classes.getContainBackgroundClasses()}),Y=system.createStyle({...styles.getContainBackgroundStyle(t)}),z=system.createClass({...classes.getHtml5VideoClasses(!m)}),{youtubeIframeWrapperRef:M,resolvedAspectRatio:$,youtubeAspectRatio:O}=useHeroBannerItem.default({videoType:o?.videoType,sizeSetting:C,background:v,videoObjectFit:S,heroBannerWrapperRef:c}),P=system.createStyle({...styles.getYoutubeIframeStyle(O,S)}),W=system.createStyle({...styles.getHtml5VideoStyle($,S)}),_=system.createClass({...classes.getWrapperYoutubeClasses()}),G=system.createClass({...classes.getIframeYoutubeClasses()}),D=React.useMemo(()=>{if(!helpers.showVideoType(v))return;if(o?.videoType==="html5"&&!o.videoHtml5||o?.videoType==="youtube"&&!o.video)return null;if(o?.type==="video"&&o?.videoType==="html5"&&o?.videoHtml5)return jsxRuntime.jsx(HTML5Embed.default,{muted:!0,loop:o?.loop,controls:!1,autoplay:!0,src:o?.videoHtml5||"",title:"Video",style:W,className:z});let e=o?.video??"",s=helpers$1.getYoutubeVideoId(e),t=o?.loop?1:0,l=`&loop=${t}&playlist=${s}&showinfo=0&rel=0&fs=0&enablejsapi=1`;if(o?.type==="video"&&o?.videoType==="youtube"&&s&&helpers$1.youtubeVideoRegex.test(e))return jsxRuntime.jsx("div",{ref:M,children:jsxRuntime.jsx(LiteYouTubeEmbed.default,{id:s,isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:l,adNetwork:!1,noCookie:!0,muted:!0,lazy:o?.lazyLoad??!0,style:P,wrapperClass:_,iframeClass:G})})},[o,v,z,G,_,P,W,M]);return jsxRuntime.jsxs("div",{className:B,style:I,children:[jsxRuntime.jsxs("div",{ref:a,className:V,style:Y,children:[jsxRuntime.jsx("div",{ref:i,className:E,style:N,children:D}),!!j&&jsxRuntime.jsx("div",{"aria-label":"Overlay",className:T,style:H})]}),jsxRuntime.jsx(Row.default,{className:q,style:k,setting:{layout:y,horizontalAlign:helpers.horizontalAlign(y,x,R),verticalAlign:u},styles:{verticalGutter:h,width:helpers.getWidth(b),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},hiddenEmptyCol:n?.cols?.length===1,onBlur:e=>helpers.scrollToContentBanner(e),children:core.filterToolbarPreview(l)}),jsxRuntime.jsx(AdaptiveImage.default,{pictureClass:A,srcSet:helpers.getBgImage(v),className:L,aspectRatio:core.getAspectRatioGlobalSize(C),style:w,alt:p,title:g,enableLazyLoadImage:!1,fallbackImg:helpers.fallbackImg})]})};exports.default=HeroBannerItem;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Row_liquid=require("../../grid/components/row/Row.liquid.js"),
|
|
2
|
-
<div class="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Row_liquid=require("../../grid/components/row/Row.liquid.js"),system=require("@gem-sdk/system"),AdaptiveImage_liquid=require("../../image/components/AdaptiveImage.liquid.js"),HTML5Embed_liquid=require("../../video/components/HTML5Embed.liquid.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js"),helpers$1=require("../../image/common/helpers.js"),NextImage_liquid=require("../../image/components/NextImage.liquid.js"),LiteYouTubeEmbed_liquid=require("../../video/components/LiteYouTubeEmbed.liquid.js"),helpers$3=require("../../video/common/helpers.js"),helpers$2=require("../../grid/components/row/common/helpers.js"),constants=require("../../image/constants.js");const HeroBannerItem=e=>{let{enableLazyLoadImage:s=!0,setting:t,styles:l,children:a,builderProps:r,rawChildren:i}=e,{layout:o,verticalAlign:c,enableParallax:m,alt:d,title:u,preload:y}=t??{},{background:n,overlayColor:p,verticalGutter:g,sizeSetting:C,contentWidth:h,hoverEffect:q,contentPosition1Col:v,contentPosition2Col:b,videoObjectFit:S}=l??{},I=!y&&s,f=helpers.getAspectRatio(C,n),$=helpers.getYoutubeAspectRatio(n,S,f),R=helpers.getResponsiveSetting(n||{}),j=R.desktop,B=system.createStyle({...styles.getContainerStyle(l)}),k=system.createClass({...classes.getContainerClasses(t,l)}),A=system.createStyle({...styles.getOverlayStyle(l)}),_=system.createClass({...classes.getOverlayClasses(l)}),w=system.createStyle({...styles.getRowStyle(l)}),H=system.createClass({...classes.getRowClasses(l,t)}),T=system.createStyle({...styles.getAdaptiveStyle(l)}),V=system.createClass({...classes.getAdaptivePictureClasses()}),E=system.createClass({...classes.getAdaptiveClasses()}),L=system.createClass({...classes.getBackgroundClasses(q,I)}),Y=system.createStyle({...helpers.getBackgroundImageHeroBanner(n,I,!1),...styles.getBackgroundStyle(l,m,"")}),N=system.createClass({...classes.getContainBackgroundClasses()}),x=system.createStyle({...styles.getContainBackgroundStyle(l)}),z=system.createClass({...classes.getHtml5VideoClasses(!1)}),O=system.createStyle({...styles.getYoutubeIframeStyle($,S)}),D=system.createClass({...classes.getWrapperYoutubeClasses()}),M=system.createStyle({...styles.getHtml5VideoStyle(f,S)}),P=system.createClass({...classes.getIframeYoutubeClasses()}),W=e=>system.createClass({...classes.getLazyBackgroundClasses(e)}),G=()=>{if(!y)return core.DEVICES.map(e=>system.If(helpers.getEnableBgImageByDevice(e,n),NextImage_liquid.default({src:helpers$1.getImageSrc(core.getResponsiveValueByScreen(helpers.getBgImage(n),e),e),alt:d,title:u,className:W(e),isDisableAspectStyle:!0,enableLazyLoadImage:s}))).join("")},F=()=>{if(!helpers.showVideoType(n))return;if(helpers$2.isRenderHtmlVideo(n))return HTML5Embed_liquid.default({uid:r?.uid,muted:!0,loop:j?.loop,controls:!1,autoplay:!0,src:j?.videoHtml5||"",title:"Video",style:M,className:z});let e=j?.video??"",s=helpers$3.getYoutubeVideoId(e),t=`&loop=false&playlist=${s}&showinfo=0&rel=0&fs=0&enablejsapi=1`;if(j?.type==="video"&&j?.videoType==="youtube"&&s&&helpers$3.youtubeVideoRegex.test(e))return LiteYouTubeEmbed_liquid.default({uid:r?.uid,id:s,isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:t,adNetwork:!1,noCookie:!0,muted:!0,lazy:j?.lazyLoad??!0,preload:!0,style:O,wrapperClass:D,iframeClass:P})};return core.template`
|
|
2
|
+
<div class="${k}" style="${B}">
|
|
3
3
|
<div
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
4
|
+
class="${N}"
|
|
5
|
+
style="${x}"
|
|
6
6
|
>
|
|
7
|
-
<div class="${
|
|
8
|
-
${
|
|
9
|
-
${
|
|
7
|
+
<div class="${L}" style="${Y}">
|
|
8
|
+
${G()}
|
|
9
|
+
${F()}
|
|
10
10
|
</div>
|
|
11
|
-
${system.If(!!p,core.template`<div aria-label="Overlay" class="${
|
|
11
|
+
${system.If(!!p,core.template`<div aria-label="Overlay" class="${_}" style="${A}"> </div>`)}
|
|
12
12
|
</div>
|
|
13
|
-
${Row_liquid.default({className:
|
|
14
|
-
${AdaptiveImage_liquid.default({pictureClass:
|
|
13
|
+
${Row_liquid.default({className:H,style:w,setting:{layout:o,horizontalAlign:helpers.horizontalAlign(o,v,b),verticalAlign:c},styles:{verticalGutter:g,width:helpers.getWidth(h),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},children:a,rawChildren:i})}
|
|
14
|
+
${AdaptiveImage_liquid.default({pictureClass:V,srcSet:helpers.getBgImage(n),className:E,...y&&constants.PRIORITY_LOAD_ATTRS,aspectRatio:core.getAspectRatioGlobalSize(C),style:T,alt:d,title:u,enableLazyLoadImage:s,fallbackImg:helpers.fallbackImg})}
|
|
15
15
|
</div>
|
|
16
16
|
`};exports.default=HeroBannerItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),core=require("@gem-sdk/core"),helpers=require("../common/helpers.js");const useHeroBannerItem=({videoType:e,sizeSetting:r,background:t,videoObjectFit:s,heroBannerWrapperRef:o})=>{let i=core.useCurrentDevice(),u=React.useRef(null),a=React.useMemo(()=>helpers.getAspectRatio(r,t),[r,t]),n=React.useMemo(()=>helpers.getYoutubeAspectRatio(t,s,a),[t,s,a]),l=helpers.getResponsiveSetting(s||{}),c=core.getResponsiveValueByScreen(l,i);return React.useEffect(()=>{let r=u.current;if(!r)return;let t=()=>r.querySelector("iframe");if("youtube"!==e){helpers.resetVideoIframeStyle(t()),helpers.resetVideoWrapperStyle(r);return}helpers.setVideoWrapperStyle(r);let s=()=>{helpers.updateVideoIframeSize({iframeEl:t(),containerRatio:helpers.getContainerRatio(o?.current),videoObjectFit:c||"cover"})},i=e=>{e.detail?.iframe&&setTimeout(()=>{s()},50)};r.addEventListener("youtube-iframe-ready",i),t()&&(window.requestAnimationFrame(s),setTimeout(()=>{s()},100));let a=window.ResizeObserver;if(!a)return()=>{r.removeEventListener("youtube-iframe-ready",i)};let n=new a(()=>s()),l=o?.current;return l&&n.observe(l),()=>{n.disconnect(),r.removeEventListener("youtube-iframe-ready",i),helpers.resetVideoIframeStyle(t()),helpers.resetVideoWrapperStyle(r)}},[e,c,i,a]),{youtubeIframeWrapperRef:u,resolvedAspectRatio:a,youtubeAspectRatio:n}};exports.default=useHeroBannerItem;
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
</clipPath>
|
|
13
13
|
</defs>
|
|
14
14
|
</svg>
|
|
15
|
-
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}},link:{type:"go-to-sales-page"}},styles:{contentWidth:{desktop:"1200px"},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"html5",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};exports.heroBannerVideoPreSalesPage=heroBannerVideoPreSalesPage;
|
|
15
|
+
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}},link:{type:"go-to-sales-page"}},styles:{contentWidth:{desktop:"1200px"},sizeSetting:{desktop:{shapeVideo:"16/9",enableVideoShape:!0}},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"html5",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};exports.heroBannerVideoPreSalesPage=heroBannerVideoPreSalesPage;
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
</clipPath>
|
|
13
13
|
</defs>
|
|
14
14
|
</svg>
|
|
15
|
-
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{contentWidth:{desktop:"1200px"},sizeSetting:{desktop:{shape:"original",width:"100%"},mobile:{shape:"original",width:"100%"}},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"youtube",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};exports.heroBannerVideo=heroBannerVideo;
|
|
15
|
+
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{contentWidth:{desktop:"1200px"},sizeSetting:{desktop:{shape:"original",width:"100%",shapeVideo:"16/9",enableVideoShape:!0},mobile:{shape:"original",width:"100%",shapeVideo:"16/9",enableVideoShape:!0}},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"youtube",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};exports.heroBannerVideo=heroBannerVideo;
|
|
@@ -143,4 +143,4 @@
|
|
|
143
143
|
d="M4.39584 15.625C3.36031 15.625 2.52084 14.7855 2.52084 13.75V12.5C2.52084 11.4645 3.36031 10.625 4.39584 10.625H14.3958C15.4314 10.625 16.2708 11.4645 16.2708 12.5V13.75C16.2708 14.7855 15.4314 15.625 14.3958 15.625H4.39584ZM3.77084 13.75C3.77084 14.0952 4.05066 14.375 4.39584 14.375H14.3958C14.741 14.375 15.0208 14.0952 15.0208 13.75V12.5C15.0208 12.1548 14.741 11.875 14.3958 11.875H4.39584C4.05066 11.875 3.77084 12.1548 3.77084 12.5V13.75Z"
|
|
144
144
|
fill="currentColor"
|
|
145
145
|
/>
|
|
146
|
-
</svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%"}},mobile:{default:{shape:"custom",width:"100%"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,showDeviceControl:!0,devices:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"120%",showDefaultUnit:!0},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,inputType:"number",placeholder:"",disableAutoValue:!0,showDefaultUnit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"},showDefaultUnit:!0},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border",compoDefaultValue:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];exports.SettingsV2=SettingsV2;
|
|
146
|
+
</svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%",shapeVideo:"16/9",enableVideoShape:!1}},mobile:{default:{shape:"custom",width:"100%",shapeVideo:"custom",enableVideoShape:!1}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],displayVideoOptions:["1/1","16/9","21/9","3/2","4/3","3/4","9/16","2/3","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"videoObjectFit",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-video-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-video-contain"}],devices:{desktop:{default:"cover"}}},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,showDeviceControl:!0,devices:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"120%",showDefaultUnit:!0},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,inputType:"number",placeholder:"",disableAutoValue:!0,showDefaultUnit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"},showDefaultUnit:!0},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border",compoDefaultValue:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];exports.SettingsV2=SettingsV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1},valueIfNull:{width:"100%",height:"fit-content"},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!0},valueIfNull:{enableVideoShape:!0},groupType:"style",controlType:"size-setting"}},{condition:'background.type != "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!1},valueIfNull:{enableVideoShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{setting:{id:"sizeSetting"},layout:"vertical"},{label:{en:"Scale"},setting:{id:"videoObjectFit"},conditionDisplay:'background.type == "video"'}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},controlChangeTrigger:{settings:[{condition:"overlayColor.hover == 'transparent'",source:["overlayColor","overlayOpacity"],action:{controlId:"overlayOpacity",groupType:"style",controlType:"style",state:"hover",newValue:"20%"}}],options:{noRecordHistory:!0}},compoDefaultValue:"#121212",label:{en:"Color"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Image alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getClasses=({className:e,builderProps:s,isInstantLP:t,advancedCssClass:l})=>{let g=`!gp-max-w-none gp-bg-black gp-overflow-hidden [&_>_article]:gp-aspect-[var(--aspect)] tablet:[&_>_article]:gp-aspect-[var(--aspect-tablet,_var(--aspect))] mobile:[&_>_article]:gp-aspect-[var(--aspect-mobile,_var(--aspect-tablet,_var(--aspect)))] ${s?.uid}`;return t||(g+=" gp-relative"),e&&(g+=` ${e}`),l&&(g+=` ${l}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(g)}},getButtonThumbnailClasses=()=>({...composeClasses("gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800]")}),getFallbackImageClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getWrapThumbnailClasses=e=>{let s="gp-absolute gp-top-0 gp-left-0 gp-w-full gp-thumbnail-video gp-h-full";return e&&(s+=" gp-hidden"),{...composeClasses(s)}},getImageThumbnailClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getArticleVimeoClasses=(e,s)=>{let t="gp-relative gp-bg-cover gp-bg-center gp-lite-vimeo-embed-article",l=core.getResponsiveValueByScreen(s,"desktop"),g=core.getResponsiveValueByScreen(s,"tablet"),a=core.getResponsiveValueByScreen(s,"mobile");return e||l&&"auto"!=l||(t+=" !gp-aspect-video"),e||g&&"auto"!=g||(t+=" tablet:!gp-aspect-video"),e||a&&"auto"!=a||(t+=" mobile:!gp-aspect-video"),{...composeClasses(t)}},getVideoYoutubeClasses=(e,s)=>{let t="gp-w-full";return e&&(t+=` ${e}`),s||(t+=" gp-lazyload-video"),{...composeClasses(t)}},getImageVimeoClasses=e=>{let s="gp-h-full gp-w-full gp-relative gp-top-0 gp-left-0 gp-z-9";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getButtonVimeoClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800] gp-z-10 gp-lite-vimeo-embed-button";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getIframeVimeoClasses=()=>({...composeClasses("gp-inset-0 gp-w-full gp-bg-black")}),getButtonYoutubeClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-w-[68px] -gp-translate-x-1/2 -gp-translate-y-1/2 gp-lite-youtube-embed-button";return e?s+=" gp-opacity-0":s+=" gp-visible gp-opacity-100",{...composeClasses(s)}},getImageYoutubeClasses=()=>({...composeClasses("gp-invisible gp-w-full gp-h-full gp_lazyforbg")}),getArticleYoutubeClasses=(e,s)=>{let t="gp-relative gp-bg-cover gp-bg-center gp-lite-youtube-embed-article";return e||(t+=" gp_lazybg"),s&&(t+=` ${s}`),{...composeClasses(t)}},getIframeYoutubeClasses=e=>{let s="gp-inset-0 gp-w-full gp-bg-black ";return e&&(s+=` ${e}`),{...composeClasses(s)}},getYoutubeContentClasses=()=>({...composeClasses("gp-absolute gp-left-0 gp-top-0 gp-
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getClasses=({className:e,builderProps:s,isInstantLP:t,advancedCssClass:l})=>{let g=`!gp-max-w-none gp-bg-black gp-overflow-hidden [&_>_article]:gp-aspect-[var(--aspect)] tablet:[&_>_article]:gp-aspect-[var(--aspect-tablet,_var(--aspect))] mobile:[&_>_article]:gp-aspect-[var(--aspect-mobile,_var(--aspect-tablet,_var(--aspect)))] ${s?.uid}`;return t||(g+=" gp-relative"),e&&(g+=` ${e}`),l&&(g+=` ${l}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(g)}},getButtonThumbnailClasses=()=>({...composeClasses("gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800]")}),getFallbackImageClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getWrapThumbnailClasses=e=>{let s="gp-absolute gp-top-0 gp-left-0 gp-w-full gp-thumbnail-video gp-h-full";return e&&(s+=" gp-hidden"),{...composeClasses(s)}},getImageThumbnailClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getArticleVimeoClasses=(e,s)=>{let t="gp-relative gp-bg-cover gp-bg-center gp-lite-vimeo-embed-article",l=core.getResponsiveValueByScreen(s,"desktop"),g=core.getResponsiveValueByScreen(s,"tablet"),a=core.getResponsiveValueByScreen(s,"mobile");return e||l&&"auto"!=l||(t+=" !gp-aspect-video"),e||g&&"auto"!=g||(t+=" tablet:!gp-aspect-video"),e||a&&"auto"!=a||(t+=" mobile:!gp-aspect-video"),{...composeClasses(t)}},getVideoYoutubeClasses=(e,s)=>{let t="gp-w-full";return e&&(t+=` ${e}`),s||(t+=" gp-lazyload-video"),{...composeClasses(t)}},getImageVimeoClasses=e=>{let s="gp-h-full gp-w-full gp-relative gp-top-0 gp-left-0 gp-z-9";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getButtonVimeoClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800] gp-z-10 gp-lite-vimeo-embed-button";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getIframeVimeoClasses=()=>({...composeClasses("gp-inset-0 gp-w-full gp-bg-black")}),getButtonYoutubeClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-w-[68px] -gp-translate-x-1/2 -gp-translate-y-1/2 gp-lite-youtube-embed-button";return e?s+=" gp-opacity-0":s+=" gp-visible gp-opacity-100",{...composeClasses(s)}},getImageYoutubeClasses=()=>({...composeClasses("gp-invisible gp-w-full gp-h-full gp_lazyforbg")}),getArticleYoutubeClasses=(e,s)=>{let t="gp-relative gp-bg-cover gp-bg-center gp-lite-youtube-embed-article";return e||(t+=" gp_lazybg"),s&&(t+=` ${s}`),{...composeClasses(t)}},getIframeYoutubeClasses=e=>{let s="gp-inset-0 gp-w-full gp-bg-black gp-h-full !gp-max-w-none";return e&&(s+=` ${e}`),{...composeClasses(s)}},getYoutubeContentClasses=()=>({...composeClasses("gp-absolute gp-left-0 gp-top-0 gp-h-full gp-w-full")});exports.getArticleVimeoClasses=getArticleVimeoClasses,exports.getArticleYoutubeClasses=getArticleYoutubeClasses,exports.getButtonThumbnailClasses=getButtonThumbnailClasses,exports.getButtonVimeoClasses=getButtonVimeoClasses,exports.getButtonYoutubeClasses=getButtonYoutubeClasses,exports.getClasses=getClasses,exports.getFallbackImageClasses=getFallbackImageClasses,exports.getIframeVimeoClasses=getIframeVimeoClasses,exports.getIframeYoutubeClasses=getIframeYoutubeClasses,exports.getImageThumbnailClasses=getImageThumbnailClasses,exports.getImageVimeoClasses=getImageVimeoClasses,exports.getImageYoutubeClasses=getImageYoutubeClasses,exports.getVideoYoutubeClasses=getVideoYoutubeClasses,exports.getWrapThumbnailClasses=getWrapThumbnailClasses,exports.getYoutubeContentClasses=getYoutubeContentClasses;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),YouTube=require("react-youtube"),helpers=require("../common/helpers.js"),NextImage=require("../../image/components/NextImage.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useLiteYoutubeEmbed=require("../hooks/useLiteYoutubeEmbed.js");const LiteYouTubeEmbed=e=>{let t=core.useEditorMode(),s="edit"!==t,{style:a,poster:r,iframeClass:l,wrapperClass:u,title:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),YouTube=require("react-youtube"),helpers=require("../common/helpers.js"),NextImage=require("../../image/components/NextImage.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useLiteYoutubeEmbed=require("../hooks/useLiteYoutubeEmbed.js");const LiteYouTubeEmbed=e=>{let t=core.useEditorMode(),s="edit"!==t,{style:a,poster:r,iframeClass:l,wrapperClass:u,title:i}=e,{preload:o}=r||{},{videoId:c,paramsImp:m,posterUrl:n,iframeSrc:d}=helpers.getYoutubeParams(e),{iframe:y,intervalPlay:b,warmConnections:g,isVideoStarted:p,videoDuration:j,addIframe:x}=useLiteYoutubeEmbed.useLiteYoutubeEmbed(e,m,c),f=o&&s,h=system.createClass({...classes.getButtonYoutubeClasses(y)}),C=system.createClass({...classes.getImageYoutubeClasses()}),Y=system.createClass({...classes.getArticleYoutubeClasses(f||!1,u)}),v=system.createClass({...classes.getIframeYoutubeClasses(l)}),R=system.createStyle({...styles.getIframeYoutubeStyle(a)}),S=system.createStyle({...styles.getArticleYoutubeStyle(a,n)}),E=system.createClass({...classes.getYoutubeContentClasses()}),N=()=>{if(e.isHeroBanner&&helpers.isSettingLoop(m))return jsxRuntime.jsx(YouTube,{videoId:c,title:i,iframeClassName:v,style:R,className:E,opts:{host:"https://www.youtube-nocookie.com",playerVars:{autoplay:1,state:1,controls:0,mute:1,...helpers.covertStrParamsToObj(m)}},onReady:t=>{if(t.target.playVideo(),j.current=Math.floor(t.target.getDuration()),e.isHeroBanner){let e=t.target.getIframe();if(e){let t=e.closest("article")||e.parentElement;if(t){let s=new CustomEvent("youtube-iframe-ready",{detail:{iframe:e},bubbles:!0,cancelable:!0});t.dispatchEvent(s)}}}},onStateChange:e=>{let t=e.target;p.current||(t.playVideo(),p.current=!0,b(e)),0===e.data&&(j.current=t.getCurrentTime(),t.playVideo(),b(e))}});let t=jsxRuntime.jsx("iframe",{className:v,style:R,title:i,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:d});return e.isHeroBanner?jsxRuntime.jsx("div",{className:E,children:t}):t};return jsxRuntime.jsxs("article",{"aria-hidden":!0,className:Y,"data-title":i,style:S,onPointerOver:g,onClick:x,children:[jsxRuntime.jsx(NextImage.default,{src:n,alt:r?.altText,title:r?.imageTitle,priority:s&&o,enableLazyLoadImage:!0,className:C,isDisableAspectStyle:!0}),jsxRuntime.jsx("button",{type:"button","aria-label":"Play",className:h,children:jsxRuntime.jsxs("svg",{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%",children:[jsxRuntime.jsx("path",{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",fill:"#f00"}),jsxRuntime.jsx("path",{d:"M 45,24 27,14 27,34",fill:"#fff"})]})}),y&&N()]})};exports.default=LiteYouTubeEmbed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createClass as g}from"@gem-sdk/system";let getClass=l=>{let{builderProps:p,advanced:e,className:a}=l,o=g({"gp-background-video gp-absolute gp-overflow-hidden gp-w-full gp-h-full left-0 top-0 !gp-block":!0}),s=g({"gp-bg-video gp-relative gp-h-full":!0}),t=g({...a&&{[a]:!0},...p?.uid&&{[p.uid]:!0},"gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]":!0,...e?.cssClass&&{[e?.cssClass]:!0}}),u=g({"gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full":!0}),r=g({"gp-
|
|
1
|
+
import{createClass as g}from"@gem-sdk/system";let getClass=l=>{let{builderProps:p,advanced:e,className:a}=l,o=g({"gp-background-video gp-absolute gp-overflow-hidden gp-w-full gp-h-full left-0 top-0 !gp-block":!0}),s=g({"gp-bg-video gp-relative gp-h-full":!0}),t=g({...a&&{[a]:!0},...p?.uid&&{[p.uid]:!0},"gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]":!0,...e?.cssClass&&{[e?.cssClass]:!0}}),u=g({"gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full":!0}),r=g({"gp-h-full gp-w-full !gp-max-w-none gp-background-article":!0}),i=g({"!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]":!0});return{rowClass:t,backgroundBoxClass:o,backgroundBoxInnerClass:s,sectionClass:u,wrapperYoutubeClasses:r,iframeYoutubeClasses:i}};export{getClass};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getGlobalColorStateClass as e
|
|
1
|
+
import{getGlobalColorStateClass as e}from"@gem-sdk/core";import{getClassAlignBanner as s,getResponsiveSetting as o,getClassContentPosition as l,getContentPosition as a,getClassForContentByFitContent as t,getClassForStretchContent as r,getClassSpaceBetween as g,opacityEnabledData as p,getClassSpaceBetweenLeftRight as n,getOpacityHover as i}from"./helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({setting:e,builderProps:l,advancedCssClass:a})=>{let t="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return a&&(t+=` ${a}`),{...l?.uid&&{[l.uid]:!0},...composeClasses(t),...s(o(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...l(a(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),enableTransitionHover=e=>{let{overlayColor:s}=e??{},o=s?.hover||s?.normal;return o&&"transparent"!==o&&"0%"!=i(e)},getOverlayClasses=s=>{let{overlayColor:o,hoverEffect:l}=s??{},{disableOpacity:a}=p(s),t="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)]";return enableTransitionHover(s)&&(t+=" gp-transition-all gp-duration-300"),l&&(t+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),e("bg",o,a,!l)&&(t+=` ${e("bg",o,a,!l)}`),composeClasses(t)},getRowClasses=(e,s)=>{let{sizeSetting:o,background:l}=e??{},{verticalAlign:a}=s??{},p=t(o,l),i=r(a),u=g(s?.layout||{},e?.contentPosition1Col||{}),C=n(s?.layout||{}),c=`gp-hero-banner-row ${p} ${i}`;return{...composeClasses(c),...u,...C}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full gp-invisible -gp-z-1"),getBackgroundClasses=(e,s)=>{let o="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(o+=" gp_lazybg"),e&&(o+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(o)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e=!1)=>{let s="gp-relative gp-h-full";return e&&(s+=" gp-hidden"),composeClasses(s)},getWrapperYoutubeClasses=()=>composeClasses("gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none"),getIframeYoutubeClasses=()=>composeClasses("gp-inset-0 gp-w-full gp-bg-black gp-h-full !gp-max-w-none"),getLazyBackgroundClasses=e=>{let s="gp-absolute gp-top-0 gp-invisible gp-w-full gp_lazyload gp-h-full gp_lazyforbg";return"tablet"===e&&(s+=" gp_lazybg_tl"),"mobile"===e&&(s+=" gp_lazybg_mb"),composeClasses(s)};export{enableTransitionHover,getAdaptiveClasses,getAdaptivePictureClasses,getBackgroundClasses,getClasses,getContainBackgroundClasses,getContainerClasses,getHtml5VideoClasses,getIframeYoutubeClasses,getLazyBackgroundClasses,getLinkClasses,getOverlayClasses,getRowClasses,getWrapperYoutubeClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as a,cls as n}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";import{DEFAULT_CLIP_PATH as p}from"./const.js";let getContentPosition=(t,o,i)=>{let a={};return l.map(l=>{let n=e(t,l),r=e(o,l),s=e(i,l);a={...a,[l]:1>=(n?.cols?.length||1)?r:s}}),a},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},a={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return a},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let n=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(n,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(a)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(a)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let a={};return l.forEach(o=>{a={...a,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",a)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,a)=>{let n=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(n={...n,[t]:"16/9"}),a&&a[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(n={...n,[t]:a[t]})}),o("aspect",n)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},a=["desktop","mobile","tablet"];return a.forEach(o=>{let a=e(t,o),n=!!getDataVideoHeroBannerResponsive(o,l),r=a?.shape,s=a?.height,g="original"===r&&"fit-content"!==s&&!n;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let a=(o-i)/(t-i)*100;return Math.min(Math.max(a,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let a=e-i;return a>0?a:0},getClipPath=(e,t)=>{if(!t)return`${p}`;let[o,l,i,a]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:n,btrr:r,bbrr:s,bblr:g}=t,b=calcRounderClipPath(parseInt(n??"0")||0,o,a),c=calcRounderClipPath(parseInt(r??"0")||0,o,l),d=calcRounderClipPath(parseInt(s??"0")||0,l,i),m=calcRounderClipPath(parseInt(g??"0")||0,i,a);return[b,c,d,m].every(e=>0===e)?`${p}`:`inset(0 0 0 round ${b}px ${c}px ${d}px ${m}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),get1ColLayout=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let l=t[e]?.cols??[],i=l.length<=1,a=o[e];if(!i||!a)return;let n=["space-between","top","center","bottom"];return n.includes(a)?a:void 0},getClassSpaceBetween=(e,t)=>{let o=getResponsiveSetting(e),i=getResponsiveSetting(t),a={desktop:get1ColLayout({device:"desktop",settingLayoutRes:o,contentPosition1ColRes:i}),tablet:get1ColLayout({device:"tablet",settingLayoutRes:o,contentPosition1ColRes:i}),mobile:get1ColLayout({device:"mobile",settingLayoutRes:o,contentPosition1ColRes:i})},n={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},r={};return l.forEach(e=>{let t=a[e],o=n?.[t]?.[e];r[o]=!0}),r},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),n("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let a=e(t,i),n=!!getDataVideoHeroBannerResponsive(i,o),r=a?.shape,s=a?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!n}}),n(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},l=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:l}},getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,l="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||l};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getOpacityHover,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
|
|
1
|
+
import{DEVICES as e,makeStyleResponsive as t,getValueByDevice as o,getResponsiveValueByScreen as i,GRADIENT_BGR_KEY as l,getAspectRatioGlobalSize as a,cls as r}from"@gem-sdk/core";import{getImageSrc as n,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as p}from"../../constant.js";import{DEFAULT_CLIP_PATH as g}from"./const.js";let getContentPosition=(t,o,l)=>{let a={};return e.map(e=>{let r=i(t,e),n=i(o,e),s=i(l,e);a={...a,[e]:1>=(r?.cols?.length||1)?n:s}}),a},getEnableBgImageByDevice=(e,t)=>{if(!i(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,a)=>{if(!e)return"";let r=getBgImage(e),s=i(e,t),p=o?`url(${imagePlaceholder(e)[t]})`:`url(${n(i(r,t),t,a)})`,g=s?.color?`, ${s.color}`:"";return s?.color?.includes(l)&&s?.type==="image"?`${p}${g}`:s?.color?.includes(l)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?p:"url()"},getBackgroundImageHeroBanner=(o,i=!1,l=!1)=>{if(!o)return;let a={};return e.forEach(e=>{a={...a,[e]:getBgImageByScreen(o,e,i,l)}}),t("bgi",a)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=e?.[o]?.attachment;t={...t,[o]:"fixed"===i?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getVideoRatioFromSizeSetting=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||"auto":void 0!==o?o:e?.shapeValue??t},applyVideoRatioForDevice=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:i})=>{let l=getVideoRatioFromSizeSetting(e,t);return l&&"auto"!==l?{...i,[o]:l}:i},getStyleAspectRatioHeroBannerCustom=(e,o)=>{let l=a(o),r=["desktop","mobile","tablet"];return r.forEach(t=>{let a=i(o,t),r=!!getDataVideoHeroBannerResponsive(t,e);r&&(l=applyVideoRatioForDevice({shapeByDevice:a,fallbackRatio:l?.[t],device:t,currentResult:l}))}),t("aspect",l)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,o)=>{let l={desktop:"none",tablet:"none",mobile:"none"},a=["desktop","mobile","tablet"];return a.forEach(t=>{let a=i(e,t),r=!!getDataVideoHeroBannerResponsive(t,o),n=a?.shape,s=a?.height,p="original"===n&&"fit-content"!==s&&!r;l={...l,[t]:p?"block":"none"}}),t("d",l)},getAspectRatioCandidate=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},collectAspectRatioByDevice=(t,o)=>{let l=!1,a=e.reduce((e,a)=>{let r=i(t,a),n=i(o,a),s=getAspectRatioCandidate(r,n?.type==="video");return s&&(e[a]=s,l=!0),e},{});return{aspectRatio:l?a:void 0}},collectYoutubeAspectRatio=(t,i,l)=>e.reduce((e,a)=>{let r=o(t,a),n=r?.type==="video"?r?.videoType:void 0,s=o(i,a),p=l?.[a];return p&&"youtube"===n&&"cover"!==s&&(e[a]=p),e},{}),getAspectRatio=(e,t)=>{let{aspectRatio:o}=collectAspectRatioByDevice(e,t);return o},getYoutubeAspectRatio=(e,t,o)=>{let i=collectYoutubeAspectRatio(e,t,o);return Object.keys(i).length?i:void 0},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let i=e?.[o];i&&(t={...t,[o]:"default"===i?"var(--g-ct-w, 1200px)":i})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:i}=e,l=-i;if(o<l)return 0;if(o>t)return 100;let a=(o-l)/(t-l)*100;return Math.min(Math.max(a,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,o)=>{let i={},l=["desktop","mobile","tablet"];return l.forEach(t=>{let l=isScaleImage({enableParallax:o,attachment:e[t]?.attachment});i={...i,[t]:o?"150%":l?"100vh":"100%"}}),t("h",i)},getWidthHeroBanner=(e,o)=>{let i={},l=["desktop","mobile","tablet"];return l.forEach(t=>{let l=isScaleImage({enableParallax:o,attachment:e[t]?.attachment});i={...i,[t]:l?"100vw":"100%"}}),t("w",i)},getTopHeroBanner=e=>{let o={},i=["desktop","mobile","tablet"];return i.forEach(t=>{o={...o,[t]:e[t]?.attachment==="fixed"?"0px":""}}),t("top",o)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),i=getWidthHeroBanner(e,t),l=getTopHeroBanner(e);return{...o,...i,...l}},calcRounderClipPath=(e,t=0,o=0)=>{let i=t,l=t;if(t>o?i=o:l=o,e>=999){let t=e-i;return t>0?t:0}let a=e-l;return a>0?a:0},getClipPath=(e,t)=>{if(!t)return`${g}`;let[o,i,l,a]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:r,btrr:n,bbrr:s,bblr:p}=t,c=calcRounderClipPath(parseInt(r??"0")||0,o,a),b=calcRounderClipPath(parseInt(n??"0")||0,o,i),d=calcRounderClipPath(parseInt(s??"0")||0,i,l),m=calcRounderClipPath(parseInt(p??"0")||0,l,a);return[c,b,d,m].every(e=>0===e)?`${g}`:`inset(0 0 0 round ${c}px ${b}px ${d}px ${m}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),get1ColLayout=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let i=t[e]?.cols??[],l=i.length<=1,a=o[e];if(!l||!a)return;let r=["space-between","top","center","bottom"];return r.includes(a)?a:void 0},getClassSpaceBetween=(t,o)=>{let i=getResponsiveSetting(t),l=getResponsiveSetting(o),a={desktop:get1ColLayout({device:"desktop",settingLayoutRes:i,contentPosition1ColRes:l}),tablet:get1ColLayout({device:"tablet",settingLayoutRes:i,contentPosition1ColRes:l}),mobile:get1ColLayout({device:"mobile",settingLayoutRes:i,contentPosition1ColRes:l})},r={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},n={};return e.forEach(e=>{let t=a[e],o=r?.[t]?.[e];n[o]=!0}),n},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",i=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",l=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":i,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":l,"mobile:!gp-h-auto":!l}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=i(e,o);t={...t,[o]:l}}),r("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let a=i(e,l),r=!!getDataVideoHeroBannerResponsive(l,t),n=a?.shape,s=a?.height,p="original"===n&&"fit-content"!==s;o={...o,[l]:p&&!r}}),r(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",i=e.tablet||o,l=e.mobile||i;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[i||"center"]}`]:!!i,[`mobile:gp-justify-${t[l||"center"]}`]:!!l}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,i=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:i}},showVideoType=t=>e.some(e=>{let i=o(t,e);return i?.type!=="color"&&i?.type!=="image"&&!!i&&(i?.videoType==="html5"&&i?.videoHtml5||i?.videoType==="youtube"&&i?.video)});function debounce(e,t){let o;return function(...i){clearTimeout(o),o=setTimeout(()=>e.apply(this,i),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:p,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:i}},getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,i="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||i},getVideoAspectRatio=e=>{if(!e)return 16/9;let t=Number(e.getAttribute("width")),o=Number(e.getAttribute("height"));return t>0&&o>0?t/o:16/9},resetVideoIframeStyle=e=>{e&&(e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("transform"),e.style.removeProperty("position"))},setVideoWrapperStyle=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},resetVideoWrapperStyle=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},getContainerRatio=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},updateVideoIframeSize=({iframeEl:e,containerRatio:t,videoObjectFit:o})=>{let i,l;if(!e||!t)return;let a=getVideoAspectRatio(e);if("contain"===o){Object.assign(e.style,{position:"absolute",top:"50%",left:"50%",width:"100%",height:"100%",transform:"translate(-50%, -50%)"});return}t>=a?(i=112.00000000000001,l=1.12*(t/a)*100):(l=112.00000000000001,i=1.12*(a/t)*100),Object.assign(e.style,{position:"absolute",top:"50%",left:"50%",width:`${i}%`,height:`${l}%`,transform:"translate(-50%, -50%)"})};export{collectAspectRatioByDevice,collectYoutubeAspectRatio,debounce,fallbackImg,formatHoverScale,getAspectRatio,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContainerRatio,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getOpacityHover,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVideoAspectRatio,getVisibilityStyle,getWidth,getYoutubeAspectRatio,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,resetVideoIframeStyle,resetVideoWrapperStyle,scrollToContentBanner,setVideoWrapperStyle,showVideoType,updateVideoIframeSize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleWithDefault as e,getWidthByShapeGlobalSize as t,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as
|
|
1
|
+
import{makeStyleWithDefault as e,getWidthByShapeGlobalSize as t,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as n,getStyleBgColor as a,getStyleShadow as y,makeStyleState as g,getGlobalColorStateStyle as s,getResponsiveStylePadding as u,getStyleBackgroundByDevice as c,getValueByDevice as d}from"@gem-sdk/core";import{getVisibilityStyle as b,getStyleAspectRatioHeroBannerCustom as p,getOpacityHover as m,getDisplayStyleByFitContent as S,getStyleHeroBannerBg as h,formatHoverScale as f,getAttachmentDevice as w,getClipPath as v,opacityEnabledData as T,getResponsiveSetting as k}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>void 0!==e||""===e))}let getStyle=(o,i,n)=>{let{sizeSetting:a}=o??{},y={...n,...b(n),...e("w",t(a,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...r("h",l(a))};return filterTruthyStyles(y)},getContainerStyle=e=>{let{sizeSetting:t,background:g,borderBg:s,cornerBg:u,shadowBg:c,hasActiveShadow:d}=e??{},b={...r("h",l(t)),...p(g,t),...o({bs:s?.border??s?.border,bw:s?.width??s?.width,bc:i(s?.color)}),...n({...u,active:{...u||{},radiusType:"custom"}}),...g?{...a(g)}:{},...y({value:c,styleAppliedFor:"box-shadow",isEnableShadow:d})};return filterTruthyStyles(b)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r,hoverEffect:l}=e??{},{disableOpacity:o}=T(e),i="number"!=typeof r?.normal||isNaN(r?.normal)?"string"==typeof r?.normal?`${parseInt(r?.normal)}%`:"0%":`${r?.normal}%`,n=g("op",{normal:i,hover:m(e)}),a=s("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete a?.["--bgc"],delete n?.["--op"]),l||(delete a?.["--hvr-bgc"],delete n?.["--hvr-op"]);let y={...a,...n,"--top":"0","--left":"0"};return filterTruthyStyles(y)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...u(t)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:i,background:n}=o??{},a={...S(i,n),...r("h",l(i)),...e("w",t(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"})};return filterTruthyStyles(a)},getBackgroundStyle=(e,t,l)=>{let{hoverEffectScale:o,background:i,hoverEffectDuration:n}=e??{},a=`${parseFloat(`${n}`)??.5}s`,y={...h(k(i||{}),t),...c(i,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":a,"--scale":f(o),...r("pos",w(i)),transform:l,transition:`transform ${a} cubic-bezier(0,0,0,1)`};return filterTruthyStyles(y)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":v(t?.width,r)};return filterTruthyStyles(l)},mapVideoObjectFit=e=>{if(e)return{desktop:d(e,"desktop"),tablet:d(e,"tablet"),mobile:d(e,"mobile")}},getHtml5VideoStyle=(e,t)=>{let l=mapVideoObjectFit(t),o={...r("aspect",e),...l?r("objf",l):{}};return filterTruthyStyles(o)},getYoutubeIframeStyle=(e,t)=>{let l=mapVideoObjectFit(t),o={...r("aspect",e),...l?r("objf",l):{},"pointer-events":"none"};return filterTruthyStyles(o)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"./HeroBannerItem.js";import{getAttr as s,getAttrLink as m}from"../common/attrs.js";import{getStyle as
|
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"./HeroBannerItem.js";import{getAttr as s,getAttrLink as m}from"../common/attrs.js";import{getStyle as n}from"../common/styles.js";import{getClasses as t,getLinkClasses as a}from"../common/classes.js";import{createAttr as i,createStyle as l,createClass as d,If as f}from"@gem-sdk/system";import{useRenderMode as p,useCurrentDevice as c,filterToolbarPreview as u}from"@gem-sdk/core";import{getBannerLink as h}from"../common/helpers.js";import{useHeroBanner as j}from"../hooks/useHeroBanner.js";import{useRef as y}from"react";let HeroBanner=g=>{let{builderAttrs:k,builderProps:v,setting:B,styles:C,style:H,children:R,advanced:b,enableLazyLoadImage:w=!0}=g,{isEditMode:L,isPreviewSharePageMode:x}=p(),{enableLink:I}=B??{},M=h(B),{cssClass:N}=b??{},V=c(),{elementRef:z,transform:E,onMouseEnterParallax:P,onMouseLeaveParallax:S,dataVideo:W,bgRef:q,isShowVideoHtml5:A,openLinkBanner:D,layoutResponsive:F}=j(C,B,V),G=y(null),J=!!M?.link&&I&&!L&&!x,K=i({...s({uid:v?.uid||""})}),O=i({...m()}),Q=l({...n(C,B,H)}),T=d({...t({setting:B,builderProps:v,advancedCssClass:N})}),U=d({...a()}),X=()=>r(o,{setting:B,styles:C,children:R,rawChildren:g.rawChildren,builderProps:v,enableLazyLoadImage:w,elementRef:z,transform:E,dataVideo:W,layoutResponsive:F,bgRef:q,isShowVideoHtml5:A,heroBannerWrapperRef:G});return e("div",{ref:G,...k,...K,className:T,style:Q,onMouseEnter:P,onMouseLeave:S,children:[f(!J,X()),f(J,r("div",{...O,"aria-hidden":"true",onClick:D,className:U,children:X()})),u(R,!0)]})};export{HeroBanner as default};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as
|
|
1
|
+
import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as t}from"../common/attrs.js";import{getStyle as o}from"../common/styles.js";import{getClasses as s,getLinkClasses as a}from"../common/classes.js";import{createStateOrContext as i,createAttr as n,createStyle as l,createClass as c,If as d}from"@gem-sdk/system";import{template as m,dataStringify as p,RenderIf as f,isLocalEnv as h,baseAssetURL as u}from"@gem-sdk/core";import{getInsertLinkData as v,getSettingPreloadData as g}from"../../helpers.js";import{getResponsiveSetting as $,getBannerLink as b}from"../common/helpers.js";let HeroBanner=j=>{let{builderAttrs:E,builderProps:y,setting:P,styles:S,style:k,children:C,advanced:x,pageContext:B}=j,{enableLazyLoadImage:H}=B??{},{enableLink:N}=P??{},O=b(P),{cssClass:R}=x??{},{urlData:_}=v("",O),w=i({background:$(S?.background||{}),uid:y?.uid,enableParallax:Number(P?.speedParallax||0)>0,speedParallax:Number(P?.speedParallax)||0,hoverEffect:S?.hoverEffect,hoverEffectScale:S?.hoverEffectScale,layout:P?.layout,contentPosition1Col:S?.contentPosition1Col,contentPosition2Col:S?.contentPosition2Col,aspectRatio:P?.aspectRatio,sizeSetting:$(S?.sizeSetting||{}),videoObjectFit:$(S?.videoObjectFit||{}),target:O?.target??"_self",href:_?.href??"",linkType:O?.type??"",hoverEffectDuration:S?.hoverEffectDuration}),z=!!O?.link&&N,A=n({...r({uid:y?.uid||""})}),D=n(t()),F=l({...o(S,P,k)}),G=c({...s({setting:P,builderProps:y,advancedCssClass:R})}),I=c({...a()}),T=()=>e({setting:P,styles:S,children:C,enableLazyLoadImage:H,rawChildren:j.rawChildren,builderProps:y});return m`
|
|
2
2
|
<gp-hero-banner
|
|
3
|
-
${{...
|
|
4
|
-
${{...
|
|
5
|
-
class="${
|
|
6
|
-
style="${
|
|
7
|
-
gp-data='${
|
|
3
|
+
${{...E}}
|
|
4
|
+
${{...A}}
|
|
5
|
+
class="${G}"
|
|
6
|
+
style="${F}"
|
|
7
|
+
gp-data='${p(w)}'
|
|
8
8
|
>
|
|
9
|
-
${
|
|
10
|
-
${
|
|
9
|
+
${d(!z,T())}
|
|
10
|
+
${d(z,m`
|
|
11
11
|
<div
|
|
12
|
-
${{...
|
|
12
|
+
${{...D}}
|
|
13
13
|
aria-hidden="true"
|
|
14
|
-
class="${
|
|
14
|
+
class="${I}"
|
|
15
15
|
>
|
|
16
|
-
${
|
|
16
|
+
${T()}
|
|
17
17
|
</div>`)}
|
|
18
18
|
</gp-hero-banner>
|
|
19
|
-
${f(h,`<script ${g('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${g('class="gps-link" delay',"src")}="${u}/assets-v2/gp-hero-banner-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
19
|
+
${f(h,`<script ${g('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v2-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${g('class="gps-link" delay',"src")}="${u}/assets-v2/gp-hero-banner-v2-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
20
20
|
`)}
|
|
21
21
|
`};export{HeroBanner as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useMemo as t}from"react";import{useEditorMode as
|
|
2
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useMemo as t}from"react";import{useEditorMode as r,filterToolbarPreview as l,getAspectRatioGlobalSize as s}from"@gem-sdk/core";import i from"../../grid/components/row/Row.js";import{createStyle as m,createClass as a}from"@gem-sdk/system";import d from"../../image/components/AdaptiveImage.js";import n from"../../video/components/HTML5Embed.js";import{getContainerStyle as p,getOverlayStyle as c,getRowStyle as y,getAdaptiveStyle as f,getBackgroundStyle as v,getContainBackgroundStyle as u,getYoutubeIframeStyle as h,getHtml5VideoStyle as b}from"../common/styles.js";import{getContainerClasses as j,getOverlayClasses as g,getRowClasses as H,getAdaptivePictureClasses as N,getAdaptiveClasses as T,getBackgroundClasses as k,getContainBackgroundClasses as w,getHtml5VideoClasses as I,getWrapperYoutubeClasses as B,getIframeYoutubeClasses as C}from"../common/classes.js";import{getBackgroundImageHeroBanner as L,showVideoType as z,horizontalAlign as E,getWidth as x,scrollToContentBanner as A,getBgImage as R,fallbackImg as V}from"../common/helpers.js";import $ from"../../video/components/LiteYouTubeEmbed.js";import{getYoutubeVideoId as M,youtubeVideoRegex as O}from"../../video/common/helpers.js";import S from"../hooks/useHeroBannerItem.js";let HeroBannerItem=W=>{r();let{setting:Y,styles:q,children:D,elementRef:F,transform:G,dataVideo:J,bgRef:K,isShowVideoHtml5:P,layoutResponsive:Q,heroBannerWrapperRef:U}=W,{layout:X,verticalAlign:Z,enableParallax:_,alt:ee,title:eo}=Y??{},{background:et,overlayColor:er,verticalGutter:el,sizeSetting:es,contentWidth:ei,hoverEffect:em,contentPosition1Col:ea,contentPosition2Col:ed,videoObjectFit:en}=q??{},ep=m({...p(q)}),ec=a({...j(Y,q)}),ey=m({...c(q)}),ef=a({...g(q)}),ev=m({...y(q)}),eu=a({...H(q,Y)}),eh=m({...f(q)}),eb=a({...N()}),ej=a({...T()}),eg=a({...k(em,!1)}),eH=m({...L(et,!1,!0),...v(q,_,G)}),eN=a({...w()}),eT=m({...u(q)}),ek=a({...I(!P)}),{youtubeIframeWrapperRef:ew,resolvedAspectRatio:eI,youtubeAspectRatio:eB}=S({videoType:J?.videoType,sizeSetting:es,background:et,videoObjectFit:en,heroBannerWrapperRef:U}),eC=m({...h(eB,en)}),eL=m({...b(eI,en)}),ez=a({...B()}),eE=a({...C()}),ex=t(()=>{if(!z(et))return;if(J?.videoType==="html5"&&!J.videoHtml5||J?.videoType==="youtube"&&!J.video)return null;if(J?.type==="video"&&J?.videoType==="html5"&&J?.videoHtml5)return e(n,{muted:!0,loop:J?.loop,controls:!1,autoplay:!0,src:J?.videoHtml5||"",title:"Video",style:eL,className:ek});let o=J?.video??"",t=M(o),r=J?.loop?1:0,l=`&loop=${r}&playlist=${t}&showinfo=0&rel=0&fs=0&enablejsapi=1`;if(J?.type==="video"&&J?.videoType==="youtube"&&t&&O.test(o))return e("div",{ref:ew,children:e($,{id:t,isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:l,adNetwork:!1,noCookie:!0,muted:!0,lazy:J?.lazyLoad??!0,style:eC,wrapperClass:ez,iframeClass:eE})})},[J,et,ek,eE,ez,eC,eL,ew]);return o("div",{className:ec,style:ep,children:[o("div",{ref:F,className:eN,style:eT,children:[e("div",{ref:K,className:eg,style:eH,children:ex}),!!er&&e("div",{"aria-label":"Overlay",className:ef,style:ey})]}),e(i,{className:eu,style:ev,setting:{layout:X,horizontalAlign:E(X,ea,ed),verticalAlign:Z},styles:{verticalGutter:el,width:x(ei),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},hiddenEmptyCol:Q?.cols?.length===1,onBlur:e=>A(e),children:l(D)}),e(d,{pictureClass:eb,srcSet:R(et),className:ej,aspectRatio:s(es),style:eh,alt:ee,title:eo,enableLazyLoadImage:!1,fallbackImg:V})]})};export{HeroBannerItem as default};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
<div class="${
|
|
1
|
+
import{template as e,getAspectRatioGlobalSize as o,DEVICES as s,getResponsiveValueByScreen as t}from"@gem-sdk/core";import i from"../../grid/components/row/Row.liquid.js";import{createStyle as m,createClass as r,If as l}from"@gem-sdk/system";import a from"../../image/components/AdaptiveImage.liquid.js";import p from"../../video/components/HTML5Embed.liquid.js";import{getContainerStyle as d,getOverlayStyle as n,getRowStyle as c,getAdaptiveStyle as u,getBackgroundStyle as f,getContainBackgroundStyle as y,getYoutubeIframeStyle as v,getHtml5VideoStyle as j}from"../common/styles.js";import{getContainerClasses as $,getOverlayClasses as g,getRowClasses as b,getAdaptivePictureClasses as h,getAdaptiveClasses as w,getBackgroundClasses as k,getContainBackgroundClasses as N,getHtml5VideoClasses as q,getWrapperYoutubeClasses as H,getIframeYoutubeClasses as C,getLazyBackgroundClasses as I}from"../common/classes.js";import{getAspectRatio as z,getYoutubeAspectRatio as A,getBackgroundImageHeroBanner as B,horizontalAlign as L,getWidth as T,getBgImage as x,fallbackImg as E,getEnableBgImageByDevice as R,showVideoType as S,getResponsiveSetting as V}from"../common/helpers.js";import{getImageSrc as D}from"../../image/common/helpers.js";import M from"../../image/components/NextImage.liquid.js";import O from"../../video/components/LiteYouTubeEmbed.liquid.js";import{getYoutubeVideoId as W,youtubeVideoRegex as Y}from"../../video/common/helpers.js";import{isRenderHtmlVideo as F}from"../../grid/components/row/common/helpers.js";import{PRIORITY_LOAD_ATTRS as G}from"../../image/constants.js";let HeroBannerItem=J=>{let{enableLazyLoadImage:K=!0,setting:P,styles:Q,children:U,builderProps:X,rawChildren:Z}=J,{layout:_,verticalAlign:ee,enableParallax:eo,alt:es,title:et,preload:ei}=P??{},{background:em,overlayColor:er,verticalGutter:el,sizeSetting:ea,contentWidth:ep,hoverEffect:ed,contentPosition1Col:en,contentPosition2Col:ec,videoObjectFit:eu}=Q??{},ef=!ei&&K,ey=z(ea,em),ev=A(em,eu,ey),ej=V(em||{}),e$=ej.desktop,eg=m({...d(Q)}),eb=r({...$(P,Q)}),eh=m({...n(Q)}),ew=r({...g(Q)}),ek=m({...c(Q)}),eN=r({...b(Q,P)}),eq=m({...u(Q)}),eH=r({...h()}),eC=r({...w()}),eI=r({...k(ed,ef)}),ez=m({...B(em,ef,!1),...f(Q,eo,"")}),eA=r({...N()}),eB=m({...y(Q)}),eL=r({...q(!1)}),eT=m({...v(ev,eu)}),ex=r({...H()}),eE=m({...j(ey,eu)}),eR=r({...C()}),eS=e=>r({...I(e)}),eV=()=>{if(!ei)return s.map(e=>l(R(e,em),M({src:D(t(x(em),e),e),alt:es,title:et,className:eS(e),isDisableAspectStyle:!0,enableLazyLoadImage:K}))).join("")},eD=()=>{if(!S(em))return;if(F(em))return p({uid:X?.uid,muted:!0,loop:e$?.loop,controls:!1,autoplay:!0,src:e$?.videoHtml5||"",title:"Video",style:eE,className:eL});let e=e$?.video??"",o=W(e),s=`&loop=false&playlist=${o}&showinfo=0&rel=0&fs=0&enablejsapi=1`;if(e$?.type==="video"&&e$?.videoType==="youtube"&&o&&Y.test(e))return O({uid:X?.uid,id:o,isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:s,adNetwork:!1,noCookie:!0,muted:!0,lazy:e$?.lazyLoad??!0,preload:!0,style:eT,wrapperClass:ex,iframeClass:eR})};return e`
|
|
2
|
+
<div class="${eb}" style="${eg}">
|
|
3
3
|
<div
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
4
|
+
class="${eA}"
|
|
5
|
+
style="${eB}"
|
|
6
6
|
>
|
|
7
|
-
<div class="${
|
|
8
|
-
${
|
|
9
|
-
${
|
|
7
|
+
<div class="${eI}" style="${ez}">
|
|
8
|
+
${eV()}
|
|
9
|
+
${eD()}
|
|
10
10
|
</div>
|
|
11
|
-
${l(!!er,
|
|
11
|
+
${l(!!er,e`<div aria-label="Overlay" class="${ew}" style="${eh}"> </div>`)}
|
|
12
12
|
</div>
|
|
13
|
-
${
|
|
14
|
-
${a({pictureClass:
|
|
13
|
+
${i({className:eN,style:ek,setting:{layout:_,horizontalAlign:L(_,en,ec),verticalAlign:ee},styles:{verticalGutter:el,width:T(ep),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},children:U,rawChildren:Z})}
|
|
14
|
+
${a({pictureClass:eH,srcSet:x(em),className:eC,...ei&&G,aspectRatio:o(ea),style:eq,alt:es,title:et,enableLazyLoadImage:K,fallbackImg:E})}
|
|
15
15
|
</div>
|
|
16
16
|
`};export{HeroBannerItem as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as e,useMemo as r,useEffect as t}from"react";import{useCurrentDevice as o,getResponsiveValueByScreen as i}from"@gem-sdk/core";import{getAspectRatio as n,getYoutubeAspectRatio as u,resetVideoIframeStyle as m,resetVideoWrapperStyle as a,setVideoWrapperStyle as s,getResponsiveSetting as l,updateVideoIframeSize as c,getContainerRatio as d}from"../common/helpers.js";let useHeroBannerItem=({videoType:f,sizeSetting:v,background:y,videoObjectFit:b,heroBannerWrapperRef:p})=>{let w=o(),E=e(null),L=r(()=>n(v,y),[v,y]),R=r(()=>u(y,b,L),[y,b,L]),j=l(b||{}),q=i(j,w);return t(()=>{let e=E.current;if(!e)return;let r=()=>e.querySelector("iframe");if("youtube"!==f){m(r()),a(e);return}s(e);let t=()=>{c({iframeEl:r(),containerRatio:d(p?.current),videoObjectFit:q||"cover"})},o=e=>{e.detail?.iframe&&setTimeout(()=>{t()},50)};e.addEventListener("youtube-iframe-ready",o),r()&&(window.requestAnimationFrame(t),setTimeout(()=>{t()},100));let i=window.ResizeObserver;if(!i)return()=>{e.removeEventListener("youtube-iframe-ready",o)};let n=new i(()=>t()),u=p?.current;return u&&n.observe(u),()=>{n.disconnect(),e.removeEventListener("youtube-iframe-ready",o),m(r()),a(e)}},[f,q,w,L]),{youtubeIframeWrapperRef:E,resolvedAspectRatio:L,youtubeAspectRatio:R}};export{useHeroBannerItem as default};
|
|
@@ -12,4 +12,4 @@ let heroBannerVideoPreSalesPage={id:"hero-banner-video-pre-sales-page",name:{en:
|
|
|
12
12
|
</clipPath>
|
|
13
13
|
</defs>
|
|
14
14
|
</svg>
|
|
15
|
-
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}},link:{type:"go-to-sales-page"}},styles:{contentWidth:{desktop:"1200px"},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"html5",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};export{heroBannerVideoPreSalesPage};
|
|
15
|
+
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}},link:{type:"go-to-sales-page"}},styles:{contentWidth:{desktop:"1200px"},sizeSetting:{desktop:{shapeVideo:"16/9",enableVideoShape:!0}},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"html5",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};export{heroBannerVideoPreSalesPage};
|
|
@@ -12,4 +12,4 @@ let heroBannerVideo={id:"hero-banner-video",name:{en:"Video Banner"},icon:{deskt
|
|
|
12
12
|
</clipPath>
|
|
13
13
|
</defs>
|
|
14
14
|
</svg>
|
|
15
|
-
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{contentWidth:{desktop:"1200px"},sizeSetting:{desktop:{shape:"original",width:"100%"},mobile:{shape:"original",width:"100%"}},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"youtube",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};export{heroBannerVideo};
|
|
15
|
+
`},components:[{tag:"HeroBanner",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{contentWidth:{desktop:"1200px"},sizeSetting:{desktop:{shape:"original",width:"100%",shapeVideo:"16/9",enableVideoShape:!0},mobile:{shape:"original",width:"100%",shapeVideo:"16/9",enableVideoShape:!0}},background:{desktop:{type:"video",image:{src:"",width:1920,height:900},videoType:"youtube",video:"https://www.youtube.com/watch?v=drIt4RH_kyQ",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4"}}},childrens:[{tag:"Col",childrens:[{tag:"Heading",settings:{text:"Click here to edit heading"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Text",settings:{text:"This is your text block. Click to edit and make it your own. Share your product's story<br/> or services offered. Get creative and make it yours!"},styles:{textAlign:{desktop:"center"},typo:{attrs:{color:"#FFFFFF"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}},{tag:"Button",settings:{label:"Get started"},styles:{align:{desktop:"center"}}}]}]}]};export{heroBannerVideo};
|
|
@@ -143,4 +143,4 @@ let SettingsV2=[{id:"setting",controls:[{id:"layout",type:"layout-banner",device
|
|
|
143
143
|
d="M4.39584 15.625C3.36031 15.625 2.52084 14.7855 2.52084 13.75V12.5C2.52084 11.4645 3.36031 10.625 4.39584 10.625H14.3958C15.4314 10.625 16.2708 11.4645 16.2708 12.5V13.75C16.2708 14.7855 15.4314 15.625 14.3958 15.625H4.39584ZM3.77084 13.75C3.77084 14.0952 4.05066 14.375 4.39584 14.375H14.3958C14.741 14.375 15.0208 14.0952 15.0208 13.75V12.5C15.0208 12.1548 14.741 11.875 14.3958 11.875H4.39584C4.05066 11.875 3.77084 12.1548 3.77084 12.5V13.75Z"
|
|
144
144
|
fill="currentColor"
|
|
145
145
|
/>
|
|
146
|
-
</svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%"}},mobile:{default:{shape:"custom",width:"100%"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,showDeviceControl:!0,devices:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"120%",showDefaultUnit:!0},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,inputType:"number",placeholder:"",disableAutoValue:!0,showDefaultUnit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"},showDefaultUnit:!0},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border",compoDefaultValue:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];export{SettingsV2};
|
|
146
|
+
</svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%",shapeVideo:"16/9",enableVideoShape:!1}},mobile:{default:{shape:"custom",width:"100%",shapeVideo:"custom",enableVideoShape:!1}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],displayVideoOptions:["1/1","16/9","21/9","3/2","4/3","3/4","9/16","2/3","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"videoObjectFit",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-video-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-video-contain"}],devices:{desktop:{default:"cover"}}},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,showDeviceControl:!0,devices:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"120%",showDefaultUnit:!0},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,inputType:"number",placeholder:"",disableAutoValue:!0,showDefaultUnit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"},showDefaultUnit:!0},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border",compoDefaultValue:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];export{SettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1
|
|
1
|
+
let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1},valueIfNull:{width:"100%",height:"fit-content"},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!0},valueIfNull:{enableVideoShape:!0},groupType:"style",controlType:"size-setting"}},{condition:'background.type != "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!1},valueIfNull:{enableVideoShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{setting:{id:"sizeSetting"},layout:"vertical"},{label:{en:"Scale"},setting:{id:"videoObjectFit"},conditionDisplay:'background.type == "video"'}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},controlChangeTrigger:{settings:[{condition:"overlayColor.hover == 'transparent'",source:["overlayColor","overlayOpacity"],action:{controlId:"overlayOpacity",groupType:"style",controlType:"style",state:"hover",newValue:"20%"}}],options:{noRecordHistory:!0}},compoDefaultValue:"#121212",label:{en:"Color"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Image alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({className:e,builderProps:s,isInstantLP:t,advancedCssClass:l})=>{let g=`!gp-max-w-none gp-bg-black gp-overflow-hidden [&_>_article]:gp-aspect-[var(--aspect)] tablet:[&_>_article]:gp-aspect-[var(--aspect-tablet,_var(--aspect))] mobile:[&_>_article]:gp-aspect-[var(--aspect-mobile,_var(--aspect-tablet,_var(--aspect)))] ${s?.uid}`;return t||(g+=" gp-relative"),e&&(g+=` ${e}`),l&&(g+=` ${l}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(g)}},getButtonThumbnailClasses=()=>({...composeClasses("gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800]")}),getFallbackImageClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getWrapThumbnailClasses=e=>{let s="gp-absolute gp-top-0 gp-left-0 gp-w-full gp-thumbnail-video gp-h-full";return e&&(s+=" gp-hidden"),{...composeClasses(s)}},getImageThumbnailClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getArticleVimeoClasses=(s,t)=>{let l="gp-relative gp-bg-cover gp-bg-center gp-lite-vimeo-embed-article",g=e(t,"desktop"),p=e(t,"tablet"),a=e(t,"mobile");return s||g&&"auto"!=g||(l+=" !gp-aspect-video"),s||p&&"auto"!=p||(l+=" tablet:!gp-aspect-video"),s||a&&"auto"!=a||(l+=" mobile:!gp-aspect-video"),{...composeClasses(l)}},getVideoYoutubeClasses=(e,s)=>{let t="gp-w-full";return e&&(t+=` ${e}`),s||(t+=" gp-lazyload-video"),{...composeClasses(t)}},getImageVimeoClasses=e=>{let s="gp-h-full gp-w-full gp-relative gp-top-0 gp-left-0 gp-z-9";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getButtonVimeoClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800] gp-z-10 gp-lite-vimeo-embed-button";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getIframeVimeoClasses=()=>({...composeClasses("gp-inset-0 gp-w-full gp-bg-black")}),getButtonYoutubeClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-w-[68px] -gp-translate-x-1/2 -gp-translate-y-1/2 gp-lite-youtube-embed-button";return e?s+=" gp-opacity-0":s+=" gp-visible gp-opacity-100",{...composeClasses(s)}},getImageYoutubeClasses=()=>({...composeClasses("gp-invisible gp-w-full gp-h-full gp_lazyforbg")}),getArticleYoutubeClasses=(e,s)=>{let t="gp-relative gp-bg-cover gp-bg-center gp-lite-youtube-embed-article";return e||(t+=" gp_lazybg"),s&&(t+=` ${s}`),{...composeClasses(t)}},getIframeYoutubeClasses=e=>{let s="gp-inset-0 gp-w-full gp-bg-black ";return e&&(s+=` ${e}`),{...composeClasses(s)}},getYoutubeContentClasses=()=>({...composeClasses("gp-absolute gp-left-0 gp-top-0 gp-
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({className:e,builderProps:s,isInstantLP:t,advancedCssClass:l})=>{let g=`!gp-max-w-none gp-bg-black gp-overflow-hidden [&_>_article]:gp-aspect-[var(--aspect)] tablet:[&_>_article]:gp-aspect-[var(--aspect-tablet,_var(--aspect))] mobile:[&_>_article]:gp-aspect-[var(--aspect-mobile,_var(--aspect-tablet,_var(--aspect)))] ${s?.uid}`;return t||(g+=" gp-relative"),e&&(g+=` ${e}`),l&&(g+=` ${l}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(g)}},getButtonThumbnailClasses=()=>({...composeClasses("gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800]")}),getFallbackImageClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getWrapThumbnailClasses=e=>{let s="gp-absolute gp-top-0 gp-left-0 gp-w-full gp-thumbnail-video gp-h-full";return e&&(s+=" gp-hidden"),{...composeClasses(s)}},getImageThumbnailClasses=()=>({...composeClasses("gp-w-full gp-h-full gp-object-cover")}),getArticleVimeoClasses=(s,t)=>{let l="gp-relative gp-bg-cover gp-bg-center gp-lite-vimeo-embed-article",g=e(t,"desktop"),p=e(t,"tablet"),a=e(t,"mobile");return s||g&&"auto"!=g||(l+=" !gp-aspect-video"),s||p&&"auto"!=p||(l+=" tablet:!gp-aspect-video"),s||a&&"auto"!=a||(l+=" mobile:!gp-aspect-video"),{...composeClasses(l)}},getVideoYoutubeClasses=(e,s)=>{let t="gp-w-full";return e&&(t+=` ${e}`),s||(t+=" gp-lazyload-video"),{...composeClasses(t)}},getImageVimeoClasses=e=>{let s="gp-h-full gp-w-full gp-relative gp-top-0 gp-left-0 gp-z-9";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getButtonVimeoClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-flex gp-aspect-[56/32] gp-w-14 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-items-center gp-justify-center gp-rounded gp-bg-black/80 gp-transition-colors hover:gp-bg-[#ef0800] gp-z-10 gp-lite-vimeo-embed-button";return e&&(s+=" gp-invisible gp-opacity-0"),{...composeClasses(s)}},getIframeVimeoClasses=()=>({...composeClasses("gp-inset-0 gp-w-full gp-bg-black")}),getButtonYoutubeClasses=e=>{let s="gp-absolute gp-left-1/2 gp-top-1/2 gp-w-[68px] -gp-translate-x-1/2 -gp-translate-y-1/2 gp-lite-youtube-embed-button";return e?s+=" gp-opacity-0":s+=" gp-visible gp-opacity-100",{...composeClasses(s)}},getImageYoutubeClasses=()=>({...composeClasses("gp-invisible gp-w-full gp-h-full gp_lazyforbg")}),getArticleYoutubeClasses=(e,s)=>{let t="gp-relative gp-bg-cover gp-bg-center gp-lite-youtube-embed-article";return e||(t+=" gp_lazybg"),s&&(t+=` ${s}`),{...composeClasses(t)}},getIframeYoutubeClasses=e=>{let s="gp-inset-0 gp-w-full gp-bg-black gp-h-full !gp-max-w-none";return e&&(s+=` ${e}`),{...composeClasses(s)}},getYoutubeContentClasses=()=>({...composeClasses("gp-absolute gp-left-0 gp-top-0 gp-h-full gp-w-full")});export{getArticleVimeoClasses,getArticleYoutubeClasses,getButtonThumbnailClasses,getButtonVimeoClasses,getButtonYoutubeClasses,getClasses,getFallbackImageClasses,getIframeVimeoClasses,getIframeYoutubeClasses,getImageThumbnailClasses,getImageVimeoClasses,getImageYoutubeClasses,getVideoYoutubeClasses,getWrapThumbnailClasses,getYoutubeContentClasses};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import a from"react-youtube";import{getYoutubeParams as o,isSettingLoop as i,covertStrParamsToObj as l}from"../common/helpers.js";import s from"../../image/components/NextImage.js";import{createClass as m,createStyle as n}from"@gem-sdk/system";import{getButtonYoutubeClasses as c,getImageYoutubeClasses as u,getArticleYoutubeClasses as d,getIframeYoutubeClasses as p,getYoutubeContentClasses as f}from"../common/classes.js";import{getIframeYoutubeStyle as y,getArticleYoutubeStyle as b}from"../common/styles.js";import{useLiteYoutubeEmbed as g}from"../hooks/useLiteYoutubeEmbed.js";let LiteYouTubeEmbed=h=>{let C=r(),v="edit"!==C,{style:w,poster:N,iframeClass:j,wrapperClass:E,title:k}=h,{preload:x}=N||{},{videoId:B,paramsImp:L,posterUrl:S,iframeSrc:T}=o(h),{iframe:I,intervalPlay:V,warmConnections:H,isVideoStarted:M,videoDuration:Y,addIframe:z}=g(h,L,B),D=x&&v,P=m({...c(I)}),A=m({...u()}),F=m({...d(D||!1,E)}),O=m({...p(j)}),R=n({...y(w)}),q=n({...b(w,S)}),G=m({...f()}),J=()=>{if(h.isHeroBanner&&i(L))return t(a,{videoId:B,title:k,iframeClassName:O,style:R,className:G,opts:{host:"https://www.youtube-nocookie.com",playerVars:{autoplay:1,state:1,controls:0,mute:1,...l(L)}},onReady:e=>{if(e.target.playVideo(),Y.current=Math.floor(e.target.getDuration()),h.isHeroBanner){let t=e.target.getIframe();if(t){let e=t.closest("article")||t.parentElement;if(e){let r=new CustomEvent("youtube-iframe-ready",{detail:{iframe:t},bubbles:!0,cancelable:!0});e.dispatchEvent(r)}}}},onStateChange:e=>{let t=e.target;M.current||(t.playVideo(),M.current=!0,V(e)),0===e.data&&(Y.current=t.getCurrentTime(),t.playVideo(),V(e))}});let e=t("iframe",{className:O,style:R,title:k,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:T});return h.isHeroBanner?t("div",{className:G,children:e}):e};return e("article",{"aria-hidden":!0,className:F,"data-title":k,style:q,onPointerOver:H,onClick:z,children:[t(s,{src:S,alt:N?.altText,title:N?.imageTitle,priority:v&&x,enableLazyLoadImage:!0,className:A,isDisableAspectStyle:!0}),t("button",{type:"button","aria-label":"Play",className:P,children:e("svg",{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%",children:[t("path",{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",fill:"#f00"}),t("path",{d:"M 45,24 27,14 27,34",fill:"#fff"})]})}),I&&J()]})};export{LiteYouTubeEmbed as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ type TextProps = BasePropsWrap<TextSettingProps, TextStyleProps> & Omit<React.Co
|
|
|
147
147
|
disableEdit?: boolean;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
type ObjectFit$
|
|
150
|
+
type ObjectFit$2 = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
151
151
|
type BaseImageData = {
|
|
152
152
|
alt?: string;
|
|
153
153
|
src?: string;
|
|
@@ -161,8 +161,8 @@ type BaseImageData = {
|
|
|
161
161
|
};
|
|
162
162
|
type SharedProps = {
|
|
163
163
|
aspectRatio?: ObjectDevices<string>;
|
|
164
|
-
layout?: ObjectDevices<ObjectFit$
|
|
165
|
-
objectFit?: ObjectDevices<ObjectFit$
|
|
164
|
+
layout?: ObjectDevices<ObjectFit$2>;
|
|
165
|
+
objectFit?: ObjectDevices<ObjectFit$2>;
|
|
166
166
|
borderRadius?: ResponsiveStateProp<string>;
|
|
167
167
|
image?: BaseImageData;
|
|
168
168
|
};
|
|
@@ -639,6 +639,7 @@ declare const articleListSetting: {
|
|
|
639
639
|
ArticleReadMore: _gem_sdk_core.ComponentSetting<ArticleReadMoreSidebarSettingProps>;
|
|
640
640
|
};
|
|
641
641
|
|
|
642
|
+
type ObjectFit$1 = 'cover' | 'contain';
|
|
642
643
|
type HeroBannerSettingProps = {
|
|
643
644
|
link?: {
|
|
644
645
|
link?: string;
|
|
@@ -678,6 +679,7 @@ type HeroBannerStyleProps = {
|
|
|
678
679
|
sizeSetting?: ObjectDevices<SizeSettingGlobal>;
|
|
679
680
|
order?: ObjectDevices<number>;
|
|
680
681
|
contentPadding?: ObjectDevices<PaddingType$2>;
|
|
682
|
+
videoObjectFit?: ObjectDevices<ObjectFit$1>;
|
|
681
683
|
} & Pick<RowStyleProps, 'verticalGutter' | 'background'>;
|
|
682
684
|
type HeroBannerProps = BasePropsWrap<HeroBannerSettingProps, HeroBannerStyleProps> & {
|
|
683
685
|
children?: React.ReactNode;
|
|
@@ -1919,7 +1921,7 @@ type HeaderOriginalSettingProps = {
|
|
|
1919
1921
|
logoWidth?: ObjectDevices<string>;
|
|
1920
1922
|
logoAspectRatio?: ObjectDevices<string>;
|
|
1921
1923
|
customAspectRadio?: ObjectDevices<Ratio>;
|
|
1922
|
-
layout?: ObjectDevices<ObjectFit$
|
|
1924
|
+
layout?: ObjectDevices<ObjectFit$2>;
|
|
1923
1925
|
breakpoint?: 'tablet' | 'mobile' | 'desktop';
|
|
1924
1926
|
cartIcon?: string;
|
|
1925
1927
|
openMode?: 'popup' | 'page';
|
|
@@ -2201,7 +2203,7 @@ type ImageComparisonStyleProps = {
|
|
|
2201
2203
|
customAspectRadio?: ObjectDevices<Ratio>;
|
|
2202
2204
|
fullWidth?: ObjectDevices<boolean>;
|
|
2203
2205
|
width?: ObjectDevices<number | string>;
|
|
2204
|
-
imageScale?: ObjectDevices<ObjectFit$
|
|
2206
|
+
imageScale?: ObjectDevices<ObjectFit$2>;
|
|
2205
2207
|
labelPositionHoz?: ObjectDevices<string>;
|
|
2206
2208
|
labelPositionVer?: ObjectDevices<string>;
|
|
2207
2209
|
} & Pick<SharedProps, 'aspectRatio'>;
|
|
@@ -2887,7 +2889,7 @@ type PostPurchaseProductPriceBreakdownProps = BasePropsWrap<PostPurchaseProductP
|
|
|
2887
2889
|
};
|
|
2888
2890
|
|
|
2889
2891
|
type FeatureImageStyles$2 = {
|
|
2890
|
-
ftLayout?: ObjectDevices<ObjectFit$
|
|
2892
|
+
ftLayout?: ObjectDevices<ObjectFit$2>;
|
|
2891
2893
|
ftShape?: ObjectDevices<SizeSettingGlobal>;
|
|
2892
2894
|
ftCorner?: CornerRadius;
|
|
2893
2895
|
};
|
|
@@ -2928,7 +2930,7 @@ type SelectDisplaySetting$1 = {
|
|
|
2928
2930
|
preDisplay?: '1st-available-variant' | '1st-images' | '1st-video' | '1st-3d-mode';
|
|
2929
2931
|
};
|
|
2930
2932
|
type GalleryStyles$2 = {
|
|
2931
|
-
layout?: ObjectDevices<ObjectFit$
|
|
2933
|
+
layout?: ObjectDevices<ObjectFit$2>;
|
|
2932
2934
|
shape?: ObjectDevices<SizeSettingGlobal>;
|
|
2933
2935
|
shapeForBottom?: ObjectDevices<SizeSettingGlobal>;
|
|
2934
2936
|
shapeForFtOnly?: ObjectDevices<SizeSettingGlobal>;
|
|
@@ -3525,7 +3527,7 @@ declare const postPurchaseProductSetting: {
|
|
|
3525
3527
|
};
|
|
3526
3528
|
|
|
3527
3529
|
type FeatureImageStyles$1 = {
|
|
3528
|
-
ftLayout?: ObjectDevices<ObjectFit$
|
|
3530
|
+
ftLayout?: ObjectDevices<ObjectFit$2>;
|
|
3529
3531
|
ftShape?: ObjectDevices<SizeSettingGlobal>;
|
|
3530
3532
|
ftCorner?: CornerRadius;
|
|
3531
3533
|
};
|
|
@@ -3565,7 +3567,7 @@ type SelectDisplaySetting = {
|
|
|
3565
3567
|
preDisplay?: '1st-available-variant' | '1st-images' | '1st-video' | '1st-3d-mode';
|
|
3566
3568
|
};
|
|
3567
3569
|
type GalleryStyles$1 = {
|
|
3568
|
-
layout?: ObjectDevices<ObjectFit$
|
|
3570
|
+
layout?: ObjectDevices<ObjectFit$2>;
|
|
3569
3571
|
shape?: ObjectDevices<SizeSettingGlobal>;
|
|
3570
3572
|
shapeForBottom?: ObjectDevices<SizeSettingGlobal>;
|
|
3571
3573
|
shapeForFtOnly?: ObjectDevices<SizeSettingGlobal>;
|
|
@@ -4026,7 +4028,7 @@ type DynamicCheckoutLiquidProps = DynamicCheckoutProps & {
|
|
|
4026
4028
|
type FeatureImageStyles = {
|
|
4027
4029
|
ftAspectRatio?: ObjectDevices<string>;
|
|
4028
4030
|
ftCustomAspectRadio?: ObjectDevices<Ratio>;
|
|
4029
|
-
ftLayout?: ObjectDevices<ObjectFit$
|
|
4031
|
+
ftLayout?: ObjectDevices<ObjectFit$2>;
|
|
4030
4032
|
ftFullWidth?: ObjectDevices<boolean>;
|
|
4031
4033
|
ftWidth?: ObjectDevices<string>;
|
|
4032
4034
|
ftWidthHorizontalLayout?: ObjectDevices<string>;
|
|
@@ -4047,7 +4049,7 @@ type FeatureImageSetting = {
|
|
|
4047
4049
|
type GalleryStyles = {
|
|
4048
4050
|
aspectRatio?: ObjectDevices<string>;
|
|
4049
4051
|
customAspectRadio?: ObjectDevices<Ratio>;
|
|
4050
|
-
layout?: ObjectDevices<ObjectFit$
|
|
4052
|
+
layout?: ObjectDevices<ObjectFit$2>;
|
|
4051
4053
|
align?: ObjectDevices<Property.AlignItems>;
|
|
4052
4054
|
position?: ObjectDevices<string>;
|
|
4053
4055
|
spacing?: ObjectDevices<string | number>;
|
|
@@ -7989,4 +7991,4 @@ declare const replaceAllHrefFromString: (htmlString: string, hrefs: string[]) =>
|
|
|
7989
7991
|
declare function isEmptyObject(obj: Record<string, any>): boolean;
|
|
7990
7992
|
declare const handleClickLink: (setting?: ImageLink, mode?: RenderMode) => void;
|
|
7991
7993
|
|
|
7992
|
-
export { Accordion$1 as Accordion, AccordionItem$1 as AccordionItem, type AccordionItemProps, type AccordionProps, AftershipEmailMarketingsms$1 as AftershipEmailMarketingsms, type AftershipEmailMarketingsmsProps, AirProductReviewsAppUgc$1 as AirProductReviewsAppUgc, type AirProductReviewsAppUgcProps, AliReviews$1 as AliReviews, type AliReviewsProps, AlsoBoughtCbb$1 as AlsoBoughtCbb, type AlsoBoughtCbbProps, AovBundlesVolumeDiscounts$1 as AovBundlesVolumeDiscounts, type AovBundlesVolumeDiscountsProps, AovFreeGiftBuyXGetYBogo$1 as AovFreeGiftBuyXGetYBogo, type AovFreeGiftBuyXGetYBogoProps, AppointmentBookingCowlendar$1 as AppointmentBookingCowlendar, type AppointmentBookingCowlendarProps, AppstleBundlesDiscounts$1 as AppstleBundlesDiscounts, type AppstleBundlesDiscountsProps, AppstleSubscriptions$1 as AppstleSubscriptions, type AppstleSubscriptionsProps, ArticleAuthor$1 as ArticleAuthor, ArticleCategory$1 as ArticleCategory, ArticleContent$1 as ArticleContent, ArticleDate$1 as ArticleDate, ArticleExcerpt$1 as ArticleExcerpt, ArticleImage$1 as ArticleImage, ArticleList$1 as ArticleList, ArticlePagination$1 as ArticlePagination, ArticleReadMore$1 as ArticleReadMore, ArticleTag$1 as ArticleTag, ArticleTitle$1 as ArticleTitle, BasicHeader, BestBuyFulfillment$1 as BestBuyFulfillment, type BestBuyFulfillmentProps, BfSizeChartSizeGuide$1 as BfSizeChartSizeGuide, type BfSizeChartSizeGuideProps, BirdChime$1 as BirdChime, type BirdChimeProps, BloyRewardsProgramLoyalty$1 as BloyRewardsProgramLoyalty, type BloyRewardsProgramLoyaltyProps, Bogos$1 as Bogos, type BogosProps, BoldProductOptions$1 as BoldProductOptions, type BoldProductOptionsProps, BoldSubscriptions$1 as BoldSubscriptions, type BoldSubscriptionsProps, BonLoyaltyRewardsReferrals$1 as BonLoyaltyRewardsReferrals, type BonLoyaltyRewardsReferralsProps, BoostAISearchDiscovery$1 as BoostAISearchDiscovery, type BoostAISearchDiscoveryProps, Breadcrumb$1 as Breadcrumb, Breadcrumb$1 as BreadcrumbProps, Bundler$1 as Bundler, type BundlerProps, Button$2 as Button, type ButtonProps, CONTINUE_SELLING_WHEN_OUT_OF_STOCK, CSSCode$1 as CSSCode, type CSSCodeProps, type CalloutBoxProps, type CalloutTextProps, Carousel$2 as Carousel, CarouselItem$2 as CarouselItem, type CarouselItemProps, type CarouselItemProps$1 as CarouselItemPropsV3, CarouselItem$3 as CarouselItemV3, type CarouselProps, type CarouselProps$1 as CarouselPropsV3, type CarouselSettingProps, type CarouselSettingProps$1 as CarouselSettingPropsV3, type CarouselStyleProps, type CarouselStyleProps$1 as CarouselStylePropsV3, Carousel$3 as CarouselV3, Cart, CartCheckout, CartDiscount, CartLineAttribute, CartLineImage, CartLinePrice, CartLineVariant, CartList, CartOrderNote, type CartProps, CartTotalItem, CartTotalPrice, CheckoutNow, CleanSizeCharts$1 as CleanSizeCharts, type CleanSizeChartsProps, Column$1 as Col, type ColProps, CollectionBanner$1 as CollectionBanner, type CollectionBannerProps, CollectionDescription$1 as CollectionDescription, type CollectionDescriptionProps, CollectionPaginator$1 as CollectionPaginator, type CollectionPaginatorProps, CollectionTitle$1 as CollectionTitle, type CollectionTitleProps, CollectionToolbar$1 as CollectionToolbar, type CollectionToolbarProps, ContactForm$1 as ContactForm, Countdown$1 as Countdown, type CountdownProps, Coupon$1 as Coupon, CouponList, type CouponProps, CrossSellCartUpsell$1 as CrossSellCartUpsell, type CrossSellCartUpsellProps, CustomProductOptionsVariant$1 as CustomProductOptionsVariant, type CustomProductOptionsVariantProps, DEFAULT_FONT_SIZE, DEFAULT_HIGHLIGHT_TAG, DEFAULT_PROGRESS_BAR_HEIGHT, DEFAULT_QUANTITY_TEMPLATE, DEFAULT_RANGE_STEP, DEFAULT_REMAINING_PERCENT, DEFAULT_REMAINING_QUANTITY, DEFAULT_SCARCITY_THRESHOLD, type DataVideoType, DealeasyVolumeDiscounts$1 as DealeasyVolumeDiscounts, type DealeasyVolumeDiscountsProps, DesktopMenu, Dialog$1 as Dialog, DiscountInput, DiscountyBulkDiscountSales$1 as DiscountyBulkDiscountSales, type DiscountyBulkDiscountSalesProps, DynamicCheckout$1 as DynamicCheckout, type DynamicCheckoutProps, ELEMENT_Z_INDEX, EasifyProductOptions$1 as EasifyProductOptions, type EasifyProductOptionsProps, EasyBundleBuilderSkailama$1 as EasyBundleBuilderSkailama, type EasyBundleBuilderSkailamaProps, EasySell as EasySellCOD, type EasySellCODProps, EcoboostifyShoppableReelUgc$1 as EcoboostifyShoppableReelUgc, type EcoboostifyShoppableReelUgcProps, EcomsendBackInStockAlert$1 as EcomsendBackInStockAlert, type EcomsendBackInStockAlertProps, EssentialAnnouncementBar$1 as EssentialAnnouncementBar, type EssentialAnnouncementBarProps, EssentialCountdownTimerBar$1 as EssentialCountdownTimerBar, type EssentialCountdownTimerBarProps, EstimateDate$1 as EstimateDate, type EstimateDateProps, EstimatedDeliveryDatePlus$1 as EstimatedDeliveryDatePlus, type EstimatedDeliveryDatePlusProps, FastBundleBundlesDiscounts$1 as FastBundleBundlesDiscounts, type FastBundleBundlesDiscountsProps, FeraReviews$1 as FeraReviews, type FeraReviewsProps, FileUpload$1 as FileUpload, type FileUploadProps, FirePush$1 as FirePush, type FirePushProps, FlyBundlesUpsellsFbt$1 as FlyBundlesUpsellsFbt, type FlyBundlesUpsellsFbtProps, FordeerProductLabels$1 as FordeerProductLabels, type FordeerProductLabelsProps, FormCheckbox, type FormCheckboxProps, FormDropdown$1 as FormDropdown, type FormDropdownProps, FormEmail$1 as FormEmail, type FormEmailProps, FormTextArea as FormTextarea, FrequentlyBoughtTogether$1 as FrequentlyBoughtTogether, type FrequentlyBoughtTogetherProps, GloColorSwatchvariantImage$1 as GloColorSwatchvariantImage, type GloColorSwatchvariantImageProps, GloboProductOptionsVariant$1 as GloboProductOptionsVariant, type GloboProductOptionsVariantProps, GoogleReviewsByReputon$1 as GoogleReviewsByReputon, type GoogleReviewsByReputonProps, Growave$1 as Growave, type GrowaveProps, Header, type HeaderProps, Heading$1 as Heading, type HeadingProps, HeroBanner$1 as HeroBanner, type HeroBannerProps, HextomCountdownTimerBar$1 as HextomCountdownTimerBar, type HextomCountdownTimerBarProps, HextomFreeShippingBar$1 as HextomFreeShippingBar, type HextomFreeShippingBarProps, HulkFormBuilder$1 as HulkFormBuilder, type HulkFormBuilderProps, HulkProductOptions$1 as HulkProductOptions, type HulkProductOptionsProps, Icon$1 as Icon, IconList$1 as IconList, IconListHoz$1 as IconListHoz, type IconListHozProps, IconListItem$1 as IconListItem, IconListHozItem as IconListItemHoz, type IconListItemProps$1 as IconListItemProps, type IconListProps$1 as IconListProps, IconListV2$1 as IconListV2, type IconProps, Image$1 as Image, ImageComparison$1 as ImageComparison, type ImageComparisonItem, ImageDetection, type ImageDetectionProps, type ImageProps, type ImgProps, InfiniteOptions$1 as InfiniteOptions, type InfiniteOptionsProps, Input, type InputProps, Instafeed$1 as Instafeed, type InstafeedProps, InstantJudgemeReviews, InstantKlaviyo, InstantLooxReviews, InstantYotpoLoyalty, InstasellShoppableInstagram$1 as InstasellShoppableInstagram, type InstasellShoppableInstagramProps, JudgemeReviews$1 as JudgemeReviews, type JudgemeReviewsProps, JunipProductReviewsUgc$1 as JunipProductReviewsUgc, type JunipProductReviewsUgcProps, KachingBundles$1 as KachingBundles, type KachingBundlesProps, KachingSubscriptionsApp$1 as KachingSubscriptionsApp, type KachingSubscriptionsAppProps, KingProductOptions$1 as KingProductOptions, type KingProductOptionsProps, KiteFreeGiftDiscount$1 as KiteFreeGiftDiscount, type KiteFreeGiftDiscountProps, KlarnaMessaging$1 as KlarnaMessaging, type KlarnaMessagingProps, Klaviyo$1 as Klaviyo, type KlaviyoProps, KoalaBundleQuantityDiscount$1 as KoalaBundleQuantityDiscount, type KoalaBundleQuantityDiscountProps, LaiProductReviews$1 as LaiProductReviews, type LaiProductReviewsProps, Line$2 as Line, type LineProps, Link$1 as Link, type LinkProps, LoloyalLoyaltyReferrals$1 as LoloyalLoyaltyReferrals, type LoloyalLoyaltyReferralsProps, LoopSubscriptions$1 as LoopSubscriptions, type LoopSubscriptionsProps, LooxReviews$1 as LooxReviews, type LooxReviewsProps, MAX_PROGRESS_BAR_HEIGHT, MAX_REMAINING_PERCENT, MIN_PROGRESS_BAR_HEIGHT, MIN_REMAINING_PERCENT, MIN_REMAINING_QUANTITY, Marquee$1 as Marquee, _default$4 as MarqueeItem, type MarqueeItemProps, type MarqueeProps, MaxbundleProductBundles$1 as MaxbundleProductBundles, type MaxbundleProductBundlesProps, MbcBundleVolumeDiscount$1 as MbcBundleVolumeDiscount, type MbcBundleVolumeDiscountProps, Menu, type MenuProps, MobileMenu, Modal, ModernHeader, MyappgurusProductReviews$1 as MyappgurusProductReviews, type MyappgurusProductReviewsProps, NO_PRODUCT_LEFT, Newsletter$1 as Newsletter, type NewsletterProps, Notify as Notice, type NotificationAPI, type NotificationConfig, NotifyBackInStockPreOrder$1 as NotifyBackInStockPreOrder, type NotifyBackInStockPreOrderProps, OUT_OF_STOCK, type ObjectFit$1 as ObjectFit, OkendoReviewsLoyalty$1 as OkendoReviewsLoyalty, type OkendoReviewsLoyaltyProps, Omnisend$1 as Omnisend, type OmnisendProps, Opinew$1 as Opinew, type OpinewProps, Pagination, type PaginationProps, ParcelPanel$1 as ParcelPanel, type ParcelPanelProps, PickyStory$1 as PickyStory, type PickyStoryProps, PostPurchaseAcceptButton, PostPurchaseAdvancedList, PostPurchaseAdvancedListItem, type PostPurchaseAdvancedListProps, Button$1 as PostPurchaseButton, type PostPurchaseButtonProps, CalloutBox as PostPurchaseCalloutBox, CalloutText as PostPurchaseCalloutText, PostPurchaseCountdownTimer, type PostPurchaseCountdownTimerProps, PostPurchaseHeading, PostPurchaseImage, type PostPurchaseImageProps, Line$1 as PostPurchaseLine, type PostPurchaseLineProps, Link as PostPurchaseLink, type PostPurchaseLinkProps, PostPurchaseProductDescription, type PostPurchaseProductDescriptionProps, PostPurchaseProductDiscountTag, type PostPurchaseProductDiscountTagProps, PostPurchaseProductImages, type PostPurchaseProductImagesProps, PostPurchaseProductOffer, type PostPurchaseProductOfferProps$1 as PostPurchaseProductOfferProps, PostPurchaseProductPrice, PostPurchaseProductPriceBreakdown, type PostPurchaseProductPriceBreakdownProps, type PostPurchaseProductPriceProps, PostPurchaseProductQuantity, type PostPurchaseProductQuantityProps, PostPurchaseProductTitle, type PostPurchaseProductTitleProps, PostPurchaseProductVariants, type PostPurchaseProductVariantsProps, Text$2 as PostPurchaseText, type PostPurchaseTextProps, PowerfulContactFormBuilder$1 as PowerfulContactFormBuilder, type PowerfulContactFormBuilderProps, PreorderNowPreOrderPq$1 as PreorderNowPreOrderPq, type PreorderNowPreOrderPqProps, PreorderNowWodPresale$1 as PreorderNowWodPresale, type PreorderNowWodPresaleProps, Product$1 as Product, ProductBadge$1 as ProductBadge, type ProductBadgeProps, ProductBundleDiscount$1 as ProductBundleDiscount, ProductBundleDiscountItem$1 as ProductBundleDiscountItem, type ProductBundleDiscountProps, type ProductBundleItemDiscountProps, ProductButton$1 as ProductButton, type ProductButtonProps, ProductDescription$1 as ProductDescription, type ProductDescriptionProps, ProductImages$3 as ProductImages, type ProductImagesProps, ProductImagesV2, ProductImagesV3, ProductList$2 as ProductList, type ProductListProps, type ProductListProps$1 as ProductListPropsV3, ProductList$3 as ProductListV3, ProductOptionsCustomizer$1 as ProductOptionsCustomizer, type ProductOptionsCustomizerProps, ProductOptionsVariantOption$1 as ProductOptionsVariantOption, type ProductOptionsVariantOptionProps, ProductPrice$1 as ProductPrice, type ProductPriceProps, type ProductPropertiesProps, ProductProperties$1 as ProductPropertyInput, type ProductProps, ProductQuantity$1 as ProductQuantity, type ProductQuantityProps, QuickView as ProductQuickView, ProductReviews$1 as ProductReviews, type ProductReviewsProps, ProductSku$1 as ProductSku, ProductTag$1 as ProductTag, type ProductTagProps, ProductTitle$1 as ProductTitle, type ProductTitleProps, ProductVariants$1 as ProductVariants, type ProductVariantsProps, ProductVendor$1 as ProductVendor, ProductViewMore$1 as ProductViewMore, type ProductViewMoreProps, PumperBundlesVolumeDiscount$1 as PumperBundlesVolumeDiscount, type PumperBundlesVolumeDiscountProps, PushOwl$1 as PushOwl, type PushOwlProps, QUANTITY_SOURCE, QikifyUpsell$1 as QikifyUpsell, type QikifyUpsellProps, REGEX_PAGE_TYPE, Radio, RapiBundleQuantityBreaks$1 as RapiBundleQuantityBreaks, type RapiBundleQuantityBreaksProps, RechargeSubscriptions$1 as RechargeSubscriptions, type RechargeSubscriptionsProps, RecurpaySubscriptionApp$1 as RecurpaySubscriptionApp, type RecurpaySubscriptionAppProps, Releasit$1 as Releasit, type ReleasitProps, RequestQuoteHidePrice$1 as RequestQuoteHidePrice, type RequestQuoteHidePriceProps, ReviewxpoProductReviewsApp$1 as ReviewxpoProductReviewsApp, type ReviewxpoProductReviewsAppProps, Rivyo$1 as Rivyo, type RivyoProps, Root$1 as Root, type RootProps$2 as RootProps, Row$1 as Row, type RowProps, Ryviu$1 as Ryviu, type RyviuProps, SealSubscriptions$1 as SealSubscriptions, type SealSubscriptionsProps, Section$1 as Section, SegunoEmailMarketing$1 as SegunoEmailMarketing, type SegunoEmailMarketingProps, Select, Selleasy$1 as Selleasy, type SelleasyProps, SeoantTrustBadgesIcon$1 as SeoantTrustBadgesIcon, type SeoantTrustBadgesIconProps, ShopPayButton$1 as ShopPayButton, type ShopPayButtonProps, ShopPayInstallments$1 as ShopPayInstallments, ShopifyForms$1 as ShopifyForms, type ShopifyFormsProps, ShopifySubscriptions$1 as ShopifySubscriptions, type ShopifySubscriptionsProps, SimpleBundlesKits$1 as SimpleBundlesKits, type SimpleBundlesKitsProps, SkioSubscriptionsYcS20$1 as SkioSubscriptionsYcS20, type SkioSubscriptionsYcS20Props, type SkuProps, SmartSearchBarAndFilters$1 as SmartSearchBarAndFilters, type SmartSearchBarAndFiltersProps, SproutPlantTreesGrowSales$1 as SproutPlantTreesGrowSales, type SproutPlantTreesGrowSalesProps, Stamped$1 as Stamped, type StampedProps, StellarDeliveryDatePickup$1 as StellarDeliveryDatePickup, type StellarDeliveryDatePickupProps, Sticky$1 as Sticky, StockCounter$1 as StockCounter, SubifySubscriptionsApp$1 as SubifySubscriptionsApp, type SubifySubscriptionsAppProps, SubmitButton$1 as SubmitButton, type SubmitButtonProps, TabItem$1 as TabItem, type TabItemProps, Tabs$1 as Tabs, type TabsProps, TagembedSocialPostReview$1 as TagembedSocialPostReview, type TagembedSocialPostReviewProps, TagshopShoppableVideosUgc$1 as TagshopShoppableVideosUgc, type TagshopShoppableVideosUgcProps, TeeinblueProductPersonalizer$1 as TeeinblueProductPersonalizer, type TeeinblueProductPersonalizerProps, Text$1 as Text, type TextAreaProps, TextField$1 as TextField, type TextFieldProps, TextInput$1 as TextInput, type TextInputProps, type TextProps, TextArea as Textarea, type TextareaProps, ThirdPartySlot$1 as ThirdPartySlot, TrustBadgesBear$1 as TrustBadgesBear, type TrustBadgesBearProps, TrustMe$1 as TrustMe, type TrustMeProps, TrustedsiteTrustBadges$1 as TrustedsiteTrustBadges, type TrustedsiteTrustBadgesProps, Trustoo$1 as Trustoo, type TrustooProps, TrustreviewsProductReviews$1 as TrustreviewsProductReviews, type TrustreviewsProductReviewsProps, TrustshopProductReviews$1 as TrustshopProductReviews, type TrustshopProductReviewsProps, UltimateSalesBoost$1 as UltimateSalesBoost, type UltimateSalesBoostProps, UnlimitedBundlesDiscounts$1 as UnlimitedBundlesDiscounts, type UnlimitedBundlesDiscountsProps, UppromoteAffiliateMarketing$1 as UppromoteAffiliateMarketing, type UppromoteAffiliateMarketingProps, type VendorProps, Video$1 as Video, Vitals$1 as Vitals, type VitalsProps, WhatmoreShoppableVideosreel$1 as WhatmoreShoppableVideosreel, type WhatmoreShoppableVideosreelProps, WideBundle$1 as WideBundle, type WideBundleProps, Wiser$1 as Wiser, type WiserProps, WishlistKing$1 as WishlistKing, type WishlistKingProps, WishlistPlus$1 as WishlistPlus, type WishlistPlusProps, YotpoLoyalty, type YotpoLoyaltyProps, YotpoReviews$1 as YotpoReviews, type YotpoReviewsProps, accordionSetting, articleListSetting, bannerSetting, breadcrumbSetting, _default$2 as builderComponent, buttonSetting, carouselSetting, carouselSettingV3, cartSetting, checkIsOpenPopup, checkIsScrollToTop, codeSetting, collectionSetting, _default$1 as componentSettings, contactFormSetting, convertSizeToWidth, convertUnitToNumber, countdownSetting, couponSetting, dialogSetting, estimateDeliverySetting, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getDisplayStyle, getDynamicSourceLocales, getInlineCss, getInsertLinkData, getLinkArticle, getLinkData, getLiquidInitData, getLiquidTextContent, getSettingPreloadData, getStaticLocale, getTextDisplayData, gridSetting, handleClickLink, headerSetting, headingSetting, iconListHozSetting, iconListSetting, iconListSettingV2, iconSetting, imageComparisonSetting, imageDetectionSetting, imageSetting, inputSetting, isEmptyObject, isHexTransparent, isLinkedToSalesPage, isShopifyDomain, isTransparentColor, isTransparentRGBA, lineSetting, linkSetting, index_liquid as liquidComponents, marqueeSetting, menuSetting, modalSetting, _default$3 as nextComponent, normalizeMailto, openConfirm, paginationSetting, postPurchaseAdvancedListSetting, postPurchaseButtonSetting, postPurchaseCalloutBoxSetting, postPurchaseCountdownTimerSetting, postPurchaseImageSetting, postPurchaseLineSetting, postPurchaseLinkSetting, postPurchaseProduct1Col, postPurchaseProduct2Col, postPurchaseProductDefault, postPurchaseProductSetting, _default as postPurchaseSettings, postPurchaseTextSetting, productSetting, radioSetting, replaceAllHrefFromString, replaceLinkData, selectSetting, shopPayInstallmentSetting, stickySetting, stockCounterSetting, tabSetting, textSetting, textareaSetting, thirdPartyInstantSetting, thirdPartySetting, thirdPartySlotSetting, transformHighlighTag, transformNumberTag, useNotification, videoSetting, youtubeShortsRegex };
|
|
7994
|
+
export { Accordion$1 as Accordion, AccordionItem$1 as AccordionItem, type AccordionItemProps, type AccordionProps, AftershipEmailMarketingsms$1 as AftershipEmailMarketingsms, type AftershipEmailMarketingsmsProps, AirProductReviewsAppUgc$1 as AirProductReviewsAppUgc, type AirProductReviewsAppUgcProps, AliReviews$1 as AliReviews, type AliReviewsProps, AlsoBoughtCbb$1 as AlsoBoughtCbb, type AlsoBoughtCbbProps, AovBundlesVolumeDiscounts$1 as AovBundlesVolumeDiscounts, type AovBundlesVolumeDiscountsProps, AovFreeGiftBuyXGetYBogo$1 as AovFreeGiftBuyXGetYBogo, type AovFreeGiftBuyXGetYBogoProps, AppointmentBookingCowlendar$1 as AppointmentBookingCowlendar, type AppointmentBookingCowlendarProps, AppstleBundlesDiscounts$1 as AppstleBundlesDiscounts, type AppstleBundlesDiscountsProps, AppstleSubscriptions$1 as AppstleSubscriptions, type AppstleSubscriptionsProps, ArticleAuthor$1 as ArticleAuthor, ArticleCategory$1 as ArticleCategory, ArticleContent$1 as ArticleContent, ArticleDate$1 as ArticleDate, ArticleExcerpt$1 as ArticleExcerpt, ArticleImage$1 as ArticleImage, ArticleList$1 as ArticleList, ArticlePagination$1 as ArticlePagination, ArticleReadMore$1 as ArticleReadMore, ArticleTag$1 as ArticleTag, ArticleTitle$1 as ArticleTitle, BasicHeader, BestBuyFulfillment$1 as BestBuyFulfillment, type BestBuyFulfillmentProps, BfSizeChartSizeGuide$1 as BfSizeChartSizeGuide, type BfSizeChartSizeGuideProps, BirdChime$1 as BirdChime, type BirdChimeProps, BloyRewardsProgramLoyalty$1 as BloyRewardsProgramLoyalty, type BloyRewardsProgramLoyaltyProps, Bogos$1 as Bogos, type BogosProps, BoldProductOptions$1 as BoldProductOptions, type BoldProductOptionsProps, BoldSubscriptions$1 as BoldSubscriptions, type BoldSubscriptionsProps, BonLoyaltyRewardsReferrals$1 as BonLoyaltyRewardsReferrals, type BonLoyaltyRewardsReferralsProps, BoostAISearchDiscovery$1 as BoostAISearchDiscovery, type BoostAISearchDiscoveryProps, Breadcrumb$1 as Breadcrumb, Breadcrumb$1 as BreadcrumbProps, Bundler$1 as Bundler, type BundlerProps, Button$2 as Button, type ButtonProps, CONTINUE_SELLING_WHEN_OUT_OF_STOCK, CSSCode$1 as CSSCode, type CSSCodeProps, type CalloutBoxProps, type CalloutTextProps, Carousel$2 as Carousel, CarouselItem$2 as CarouselItem, type CarouselItemProps, type CarouselItemProps$1 as CarouselItemPropsV3, CarouselItem$3 as CarouselItemV3, type CarouselProps, type CarouselProps$1 as CarouselPropsV3, type CarouselSettingProps, type CarouselSettingProps$1 as CarouselSettingPropsV3, type CarouselStyleProps, type CarouselStyleProps$1 as CarouselStylePropsV3, Carousel$3 as CarouselV3, Cart, CartCheckout, CartDiscount, CartLineAttribute, CartLineImage, CartLinePrice, CartLineVariant, CartList, CartOrderNote, type CartProps, CartTotalItem, CartTotalPrice, CheckoutNow, CleanSizeCharts$1 as CleanSizeCharts, type CleanSizeChartsProps, Column$1 as Col, type ColProps, CollectionBanner$1 as CollectionBanner, type CollectionBannerProps, CollectionDescription$1 as CollectionDescription, type CollectionDescriptionProps, CollectionPaginator$1 as CollectionPaginator, type CollectionPaginatorProps, CollectionTitle$1 as CollectionTitle, type CollectionTitleProps, CollectionToolbar$1 as CollectionToolbar, type CollectionToolbarProps, ContactForm$1 as ContactForm, Countdown$1 as Countdown, type CountdownProps, Coupon$1 as Coupon, CouponList, type CouponProps, CrossSellCartUpsell$1 as CrossSellCartUpsell, type CrossSellCartUpsellProps, CustomProductOptionsVariant$1 as CustomProductOptionsVariant, type CustomProductOptionsVariantProps, DEFAULT_FONT_SIZE, DEFAULT_HIGHLIGHT_TAG, DEFAULT_PROGRESS_BAR_HEIGHT, DEFAULT_QUANTITY_TEMPLATE, DEFAULT_RANGE_STEP, DEFAULT_REMAINING_PERCENT, DEFAULT_REMAINING_QUANTITY, DEFAULT_SCARCITY_THRESHOLD, type DataVideoType, DealeasyVolumeDiscounts$1 as DealeasyVolumeDiscounts, type DealeasyVolumeDiscountsProps, DesktopMenu, Dialog$1 as Dialog, DiscountInput, DiscountyBulkDiscountSales$1 as DiscountyBulkDiscountSales, type DiscountyBulkDiscountSalesProps, DynamicCheckout$1 as DynamicCheckout, type DynamicCheckoutProps, ELEMENT_Z_INDEX, EasifyProductOptions$1 as EasifyProductOptions, type EasifyProductOptionsProps, EasyBundleBuilderSkailama$1 as EasyBundleBuilderSkailama, type EasyBundleBuilderSkailamaProps, EasySell as EasySellCOD, type EasySellCODProps, EcoboostifyShoppableReelUgc$1 as EcoboostifyShoppableReelUgc, type EcoboostifyShoppableReelUgcProps, EcomsendBackInStockAlert$1 as EcomsendBackInStockAlert, type EcomsendBackInStockAlertProps, EssentialAnnouncementBar$1 as EssentialAnnouncementBar, type EssentialAnnouncementBarProps, EssentialCountdownTimerBar$1 as EssentialCountdownTimerBar, type EssentialCountdownTimerBarProps, EstimateDate$1 as EstimateDate, type EstimateDateProps, EstimatedDeliveryDatePlus$1 as EstimatedDeliveryDatePlus, type EstimatedDeliveryDatePlusProps, FastBundleBundlesDiscounts$1 as FastBundleBundlesDiscounts, type FastBundleBundlesDiscountsProps, FeraReviews$1 as FeraReviews, type FeraReviewsProps, FileUpload$1 as FileUpload, type FileUploadProps, FirePush$1 as FirePush, type FirePushProps, FlyBundlesUpsellsFbt$1 as FlyBundlesUpsellsFbt, type FlyBundlesUpsellsFbtProps, FordeerProductLabels$1 as FordeerProductLabels, type FordeerProductLabelsProps, FormCheckbox, type FormCheckboxProps, FormDropdown$1 as FormDropdown, type FormDropdownProps, FormEmail$1 as FormEmail, type FormEmailProps, FormTextArea as FormTextarea, FrequentlyBoughtTogether$1 as FrequentlyBoughtTogether, type FrequentlyBoughtTogetherProps, GloColorSwatchvariantImage$1 as GloColorSwatchvariantImage, type GloColorSwatchvariantImageProps, GloboProductOptionsVariant$1 as GloboProductOptionsVariant, type GloboProductOptionsVariantProps, GoogleReviewsByReputon$1 as GoogleReviewsByReputon, type GoogleReviewsByReputonProps, Growave$1 as Growave, type GrowaveProps, Header, type HeaderProps, Heading$1 as Heading, type HeadingProps, HeroBanner$1 as HeroBanner, type HeroBannerProps, HextomCountdownTimerBar$1 as HextomCountdownTimerBar, type HextomCountdownTimerBarProps, HextomFreeShippingBar$1 as HextomFreeShippingBar, type HextomFreeShippingBarProps, HulkFormBuilder$1 as HulkFormBuilder, type HulkFormBuilderProps, HulkProductOptions$1 as HulkProductOptions, type HulkProductOptionsProps, Icon$1 as Icon, IconList$1 as IconList, IconListHoz$1 as IconListHoz, type IconListHozProps, IconListItem$1 as IconListItem, IconListHozItem as IconListItemHoz, type IconListItemProps$1 as IconListItemProps, type IconListProps$1 as IconListProps, IconListV2$1 as IconListV2, type IconProps, Image$1 as Image, ImageComparison$1 as ImageComparison, type ImageComparisonItem, ImageDetection, type ImageDetectionProps, type ImageProps, type ImgProps, InfiniteOptions$1 as InfiniteOptions, type InfiniteOptionsProps, Input, type InputProps, Instafeed$1 as Instafeed, type InstafeedProps, InstantJudgemeReviews, InstantKlaviyo, InstantLooxReviews, InstantYotpoLoyalty, InstasellShoppableInstagram$1 as InstasellShoppableInstagram, type InstasellShoppableInstagramProps, JudgemeReviews$1 as JudgemeReviews, type JudgemeReviewsProps, JunipProductReviewsUgc$1 as JunipProductReviewsUgc, type JunipProductReviewsUgcProps, KachingBundles$1 as KachingBundles, type KachingBundlesProps, KachingSubscriptionsApp$1 as KachingSubscriptionsApp, type KachingSubscriptionsAppProps, KingProductOptions$1 as KingProductOptions, type KingProductOptionsProps, KiteFreeGiftDiscount$1 as KiteFreeGiftDiscount, type KiteFreeGiftDiscountProps, KlarnaMessaging$1 as KlarnaMessaging, type KlarnaMessagingProps, Klaviyo$1 as Klaviyo, type KlaviyoProps, KoalaBundleQuantityDiscount$1 as KoalaBundleQuantityDiscount, type KoalaBundleQuantityDiscountProps, LaiProductReviews$1 as LaiProductReviews, type LaiProductReviewsProps, Line$2 as Line, type LineProps, Link$1 as Link, type LinkProps, LoloyalLoyaltyReferrals$1 as LoloyalLoyaltyReferrals, type LoloyalLoyaltyReferralsProps, LoopSubscriptions$1 as LoopSubscriptions, type LoopSubscriptionsProps, LooxReviews$1 as LooxReviews, type LooxReviewsProps, MAX_PROGRESS_BAR_HEIGHT, MAX_REMAINING_PERCENT, MIN_PROGRESS_BAR_HEIGHT, MIN_REMAINING_PERCENT, MIN_REMAINING_QUANTITY, Marquee$1 as Marquee, _default$4 as MarqueeItem, type MarqueeItemProps, type MarqueeProps, MaxbundleProductBundles$1 as MaxbundleProductBundles, type MaxbundleProductBundlesProps, MbcBundleVolumeDiscount$1 as MbcBundleVolumeDiscount, type MbcBundleVolumeDiscountProps, Menu, type MenuProps, MobileMenu, Modal, ModernHeader, MyappgurusProductReviews$1 as MyappgurusProductReviews, type MyappgurusProductReviewsProps, NO_PRODUCT_LEFT, Newsletter$1 as Newsletter, type NewsletterProps, Notify as Notice, type NotificationAPI, type NotificationConfig, NotifyBackInStockPreOrder$1 as NotifyBackInStockPreOrder, type NotifyBackInStockPreOrderProps, OUT_OF_STOCK, type ObjectFit$2 as ObjectFit, OkendoReviewsLoyalty$1 as OkendoReviewsLoyalty, type OkendoReviewsLoyaltyProps, Omnisend$1 as Omnisend, type OmnisendProps, Opinew$1 as Opinew, type OpinewProps, Pagination, type PaginationProps, ParcelPanel$1 as ParcelPanel, type ParcelPanelProps, PickyStory$1 as PickyStory, type PickyStoryProps, PostPurchaseAcceptButton, PostPurchaseAdvancedList, PostPurchaseAdvancedListItem, type PostPurchaseAdvancedListProps, Button$1 as PostPurchaseButton, type PostPurchaseButtonProps, CalloutBox as PostPurchaseCalloutBox, CalloutText as PostPurchaseCalloutText, PostPurchaseCountdownTimer, type PostPurchaseCountdownTimerProps, PostPurchaseHeading, PostPurchaseImage, type PostPurchaseImageProps, Line$1 as PostPurchaseLine, type PostPurchaseLineProps, Link as PostPurchaseLink, type PostPurchaseLinkProps, PostPurchaseProductDescription, type PostPurchaseProductDescriptionProps, PostPurchaseProductDiscountTag, type PostPurchaseProductDiscountTagProps, PostPurchaseProductImages, type PostPurchaseProductImagesProps, PostPurchaseProductOffer, type PostPurchaseProductOfferProps$1 as PostPurchaseProductOfferProps, PostPurchaseProductPrice, PostPurchaseProductPriceBreakdown, type PostPurchaseProductPriceBreakdownProps, type PostPurchaseProductPriceProps, PostPurchaseProductQuantity, type PostPurchaseProductQuantityProps, PostPurchaseProductTitle, type PostPurchaseProductTitleProps, PostPurchaseProductVariants, type PostPurchaseProductVariantsProps, Text$2 as PostPurchaseText, type PostPurchaseTextProps, PowerfulContactFormBuilder$1 as PowerfulContactFormBuilder, type PowerfulContactFormBuilderProps, PreorderNowPreOrderPq$1 as PreorderNowPreOrderPq, type PreorderNowPreOrderPqProps, PreorderNowWodPresale$1 as PreorderNowWodPresale, type PreorderNowWodPresaleProps, Product$1 as Product, ProductBadge$1 as ProductBadge, type ProductBadgeProps, ProductBundleDiscount$1 as ProductBundleDiscount, ProductBundleDiscountItem$1 as ProductBundleDiscountItem, type ProductBundleDiscountProps, type ProductBundleItemDiscountProps, ProductButton$1 as ProductButton, type ProductButtonProps, ProductDescription$1 as ProductDescription, type ProductDescriptionProps, ProductImages$3 as ProductImages, type ProductImagesProps, ProductImagesV2, ProductImagesV3, ProductList$2 as ProductList, type ProductListProps, type ProductListProps$1 as ProductListPropsV3, ProductList$3 as ProductListV3, ProductOptionsCustomizer$1 as ProductOptionsCustomizer, type ProductOptionsCustomizerProps, ProductOptionsVariantOption$1 as ProductOptionsVariantOption, type ProductOptionsVariantOptionProps, ProductPrice$1 as ProductPrice, type ProductPriceProps, type ProductPropertiesProps, ProductProperties$1 as ProductPropertyInput, type ProductProps, ProductQuantity$1 as ProductQuantity, type ProductQuantityProps, QuickView as ProductQuickView, ProductReviews$1 as ProductReviews, type ProductReviewsProps, ProductSku$1 as ProductSku, ProductTag$1 as ProductTag, type ProductTagProps, ProductTitle$1 as ProductTitle, type ProductTitleProps, ProductVariants$1 as ProductVariants, type ProductVariantsProps, ProductVendor$1 as ProductVendor, ProductViewMore$1 as ProductViewMore, type ProductViewMoreProps, PumperBundlesVolumeDiscount$1 as PumperBundlesVolumeDiscount, type PumperBundlesVolumeDiscountProps, PushOwl$1 as PushOwl, type PushOwlProps, QUANTITY_SOURCE, QikifyUpsell$1 as QikifyUpsell, type QikifyUpsellProps, REGEX_PAGE_TYPE, Radio, RapiBundleQuantityBreaks$1 as RapiBundleQuantityBreaks, type RapiBundleQuantityBreaksProps, RechargeSubscriptions$1 as RechargeSubscriptions, type RechargeSubscriptionsProps, RecurpaySubscriptionApp$1 as RecurpaySubscriptionApp, type RecurpaySubscriptionAppProps, Releasit$1 as Releasit, type ReleasitProps, RequestQuoteHidePrice$1 as RequestQuoteHidePrice, type RequestQuoteHidePriceProps, ReviewxpoProductReviewsApp$1 as ReviewxpoProductReviewsApp, type ReviewxpoProductReviewsAppProps, Rivyo$1 as Rivyo, type RivyoProps, Root$1 as Root, type RootProps$2 as RootProps, Row$1 as Row, type RowProps, Ryviu$1 as Ryviu, type RyviuProps, SealSubscriptions$1 as SealSubscriptions, type SealSubscriptionsProps, Section$1 as Section, SegunoEmailMarketing$1 as SegunoEmailMarketing, type SegunoEmailMarketingProps, Select, Selleasy$1 as Selleasy, type SelleasyProps, SeoantTrustBadgesIcon$1 as SeoantTrustBadgesIcon, type SeoantTrustBadgesIconProps, ShopPayButton$1 as ShopPayButton, type ShopPayButtonProps, ShopPayInstallments$1 as ShopPayInstallments, ShopifyForms$1 as ShopifyForms, type ShopifyFormsProps, ShopifySubscriptions$1 as ShopifySubscriptions, type ShopifySubscriptionsProps, SimpleBundlesKits$1 as SimpleBundlesKits, type SimpleBundlesKitsProps, SkioSubscriptionsYcS20$1 as SkioSubscriptionsYcS20, type SkioSubscriptionsYcS20Props, type SkuProps, SmartSearchBarAndFilters$1 as SmartSearchBarAndFilters, type SmartSearchBarAndFiltersProps, SproutPlantTreesGrowSales$1 as SproutPlantTreesGrowSales, type SproutPlantTreesGrowSalesProps, Stamped$1 as Stamped, type StampedProps, StellarDeliveryDatePickup$1 as StellarDeliveryDatePickup, type StellarDeliveryDatePickupProps, Sticky$1 as Sticky, StockCounter$1 as StockCounter, SubifySubscriptionsApp$1 as SubifySubscriptionsApp, type SubifySubscriptionsAppProps, SubmitButton$1 as SubmitButton, type SubmitButtonProps, TabItem$1 as TabItem, type TabItemProps, Tabs$1 as Tabs, type TabsProps, TagembedSocialPostReview$1 as TagembedSocialPostReview, type TagembedSocialPostReviewProps, TagshopShoppableVideosUgc$1 as TagshopShoppableVideosUgc, type TagshopShoppableVideosUgcProps, TeeinblueProductPersonalizer$1 as TeeinblueProductPersonalizer, type TeeinblueProductPersonalizerProps, Text$1 as Text, type TextAreaProps, TextField$1 as TextField, type TextFieldProps, TextInput$1 as TextInput, type TextInputProps, type TextProps, TextArea as Textarea, type TextareaProps, ThirdPartySlot$1 as ThirdPartySlot, TrustBadgesBear$1 as TrustBadgesBear, type TrustBadgesBearProps, TrustMe$1 as TrustMe, type TrustMeProps, TrustedsiteTrustBadges$1 as TrustedsiteTrustBadges, type TrustedsiteTrustBadgesProps, Trustoo$1 as Trustoo, type TrustooProps, TrustreviewsProductReviews$1 as TrustreviewsProductReviews, type TrustreviewsProductReviewsProps, TrustshopProductReviews$1 as TrustshopProductReviews, type TrustshopProductReviewsProps, UltimateSalesBoost$1 as UltimateSalesBoost, type UltimateSalesBoostProps, UnlimitedBundlesDiscounts$1 as UnlimitedBundlesDiscounts, type UnlimitedBundlesDiscountsProps, UppromoteAffiliateMarketing$1 as UppromoteAffiliateMarketing, type UppromoteAffiliateMarketingProps, type VendorProps, Video$1 as Video, Vitals$1 as Vitals, type VitalsProps, WhatmoreShoppableVideosreel$1 as WhatmoreShoppableVideosreel, type WhatmoreShoppableVideosreelProps, WideBundle$1 as WideBundle, type WideBundleProps, Wiser$1 as Wiser, type WiserProps, WishlistKing$1 as WishlistKing, type WishlistKingProps, WishlistPlus$1 as WishlistPlus, type WishlistPlusProps, YotpoLoyalty, type YotpoLoyaltyProps, YotpoReviews$1 as YotpoReviews, type YotpoReviewsProps, accordionSetting, articleListSetting, bannerSetting, breadcrumbSetting, _default$2 as builderComponent, buttonSetting, carouselSetting, carouselSettingV3, cartSetting, checkIsOpenPopup, checkIsScrollToTop, codeSetting, collectionSetting, _default$1 as componentSettings, contactFormSetting, convertSizeToWidth, convertUnitToNumber, countdownSetting, couponSetting, dialogSetting, estimateDeliverySetting, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getDisplayStyle, getDynamicSourceLocales, getInlineCss, getInsertLinkData, getLinkArticle, getLinkData, getLiquidInitData, getLiquidTextContent, getSettingPreloadData, getStaticLocale, getTextDisplayData, gridSetting, handleClickLink, headerSetting, headingSetting, iconListHozSetting, iconListSetting, iconListSettingV2, iconSetting, imageComparisonSetting, imageDetectionSetting, imageSetting, inputSetting, isEmptyObject, isHexTransparent, isLinkedToSalesPage, isShopifyDomain, isTransparentColor, isTransparentRGBA, lineSetting, linkSetting, index_liquid as liquidComponents, marqueeSetting, menuSetting, modalSetting, _default$3 as nextComponent, normalizeMailto, openConfirm, paginationSetting, postPurchaseAdvancedListSetting, postPurchaseButtonSetting, postPurchaseCalloutBoxSetting, postPurchaseCountdownTimerSetting, postPurchaseImageSetting, postPurchaseLineSetting, postPurchaseLinkSetting, postPurchaseProduct1Col, postPurchaseProduct2Col, postPurchaseProductDefault, postPurchaseProductSetting, _default as postPurchaseSettings, postPurchaseTextSetting, productSetting, radioSetting, replaceAllHrefFromString, replaceLinkData, selectSetting, shopPayInstallmentSetting, stickySetting, stockCounterSetting, tabSetting, textSetting, textareaSetting, thirdPartyInstantSetting, thirdPartySetting, thirdPartySlotSetting, transformHighlighTag, transformNumberTag, useNotification, videoSetting, youtubeShortsRegex };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "8.0.0-dev.
|
|
3
|
+
"version": "8.0.0-dev.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "8.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "8.0.0-dev.41",
|
|
30
30
|
"@gem-sdk/styles": "7.0.1-dev.6",
|
|
31
31
|
"@gem-sdk/system": "7.0.1-dev.6",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|