1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6855],{5674:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var i=s(29796),n=s(37876);let r=(0,i.A)((0,n.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert")},50202:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/success-stories/search",function(){return s(81675)}])},53351:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var i=s(37876),n=s(25528),r=s(23902);s(14232);var l=s(5646),o=s(83695);let a=l.Ay.div.withConfig({componentId:"sc-ae6e797c-0"})(["justify-self:start;margin-top:26px;"]),d=e=>{let{deleteText:t,setIsOpen:s,isOpen:l,handleDelete:d,row:c,rowIdKey:u="id"}=e,{store:h,resource:x}=(0,r.P)(),p=x.controls.dataGrid;return(0,i.jsx)(o.w,{type:"confirmation",heading:t,active:l,onCloseGesture:()=>s(!1),children:(0,i.jsxs)(a,{children:[(0,i.jsx)(n.A,{variant:"outlined",color:"primary",onClick:()=>s(!1),children:p.cancelAction}),"\xa0\xa0",(0,i.jsx)(n.A,{variant:"contained",color:"primary",onClick:()=>{d(c[u]),s(!1)},children:p.deleteAction})]})})}},72863:(e,t,s)=>{"use strict";s.d(t,{j:()=>j});var i=s(37876),n=s(5674),r=s(43913),l=s(18951),o=s(70120),a=s(74650),d=s(59092),c=s(89726),u=s(48230),h=s.n(u),x=s(14232);let p=(0,r.Ay)(l.A)(()=>({padding:"0px !important"})),j=e=>{let{options:t=[],rowId:s,onRowSelect:r}=e,[l,u]=x.useState(null),[j,A]=x.useState(null),f=(e,t)=>{"backdropClick"!==t&&r(e,t),u(null)},m=!!l;return(0,i.jsxs)("div",{ref:e=>{A(e)},children:[(0,i.jsx)(p,{onClick:e=>{u(e.currentTarget)},children:(0,i.jsx)(n.A,{})}),(0,i.jsx)(c.Ay,{id:m?"simple-popover":void 0,open:m,anchorEl:l,onClose:f,anchorOrigin:{vertical:"bottom",horizontal:"left"},container:j,children:(0,i.jsx)(o.A,{component:"div",disablePadding:!0,sx:{backgroundColor:"#fff"},children:t.map(e=>{let{title:t,link:n,action:r}=e;return n?(0,i.jsx)(h(),{href:n,passHref:!0,children:(0,i.jsx)(a.A,{sx:{py:0,pl:1,cursor:"pointer"},onClick:()=>f(s,r),children:(0,i.jsx)(d.A,{sx:{py:0,pl:1},primary:(0,i.jsx)(p,{children:t})})})},t):(0,i.jsx)(a.A,{sx:{py:0,pl:1,cursor:"pointer"},onClick:()=>f(s,r),children:(0,i.jsx)(d.A,{sx:{py:0,pl:1},primary:(0,i.jsx)(p,{children:t})})})})})})]})}},81675:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>D});var i=s(37876),n=s(18951),r=s(87717),l=s(47646),o=s(5180),a=s(20187),d=s(97700),c=s(7982),u=s(25528),h=s(35618),x=s(68039),p=s(75862),j=s(99875),A=s(23902),f=s(48230),m=s.n(f),g=s(14232),w=s(55364),y=s(97978),v=s(7063),b=s(58718),k=s(53351),C=s(68803),S=s(97060),T=s(72863),_=s(36994);function N(){let{resource:e,store:t}=(0,A.P)(),[s,j]=(0,g.useState)(null),[f,N]=(0,g.useState)("keyword"),[D,E]=(0,g.useState)(50),[P,z]=(0,g.useState)(""),[M,R]=(0,g.useState)(!1),[I,O]=(0,g.useState)(null),Y=e.pages.dashboard.successStories.search,X=(0,y.Ml)(w.DT.USER);async function B(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,{data:n}=await v.Ay.post("/api/v1/stories/admin/".concat(e),{filter:i,includeManaged:!0,page:0,size:t,filterValue:s});return n}async function V(e){let{data:t}=await v.Ay.del("/api/v1/stories/".concat(e),!0);return t}return(0,y.Yq)(new Date,t.lang),(0,i.jsxs)("div",{id:"dashboard-stories-search",children:[(0,i.jsx)(b.Ru,{title:Y.title}),(0,i.jsx)(C.aT,{title:Y.title,subtitle:Y.subtitle}),(0,i.jsxs)(n.A,{"data-testid":"content",sx:{marginBottom:2},children:[(0,i.jsxs)(r.A,{component:"form",onSubmit:function(e){e.preventDefault(),R(!0),B(X.id,50,P,"keyword"===f?1:2).then(j).finally(()=>R(!1)),E(50)},container:!0,spacing:2,marginBottom:5,children:[(0,i.jsx)(r.A,{size:{xs:12,sm:"grow"},children:(0,i.jsxs)(l.A,{fullWidth:!0,children:[(0,i.jsx)(o.A,{children:Y.fields.dropdown}),(0,i.jsxs)(a.A,{label:Y.fields.dropdown,defaultValue:"keyword",value:f,onChange:e=>{N(e.target.value)},children:[(0,i.jsx)(d.A,{value:"keyword",children:e.pages.stories.keyword},1),(0,i.jsx)(d.A,{value:"location",children:e.pages.stories.location},2)]})]})}),(0,i.jsx)(r.A,{size:{sm:"grow",xs:12},children:(0,i.jsx)(c.A,{fullWidth:!0,variant:"outlined",label:f.charAt(0).toUpperCase()+f.slice(1),value:P,onChange:e=>{z(e.target.value)}})}),(0,i.jsx)(r.A,{size:{xs:12,sm:"auto"},children:(0,i.jsx)(u.A,{variant:"contained",sx:{height:44},disabled:M,type:"submit",children:Y.fields.action})})]}),(0,i.jsx)(_.X,{rows:(0,y.TY)(()=>s.stories,[]),results:(0,y.TY)(()=>s.count,0),headCells:[{id:"moreIcon",label:""},{id:"title",label:"Name"},{id:"ownerName",label:"Administrator"},{id:"projectTitle",label:"Project"},{id:"posted",label:"Date"}],orderDefault:"desc",orderByDefault:"posted",renderRow:(e,s)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h.A,{width:S.XS,children:(0,i.jsx)(T.j,{rowId:e.id,options:[{title:Y.editAction,action:"edit",link:"/dashboard/success-stories/edit/".concat(e.id)},{title:Y.deleteAction,action:"delete",link:""}],onRowSelect:(e,t)=>
1{"delete"===t&&O(e)}})}),(0,i.jsx)(h.A,{children:(0,i.jsx)(m(),{href:"/stories/".concat(e.id),children:(0,i.jsx)("span",{style:{color:"#0081a0"},children:e.title})})}),(0,i.jsx)(h.A,{children:e.ownerName}),(0,i.jsx)(h.A,{children:e.projectTitle}),(0,i.jsx)(h.A,{width:S.SM,children:(0,y.Yq)(e.posted,t.lang)})]})}),!(0,y.TY)(()=>s.count,0)&&(0,i.jsx)(x.A,{mt:"32px",sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:e.pages.dashboard.successStories.zeroResultSearch}),s&&s.count>0&&(0,i.jsxs)(x.A,{className:"show-container",children:[(0,i.jsx)(p.A,{children:(0,y.JT)(Y.showingResults,[s.stories.length.toString(),s.count.toString()])}),(0,i.jsx)(u.A,{variant:"outlined",onClick:function(){R(!0),B(X.id,D+50,P,"keyword"===f?1:2).then(j).finally(()=>R(!1)),E(D+50)},className:"more-button",children:Y.showMore})]})]}),(0,i.jsx)(k.A,{deleteText:e.pages.dashboard.successStories.deleteConfirmation,isOpen:!!I,setIsOpen:()=>O(null),row:{id:I},handleDelete:function(e){V(e).then(e=>{R(!0),B(X.id,D,P,"keyword"===f?1:2).then(j).finally(()=>R(!1))})}})]})}N.PageLayout=j.A;let D=N}},e=>{e.O(0,[1120,7301,6049,7818,1422,636,6593,8792],()=>e(e.s=50202)),_N_E=e.O()}]);
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.