1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9540],{26856:(e,t,s)=>{s.r(t),s.d(t,{default:()=>H});var i=s(83740),n=s(28144),l=s(87539),o=s(11520),a=s(32224),d=s(85052),c=s(7012),r=s(70556),h=s(82976),m=s(87720),u=s(35588),p=s(39732),C=s(50723),E=s(53084),M=s(26968),_=s(79768),f=s(2360),D=s(96552),g=s(72524),k=s(900),b=s.n(k),x=i.createElement;const y=(0,u.defineMessages)({back:{id:"Back",defaultMessage:"Back"},ModerateComments:{id:"Moderate comments",defaultMessage:"Moderate comments"}});class A extends i.Component{constructor(e){super(e),this.onDelete=this.onDelete.bind(this),this.onEdit=this.onEdit.bind(this),this.onEditOk=this.onEditOk.bind(this),this.onEditCancel=this.onEditCancel.bind(this),this.state={showEdit:!1,editId:null,editText:null,isClient:!1}}componentDidMount(){this.props.searchContent("",{portal_type:"Discussion Item",fullobjects:!0}),this.setState({isClient:!0})}UNSAFE_componentWillReceiveProps(e){this.props.deleteRequest.loading&&e.deleteRequest.loaded&&this.props.searchContent("",{portal_type:"Discussion Item",fullobjects:!0})}onDelete(e,{value:t}){this.props.deleteComment(t)}onEdit(e,{value:t}){this.setState({showEdit:!0,editId:t.id,editText:t.text})}onEditOk(){this.setState({showEdit:!1,editId:null,editText:null}),this.props.searchContent("",{portal_type:"Discussion Item",fullobjects:!0})}onEditCancel(){this.setState({showEdit:!1,editId:null,editText:null})}onCancel(){this.props.history.push((0,a.yn)(this.props.pathname))}render(){return x("div",{id:"page-moderate-comments"},x(g.W,{open:this.state.showEdit,onCancel:this.onEditCancel,onOk:this.onEditOk,id:this.state.editId,text:this.state.editText}),x(d.c,{title:this.props.intl.formatMessage(y.ModerateComments)}),x(r.c,null,x("article",{id:"content"},x("header",null,x("h1",{className:"documentFirstHeading"},x(p.c,{id:"Moderate comments",defaultMessage:"Moderate comments"}))),x("section",{id:"content-core"},x(h.c,{compact:!0,singleLine:!0,striped:!0},x(h.c.Header,null,x(h.c.Row,null,x(h.c.HeaderCell,null,x(p.c,{id:"Commenter",defaultMessage:"Commenter"})),x(h.c.HeaderCell,null,x(p.c,{id:"Date",defaultMessage:"Date"})),x(h.c.HeaderCell,null,x(p.c,{id:"Comment",defaultMessage:"Comment"})),x(h.c.HeaderCell,null,x(p.c,{id:"Action",defaultMessage:"Action"})))),x(h.c.Body,null,this.props.items.map(e=>x(h.c.Row,{key:e["@id"]},x(h.c.Cell,null,e.author_name),x(h.c.Cell,null,x(_.c,{date:e.creation_date})),x(h.c.Cell,null,e.text.data),x(h.c.Cell,null,e.is_editable&&x(m.c,{onClick:this.onEdit,value:{id:e["@id"],text:e.text.data},primary:!0},x(p.c,{id:"Edit",defaultMessage:"Edit"})),e.is_deletable&&x(m.c,{onClick:this.onDelete,value:e["@id"],color:"red"},x(p.c,{id:"Delete",defaultMessage:"Delete"})))))))))),this.state.isClient&&(0,c.createPortal)(x(D.c,{pathname:this.props.pathname,hideDefaultViewButtons:!0,inner:x(o.cH,{className:"item",to:"#",onClick:()=>this.onCancel()},x(f.c,{name:b(),className:"contents circled",size:"30px",title:this.props.intl.formatMessage(y.back)}))}),document.getElementById("toolbar")))}}const H=(0,l.compose)(C.cp,(0,n.connect)((e,t)=>({items:e.search.items,deleteRequest:e.comments.delete,pathname:t.location.pathname}),{deleteComment:E.iN,searchContent:M.M}))(A)}}]); 2//# sourceMappingURL=plone-volto-components-manage-Controlpanels-ModerateComments.7f5ba2e7.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.