X7ROOT File Manager
Current Path:
/home/notabjze/hourglass.life/wp-content/plugins/feedzy-rss-feeds/build/loop
home
/
notabjze
/
hourglass.life
/
wp-content
/
plugins
/
feedzy-rss-feeds
/
build
/
loop
/
ðŸ“
..
📄
block.json
(3 KB)
📄
index-rtl.css
(3.5 KB)
📄
index.asset.php
(271 B)
📄
index.css
(3.49 KB)
📄
index.js
(25.76 KB)
📄
style-index-rtl.css
(843 B)
📄
style-index.css
(843 B)
Editing: index.js
(()=>{var e,t={897:(e,t,r)=>{"use strict";const n=window.React,l=window.wp.i18n,a=window.wp.blocks,s=window.wp.blockEditor,o=window.wp.components,i=window.wp.compose,c=window.wp.data,d=window.wp.hooks,u=window.feedzyData.defaultImage,f=(0,i.createHigherOrderComponent)((e=>t=>{if("core/image"!==t.name)return(0,n.createElement)(e,{...t});const r=(0,c.useSelect)((e=>e(s.store).getBlockParentsByBlockName(t.clientId,"feedzy-rss-feeds/loop").length>0));return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,{...t}),r&&(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarButton,{onClick:()=>{t.setAttributes({url:u})}},(0,l.__)("Use as Feed Image","feedzy-rss-feeds")))))}),"withMasonryExtension");(0,d.addFilter)("editor.BlockEdit","feedzy-loop/image",f);const p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"feedzy-rss-feeds/loop","version":"1.0.0","title":"Feedzy Loop","category":"common","icon":"rss","keywords":["rss","feed","feedzy"],"description":"Display curated RSS content in a dynamic, customizable loop directly in the Block Editor—no coding required.","attributes":{"feed":{"type":"object","properties":{"type":{"type":"string","enum":["url","group"],"default":"url"},"source":{"type":["number","array"],"default":""}}},"query":{"type":"object","properties":{"max":{"type":"number","default":5},"sort":{"type":"string","enum":["default","date_desc","date_asc","title_desc","title_asc"],"default":"default"},"refresh":{"type":"string","enum":["1_hours","3_hours","12_hours","1_days","3_days","15_days"],"default":"12_hours"}}},"layout":{"type":"object","properties":{"columnCount":{"type":"number","default":1}}},"conditions":{"type":"object","properties":{"match":{"type":"string","enum":["all","any"],"default":"all"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","default":"title"},"operator":{"type":"string","default":"contains"},"value":{"type":"string","default":""}}}}}},"innerBlocksContent":{"type":"string","default":""}},"supports":{"align":["wide","full"],"anchor":true,"ariaLabel":true,"html":true,"color":{"gradients":true,"heading":true,"button":true,"link":true},"shadow":true,"spacing":{"margin":["top","bottom"],"padding":true,"blockGap":true},"dimensions":{"minHeight":true},"typography":{"fontSize":true,"lineHeight":true}},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","textdomain":"feedzy-rss-block"}'),m=[{name:"feedzy-default",title:(0,l.__)("Default","feedzy-rss-feeds"),description:(0,l.__)("Display curated RSS content in a dynamic, customizable loop directly in the Block Editor—no coding required.","feedzy-rss-feeds"),icon:()=>(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 100",width:"100",height:"50"},(0,n.createElement)(o.Rect,{width:"200",height:"100",fill:"#F3F4F6"}),(0,n.createElement)(o.Rect,{x:"10",y:"10",width:"180",height:"45",fill:"#D1D5DB"}),(0,n.createElement)(o.Path,{d:"M95 25 L85 35 L105 35 Z",fill:"#9CA3AF"}),(0,n.createElement)(o.Circle,{cx:"110",cy:"28",r:"4",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"10",y:"65",width:"140",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"10",y:"77",width:"180",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"10",y:"85",width:"160",height:"4",rx:"1",fill:"#9CA3AF"})),isDefault:!0,innerBlocks:[["core/group",{layout:{type:"constrained"},style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30",left:"var:preset|spacing|30",right:"var:preset|spacing|30"},margin:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30"}}}},[["core/image",{url:window.feedzyData.defaultImage,alt:"{{feedzy_title}}",href:"{{feedzy_url}}"}],["core/paragraph",{content:'<a href="{{feedzy_url}}">{{feedzy_title}}</a>'}],["core/paragraph",{content:"{{feedzy_meta}}",fontSize:"medium"}],["core/paragraph",{content:"{{feedzy_description}}",fontSize:"small"}]]]],scope:["block"]},{name:"feedzy-round",title:(0,l.__)("Round","feedzy-rss-feeds"),description:(0,l.__)("Display the feed items in a round style.","feedzy-rss-feeds"),icon:()=>(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 100",width:"100",height:"50"},(0,n.createElement)(o.Rect,{width:"200",height:"100",fill:"#F3F4F6"}),(0,n.createElement)(o.Circle,{cx:"35",cy:"25",r:"15",fill:"#D1D5DB"}),(0,n.createElement)(o.Rect,{x:"10",y:"45",width:"50",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"10",y:"55",width:"50",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"10",y:"63",width:"45",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"10",y:"71",width:"48",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"10",y:"79",width:"42",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Circle,{cx:"100",cy:"25",r:"15",fill:"#D1D5DB"}),(0,n.createElement)(o.Rect,{x:"75",y:"45",width:"50",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"75",y:"55",width:"50",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"75",y:"63",width:"45",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"75",y:"71",width:"48",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"75",y:"79",width:"42",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Circle,{cx:"165",cy:"25",r:"15",fill:"#D1D5DB"}),(0,n.createElement)(o.Rect,{x:"140",y:"45",width:"50",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"140",y:"55",width:"50",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"140",y:"63",width:"45",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"140",y:"71",width:"48",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"140",y:"79",width:"42",height:"4",rx:"1",fill:"#9CA3AF"})),attributes:{layout:{columnCount:3}},isDefault:!1,innerBlocks:[["core/group",{layout:{type:"constrained"},style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30",left:"var:preset|spacing|30",right:"var:preset|spacing|30"},margin:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30"}}}},[["core/image",{url:window.feedzyData.defaultImage,alt:"{{feedzy_title}}",href:"{{feedzy_url}}",width:"150px",height:"150px",scale:"cover",align:"center",className:"is-style-rounded"}],["core/paragraph",{content:'<a href="{{feedzy_url}}">{{feedzy_title}}</a>'}],["core/paragraph",{content:"{{feedzy_meta}}",fontSize:"medium"}],["core/paragraph",{content:"{{feedzy_description}}",fontSize:"small"}]]]],scope:["block"]},{name:"feedzy-card",title:(0,l.__)("Card","feedzy-rss-feeds"),description:(0,l.__)("Display the feed items in a card style.","feedzy-rss-feeds"),icon:()=>(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 100",width:"100",height:"50"},(0,n.createElement)(o.Rect,{width:"200",height:"100",fill:"#F3F4F6"}),(0,n.createElement)(o.Rect,{x:"5",y:"5",width:"60",height:"90",rx:"3",fill:"white",stroke:"#E5E7EB"}),(0,n.createElement)(o.Rect,{x:"10",y:"10",width:"50",height:"50",fill:"#D1D5DB"}),(0,n.createElement)(o.Rect,{x:"10",y:"65",width:"50",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"10",y:"75",width:"50",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"10",y:"83",width:"45",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"70",y:"5",width:"60",height:"90",rx:"3",fill:"white",stroke:"#E5E7EB"}),(0,n.createElement)(o.Rect,{x:"75",y:"10",width:"50",height:"50",fill:"#D1D5DB"}),(0,n.createElement)(o.Rect,{x:"75",y:"65",width:"50",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"75",y:"75",width:"50",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"75",y:"83",width:"45",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"135",y:"5",width:"60",height:"90",rx:"3",fill:"white",stroke:"#E5E7EB"}),(0,n.createElement)(o.Rect,{x:"140",y:"10",width:"50",height:"50",fill:"#D1D5DB"}),(0,n.createElement)(o.Rect,{x:"140",y:"65",width:"50",height:"6",rx:"2",fill:"#4B5563"}),(0,n.createElement)(o.Rect,{x:"140",y:"75",width:"50",height:"4",rx:"1",fill:"#9CA3AF"}),(0,n.createElement)(o.Rect,{x:"140",y:"83",width:"45",height:"4",rx:"1",fill:"#9CA3AF"})),attributes:{layout:{columnCount:3}},isDefault:!1,innerBlocks:[["core/group",{layout:{type:"constrained"},style:{spacing:{margin:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30"}},border:{color:"#e3edeb",width:"1px",radius:"5px"}}},[["core/group",{layout:{type:"constrained"},style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30",left:"var:preset|spacing|30",right:"var:preset|spacing|30"}}}},[["core/image",{url:window.feedzyData.defaultImage,alt:"{{feedzy_title}}",href:"{{feedzy_url}}"}],["core/paragraph",{content:'<strong><a href="{{feedzy_url}}">{{feedzy_title}}</a></strong>'}]]],["core/group",{layout:{type:"constrained"},style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30",left:"var:preset|spacing|30",right:"var:preset|spacing|30"}},color:{background:"#f1f5f4"},border:{color:"#e3edeb",width:"1px",radius:"5px"}}},[["core/paragraph",{content:"{{feedzy_meta}}",fontSize:"medium"}]]],["core/group",{layout:{type:"constrained"},style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|30",left:"var:preset|spacing|30",right:"var:preset|spacing|30"}}}},[["core/paragraph",{content:"{{feedzy_description}}",fontSize:"small"}]]]]]],scope:["block"]}],y=window.wp.element,h=window.wp.serverSideRender;var g=r.n(h);const _=window.wp.coreData,w=({value:e,options:t,onChange:r})=>{const[a,s]=(0,y.useState)(!1),[o,i]=(0,y.useState)(""),[c,d]=(0,y.useState)(null),u=(0,y.useRef)(null);return(0,y.useEffect)((()=>{if("group"===e?.type&&e.source){const r=t.find((t=>t.value===e.source));d(r||null),i("")}else"url"===e?.type&&Array.isArray(e.source)&&(d(null),i(e.source.join(", ")))}),[e,t]),(0,y.useEffect)((()=>{const e=e=>{u.current&&!u.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]),(0,n.createElement)("div",{className:"fz-url-category-input",ref:u},(0,n.createElement)("input",{type:"text",value:c?c.label:o,onChange:e=>{const t=e.target.value;i(t),d(null)},onBlur:()=>{r({type:"url",source:o?o.split(",").map((e=>e.trim())).filter(Boolean):[]})},placeholder:(0,l.__)("Enter URLs or select a Feed Group","feedzy-rss-feeds"),disabled:null!==c,className:"fz-input-field"}),(0,n.createElement)("div",{className:"fz-buttons-container"},c&&(0,n.createElement)("button",{onClick:()=>{d(null),i(""),r({type:"url",source:[]})},className:"fz-clear-button",title:(0,l.__)("Clear","feedzy-rss-feeds")},(0,n.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),(0,n.createElement)("button",{onClick:()=>s(!a),className:"fz-dropdown-button",title:(0,l.__)("Select Feed Group","feedzy-rss-feeds")},(0,n.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}},(0,n.createElement)("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))),a&&(0,n.createElement)("div",{className:"fz-dropdown-menu"},t.map((e=>(0,n.createElement)("button",{key:e.value,onClick:()=>(e=>{d(e),i(""),s(!1),r({type:"group",source:e.value})})(e),className:"fz-dropdown-item "+(c?.value===e.value?"fz-selected":"")},e.label)))))},v=({attributes:e,setAttributes:t,onSaveFeed:r})=>{const{categories:a,isLoading:s}=(0,c.useSelect)((e=>{var t;const{getEntityRecords:r,isResolving:n}=e(_.store);return{categories:null!==(t=r("postType","feedzy_categories"))&&void 0!==t?t:[],isLoading:n("getEntityRecords",["postType","feedzy_categories"])}}),[]);return(0,n.createElement)(o.Placeholder,{key:"placeholder",icon:"rss",label:(0,l.__)("Feedzy RSS Feeds","feedzy-rss-feeds")},s&&(0,n.createElement)("div",{key:"loading",className:"wp-block-embed is-loading"},(0,n.createElement)(o.Spinner,null),(0,n.createElement)("p",null,(0,l.__)("Fetching…","feedzy-rss-feeds"))),!s&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.BaseControl,{label:(0,l.__)("Feed Source","feedzy-rss-feeds"),id:"feed-source-control"},(0,n.createElement)(w,{value:e?.feed,options:[...a.map((e=>({label:e?.title?.rendered,value:e.id})))],onChange:e=>t({feed:e})}),(0,n.createElement)("p",null,(0,l.__)("Enter the full URL of the feed source you wish to display here, or select a Feed Group. Also you can add multiple URLs separated with a comma. You can manage your feed groups from","feedzy-rss-feeds")," ",(0,n.createElement)("a",{href:"edit.php?post_type=feedzy_categories",title:(0,l.__)("Feedzy Groups","feedzy-rss-feeds"),target:"_blank"},(0,l.__)("here","feedzy-rss-feeds")))),(0,n.createElement)("div",null,(0,n.createElement)(o.Button,{variant:"primary",onClick:()=>{e?.feed?.source&&r()}},(0,l.__)("Load Feed","feedzy-rss-feeds")),(0,n.createElement)(o.Button,{variant:"link",href:"https://validator.w3.org/feed/",target:"_blank"},(0,l.__)("Validate","feedzy-rss-feeds")))))};var E=r(485),b=r.n(E);const z=(0,y.forwardRef)((function({icon:e,size:t=24,...r},n){return(0,y.cloneElement)(e,{width:t,height:t,...r,ref:n})})),k=window.wp.primitives,x=(0,n.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(k.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),C=({label:e,onDelete:t,initialOpen:r=!1,children:a})=>{const[s,i]=(0,y.useState)(r);return(0,n.createElement)("div",{className:"fz-panel-tab"},(0,n.createElement)("div",{className:"fz-panel-tab__header"},(0,n.createElement)("div",{className:"fz-panel-tab__header__label",onClick:()=>i(!s)},e),(0,n.createElement)(o.Button,{icon:s?"arrow-up-alt2":"arrow-down-alt2",label:s?(0,l.__)("Close Settings","feedzy-rss-feeds"):(0,l.__)("Open Settings","feedzy-rss-feeds"),showTooltip:!0,onClick:()=>i(!s)}),(0,n.createElement)(o.Button,{icon:"no-alt",label:(0,l.__)("Delete","feedzy-rss-feeds"),showTooltip:!0,onClick:t})),s&&(0,n.createElement)("div",{className:"fz-panel-tab__content"},a))},B=window.wp.date,S=({index:e,label:t,value:r,onChange:a})=>{const s=(0,B.__experimentalGetSettings)();return(0,n.createElement)(o.BaseControl,{label:t,id:`date-time-control-${e}`},(0,n.createElement)(o.Dropdown,{position:"bottom left",renderToggle:({onToggle:e,isOpen:t})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.Button,{onClick:e,variant:"secondary","aria-expanded":t},r?(0,B.format)(s.formats.datetime,r):(0,l.__)("Select Date","feedzy-rss-feeds"))),renderContent:()=>(0,n.createElement)(o.DateTimePicker,{currentDate:r,onChange:a})}))},D=[{label:(0,l.__)("Title","feedzy-rss-feeds"),value:"title"},{label:(0,l.__)("Description","feedzy-rss-feeds"),value:"description"},{label:(0,l.__)("Full Content","feedzy-rss-feeds"),value:"fullcontent"},{label:(0,l.__)("Author","feedzy-rss-feeds"),value:"author",unsupportedOperators:["greater_than","gte","less_than","lte"]},{label:(0,l.__)("Date","feedzy-rss-feeds"),value:"date",unsupportedOperators:["has_value","equals","not_equals","empty","contains","not_contains"]},{label:(0,l.__)("Featured Image","feedzy-rss-feeds"),value:"featured_image",unsupportedOperators:["greater_than","gte","less_than","lte"]}],F=({conditions:e,setConditions:t})=>{const r=(r,n,l)=>{const a=[...e.conditions];if(a[r][l]=n,"field"===l){const e=D.find((e=>e.value===n));e.unsupportedOperators?.includes(a[r].operator)&&(a[r].operator=Object.keys(window?.feedzyConditionsData?.operators).filter((t=>!e.unsupportedOperators?.includes(t)))[0]),a[r].value=""}t({...e,conditions:a})};return(0,n.createElement)("div",{className:b()("fz-condition-control",{"is-upsell":!window.feedzyData.isPro})},(0,n.createElement)(o.SelectControl,{label:(0,l.__)("Include If","feedzy-rss-feeds"),value:e.match,options:[{label:(0,l.__)("All conditions are met","feedzy-rss-feeds"),value:"all"},{label:(0,l.__)("Any condition is met","feedzy-rss-feeds"),value:"any"}],onChange:r=>{t({...e,match:r})}}),e.conditions.map(((a,s)=>{const i=D.find((e=>e.value===a.field)),c=Object.keys(window?.feedzyConditionsData?.operators).filter((e=>!i.unsupportedOperators?.includes(e)));return(0,n.createElement)(C,{key:s,label:`${i?.label} ${window.feedzyConditionsData.operators[a.operator]} ${a?.value||""}`,onDelete:()=>(r=>{const n=[...e.conditions];n.splice(r,1),t({...e,conditions:n})})(s),initialOpen:0===s},(0,n.createElement)(o.SelectControl,{label:(0,l.__)("Field","feedzy-rss-feeds"),value:a?.field,options:D,onChange:e=>r(s,e,"field")}),(0,n.createElement)(o.SelectControl,{label:(0,l.__)("Compare Operator","feedzy-rss-feeds"),options:c.map((e=>({label:window.feedzyConditionsData.operators[e],value:e}))),help:["contains","not_contains"].includes(a?.operator)?(0,l.__)("You can use comma(,) and plus(+) keyword.","feedzy-rss-feeds"):"",value:a?.operator,onChange:e=>r(s,e,"operator")}),!["has_value","empty"].includes(a?.operator)&&(0,n.createElement)(n.Fragment,null,"date"===a?.field?(0,n.createElement)(S,{id:s,label:(0,l.__)("Value","feedzy-rss-feeds"),value:a?.value,onChange:e=>r(s,e,"value")}):(0,n.createElement)(o.TextControl,{label:(0,l.__)("Value","feedzy-rss-feeds"),value:a?.value,onChange:e=>r(s,e,"value")})))})),(0,n.createElement)("div",{className:"fz-action-btn mt-24"},(0,n.createElement)(o.Button,{variant:"secondary",onClick:()=>{const r=[...e.conditions];r.push({field:D[0].value,operator:"contains"}),t({...e,conditions:r})},className:"fz-new-action"},(0,l.__)("Add Condition","feedzy-rss-feeds")," ",(0,n.createElement)(z,{icon:x}))))},A=({setOpen:e})=>{const t=(0,c.useSelect)((e=>e(s.store).getSelectedBlock())),{clearSelectedBlock:r,replaceBlock:i}=(0,c.useDispatch)(s.store);return(0,n.createElement)(o.Modal,{title:(0,l.__)("Choose a Pattern","feedzy-rss-feeds"),onRequestClose:()=>e(!1),size:"fill"},(0,n.createElement)("div",{className:"fz-pattern-selector"},m.map((l=>{const o={...t,attributes:{feed:t?.attributes?.feed,...l?.attributes},innerBlocks:(0,a.createBlocksFromInnerBlocksTemplate)(l?.innerBlocks)},c=()=>{i(t.clientId,o),r(),e(!1)};return(0,n.createElement)("div",{key:l.name,onClick:c,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||c()},role:"button",tabIndex:"0",className:"fz-pattern"},(0,n.createElement)(s.BlockPreview,{blocks:o,viewportWidth:1400}),(0,n.createElement)("div",null,l.title))}))))},R=({attributes:e,isEditing:t,isPreviewing:r,setAttributes:a,onChangeLayout:i,onChangeQuery:c,setIsEditing:d,setIsPreviewing:u})=>{const[f,p]=(0,y.useState)(!1);return(0,n.createElement)(n.Fragment,null,f&&(0,n.createElement)(A,{setOpen:p}),(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarButton,{icon:"edit",title:(0,l.__)("Edit Feed","feedzy-rss-feeds"),onClick:()=>d(!0)})),(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarButton,{onClick:()=>p(!0)},(0,l.__)("Replace","feedzy-rss-feeds"))),(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarButton,{onClick:()=>u(!r)},r?(0,l.__)("Hide Preview","feedzy-rss-feeds"):(0,l.__)("Show Preview","feedzy-rss-feeds")))),(0,n.createElement)(s.InspectorControls,null,!t&&(0,n.createElement)(o.PanelBody,{initialOpen:!1,title:(0,l.__)("Feed Source","feedzy-rss-feeds"),key:"source"},(0,n.createElement)(o.Button,{variant:"secondary",onClick:()=>d(!0),style:{width:"100%",justifyContent:"center"}},(0,l.__)("Edit Feed","feedzy-rss-feeds"))),(0,n.createElement)(o.PanelBody,{title:(0,l.__)("Settings","feedzy-rss-feeds"),key:"settings"},(0,n.createElement)(o.RangeControl,{label:(0,l.__)("Column Count","feedzy-rss-feeds"),value:e?.layout?.columnCount||1,onChange:e=>i({type:"columnCount",value:e}),min:1,max:5}),(0,n.createElement)(o.RangeControl,{label:(0,l.__)("Number of Items","feedzy-rss-feeds"),value:e?.query?.max||5,onChange:e=>c({type:"max",value:e}),min:1,max:20}),(0,n.createElement)(o.ExternalLink,{href:"https://docs.themeisle.com/article/2217-feedzy-loop#magic_tags",target:"_blank"},(0,l.__)("Feedzy Loop Documentation","feedzy-rss-feeds")),(0,n.createElement)(o.SelectControl,{label:(0,l.__)("Sorting Order","feedzy-rss-feeds"),value:e?.query?.sort,options:[{label:(0,l.__)("Default","feedzy-rss-feeds"),value:"default"},{label:(0,l.__)("Date Descending","feedzy-rss-feeds"),value:"date_desc"},{label:(0,l.__)("Date Ascending","feedzy-rss-feeds"),value:"date_asc"},{label:(0,l.__)("Title Descending","feedzy-rss-feeds"),value:"title_desc"},{label:(0,l.__)("Title Ascending","feedzy-rss-feeds"),value:"title_asc"}],onChange:e=>c({type:"sort",value:e})}),(0,n.createElement)(o.SelectControl,{label:(0,l.__)("Feed Caching Time","feedzy-rss-feeds"),value:e?.query?.refresh||"12_hours",options:[{label:(0,l.__)("1 Hour","feedzy-rss-feeds"),value:"1_hours"},{label:(0,l.__)("2 Hours","feedzy-rss-feeds"),value:"3_hours"},{label:(0,l.__)("12 Hours","feedzy-rss-feeds"),value:"12_hours"},{label:(0,l.__)("1 Day","feedzy-rss-feeds"),value:"1_days"},{label:(0,l.__)("3 Days","feedzy-rss-feeds"),value:"3_days"},{label:(0,l.__)("15 Days","feedzy-rss-feeds"),value:"15_days"}],onChange:e=>c({type:"refresh",value:e})})),(0,n.createElement)(o.PanelBody,{title:[(0,l.__)("Filter items","feedzy-rss-feeds"),!window.feedzyData.isPro&&(0,n.createElement)("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,key:"filters",className:"feedzy-item-filter"},!window.feedzyData.isPro&&(0,n.createElement)("div",{className:"fz-upsell-notice"},(0,l.__)("Unlock this feature and more advanced options with","feedzy-rss-feeds")," ",(0,n.createElement)(o.ExternalLink,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=blockeditor&utm_campaign=keywordsfilter&utm_content=feedzy-rss-feeds"},(0,l.__)("Feedzy Pro","feedzy-rss-feeds"))),(0,n.createElement)(F,{conditions:window.feedzyData.isPro?e?.conditions||{conditions:[],match:"all"}:{match:"all",conditions:[{field:"title",operator:"contains",value:"Sports"}]},setConditions:e=>{a({conditions:e})}}))))},{name:O}=p,P=()=>(0,n.createElement)(o.Placeholder,null,(0,n.createElement)(o.Spinner,null)),{name:L}=p;(0,a.registerBlockType)(L,{...p,variations:m,transforms:{from:[{type:"block",blocks:["core/rss"],transform:e=>{const{feedURL:t}=e;return t?(0,a.createBlock)(L,{feed:{type:"url",source:[t]}}):(0,a.createBlock)(L)}},{type:"block",blocks:["feedzy-rss-feeds/feedzy-block"],transform:e=>{const{feeds:t}=e;return t?(0,a.createBlock)(L,{feed:{type:"url",source:[t]}}):(0,a.createBlock)(L)}}]},edit:({attributes:e,setAttributes:t,clientId:r})=>{const l=(0,s.useBlockProps)(),[o,i]=(0,y.useState)(!e?.feed?.source),[d,u]=(0,y.useState)(!1),{clearSelectedBlock:f,replaceInnerBlocks:p}=(0,c.useDispatch)(s.store),m=(0,c.useSelect)((e=>{const{isBlockSelected:t,hasSelectedInnerBlock:n}=e(s.store);return t(r)||n(r,!0)}),[r]),h=(0,c.useSelect)((e=>{var t;const{getBlock:n}=e(s.store),l=n(r);return null!==(t=(0,a.serialize)(l?.innerBlocks))&&void 0!==t?t:""}),[r]),_=(0,c.useSelect)((e=>0<e(s.store).getBlocks(r).length),[r]),w=(0,c.useSelect)((e=>{const{getBlockVariations:t}=e(a.store);return t(O,"block")}),[]),E=(0,c.useSelect)((e=>{const{getDefaultBlockVariation:t}=e(a.store);return t(O,"block")}),[]),b=({type:r,value:n})=>{t({query:{...e.query,[r]:n}})},z=({type:r,value:n})=>{t({layout:{...e.layout,[r]:n}})};return o?(0,n.createElement)("div",{...l},(0,n.createElement)(v,{attributes:e,setAttributes:t,onSaveFeed:()=>{i(!1)}})):m&&!d||!h?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(R,{attributes:e,isEditing:o,isPreviewing:d,setAttributes:t,onChangeLayout:z,onChangeQuery:b,setIsEditing:i,setIsPreviewing:u}),(0,n.createElement)("div",{...l},_?(0,n.createElement)(s.InnerBlocks,null):(0,n.createElement)(s.__experimentalBlockVariationPicker,{variations:w,onSelect:(e=E)=>{e&&(t(e.attributes),p(r,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0),f())}}))):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(R,{attributes:e,isEditing:o,isPreviewing:d,setAttributes:t,onChangeLayout:z,onChangeQuery:b,setIsEditing:i,setIsPreviewing:u}),(0,n.createElement)("div",{...l},(0,n.createElement)(g(),{block:"feedzy-rss-feeds/loop",attributes:{...e,innerBlocksContent:h},LoadingResponsePlaceholder:P})))},save:()=>(0,n.createElement)(s.InnerBlocks.Content,null)})},485:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var s=l.apply(null,r);s&&e.push(s)}}else if("object"===a){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var o in r)n.call(r,o)&&r[o]&&e.push(o)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(r=function(){return l}.apply(t,[]))||(e.exports=r)}()}},r={};function n(e){var l=r[e];if(void 0!==l)return l.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,r,l,a)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,l,a]=e[d],o=!0,i=0;i<r.length;i++)(!1&a||s>=a)&&Object.keys(n.O).every((e=>n.O[e](r[i])))?r.splice(i--,1):(o=!1,a<s&&(s=a));if(o){e.splice(d--,1);var c=l();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[r,l,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var l,a,[s,o,i]=r,c=0;if(s.some((t=>0!==e[t]))){for(l in o)n.o(o,l)&&(n.m[l]=o[l]);if(i)var d=i(n)}for(t&&t(r);c<s.length;c++)a=s[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(d)},r=globalThis.webpackChunkfeedzy_rss_feeds=globalThis.webpackChunkfeedzy_rss_feeds||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var l=n.O(void 0,[350],(()=>n(897)));l=n.O(l)})();
Upload File
Create Folder