PageSourceSearch

https://www.etigny.fr/component---theme-gatsby-theme-blank-src-tem…-list-actualites-js-4133960ff32c5f54069c.js

js etigny.fr collected 2026-10-03 02:48:28 UTC 7,311 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([[929],{5711:function(e,t,a){a.r(t),a.d(t,{default:function(){return q}});var l=a(27378),i=a(26972),n=a(21660),o="listActus-module--vocalized-update--f67b0",c=a(96075),s=a(69467);const r=c.default.section.withConfig({displayName:"actualites-styled__ListContainer",componentId:"sc-qxd9v2-0"})(["background-color:",";"],(e=>e.theme.a_color_gradients.a_light)),d=(0,c.default)(s.Z).withConfig({displayName:"actualites-styled__StyledFade",componentId:"sc-qxd9v2-1"})(["& > div:nth-of-type(1),& > div:nth-of-type(3){background-color:",";}"],(e=>e.theme.a_color_gradients.a_light)),u=c.default.button.withConfig({displayName:"actualites-styled__BorderTaxo",componentId:"sc-qxd9v2-2"})(["border:1px solid ",";color:",";background-color:",";&:hover{background-color:",";color:",";}&::after{",";}"],(e=>e.theme.a_color_gradients.a_dark),(e=>e.activeBool?e.activeText:e.theme.a_color_gradients.a_dark),(e=>e.activeBool?e.theme.a_color_gradients.a_dark:e.activeText),(e=>e.activeBool?null:e.theme.a_color_gradients.a_dark),(e=>e.activeBool?null:e.activeText),(e=>e.activeBool?'content: " \\D7";margin-left: 5px;line-height: 1;':"")),m=c.default.section.withConfig({displayName:"actualites-styled__ContainerLight",componentId:"sc-qxd9v2-3"})(["background-color:",";& > div{background-color:",";}"],(e=>e.theme.a_color_gradients.a_light),(e=>e.theme.a_color_gradients.a_light));c.default.p.withConfig({displayName:"actualites-styled__ActusPeriodFilter",componentId:"sc-qxd9v2-4"})(["color:",";"],(e=>!0===e.active?e.theme.b_color_gradients.b_dark:e.theme.a_color_gradients.a_dark)),c.default.div.withConfig({displayName:"actualites-styled__ActusPeriodFilterContainer",componentId:"sc-qxd9v2-5"})(["border-right:2px solid ",";@media (max-width:900px){border-bottom:2px solid ",";}"],(e=>e.theme.a_color_gradients.a_light),(e=>e.theme.a_color_gradients.a_light)),c.default.div.withConfig({displayName:"actualites-styled__ActusItem",componentId:"sc-qxd9v2-6"})(["border-bottom:1px solid ",";&:hover div:first-of-type::before{background-color:",";}"],(e=>e.theme.a_color_gradients.a_light),(e=>e.theme.b_color_gradients.b_dark));var _=a(20030);const h=c.default.p.withConfig({displayName:"actualite-item-styled__ActuTaxo",componentId:"sc-1fxojta-0"})(["color:",";margin-right:1rem;margin-bottom:0;"],(e=>e.theme.a_color_gradients.a_dark));var g=a(3350),p=a(7660),f=a(45485),v=a(9579),b=a(92911);var E=e=>{var t,a;let{actu:i}=e;return l.createElement(l.Fragment,null,l.createElement(b.Z,{link:"/node/"+i.drupal_internal__nid+"/edit"}),(null===(t=i.relationships.field_image_actus)||void 0===t?void 0:t.localFile)&&l.createElement(v.Z,{arialabel:i.title,link:i.path.alias},l.createElement(f.Z,Object.assign({},i.relationships.field_image_actus.localFile,{ariaHidden:!0}))),l.createElement("div",{className:"listActus-module--actualite-infos--c6f14"},(null===(a=i.relationships.field_taxonomie_thematique)||void 0===a?void 0:a.length)>0&&l.createElement("div",{className:"listActus-module--actu-taxo-container--ae335"},i.relationships.field_taxonomie_thematique.map((e=>l.createElement(h,{key:e.key,className:"listActus-module--actualite-categorie--2c607"},e.name)))),l.createElement("p",{className:"listActus-module--actualite-date--63eec"},"posté le ",i.field_date_de_publication||i.created),l.createElement("h2",{className:"listActus-module--actualite-title--80a05"},l.createElement(v.Z,{link:i.path.alias},i.title)),i.body&&l.createElement("p",{className:"listActus-module--actualite-resume--32281",dangerouslySetInnerHTML:{__html:(0,g.Z)(i.body,p.sF)}})))},y=a(69475),x=a(17165);const k=e=>{let{actualiteData:t}=e;const{0:a,1:i}=(0,l.useState)([]);return(0,l.useEffect)((()=>{i((0,y.Z)(t.allNodeActualites.edges))}),[t]),l.createElement(l.Fragment,null,l.createElement(N,{actusData:a}))},N=e=>{let{actusData:t}=e;const a=t.length>0?(0,x.U)(t):[],{0:i,1:n}=(0,l.useState)("");return l.createElement(l.Fragment,null,l.createElement(m,{className:"listActus-module--actus-filters--f9d9f"},l.createElement("div",null,l.createElement("h3",null,"Thématique : "),l.createElement("ul",null,a.map(((e,t)=>{let a=!1;return i===e&&(a=!0),l.createElement("li",{key:t}
1,l.createElement(u,{activeBool:a,activeText:"#fff",tabIndex:0,role:"button","aria-label":a?e+" - Supprimer le filtre actif":"Filtrer sur la taxonomie '"+e+"'",onClick:()=>{""===i||i!==e?n(e):i===e&&n("")},onKeyPress:t=>{"Enter"===t.key&&(""===i||i!==e?n(e):i===e&&n(""))}},e))}))))),l.createElement(A,{actusData:t,taxoChoisie:i}))},A=e=>{let{actusData:t,taxoChoisie:a}=e;const i=(0,l.useRef)(null),{0:n,1:o}=(0,l.useState)(6);let c,s,r=[];r=t.reduce(((e,t)=>{let l=[];return l=t.node.relationships.field_taxonomie_thematique.filter((e=>e.name===a)),l.length>0&&e.push(t),e}),[]),r=""===a?t:r,c=r.slice(0,n),s=r.slice(n);const d=()=>{const e=document.getElementById("actus-list"),t=e.children.length;o(n+6);const a=a=>{for(const l of a)if("childList"===l.type){e.children[t].querySelectorAll("a")[0].focus(),i.current&&i.current.disconnect();break}};"undefined"!=typeof document&&(i.current=new MutationObserver(a),e&&i.current.observe(e,{childList:!0,subtree:!0}))};return l.createElement(l.Fragment,null,l.createElement("section",null,l.createElement("div",null,l.createElement(C,{actusData:t,filteredData:c})),s.length>0&&l.createElement("div",{className:"voirPlus"},l.createElement("span",{role:"button",tabIndex:0,onClick:()=>d(),onKeyPress:e=>{"Enter"===e.key&&d()},className:"btn"},"Voir plus"))))},C=e=>{let{filteredData:t}=e;return 0===t.length?l.createElement("p",{className:o,style:{margin:"0 2rem"},role:"status","aria-live":"polite"},"Pas de contenu à afficher."):l.createElement("ul",{className:"listActus-module--actu-items-container--23a8d",id:"actus-list"},l.createElement("p",{className:o,role:"status","aria-live":"polite"},t.length+" actualité"+(1===t.length?"":"s")+" affichée"+(1===t.length?"":"s")),t.map((e=>{let{node:t,index:a}=e;return l.createElement("li",{key:a,className:"listActus-module--actu-item--5b885"},l.createElement(E,{actu:t}))})))};var q=e=>{let{data:t}=e;const a="Liste des actualités",o=t.allTaxonomyTermThematiques.edges.map((e=>{let{node:t}=e;return t.name})).join();return l.createElement(i.Z,{message:a},l.createElement(_.Z,{title:a,description:"Dans cette page, vous découvrez toutes les actualités, mais aussi l'ensemble des thématiques suivantes : "+o}),l.createElement(d,{childClassName:"listActus-module--list-actus--714a3",delay:150},l.createElement("section",{className:"listActus-module--zone-actualites-libre-haut--4dc5e"},l.createElement(n.Z,{zoneTaxoLibre:"zone_actualites_haut"})),l.createElement(r,{className:"listActus-module--list-actualites-container--345d7"},l.createElement(k,{actualiteData:t})),l.createElement("section",{className:"listActus-module--zone-actualites-libre-bas--72e15"},l.createElement(n.Z,{zoneTaxoLibre:"zone_actualites_bas"}))))}},17165:function(e,t,a){a.d(t,{U:function(){return i}});var l=a(4769);const i=e=>{const t=e.map((e=>{let{node:t}=e;return t.relationships.field_taxonomie_thematique.map((e=>e.name))})).reduce(((e,t)=>(e.push.apply(e,(0,l.Z)(t)),e)));return(0,l.Z)(new Set(t))}}}]);
2//# sourceMappingURL=component---theme-gatsby-theme-blank-src-templates-list-actualites-js-4133960ff32c5f54069c.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.