@20minutes/hela 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/css/articlePage-desktop.css +1 -1
- package/dist/css/articlePage-mobile.css +1 -1
- package/dist/css/global.css +1 -1
- package/dist/css/horoscopePage-desktop.css +2 -0
- package/dist/css/horoscopePage-mobile.css +2 -0
- package/dist/css/horoscopehomePage-desktop.css +2 -0
- package/dist/css/horoscopehomePage-mobile.css +2 -0
- package/dist/fonts/Oswald-Bold.woff +0 -0
- package/dist/fonts/Oswald-Bold.woff2 +0 -0
- package/dist/fonts/SourceSerifPro-Bold.woff +0 -0
- package/dist/fonts/SourceSerifPro-Bold.woff2 +0 -0
- package/dist/fonts/SourceSerifPro-Italic.woff +0 -0
- package/dist/fonts/SourceSerifPro-Italic.woff2 +0 -0
- package/dist/fonts/SourceSerifPro-Regular.woff +0 -0
- package/dist/fonts/SourceSerifPro-Regular.woff2 +0 -0
- package/dist/index.d.ts +141 -15
- package/dist/index.es.js +11480 -10971
- package/dist/index.umd.js +108 -105
- package/dist/js/datalayer.min.js +1 -1
- package/dist/js/dfp.min.js +1 -1
- package/dist/js/main.min.js +1 -1
- package/dist/js/mainCritical.min.js +1 -1
- package/package.json +17 -18
- package/dist/fonts/SourceSerifPro-It.woff +0 -0
- package/dist/fonts/SourceSerifPro-It.woff2 +0 -0
package/dist/js/datalayer.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t){"use strict";var l=Object.defineProperty,o=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,
|
|
1
|
+
(function(t){"use strict";var l=Object.defineProperty,o=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,i=(a,r,e)=>r in a?l(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,n=(a,r)=>{for(var e in r||(r={}))d.call(r,e)&&i(a,e,r[e]);if(o)for(var e of o(r))u.call(r,e)&&i(a,e,r[e]);return a};const y=()=>{var a;return{page_uri:"/",page_type:((a=window.datalayer)==null?void 0:a.pageType)||"divers"}},p=()=>({darkmode:"0"}),v=()=>{var a,r;return{signature:((a=window.datalayer)==null?void 0:a.signature)||void 0,nbParagraphs:((r=window.datalayer)==null?void 0:r.nbParagraphs)||void 0}},c=()=>{const a=y(),r=p(),e=v();window.datalayer=n(n(n({},a),r),e)};return t.initDatalayer=c,Object.defineProperty(t,"__esModule",{value:!0}),t})({});
|
package/dist/js/dfp.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r){"use strict";var C=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(C||{}),p=(e=>(e.HEADER_AD='[[1,1], "fluid"]',e.BAN_ATF="[[1,1], [728,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",e.PAVE_ATF="[[1,1], [300,250], [300,600], [600,250], [600,600], [770,250]]",e.BAN_BTF="[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",e.ARTICLE_BTF="[[1,1], [300,168], [300,250], [320,50], [320,100], [320,480]]",e))(p||{}),d=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e))(d||{}),l=(e=>(e.MISC="divers",e.HOME="home",e.LOCAL="local",e.PLANET="plan\xE8te",e))(l||{}),E=(e=>(e.PAGETYPE="pageType",e.TAGS="tags",e))(E||{}),S=(e=>(e.COMMON_HEADER="common/header",e.COMMON_FOOTER="common/footer",e.COMMON_NEWSLETTER="common/newsletter",e))(S||{}),m=(e=>(e.RUBRIC_CATEGORY_CARDS="rubric/category-cards",e.RUBRIC_NEWS_CARDS="rubric/news-cards",e.RUBRIC_MOST_READ_ARTICLES="rubric/most-read-articles",e.RUBRIC_PARTNER_CARDS="rubric/partner-cards",e))(m||{}),T=(e=>(e.ARTICLE_BREADCRUMB="article/breadcrumb",e.ARTICLE_OVERVIEW_BAR="article/overview-bar",e.ARTICLE_HEADER="article/article-header",e.ARTICLE_IMAGE_COVER="article/article-image-cover",e.ARTICLE_SOCIAL_BAR="article/social-bar",e.ARTICLE_SUMMARY="article/article-summary",e.ARTICLE_CONTENT="article/article-content",e.ARTICLE_TAG_BAR="article/tag-bar",e.ARTICLE_SIGNATURE="article/signature",e.ARTICLE_SCROLL_PROGRESS_BAR="article/scroll-progress-bar",e))(T||{}),h=(e=>(e.HOROSCOPE_BREADCRUMB="horoscope/breadcrumb",e.HOROSCOPE_HEADER_PAGE="horoscope/header-page",e.HOROSCOPE_HEADER_BANNER="horoscope/header-banner",e.HOROSCOPE_HOROSCOPE_CONTENT="horoscope/horoscope-content",e.HOROSCOPE_LINK="horoscope/link",e.HOROSCOPE_HOROSCOPE_TILES="horoscope/horoscope-tiles",e.HOROSCOPE_HOROSCOPE_LINK_NEXT_TYPE="horoscope/horoscope-link-next-type",e))(h||{}),f=(e=>(e.HOROSCOPE_HOMEPAGE_BREADCRUMB="horoscopeHome/breadcrumb",e.HOROSCOPE_HOMEPAGE_HEADER_PAGE="horoscopeHome/header-page",e.HOROSCOPE_HOMEPAGE_HOROSCOPE_TILES="horoscopeHome/horoscope-tiles",e.HOROSCOPE_HOMEPAGE_LINK_NEXT_TYPE="horoscopeHome/horoscope-link-next-type",e))(f||{});const O=e=>{var t,o,a,n;switch(e){case"pageType":return Object.values(d).includes((t=window.datalayer)==null?void 0:t.page_type)?(o=window.datalayer.page_type)==null?void 0:o.toLowerCase():d.MISC;case"tags":return Object.values(l).includes((a=window.datalayer)==null?void 0:a.tags)?(n=window.datalayer.tags)==null?void 0:n.toLowerCase():l.MISC}return window.datalayer[e]},w=()=>{window.dfp=window.dfp||{},window.dfp.targeting=window.dfp.targeting||{},Object.values(E).forEach(e=>{window.dfp.targeting[e]=O(e)})},I=e=>{var t;const o=e instanceof Array?e:[e];window.dfp.slots=((t=window.dfp)==null?void 0:t.slots)||[],window.dfp.slots=[...window.dfp.slots,...o]},b=e=>{window.dfp.slotsReady=!1;const t=document.querySelectorAll("div[data-dfp-path]"),o=[];googletag.cmd.push(()=>{t.forEach(a=>{const n=a.getAttribute("data-dfp-name"),c=a.getAttribute("data-dfp-path"),_=a.getAttribute("id"),g=n&&JSON.parse(p[n.toUpperCase()])||null;if(_&&n&&c&&g&&googletag){const s=googletag.defineSlot([c,n].join("/"),g,_);if(!s)return;s.addService(googletag.pubads()),o.push({slotElementId:s.getSlotElementId(),path:c,sizes:JSON.stringify(g)}),Object.entries(e).map(([M,B])=>s.setTargeting(M,B))}})}),window.dfp.slotsReady=!0,I(o)};let u=!1,A=0;const y=1500,i="renderAd",L=()=>u||googletag&&googletag.pubadsReady&&window.dfp.slotsReady,R=e=>{googletag&&googletag.cmd.push(()=>{const t={};googletag.pubads().getSlots().forEach(a=>{t[a.getSlotElementId()]=a});const o=[];e.forEach(a=>{t[a]&&o.push(t[a])}),o.length&&googletag.pubads().refresh(o)})},H=()=>{document.addEventListener(i,e=>{if(!e.target)return;const t=e;t&&t.target.closest("[data-dfp-name]")&&t.detail.length&&R([t.detail[0].id])},!0)},v=()=>{const e=document.body.querySelectorAll('div[data-dfp-name][data-delayed="true"]');Array.prototype.forEach.call(e,t=>{t.addEventListener(t.getAttribute("id"),function o(){t.dispatchEvent(new CustomEvent(i,{detail:[{id:t.getAttribute("id")}]})),t.removeEventListener(i,o)})})},N=()=>{const e=[],t=document.querySelectorAll('div[data-dfp-name][data-delayed="false"]');t.length>0&&Array.prototype.forEach.call(t,o=>{e.push(o.getAttribute("id"))}),R(e)},P=()=>{const e=setInterval(()=>{if(!L&&A<y){A+=100;return}clearInterval(e),u=!0,N(),H(),v()},100)},D=()=>{googletag.cmd.push(()=>{googletag.pubads().setTargeting("lang","fr"),googletag.pubads().setTargeting("dn",window.location.hostname);try{const t=window.location.href.split("?")[1];t&&t.split("&").forEach(o=>{const a=o.split("=");a[0]==="20minutest"&&googletag.pubads().setTargeting(a[0],a[1])})}catch{}googletag.pubads().enableSingleRequest(),googletag.pubads().disableInitialLoad(),googletag.enableServices();const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0);e>=1400?googletag.pubads().setTargeting("screen",["1400","1000"]):e>=1e3&&googletag.pubads().setTargeting("screen","1000")})};return r.callDfp=P,r.dfpDatalayerAdapter=O,r.setAdSlotsKeyValues=w,r.setDfpConfig=D,r.setDfpSlots=b,Object.defineProperty(r,"__esModule",{value:!0}),r})({});
|
package/dist/js/main.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const
|
|
1
|
+
(function(){"use strict";const u=(t,e)=>{const r=t==="dark";e.setAttribute("aria-checked",String(r));const n=e.querySelector("span[aria-hidden]");n&&(n.setAttribute("aria-hidden",String(r)),n.innerHTML=r?"on":"off")},k=(t=document.querySelector(".js-switch-dark-mode"))=>{const e=localStorage.getItem("theme")||"light";e&&t&&(document.documentElement.dataset.theme=e,u(e,t))},O=(t=document.querySelector(".js-switch-dark-mode"))=>{t&&t.addEventListener("click",()=>{const e=document.documentElement.dataset.theme,r=!e||e==="light"?"dark":"light";document.documentElement.dataset.theme=r,localStorage.setItem("theme",r),u(r,t)})},$=(t,e)=>{e.preventDefault();const r=e.target,n=t.querySelectorAll('[role="tab"]'),a=t.querySelectorAll('[role="tabpanel"]'),o=r.getAttribute("aria-controls"),s=Object.values(a).find(l=>l.id===o);n.forEach(l=>{l.setAttribute("aria-selected","false")}),a.forEach(l=>{l.setAttribute("aria-hidden","true")}),r.setAttribute("aria-selected","true"),s&&s.removeAttribute("aria-hidden")},m=t=>t.code==="ArrowLeft"||t.keyCode===39,p=t=>t.code==="ArrowRight"||t.keyCode===37,j=(t=document.querySelector(".js-tabs"))=>{if(t){const e=t.querySelectorAll('[role="tab"]');e.forEach(n=>{n.addEventListener("click",$.bind(!1,t))});const r=t.querySelector('[role="tablist"]');if(r&&e.length>0){let n=0;r.addEventListener("keydown",a=>{a instanceof KeyboardEvent&&(m(a)||p(a))&&(e[n].setAttribute("tabindex","-1"),m(a)?(n+=1,n>=e.length&&(n=0)):p(a)&&(n-=1,n<0&&(n=e.length-1)),e[n].setAttribute("tabindex","0"),e[n].focus())})}}};let g=!1,w=0;const T=1500,d="renderAd",L=()=>g||googletag&&googletag.pubadsReady&&window.dfp.slotsReady,h=t=>{googletag&&googletag.cmd.push(()=>{const e={};googletag.pubads().getSlots().forEach(n=>{e[n.getSlotElementId()]=n});const r=[];t.forEach(n=>{e[n]&&r.push(e[n])}),r.length&&googletag.pubads().refresh(r)})},q=()=>{document.addEventListener(d,t=>{if(!t.target)return;const e=t;e&&e.target.closest("[data-dfp-name]")&&e.detail.length&&h([e.detail[0].id])},!0)},I=()=>{const t=document.body.querySelectorAll('div[data-dfp-name][data-delayed="true"]');Array.prototype.forEach.call(t,e=>{e.addEventListener(e.getAttribute("id"),function r(){e.dispatchEvent(new CustomEvent(d,{detail:[{id:e.getAttribute("id")}]})),e.removeEventListener(d,r)})})},N=()=>{const t=[],e=document.querySelectorAll('div[data-dfp-name][data-delayed="false"]');e.length>0&&Array.prototype.forEach.call(e,r=>{t.push(r.getAttribute("id"))}),h(t)},C=()=>{const t=setInterval(()=>{if(!L&&w<T){w+=100;return}clearInterval(t),g=!0,N(),q(),I()},100)},P=t=>{const e=document.cookie.split(";").filter(r=>r.indexOf(t)!==-1)[0];return e?e.split("=")[1]:"{}"},F=(t,e=100)=>{const r=t.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,a=Math.max(document.documentElement.clientHeight,window.innerHeight||0),o=n+a,s=r.top+n;return o>s-e},D=()=>document.body.dataset.device,y=()=>{const t=new URLSearchParams(window.location.search);return Object.fromEntries(t.entries())};function B(t){let e=t;const r="\xE3\xE0\xE1\xE4\xE2\u1EBD\xE8\xE9\xEB\xEA\xEC\xED\xEF\xEE\xF5\xF2\xF3\xF6\xF4\xF9\xFA\xFC\xFB\xF1\xE7\xB7/_,:;",n="aaaaaeeeeeiiiiooooouuuunc------";for(let a=0;a<r.length;a+=1)e=t.replace(new RegExp(r.charAt(a),"g"),n.charAt(a));return e}const c=t=>{let e=t.toLowerCase().replace(/[\s-]+/g,"_");return e=B(e),e.replace(/[^\w-]+/g,"")};let i=[],b;const R=(t,e)=>{let r=!1;return()=>{r||(t(),r=!0,b=setTimeout(()=>{r=!1},e))}},V=t=>t.event&&F(t.elem,Number(t.distance))?(t.elem.dispatchEvent(new Event(t.event)),t.elem.dataset.lazyLoaded="true",!1):!0,f=()=>{R(()=>{i=i.filter(V),i.length<=0&&(clearTimeout(b),window.removeEventListener("scroll",f))},50)()},H=()=>{i.length<=0||window.addEventListener("scroll",f)},M=t=>{i.push(t),H()},U=t=>{t.forEach(e=>{const r={elem:e,event:e.getAttribute("id"),distance:e.dataset.distanceVisible};M(r)})},z=t=>{const e=document.documentElement.scrollTop;let r=document.documentElement.scrollHeight-document.documentElement.clientHeight;const n=t&&document.querySelector(".js-limit-scroll-progress-bar");n&&(r=n.scrollHeight-document.documentElement.clientHeight+(window.pageYOffset+n.getBoundingClientRect().top));const a=Math.round(e/r*100),o=document.querySelector(".c-progress__bar");o&&(o.style.width=`${a}%`,a>=100&&(o.style.width="100%"))},Y=(t=document.querySelector(".c-progress"),e=!1)=>{t&&window.addEventListener("scroll",z.bind(!1,e))},J=(t,e,r=()=>{})=>{performance.mark(`20mn:${t}:Start`);const n=document.getElementsByTagName("script")[0],a=document.createElement("script");a.async=!0,a.src=e,a.onload=()=>{r(),performance.mark(`20mn:${t}:End`)},n&&n.parentNode&&n.parentNode.insertBefore(a,n)};var K=Object.defineProperty,E=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,v=(t,e,r)=>e in t?K(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_=(t,e)=>{for(var r in e||(e={}))Q.call(e,r)&&v(t,r,e[r]);if(E)for(var r of E(e))G.call(e,r)&&v(t,r,e[r]);return t};const W=()=>{const t=window.datalayer,e={};if(e["b:user_darkmode"]=t.darkmode==="1",e["b:user_status"]=t.user_status==="Connecte",e["b:user_status"]){const r=P("20mnUserDataLayer"),n=r?JSON.parse(decodeURIComponent(r)):null;n&&(e["s:user_id"]=String(n.i),Number.isNaN(n.d)||(e["n:user_a"]=parseInt(n.d,10)),Number.isNaN(n.l)||(e["n:user_zip"]=parseInt(n.l,10)),Number.isNaN(n.g)||(e["n:user_g"]=parseInt(n.g,10)))}return e},X=()=>{var t,e,r;const n={},a=y();return("utm_source"in a||"utm_campaign"in a||"utm_medium"in a)&&("utm_source"in a||(n.utm_source=(t=a.utm_medium)!=null?t:a.utm_campaign),"utm_campaign"in a||(n.utm_campaign=(e=a.utm_source)!=null?e:a.utm_medium),"utm_medium"in a||(n.utm_medium=(r=a.utm_source)!=null?r:a.utm_campaign)),n},Z=()=>{var t;const e=window.datalayer,r={};r["b:user_adblock"]=e.adblock==="1",r["s:page_url_raw"]=window.location.href,e.source_type&&(r["s:content_source"]=e.source_type),e.referrer&&(r["s:misc_referrer"]=e.referrer),r["s:page_type"]=e.page_type||"other";const n=document.querySelector("link[rel='canonical']");if(n&&(r["s:page_canonical"]=(t=n.getAttribute("href"))!=null?t:""),e.chapter4&&(r["s:chapter4"]=e.chapter4),e.page_uri==="/search"){const a=y();r["s:misc_search"]=a.q||""}return _(_({},r),W())};var ee=Object.defineProperty,te=Object.defineProperties,re=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,S=(t,e,r)=>e in t?ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))ne.call(e,r)&&S(t,r,e[r]);if(A)for(var r of A(e))ae.call(e,r)&&S(t,r,e[r]);return t},oe=(t,e)=>te(t,re(e));const ce=()=>{J("ATInternet","https://www.20minutes.fr/js/script-at.js")},ie=()=>{window.ATInternet={onTrackerLoad:()=>{var t,e,r;if(window.ATInternet.Tracker){const n=new window.ATInternet.Tracker.Tag;n.privacy.getVisitorMode()===null&&n.privacy.setVisitorMode("cnil","exempt");const a=window.datalayer.article_section?c(window.datalayer.article_section):"";n.page.set({name:window.datalayer.libelle?c(window.datalayer.libelle):"",chapter1:window.datalayer.chapter1?c(window.datalayer.chapter1):a,chapter2:window.datalayer.chapter2?c(window.datalayer.chapter2):"",chapter3:window.datalayer.chapter3?c(window.datalayer.chapter3):"",customObject:{device:D()==="desktop"?"desktop":"smartphone"}}),n.customVars.set({site:{2:(t=window.datalayer.content_id)!=null?t:""}}),n.setProps(oe(x(x({},Z()),X()),{"b:pageview_with_consent":n.privacy.getVisitorMode().name==="optin","s:site_level2":window.location.hostname}),!0),n.identifiedVisitor.set({id:(e=window.datalayer.ac)!=null?e:"",category:(r=window.datalayer.an)!=null?r:""}),n.dispatch()}}}},le=()=>{ce(),ie()};k(),O(),j(),C(),U(document.querySelectorAll('[data-delayed="true"]')),Y(),le()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";var
|
|
1
|
+
(function(){"use strict";var R=Object.defineProperty,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,_=(e,o,t)=>o in e?R(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,r=(e,o)=>{for(var t in o||(o={}))h.call(o,t)&&_(e,t,o[t]);if(p)for(var t of p(o))A.call(o,t)&&_(e,t,o[t]);return e};const f=()=>{var e;return{page_uri:"/",page_type:((e=window.datalayer)==null?void 0:e.pageType)||"divers"}},I=()=>({darkmode:"0"}),b=()=>{var e,o;return{signature:((e=window.datalayer)==null?void 0:e.signature)||void 0,nbParagraphs:((o=window.datalayer)==null?void 0:o.nbParagraphs)||void 0}},y=()=>{const e=f(),o=I(),t=b();window.datalayer=r(r(r({},e),o),t)};var L=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(L||{}),m=(e=>(e.HEADER_AD='[[1,1], "fluid"]',e.BAN_ATF="[[1,1], [728,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",e.PAVE_ATF="[[1,1], [300,250], [300,600], [600,250], [600,600], [770,250]]",e.BAN_BTF="[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",e.ARTICLE_BTF="[[1,1], [300,168], [300,250], [320,50], [320,100], [320,480]]",e))(m||{}),c=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e))(c||{}),d=(e=>(e.MISC="divers",e.HOME="home",e.LOCAL="local",e.PLANET="plan\xE8te",e))(d||{}),u=(e=>(e.PAGETYPE="pageType",e.TAGS="tags",e))(u||{}),P=(e=>(e.COMMON_HEADER="common/header",e.COMMON_FOOTER="common/footer",e.COMMON_NEWSLETTER="common/newsletter",e))(P||{}),H=(e=>(e.RUBRIC_CATEGORY_CARDS="rubric/category-cards",e.RUBRIC_NEWS_CARDS="rubric/news-cards",e.RUBRIC_MOST_READ_ARTICLES="rubric/most-read-articles",e.RUBRIC_PARTNER_CARDS="rubric/partner-cards",e))(H||{}),N=(e=>(e.ARTICLE_BREADCRUMB="article/breadcrumb",e.ARTICLE_OVERVIEW_BAR="article/overview-bar",e.ARTICLE_HEADER="article/article-header",e.ARTICLE_IMAGE_COVER="article/article-image-cover",e.ARTICLE_SOCIAL_BAR="article/social-bar",e.ARTICLE_SUMMARY="article/article-summary",e.ARTICLE_CONTENT="article/article-content",e.ARTICLE_TAG_BAR="article/tag-bar",e.ARTICLE_SIGNATURE="article/signature",e.ARTICLE_SCROLL_PROGRESS_BAR="article/scroll-progress-bar",e))(N||{}),D=(e=>(e.HOROSCOPE_BREADCRUMB="horoscope/breadcrumb",e.HOROSCOPE_HEADER_PAGE="horoscope/header-page",e.HOROSCOPE_HEADER_BANNER="horoscope/header-banner",e.HOROSCOPE_HOROSCOPE_CONTENT="horoscope/horoscope-content",e.HOROSCOPE_LINK="horoscope/link",e.HOROSCOPE_HOROSCOPE_TILES="horoscope/horoscope-tiles",e.HOROSCOPE_HOROSCOPE_LINK_NEXT_TYPE="horoscope/horoscope-link-next-type",e))(D||{}),k=(e=>(e.HOROSCOPE_HOMEPAGE_BREADCRUMB="horoscopeHome/breadcrumb",e.HOROSCOPE_HOMEPAGE_HEADER_PAGE="horoscopeHome/header-page",e.HOROSCOPE_HOMEPAGE_HOROSCOPE_TILES="horoscopeHome/horoscope-tiles",e.HOROSCOPE_HOMEPAGE_LINK_NEXT_TYPE="horoscopeHome/horoscope-link-next-type",e))(k||{});const M=e=>{var o,t,n,i;switch(e){case"pageType":return Object.values(c).includes((o=window.datalayer)==null?void 0:o.page_type)?(t=window.datalayer.page_type)==null?void 0:t.toLowerCase():c.MISC;case"tags":return Object.values(d).includes((n=window.datalayer)==null?void 0:n.tags)?(i=window.datalayer.tags)==null?void 0:i.toLowerCase():d.MISC}return window.datalayer[e]},B=()=>{window.dfp=window.dfp||{},window.dfp.targeting=window.dfp.targeting||{},Object.values(u).forEach(e=>{window.dfp.targeting[e]=M(e)})},G=e=>{var o;const t=e instanceof Array?e:[e];window.dfp.slots=((o=window.dfp)==null?void 0:o.slots)||[],window.dfp.slots=[...window.dfp.slots,...t]},U=e=>{window.dfp.slotsReady=!1;const o=document.querySelectorAll("div[data-dfp-path]"),t=[];googletag.cmd.push(()=>{o.forEach(n=>{const i=n.getAttribute("data-dfp-name"),l=n.getAttribute("data-dfp-path"),v=n.getAttribute("id"),g=i&&JSON.parse(m[i.toUpperCase()])||null;if(v&&i&&l&&g&&googletag){const s=googletag.defineSlot([l,i].join("/"),g,v);if(!s)return;s.addService(googletag.pubads()),t.push({slotElementId:s.getSlotElementId(),path:l,sizes:JSON.stringify(g)}),Object.entries(e).map(([W,z])=>s.setTargeting(W,z))}})}),window.dfp.slotsReady=!0,G(t)},j=()=>{googletag.cmd.push(()=>{googletag.pubads().setTargeting("lang","fr"),googletag.pubads().setTargeting("dn",window.location.hostname);try{const o=window.location.href.split("?")[1];o&&o.split("&").forEach(t=>{const n=t.split("=");n[0]==="20minutest"&&googletag.pubads().setTargeting(n[0],n[1])})}catch{}googletag.pubads().enableSingleRequest(),googletag.pubads().disableInitialLoad(),googletag.enableServices();const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0);e>=1400?googletag.pubads().setTargeting("screen",["1400","1000"]):e>=1e3&&googletag.pubads().setTargeting("screen","1000")})},x=e=>{const o=document.cookie.split(";").filter(t=>t.indexOf(e)!==-1)[0];return o?o.split("=")[1]:"{}"},a=(e,o="")=>{const t=[`${e}=`,"expires=Thu, 1 Jan 1970 00:00:01 UTC","path=/"];o&&t.push(`domain=${o}`),document.cookie=t.join("; ")},w=e=>{document.cookie.split(";").map(o=>o.split("=")[0].trim()).filter(o=>e.indexOf(o)===-1).forEach(o=>{const{hostname:t}=window.location;a(o),a(o,t.substring(t.indexOf(".")+1)),a(o,t.substring(t.indexOf("."))),a(o,`.${t}`)})},E=e=>{for(let o=0;o<sessionStorage.length;o+=1){const t=sessionStorage.key(o);t&&e.indexOf(t)===-1&&sessionStorage.removeItem(t)}},O=e=>{for(let o=0;o<localStorage.length;o+=1){const t=localStorage.key(o);t&&e.indexOf(t)===-1&&localStorage.removeItem(t)}},S=["20mnToken","20mnUserDataLayer","20mnTutorial","20mnUserInfo","20mnUserSession","_vfa","_vfb","_vfz","atauthority","atid","atidvisitor","atidx","atuserid","didomi_token","euconsent-v2","_pbjs_userid_consent_data","osano_consentmanager","osano_consentmanager_expdate","osano_consentmanager_uuid","SESSIDSF","SESSIDSFRM","TCPID","TSTD","ei_client_id","_biz_pendingA","_biz_flagsA","_biz_uid","_biz_nA","ajs_group_id","ajs_user_id","ajs_anonymous_id","TSNGUID","_mkto_trk","JSESSIONID","staging-login_idle_session_timeout","login_service_login_newrelic_com_tokens","login_idle_session_timeout","lang","auth_expiration_timestamp","sticky-scorecast-business-chat","__utna","__utnv","auth_token","PHPSESSID","sticky-scorecast-business-app","sticky-scorecast-prod-app","realm"],C=["_vf_sid","consent_validity_date","20mn-articlesSaved","20mn-font","closedInfo","20mn-known-user","20mn-block-links","20mnBreakingNewsBanner","20mnAppBanner","20mn-visits-content","20minutes-font"],T=["vfThirdpartyCookiesEnabled","com.batch.sessionId","loadIntrasticial"],V=()=>{window.didomiOnReady.push(()=>{let e=new Date;const o=e.getTimezoneOffset();e=new Date(e.getTime()-o*60*1e3);const t=e.toISOString().split("T")[0],n=localStorage.getItem("consent_validity_date");n&&t>n&&(window.Didomi.reset(),localStorage.removeItem("consent_validity_date"),window.disapproveDidomiGTMEvents=!0,w(S),O(C),E(T),window.Didomi.notice.show())})},K=()=>{window.didomiEventListeners.push({event:"notice.clickagree",listener:()=>{console.log("notice.clickagree")}}),window.didomiEventListeners.push({event:"notice.clickmoreinfo",listener:()=>{console.log("notice.clickmoreinfo")}}),window.didomiEventListeners.push({event:"notice.clickdisagree",listener:()=>{console.log("notice.clickdisagree")}})},F=()=>{window.cmpVariables={consentEventsCount:0},window.didomiEventListeners.push({event:"consent.changed",listener:()=>{const e=x("euconsent-v2"),o=window.cmpVariables.consentEventsCount>0?!0:!!e,t=!window.Didomi.getUserConsentStatusForPurpose("Cookies"),n=window.sessionStorage.getItem("cmpModal");o&&!n&&(t&&(w(S),O(C),E(T)),setTimeout(()=>{window.location.reload()})),n&&window.sessionStorage.removeItem("cmpModal"),window.cmpVariables.consentEventsCount+=1}})};y(),V(),F(),K(),j(),B(),U(window.dfp.targeting)})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@20minutes/hela",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -18,19 +18,20 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"prepare": "husky install && yarn generate:svg-sprite",
|
|
20
20
|
"generate:svg-sprite": "svg-sprite --symbol-dest sprite --symbol-sprite sprite.svg --symbol --dest=src/assets src/assets/svg/**/*.svg && svgr --ignore-existing --no-svgo --typescript -- src/assets/sprite/sprite.svg > src/components/atoms/Icon/SvgSprite.tsx",
|
|
21
|
-
"
|
|
21
|
+
"compress:fonts": "ts-node scripts/compress-fonts.ts",
|
|
22
|
+
"build:library": "ts-node scripts/buildLibrary",
|
|
22
23
|
"storybook": "start-storybook -p 6006",
|
|
23
24
|
"build:storybook": "build-storybook",
|
|
24
25
|
"lint:scss": "stylelint 'src/**/*.scss'",
|
|
25
|
-
"lint:ts": "eslint src scripts/**/*.ts
|
|
26
|
+
"lint:ts": "eslint src scripts/**/*.ts rollup.config.ts vite.config.ts tests/**/*.ts .storybook/",
|
|
26
27
|
"upload:artifacts": "ts-node scripts/uploadArtifacts.ts",
|
|
27
28
|
"test": "NODE_ENV=test jest --coverage false --silent"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@20minutes/eslint-config": "^1.2.
|
|
31
|
-
"@babel/core": "^7.19.
|
|
31
|
+
"@20minutes/eslint-config": "^1.2.4",
|
|
32
|
+
"@babel/core": "^7.19.3",
|
|
32
33
|
"@babel/eslint-parser": "^7.19.1",
|
|
33
|
-
"@babel/plugin-transform-typescript": "^7.19.
|
|
34
|
+
"@babel/plugin-transform-typescript": "^7.19.3",
|
|
34
35
|
"@csstools/postcss-sass": "^5.0.1",
|
|
35
36
|
"@storybook/addon-essentials": "^6.5.12",
|
|
36
37
|
"@storybook/addon-links": "^6.5.12",
|
|
@@ -39,22 +40,21 @@
|
|
|
39
40
|
"@svgr/cli": "^6.3.1",
|
|
40
41
|
"@types/draft-convert": "^2.1.4",
|
|
41
42
|
"@types/draft-js": "^0.11.9",
|
|
42
|
-
"@types/googletag": "^2.2.
|
|
43
|
-
"@types/gulp": "^4.0.9",
|
|
43
|
+
"@types/googletag": "^2.2.5",
|
|
44
44
|
"@types/jest": "^29.0.3",
|
|
45
45
|
"@types/merge-stream": "^1.1.2",
|
|
46
|
-
"@types/node": "^18.7.
|
|
47
|
-
"@types/react": "^18.0.
|
|
46
|
+
"@types/node": "^18.7.23",
|
|
47
|
+
"@types/react": "^18.0.21",
|
|
48
48
|
"@types/react-dom": "^18.0.6",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^5.38.
|
|
50
|
-
"@typescript-eslint/parser": "^5.38.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
50
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
51
51
|
"@vitejs/plugin-react": "^2.1.0",
|
|
52
52
|
"autoprefixer": "^10.4.12",
|
|
53
53
|
"babel-loader": "^8.2.5",
|
|
54
54
|
"babel-preset-env": "^1.7.0",
|
|
55
55
|
"babel-preset-react": "^6.24.1",
|
|
56
56
|
"cssnano": "^5.1.13",
|
|
57
|
-
"eslint": "^8.
|
|
57
|
+
"eslint": "^8.24.0",
|
|
58
58
|
"eslint-config-airbnb": "^19.0.4",
|
|
59
59
|
"eslint-config-prettier": "^8.5.0",
|
|
60
60
|
"eslint-import-resolver-typescript": "^3.5.1",
|
|
@@ -65,15 +65,14 @@
|
|
|
65
65
|
"eslint-plugin-react": "^7.31.8",
|
|
66
66
|
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
67
67
|
"glob": "^8.0.3",
|
|
68
|
-
"gulp": "^4.0.2",
|
|
69
|
-
"gulp-purgecss": "^4.1.3",
|
|
70
|
-
"gulp-shell": "^0.8.0",
|
|
71
68
|
"husky": "^8.0.1",
|
|
72
69
|
"jest": "^29.0.3",
|
|
73
70
|
"merge-stream": "^2.0.0",
|
|
74
71
|
"postcss": "^8.4.16",
|
|
75
72
|
"postcss-inline-svg": "^5.0.0",
|
|
76
73
|
"prettier": "^2.7.1",
|
|
74
|
+
"purgecss": "^5.0.0",
|
|
75
|
+
"rollup": "^2.79.1",
|
|
77
76
|
"rollup-plugin-dts": "^4.2.2",
|
|
78
77
|
"rollup-plugin-esbuild": "^4.10.1",
|
|
79
78
|
"rollup-plugin-scss": "^3.0.0",
|
|
@@ -82,9 +81,9 @@
|
|
|
82
81
|
"stylelint": "^14.12.1",
|
|
83
82
|
"stylelint-config-standard-scss": "^5.0.0",
|
|
84
83
|
"svg-sprite": "next",
|
|
85
|
-
"ts-jest": "^29.0.
|
|
84
|
+
"ts-jest": "^29.0.2",
|
|
86
85
|
"ts-node": "^10.9.1",
|
|
87
|
-
"typescript": "^4.8.
|
|
86
|
+
"typescript": "^4.8.4",
|
|
88
87
|
"vite": "^3.1.3"
|
|
89
88
|
},
|
|
90
89
|
"engines": {
|
|
Binary file
|
|
Binary file
|