|
1
|
|
-"use strict";(self.webpackChunkfl_assistant=self.webpackChunkfl_assistant||[]).push([[870],{4046:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_});var l=a(7363),n=a.n(l),o=a(8003),s=a(5112),r=a(6711),i=a(9818),u=a(4533),c=a(3882),d=a(4352);const m=({type:e="post"})=>{const t="fl-content",{query:a,listStyle:l}=(0,i.useAppState)(t),{setQuery:s,setListStyle:r}=(0,i.getAppActions)(t),c=d.W.query,m=()=>{const t={title:(0,o.__)("Title"),author:(0,o.__)("Author"),ID:(0,o.__)("Post ID"),date:(0,o.__)("Date Created"),modified:(0,o.__)("Date Modified")},i={any:(0,o.__)("Any"),publish:(0,o.__)("Published"),draft:(0,o.__)("Drafted"),pending:(0,o.__)("Pending"),future:(0,o.__)("Scheduled"),private:(0,o.__)("Private"),trash:(0,o.__)("Trashed")},m={ASC:(0,o.__)("Ascending"),DESC:(0,o.__)("Descending")},p={"":(0,o.__)("List"),thumb:(0,o.__)("Post Thumbnails")};return n().createElement(n().Fragment,null,n().createElement(u.Filter,null,n().createElement(u.Filter.RadioGroupItem,{title:(0,o.__)("Status"),items:i,value:a.post_status,defaultValue:c.post_status,onChange:e=>s({...a,post_status:e})}),n().createElement(u.Filter.LabelsItem,{value:a.label,defaultValue:c.label,onChange:e=>s({...a,label:e})}),n().createElement(u.Filter.RadioGroupItem,{title:(0,o.__)("Display As"),items:p,value:l,defaultValue:d.W.listStyle,onChange:e=>r(e)}),n().createElement(u.Filter.RadioGroupItem,{title:(0,o.__)("Sort By"),items:t,value:a.orderby,defaultValue:c.orderby,onChange:e=>s({...a,orderby:e})}),n().createElement(u.Filter.RadioGroupItem,{title:(0,o.__)("Order"),items:m,value:a.order,defaultValue:d.W.query.order,onChange:e=>s({...a,order:e})}),n().createElement(u.Filter.Button,{onClick:()=>s(c)},(0,o.__)("Reset Filter"))),n().createElement(u.List.InlineCreate,{postType:e,onPostCreated:()=>s({...d.W.query,order:"DESC",orderby:"ID",key:(new Date).getTime()})}))};return n().createElement(u.Layout.Box,{outset:!0,padY:!1,style:{maxHeight:"100%",minHeight:0,flex:"1 1 auto"}},n().createElement(u.List.Posts,{query:{...a,post_type:e},listStyle:l,getItemProps:(e,a)=>e.id?{...a,to:{pathname:`/${t}/post/${e.id}`,state:{item:e}}}:a,before:n().createElement(m,null)}))};(0,c.addFilter)("fl-asst.list-item-actions","fl-assistant",((e,{item:t,listType:a})=>{if("post"===a){const a=e.findIndex((e=>"edit-post"===e.handle));if(a){const l=e[a];delete l.href,l.isShowing=!0,l.title=(0,o.__)("Edit Details"),l.to={pathname:`/fl-content/post/${t.id}`,state:{item:t}}}}return e}));var p=a(7309);const _=({baseURL:e})=>n().createElement(r.Switch,null,n().createElement(r.Route,{exact:!0,path:e},n().createElement(r.Redirect,{to:{pathname:`${e}/tab/post`}})),n().createElement(r.Route,{path:`${e}/tab/:tab`,component:h}),n().createElement(r.Route,{path:`${e}/post/new`,component:u.Page.CreatePost}),n().createElement(r.Route,{path:`${e}/post/:id`,component:({location:e,match:t,history:a})=>n().createElement(u.Page.Post,{location:e,match:t,history:a,CloudUI:s})})),h=()=>{const{contentTypes:e}=(0,i.getSystemConfig)(),t=()=>n().createElement(u.Layout.Tabs,{tabs:a,shouldHandleOverflow:!0}),a=(()=>{let t=[];return Object.keys(e).map((a=>{const l=e[a];t.push({handle:a,path:"/fl-content/tab/"+a,label:l.labels.plural,component:()=>n().createElement(m,{type:a})})})),t})();return n().createElement(u.Page,{id:"fl-asst-content-list-page",title:(0,o.__)("Content"),icon:n().createElement(p.Z,{context:"sidebar"}),padY:!1,header:n().createElement(t,null),topContentStyle:{border:"none"},shouldScroll:!1,shouldShowBackButton:!1,showAsRoot:!0,onLoad:()=>{const e=document.querySelector(".fl-asst-filter .fluid-button");e&&e.focus()}},n().createElement(u.Layout.CurrentTab,{tabs:a}))}}}]); |
|
1
|
+"use strict";(self.webpackChunkfl_assistant=self.webpackChunkfl_assistant||[]).push([[580],{987:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_});var l=a(1594),o=a.n(l),n=a(2470),r=a(1112),s=a(9665),c=a(6075),i=a(2405),d=a(8566),u=a(4449);const m=({type:e="post"})=>{const t="fl-content",{query:a,listStyle:l}=(0,c.useAppState)(t),{setQuery:r,setListStyle:s}=(0,c.getAppActions)(t),d=u.n.query,m=()=>{const t={title:(0,n.__)("Title"),author:(0,n.__)("Author"),ID:(0,n.__)("Post ID"),date:(0,n.__)("Date Created"),modified:(0,n.__)("Date Modified")},c={any:(0,n.__)("Any"),publish:(0,n.__)("Published"),draft:(0,n.__)("Drafted"),pending:(0,n.__)("Pending"),future:(0,n.__)("Scheduled"),private:(0,n.__)("Private"),trash:(0,n.__)("Trashed")},m={ASC:(0,n.__)("Ascending"),DESC:(0,n.__)("Descending")},p={"":(0,n.__)("List"),thumb:(0,n.__)("Post Thumbnails")};return o().createElement(o().Fragment,null,o().createElement(i.Filter,null,o().createElement(i.Filter.RadioGroupItem,{title:(0,n.__)("Status"),items:c,value:a.post_status,defaultValue:d.post_status,onChange:e=>r({...a,post_status:e})}),o().createElement(i.Filter.LabelsItem,{value:a.label,defaultValue:d.label,onChange:e=>r({...a,label:e})}),o().createElement(i.Filter.RadioGroupItem,{title:(0,n.__)("Display As"),items:p,value:l,defaultValue:u.n.listStyle,onChange:e=>s(e)}),o().createElement(i.Filter.RadioGroupItem,{title:(0,n.__)("Sort By"),items:t,value:a.orderby,defaultValue:d.orderby,onChange:e=>r({...a,orderby:e})}),o().createElement(i.Filter.RadioGroupItem,{title:(0,n.__)("Order"),items:m,value:a.order,defaultValue:u.n.query.order,onChange:e=>r({...a,order:e})}),o().createElement(i.Filter.Button,{onClick:()=>r(d)},(0,n.__)("Reset Filter"))),!e.startsWith("wp_template")&&o().createElement(i.List.InlineCreate,{postType:e,onPostCreated:()=>r({...u.n.query,order:"DESC",orderby:"ID",key:(new Date).getTime()})}))};return o().createElement(i.Layout.Box,{outset:!0,padY:!1,style:{maxHeight:"100%",minHeight:0,flex:"1 1 auto"}},o().createElement(i.List.Posts,{query:{...a,post_type:e},listStyle:l,getItemProps:(e,a)=>e.id?{...a,to:{pathname:`/${t}/post/${e.id}`,state:{item:e}}}:a,before:o().createElement(m,null)}))};(0,d.addFilter)("fl-asst.list-item-actions","fl-assistant",((e,{item:t,listType:a})=>{if("post"===a){const a=e.findIndex((e=>"edit-post"===e.handle));if(a){const l=e[a];delete l.href,l.isShowing=!0,l.title=(0,n.__)("Edit Details"),l.to={pathname:`/fl-content/post/${t.id}`,state:{item:t}}}}return e}));var p=a(988);const _=({baseURL:e})=>o().createElement(s.Switch,null,o().createElement(s.Route,{exact:!0,path:e},o().createElement(s.Redirect,{to:{pathname:`${e}/tab/post`}})),o().createElement(s.Route,{path:`${e}/tab/:tab`,component:h}),o().createElement(s.Route,{path:`${e}/post/new`,component:i.Page.CreatePost}),o().createElement(s.Route,{path:`${e}/post/:id`,component:({location:e,match:t,history:a})=>o().createElement(i.Page.Post,{location:e,match:t,history:a,CloudUI:r})})),h=()=>{const{contentTypes:e}=(0,c.getSystemConfig)(),t=()=>o().createElement(i.Layout.Tabs,{tabs:a,shouldHandleOverflow:!0}),a=(()=>{let t=[];const a=["wp_template","fl_code"];return Object.keys(e).map((l=>{if(!a.includes(l)){const a=e[l];t.push({handle:l,path:"/fl-content/tab/"+l,label:a.labels.plural,component:()=>o().createElement(m,{type:l})})}})),t})();return o().createElement(i.Page,{id:"fl-asst-content-list-page",title:(0,n.__)("Content"),icon:o().createElement(p.A,{context:"sidebar"}),padY:!1,header:o().createElement(t,null),topContentStyle:{border:"none"},shouldScroll:!1,shouldShowBackButton:!1,showAsRoot:!0,onLoad:()=>{const e=document.querySelector(".fl-asst-filter .fluid-button");e&&e.focus()}},o().createElement(i.Layout.CurrentTab,{tabs:a}))}},4011:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var l=a(1594),o=a.n(l),n=a(2470),r=a(1112),s=a(9665),c=a(2405),i=a(6075),d=a(2833);const u=({type:e="css"})=>{const t="fl-code",{query:a,listStyle:l}=(0,i.useAppState)(t),{setQuery:n,setListStyle:r}=(0,i.getAppActions)(t),s=()=>o().createElement(o().Fragment,null,o().createElement(c.List.InlineCreate,{postType:"fl_code",codeType:e,onPostCreated:()=>n({...d.n.query,order:"DESC",orderby:"ID",key:(new Date).getTime()})}));return o().createElement(c.Layout.Box,{outset:!0,padY:!1,style:{maxHeight:"100%",minHeight:0,flex:"1 1 auto"}},o().createElement(c.List.Code,{query:{...a,post_type:"fl_code",meta_key:"_fl_asst_code_type",meta_value:e},listStyle:l,getItemProps:(e,a)=>e.id?{...a,to:{pathname:`/${t}/fl_code/${e.id}`,state:{item:e}}}:a,before:o().createElement(s,null)}))};var m=a(4028);const p=({baseURL:e})=>o().createElement(s.Switch,null,o().createElement(s.Route,{exact:!0,path:e},o().createElement(s.Redirect,{to:{pathname:`${e}/tab/fl_code`}})),o().createElement(s.Route,{path:`${e}/tab/:tab`,component:_}),o().createElement(s.Route,{path:`${e}/fl_code/new`,component:c.Page.CreatePost}),o().createElement(s.Route,{path:`${e}/fl_code/:id`,component:({location:e,match:t,history:a})=>o().createElement(c.Page.Code,{location:e,match:t,history:a,CloudUI:r})})),_=({baseURL:e})=>{const t=()=>o().createElement(c.Layout.Tabs,{tabs:a,shouldHandleOverflow:!0}),a=[{handle:"fl_code",path:"/fl-code/tab/fl_code",label:"CSS",component:()=>o().createElement(u,{type:"CSS"})},{handle:"fl_js",path:"/fl-code/tab/fl_js",label:"JavaScript",component:()=>o().createElement(u,{type:"JavaScript"})}];return o().createElement(c.Page,{id:"fl-asst-code-list-page",title:(0,n.__)("Code"),icon:o().createElement(m.A,{context:"sidebar"}),padY:!1,header:o().createElement(t,null),topContentStyle:{border:"none"},shouldScroll:!1,shouldShowBackButton:!1,showAsRoot:!0},o().createElement(c.Layout.CurrentTab,{tabs:a}))}}}]); |