PluginProbe
Event Post / 5.10.2
Event Post v5.10.2
6.1.1 6.1.0 6.0.1 6.0.0 5.12.0 trunk 3.9 4.0 4.2 4.3 4.4 4.5 5.0 5.1 5.10.0 5.10.1 5.10.2 5.10.3 5.10.4 5.11.0 5.11.1 5.2 5.5 5.6 5.6.1 All 46 releases
event-post / build / list / index.js

index.js in Event Post 5.10.2, at build/list/index.js

1 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var l in n)e.o(n,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:n[l]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,n=window.wp.i18n,l=window.wp.blockEditor,o=window.wp.element,a=window.wp.components,s=window.wp.serverSideRender;var r=e.n(s);const i=window.ReactJSXRuntime;(0,t.registerBlockType)("eventpost/list",{edit:function({className:e,attributes:t,setAttributes:s,isSelected:c,id:u}){const _=(0,l.useBlockProps)(),{nb:p,future:v,past:b,cat:d,tag:h,geo:C,orderby:g,order:x,title:f,before_title:m,after_title:j,style:w,thumbnail:y,thumbnail_size:k,excerpt:T,blogs:S,pages:N}=t;return(0,i.jsx)("div",{..._,children:(0,i.jsxs)(o.Fragment,{children:[c&&(0,i.jsxs)(l.InspectorControls,{children:[(0,i.jsx)(a.TextControl,{value:f,onChange:function(e){s({title:e})},className:"title",placeholder:(0,n.__)("Title","event-post")}),(0,i.jsxs)(a.PanelBody,{title:(0,n.__)("Filters"),children:[(0,i.jsx)(a.CheckboxControl,{label:(0,n.__)("Display events","event-post"),checked:v,onChange:function(e){s({future:e})}}),(0,i.jsx)(a.CheckboxControl,{label:(0,n.__)("Display past events","event-post"),checked:b,onChange:function(e){s({past:e})}}),(0,i.jsx)(a.CheckboxControl,{label:(0,n.__)("Only geotagged events:","event-post"),value:C,onChange:function(e){s({geo:e})}}),(0,i.jsx)(a.RangeControl,{label:(0,n.__)("Max. number of events:","event-post"),value:p,onChange:function(e){s({nb:e})},className:"nb",min:-1,max:50,help:(0,n.__)("-1 is for: no limit","event-post")}),(0,i.jsx)(a.CheckboxControl,{label:(0,n.__)("Show pagination","event-post"),checked:N,onChange:function(e){s({pages:e})}}),(0,i.jsx)(a.TextControl,{label:(0,n.__)("Categories","event-post"),value:d,onChange:function(e){s({cat:e})},className:"category",placeholder:(0,n.__)("Categories, separated by comma","event-post")}),(0,i.jsx)(a.TextControl,{label:(0,n.__)("Tags","event-post"),value:h,onChange:function(e){s({tag:e})},className:"tag",placeholder:(0,n.__)("Tags, separated by comma","event-post")}),(0,i.jsx)(a.TextControl,{label:(0,n.__)("Blogs","event-post"),value:S,onChange:function(e){s({blogs:e})},className:"blogs"})]}),(0,i.jsxs)(a.PanelBody,{title:(0,n._x)("Display","noun","event-post"),children:[(0,i.jsx)(a.SelectControl,{label:(0,n.__)("Order by:","event-post"),value:g,options:[{label:"",value:""},{label:(0,n.__)("Post title","event-post"),value:"title"},{label:(0,n.__)("Event date","event-post"),value:"meta_value"}],onChange:function(e){s({orderby:e})}}),(0,i.jsx)(a.SelectControl,{label:(0,n.__)("Order:","event-post"),value:x,options:[{label:"",value:""},{label:(0,n.__)("Ascendant","event-post"),value:"ASC"},{label:(0,n.__)("Descendant","event-post"),value:"DESC"}],onChange:function(e){s({order:e})}}),(0,i.jsx)(a.TextControl,{value:m,onChange:function(e){s({before_title:e})},className:"before_title",placeholder:(0,n.__)("Before Title")}),(0,i.jsx)(a.TextControl,{value:j,onChange:function(e){s({after_title:e})},className:"after_title",placeholder:(0,n.__)("After Title","event-post")}),(0,i.jsx)(a.TextControl,{label:(0,n.__)("CSS Style","event-post"),value:w,onChange:function(e){s({style:e})},className:"style",placeholder:(0,n.__)("Style attribute","event-post")}),(0,i.jsx)(a.CheckboxControl,{label:(0,n.__)("Show excerpt","event-post"),checked:T,onChange:function(e){s({excerpt:e})}}),(0,i.jsx)(a.CheckboxControl,{label:(0,n.__)("Thumbnail","event-post"),checked:y,onChange:function(e){s({thumbnail:e})}}),(0,i.jsx)(a.SelectControl,{label:(0,n.__)("Thumbnail size:","event-post"),value:k,options:[{label:"",value:""},{label:(0,n.__)("Thumbnail","event-post"),value:"thumbnail"},{label:(0,n.__)("Medium","event-post"),value:"medium"},{label:(0,n.__)("Large","event-post"),value:"large"},{label:(0,n.__)("Full","event-post"),value:"full"}],onChange:function(e){s({thumbnail_size:e})}})]})]}),(0,i.jsx)(r(),{block:"eventpost/list",attributes:t})]})})},save:function({attributes:e}){return null}})})();