@gem-sdk/components 2.0.0-staging.875 → 2.0.0-staging.878
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/accordion/common/helpers.js +1 -1
- package/dist/cjs/accordion/hooks/useAccordionItem.js +1 -1
- package/dist/cjs/dialog/common/classes.js +1 -1
- package/dist/cjs/dialog/common/styles.js +1 -1
- package/dist/cjs/dialog/settings/configs/settings.js +1 -1
- package/dist/cjs/dialog/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/tab/components/Tabs.liquid.js +1 -1
- package/dist/cjs/video/settings/configs/settings.js +1 -1
- package/dist/esm/accordion/common/helpers.js +1 -1
- package/dist/esm/accordion/hooks/useAccordionItem.js +1 -1
- package/dist/esm/dialog/common/classes.js +1 -1
- package/dist/esm/dialog/common/styles.js +1 -1
- package/dist/esm/dialog/settings/configs/settings.js +1 -1
- package/dist/esm/dialog/settings/configs/ui-v2.js +1 -1
- package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/tab/components/Tabs.liquid.js +1 -1
- package/dist/esm/video/settings/configs/settings.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const MINIMUM_CHILD=1,BODY_CHILD_INDEX=0,getDataState=(t,e)=>{let{setting:r={},styles:o={},builderProps:a}=t,{activeKey:i,iconSvg:n,expandItem:l,iconPosition:s,iconCollapseSize:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const MINIMUM_CHILD=1,BODY_CHILD_INDEX=0,getDataState=(t,e)=>{let{setting:r={},styles:o={},builderProps:a}=t,{activeKey:i,iconSvg:n,expandItem:l,iconPosition:s,iconCollapseSize:g,iconGlobalSize:c,iconExpand:S,iconCollapse:p,layoutHeader:d,expandedMode:m,configIconSize:u}=r,{bgColor:I,color:D,headerBorder:L,width:v,fullWidth:C,textColor:y,itemHeaderSpacing:M,contentSizePadding:_,iconColor:x,headerContentPadding:N,widthHeightSize:P}=o,b="multiple"===m,h=t=>t?t.toString().toLowerCase().split(",").map(t=>parseInt(t.trim())-1).map(t=>t.toString()):[],q=l?h(i):[],H=b?[...q]:q,U=()=>({iconSvg:n,isIconPlus:"plus"===n,activeKey:i,expanded:b,expandItem:l,iconPosition:s,iconGlobalSize:c,iconCollapse:p,iconExpand:S,iconCollapseSize:g,layoutHeader:d,expandedMode:m,configIconSize:u,parentUid:a?.uid,childListNumber:l?i?.toString().toLowerCase()==="all"?e?.map((t,e)=>e.toString()):H:[],chidlrenUid:e?.map(t=>t.uid)}),k=()=>({bgColor:I,color:D,headerBorder:L,fullWidth:C,width:v,itemHeaderSpacing:M,textColor:y,iconColor:x,contentSizePadding:_,headerContentPadding:N,widthHeightSize:P});return{uidState:a?.uid,settingState:U(),stylesState:k(),accordions:H}},getParentSettings=(t={})=>{let{iconSvg:e,titleTypo:r,layoutHeader:o,iconGlobalSize:a,iconCollapseSize:i,iconCollapse:n,iconExpand:l,alignment:s,configIconSize:g,iconPosition:c}=t,S=r?{...r,attrs:{...r.attrs}}:void 0;return S?.attrs?.color&&delete S.attrs.color,{iconSvg:e,titleTypo:S,layoutHeader:o,iconGlobalSize:a,iconCollapseSize:i,iconCollapse:n,iconExpand:l,alignment:s,configIconSize:g,iconPosition:c}},getSettingItemLiquid=t=>{let{index:e,accordions:r,parentSetting:o,parentStyle:a}=t,{titleTypo:i,iconCollapse:n,iconExpand:l,activeKey:s,expandItem:g}=o??{};delete i?.attrs?.color;let{itemContentSpacing:c,iconColor:S,contentSizePadding:p}=a??{},d=!!g&&(s?.toString()?.toLowerCase()==="all"||r?.includes(e?.toString()??"")),m=core.makeGlobalSize(p),u=()=>{let t={...p&&m.padding,...c?.type||p?{}:core.composeSize(c?.custom)};return d?t:core.removePaddingYInStyle(t)},I=()=>l&&d?l:n&&!d?n:void 0,D=I(),L=()=>{let t={normal:S?.normal??"transparent",hover:S?.hover??S?.active??S?.normal??"transparent",active:S?.active??"transparent"};return d?core.makeStyle({c:core.getSingleColorVariable(t?.active)}):core.getGlobalColorStateStyle("c",t)};return{isShow:d,composeContentSizeStyle:u,collapsibleIcon:D,composeIconColor:L(),makeIcon:I}};exports.BODY_CHILD_INDEX=0,exports.MINIMUM_CHILD=1,exports.getDataState=getDataState,exports.getParentSettings=getParentSettings,exports.getSettingItemLiquid=getSettingItemLiquid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react"),useMountTransition=require("./useMountTransition.js"),useGetProductId=require("../../hooks/useGetProductId.js");const useAccordionItem=e=>{let{accordions:t,index:r,builderProps:o,parentSetting:c={},parentStyle:a={},handleDropDown:s}=e,{iconPosition:u,titleTypo:n,iconCollapse:i,iconExpand:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react"),useMountTransition=require("./useMountTransition.js"),useGetProductId=require("../../hooks/useGetProductId.js");const useAccordionItem=e=>{let{accordions:t,index:r,builderProps:o,parentSetting:c={},parentStyle:a={},handleDropDown:s}=e,{iconPosition:u,titleTypo:n,iconCollapse:i,iconExpand:l}=c;delete n?.attrs?.color;let{itemContentSpacing:d,iconColor:m,contentSizePadding:p}=a,g=t?.includes(r?.toString()??""),v=core.makeGlobalSize(p),M=core.useEditorMode(),[S,R]=React.useState(g),f=useMountTransition.default(S||!1,500);React.useEffect(()=>{R(g)},[g]);let I=React.useMemo(()=>l&&g?l:i&&!g?i:void 0,[g,i,l]),y=React.useMemo(()=>core.makeStyle({fd:"left"===u?"row":"row-reverse",jc:"right"===u?"space-between":""}),[u]),G=(e,t)=>{!e.target.closest(".gp-text")&&s&&t&&(R(!S),s(t))},P=React.useMemo(()=>{let e={normal:m?.normal??"transparent",hover:m?.hover??m?.active??m?.normal??"transparent",active:m?.active??m?.normal??"transparent"};return g?core.makeStyle({c:core.getSingleColorVariable(e?.active)}):core.getGlobalColorStateStyle("c",e)},[m,g]),{refContainer:b,productID:k}=useGetProductId.useGetProductId(),h=React.useMemo(()=>{let e=`gp-accordion-item-${o?.uid}-${r}`;return k?`${e}-${k}`:e},[o?.uid,r,k]),j=React.useMemo(()=>{let e={...p&&v.padding,...d?.type||p?{}:core.composeSize(d?.custom)};return g?e:core.removePaddingYInStyle(e)},[p,d,g,v]),q=React.useMemo(()=>f||S||"edit"!==M,[f,S,M]);return{productID:k,isShow:g,getIdDropdownItem:G,makeIcon:I,refContainer:b,uniqueId:h,isRenderChildren:q,composePosition:y,composeIconColor:P,composeContentSizeStyle:j,hasTransitionedIn:f,isMounted:S}};exports.default=useAccordionItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var helpers=require("../../helpers.js");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getContainClasses=e=>{let s="gp-dialog gp-bg-transparent";return e&&(s+=` ${e}`),{...composeClasses(s)}},getBackdropClasses=e=>{let s="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(s+=" gp-items-center gp-justify-center"),"top"===e&&(s+=" gp-justify-center gp-items-start"),"top-right"===e&&(s+=" gp-justify-end gp-items-start"),"top-left"===e&&(s+=" gp-justify-start gp-items-start"),"bottom"===e&&(s+=" gp-items-end gp-justify-center"),"left"===e&&(s+=" gp-items-center gp-justify-start"),"right"===e&&(s+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(s+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(s+=" gp-items-end gp-justify-end"),{...composeClasses(s)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:e,enableEffect:s,isILP:t})=>{let{effectType:o,background:n,closeButtonPosition:g}=e??{},a="gp-relative gp-max-h-full gp-max-w-full";return"fade"===o&&s&&(a+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===o&&s&&(a+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===o&&s&&(a+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===o&&s&&(a+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===o&&s&&(a+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===o&&s&&(a+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==g&&(a+=" gp-overflow-hidden"),helpers.isTransparentColor(n?.desktop?.color)||(a+=" gp-shadow-xl"),!s&&t&&(a+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(a)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let s="gp-absolute gp-top-0 gp-right-0 gp-
|
|
1
|
+
"use strict";var helpers=require("../../helpers.js");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getContainClasses=e=>{let s="gp-dialog gp-bg-transparent z-[999999]";return e&&(s+=` ${e}`),{...composeClasses(s)}},getBackdropClasses=e=>{let s="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(s+=" gp-items-center gp-justify-center"),"top"===e&&(s+=" gp-justify-center gp-items-start"),"top-right"===e&&(s+=" gp-justify-end gp-items-start"),"top-left"===e&&(s+=" gp-justify-start gp-items-start"),"bottom"===e&&(s+=" gp-items-end gp-justify-center"),"left"===e&&(s+=" gp-items-center gp-justify-start"),"right"===e&&(s+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(s+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(s+=" gp-items-end gp-justify-end"),{...composeClasses(s)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:e,enableEffect:s,isILP:t})=>{let{effectType:o,background:n,closeButtonPosition:g}=e??{},a="gp-relative gp-max-h-full gp-max-w-full";return"fade"===o&&s&&(a+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===o&&s&&(a+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===o&&s&&(a+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===o&&s&&(a+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===o&&s&&(a+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===o&&s&&(a+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==g&&(a+=" gp-overflow-hidden"),helpers.isTransparentColor(n?.desktop?.color)||(a+=" gp-shadow-xl"),!s&&t&&(a+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(a)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let s="gp-absolute gp-top-0 gp-right-0 gp-inline-flex gp-items-center gp-justify-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-overflow-hidden";return"outside"===e&&(s+=" gp-translate-x-1/2 -gp-translate-y-1/2 gp-shadow-md gp-z-[999999]"),{...composeClasses(s)}},getSvgContentClasses=()=>({...composeClasses("[&>svg]:!gp-h-[var(--height-icon)] [&>svg]:!gp-w-auto")}),getBodyContentClasses=()=>({...composeClasses("gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen")});exports.getBackdropClasses=getBackdropClasses,exports.getBodyContentClasses=getBodyContentClasses,exports.getButtonContentClasses=getButtonContentClasses,exports.getContainClasses=getContainClasses,exports.getDialogContentClasses=getDialogContentClasses,exports.getHeadContentClasses=getHeadContentClasses,exports.getOverlayClasses=getOverlayClasses,exports.getSvgContentClasses=getSvgContentClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");require("react/jsx-runtime"),require("react");var _const=require("../../common/const.js"),helpers$1=require("../../hero-banner/common/helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getWrapperStyle=e=>{let t={"--d":e?.desktop?"contents":"none","--d-tablet":e?.tablet?"contents":"none","--d-mobile":e?.mobile?"contents":"none"};return filterTruthyStyles(t)},getContainStyle=()=>{let e={"z-index":_const.ELEMENT_Z_INDEX.DIALOG};return filterTruthyStyles(e)},getBackdropStyle=e=>{let t={...helpers.pointerEventStyle(e)};return filterTruthyStyles(t)},getOverlayStyle=(e,t,r)=>{let l={...core.makeStyle({op:(e??0)/100}),...core.getGlobalColorResponsiveStyle("bgc",{desktop:t}),...helpers.getDisplayStyle(r)};return filterTruthyStyles(l)},getDialogContentStyle=({style:e,width:t,height:r,fullScreen:l})=>{let o={...helpers.getWrapperDialogStyle(e),...helpers.getBorderStyle(e),...helpers.getDisplayStyle(e),...core.makeStyleResponsive("w",core.makeWidth(t,l)),...helpers.heightStyle(l,r)};return filterTruthyStyles(o)},getButtonContentStyle=e=>{let{btnBg:t,btnRounded:r,btnColor:l,btnPadding:o,btnWidth:n,btnHeight:s}=e??{},y=n?core.makeStyleResponsive("w",helpers$1.getWidth(n)):{},i=s?core.makeStyleResponsive("h",helpers$1.getWidth(s)):{},g={...y,...i,...core.getGlobalColorResponsiveStyle("c",{desktop:l}),...core.getGlobalColorResponsiveStyle("bgc",{desktop:t}),...core.getResponsiveStylePadding(o),...core.composeRadius({normal:r})};return filterTruthyStyles(g)},getSvgContentStyle=e=>{let t={};return e&&(t={"--height-icon":`${e}`}),filterTruthyStyles(t)},getBodyContentStyle=(e,t)=>{let{fullScreen:r,height:l,background:o}=e??{},n={...helpers.getInnerStyle(t),...helpers.removeHeightPercentForContent(helpers.heightStyle(r,l)),"border-radius":"inherit",...core.getStyleBackgroundByDevice(o),...core.getGradientBgrStyleByDevice(o,{desktop:!0,tablet:!0,mobile:!0})};return filterTruthyStyles(n)};exports.getBackdropStyle=getBackdropStyle,exports.getBodyContentStyle=getBodyContentStyle,exports.getButtonContentStyle=getButtonContentStyle,exports.getContainStyle=getContainStyle,exports.getDialogContentStyle=getDialogContentStyle,exports.getOverlayStyle=getOverlayStyle,exports.getSvgContentStyle=getSvgContentStyle,exports.getWrapperStyle=getWrapperStyle;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");require("react/jsx-runtime"),require("react");var _const=require("../../common/const.js"),helpers$1=require("../../hero-banner/common/helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getWrapperStyle=e=>{let t={"--d":e?.desktop?"contents":"none","--d-tablet":e?.tablet?"contents":"none","--d-mobile":e?.mobile?"contents":"none"};return filterTruthyStyles(t)},getContainStyle=()=>{let e={"z-index":_const.ELEMENT_Z_INDEX.DIALOG};return filterTruthyStyles(e)},getBackdropStyle=e=>{let t={...helpers.pointerEventStyle(e)};return filterTruthyStyles(t)},getOverlayStyle=(e,t,r)=>{let l={...core.makeStyle({op:(Number(e)??0)/100}),...core.getGlobalColorResponsiveStyle("bgc",{desktop:t}),...helpers.getDisplayStyle(r)};return filterTruthyStyles(l)},getDialogContentStyle=({style:e,width:t,height:r,fullScreen:l})=>{let o={...helpers.getWrapperDialogStyle(e),...helpers.getBorderStyle(e),...helpers.getDisplayStyle(e),...core.makeStyleResponsive("w",core.makeWidth(t,l)),...helpers.heightStyle(l,r)};return filterTruthyStyles(o)},getButtonContentStyle=e=>{let{btnBg:t,btnRounded:r,btnColor:l,btnPadding:o,btnWidth:n,btnHeight:s}=e??{},y=n?core.makeStyleResponsive("w",helpers$1.getWidth(n)):{},i=s?core.makeStyleResponsive("h",helpers$1.getWidth(s)):{},g={...y,...i,...core.getGlobalColorResponsiveStyle("c",{desktop:l}),...core.getGlobalColorResponsiveStyle("bgc",{desktop:t}),...core.getResponsiveStylePadding(o),...core.composeRadius({normal:r})};return filterTruthyStyles(g)},getSvgContentStyle=e=>{let t={};return e&&(t={"--height-icon":`${e}`}),filterTruthyStyles(t)},getBodyContentStyle=(e,t)=>{let{fullScreen:r,height:l,background:o}=e??{},n={...helpers.getInnerStyle(t),...helpers.removeHeightPercentForContent(helpers.heightStyle(r,l)),"border-radius":"inherit",...core.getStyleBackgroundByDevice(o),...core.getGradientBgrStyleByDevice(o,{desktop:!0,tablet:!0,mobile:!0})};return filterTruthyStyles(n)};exports.getBackdropStyle=getBackdropStyle,exports.getBodyContentStyle=getBodyContentStyle,exports.getButtonContentStyle=getButtonContentStyle,exports.getContainStyle=getContainStyle,exports.getDialogContentStyle=getDialogContentStyle,exports.getOverlayStyle=getOverlayStyle,exports.getSvgContentStyle=getSvgContentStyle,exports.getWrapperStyle=getWrapperStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const DialogSettings=[{id:"setting",controls:[{id:"closeButtonPosition",type:"segment",options:[{label:"Inside",value:"inside"},{label:"Outside",value:"outside"}],default:"inside"},{id:"position",type:"position:square",default:"center"},{id:"effectType",type:"select",options:[{label:"Fade",value:"fade"},{label:"Zoom",value:"zoom"},{label:"Zoom out",value:"zoom-out"},{label:"Horizontal move",value:"horizontal"},{label:"Vertical move",value:"vertical"},{label:"
|
|
1
|
+
"use strict";const DialogSettings=[{id:"setting",controls:[{id:"closeButtonPosition",type:"segment",options:[{label:"Inside",value:"inside"},{label:"Outside",value:"outside"}],default:"inside"},{id:"position",type:"position:square",default:"center"},{id:"effectType",type:"select",options:[{label:"Fade",value:"fade"},{label:"Zoom",value:"zoom"},{label:"Zoom out",value:"zoom-out"},{label:"Horizontal move",value:"horizontal"},{label:"Vertical move",value:"vertical"},{label:"3D unfold",value:"unfold"},{label:"None",value:"none"}],default:"fade"},{id:"closeOnClickOutside",type:"toggle",default:!0},{id:"name",type:"input",placeholder:"E.g. New popup",clearButton:!1},{id:"width",type:"input:unit",placeholder:"Auto",units:["px","%"],devices:{desktop:{default:"600px"},mobile:{default:"100%"}}},{id:"height",type:"input:unit",placeholder:"Auto",units:["px","%"],devices:{desktop:{default:void 0}}},{id:"fullScreen",type:"toggle",devices:{desktop:{default:!1}}},{id:"isOverlay",type:"toggle",default:!0},{id:"overlayColor",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"overlayOpacity",type:"input:slider",min:0,step:1,max:100,default:70,units:["%"],useOnlyUnitInit:!0,showDefaultUnit:!0},{id:"triggerTime",type:"input:slider",min:0,default:0,max:100,units:["s"],useOnlyUnitInit:!0,showDefaultUnit:!0,isNumber:!0},{id:"triggerPercentage",type:"input:slider",units:["%"],min:0,max:100,default:10,useOnlyUnitInit:!0,showDefaultUnit:!0,isNumber:!0},{id:"frequency",type:"input:slider",min:1,max:30,default:3,units:["days"],useOnlyUnitInit:!0,showDefaultUnit:!0,isNumber:!0},{id:"frequencyMode",type:"select",options:[{label:"Once per user",value:"once"},{label:"Each visit time",value:"every"},{label:"After a time",value:"after-period-time"}],default:"once"},{id:"btnSize",type:"input:stepper",default:32},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg height="20" width="20" data-name="x-bold" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817606065848680">
|
|
2
2
|
<path fill="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"/>
|
|
3
3
|
</svg>`,compoDefaultValue:`<svg height="20" width="20" data-name="x-bold" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817606065848680">
|
|
4
4
|
<path fill="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Popup
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Popup name"},controls:[{label:{en:"Name"},setting:{id:"name"}}]},{label:{en:"Button close"},controls:[{label:{en:"Icon"},setting:{id:"iconSvg"}},{label:{en:"Icon size"},setting:{id:"iconSize"}},{label:{en:"Icon color"},setting:{id:"btnColor"}},{label:{en:"Width"},setting:{id:"btnWidth"}},{label:{en:"Height"},setting:{id:"btnHeight"}},{label:{en:"Background"},setting:{id:"btnBg"}}],moreSettings:{controls:[{label:{en:"Corner"},setting:{id:"btnRounded"}},{setting:{id:"closeButtonPosition"},label:{en:"Position"}}]}},{label:{en:"Overlay"},controls:[{label:{en:"Color"},setting:{id:"overlayColor"}},{label:{en:"Opacity"},setting:{id:"overlayOpacity"}},{label:{en:"Click to close"},setting:{id:"closeOnClickOutside"}}]},{label:{en:"Size"},controls:[{label:{en:"Full screen"},setting:{id:"fullScreen"}},{conditionDisplay:"!fullScreen",label:{en:"Width"},setting:{id:"width"}},{conditionDisplay:"!fullScreen",label:{en:"Height"},setting:{id:"height"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},devices:{desktop:{default:{type:"custom",top:"32px",bottom:"32px",left:"32px",right:"32px"}}},compoDefaultValue:{desktop:{default:{type:"custom",top:"32px",bottom:"32px",left:"32px",right:"32px"}}}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Position"},controls:[{label:{en:"Position"},type:"combo",iconPrefix:"gp-position",iconName:"polaris-edit",isHideClear:!0,getValueFromSettingID:"position",capitalizeDisplayValue:!0,controls:[{label:{en:"Choose"},setting:{id:"position"},options:{labelAlign:"top"}}],conditionDisplay:"!fullScreen"}]},{label:{en:"Display condition"},controls:[{label:{en:"Show when"},setting:{id:"trigger"}},{conditionDisplay:"trigger === 'show-after-time' || trigger === 'show-on-page-load'",label:{en:"Delay"},setting:{id:"triggerTime"}},{conditionDisplay:"trigger === 'show-after-scroll'",label:{en:"Scroll"},setting:{id:"triggerPercentage"}},{conditionDisplay:"trigger === 'show-when-about-exit'",label:{en:"On mobile"},setting:{id:"mobileTrigger"}},{conditionDisplay:"trigger === 'show-when-about-exit' && mobileTrigger === 'timer'",label:{en:"After load"},setting:{id:"mobileTriggerTime"}},{label:{en:"Frequency"},setting:{id:"frequencyMode"},conditionDisplay:"trigger !== 'none'"},{conditionDisplay:"frequencyMode === 'after-period-time'",label:{en:"Display time"},setting:{id:"frequency"}}]},{label:{en:"Effect"},controls:[{setting:{id:"effectType"},label:{en:"Entrance effect"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -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,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!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:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{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 && hoverEffectScale == \"100%\" && (overlayColor.hover == 'transparent' || !overlayColor || !overlayColor.hover)",source:["hoverEffect","hoverEffectScale","overlayColor"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,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"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\") && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"(hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")) && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}},{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:"
|
|
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,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!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:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{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 && hoverEffectScale == \"100%\" && (overlayColor.hover == 'transparent' || !overlayColor || !overlayColor.hover)",source:["hoverEffect","hoverEffectScale","overlayColor"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,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"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\") && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"(hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")) && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}},{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"),React=require("react"),index=require("../../../../post-purchase/product/helpers/index.js");const useProductSetting=e=>{let{setting:t}=e,{productSetting:r,quantity:o,readOnly:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),React=require("react"),index=require("../../../../post-purchase/product/helpers/index.js");const useProductSetting=e=>{let{setting:t}=e,{productSetting:r,quantity:o,readOnly:a,isSyncProduct:c}=t??{},d=core.usePageType(),u=core.usePageStore(e=>e.dynamicProduct),i=core.usePageStore(e=>e.publicStoreFrontData),s=core.useEditorMode(),n="edit"===s,P=r?.productId??"latest",S=r?.productStatus=="dynamic"?{...r,...u}:r,l=S?.initialVariantId,p=S?.initialVariantBaseId,g=React.useMemo(()=>index.hasPublicStoreFrontData(i)?index.createStoreFrontFetcher(i):void 0,[i]),{data:h,isLoading:m,error:x}=core.useProductQuery(P,void 0,g),[y,R]=React.useState(!0),F=(x||!h&&!m)&&n,q="PRODUCT"===d,v=React.useMemo(()=>({product:h,initialVariantId:l,initialVariantBaseId:p,quantity:o,readOnly:a,isSyncProduct:c,key:`uid-${h?.id}-${l??""}`,hasPreSelected:r?.hasPreSelected}),[p,l,c,h,r?.hasPreSelected,o,a]);return{forceProductSetting:S,isProductPage:q,isProductNotFound:F,showProductNotFound:y,isLoading:m,product:h,errorLoadProduct:x,isEditor:n,productProviderData:v,setShowProductNotFound:R}};exports.useProductSetting=useProductSetting;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
key="${s?.uid}"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${Text_liquid.default({className:I,styles:{typo:n,typography:o,textAlign:d},setting:{
|
|
9
|
+
${Text_liquid.default({className:I,styles:{typo:n,typography:o,textAlign:d},setting:{text:e,translate:`childItem_${t}`,htmlTag:"div",excludeFlex:!0},builderProps:s})}
|
|
10
10
|
</li>
|
|
11
11
|
`}).join(""),_=()=>core.WrapRenderChildren({uid:s?.uid||"",customProps:r?.[0].customProps},r?.map((e,t)=>{let l=(a?.activeKey??0)<0||(a?.activeKey??0)>=(a?.childItem??[]).length?0===t:t===a?.activeKey;return e?core.template`${core.RenderChildren({...e,parentUid:s?.uid,isActive:l})}`:""})),k=()=>core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-tab.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-tab.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return core.template`
|
|
12
12
|
<gp-tab
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var helpers=require("../../../helpers.js");const VideoSettings=[{id:"setting",controls:[{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"type",type:"select",label:"Video Type",options:[{label:"YouTube",value:"youtube"},{label:"Vimeo",value:"vimeo"},{label:"Video hosting",value:"html5"}],default:"html5"},{id:"youtubeUrl",type:"input",label:"Youtube Link",default:"https://www.youtube.com/watch?v=cyzh48XRS4M",placeholder:"Insert video url here",hide:!0,action:{clear:!0},actionChangeControls:[{controlID:"loopVideo",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!0},{controlID:"autoplay",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!0},{controlID:"controls",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!1},{controlID:"mute",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!1},{controlID:"lazy",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!1}]},{id:"vimeoUrl",type:"input",label:"Vimeo Link",default:"https://vimeo.com/347119375",placeholder:"
|
|
1
|
+
"use strict";var helpers=require("../../../helpers.js");const VideoSettings=[{id:"setting",controls:[{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"type",type:"select",label:"Video Type",options:[{label:"YouTube",value:"youtube"},{label:"Vimeo",value:"vimeo"},{label:"Video hosting",value:"html5"}],default:"html5"},{id:"youtubeUrl",type:"input",label:"Youtube Link",default:"https://www.youtube.com/watch?v=cyzh48XRS4M",placeholder:"Insert video url here",hide:!0,action:{clear:!0},actionChangeControls:[{controlID:"loopVideo",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!0},{controlID:"autoplay",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!0},{controlID:"controls",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!1},{controlID:"mute",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!1},{controlID:"lazy",condition:`${helpers.youtubeShortsRegex}.test(youtubeUrl)`,newValue:!1}]},{id:"vimeoUrl",type:"input",label:"Vimeo Link",default:"https://vimeo.com/347119375",placeholder:"Insert video url here",hide:!0,action:{clear:!0}},{id:"html5Url",type:"input",label:"HTML5 Video Link",default:"https://media.w3.org/2010/05/sintel/trailer.mp4",placeholder:"Insert video url here",hide:!0,action:{clear:!0}},{id:"notes",type:"notes",default:'You can upload video to a hosting server e.g Shopify. <a class="no-underline text-[#8AA4FF] font-medium leading-5" target="_blank" href="https://help.gempages.net/articles/version-7-video-element#video-url">Learn more</a>'},{id:"poster",type:"image",label:"Video Poster",hiddenSetting:{seo:!0}},{id:"preload",type:"toggle",label:"Preload",default:!1},{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:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"}}},{id:"width",type:"input:stepper",min:0,label:"Aspect Width",hide:!0,devices:{desktop:{default:16}}},{id:"height",type:"input:stepper",min:1,label:"Aspect Height",hide:!0,devices:{desktop:{default:9}}},{id:"startTime",type:"input",label:"Start time",placeholder:"mm:ss",info:"Start video at xx seconds",hide:!0},{id:"endTime",type:"input",label:"End time",placeholder:"mm:ss",info:"End video at xx seconds",hide:!0},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"mute",label:"Enable Sound",type:"toggle",default:!1},{id:"loopVideo",label:"Loop Video",type:"toggle",default:!1},{id:"controls",label:"Show Control Bar",type:"toggle",default:!0,info:"Player controls display in the player"},{id:"lazy",label:"Lazy load",type:"toggle",default:!0,info:"Optimize for pagespeed loading time"}]}];exports.VideoSettings=VideoSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeGlobalSize as t,composeSize as e,removePaddingYInStyle as r,makeStyle as a,getGlobalColorStateStyle as
|
|
1
|
+
import{makeGlobalSize as t,composeSize as e,removePaddingYInStyle as r,makeStyle as a,getSingleColorVariable as i,getGlobalColorStateStyle as o}from"@gem-sdk/core";let MINIMUM_CHILD=1,BODY_CHILD_INDEX=0,getDataState=(t,e)=>{let{setting:r={},styles:a={},builderProps:i}=t,{activeKey:o,iconSvg:n,expandItem:l,iconPosition:s,iconCollapseSize:g,iconGlobalSize:d,iconExpand:p,iconCollapse:c,layoutHeader:m,expandedMode:u,configIconSize:I}=r,{bgColor:S,color:D,headerBorder:L,width:v,fullWidth:C,textColor:M,itemHeaderSpacing:_,contentSizePadding:N,iconColor:h,headerContentPadding:H,widthHeightSize:U}=a,w="multiple"===u,y=t=>t?t.toString().toLowerCase().split(",").map(t=>parseInt(t.trim())-1).map(t=>t.toString()):[],P=l?y(o):[],q=w?[...P]:P,B=()=>({iconSvg:n,isIconPlus:"plus"===n,activeKey:o,expanded:w,expandItem:l,iconPosition:s,iconGlobalSize:d,iconCollapse:c,iconExpand:p,iconCollapseSize:g,layoutHeader:m,expandedMode:u,configIconSize:I,parentUid:i?.uid,childListNumber:l?o?.toString().toLowerCase()==="all"?e?.map((t,e)=>e.toString()):q:[],chidlrenUid:e?.map(t=>t.uid)}),E=()=>({bgColor:S,color:D,headerBorder:L,fullWidth:C,width:v,itemHeaderSpacing:_,textColor:M,iconColor:h,contentSizePadding:N,headerContentPadding:H,widthHeightSize:U});return{uidState:i?.uid,settingState:B(),stylesState:E(),accordions:q}},getParentSettings=(t={})=>{let{iconSvg:e,titleTypo:r,layoutHeader:a,iconGlobalSize:i,iconCollapseSize:o,iconCollapse:n,iconExpand:l,alignment:s,configIconSize:g,iconPosition:d}=t,p=r?{...r,attrs:{...r.attrs}}:void 0;return p?.attrs?.color&&delete p.attrs.color,{iconSvg:e,titleTypo:p,layoutHeader:a,iconGlobalSize:i,iconCollapseSize:o,iconCollapse:n,iconExpand:l,alignment:s,configIconSize:g,iconPosition:d}},getSettingItemLiquid=n=>{let{index:l,accordions:s,parentSetting:g,parentStyle:d}=n,{titleTypo:p,iconCollapse:c,iconExpand:m,activeKey:u,expandItem:I}=g??{};delete p?.attrs?.color;let{itemContentSpacing:S,iconColor:D,contentSizePadding:L}=d??{},v=!!I&&(u?.toString()?.toLowerCase()==="all"||s?.includes(l?.toString()??"")),C=t(L),M=()=>{let t={...L&&C.padding,...S?.type||L?{}:e(S?.custom)};return v?t:r(t)},_=()=>m&&v?m:c&&!v?c:void 0,N=_(),h=()=>{let t={normal:D?.normal??"transparent",hover:D?.hover??D?.active??D?.normal??"transparent",active:D?.active??"transparent"};return v?a({c:i(t?.active)}):o("c",t)};return{isShow:v,composeContentSizeStyle:M,collapsibleIcon:N,composeIconColor:h(),makeIcon:_}};export{BODY_CHILD_INDEX,MINIMUM_CHILD,getDataState,getParentSettings,getSettingItemLiquid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeGlobalSize as t,useEditorMode as e,makeStyle as r,
|
|
1
|
+
import{makeGlobalSize as t,useEditorMode as e,makeStyle as r,getSingleColorVariable as o,getGlobalColorStateStyle as n,composeSize as a,removePaddingYInStyle as i}from"@gem-sdk/core";import{useState as c,useEffect as s,useMemo as l}from"react";import m from"./useMountTransition.js";import{useGetProductId as d}from"../../hooks/useGetProductId.js";let useAccordionItem=u=>{let{accordions:p,index:v,builderProps:f,parentSetting:g={},parentStyle:h={},handleDropDown:$}=u,{iconPosition:j,titleTypo:w,iconCollapse:I,iconExpand:k}=g;delete w?.attrs?.color;let{itemContentSpacing:x,iconColor:A,contentSizePadding:b}=h,y=p?.includes(v?.toString()??""),G=t(b),M=e(),[P,S]=c(y),T=m(P||!1,500);s(()=>{S(y)},[y]);let q=l(()=>k&&y?k:I&&!y?I:void 0,[y,I,k]),z=l(()=>r({fd:"left"===j?"row":"row-reverse",jc:"right"===j?"space-between":""}),[j]),B=(t,e)=>{!t.target.closest(".gp-text")&&$&&e&&(S(!P),$(e))},C=l(()=>{let t={normal:A?.normal??"transparent",hover:A?.hover??A?.active??A?.normal??"transparent",active:A?.active??A?.normal??"transparent"};return y?r({c:o(t?.active)}):n("c",t)},[A,y]),{refContainer:D,productID:E}=d(),F=l(()=>{let t=`gp-accordion-item-${f?.uid}-${v}`;return E?`${t}-${E}`:t},[f?.uid,v,E]),H=l(()=>{let t={...b&&G.padding,...x?.type||b?{}:a(x?.custom)};return y?t:i(t)},[b,x,y,G]),J=l(()=>T||P||"edit"!==M,[T,P,M]);return{productID:E,isShow:y,getIdDropdownItem:B,makeIcon:q,refContainer:D,uniqueId:F,isRenderChildren:J,composePosition:z,composeIconColor:C,composeContentSizeStyle:H,hasTransitionedIn:T,isMounted:P}};export{useAccordionItem as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isTransparentColor as e}from"../../helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getContainClasses=e=>{let s="gp-dialog gp-bg-transparent";return e&&(s+=` ${e}`),{...composeClasses(s)}},getBackdropClasses=e=>{let s="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(s+=" gp-items-center gp-justify-center"),"top"===e&&(s+=" gp-justify-center gp-items-start"),"top-right"===e&&(s+=" gp-justify-end gp-items-start"),"top-left"===e&&(s+=" gp-justify-start gp-items-start"),"bottom"===e&&(s+=" gp-items-end gp-justify-center"),"left"===e&&(s+=" gp-items-center gp-justify-start"),"right"===e&&(s+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(s+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(s+=" gp-items-end gp-justify-end"),{...composeClasses(s)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:s,enableEffect:t,isILP:o})=>{let{effectType:g,background:n,closeButtonPosition:a}=s??{},p="gp-relative gp-max-h-full gp-max-w-full";return"fade"===g&&t&&(p+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===g&&t&&(p+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===g&&t&&(p+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===g&&t&&(p+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===g&&t&&(p+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===g&&t&&(p+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==a&&(p+=" gp-overflow-hidden"),e(n?.desktop?.color)||(p+=" gp-shadow-xl"),!t&&o&&(p+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(p)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let s="gp-absolute gp-top-0 gp-right-0 gp-
|
|
1
|
+
import{isTransparentColor as e}from"../../helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getContainClasses=e=>{let s="gp-dialog gp-bg-transparent z-[999999]";return e&&(s+=` ${e}`),{...composeClasses(s)}},getBackdropClasses=e=>{let s="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(s+=" gp-items-center gp-justify-center"),"top"===e&&(s+=" gp-justify-center gp-items-start"),"top-right"===e&&(s+=" gp-justify-end gp-items-start"),"top-left"===e&&(s+=" gp-justify-start gp-items-start"),"bottom"===e&&(s+=" gp-items-end gp-justify-center"),"left"===e&&(s+=" gp-items-center gp-justify-start"),"right"===e&&(s+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(s+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(s+=" gp-items-end gp-justify-end"),{...composeClasses(s)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:s,enableEffect:t,isILP:o})=>{let{effectType:g,background:n,closeButtonPosition:a}=s??{},p="gp-relative gp-max-h-full gp-max-w-full";return"fade"===g&&t&&(p+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===g&&t&&(p+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===g&&t&&(p+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===g&&t&&(p+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===g&&t&&(p+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===g&&t&&(p+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==a&&(p+=" gp-overflow-hidden"),e(n?.desktop?.color)||(p+=" gp-shadow-xl"),!t&&o&&(p+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(p)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let s="gp-absolute gp-top-0 gp-right-0 gp-inline-flex gp-items-center gp-justify-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-overflow-hidden";return"outside"===e&&(s+=" gp-translate-x-1/2 -gp-translate-y-1/2 gp-shadow-md gp-z-[999999]"),{...composeClasses(s)}},getSvgContentClasses=()=>({...composeClasses("[&>svg]:!gp-h-[var(--height-icon)] [&>svg]:!gp-w-auto")}),getBodyContentClasses=()=>({...composeClasses("gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen")});export{getBackdropClasses,getBodyContentClasses,getButtonContentClasses,getContainClasses,getDialogContentClasses,getHeadContentClasses,getOverlayClasses,getSvgContentClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyle as t,getGlobalColorResponsiveStyle as e,makeStyleResponsive as r,makeWidth as l,getResponsiveStylePadding as n,composeRadius as o,getStyleBackgroundByDevice as y,getGradientBgrStyleByDevice as i}from"@gem-sdk/core";import{pointerEventStyle as s,getDisplayStyle as S,getWrapperDialogStyle as g,getBorderStyle as u,heightStyle as m,getInnerStyle as p,removeHeightPercentForContent as a}from"./helpers.js";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as c}from"../../common/const.js";import{getWidth as d}from"../../hero-banner/common/helpers.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getWrapperStyle=t=>{let e={"--d":t?.desktop?"contents":"none","--d-tablet":t?.tablet?"contents":"none","--d-mobile":t?.mobile?"contents":"none"};return filterTruthyStyles(e)},getContainStyle=()=>{let t={"z-index":c.DIALOG};return filterTruthyStyles(t)},getBackdropStyle=t=>{let e={...s(t)};return filterTruthyStyles(e)},getOverlayStyle=(r,l,n)=>{let o={...t({op:(r??0)/100}),...e("bgc",{desktop:l}),...S(n)};return filterTruthyStyles(o)},getDialogContentStyle=({style:t,width:e,height:n,fullScreen:o})=>{let y={...g(t),...u(t),...S(t),...r("w",l(e,o)),...m(o,n)};return filterTruthyStyles(y)},getButtonContentStyle=t=>{let{btnBg:l,btnRounded:y,btnColor:i,btnPadding:s,btnWidth:S,btnHeight:g}=t??{},u=S?r("w",d(S)):{},m=g?r("h",d(g)):{},p={...u,...m,...e("c",{desktop:i}),...e("bgc",{desktop:l}),...n(s),...o({normal:y})};return filterTruthyStyles(p)},getSvgContentStyle=t=>{let e={};return t&&(e={"--height-icon":`${t}`}),filterTruthyStyles(e)},getBodyContentStyle=(t,e)=>{let{fullScreen:r,height:l,background:n}=t??{},o={...p(e),...a(m(r,l)),"border-radius":"inherit",...y(n),...i(n,{desktop:!0,tablet:!0,mobile:!0})};return filterTruthyStyles(o)};export{getBackdropStyle,getBodyContentStyle,getButtonContentStyle,getContainStyle,getDialogContentStyle,getOverlayStyle,getSvgContentStyle,getWrapperStyle};
|
|
1
|
+
import{makeStyle as t,getGlobalColorResponsiveStyle as e,makeStyleResponsive as r,makeWidth as l,getResponsiveStylePadding as n,composeRadius as o,getStyleBackgroundByDevice as y,getGradientBgrStyleByDevice as i}from"@gem-sdk/core";import{pointerEventStyle as s,getDisplayStyle as S,getWrapperDialogStyle as g,getBorderStyle as u,heightStyle as m,getInnerStyle as p,removeHeightPercentForContent as a}from"./helpers.js";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as c}from"../../common/const.js";import{getWidth as d}from"../../hero-banner/common/helpers.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getWrapperStyle=t=>{let e={"--d":t?.desktop?"contents":"none","--d-tablet":t?.tablet?"contents":"none","--d-mobile":t?.mobile?"contents":"none"};return filterTruthyStyles(e)},getContainStyle=()=>{let t={"z-index":c.DIALOG};return filterTruthyStyles(t)},getBackdropStyle=t=>{let e={...s(t)};return filterTruthyStyles(e)},getOverlayStyle=(r,l,n)=>{let o={...t({op:(Number(r)??0)/100}),...e("bgc",{desktop:l}),...S(n)};return filterTruthyStyles(o)},getDialogContentStyle=({style:t,width:e,height:n,fullScreen:o})=>{let y={...g(t),...u(t),...S(t),...r("w",l(e,o)),...m(o,n)};return filterTruthyStyles(y)},getButtonContentStyle=t=>{let{btnBg:l,btnRounded:y,btnColor:i,btnPadding:s,btnWidth:S,btnHeight:g}=t??{},u=S?r("w",d(S)):{},m=g?r("h",d(g)):{},p={...u,...m,...e("c",{desktop:i}),...e("bgc",{desktop:l}),...n(s),...o({normal:y})};return filterTruthyStyles(p)},getSvgContentStyle=t=>{let e={};return t&&(e={"--height-icon":`${t}`}),filterTruthyStyles(e)},getBodyContentStyle=(t,e)=>{let{fullScreen:r,height:l,background:n}=t??{},o={...p(e),...a(m(r,l)),"border-radius":"inherit",...y(n),...i(n,{desktop:!0,tablet:!0,mobile:!0})};return filterTruthyStyles(o)};export{getBackdropStyle,getBodyContentStyle,getButtonContentStyle,getContainStyle,getDialogContentStyle,getOverlayStyle,getSvgContentStyle,getWrapperStyle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let DialogSettings=[{id:"setting",controls:[{id:"closeButtonPosition",type:"segment",options:[{label:"Inside",value:"inside"},{label:"Outside",value:"outside"}],default:"inside"},{id:"position",type:"position:square",default:"center"},{id:"effectType",type:"select",options:[{label:"Fade",value:"fade"},{label:"Zoom",value:"zoom"},{label:"Zoom out",value:"zoom-out"},{label:"Horizontal move",value:"horizontal"},{label:"Vertical move",value:"vertical"},{label:"
|
|
1
|
+
let DialogSettings=[{id:"setting",controls:[{id:"closeButtonPosition",type:"segment",options:[{label:"Inside",value:"inside"},{label:"Outside",value:"outside"}],default:"inside"},{id:"position",type:"position:square",default:"center"},{id:"effectType",type:"select",options:[{label:"Fade",value:"fade"},{label:"Zoom",value:"zoom"},{label:"Zoom out",value:"zoom-out"},{label:"Horizontal move",value:"horizontal"},{label:"Vertical move",value:"vertical"},{label:"3D unfold",value:"unfold"},{label:"None",value:"none"}],default:"fade"},{id:"closeOnClickOutside",type:"toggle",default:!0},{id:"name",type:"input",placeholder:"E.g. New popup",clearButton:!1},{id:"width",type:"input:unit",placeholder:"Auto",units:["px","%"],devices:{desktop:{default:"600px"},mobile:{default:"100%"}}},{id:"height",type:"input:unit",placeholder:"Auto",units:["px","%"],devices:{desktop:{default:void 0}}},{id:"fullScreen",type:"toggle",devices:{desktop:{default:!1}}},{id:"isOverlay",type:"toggle",default:!0},{id:"overlayColor",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"overlayOpacity",type:"input:slider",min:0,step:1,max:100,default:70,units:["%"],useOnlyUnitInit:!0,showDefaultUnit:!0},{id:"triggerTime",type:"input:slider",min:0,default:0,max:100,units:["s"],useOnlyUnitInit:!0,showDefaultUnit:!0,isNumber:!0},{id:"triggerPercentage",type:"input:slider",units:["%"],min:0,max:100,default:10,useOnlyUnitInit:!0,showDefaultUnit:!0,isNumber:!0},{id:"frequency",type:"input:slider",min:1,max:30,default:3,units:["days"],useOnlyUnitInit:!0,showDefaultUnit:!0,isNumber:!0},{id:"frequencyMode",type:"select",options:[{label:"Once per user",value:"once"},{label:"Each visit time",value:"every"},{label:"After a time",value:"after-period-time"}],default:"once"},{id:"btnSize",type:"input:stepper",default:32},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg height="20" width="20" data-name="x-bold" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817606065848680">
|
|
2
2
|
<path fill="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"/>
|
|
3
3
|
</svg>`,compoDefaultValue:`<svg height="20" width="20" data-name="x-bold" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817606065848680">
|
|
4
4
|
<path fill="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Popup
|
|
1
|
+
let SettingUIV2=[{label:{en:"Popup name"},controls:[{label:{en:"Name"},setting:{id:"name"}}]},{label:{en:"Button close"},controls:[{label:{en:"Icon"},setting:{id:"iconSvg"}},{label:{en:"Icon size"},setting:{id:"iconSize"}},{label:{en:"Icon color"},setting:{id:"btnColor"}},{label:{en:"Width"},setting:{id:"btnWidth"}},{label:{en:"Height"},setting:{id:"btnHeight"}},{label:{en:"Background"},setting:{id:"btnBg"}}],moreSettings:{controls:[{label:{en:"Corner"},setting:{id:"btnRounded"}},{setting:{id:"closeButtonPosition"},label:{en:"Position"}}]}},{label:{en:"Overlay"},controls:[{label:{en:"Color"},setting:{id:"overlayColor"}},{label:{en:"Opacity"},setting:{id:"overlayOpacity"}},{label:{en:"Click to close"},setting:{id:"closeOnClickOutside"}}]},{label:{en:"Size"},controls:[{label:{en:"Full screen"},setting:{id:"fullScreen"}},{conditionDisplay:"!fullScreen",label:{en:"Width"},setting:{id:"width"}},{conditionDisplay:"!fullScreen",label:{en:"Height"},setting:{id:"height"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},devices:{desktop:{default:{type:"custom",top:"32px",bottom:"32px",left:"32px",right:"32px"}}},compoDefaultValue:{desktop:{default:{type:"custom",top:"32px",bottom:"32px",left:"32px",right:"32px"}}}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Position"},controls:[{label:{en:"Position"},type:"combo",iconPrefix:"gp-position",iconName:"polaris-edit",isHideClear:!0,getValueFromSettingID:"position",capitalizeDisplayValue:!0,controls:[{label:{en:"Choose"},setting:{id:"position"},options:{labelAlign:"top"}}],conditionDisplay:"!fullScreen"}]},{label:{en:"Display condition"},controls:[{label:{en:"Show when"},setting:{id:"trigger"}},{conditionDisplay:"trigger === 'show-after-time' || trigger === 'show-on-page-load'",label:{en:"Delay"},setting:{id:"triggerTime"}},{conditionDisplay:"trigger === 'show-after-scroll'",label:{en:"Scroll"},setting:{id:"triggerPercentage"}},{conditionDisplay:"trigger === 'show-when-about-exit'",label:{en:"On mobile"},setting:{id:"mobileTrigger"}},{conditionDisplay:"trigger === 'show-when-about-exit' && mobileTrigger === 'timer'",label:{en:"After load"},setting:{id:"mobileTriggerTime"}},{label:{en:"Frequency"},setting:{id:"frequencyMode"},conditionDisplay:"trigger !== 'none'"},{conditionDisplay:"frequencyMode === 'after-period-time'",label:{en:"Display time"},setting:{id:"frequency"}}]},{label:{en:"Effect"},controls:[{setting:{id:"effectType"},label:{en:"Entrance effect"}}]}];export{SettingUIV2};
|
|
@@ -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,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!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:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{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 && hoverEffectScale == \"100%\" && (overlayColor.hover == 'transparent' || !overlayColor || !overlayColor.hover)",source:["hoverEffect","hoverEffectScale","overlayColor"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,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"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\") && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"(hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")) && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}},{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:"
|
|
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,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!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:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{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 && hoverEffectScale == \"100%\" && (overlayColor.hover == 'transparent' || !overlayColor || !overlayColor.hover)",source:["hoverEffect","hoverEffectScale","overlayColor"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,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"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\") && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"(hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")) && hoverEffect == true",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"(hoverEffectScale != '100%' || (overlayColor && overlayColor.hover && overlayColor.hover !== \"transparent\")) && hoverEffect == false",source:["overlayColor","hoverEffectScale","hoverEffect"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}},{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{usePageType as t,usePageStore as e,useEditorMode as r,useProductQuery as d}from"@gem-sdk/core";import{useMemo as
|
|
1
|
+
import{usePageType as t,usePageStore as e,useEditorMode as r,useProductQuery as d}from"@gem-sdk/core";import{useMemo as i,useState as o}from"react";import{hasPublicStoreFrontData as a,createStoreFrontFetcher as c}from"../../../../post-purchase/product/helpers/index.js";let useProductSetting=u=>{let{setting:s}=u,{productSetting:n,quantity:p,readOnly:l,isSyncProduct:m}=s??{},P=t(),S=e(t=>t.dynamicProduct),h=e(t=>t.publicStoreFrontData),f=r(),g="edit"===f,y=n?.productId??"latest",I=n?.productStatus=="dynamic"?{...n,...S}:n,k=I?.initialVariantId,v=I?.initialVariantBaseId,x=i(()=>a(h)?c(h):void 0,[h]),{data:D,isLoading:V,error:$}=d(y,void 0,x),[b,j]=o(!0),B=($||!D&&!V)&&g,C="PRODUCT"===P,F=i(()=>({product:D,initialVariantId:k,initialVariantBaseId:v,quantity:p,readOnly:l,isSyncProduct:m,key:`uid-${D?.id}-${k??""}`,hasPreSelected:n?.hasPreSelected}),[v,k,m,D,n?.hasPreSelected,p,l]);return{forceProductSetting:I,isProductPage:C,isProductNotFound:B,showProductNotFound:b,isLoading:V,product:D,errorLoadProduct:$,isEditor:g,productProviderData:F,setShowProductNotFound:j}};export{useProductSetting};
|
|
@@ -6,7 +6,7 @@ import{template as e,WrapRenderChildren as s,RenderChildren as t,RenderIf as l,i
|
|
|
6
6
|
key="${I?.uid}"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${y({className:el,styles:{typo:F,typography:W,textAlign:V},setting:{
|
|
9
|
+
${y({className:el,styles:{typo:F,typography:W,textAlign:V},setting:{text:s,translate:`childItem_${t}`,htmlTag:"div",excludeFlex:!0},builderProps:I})}
|
|
10
10
|
</li>
|
|
11
11
|
`}).join(""),ea=()=>s({uid:I?.uid||"",customProps:q?.[0].customProps},q?.map((s,l)=>{let i=(P?.activeKey??0)<0||(P?.activeKey??0)>=(P?.childItem??[]).length?0===l:l===P?.activeKey;return s?e`${t({...s,parentUid:I?.uid,isActive:i})}`:""})),er=()=>l(i,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-tab.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${a}/assets-v2/gp-tab.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return e`
|
|
12
12
|
<gp-tab
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{youtubeShortsRegex as e}from"../../../helpers.js";let VideoSettings=[{id:"setting",controls:[{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"type",type:"select",label:"Video Type",options:[{label:"YouTube",value:"youtube"},{label:"Vimeo",value:"vimeo"},{label:"Video hosting",value:"html5"}],default:"html5"},{id:"youtubeUrl",type:"input",label:"Youtube Link",default:"https://www.youtube.com/watch?v=cyzh48XRS4M",placeholder:"Insert video url here",hide:!0,action:{clear:!0},actionChangeControls:[{controlID:"loopVideo",condition:`${e}.test(youtubeUrl)`,newValue:!0},{controlID:"autoplay",condition:`${e}.test(youtubeUrl)`,newValue:!0},{controlID:"controls",condition:`${e}.test(youtubeUrl)`,newValue:!1},{controlID:"mute",condition:`${e}.test(youtubeUrl)`,newValue:!1},{controlID:"lazy",condition:`${e}.test(youtubeUrl)`,newValue:!1}]},{id:"vimeoUrl",type:"input",label:"Vimeo Link",default:"https://vimeo.com/347119375",placeholder:"
|
|
1
|
+
import{youtubeShortsRegex as e}from"../../../helpers.js";let VideoSettings=[{id:"setting",controls:[{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"type",type:"select",label:"Video Type",options:[{label:"YouTube",value:"youtube"},{label:"Vimeo",value:"vimeo"},{label:"Video hosting",value:"html5"}],default:"html5"},{id:"youtubeUrl",type:"input",label:"Youtube Link",default:"https://www.youtube.com/watch?v=cyzh48XRS4M",placeholder:"Insert video url here",hide:!0,action:{clear:!0},actionChangeControls:[{controlID:"loopVideo",condition:`${e}.test(youtubeUrl)`,newValue:!0},{controlID:"autoplay",condition:`${e}.test(youtubeUrl)`,newValue:!0},{controlID:"controls",condition:`${e}.test(youtubeUrl)`,newValue:!1},{controlID:"mute",condition:`${e}.test(youtubeUrl)`,newValue:!1},{controlID:"lazy",condition:`${e}.test(youtubeUrl)`,newValue:!1}]},{id:"vimeoUrl",type:"input",label:"Vimeo Link",default:"https://vimeo.com/347119375",placeholder:"Insert video url here",hide:!0,action:{clear:!0}},{id:"html5Url",type:"input",label:"HTML5 Video Link",default:"https://media.w3.org/2010/05/sintel/trailer.mp4",placeholder:"Insert video url here",hide:!0,action:{clear:!0}},{id:"notes",type:"notes",default:'You can upload video to a hosting server e.g Shopify. <a class="no-underline text-[#8AA4FF] font-medium leading-5" target="_blank" href="https://help.gempages.net/articles/version-7-video-element#video-url">Learn more</a>'},{id:"poster",type:"image",label:"Video Poster",hiddenSetting:{seo:!0}},{id:"preload",type:"toggle",label:"Preload",default:!1},{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:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"}}},{id:"width",type:"input:stepper",min:0,label:"Aspect Width",hide:!0,devices:{desktop:{default:16}}},{id:"height",type:"input:stepper",min:1,label:"Aspect Height",hide:!0,devices:{desktop:{default:9}}},{id:"startTime",type:"input",label:"Start time",placeholder:"mm:ss",info:"Start video at xx seconds",hide:!0},{id:"endTime",type:"input",label:"End time",placeholder:"mm:ss",info:"End video at xx seconds",hide:!0},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"mute",label:"Enable Sound",type:"toggle",default:!1},{id:"loopVideo",label:"Loop Video",type:"toggle",default:!1},{id:"controls",label:"Show Control Bar",type:"toggle",default:!0,info:"Player controls display in the player"},{id:"lazy",label:"Lazy load",type:"toggle",default:!0,info:"Optimize for pagespeed loading time"}]}];export{VideoSettings};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-staging.
|
|
3
|
+
"version": "2.0.0-staging.878",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "2.0.0-staging.
|
|
28
|
+
"@gem-sdk/core": "2.0.0-staging.877",
|
|
29
29
|
"@gem-sdk/styles": "2.0.0-staging.784",
|
|
30
30
|
"@gem-sdk/system": "2.0.0-staging.711",
|
|
31
31
|
"tsup": "^8.5.0",
|