PageSourceSearch

https://www.postnord.com/dist/client/render-cisionlist-unstrict.component-20260923.js

js postnord.com collected 2026-09-24 15:23:29 UTC 3,206 bytes, 1 lines download raw bytes

1import{j as t}from"./react-component-loader-20260923.js";import{r}from"./index-20260923.js";import{P as v,l as S}from"./en_US-20260923.js";import{D as k}from"./DropDown-20260923.js";import{h as w}from"./apiUtils-20260923.js";import"./index-202609232.js";import"./index-202609234.js";import"./preload-helper-20260923.js";import"./createSuper-20260923.js";import"./entry-client-20260923.js";async function E(s,n,a,l,i,o){const u={page:s,yearPageId:n,preferredCulture:l,isRegulatory:a,pageSize:i};try{const f={method:"POST",body:JSON.stringify(u),headers:{"Content-Type":"application/json"}};let d=await fetch("/api/news/filterpressreleaselist",f);return await w(d)}catch{o()}}function N(s){const[n,a]=r.useState(1),[l]=r.useState(s.pageSize??10),[i,o]=r.useState(s.yearFilters[0]),[u,f]=r.useState(!1),[d,R]=r.useState({cisionListResults:s.cisionListResults,totalResultCount:s.totalResultCount}),m=r.useRef(!1),h=r.useRef(!0),x=r.useRef("");r.useEffect(()=>{if(h.current){h.current=!1;return}let e=!1;return y().then(c=>{e||R(F=>({...F,cisionListResults:c.newsListResults,totalResultCount:c.totalResultCount}))}),()=>e=!0},[n,i,u]),r.useEffect(()=>{!h.current&&m.current||(g(),window.setTimeout(()=>{g()},150),m.current=!0)});function g(){const e=document.querySelector(".cision-filter pn-filter-checkbox input");!e||e.hasAttribute("data-haschangelistener")||(e.addEventListener("change",C),e.setAttribute("data-haschangelistener","true"))}function y(){return new Promise(e=>{setTimeout(()=>{E(n,i.value,u,s.preferredCulture,l,p).then(c=>{e(c)})},50)})}function p(e){console.log("error",e)}const C=r.useCallback(e=>{a(1),f(e.target.value==="true")});function b(e){a(1),o(e)}function j(e){a(e)}const L=()=>s.yearFilters.length?t.jsx(k,{inputId:"year-filter-dropdown",className:"year-filter-dropdown",options:s.yearFilters,isSearchable:!1,label:i.label,value:i.value,setValue:b,setOptionAsValue:!0}):null;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"cision-filter",children:[t.jsxs("div",{className:"cision-filter-year",children:[t.jsx("span",{className:"d-block mb-2",children:s.yearFilterCaption}),t.jsx(L,{})]}),s.hideRegulatoryCheckbox?"":t.jsxs("div",{className:"cision-filter-regulatory",children:[t.jsx("pn-filter-checkbox",{ref:x,checkboxid:"cision-filter-regulatory-input",value:"true",name:"cision-filter-regulatory",checked:"false"}),t.jsx("label",{htmlFor:"cision-filter-regulatory-input",children:s.isRegulatoryLabelText})]})]}),t.jsx("div",{className:"cision-result-items mb-4",children:d.cisionListResults.map((e,c)=>t.jsxs("div",{className:"cision-result-item",children:[t.jsx("span",{children:e.publishDate}),t.jsx("a",{href:e.url,className:"d-block",children:e.title})]},c))}),t.jsx(v,{onChange:j,current:n,locale:S,defaultPageSize:l,total:d.totalResultCount})]})}const q=s=>{if(!s)return null;const{yearFilters:n,preferredCulture:a,yearFilterCaption:l,isRegulatoryLabelText:i,pressReleaseListResponse:o,hideRegulatoryCheckbox:u}=s;return t.jsx(t.Fragment,{children:t.jsx(N,{cisionListResults:o.newsListResults,yearFilters:n,preferredCulture:a,totalResultCount:o.totalResultCount,yearFilterCaption:l,isRegulatoryLabelText:i,hideRegulatoryCheckbox:u})})};export{q as default};

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.