From de699440ff94e9c0d8e8b5201ee93179c085bf60 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 20:51:26 +0000
Subject: [PATCH] =Timeline fields in feedroutes.php
---
build/feed/index.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/build/feed/index.js b/build/feed/index.js
index 816bd42..c1546b7 100644
--- a/build/feed/index.js
+++ b/build/feed/index.js
@@ -1 +1 @@
-(()=>{"use strict";var e,t={111:(e,t,n)=>{const l=window.wp.blocks,r=window.wp.i18n,s=window.wp.blockEditor,a=window.wp.components,o=window.wp.element,i=window.wp.apiFetch;var c=n.n(i);const d=window.ReactJSXRuntime;(0,l.registerBlockType)("jvb/feed",{edit:function({attributes:e,setAttributes:t}){const n=(0,s.useBlockProps)(),[l,i]=(0,o.useState)({});return(0,o.useEffect)((()=>{c()({path:"/jvb/v1/types"}).then((e=>{i(JSON.parse(e))}))}),[]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.InspectorControls,{children:(0,d.jsxs)(a.PanelBody,{title:(0,r.__)("Feed Settings","jvb"),children:[(0,d.jsx)(a.TextControl,{label:(0,r.__)("Title","jvb"),value:e.title,onChange:e=>t({title:e})}),(0,d.jsx)(a.ToggleControl,{label:(0,r.__)("Inherit Current Query","jvb"),help:(0,r.__)("Inherit filters from the current archive or taxonomy query","jvb"),checked:e.inheritQuery,onChange:e=>t({inheritQuery:e})}),!e.inheritQuery&&(0,d.jsxs)("div",{className:"feed-content-types",children:[(0,d.jsx)("p",{className:"components-base-control__label",children:(0,r.__)("Content Types","jvb")}),(0,d.jsx)("div",{className:"checkbox-list",children:Object.entries(l).map((([n,l])=>(0,d.jsx)(a.CheckboxControl,{label:l,checked:e.contentTypes.includes(n),onChange:l=>{const r=l?[...e.contentTypes,n]:e.contentTypes.filter((e=>e!==n));t({contentTypes:r})}},n)))}),(0,d.jsx)("div",{className:"select-all-wrapper",children:(0,d.jsx)(a.CheckboxControl,{label:(0,r.__)("Select All","jvb"),checked:e.contentTypes.length===Object.keys(l).length,onChange:e=>{t({contentTypes:e?Object.keys(l):[]})}})})]}),(0,d.jsx)(a.SelectControl,{label:(0,r.__)("Items Per Page","jvb"),value:e.itemsPerPage,options:[{label:"12",value:12},{label:"24",value:24},{label:"36",value:36}],onChange:e=>t({itemsPerPage:parseInt(e)})}),(0,d.jsx)(a.SelectControl,{label:(0,r.__)("Default Order","jvb"),value:e.defaultOrder,options:[{label:(0,r.__)("Newest First","jvb"),value:"date_desc"},{label:(0,r.__)("Oldest First","jvb"),value:"date_asc"},{label:(0,r.__)("Random","jvb"),value:"random"}],onChange:e=>t({defaultOrder:e})})]})}),(0,d.jsx)("div",{...n,children:(0,d.jsxs)("div",{className:"feed-block-preview",children:[(0,d.jsx)("h2",{children:e.title}),(0,d.jsx)("div",{className:"feed-filters",children:(0,d.jsx)("div",{className:"filter-preview",children:e.contentTypes.map((e=>(0,d.jsx)("span",{className:"content-type-badge",children:l[e]},e)))})}),(0,d.jsx)("div",{className:"feed-grid-placeholder",children:[...Array(6)].map(((e,t)=>(0,d.jsx)("div",{className:"grid-item-placeholder"},t)))})]})})]})},save:function(){return null}})}},n={};function l(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,l),s.exports}l.m=t,e=[],l.O=(t,n,r,s)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,r,s]=e[d],o=!0,i=0;i<n.length;i++)(!1&s||a>=s)&&Object.keys(l.O).every((e=>l.O[e](n[i])))?n.splice(i--,1):(o=!1,s<a&&(a=s));if(o){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,r,s]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={814:0,138:0};l.O.j=t=>0===e[t];var t=(t,n)=>{var r,s,[a,o,i]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in o)l.o(o,r)&&(l.m[r]=o[r]);if(i)var d=i(l)}for(t&&t(n);c<a.length;c++)s=a[c],l.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return l.O(d)},n=globalThis.webpackChunkjvb=globalThis.webpackChunkjvb||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=l.O(void 0,[138],(()=>l(111)));r=l.O(r)})();
\ No newline at end of file
+(()=>{"use strict";var e,t={111:(e,t,n)=>{const o=window.wp.blocks,l=window.wp.element,i=window.wp.blockEditor,r=window.wp.components,s=window.wp.apiFetch;var c=n.n(s);const a=window.wp.i18n,d=window.ReactJSXRuntime;(0,o.registerBlockType)("jvb/feed",{edit:function({attributes:e,setAttributes:t}){const[n,o]=(0,l.useState)(null),[s,h]=(0,l.useState)(!0),[p,j]=(0,l.useState)(null),x=(0,i.useBlockProps)({className:"feed-block-editor"});(0,l.useEffect)((()=>{c()({path:"/jvb/v1/feed/types",headers:{"If-Modified-Since":localStorage.getItem("feed_types_modified")}}).then((n=>{if(o(n),h(!1),!e.contentTypes&&!e.inheritQuery){const e=Object.keys(n)[0];e&&t({contentTypes:[e]})}})).catch((e=>{console.error("Error loading feed types:",e),j(e.message),h(!1)}))}),[e.inheritQuery]);const y=(n,o)=>{const l=e.contentTypes||[],i=o?[...l,n]:l.filter((e=>e!==n));t({contentTypes:i})},b=(e,t)=>`${t.plural} (${t.type})`,g=n?{content:Object.entries(n).filter((([e,t])=>"content"===t.type)),taxonomy:Object.entries(n).filter((([e,t])=>"taxonomy"===t.type))}:{content:[],taxonomy:[]};return(0,d.jsxs)("div",{...x,children:[(0,d.jsxs)(i.InspectorControls,{children:[(0,d.jsxs)(r.PanelBody,{title:(0,a.__)("Feed Settings","jvb"),initialOpen:!0,children:[(0,d.jsx)(r.ToggleControl,{label:(0,a.__)("Inherit from Page Context","jvb"),help:e.inheritQuery?(0,a.__)("Feed will adapt to the current page (profile, taxonomy, etc.)","jvb"):(0,a.__)("Manually select content types to display","jvb"),checked:e.inheritQuery,onChange:e=>t({inheritQuery:e})}),!e.inheritQuery&&(0,d.jsxs)(d.Fragment,{children:[s&&(0,d.jsxs)("div",{style:{textAlign:"center",padding:"20px"},children:[(0,d.jsx)(r.Spinner,{}),(0,d.jsx)("p",{children:(0,a.__)("Loading feed types...","jvb")})]}),p&&(0,d.jsxs)(r.Notice,{status:"error",isDismissible:!1,children:[(0,a.__)("Error loading feed types: ","jvb")," ",p]}),!s&&!p&&n&&(0,d.jsxs)(d.Fragment,{children:[g.content.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{children:(0,a.__)("Content Types","jvb")}),g.content.map((([t,n])=>(0,d.jsx)(r.CheckboxControl,{label:b(0,n),checked:e.contentTypes?.includes(t)||!1,onChange:e=>y(t,e),help:n.taxonomies?.length>0?`Filters: ${n.taxonomies.join(", ")}`:null},t)))]}),g.taxonomy.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{style:{marginTop:"20px"},children:(0,a.__)("Content Taxonomies","jvb")}),(0,d.jsx)("p",{style:{fontSize:"12px",color:"#757575"},children:(0,a.__)("These are collections that group other content","jvb")}),g.taxonomy.map((([t,n])=>(0,d.jsx)(r.CheckboxControl,{label:b(0,n),checked:e.contentTypes?.includes(t)||!1,onChange:e=>y(t,e),help:n.for_content?.length>0?`Contains: ${n.for_content.join(", ")}`:null},t)))]}),!e.contentTypes?.length&&(0,d.jsx)(r.Notice,{status:"warning",isDismissible:!1,children:(0,a.__)("Please select at least one content type","jvb")})]})]})]}),(0,d.jsx)(r.PanelBody,{title:(0,a.__)("Display Settings","jvb"),initialOpen:!1,children:(0,d.jsx)(r.ToggleControl,{label:(0,a.__)("Show Gallery View","jvb"),help:(0,a.__)("Enable lightbox for images","jvb"),checked:e.enableGallery||!1,onChange:e=>t({enableGallery:e})})})]}),(0,d.jsxs)("div",{className:"feed-block-placeholder",children:[(0,d.jsx)("div",{className:"feed-block-icon",children:(0,d.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",children:[(0,d.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",fill:"currentColor",opacity:"0.3"}),(0,d.jsx)("rect",{x:"13",y:"3",width:"7",height:"7",fill:"currentColor",opacity:"0.3"}),(0,d.jsx)("rect",{x:"3",y:"13",width:"7",height:"7",fill:"currentColor",opacity:"0.3"}),(0,d.jsx)("rect",{x:"13",y:"13",width:"7",height:"7",fill:"currentColor",opacity:"0.3"})]})}),(0,d.jsx)("h3",{children:(0,a.__)("Feed Block","jvb")}),e.inheritQuery?(0,d.jsx)("p",{className:"feed-block-description",children:(0,a.__)("📍 Inheriting from page context","jvb")}):(0,d.jsx)("div",{className:"feed-block-description",children:e.contentTypes?.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,d.jsx)("strong",{children:(0,a.__)("Showing:","jvb")})}),(0,d.jsx)("ul",{style:{listStyle:"none",padding:"0",margin:"8px 0"},children:e.contentTypes.map((e=>{const t=n?.[e];return(0,d.jsxs)("li",{style:{padding:"4px 0",color:"#2271b1"},children:["✓ ",t?.plural||e]},e)}))})]}):(0,d.jsx)("p",{style:{color:"#d63638"},children:(0,a.__)("⚠️ No content types selected","jvb")})}),(0,d.jsx)("p",{className:"feed-block-note",children:(0,a.__)("Feed will be displayed on the frontend","jvb")})]})]})},save:function(){return null}})}},n={};function o(e){var l=n[e];if(void 0!==l)return l.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=(t,n,l,i)=>{if(!n){var r=1/0;for(d=0;d<e.length;d++){for(var[n,l,i]=e[d],s=!0,c=0;c<n.length;c++)(!1&i||r>=i)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(s=!1,i<r&&(r=i));if(s){e.splice(d--,1);var a=l();void 0!==a&&(t=a)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[n,l,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={814:0,138:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var l,i,[r,s,c]=n,a=0;if(r.some((t=>0!==e[t]))){for(l in s)o.o(s,l)&&(o.m[l]=s[l]);if(c)var d=c(o)}for(t&&t(n);a<r.length;a++)i=r[a],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(d)},n=globalThis.webpackChunkjvb=globalThis.webpackChunkjvb||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var l=o.O(void 0,[138],(()=>o(111)));l=o.O(l)})();
\ No newline at end of file
--
Gitblit v1.10.0