@abtasty/google-form-modal
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -1,1 +0,1 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).widgetForm=o()}(this,(function(){"use strict";const e="style",o="layout",t="content",l="conditions",i="hidden",a="select",n="colorpicker",r="number",_="selectelement",c="radio",p="switch",d="slider",m="group",g="inlinenotification",u="https://widgets-images.abtasty.com/",s="week",b="month",y=[{label:"widget_common_conditions_recurrence_option_everyTime",value:"everytime"},{label:"widget_common_conditions_recurrence_option_everySession",value:"session"},{label:"widget_common_conditions_recurrence_option_everyXDays",value:"day"},{label:"widget_common_conditions_recurrence_option_everyXWeeks",value:s},{label:"widget_common_conditions_recurrence_option_everyXMonths",value:b},{label:"widget_common_conditions_recurrence_option_once",value:"once"}],v={category:l,type:d,min:1},w=[{...v,propName:"day",label:"widget_common_conditions_recurrence_ifOptionVariable_labelDays",value:5,max:395},{...v,propName:s,label:"widget_common_conditions_recurrence_ifOptionVariable_labelWeeks",value:2,max:56},{...v,propName:b,label:"widget_common_conditions_recurrence_ifOptionVariable_labelMonths",value:1,max:13}],f={category:l,type:a,options:y,value:"everytime"},h={...f,label:"widget_common_conditions_recurrence_label_widgetDisplayed",propName:"displayRecurrence"},N={...f,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterClosure",propName:"closingRecurrence"},k={...f,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterSubmission",propName:"validationRecurrence"},x=w.map((e=>{const{propName:o}=e;return{...e,propName:`${h.propName}_${o}`,conditions:[{field:h.propName,value:o}]}})),B=w.map((e=>{const{propName:o}=e;return{...e,propName:`${N.propName}_${o}`,conditions:[{field:N.propName,value:o}]}})),I=w.map((e=>{const{propName:o}=e;return{...e,propName:`${k.propName}_${o}`,conditions:[{field:k.propName,value:o}]}}));N.condition=({closeButton:e,layout:o,overlayClickable:t,linkType:l})=>!("string"!=typeof l||!l.includes("Close"))||("popin"!==o||!1!==e||!1!==t)&&(void 0===o||"popin"===o||!1!==e);const P={category:l,type:m,label:"widget_common_conditions_recurrence_blockTitle",collapsible:!0,children:[h,...x,N,...B,k,...I]},U="triggerEvent",C={category:l,type:d,propName:"triggerEventDelay",label:"widget_common_conditions_triggering_delay_label",min:0,max:60,value:0},T={...C,propName:"triggerEventReengageDelay",value:10,max:180},S={category:l,type:_,propName:"triggerEventClick",value:"body"},z={...S,propName:"triggerEventElementVisible"},R={category:l,type:"codeeditor",label:"widget_common_conditions_triggering_label_customTriggerJSCode",propName:"triggerEventCustomScript",value:"/* In this example snippet, the widget will be triggered as soon as any scroll is detected.\nCreate your own by resolving resolve() with true (which does trigger) or false (which doesn't trigger) */\n\nfunction launchIfScroll() {\n\treturn new Promise(resolve => {\n\t\tdocument.addEventListener('scroll', () => resolve(true), {once: true});\n\t});\n}\n\nconst result = await launchIfScroll();\nreturn resolve(result);",rows:15},O={pageLoad:{label:"widget_common_conditions_triggering_option_pageload",value:"pageLoad"},direct:{label:"widget_common_conditions_triggering_option_asap",value:"direct"},exitIntent:{label:"widget_common_conditions_triggering_option_exitIntent",value:"exitIntent"},reengage:{label:"widget_common_conditions_triggering_option_afterXSecondsOfInactivity",value:"reengage"},click:{label:"widget_common_conditions_triggering_option_click",value:"click"},elementVisible:{label:"widget_common_conditions_triggering_option_elementVisible",value:"elementVisible"},customScript:{label:"widget_common_conditions_triggering_option_customTrigger",value:"script"}},W={category:l,type:p,propName:"isOncePerPageTrigger",value:!0,label:"widget_common_conditions_triggering_label_triggerOnlyOnce"},H={category:l,type:a,label:"widget_common_conditions_triggering_label",options:[O.pageLoad,O.direct,O.exitIntent,O.reengage,O.click,O.elementVisible,O.customScript],propName:U,value:"pageLoad"};S.conditions=[{field:U,value:"click"}],T.conditions=[{field:U,value:"reengage"}],z.conditions=[{field:U,value:"elementVisible"}],R.conditions=[{field:U,value:"script"}],C.conditions=[{field:U,value:e=>"reengage"!==e}],W.conditions=[{field:U,value:e=>"click"===e||"script"===e}];const D={category:l,type:m,label:"widget_common_conditions_triggering_blockTitle",collapsible:!0,children:[H,...[S,z,R,W,T,C]]},E={category:o,type:"radioImage",propName:"layout",label:"widget_common_layout_label_selectALayout",value:"popin",style:"big",options:[{label:"widget_common_layout_option_modal",value:"popin",src:`${u}layout/icon-layout-modal.png`},{label:"widget_common_layout_option_topBanner",value:"bannerTop",src:`${u}layout/icon-layout-topBanner.png`},{label:"widget_common_layout_option_bottomBanner",value:"bannerBottom",src:`${u}layout/icon-layout-bottomBanner.png`},{label:"widget_common_layout_option_freePlacement",value:"free",src:`${u}layout/icon-layout-freePlacement.png`}]},$={category:o,type:_,propName:"elementReferrer",label:"widget_common_layout_label_selectElementContainWidget",value:"body"},V={category:o,type:c,propName:"referrerInsertType",value:"afterbegin",label:"widget_common_layout_positioning_label_selectPosition",options:[{label:"widget_common_layout_positioning_option_before",value:"beforebegin"},{label:"widget_common_layout_positioning_option_atTheBeginning",value:"afterbegin"},{label:"widget_common_layout_positioning_option_atTheEnd",value:"beforeend"},{label:"widget_common_layout_positioning_option_after",value:"afterend"}]},L=[{field:"layout",value:"free"}];$.conditions=L,V.conditions=L;const A={category:o,type:m,label:"widget_common_layout_blockTitle_layout",collapsible:!0,children:[E,$,V]},X={category:o,type:p,label:"widget_common_layout_toggler_widgetDimensionsBasedOnContent",propName:"autoWidth",value:!0},M={category:o,type:a,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"vw (% of viewport width)",value:"vw"},{label:"vh (% of viewport height)",value:"vh"},{label:"vmin (% of viewport minimum size)",value:"vmin"},{label:"vmax (% of viewport maximum size)",value:"vmax"}]},j={category:o,type:p,propName:"autoHeight",label:"widget_common_layout_toggler_label_keepHeightAuto",value:!0},F={category:o,propName:"widthUnit",value:"vw",...M},J={category:o,propName:"heightUnit",value:"vh",condition:({autoHeight:e})=>!e,...M},q={category:o,type:r,label:"widget_common_layout_popinDimensions_label_width"},G={...q,propName:"popinPercentWidth",value:50,max:100,condition:({widthUnit:e,layout:o})=>"px"!==e&&"popin"===o},K={...q,propName:"popinPixelsWidth",value:parseInt(window.innerWidth/2.5,10),max:window.innerWidth,condition:({widthUnit:e,layout:o})=>"px"===e&&"popin"===o},Q={category:o,type:r,label:"widget_common_layout_popinDimensions_label_height",condition:({autoHeight:e})=>!e},Y={...Q,propName:"popinPercentHeight",value:50,max:100,condition:({autoHeight:e,heightUnit:o,layout:t})=>!e&&"px"!==o&&"popin"===t},Z={...Q,propName:"popinPixelsHeight",value:parseInt(window.innerHeight/2.5,10),max:window.innerHeight,condition:({autoHeight:e,heightUnit:o,layout:t})=>!e&&"px"===o&&"popin"===t},ee=({autoWidth:e})=>!e,oe={category:o,type:m,collapsible:!0,label:"widget_common_layout_blockTitle_dimensions",children:[X,...[G,K,F,j,Y,Z,J].map((e=>{if("condition"in e){const o=e.condition,t=e=>o(e)&&ee(e);return{...e,condition:t}}return{...e,condition:ee}}))],conditions:[{field:"layout",value:"popin"}]},te={category:o,type:i,propName:"popinPosition",label:"",value:[{x:1,y:1}]},le={category:o,type:c,propName:"zindex",value:"9999",label:"widget_common_layout_zIndex_label",options:[{label:"widget_common_layout_zIndex_radio_option_above",value:"2147483647"},{label:"widget_common_layout_zIndex_radio_option_default",value:"9999"},{label:"widget_common_layout_zIndex_radio_option_auto",value:"auto"},{label:"widget_common_layout_zIndex_radio_option_under",value:"-1"},{label:"widget_common_layout_zIndex_radio_option_custom",value:"custom"}]},ie={category:o,type:r,propName:"zindexCustom",label:"widget_common_layout_zIndex_custom_numberInput_label",value:1,min:-2147483647,max:2147483647},ae={category:o,type:g,label:"widget_common_layout_zindex_alert_text",hrefUrl:"widget_common_layout_zindex_alert_link"};ie.conditions=[{field:"zindex",value:"custom"}];const ne={category:o,type:m,label:"widget_common_layout_blockTitle_layering",collapsible:!0,children:[le,ie],conditions:[{field:"layout",value:e=>"free"!==e}]},re={category:e,type:n,label:"widget_common_style_container_label_backgroundColor",propName:"backgroundColor",value:"rgba(247, 247, 247, 1)"},_e={category:e,type:p,label:"widget_common_style_toggler_label_backgroundImage",propName:"isBackgroundImage",value:!1},ce={category:e,type:"mediaupload",label:"widget_common_style_toggler_label_backgroundImage",propName:"backgroundImage",value:""},pe={category:e,type:c,label:"widget_common_style_backgroundImageUploader_imageOptions_label",propName:"backgroundSize",value:"cover",options:[{label:"widget_common_style_backgroundImageUploader_imageOptions_option_cover",value:"cover"},{label:"widget_common_style_backgroundImageUploader_imageOptions_option_contain",value:"contain"},{label:"widget_common_style_backgroundImageUploader_imageOptions_option_fill",value:"100% 100%"},{label:"widget_common_style_backgroundImageUploader_imageOptions_option_none",value:"auto"}]},de={category:e,type:a,label:"widget_common_style_backgroundImageUploader_imagePosition_select_label",propName:"backgroundPosition",value:"center",options:[{label:"widget_common_style_backgroundImageUploader_imagePosition_option_top",value:"top"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_bottom",value:"bottom"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_center",value:"center"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_left",value:"left"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_right",value:"right"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_topLeft",value:"top left"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_topRight",value:"top right"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_bottomLeft",value:"bottom left"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_bottomRight",value:"bottom right"}]},me={category:e,type:p,label:"widget_common_style_backgroundImageUploader_toggler_repeatBackgroundImage",propName:"backgroundRepeat",value:!1},ge={category:e,type:n,label:"widget_common_style_border_label_borderColor",propName:"borderColor",value:"rgba(0, 127, 145, 1)"},ue={category:e,type:d,label:"widget_common_style_border_label_borderRadius",propName:"borderRadius",value:4,unit:"px"},se={category:e,type:d,label:"widget_common_style_border_label_borderThickness",propName:"borderWidth",value:2,min:0,max:50,unit:"px"},be={category:e,type:"areainput"},ye={...be,label:"widget_common_style_container_label_margin",propName:"containerMargin",value:[{top:0,left:0,bottom:0,right:0}]},ve={...be,label:"widget_common_style_container_label_padding",propName:"containerPadding",value:[{top:35,left:60,bottom:35,right:60}]},we={category:e,type:p,label:"widget_common_style_container_dropShadow_blockTitle",propName:"dropShadow",value:!1},fe={category:e,type:n,label:"widget_common_style_container_dropShadow_label_color",propName:"dropShadowColor",value:"rgba(57, 57, 57, 0.25);"},he={category:e,type:d,label:"widget_common_style_container_dropShadow_label_blurRadius",propName:"dropShadowBlur",value:10,unit:"px"},Ne={category:e,type:p,label:"widget_common_style_closeButton_label_displayCloseButton",propName:"closeButton",value:!0},ke={category:e,type:c,label:"widget_common_style_closeButton_radio_closeButtonPosition",propName:"closeButtonPosition",value:"in",options:[{label:"widget_common_style_closeButton_radio_closeButtonPosition_option_inside",value:"in"},{label:"widget_common_style_closeButton_radio_closeButtonPosition_option_outside",value:"out"}]},xe={category:e,type:r,label:"widget_common_style_closeButton_label_closeButtonSize",propName:"closeButtonSize",value:16,min:10,max:50},Be={category:e,type:n,label:"widget_common_style_closeButton_label_closeButtonColor",propName:"closeButtonColor",value:"rgba(119, 119, 119, 1)"},Ie={category:e,type:n,label:"widget_common_style_closeButton_label_closeButtonBackgroundColor",propName:"closeButtonBackgroundColor",value:"rgba(255, 255, 255, 0)"},Pe={category:e,type:d,label:"widget_common_style_closeButton_label_closeButtonBorderRadius",propName:"closeButtonBorderRadius",value:0,min:0,max:50},Ue={...Pe,label:"widget_common_style_closeButton_label_closeButtonBorderThickness",propName:"closeButtonBorderWidth"},Ce={category:e,type:n,label:"widget_common_style_closeButton_label_closeButtonBorderColor",propName:"closeButtonBorderColor",value:"rgba(57, 57, 57, 1)"},Te={category:e,type:i,propName:"overlay",label:"",value:!0},Se={category:e,type:n,label:"widget_common_style_overlay_label_overlayColor",propName:"overlayColor",value:"rgba(0, 0, 0, 0.6)"},ze={category:e,type:p,label:"widget_common_style_overlay_label_overlayClickable",propName:"overlayClickable",value:!0},Re={field:_e.propName,value:!0},Oe={field:pe.propName,value:e=>"cover"!==e},We={field:pe.propName,value:e=>"100% 100%"!==e};ce.conditions=[Re],pe.conditions=[Re],de.conditions=[Re,We],me.conditions=[Re,We,Oe];const He=[re,_e,ce,pe,de,me],De=[{field:se.propName,value:e=>e>0}];ge.conditions=De;const Ee={category:e,type:m,label:"widget_common_style_blockTitle_border",collapsible:!0,children:[se,ge,ue]},$e=[{field:"dropShadow",value:!0}];fe.conditions=$e,he.conditions=$e;const Ve={category:e,type:m,label:"widget_common_style_blockTitle_container",collapsible:!0,children:[ye,ve,...He,we,fe,he]},Le=[{field:"overlay"}];Se.conditions=Le,ze.conditions=Le;const Ae={category:e,type:m,label:"widget_common_style_blockTitle_overlay",collapsible:!0,children:[Te,Se,ze],conditions:[{field:"layout",value:"popin"}]},Xe=[{field:Ne.propName}];Ce.conditions=[{field:Ue.propName,value:e=>e>0}];const Me={category:e,type:m,label:"widget_common_style_blockTitle_closeButton",collapsible:!0,children:[Ne,...[ke,xe,Be,Ie,Pe,Ue,Ce].map((e=>{const o=e.conditions||[];return o.push(Xe[0]),{...e,conditions:o}}))]};Ve.collapsed=!1,A.collapsed=!1,Ve.children.find((function(e){return"containerPadding"===e.propName})).value=[{top:0,left:0,bottom:0,right:0}];var je=A.children.find((function(e){return"layout"===e.propName}));je.options=je.options.filter((function(e){return!e.value.includes("banner")})),P.children=P.children.filter((function(e){return!e.propName.includes("validationRecurrence")}));var Fe=oe.children.find((function(e){return"autoWidth"===e.propName})),Je=oe.children.find((function(e){return"autoHeight"===e.propName}));return Fe.value=!1,Je.value=!1,[A,te,oe,ae,ne,{type:g,category:t,label:"widget_iframe_closable_alert_text",hrefUrl:"widget_iframe_closable_alert_link"},{propName:"iframeUrl",type:"url",category:t,label:"widget_iframe_content_label_iframeUrl",value:"widget_iframe_content_defaultUrl"},Ve,Ee,Ae,Me,P,D]})); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).widgetForm=o()}(this,(function(){"use strict";const e="style",o="layout",t="content",l="conditions",i="hidden",a="select",n="colorpicker",r="number",_="selectelement",c="radio",p="switch",d="slider",m="group",g="inlinenotification",u="https://widgets-images.abtasty.com/",s="week",b="month",y=[{label:"widget_common_conditions_recurrence_option_everyTime",value:"everytime"},{label:"widget_common_conditions_recurrence_option_everySession",value:"session"},{label:"widget_common_conditions_recurrence_option_everyXDays",value:"day"},{label:"widget_common_conditions_recurrence_option_everyXWeeks",value:s},{label:"widget_common_conditions_recurrence_option_everyXMonths",value:b},{label:"widget_common_conditions_recurrence_option_once",value:"once"}],v={category:l,type:d,min:1},w=[{...v,propName:"day",label:"widget_common_conditions_recurrence_ifOptionVariable_labelDays",value:5,max:395},{...v,propName:s,label:"widget_common_conditions_recurrence_ifOptionVariable_labelWeeks",value:2,max:56},{...v,propName:b,label:"widget_common_conditions_recurrence_ifOptionVariable_labelMonths",value:1,max:13}],f={category:l,type:a,options:y,value:"everytime"},h={...f,label:"widget_common_conditions_recurrence_label_widgetDisplayed",propName:"displayRecurrence"},N={...f,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterClosure",propName:"closingRecurrence"},k={...f,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterSubmission",propName:"validationRecurrence"},x=w.map((e=>{const{propName:o}=e;return{...e,propName:`${h.propName}_${o}`,conditions:[{field:h.propName,value:o}]}})),B=w.map((e=>{const{propName:o}=e;return{...e,propName:`${N.propName}_${o}`,conditions:[{field:N.propName,value:o}]}})),I=w.map((e=>{const{propName:o}=e;return{...e,propName:`${k.propName}_${o}`,conditions:[{field:k.propName,value:o}]}}));N.condition=({closeButton:e,layout:o,overlayClickable:t,linkType:l})=>!("string"!=typeof l||!l.includes("Close"))||("popin"!==o||!1!==e||!1!==t)&&(void 0===o||"popin"===o||!1!==e);const P={category:l,type:m,label:"widget_common_conditions_recurrence_blockTitle",collapsible:!0,children:[h,...x,N,...B,k,...I]},U="triggerEvent",C={category:l,type:d,propName:"triggerEventDelay",label:"widget_common_conditions_triggering_delay_label",min:0,max:60,value:0},T={...C,propName:"triggerEventReengageDelay",value:10,max:180},S={category:l,type:_,propName:"triggerEventClick",value:"body"},z={...S,propName:"triggerEventElementVisible"},R={category:l,type:"codeeditor",label:"widget_common_conditions_triggering_label_customTriggerJSCode",propName:"triggerEventCustomScript",value:"/* In this example snippet, the widget will be triggered as soon as any scroll is detected.\nCreate your own by resolving resolve() with true (which does trigger) or false (which doesn't trigger) */\n\nfunction launchIfScroll() {\n\treturn new Promise(resolve => {\n\t\tdocument.addEventListener('scroll', () => resolve(true), {once: true});\n\t});\n}\n\nconst result = await launchIfScroll();\nreturn resolve(result);",rows:15},O={pageLoad:{label:"widget_common_conditions_triggering_option_pageload",value:"pageLoad"},direct:{label:"widget_common_conditions_triggering_option_asap",value:"direct"},exitIntent:{label:"widget_common_conditions_triggering_option_exitIntent",value:"exitIntent"},reengage:{label:"widget_common_conditions_triggering_option_afterXSecondsOfInactivity",value:"reengage"},click:{label:"widget_common_conditions_triggering_option_click",value:"click"},elementVisible:{label:"widget_common_conditions_triggering_option_elementVisible",value:"elementVisible"},customScript:{label:"widget_common_conditions_triggering_option_customTrigger",value:"script"}},W={category:l,type:p,propName:"isOncePerPageTrigger",value:!0,label:"widget_common_conditions_triggering_label_triggerOnlyOnce"},H={category:l,type:a,label:"widget_common_conditions_triggering_label",options:[O.pageLoad,O.direct,O.exitIntent,O.reengage,O.click,O.elementVisible,O.customScript],propName:U,value:"pageLoad"};S.conditions=[{field:U,value:"click"}],T.conditions=[{field:U,value:"reengage"}],z.conditions=[{field:U,value:"elementVisible"}],R.conditions=[{field:U,value:"script"}],C.conditions=[{field:U,value:e=>"reengage"!==e}],W.conditions=[{field:U,value:e=>"click"===e||"script"===e}];const D={category:l,type:m,label:"widget_common_conditions_triggering_blockTitle",collapsible:!0,children:[H,...[S,z,R,W,T,C]]},E={category:o,type:"radioImage",propName:"layout",label:"widget_common_layout_label_selectALayout",value:"popin",style:"big",options:[{label:"widget_common_layout_option_modal",value:"popin",src:`${u}layout/icon-layout-modal.png`},{label:"widget_common_layout_option_topBanner",value:"bannerTop",src:`${u}layout/icon-layout-topBanner.png`},{label:"widget_common_layout_option_bottomBanner",value:"bannerBottom",src:`${u}layout/icon-layout-bottomBanner.png`},{label:"widget_common_layout_option_freePlacement",value:"free",src:`${u}layout/icon-layout-freePlacement.png`}]},$={category:o,type:_,propName:"elementReferrer",label:"widget_common_layout_label_selectElementContainWidget",value:"body"},V={category:o,type:c,propName:"referrerInsertType",value:"afterbegin",label:"widget_common_layout_positioning_label_selectPosition",options:[{label:"widget_common_layout_positioning_option_before",value:"beforebegin"},{label:"widget_common_layout_positioning_option_atTheBeginning",value:"afterbegin"},{label:"widget_common_layout_positioning_option_atTheEnd",value:"beforeend"},{label:"widget_common_layout_positioning_option_after",value:"afterend"}]},L=[{field:"layout",value:"free"}];$.conditions=L,V.conditions=L;const A={category:o,type:m,label:"widget_common_layout_blockTitle_layout",collapsible:!0,children:[E,$,V]},X={category:o,type:p,label:"widget_common_layout_toggler_widgetDimensionsBasedOnContent",propName:"autoWidth",value:!0},M={category:o,type:a,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"vw (% of viewport width)",value:"vw"},{label:"vh (% of viewport height)",value:"vh"},{label:"vmin (% of viewport minimum size)",value:"vmin"},{label:"vmax (% of viewport maximum size)",value:"vmax"}]},j={category:o,type:p,propName:"autoHeight",label:"widget_common_layout_toggler_label_keepHeightAuto",value:!0},F={category:o,propName:"widthUnit",value:"vw",...M},J={category:o,propName:"heightUnit",value:"vh",condition:({autoHeight:e})=>!e,...M},q={category:o,type:r,label:"widget_common_layout_popinDimensions_label_width"},G={...q,propName:"popinPercentWidth",value:50,max:100,condition:({widthUnit:e,layout:o})=>"px"!==e&&"popin"===o},K={...q,propName:"popinPixelsWidth",value:parseInt(window.innerWidth/2.5,10),max:window.innerWidth,condition:({widthUnit:e,layout:o})=>"px"===e&&"popin"===o},Q={category:o,type:r,label:"widget_common_layout_popinDimensions_label_height",condition:({autoHeight:e})=>!e},Y={...Q,propName:"popinPercentHeight",value:50,max:100,condition:({autoHeight:e,heightUnit:o,layout:t})=>!e&&"px"!==o&&"popin"===t},Z={...Q,propName:"popinPixelsHeight",value:parseInt(window.innerHeight/2.5,10),max:window.innerHeight,condition:({autoHeight:e,heightUnit:o,layout:t})=>!e&&"px"===o&&"popin"===t},ee=({autoWidth:e})=>!e,oe={category:o,type:m,collapsible:!0,label:"widget_common_layout_blockTitle_dimensions",children:[X,...[G,K,F,j,Y,Z,J].map((e=>{if("condition"in e){const o=e.condition,t=e=>o(e)&&ee(e);return{...e,condition:t}}return{...e,condition:ee}}))],conditions:[{field:"layout",value:"popin"}]},te={category:o,type:i,propName:"popinPosition",label:"",value:[{x:1,y:1}]},le={category:o,type:c,propName:"zindex",value:"9999",label:"widget_common_layout_zIndex_label",options:[{label:"widget_common_layout_zIndex_radio_option_above",value:"2147483647"},{label:"widget_common_layout_zIndex_radio_option_default",value:"9999"},{label:"widget_common_layout_zIndex_radio_option_auto",value:"auto"},{label:"widget_common_layout_zIndex_radio_option_under",value:"-1"},{label:"widget_common_layout_zIndex_radio_option_custom",value:"custom"}]},ie={category:o,type:r,propName:"zindexCustom",label:"widget_common_layout_zIndex_custom_numberInput_label",value:1,min:-2147483647,max:2147483647},ae={category:o,type:g,label:"widget_common_layout_zindex_alert_text",hrefUrl:"widget_common_layout_zindex_alert_link"};ie.conditions=[{field:"zindex",value:"custom"}];const ne={category:o,type:m,label:"widget_common_layout_blockTitle_layering",collapsible:!0,children:[le,ie],conditions:[{field:"layout",value:e=>"free"!==e}]},re={category:e,type:n,label:"widget_common_style_container_label_backgroundColor",propName:"backgroundColor",value:"rgba(247, 247, 247, 1)"},_e={category:e,type:p,label:"widget_common_style_toggler_label_backgroundImage",propName:"isBackgroundImage",value:!1},ce={category:e,type:"mediaupload",label:"widget_common_style_toggler_label_backgroundImage",propName:"backgroundImage",value:""},pe={category:e,type:c,label:"widget_common_style_backgroundImageUploader_imageOptions_label",propName:"backgroundSize",value:"cover",options:[{label:"widget_common_style_backgroundImageUploader_imageOptions_option_cover",value:"cover"},{label:"widget_common_style_backgroundImageUploader_imageOptions_option_contain",value:"contain"},{label:"widget_common_style_backgroundImageUploader_imageOptions_option_fill",value:"100% 100%"},{label:"widget_common_style_backgroundImageUploader_imageOptions_option_none",value:"auto"}]},de={category:e,type:a,label:"widget_common_style_backgroundImageUploader_imagePosition_select_label",propName:"backgroundPosition",value:"center",options:[{label:"widget_common_style_backgroundImageUploader_imagePosition_option_top",value:"top"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_bottom",value:"bottom"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_center",value:"center"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_left",value:"left"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_right",value:"right"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_topLeft",value:"top left"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_topRight",value:"top right"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_bottomLeft",value:"bottom left"},{label:"widget_common_style_backgroundImageUploader_imagePosition_option_bottomRight",value:"bottom right"}]},me={category:e,type:p,label:"widget_common_style_backgroundImageUploader_toggler_repeatBackgroundImage",propName:"backgroundRepeat",value:!1},ge={category:e,type:n,label:"widget_common_style_border_label_borderColor",propName:"borderColor",value:"rgba(0, 127, 145, 1)"},ue={category:e,type:d,label:"widget_common_style_border_label_borderRadius",propName:"borderRadius",value:4,unit:"px"},se={category:e,type:d,label:"widget_common_style_border_label_borderThickness",propName:"borderWidth",value:2,min:0,max:50,unit:"px"},be={category:e,type:"areainput"},ye={...be,label:"widget_common_style_container_label_margin",propName:"containerMargin",value:[{top:0,left:0,bottom:0,right:0}]},ve={...be,label:"widget_common_style_container_label_padding",propName:"containerPadding",value:[{top:35,left:60,bottom:35,right:60}]},we={category:e,type:p,label:"widget_common_style_container_dropShadow_blockTitle",propName:"dropShadow",value:!1},fe={category:e,type:n,label:"widget_common_style_container_dropShadow_label_color",propName:"dropShadowColor",value:"rgba(57, 57, 57, 0.25);"},he={category:e,type:d,label:"widget_common_style_container_dropShadow_label_blurRadius",propName:"dropShadowBlur",value:10,unit:"px"},Ne={category:e,type:p,label:"widget_common_style_closeButton_label_displayCloseButton",propName:"closeButton",value:!0},ke={category:e,type:c,label:"widget_common_style_closeButton_radio_closeButtonPosition",propName:"closeButtonPosition",value:"in",options:[{label:"widget_common_style_closeButton_radio_closeButtonPosition_option_inside",value:"in"},{label:"widget_common_style_closeButton_radio_closeButtonPosition_option_outside",value:"out"}]},xe={category:e,type:r,label:"widget_common_style_closeButton_label_closeButtonSize",propName:"closeButtonSize",value:16,min:10,max:50},Be={category:e,type:n,label:"widget_common_style_closeButton_label_closeButtonColor",propName:"closeButtonColor",value:"rgba(119, 119, 119, 1)"},Ie={category:e,type:n,label:"widget_common_style_closeButton_label_closeButtonBackgroundColor",propName:"closeButtonBackgroundColor",value:"rgba(255, 255, 255, 0)"},Pe={category:e,type:d,label:"widget_common_style_closeButton_label_closeButtonBorderRadius",propName:"closeButtonBorderRadius",value:0,min:0,max:50},Ue={...Pe,label:"widget_common_style_closeButton_label_closeButtonBorderThickness",propName:"closeButtonBorderWidth"},Ce={category:e,type:n,label:"widget_common_style_closeButton_label_closeButtonBorderColor",propName:"closeButtonBorderColor",value:"rgba(57, 57, 57, 1)"},Te={category:e,type:i,propName:"overlay",label:"",value:!0},Se={category:e,type:n,label:"widget_common_style_overlay_label_overlayColor",propName:"overlayColor",value:"rgba(0, 0, 0, 0.6)"},ze={category:e,type:p,label:"widget_common_style_overlay_label_overlayClickable",propName:"overlayClickable",value:!0},Re={field:_e.propName,value:!0},Oe={field:pe.propName,value:e=>"cover"!==e},We={field:pe.propName,value:e=>"100% 100%"!==e};ce.conditions=[Re],pe.conditions=[Re],de.conditions=[Re,We],me.conditions=[Re,We,Oe];const He=[re,_e,ce,pe,de,me],De=[{field:se.propName,value:e=>e>0}];ge.conditions=De;const Ee={category:e,type:m,label:"widget_common_style_blockTitle_border",collapsible:!0,children:[se,ge,ue]},$e=[{field:"dropShadow",value:!0}];fe.conditions=$e,he.conditions=$e;const Ve={category:e,type:m,label:"widget_common_style_blockTitle_container",collapsible:!0,children:[ye,ve,...He,we,fe,he]},Le=[{field:"overlay"}];Se.conditions=Le,ze.conditions=Le;const Ae={category:e,type:m,label:"widget_common_style_blockTitle_overlay",collapsible:!0,children:[Te,Se,ze],conditions:[{field:"layout",value:"popin"}]},Xe=[{field:Ne.propName}];Ce.conditions=[{field:Ue.propName,value:e=>e>0}];const Me={category:e,type:m,label:"widget_common_style_blockTitle_closeButton",collapsible:!0,children:[Ne,...[ke,xe,Be,Ie,Pe,Ue,Ce].map((e=>{const o=e.conditions||[];return o.push(Xe[0]),{...e,conditions:o}}))]};Ve.collapsed=!1,A.collapsed=!1,D.collapsed=!1,Ve.children.find((function(e){return"containerPadding"===e.propName})).value=[{top:0,left:0,bottom:0,right:0}];var je=A.children.find((function(e){return"layout"===e.propName}));je.options=je.options.filter((function(e){return!e.value.includes("banner")})),P.children=P.children.filter((function(e){return!e.propName.includes("validationRecurrence")}));var Fe=oe.children.find((function(e){return"autoWidth"===e.propName})),Je=oe.children.find((function(e){return"autoHeight"===e.propName}));return Fe.value=!1,Je.value=!1,[A,te,oe,ae,ne,{type:g,category:t,label:"widget_iframe_closable_alert_text",hrefUrl:"widget_iframe_closable_alert_link"},{propName:"iframeUrl",type:"url",category:t,label:"widget_iframe_content_label_iframeUrl",value:"widget_iframe_content_defaultUrl"},Ve,Ee,Ae,Me,D,P]})); |
{ | ||
"name": "@abtasty/google-form-modal", | ||
"description": "Widget for AB Tasty", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"form": "dist/form.js", | ||
@@ -6,0 +6,0 @@ "main": "dist/main.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50637