PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / trunk
Hustle – Email Marketing, Lead Generation, Optins, Popups vtrunk
7.8.14 7.8.14.1 7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / inc / providers / gutenberg / js / popup-trigger-block.min.js
wordpress-popup / inc / providers / gutenberg / js Last commit date
embeds-block.min.js 1 month ago popup-trigger-block.min.js 1 month ago slidein-trigger-block.min.js 1 month ago social-share-block.min.js 1 month ago unsubscribe-block.min.js 1 month ago
popup-trigger-block.min.js
1 lines
1 !function(){function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}var e=wp.blocks,n=e.registerBlockType,o=e.createBlock,r=wp.element,l=r.createElement,a=r.useState,s=r.useEffect,i=r.useRef,c=wp.blockEditor.useBlockProps,u=wp.shortcode,p=u.string,_=u.next,d=l("svg",{className:"dashicon",viewBox:"0 0 24 24",width:20,height:20,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet","aria-hidden":"true",role:"img"},l("path",{d:"M1.5 0h21c.422 0 .777.145 1.066.434.29.289.434.644.434 1.066v21c0 .422-.145.777-.434 1.066A1.45 1.45 0 0 1 22.5 24h-21a1.45 1.45 0 0 1-1.066-.434A1.45 1.45 0 0 1 0 22.5v-21C0 1.078.145.723.434.434A1.45 1.45 0 0 1 1.5 0zM6 6a1.45 1.45 0 0 0-1.066.434A1.45 1.45 0 0 0 4.5 7.5v9c0 .422.145.777.434 1.066.289.29.644.434 1.066.434h12a1.45 1.45 0 0 0 1.066-.434c.29-.289.434-.644.434-1.066v-9a1.45 1.45 0 0 0-.434-1.066A1.45 1.45 0 0 0 18 6H6zm10.5 1.5c.422 0 .777.145 1.066.434.29.289.434.644.434 1.066 0 .422-.145.777-.434 1.066a1.45 1.45 0 0 1-1.066.434 1.45 1.45 0 0 1-1.066-.434A1.45 1.45 0 0 1 15 9c0-.422.145-.777.434-1.066A1.45 1.45 0 0 1 16.5 7.5z"}));n("hustle/popup-trigger",{apiVersion:3,title:hustle_popup_trigger_data.l10n.block_name,description:hustle_popup_trigger_data.l10n.block_description,icon:d,category:"hustle",keywords:["Hustle",hustle_popup_trigger_data.l10n.block_name],attributes:{module_id:{type:"string"},id:{type:"string"},type:{type:"string"},content:{type:"string",default:hustle_popup_trigger_data.l10n.click_here},css_class:{type:"string"}},supports:{customClassName:!1,className:!1,html:!1},transforms:{to:[{type:"block",blocks:["core/shortcode"],transform:function(t){var e=t.id,n=t.content,r=t.css_class,l={tag:hustle_popup_trigger_data.shortcode_tag,attrs:{id:e||"",css_class:r||"",type:"popup"},content:n,type:"closed"},a=p(l);return o("core/shortcode",{text:a})}}],from:[{type:"block",blocks:["core/shortcode"],isMatch:function(t){var e=t.text,n=_("wd_hustle",e);return void 0!==n&&"popup"===n.shortcode.attrs.named.type},transform:function(t){var e=t.text,n=_("wd_hustle",e).shortcode,r=n.content,l=n.attrs.named,a=l.id,s=l.type,i=l.css_class;return o("hustle/popup-trigger",{id:a,type:s,css_class:i,content:r})}}]},edit:function(e){var n,o,r=e.attributes,u=e.isSelected,p=e.setAttributes,_=r.module_id,g=r.id,h=r.content,m=r.css_class,f=(n=a(!1),o=2,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,l,a,s=[],i=!0,c=!1;try{if(l=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;i=!1}else for(;!(i=(o=l.call(n)).done)&&(s.push(o.value),s.length!==e);i=!0);}catch(t){c=!0,r=t}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(n,o)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=f[0],w=f[1],v=i(!1),y=i(!0),k=c(),x=function(t){p({id:t})},A=function(t){p({content:t})},C=function(t){if(!v.current){w(!0),v.current=!0;var e=ajaxurl+"?action=hustle_get_module_id_by_shortcode&_wpnonce="+hustle_popup_trigger_data.nonce+"&shortcode_id="+t;window.fetch(e).then(function(t){return t.json()}).then(function(t){var e;t.success&&t.data.module_id&&(e=t.data.module_id,p({module_id:e}))}).catch(function(t){console.log(t)}).finally(function(){w(!1),v.current=!1})}};s(function(){g&&!_&&C(g)},[]),s(function(){y.current?y.current=!1:g&&C(g)},[g]);var S=[u&&l(wp.blockEditor.InspectorControls,{key:"inspector"},l(wp.components.PanelBody,{title:hustle_popup_trigger_data.l10n.module,initialOpen:!0},l(wp.components.PanelRow,null,l(wp.components.SelectControl,{label:hustle_popup_trigger_data.l10n.name,value:g,options:hustle_popup_trigger_data.modules,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:x}))),l(wp.components.PanelBody,{title:hustle_popup_trigger_data.l10n.advanced,initialOpen:!0},l(wp.components.PanelRow,null,l(wp.components.TextControl,{label:hustle_popup_trigger_data.l10n.trigger_content,value:h,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:A})),l(wp.components.PanelRow,null,l(wp.components.TextControl,{label:hustle_popup_trigger_data.l10n.additional_css_classes,value:m,__next40pxDefaultSize:!0,onChange:function(t){p({css_class:t})},__nextHasNoMarginBottom:!0})))),l(wp.blockEditor.BlockControls,{key:"block-controls"},!!g&&l(wp.components.ToolbarGroup,{label:hustle_popup_trigger_data.l10n.customize_module},l(wp.components.ToolbarButton,{className:"components-toolbar__control",label:hustle_popup_trigger_data.l10n.customize_module,icon:"edit",onClick:function(){var t=hustle_popup_trigger_data.admin_url+"?page="+hustle_popup_trigger_data.wizard_page+"&id="+_;window.open(t)}})))];return l("div",k,S,b?l("div",{className:"wp-block-embed is-loading"},l(wp.components.Spinner,null),l("span",null,hustle_popup_trigger_data.l10n.rendering)):g?l(wp.blockEditor.RichText,{tagName:"a",multiline:!1,withoutInteractiveFormatting:!0,value:h,onChange:A,placeholder:hustle_popup_trigger_data.l10n.content_here}):l(wp.components.Placeholder,{className:"wp-block-embed",instructions:hustle_popup_trigger_data.l10n.block_description,icon:d,label:hustle_popup_trigger_data.l10n.block_name},l("form",null,l("select",{value:g,onChange:function(t){return x(t.target.value)}},hustle_popup_trigger_data.modules.map(function(t){return l("option",{key:t.value,value:t.value},t.label)}))),l("div",{className:"components-placeholder__instructions"},hustle_popup_trigger_data.l10n.block_more_description)))},save:function(){return null}})}();