bibhamrokhanpin/wp-content/__plugins/wp-trending-post-slider-and-widget/assets/js/blocks.build.js

1 line
43 KiB
JavaScript
Raw Permalink Normal View History

2024-04-10 12:01:06 +00:00
!function(e){function t(l){if(n[l])return n[l].exports;var a=n[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";var l=n(2),a=(n.n(l),n(3)),o=(n.n(a),n(4)),r=n(5),s=n(6),__=wp.i18n.__,p=wp.blocks.registerBlockType;p("wtpsw-free/trending-slider",{title:__("Trending Slider","wtpsw"),description:__("Display trending post in a slider view with various layouts.","wtpsw"),icon:"star-filled",category:"wpos_guten_block",keywords:[__("wpos"),__("trending slider","wtpsw"),__("wtpsw_popular_post")],supports:{html:!1,multiple:!0},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t,"data-block-type":"wtpsw-trending-slider"}},edit:o.a,save:function(){return null}}),p("wtpsw-free/trending-carousel",{title:__("Trending Carousel","wtpsw"),description:__("Display trending post in a carousel view with various layouts.","wtpsw"),icon:"star-filled",category:"wpos_guten_block",keywords:[__("wpos"),__("trending carousel","wtpsw"),__("wtpsw_carousel")],supports:{html:!1,multiple:!0},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t,"data-block-type":"wtpsw-trending-carousel"}},edit:r.a,save:function(){return null}}),p("wtpsw-free/trending-gridbox",{title:__("Trending Gridbox","wtpsw"),description:__("Display trending post in a gridbox view with various layouts.","wtpsw"),icon:"star-filled",category:"wpos_guten_block",keywords:[__("wpos"),__("trending gridbox","wtpsw"),__("wtpsw_gridbox")],supports:{html:!1,multiple:!0},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t,"data-block-type":"wtpsw-trending-gridbox"}},edit:s.a,save:function(){return null}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),s=wp.element,p=s.Component,i=s.Fragment,w=wp.components,m=w.PanelBody,c=w.TextControl,u=w.Disabled,d=w.ToggleControl,h=w.RangeControl,g=w.SelectControl,__=wp.i18n.__,f=(wp.data.select,wp.blockEditor),E=f.InspectorControls,b=f.BlockControls,y=f.BlockAlignmentToolbar,_=function(e){function t(){l(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={isLoading:!1},e}return o(t,e),r(t,[{key:"ObjToString",value:function(e){var t=wp.blocks.getBlockAttributes("wtpsw-free/trending-slider"),n="";for(var l in e)e.hasOwnProperty(l)&&"undefined"!==typeof e[l]&&e[l]!==t[l]&&""!=jQuery.trim(e[l])&&(n+=l+'="'+e[l]+'" ');return n}},{key:"GetBooleanDropdown",value:function(){return[{value:"true",label:__("True","wtpsw")},{value:"false",label:__("False","wtpsw")}]}},{key:"GetLinkTargetDropdown",value:function(){return[{value:"self",label:__("Same Window","wtpsw")}]}},{key:"GetPostViewsOrderby",value:function(){return[{value:"views",label:__("Views","wtpsw")},{value:"comment",label:__("Comment Count","wtpsw"