PluginProbe
GutSlider – All in One Slider and Carousel Blocks for Gutenberg / 2.9.9
GutSlider – All in One Slider and Carousel Blocks for Gutenberg v2.9.9
3.1.0 3.0.0 2.13.2 2.13.1 2.13.0 trunk 1.0.0 2.1.0 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.1 2.5.3 2.5.4 2.5.5 2.6.1 All 56 releases
slider-blocks / build / admin / admin.js

admin.js in GutSlider – All in One Slider and Carousel Blocks for Gutenberg 2.9.9, at build/admin/admin.js

1 lines 15.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{var e,t={243:(e,t,l)=>{"use strict";const a=window.React,r=window.wp.element,s=window.wp.components,c=window.wp.i18n,n=window.wp.apiFetch;var o=l.n(n),i=l(485),m=l.n(i);const d=()=>{const[e,t]=(0,r.useState)([]);(0,r.useEffect)((()=>{o()({path:"/gutslider/v1/blocks"}).then((e=>{e.length>0?t(e):console.error("No blocks found")}))}),[]);const[l,n]=(0,r.useState)(!1),i=l=>{const a=!e.find((e=>e.name===l)).active;o()({path:"/gutslider/v1/blocks",method:"POST",data:{nonce:gutslider?.nonce,name:l,active:a}}).then((e=>{t(e),n(!0)})).catch((e=>{console.error("Error updating block status:",e)}))};return(0,r.useEffect)((()=>{const e=setTimeout((()=>{n(!1)}),2e3);return()=>clearTimeout(e)}),[l]),(0,a.createElement)(r.Fragment,null,l&&(0,a.createElement)("div",{className:"gutslider-data-update-notice"},(0,a.createElement)("span",{className:"notice-icon"},(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},(0,a.createElement)("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),(0,a.createElement)("path",{d:"M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z"}))),(0,c.__)("Changes saved successfully.","slider-blocks"),(0,a.createElement)("button",{className:"notice-close",onClick:()=>{n(!1)}},(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},(0,a.createElement)("path",{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"})))),(0,a.createElement)("div",{className:"blocks-controls"},e&&e.length>0&&e.map(((e,t)=>(0,a.createElement)("div",{className:m()("single-block-wrapper",{pro:e?.is_pro}),key:t},e?.is_pro&&(0,a.createElement)("div",{className:"pro-badge"},(0,c.__)("Pro","slider-blocks")),(0,a.createElement)("div",{className:"single-block-head flex"},e?.title&&(0,a.createElement)("h3",{className:"single-block-title"},e.title),e?.is_pro?(0,a.createElement)(r.Fragment,null,gutslider?.isPro?(0,a.createElement)(s.ToggleControl,{checked:e?.active,onChange:()=>i(e?.name)}):(0,a.createElement)("a",{href:"https://gutslider.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"upgrade-now"},(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 24 24"},(0,a.createElement)("path",{d:"m23.664,0h-8.475l-2.97,6.003c-.073-.002-.146-.003-.22-.003-.076,0-.152,0-.228.003L8.811,0H.324l4.637,9.399c-1.227,1.538-1.961,3.486-1.961,5.601,0,4.962,4.038,9,9,9s9-4.038,9-9c0-2.121-.738-4.072-1.97-5.612L23.664,0Zm-7.854,1h6.243l-3.751,7.582c-1.334-1.311-3.074-2.209-5.011-2.489l2.52-5.093ZM1.933,1h6.256l2.513,5.094c-1.943.282-3.686,1.186-5.021,2.504L1.933,1Zm18.067,14c0,4.411-3.589,8-8,8s-8-3.589-8-8S7.589,7,12,7s8,3.589,8,8Zm-7.244-5.135h-1.494l-.897,3.135h-3.365v1.453l2.318,1.336-1.081,2.955,1.158.86,2.614-2.074,2.609,2.093,1.205-.831-1.171-2.969,2.347-1.377v-1.445h-3.347l-.896-3.135Zm.652,5.528l1.14,2.892-2.536-2.034-2.535,2.011,1.067-2.919-2.328-1.343h2.902l.89-3.11.89,3.11h2.884l-2.375,1.393Z"})),(0,c.__)("Upgrade Now","slider-blocks"))):(0,a.createElement)(s.ToggleControl,{checked:e?.active,onChange:()=>i(e?.name)})),e?.description&&(0,a.createElement)("p",{className:"single-block-description"},e.description),e?.demo_slug&&(0,a.createElement)("a",{className:"single-block-actions",href:`https://gutslider.com/${e.demo_slug}`,target:"_blank",rel:"noopener noreferrer"},(0,c.__)("View Demo","slider-blocks")))))))},p=()=>(0,a.createElement)("div",{className:"welcome-tab-elements"},(0,a.createElement)("div",{className:"tab-container"},(0,a.createElement)("h3",{className:"settings-title"},(0,c.__)("Blocks List","slider-blocks")),(0,a.createElement)("div",{className:"blocks-container"},(0,a.createElement)(d,null)))),h=()=>(0,a.createElement)("p",{className:"current-version"},gutslider?.version),u=()=>{(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},(0,a.createElement)("path",{d:"M4.355.522a.5.5 0 0 1 .623.333l.291.956A4.979 4.979 0 0 1 8 1c1.007 0 1.946.298 2.731.811l.29-.956a.5.5 0 1 1 .957.29l-.41 1.352A4.985 4.985 0 0 1 13 6h.5a.5.5 0 0 0 .5-.5V5a.5.5 0 0 1 1 0v.5A1.5 1.5 0 0 1 13.5 7H13v1h1.5a.5.5 0 0 1 0 1H13v1h.5a1.5 1.5 0 0 1 1.5 1.5v.5a.5.5 0 1 1-1 0v-.5a.5.5 0 0 0-.5-.5H13a5 5 0 0 1-10 0h-.5a.5.5 0 0 0-.5.5v.5a.5.5 0 1 1-1 0v-.5A1.5 1.5 0 0 1 2.5 10H3V9H1.5a.5.5 0 0 1 0-1H3V7h-.5A1.5 1.5 0 0 1 1 5.5V5a.5.5 0 0 1 1 0v.5a.5.5 0 0 0 .5.5H3c0-1.364.547-2.601 1.432-3.503l-.41-1.352a.5.5 0 0 1 .333-.623zM4 7v4a4 4 0 0 0 3.5 3.97V7H4zm4.5 0v7.97A4 4 0 0 0 12 11V7H8.5zM12 6a3.989 3.989 0 0 0-1.334-2.982A3.983 3.983 0 0 0 8 2a3.983 3.983 0 0 0-2.667 1.018A3.989 3.989 0 0 0 4 6h8z"})),(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},(0,a.createElement)("path",{d:"M2.678 11.894a1 1 0 0 1 .287.801 10.97 10.97 0 0 1-.398 2c1.395-.323 2.247-.697 2.634-.893a1 1 0 0 1 .71-.074A8.06 8.06 0 0 0 8 14c3.996 0 7-2.807 7-6 0-3.192-3.004-6-7-6S1 4.808 1 8c0 1.468.617 2.83 1.678 3.894zm-.493 3.905a21.682 21.682 0 0 1-.713.129c-.2.032-.352-.176-.273-.362a9.68 9.68 0 0 0 .244-.637l.003-.01c.248-.72.45-1.548.524-2.319C.743 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.52.263-1.639.742-3.468 1.105z"}),(0,a.createElement)("path",{d:"M4 5.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zM4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8zm0 2.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5z"})),(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},(0,a.createElement)("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),(0,a.createElement)("path",{d:"M11.315 10.014a.5.5 0 0 1 .548.736A4.498 4.498 0 0 1 7.965 13a4.498 4.498 0 0 1-3.898-2.25.5.5 0 0 1 .548-.736h.005l.017.005.067.015.252.055c.215.046.515.108.857.169.693.124 1.522.242 2.152.242.63 0 1.46-.118 2.152-.242a26.58 26.58 0 0 0 1.109-.224l.067-.015.017-.004.005-.002zM4.756 4.566c.763-1.424 4.02-.12.952 3.434-4.496-1.596-2.35-4.298-.952-3.434zm6.488 0c1.398-.864 3.544 1.838-.952 3.434-3.067-3.554.19-4.858.952-3.434z"}))},g=({icon:e,title:t,description:l,action:r})=>(0,a.createElement)("div",{className:"card-wrapper"},e&&(0,a.createElement)("div",{className:"card-icon"},u[e]),t&&(0,a.createElement)("h3",{className:"card-title"},t),l&&(0,a.createElement)("p",{className:"card-description"},l),r&&(0,a.createElement)("a",{className:"card-actions",href:r.link,target:"_blank",rel:"noopener noreferrer"},r.label)),v=({title:e,description:t,videoId:l,videoWidth:r="",videoHeight:s="",actions:c})=>(0,a.createElement)("div",{className:"video-container"},e&&(0,a.createElement)("h3",{className:"video-title"},e),t&&(0,a.createElement)("p",{className:"video-description"},t),(0,a.createElement)("div",{className:"video-wrapper"},(0,a.createElement)("iframe",{title:"GutSlider Blocks Video Tutorial",width:r||560,height:s||315,src:`https://www.youtube.com/embed/${l}`,allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:""})),c&&(0,a.createElement)("div",{className:"video-actions"},c.map(((e,t)=>(0,a.createElement)("a",{key:t,className:"video-action",href:e.link,target:"_blank",rel:"noopener noreferrer"},e.label))))),b=()=>(0,a.createElement)("div",{className:"welcome-tab-elements"},!gutslider?.isPro&&(0,a.createElement)("div",{className:"gutslider-dashboard-pro-notice"},(0,a.createElement)("div",{className:"left-area"},(0,a.createElement)("div",{className:"icon"},(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 24 24"},(0,a.createElement)("path",{d:"m23.664,0h-8.475l-2.97,6.003c-.073-.002-.146-.003-.22-.003-.076,0-.152,0-.228.003L8.811,0H.324l4.637,9.399c-1.227,1.538-1.961,3.486-1.961,5.601,0,4.962,4.038,9,9,9s9-4.038,9-9c0-2.121-.738-4.072-1.97-5.612L23.664,0Zm-7.854,1h6.243l-3.751,7.582c-1.334-1.311-3.074-2.209-5.011-2.489l2.52-5.093ZM1.933,1h6.256l2.513,5.094c-1.943.282-3.686,1.186-5.021,2.504L1.933,1Zm18.067,14c0,4.411-3.589,8-8,8s-8-3.589-8-8S7.589,7,12,7s8,3.589,8,8Zm-7.244-5.135h-1.494l-.897,3.135h-3.365v1.453l2.318,1.336-1.081,2.955,1.158.86,2.614-2.074,2.609,2.093,1.205-.831-1.171-2.969,2.347-1.377v-1.445h-3.347l-.896-3.135Zm.652,5.528l1.14,2.892-2.536-2.034-2.535,2.011,1.067-2.919-2.328-1.343h2.902l.89-3.11.89,3.11h2.884l-2.375,1.393Z"}))),(0,a.createElement)("div",{className:"title"},(0,c.__)("Upgrade to GutSlider Pro","slider-blocks")),(0,a.createElement)("div",{className:"features-list"},(0,a.createElement)("li",{className:"single-feature"},(0,c.__)("10+ Pro Slider and Carousel Blocks","slider-blocks")),(0,a.createElement)("li",{className:"single-feature"},(0,c.__)("25+ Interactive Content Animations","slider-blocks")),(0,a.createElement)("li",{className:"single-feature"},(0,c.__)("Static and Dynamic Content","slider-blocks")),(0,a.createElement)("li",{className:"single-feature"},(0,c.__)("Interactive Freemium Styles","slider-blocks")))),(0,a.createElement)("div",{className:"right-area"},(0,a.createElement)("a",{href:"https://gutslider.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},(0,c.__)("Upgrade Now","slider-blocks")))),(0,a.createElement)("div",{className:"tab-container flex"},(0,a.createElement)("div",{className:"flex-2"},(0,a.createElement)(v,{title:(0,c.__)("Welcome to GutSlider Blocks","slider-blocks"),description:(0,c.__)("GutSlider Blocks is a Gutenberg block plugin that allows you to create sliders in the Gutenberg editor. Watch this video to get started.","slider-blocks"),videoId:"P9Zj4bSVq4I",actions:[{label:(0,c.__)("More Videos","slider-blocks"),link:"https://gutslider.com/videos"},{label:(0,c.__)("Documentation","slider-blocks"),link:"https://gutslider.com/docs"}]})),(0,a.createElement)("div",{className:"flex-1"},(0,a.createElement)(g,{title:(0,c.__)("Report Bugs","slider-blocks"),description:(0,c.__)("If you have found a bug in GutSlider Blocks, please report it in our support forum. We will fix it as soon as possible.","slider-blocks"),action:{label:(0,c.__)("Report Now","slider-blocks"),link:"https://wordpress.org/support/plugin/slider-blocks/"}}),(0,a.createElement)(g,{title:(0,c.__)("Love the Plugin","slider-blocks"),description:(0,c.__)("If you love GutSlider Blocks, please leave us a review on WordPress.org. We appreciate your support!","slider-blocks"),action:{label:(0,c.__)("Rate Now","slider-blocks"),link:"https://wordpress.org/support/plugin/slider-blocks/reviews/#new-post"}}),(0,a.createElement)(g,{title:(0,c.__)("Contact Us","slider-blocks"),description:(0,c.__)("If you have any questions or need help with GutSlider Blocks, please contact us. We are happy to help you!","slider-blocks"),action:{label:(0,c.__)("Contact Us","slider-blocks"),link:"https://gutenbergkits.com/contact"}})))),w=()=>{const[e,t]=(0,r.useState)("welcome");return(0,a.createElement)(r.Fragment,null,(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"header"},(0,a.createElement)("div",{className:"header-content flex"},(0,a.createElement)("div",{className:"brand-area flex"},(0,a.createElement)("div",{className:"brand-logo"},(0,a.createElement)("svg",{width:"45",height:"45",viewBox:"0 0 45 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("path",{d:"M5 45C3.625 45 2.44833 44.5108 1.47 43.5325C0.491667 42.5542 0.00166667 41.3767 0 40V5C0 3.625 0.49 2.44833 1.47 1.47C2.45 0.491667 3.62667 0.00166667 5 0H40C41.375 0 42.5525 0.49 43.5325 1.47C44.5125 2.45 45.0017 3.62667 45 5V40C45 41.375 44.5108 42.5525 43.5325 43.5325C42.5542 44.5125 41.3767 45.0017 40 45H5ZM17.5 35H27.5C28.875 35 30.0525 34.5108 31.0325 33.5325C32.0125 32.5542 32.5017 31.3767 32.5 30V20H22.5V25H27.5V30H17.5V15H32.5C32.5 13.625 32.0108 12.4483 31.0325 11.47C30.0542 10.4917 28.8767 10.0017 27.5 10H17.5C16.125 10 14.9483 10.49 13.97 11.47C12.9917 12.45 12.5017 13.6267 12.5 15V30C12.5 31.375 12.99 32.5525 13.97 33.5325C14.95 34.5125 16.1267 35.0017 17.5 35Z",fill:"#5034C5"})),(0,a.createElement)("h3",{className:"brand-title"},(0,c.__)("GutSlider Blocks","slider-blocks"))),(0,a.createElement)("div",{className:"header-tabs"},(0,a.createElement)(s.ButtonGroup,null,(0,a.createElement)(s.Button,{className:"welcome-tab header-tab "+("welcome"===e?"active":""),onClick:()=>t("welcome")},(0,c.__)("Welcome","slider-blocks")),(0,a.createElement)(s.Button,{className:"blocks-tab header-tab "+("blocks"===e?"active":""),onClick:()=>t("blocks")},(0,c.__)("Blocks","slider-blocks"))))),(0,a.createElement)("div",{className:"changes-log flex"},(0,a.createElement)("a",{href:"https://gutslider.com",target:"_blank",rel:"nofollow noreferrer",className:"gutslider-prop"},gutslider?.isPro?(0,a.createElement)(r.Fragment,null,(0,a.createElement)("span",{className:"pro-version"},(0,c.__)("Pro","slider-blocks"),":"),gutslider?.proVersion):(0,a.createElement)(r.Fragment,null,(0,c.__)("GutSlider Pro","slider-blocks"))),(0,a.createElement)(h,null),(0,a.createElement)("a",{className:"changes-log-btn",href:"https://wordpress.org/plugins/slider-blocks/#developers",target:"_blank",rel:"nofollow noreferrer"},(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},(0,a.createElement)("path",{d:"M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A5.002 5.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z"})))))),(0,a.createElement)("div",{className:"tabs-body"},"welcome"===e&&(0,a.createElement)(b,null),"blocks"===e&&(0,a.createElement)(p,null))))},E=()=>(0,a.createElement)(w,null);window.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("gutslider");e&&(0,r.render)((0,a.createElement)(E,null),e)}))},485:(e,t)=>{var l;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var l=arguments[t];if(l){var s=typeof l;if("string"===s||"number"===s)e.push(l);else if(Array.isArray(l)){if(l.length){var c=r.apply(null,l);c&&e.push(c)}}else if("object"===s){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){e.push(l.toString());continue}for(var n in l)a.call(l,n)&&l[n]&&e.push(n)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(l=function(){return r}.apply(t,[]))||(e.exports=l)}()}},l={};function a(e){var r=l[e];if(void 0!==r)return r.exports;var s=l[e]={exports:{}};return t[e](s,s.exports,a),s.exports}a.m=t,e=[],a.O=(t,l,r,s)=>{if(!l){var c=1/0;for(m=0;m<e.length;m++){for(var[l,r,s]=e[m],n=!0,o=0;o<l.length;o++)(!1&s||c>=s)&&Object.keys(a.O).every((e=>a.O[e](l[o])))?l.splice(o--,1):(n=!1,s<c&&(c=s));if(n){e.splice(m--,1);var i=r();void 0!==i&&(t=i)}}return t}s=s||0;for(var m=e.length;m>0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[l,r,s]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={16:0,524:0};a.O.j=t=>0===e[t];var t=(t,l)=>{var r,s,[c,n,o]=l,i=0;if(c.some((t=>0!==e[t]))){for(r in n)a.o(n,r)&&(a.m[r]=n[r]);if(o)var m=o(a)}for(t&&t(l);i<c.length;i++)s=c[i],a.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return a.O(m)},l=globalThis.webpackChunkgutenberg_boilerplate=globalThis.webpackChunkgutenberg_boilerplate||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var r=a.O(void 0,[524],(()=>a(243)));r=a.O(r)})();