PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.4.21
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.4.21
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / admin / GutenbergBlock / build / index.js

index.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 2.4.21, at admin/GutenbergBlock/build/index.js

1 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(){"use strict";var e=window.wp.escapeHtml;const t=wp.element.createElement,s={};s.spspIcon=t("img",{src:(0,e.escapeAttribute)(smartPostShowGbScript.url+"admin/GutenbergBlock/assets/smart-post-show-icon.svg")});var o=s,r=window.wp.i18n,a=window.wp.element;const c=a.createElement;var l=t=>{let{attributes:{shortcode:s},shortCodeList:o,shortcodeUpdate:l}=t;return(0,a.createElement)(a.Fragment,null,c("div",{className:"spsp-gutenberg-shortcode editor-styles-wrapper"},c("select",{className:"spsp-shortcode-selector",onChange:e=>l(e),value:(0,e.escapeAttribute)(s)},c("option",{value:(0,e.escapeAttribute)("0")},(0,e.escapeHTML)((0,r.__)("-- Select a Show --","post-carousel"))),o.map((t=>{var s=t.title.length>35?t.title.substring(0,30)+".... #("+t.id+")":t.title+" #("+t.id+")";return c("option",{value:(0,e.escapeAttribute)(t.id.toString()),key:(0,e.escapeAttribute)(t.id.toString())},(0,e.escapeHTML)(s))})))))},n=window.wp.blocks,p=window.wp.components,i=window.wp.blockEditor;const m=wp.serverSideRender,d=a.createElement;(0,n.registerBlockType)("smart-post-show-pro/shortcode",{title:(0,e.escapeHTML)((0,r.__)("Smart Post Show","post-carousel")),description:(0,e.escapeHTML)((0,r.__)("Use Smart Post Show to insert a show in your page","post-carousel")),icon:o.spspIcon,category:"common",supports:{html:!0},edit:t=>{const{attributes:s,setAttributes:o}=t,c=smartPostShowGbScript.shortCodeList;let n=e=>{let t=!1,s=setInterval((function(){let o=jQuery("#pcp_wrapper-"+e).parents().attr("id");document.getElementById(o)&&(jQuery("#pcp_wrapper-"+e+" #pcp-preloader").css({opacity:0,display:"none"}).animate({opacity:1},600),jQuery.getScript(smartPostShowGbScript.loadScript),t=!0,o=""),t&&clearInterval(s),0==e&&clearInterval(s)}),10)},u=t=>{var s;s=t,o({shortcode:(0,e.escapeAttribute)(s.target.value)});let r=(0,e.escapeAttribute)(t.target.value);n(r)};if(jQuery(".sp-pcp-section:not(.sp-pcp-section-loaded)").length>0){let t=(0,e.escapeAttribute)(s.shortcode);n(t)}return s.preview?d("div",{className:"spsp_shortcode_block_preview_image"},d("img",{src:(0,e.escapeAttribute)(smartPostShowGbScript.url+"admin/GutenbergBlock/assets/smart-post-show-block-preview.svg")})):0===c.length?(0,a.createElement)(a.Fragment,null,d("div",{className:"components-placeholder components-placeholder is-large"},d("div",{className:"components-placeholder__label"},d("img",{className:"block-editor-block-icon",src:(0,e.escapeAttribute)(smartPostShowGbScript.url+"admin/GutenbergBlock/assets/smart-post-show-icon.svg")}),(0,e.escapeHTML)((0,r.__)("Smart Post Show","post-carousel"))),d("div",{className:"components-placeholder__instructions"},(0,e.escapeHTML)((0,r.__)("No shortcode found. ","post-carousel")),d("a",{href:(0,e.escapeAttribute)(smartPostShowGbScript.link)},(0,e.escapeHTML)((0,r.__)("Create a shortcode now!","post-carousel")))))):s.shortcode&&0!=s.shortcode?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.InspectorControls,null,(0,a.createElement)(p.PanelBody,{title:"Select a Show"},(0,a.createElement)(p.PanelRow,null,(0,a.createElement)(l,{attributes:s,shortCodeList:c,shortcodeUpdate:u})))),(0,a.createElement)(m,{block:"smart-post-show-pro/shortcode",attributes:s})):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.InspectorControls,null,(0,a.createElement)(p.PanelBody,{title:"Select a Show"},(0,a.createElement)(p.PanelRow,null,(0,a.createElement)(l,{attributes:s,shortCodeList:c,shortcodeUpdate:u})))),d("div",{className:"components-placeholder components-placeholder is-large"},d("div",{className:"components-placeholder__label"},d("img",{className:"block-editor-block-icon",src:(0,e.escapeAttribute)(smartPostShowGbScript.url+"admin/GutenbergBlock/assets/smart-post-show-icon.svg")}),(0,e.escapeHTML)((0,r.__)("Smart Post Show","post-carousel"))),d("div",{className:"components-placeholder__instructions"},(0,e.escapeHTML)((0,r.__)("Select a Show","post-carousel"))),(0,a.createElement)(l,{attributes:s,shortCodeList:c,shortcodeUpdate:u})))},save(){return null}})}();