@20minutes/tyr 2.25.2 → 2.25.3
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/dist/index.es.js +11957 -11706
- package/dist/index.umd.js +93 -93
- package/dist/js/edgee.min.js +2 -0
- package/dist/js/main.min.js +6 -6
- package/dist/js/piano.min.js +1 -1
- package/dist/src/assets/datalayer/types/DatalayerInfoType.d.ts +2 -0
- package/dist/src/assets/main/trackLinks.d.ts +1 -0
- package/dist/src/assets/thirdParties/edgee/dataLayer.d.ts +3 -0
- package/dist/src/assets/thirdParties/edgee/dataLayerHelpers.d.ts +33 -0
- package/dist/src/assets/thirdParties/edgee/edgeeUserTracking.d.ts +2 -0
- package/dist/src/assets/thirdParties/edgee/index.d.ts +1 -0
- package/dist/src/assets/thirdParties/piano/piano.d.ts +1 -3
- package/dist/src/assets/thirdParties/piano/properties.d.ts +5 -0
- package/dist/src/assets/thirdParties/tracking/events.d.ts +3 -0
- package/dist/src/assets/thirdParties/tracking/index.d.ts +2 -0
- package/dist/src/assets/thirdParties/tracking/user.d.ts +2 -0
- package/dist/src/components/organisms/HomePage/GamesCarousel/GamesCarousel.stories.d.ts +2 -2
- package/dist/src/components/organisms/TvPages/ShowsReplaysCarousel/ShowsReplaysCarousel.stories.d.ts +2 -2
- package/dist/src/managers/LivePageManager.d.ts +1 -1
- package/dist/src/managers/PageManager.d.ts +0 -2
- package/dist/src/templates/ContentTemplate/ContentTemplate.d.ts +0 -1
- package/dist/src/templates/ContentTemplate/ContentTemplate.stories.d.ts +0 -1
- package/dist/src/types/ThirdParties/Helpers.d.ts +1 -0
- package/dist/src/types/ThirdParties/Tracking/Edgee.d.ts +41 -0
- package/dist/src/types/ThirdParties/{Piano.d.ts → Tracking/Piano.d.ts} +1 -0
- package/dist/src/types/ThirdParties/Tracking/index.d.ts +3 -0
- package/dist/src/types/ThirdParties/index.d.ts +1 -1
- package/dist/src/types/Window.d.ts +10 -3
- package/package.json +1 -1
package/dist/js/piano.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";const e=(e,n)=>{let t=e.toLowerCase().replace(/[\s-]+/g,"-");return t=(e=>{let n=e;const t="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)n=n.replace(new RegExp(t.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return n})(t),t.replace(/[^\w-]+/g,"").replace(/-*$/g,"")},n=()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e.entries())},t=n=>{const t={click:e(n.name),click_chapter1:n?.chapter1||null,click_chapter2:n?.chapter2||null,click_chapter3:n?.chapter3||null},a=`click.${n?.type??"navigation"}`;window.pa?(n.customProps&&Object.keys(n.customProps).length>0&&window.pa.setProperties(n.customProps,{persistent:!1,events:[a]}),window.pa.sendEvent(a,t)):window._paq&&(n.customProps&&Object.keys(n.customProps).length>0&&window._paq.push(["setProperties",n.customProps,{persistent:!1,events:[a]}]),window._paq.push(["sendEvent",a,t]))},a=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}])},o=()=>document.querySelectorAll(".c-content > p").length,r=()=>[...document.querySelectorAll(".c-content > p")].reduce((e,n)=>e+n.innerHTML.length,0),c=()=>{const e={};if(e["b:user_darkmode"]="dark"===document.documentElement.getAttribute("data-theme"),e["b:user_status"]=!!document.cookie.match("(^|;)\\s*20mnUserInfo\\s*=\\s*([^;]+)"),e["b:user_status"]){const n=(e=>{const n=document.cookie.split(";").filter(n=>-1!==n.indexOf(e))[0];return n?n.split("=")[1]:"{}"})("20mnUserDataLayer"),t=n?JSON.parse(decodeURIComponent(n)):null;t&&(e["s:user_id"]=String(t.i),Number.isNaN(t.d)||(e["n:user_a"]=Number(t.d)),Number.isNaN(t.l)||(e["n:user_zip"]=Number(t.l)),Number.isNaN(t.g)||(e["n:user_g"]=Number(t.g)))}return e},i=()=>{const e={},t=n();return("utm_source"in t||"utm_campaign"in t||"utm_medium"in t)&&("utm_source"in t||(e.utm_source=t.utm_medium??t.utm_campaign),"utm_campaign"in t||(e.utm_campaign=t.utm_source??t.utm_medium),"utm_medium"in t||(e.utm_medium=t.utm_source??t.utm_campaign)),e},s=()=>{const n=window.datalayerInfo,t={};return n.breadcrumb?.forEach((n,t)=>{let a=e(n);"diaporamas"===a&&(a="diaporama"),"actualite"===a&&(a="actu-generale"),window.PianoPageInfo[`chapter${t+1}`]=a}),Number.isNaN(Number(n.contentId))||(t["n:content_id"]=Number(n.contentId)),t.content_type=n.pageName??"other",t["s:page_type"]="content",t["d:content_published_date"]=n.modificationDate?new Date(n.modificationDate).toISOString():"",t["d:content_modified_date"]=n.publicationDate?new Date(n.publicationDate).toISOString():"",Number.isNaN(Number(n.journalist?.id))||(t["n:content_id_journaliste"]=Number(n.journalist?.id)),t["s:content_tags"]=n.tagsSlug??"",t["s:content_signature"]=e(n.signature??""),t["s:content_title"]=e(n.contentTitle??""),t["n:content_title_characters_number"]=Number(n.contentTitle?.length),t["s:content_subtype"]="texte",t["n:content_video_number"]=n.videoCount??0,t["n:content_20min_video_number"]=n.video20mnCount??0,t["n:content_embed_number"]=n.embedCount??0,n.podcastCount&&n.podcastCount>0?t["s:content_subtype"]="podcast":t["n:content_video_number"]>0&&(t["s:content_subtype"]="video"),t},u=(e,n,t,a)=>(n&&(window.PianoPageInfo.chapter1=n),t&&(window.PianoPageInfo.chapter2=t),a&&(window.PianoPageInfo.chapter3=a),e?{"s:page_type":e}:{}),d=()=>{const e=window.datalayerInfo,t={};t["b:user_adblock"]=!window.adsapp,t.page_url=e.pageUri??"",e.pageUri&&(window.PianoPageInfo.name=new URL(e.pageUri).pathname),e.contentSource&&(t["s:content_source"]=e.contentSource),document.referrer&&(t["s:misc_referrer"]=document.referrer),t["s:page_type"]=e.pageName||"other";const a=document.querySelector("link[rel='canonical']");if(a&&(t["s:page_canonical"]=a.getAttribute("href")??""),"/search"===e.pageUri){const e=n();t["s:misc_search"]=e.q||""}return{...t,...c(),...i()}},p=()=>{switch(window.datalayerInfo.pageName||"other"){case"archivebyday":case"archivebyyear":return u("divers");case"article":return(()=>{const e=s();return e["n:content_characters_number"]=Number(r()),e["n:content_paragraphs_number"]=o(),e})();case"direct":return u("divers","le-direct");case"elections":case"electionshome":return(()=>{const{national:e,region:n,department:t,constituency:a,town:o}=window.datalayerInfo?.elections||{};return window.PianoPageInfo.chapter1="elections",window.PianoPageInfo.chapter2="resultats",o&&t?(window.PianoPageInfo.chapter3=t,window.PianoPageInfo.chapter4=o):a&&t?(window.PianoPageInfo.chapter3=t,window.PianoPageInfo.chapter4=a):t&&n?(window.PianoPageInfo.chapter3=n,window.PianoPageInfo.chapter4=t):n?(window.PianoPageInfo.chapter3="france",window.PianoPageInfo.chapter4=n):e&&(window.PianoPageInfo.chapter3=e),{"s:page_type":"elections"}})();case"home":return window.PianoPageInfo.chapter1="accueil",window.PianoPageInfo.chapter2="",{"s:page_type":"home","s:content_source":"20mn"};case"game":return u(void 0,"services","jeux",window.datalayerInfo?.pageKey);case"gamehome":return u("home_game","services","jeux");case"horoscopehome":return u("home_horoscope","services","horoscope");case"horoscope":return u("horoscope","services","horoscope");case"jobdetails":return(()=>{const{pageKey:e,tagsSlug:n="",contentTitle:t="",embedCount:a=0,videoCount:c=0,video20mnCount:i=0}=window.datalayerInfo;return{"s:content_source":"labsense","s:page_type":"content",content_type:"card","s:content_tags":n,"s:content_signature":"","s:content_title":t,"s:content_subtype":"job","n:content_id":Number(e),"n:content_id_journaliste":0,"n:content_title_characters_number":Number(t.length),"n:content_video_number":c,"n:content_20min_video_number":i,"n:content_embed_number":a,"n:content_characters_number":Number(r()),"n:content_paragraphs_number":o(),"d:content_published_date":"","d:content_modified_date":""}})();case"jobs":case"tag":return u("home_tag",window.datalayerInfo?.pageKey,"");case"journalist":return(()=>{const{firstName:e,lastName:n}=window.datalayerInfo.journalist||{};return e&&n&&(window.PianoPageInfo.chapter1=`journaliste--${e}-${n}`),{"s:page_type":"journalist"}})();case"la21e":return u("divers","focus--accueil");case"legalnotice":return(()=>{const{contentTitle:e}=window.datalayerInfo||{};return e&&(window.PianoPageInfo.chapter1=`legal-announcement--${e}`),{"s:page_type":"legal_notice"}})();case"legalnoticedepartment":return(()=>{const{contentTitle:e}=window.datalayerInfo||{};return window.PianoPageInfo.chapter1=`legal-announcement-list--${e}`,{"s:page_type":"legal_notice_department"}})();case"legalnoticehome":return u("legal_notice_home","legal-announcement-list");case"legal":return(()=>{const{pageKey:e}=window.datalayerInfo;switch(e){case"cookies":window.PianoPageInfo.chapter1="gestion-cookies";break;case"privacy":window.PianoPageInfo.chapter1="politique-protection-donnees-personnelles";break;default:window.PianoPageInfo.chapter1=e}return{"s:page_type":"divers"}})();case"live":return(()=>{const e=s();return e["n:content_paragraphs_number"]=window.datalayerInfo?.livePosts??0,e})();case"mobileapps":return u("divers","mobile");case"mostcommented":return u("most_commented");case"mostread":return u("most_read");case"mostshared":return u("most_shared");case"mostviewed":return u("home_tag");case"movies":return u("divers","entertainment","cinema");case"news":return u("divers","a-la-une");case"sitemap":return u("divers","plan-site");case"sport":return(()=>{const{breadcrumb:e=[]}=window.datalayerInfo;return window.PianoPageInfo.chapter1=e.shift(),window.PianoPageInfo.chapter2=e.shift(),window.PianoPageInfo.chapter3=e.shift(),window.PianoPageInfo.chapter4=e.shift(),{"s:page_type":"divers"}})();case"story":return(()=>{const e=s();return e["s:content_subtype"]=window.datalayerInfo?.subType??"",e})();case"service":return u("divers","pratique");case"traffic":return u("infos_trafic");case"tvhome":return u("home_tv","tv");case"tvlive":return u("home_tv_live","tv");case"tvmostrecent":return u("tv_divers","tv","videos-recentes");case"tvmostviewed":return u("tv_divers","tv","videos-plus-vues");case"tvshow":return u("home_tv_show","tv",window.datalayerInfo?.pageKey);case"tvshows":return u("tv_divers","tv","emissions");case"tvvideo":return(()=>{window.PianoPageInfo.chapter1="tv";const e=s();return e.content_type="page",e["s:content_subtype"]="video",e})();case"weather":return u("previsions-meteo-france");default:return{}}};window.sendPageTracking=a,window.sendClickTracking=t,window._paq=window._paq||[],window.PianoPageInfo={name:"",chapter1:"",chapter2:""},window._paq.push(["setProperties",{...d(),...p(),"s:site_level2":window.location.hostname},{persistent:!0}]),a()}();
|
|
1
|
+
!function(){"use strict";var e=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(e||{});const n=(e,n)=>{let t=e.toLowerCase().replace(/[\s-]+/g,"-");return t=(e=>{let n=e;const t="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)n=n.replace(new RegExp(t.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return n})(t),t.replace(/[^\w-]+/g,"").replace(/-*$/g,"")},t=()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e.entries())},a=()=>document.querySelectorAll(".c-content > p").length,o=()=>[...document.querySelectorAll(".c-content > p")].reduce((e,n)=>e+n.innerHTML.length,0),r=()=>{const e={},n=t();return("utm_source"in n||"utm_campaign"in n||"utm_medium"in n)&&("utm_source"in n||(e.utm_source=n.utm_medium??n.utm_campaign),"utm_campaign"in n||(e.utm_campaign=n.utm_source??n.utm_medium),"utm_medium"in n||(e.utm_medium=n.utm_source??n.utm_campaign)),e},c=()=>{const e=window.datalayerInfo,t={};return e.breadcrumb?.forEach((e,t)=>{let a=n(e);"diaporamas"===a&&(a="diaporama"),"actualite"===a&&(a="actu-generale"),window.PianoPageInfo[`chapter${t+1}`]=a}),Number.isNaN(Number(e.contentId))||(t["n:content_id"]=Number(e.contentId)),t.content_type=e.pageName??"other",t["s:page_type"]="content",t["d:content_published_date"]=e.modificationDate?new Date(e.modificationDate).toISOString():"",t["d:content_modified_date"]=e.publicationDate?new Date(e.publicationDate).toISOString():"",Number.isNaN(Number(e.journalist?.id))||(t["n:content_id_journaliste"]=Number(e.journalist?.id)),t["s:content_tags"]=e.tagsSlug??"",t["s:content_signature"]=n(e.signature??""),t["s:content_title"]=n(e.contentTitle??""),t["n:content_title_characters_number"]=Number(e.contentTitle?.length),t["s:content_subtype"]="texte",t["n:content_video_number"]=e.videoCount??0,t["n:content_20min_video_number"]=e.video20mnCount??0,t["n:content_embed_number"]=e.embedCount??0,e.podcastCount&&e.podcastCount>0?t["s:content_subtype"]="podcast":t["n:content_video_number"]>0&&(t["s:content_subtype"]="video"),t},i=(e,n,t,a)=>(window.PianoPageInfo&&(n&&(window.PianoPageInfo.chapter1=n),t&&(window.PianoPageInfo.chapter2=t),a&&(window.PianoPageInfo.chapter3=a)),e?{"s:page_type":e}:{}),s=()=>{const e=window.datalayerInfo,n={};n["b:user_adblock"]=!window.adsapp,n.page_url=e.pageUri??"",e.pageUri&&window.PianoPageInfo&&(window.PianoPageInfo.name=new URL(e.pageUri).pathname),e.contentSource&&(n["s:content_source"]=e.contentSource),document.referrer&&(n["s:misc_referrer"]=document.referrer),n["s:page_type"]=e.pageName||"other";const a=document.querySelector("link[rel='canonical']");if(a&&(n["s:page_canonical"]=a.getAttribute("href")??""),"/search"===e.pageUri){const e=t();n["s:misc_search"]=e.q||""}return{...n,...r()}},u=()=>{switch(window.datalayerInfo.pageName||"other"){case e.ARCHIVE_BY_DAY:case e.ARCHIVE_BY_YEAR:return i("divers");case e.ARTICLE:return(()=>{const e=c();return e["n:content_characters_number"]=Number(o()),e["n:content_paragraphs_number"]=a(),e})();case e.DIRECT:return i("divers","le-direct");case e.ELECTIONS:case e.ELECTIONSHOME:return(()=>{const{national:e,region:n,department:t,constituency:a,town:o}=window.datalayerInfo?.elections||{};return window.PianoPageInfo&&(window.PianoPageInfo.chapter1="elections",window.PianoPageInfo.chapter2="resultats",o&&t?(window.PianoPageInfo.chapter3=t,window.PianoPageInfo.chapter4=o):a&&t?(window.PianoPageInfo.chapter3=t,window.PianoPageInfo.chapter4=a):t&&n?(window.PianoPageInfo.chapter3=n,window.PianoPageInfo.chapter4=t):n?(window.PianoPageInfo.chapter3="france",window.PianoPageInfo.chapter4=n):e&&(window.PianoPageInfo.chapter3=e)),{"s:page_type":"elections"}})();case e.HOME:return window.PianoPageInfo&&(window.PianoPageInfo.chapter1="accueil",window.PianoPageInfo.chapter2=""),{"s:page_type":"home","s:content_source":"20mn"};case e.GAME:return i(void 0,"services","jeux",window.datalayerInfo?.pageKey);case e.GAMEHOME:return i("home_game","services","jeux");case e.HOROSCOPE_HOME:return i("home_horoscope","services","horoscope");case e.HOROSCOPE:return i("horoscope","services","horoscope");case e.JOB_DETAILS:return(()=>{const{pageKey:e,tagsSlug:n="",contentTitle:t="",embedCount:r=0,videoCount:c=0,video20mnCount:i=0}=window.datalayerInfo;return{"s:content_source":"labsense","s:page_type":"content",content_type:"card","s:content_tags":n,"s:content_signature":"","s:content_title":t,"s:content_subtype":"job","n:content_id":Number(e),"n:content_id_journaliste":0,"n:content_title_characters_number":Number(t.length),"n:content_video_number":c,"n:content_20min_video_number":i,"n:content_embed_number":r,"n:content_characters_number":Number(o()),"n:content_paragraphs_number":a(),"d:content_published_date":"","d:content_modified_date":""}})();case e.JOBS:return i("home_tag",window.datalayerInfo?.pageKey,"");case e.JOURNALIST:return(()=>{const{firstName:e,lastName:n}=window.datalayerInfo.journalist||{};return e&&n&&window.PianoPageInfo&&(window.PianoPageInfo.chapter1=`journaliste--${e}-${n}`),{"s:page_type":"journalist"}})();case e.LA21E:return i("divers","focus--accueil");case e.LEGALNOTICE:return(()=>{const{contentTitle:e}=window.datalayerInfo||{};return e&&window.PianoPageInfo&&(window.PianoPageInfo.chapter1=`legal-announcement--${e}`),{"s:page_type":"legal_notice"}})();case e.LEGALNOTICEDEPARTMENT:return(()=>{const{contentTitle:e}=window.datalayerInfo||{};return window.PianoPageInfo&&(window.PianoPageInfo.chapter1=`legal-announcement-list--${e}`),{"s:page_type":"legal_notice_department"}})();case e.LEGALNOTICEHOME:return i("legal_notice_home","legal-announcement-list");case e.LEGAL:return(()=>{const{pageKey:e}=window.datalayerInfo;if(window.PianoPageInfo)switch(e){case"cookies":window.PianoPageInfo.chapter1="gestion-cookies";break;case"privacy":window.PianoPageInfo.chapter1="politique-protection-donnees-personnelles";break;default:window.PianoPageInfo.chapter1=e}return{"s:page_type":"divers"}})();case e.LIVE:return(()=>{const e=c();return e["n:content_paragraphs_number"]=window.datalayerInfo?.livePosts??0,e})();case e.MOBILE_APPS:return i("divers","mobile");case e.MOST_COMMENTED:return i("most_commented");case e.MOST_READ:return i("most_read");case e.MOST_SHARED:return i("most_shared");case e.MOST_VIEWED:return i("home_tag");case e.MOVIES:return i("divers","entertainment","cinema");case e.NEWS:return i("divers","a-la-une");case e.TAG:return i("home_tag",window.datalayerInfo?.pageKey,"");case e.SITEMAP:return i("divers","plan-site");case e.SPORT:return(()=>{const{breadcrumb:e=[]}=window.datalayerInfo;return window.PianoPageInfo&&(window.PianoPageInfo.chapter1=e.shift(),window.PianoPageInfo.chapter2=e.shift(),window.PianoPageInfo.chapter3=e.shift(),window.PianoPageInfo.chapter4=e.shift()),{"s:page_type":"divers"}})();case e.STORY:return(()=>{const e=c();return e["s:content_subtype"]=window.datalayerInfo?.subType??"",e})();case e.SERVICE:return i("divers","pratique");case e.TRAFFIC:return i("infos_trafic");case e.TV_HOME:return i("home_tv","tv");case e.TV_LIVE:return i("home_tv_live","tv");case e.TV_MOST_RECENT:return i("tv_divers","tv","videos-recentes");case e.TV_MOST_VIEWED:return i("tv_divers","tv","videos-plus-vues");case e.TV_SHOW:return i("home_tv_show","tv",window.datalayerInfo?.pageKey);case e.TV_SHOWS:return i("tv_divers","tv","emissions");case e.TV_VIDEO:return(()=>{window.PianoPageInfo&&(window.PianoPageInfo.chapter1="tv");const e=c();return e.content_type="page",e["s:content_subtype"]="video",e})();case e.WEATHER:return i("previsions-meteo-france");default:return{}}},d=()=>{const e={};if(e["b:user_darkmode"]="dark"===document.documentElement.getAttribute("data-theme"),e["b:user_status"]=!!document.cookie.match("(^|;)\\s*20mnUserInfo\\s*=\\s*([^;]+)"),!e["b:user_status"])return e;const n=(e=>{const n=document.cookie.split(";").filter(n=>-1!==n.indexOf(e))[0];return n?n.split("=")[1]:"{}"})("20mnUserDataLayer"),t=n?(()=>{try{return JSON.parse(decodeURIComponent(n))}catch{return null}})():null;return t&&(e["s:user_id"]=String(t.i),Number.isNaN(t.d)||(e["n:user_a"]=Number(t.d)),Number.isNaN(t.l)||(e["n:user_zip"]=Number(t.l)),Number.isNaN(t.g)||(e["n:user_g"]=Number(t.g))),e},p=e=>{const t={click:n(e.name),click_chapter1:e?.chapter1||null,click_chapter2:e?.chapter2||null,click_chapter3:e?.chapter3||null},a=`click.${e.type}`;if(window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[a]}),window.pa.sendEvent(a,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[a]}]),window._paq.push(["sendEvent",a,t])),!window.edgee?.track)return;const o=document.getElementById("__EDGEE_DATA_LAYER__");let r={};if(o)try{const e=JSON.parse(o.textContent||"");e.data_collection.context=e.data_collection.context||{},r=e.data_collection.context.page?.properties||{}}catch{r={}}window.edgee.track({name:a,properties:{...r,click:t.click,click_chapter1:t.click_chapter1,click_chapter2:t.click_chapter2,click_chapter3:t.click_chapter3,click_type:e?.type??"navigation",...e.customProps}},{"edgee/piano-analytics":!0})},_=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}]),window.edgee?.page&&!1!==e?.enableEdgee&&window.edgee.page()};window.sendPageTracking=_,window.sendClickTracking=p,window._paq=window._paq||[],window.PianoPageInfo={name:"",chapter1:"",chapter2:""},window._paq.push(["setProperties",{...s(),...u(),...d(),"s:site_level2":window.location.hostname},{persistent:!0}]),_({enableEdgee:!1})}();
|
|
2
2
|
//# sourceMappingURL=piano.min.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DatalayerInfoType } from '../../datalayer/types';
|
|
2
|
+
import { DefaultProps, EdgeeProps } from '../../../types/ThirdParties/Tracking';
|
|
3
|
+
interface PageInfo {
|
|
4
|
+
page: string;
|
|
5
|
+
chapter1: string;
|
|
6
|
+
chapter2: string;
|
|
7
|
+
chapter3: string;
|
|
8
|
+
chapter4: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class DataLayerHelperClass {
|
|
11
|
+
pageInfo: PageInfo;
|
|
12
|
+
defaultProps: DefaultProps;
|
|
13
|
+
contentRelatedProps: DefaultProps;
|
|
14
|
+
edgeeProps: EdgeeProps;
|
|
15
|
+
datalayerInfo: DatalayerInfoType;
|
|
16
|
+
constructor(datalayerInfo: DatalayerInfoType);
|
|
17
|
+
generateDefaultProps: () => DefaultProps;
|
|
18
|
+
private generateContentProps;
|
|
19
|
+
private generateArticleProps;
|
|
20
|
+
private generateLiveProps;
|
|
21
|
+
private generateStoryProps;
|
|
22
|
+
private generateHomeProps;
|
|
23
|
+
private generateElectionsProps;
|
|
24
|
+
private generateJournalistProps;
|
|
25
|
+
private generateJobdetailsProps;
|
|
26
|
+
private generateLegalNoticeProps;
|
|
27
|
+
private generateLegalNoticeDepartmentProps;
|
|
28
|
+
private generateTvVideoProps;
|
|
29
|
+
private generateGenericProps;
|
|
30
|
+
generateProps: () => DefaultProps;
|
|
31
|
+
generateEdgeeProps: () => EdgeeProps;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const sendClickTracking: (options: PianoEventObject) => void;
|
|
3
|
-
declare const sendPageTracking: (options?: PianoPageInfo) => void;
|
|
1
|
+
import { sendClickTracking, sendPageTracking } from '../tracking';
|
|
4
2
|
declare const piano: () => void;
|
|
5
3
|
export { piano, sendPageTracking, sendClickTracking };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DefaultProps } from '../../../types/ThirdParties/Tracking';
|
|
2
|
+
export declare const contentParagraphsNum: () => number;
|
|
3
|
+
export declare const generateSocialProps: () => DefaultProps;
|
|
4
|
+
export declare const generateDefaultProps: () => DefaultProps;
|
|
5
|
+
export declare const generateProps: () => DefaultProps;
|
|
@@ -108,7 +108,7 @@ declare const meta: {
|
|
|
108
108
|
"aria-colindextext"?: string | undefined;
|
|
109
109
|
"aria-colspan"?: number | undefined;
|
|
110
110
|
"aria-controls"?: string | undefined;
|
|
111
|
-
"aria-current"?: boolean | "time" | "
|
|
111
|
+
"aria-current"?: boolean | "time" | "page" | "true" | "false" | "step" | "location" | "date" | undefined;
|
|
112
112
|
"aria-describedby"?: string | undefined;
|
|
113
113
|
"aria-description"?: string | undefined;
|
|
114
114
|
"aria-details"?: string | undefined;
|
|
@@ -135,7 +135,7 @@ declare const meta: {
|
|
|
135
135
|
"aria-posinset"?: number | undefined;
|
|
136
136
|
"aria-pressed"?: boolean | "mixed" | "true" | "false" | undefined;
|
|
137
137
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
138
|
-
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "
|
|
138
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
139
139
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
140
140
|
"aria-roledescription"?: string | undefined;
|
|
141
141
|
"aria-rowcount"?: number | undefined;
|
package/dist/src/components/organisms/TvPages/ShowsReplaysCarousel/ShowsReplaysCarousel.stories.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ declare const meta: {
|
|
|
103
103
|
"aria-colindextext"?: string | undefined;
|
|
104
104
|
"aria-colspan"?: number | undefined;
|
|
105
105
|
"aria-controls"?: string | undefined;
|
|
106
|
-
"aria-current"?: boolean | "time" | "
|
|
106
|
+
"aria-current"?: boolean | "time" | "page" | "true" | "false" | "step" | "location" | "date" | undefined;
|
|
107
107
|
"aria-describedby"?: string | undefined;
|
|
108
108
|
"aria-description"?: string | undefined;
|
|
109
109
|
"aria-details"?: string | undefined;
|
|
@@ -130,7 +130,7 @@ declare const meta: {
|
|
|
130
130
|
"aria-posinset"?: number | undefined;
|
|
131
131
|
"aria-pressed"?: boolean | "mixed" | "true" | "false" | undefined;
|
|
132
132
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
133
|
-
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "
|
|
133
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
134
134
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
135
135
|
"aria-roledescription"?: string | undefined;
|
|
136
136
|
"aria-rowcount"?: number | undefined;
|
|
@@ -2,7 +2,7 @@ import { CommonTemplateActivators, PageManager } from './PageManager';
|
|
|
2
2
|
import { LivePageProps } from '../pages';
|
|
3
3
|
import { LayoutType } from '@20minutes/hela';
|
|
4
4
|
import { default as React } from 'react';
|
|
5
|
-
type LivePageTemplateActivators = 'DisplayOnHeaderAd' | '
|
|
5
|
+
type LivePageTemplateActivators = 'DisplayOnHeaderAd' | 'HeaderAd' | 'SponsoredContents' | CommonTemplateActivators;
|
|
6
6
|
type SelectedProps = 'livePostsThread' | 'topContent';
|
|
7
7
|
type LivePageFilteredProps = Pick<LivePageProps, SelectedProps>;
|
|
8
8
|
interface LiveContent {
|
|
@@ -8,7 +8,6 @@ export declare abstract class PageManager<PageProps = Record<string, unknown>, S
|
|
|
8
8
|
enableDisplayOnHeaderAd: boolean;
|
|
9
9
|
enableAudion: boolean;
|
|
10
10
|
enableSponsoredContents: boolean;
|
|
11
|
-
enableMostReadSmallFeed: boolean;
|
|
12
11
|
enableNewsletter: boolean;
|
|
13
12
|
} & Record<NonNullable<Prefix<"enable", PageFeatures>>, boolean>;
|
|
14
13
|
protected constructor({ data, layout, templateActivators, }: {
|
|
@@ -24,7 +23,6 @@ export declare abstract class PageManager<PageProps = Record<string, unknown>, S
|
|
|
24
23
|
enableDisplayOnHeaderAd: boolean;
|
|
25
24
|
enableAudion: boolean;
|
|
26
25
|
enableSponsoredContents: boolean;
|
|
27
|
-
enableMostReadSmallFeed: boolean;
|
|
28
26
|
enableNewsletter: boolean;
|
|
29
27
|
} & Record<NonNullable<Prefix<"enable", PageFeatures>>, boolean>;
|
|
30
28
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface EdgeePageData {
|
|
2
|
+
title?: string;
|
|
3
|
+
properties?: Record<string, string | number | boolean | Date>;
|
|
4
|
+
}
|
|
5
|
+
interface EdgeeTrackData {
|
|
6
|
+
name: string;
|
|
7
|
+
properties?: Record<string, string | number | boolean | Date>;
|
|
8
|
+
}
|
|
9
|
+
export interface EdgeeUserData {
|
|
10
|
+
user_id?: string;
|
|
11
|
+
properties?: Record<string, string | number | boolean>;
|
|
12
|
+
}
|
|
13
|
+
export interface EdgeeEvent {
|
|
14
|
+
type: 'page' | 'track' | 'user';
|
|
15
|
+
data?: EdgeePageData | EdgeeTrackData | EdgeeUserData;
|
|
16
|
+
components?: {
|
|
17
|
+
all?: boolean;
|
|
18
|
+
[componentName: string]: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
interface EdgeeContext {
|
|
22
|
+
page?: EdgeePageData;
|
|
23
|
+
user?: EdgeeUserData;
|
|
24
|
+
}
|
|
25
|
+
export interface EdgeeDataLayer {
|
|
26
|
+
data_collection: {
|
|
27
|
+
events: EdgeeEvent[];
|
|
28
|
+
context?: EdgeeContext;
|
|
29
|
+
components?: {
|
|
30
|
+
all?: boolean;
|
|
31
|
+
[componentName: string]: boolean | undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface EdgeeProps {
|
|
36
|
+
page_title_html: string;
|
|
37
|
+
page: string;
|
|
38
|
+
'b:is_edgee': boolean;
|
|
39
|
+
is_edgee: boolean;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -14,6 +14,7 @@ import { MostReadArticlesProps } from '../components/organisms/MostReadArticles'
|
|
|
14
14
|
import { MoviesListProps } from '../components/organisms/MoviePage/MoviesList';
|
|
15
15
|
import { VariablesSmartPlayerDigitekaType } from './Digiteka';
|
|
16
16
|
import { CmpType, MediarithmicsType, OwnpageType, PianoEventObject, PianoGlobalType, PianoPageInfo, ThirdPartiesConfigType, VariablesCmpType } from './ThirdParties';
|
|
17
|
+
import { EdgeeUserData } from './ThirdParties/Tracking/Edgee';
|
|
17
18
|
import { AwsRumVariablesType } from './AwsRumVariablesType';
|
|
18
19
|
import { EnvVariablesType } from './EnvVariablesType';
|
|
19
20
|
import { LayoutType, SearchBannerProps } from '@20minutes/hela';
|
|
@@ -33,12 +34,13 @@ declare global {
|
|
|
33
34
|
targeting: Partial<GlobalTargetingType>;
|
|
34
35
|
} | Record<string, never>;
|
|
35
36
|
cmpVariables: CmpType;
|
|
36
|
-
pa
|
|
37
|
+
pa?: PianoGlobalType;
|
|
37
38
|
Ownpage: OwnpageType;
|
|
38
|
-
_paq
|
|
39
|
+
_paq?: any[];
|
|
39
40
|
sendPageTracking?: (options?: PianoPageInfo) => void;
|
|
40
41
|
sendClickTracking?: (options: PianoEventObject) => void;
|
|
41
|
-
|
|
42
|
+
sendUserTracking?: () => void;
|
|
43
|
+
PianoPageInfo?: PianoPageInfo;
|
|
42
44
|
adsapp: boolean;
|
|
43
45
|
envVariables: EnvVariablesType;
|
|
44
46
|
__staticHydrationData?: {
|
|
@@ -93,5 +95,10 @@ declare global {
|
|
|
93
95
|
};
|
|
94
96
|
bodyScripts: HTMLScriptElement[];
|
|
95
97
|
$screeb: (eventName: string, eventId: string, params?: Record<string, unknown>) => void;
|
|
98
|
+
edgee?: {
|
|
99
|
+
page?: (pageData?: Record<string, unknown>, data?: Record<string, unknown>) => void;
|
|
100
|
+
track?: (event?: Record<string, unknown>, data?: Record<string, unknown>) => void;
|
|
101
|
+
user?: (userData?: EdgeeUserData, data?: Record<string, unknown>) => void;
|
|
102
|
+
};
|
|
96
103
|
}
|
|
97
104
|
}
|