@20minutes/tyr 2.30.4 → 2.31.0
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/css/adiframePage-desktop-critical.css +1 -0
- package/dist/css/adiframePage-desktop-no-critical.css +1 -0
- package/dist/css/adiframePage-mobile-critical.css +1 -0
- package/dist/css/adiframePage-mobile-no-critical.css +1 -0
- package/dist/css/directPage-desktop-critical.css +1 -1
- package/dist/css/directPage-desktop-no-critical.css +1 -1
- package/dist/css/tvvideoPage-desktop-critical.css +1 -1
- package/dist/css/tvvideoPage-desktop-no-critical.css +1 -1
- package/dist/css/tvvideoPage-mobile-critical.css +1 -1
- package/dist/css/tvvideoPage-mobile-no-critical.css +1 -1
- package/dist/index.es.js +5166 -5127
- package/dist/index.umd.js +47 -47
- package/dist/js/ads.min.js +1 -1
- package/dist/js/cmp.min.js +1 -1
- package/dist/js/main.min.js +5 -5
- package/dist/js/script-helpers.min.js +1 -1
- package/dist/src/components/atoms/ExternalAdElement/ExternalAdElement.d.ts +5 -0
- package/dist/src/components/atoms/ExternalAdElement/ExternalAdElement.stories.d.ts +11 -0
- package/dist/src/components/atoms/ExternalAdElement/index.d.ts +1 -0
- package/dist/src/components/atoms/index.d.ts +1 -0
- package/dist/src/config/componentConfigs/componentAdIframeConfigs.d.ts +2 -0
- package/dist/src/config/pageConfigs/adIframePageConfig.d.ts +2 -0
- package/dist/src/pages/AdIframePage/AdIframePage.d.ts +5 -0
- package/dist/src/pages/AdIframePage/AdIframePage.stories.d.ts +18 -0
- package/dist/src/pages/AdIframePage/index.d.ts +1 -0
- package/dist/src/pages/index.d.ts +1 -0
- package/dist/src/types/ComponentConfig.d.ts +4 -1
- package/dist/src/types/PageConfig.d.ts +4 -2
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";const t=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e=e=>{window.didomiOnReady=window.didomiOnReady||[];const
|
|
1
|
+
!function(){"use strict";const t=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e=e=>{window.didomiOnReady=window.didomiOnReady||[];const i=(i,r)=>{!r||"tcloaded"!==i.eventStatus&&"useractioncomplete"!==i.eventStatus?console.log(`Issue with ${e.name} callback`):("src"in e&&(e=>{const i=document.createElement("script");if(i.type="text/javascript","async"===e.load?i.async=!0:"defer"===e.load&&(i.defer=!0),"src"in e&&e.src){const t=eval;i.src=e.src?.replace(/%(.*?)%/,(e,i)=>t(i))}e.name&&performance.mark(`20mn:${e.name}:Start`),(e.name||e.onLoad)&&(i.onload=()=>{e.name&&performance.mark(`20mn:${e.name}:End`),e.onLoad&&e.onLoad()}),"text"in e&&e.text&&(i.innerHTML=e.text),e.id&&(i.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,r])=>{i.setAttribute(`data-${t(e)}`,r)}),"head"===e.target&&document.head?document.head.appendChild(i):document.body?document.body.appendChild(i):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(i))})(e),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,i.listenerId))};window.didomiOnReady.push(()=>{void 0!==i&&window.__tcfapi("addEventListener",2,i)})},i=i=>{i?.waitCMP?e(i):(e=>{const i=document.createElement("script");if(i.type="text/javascript","async"===e.load?i.async=!0:"defer"===e.load&&(i.defer=!0),"src"in e&&e.src){const t=eval;i.src=e.src?.replace(/%(.*?)%/,(e,i)=>t(i))}e.name&&performance.mark(`20mn:${e.name}:Start`),(e.name||e.onLoad)&&(i.onload=()=>{e.name&&performance.mark(`20mn:${e.name}:End`),e.onLoad&&e.onLoad()}),"text"in e&&e.text&&(i.innerHTML=e.text),e.id&&(i.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,r])=>{i.setAttribute(`data-${t(e)}`,r)}),"head"===e.target&&document.head?document.head.appendChild(i):document.body?document.body.appendChild(i):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(i))})(i)};(()=>{const t=new MutationObserver(()=>{document.body&&((window.bodyScripts||[]).forEach(t=>{document.body.appendChild(t)}),t.disconnect())});t.observe(document.documentElement,{childList:!0})})(),(()=>{if(!window.thirdPartiesConfig)return;const{thirdPartiesConfig:t}=window,e=t?.veryHighPriority.sort((t,e)=>t.priority-e.priority),r=t?.highPriority.sort((t,e)=>t.priority-e.priority),o=t?.mediumPriority.sort((t,e)=>t.priority-e.priority),d=t?.lowPriority.sort((t,e)=>t.priority-e.priority);(({veryHighPriority:t,highPriority:e,mediumPriority:r,lowPriority:o})=>{t?.forEach(t=>{i({...t,target:"head"})}),e?.forEach(t=>{i({...t,target:"head"})}),r?.forEach(t=>{i(t)}),o?.forEach(t=>{i(t)})})({veryHighPriority:e,highPriority:r,mediumPriority:o,lowPriority:d})})()}();
|
|
2
2
|
//# sourceMappingURL=script-helpers.min.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').FC<import('./ExternalAdElement').ExternalAdElementProps>;
|
|
5
|
+
args: {
|
|
6
|
+
adType: "topPave";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
export declare const Overview: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ExternalAdElement';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ExternalAdElementProps } from '../../components';
|
|
3
|
+
import { AdIframePage } from './AdIframePage';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: React.FC<import('./AdIframePage').AdIframePageProps>;
|
|
8
|
+
args: {
|
|
9
|
+
adHtml: React.FunctionComponentElement<ExternalAdElementProps>;
|
|
10
|
+
};
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof AdIframePage>;
|
|
17
|
+
export declare const AdIframePageMobile: Story;
|
|
18
|
+
export declare const AdIframePageDesktop: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AdIframePage';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export declare const enum ComponentNameAdIframe {
|
|
3
|
+
AD_IFRAME_EXTERNAL_AD_ELEMENT = "ad-iframe/external-ad-element"
|
|
4
|
+
}
|
|
2
5
|
export declare const enum ComponentNameArchives {
|
|
3
6
|
ARCHIVES_PAGE_TITLE = "archives/page-title",
|
|
4
7
|
ARCHIVES_DAYS_LIST = "archives/days-list",
|
|
@@ -392,7 +395,7 @@ export declare const enum ComponentNameWhyCreateAccount {
|
|
|
392
395
|
WHY_CREATE_ACCOUNT_HEADER_PAGE = "why-create-account/header-page",
|
|
393
396
|
WHY_CREATE_ACCOUNT_JSON_LD_BREADCRUMB = "why-create-account/json-ld-breadcrumb"
|
|
394
397
|
}
|
|
395
|
-
export interface ComponentConfig<TComponentName = ComponentNameArchives | ComponentNameArticle | ComponentNameCommon | ComponentNameContact | ComponentNameContent | ComponentNameDirect | ComponentNameElections | ComponentNameError | ComponentNameGame | ComponentNameHome | ComponentNameHoroscope | ComponentNameJobs | ComponentNameJournalist | ComponentNameLa21e | ComponentNameLegal | ComponentNameLegalNotice | ComponentNameLive | ComponentNameMobileApps | ComponentNameMostCommented | ComponentNameMostRead | ComponentNameMostShared | ComponentNameMovies | ComponentNameNews | ComponentNameQuiz | ComponentNameRewind | ComponentNameRubric | ComponentNameSearch | ComponentNameService | ComponentNameShoppingGuide | ComponentNameSitemap | ComponentNameSlideshow | ComponentNameSport | ComponentNameStory | ComponentNameTag | ComponentNameTraffic | ComponentNameTvHome | ComponentNameTvLive | ComponentNameTvMostRecent | ComponentNameTvMostViewed | ComponentNameTvVideo | ComponentNameTvShow | ComponentNameTvShows | ComponentNameUtiq | ComponentNameWeather | ComponentNameWhyCreateAccount, TComponent = React.FC<any>> {
|
|
398
|
+
export interface ComponentConfig<TComponentName = ComponentNameAdIframe | ComponentNameArchives | ComponentNameArticle | ComponentNameCommon | ComponentNameContact | ComponentNameContent | ComponentNameDirect | ComponentNameElections | ComponentNameError | ComponentNameGame | ComponentNameHome | ComponentNameHoroscope | ComponentNameJobs | ComponentNameJournalist | ComponentNameLa21e | ComponentNameLegal | ComponentNameLegalNotice | ComponentNameLive | ComponentNameMobileApps | ComponentNameMostCommented | ComponentNameMostRead | ComponentNameMostShared | ComponentNameMovies | ComponentNameNews | ComponentNameQuiz | ComponentNameRewind | ComponentNameRubric | ComponentNameSearch | ComponentNameService | ComponentNameShoppingGuide | ComponentNameSitemap | ComponentNameSlideshow | ComponentNameSport | ComponentNameStory | ComponentNameTag | ComponentNameTraffic | ComponentNameTvHome | ComponentNameTvLive | ComponentNameTvMostRecent | ComponentNameTvMostViewed | ComponentNameTvVideo | ComponentNameTvShow | ComponentNameTvShows | ComponentNameUtiq | ComponentNameWeather | ComponentNameWhyCreateAccount, TComponent = React.FC<any>> {
|
|
396
399
|
componentName: TComponentName;
|
|
397
400
|
component: TComponent;
|
|
398
401
|
expiration?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ArchiveByDayPage, ArchiveByDayPageProps, ArchiveByYearPage, ArchiveByYearPageProps, ArticlePage, ArticlePageProps, ContactPage, ContactPageProps, DirectPage, DirectPageProps, ElectionsHomePage, ElectionsHomePageProps, ElectionsPage, ElectionsPageProps, ErrorPage, ErrorPageProps, GameAppPage, GameAppPageProps, GameHomePage, GameHomePageProps, GamePage, GamePageProps, HomePage, HomePageProps, HoroscopeHomePage, HoroscopeHomePageProps, HoroscopePage, HoroscopePageProps, JobDetailsPage, JobDetailsPageProps, JobsPage, JobsPageProps, JournalistPage, JournalistPageProps, La21ePage, La21ePageProps, LegalNoticeDepartmentPage, LegalNoticeDepartmentPageProps, LegalNoticeHomePage, LegalNoticeHomePageProps, LegalNoticePage, LegalNoticePageProps, LegalPage, LegalPageProps, LivePage, LivePageProps, MobileAppsPage, MobileAppsPageProps, MostCommentedPage, MostCommentedPageProps, MostReadPage, MostReadPageProps, MostSharedPage, MostSharedPageProps, MoviesPage, MoviesPageProps, NewsPage, NewsPageProps, PartnerPage, QuizPage, QuizPageProps, RewindPage, RewindPageProps, SearchPage, SearchPageProps, ServicePage, ServicePageProps, ShoppingGuidePage, ShoppingGuidePageProps, SitemapPage, SitemapPageProps, SlideshowPage, SlideshowPageProps, SportPage, SportPageProps, TagPage, TagPageProps, TrafficPage, TrafficPageProps, TvHomePage, TvHomePageProps, TvLivePage, TvLivePageProps, TvMostRecentPage, TvMostRecentPageProps, TvMostViewedPage, TvMostViewedPageProps, TvShowPage, TvShowPageProps, TvShowsPage, TvShowsPageProps, UtiqPage, UtiqPageProps, WeatherPage, WeatherPageProps, WhyCreateAccountPage, WhyCreateAccountPageProps } from '../pages';
|
|
1
|
+
import { AdIframePage, AdIframePageProps, ArchiveByDayPage, ArchiveByDayPageProps, ArchiveByYearPage, ArchiveByYearPageProps, ArticlePage, ArticlePageProps, ContactPage, ContactPageProps, DirectPage, DirectPageProps, ElectionsHomePage, ElectionsHomePageProps, ElectionsPage, ElectionsPageProps, ErrorPage, ErrorPageProps, GameAppPage, GameAppPageProps, GameHomePage, GameHomePageProps, GamePage, GamePageProps, HomePage, HomePageProps, HoroscopeHomePage, HoroscopeHomePageProps, HoroscopePage, HoroscopePageProps, JobDetailsPage, JobDetailsPageProps, JobsPage, JobsPageProps, JournalistPage, JournalistPageProps, La21ePage, La21ePageProps, LegalNoticeDepartmentPage, LegalNoticeDepartmentPageProps, LegalNoticeHomePage, LegalNoticeHomePageProps, LegalNoticePage, LegalNoticePageProps, LegalPage, LegalPageProps, LivePage, LivePageProps, MobileAppsPage, MobileAppsPageProps, MostCommentedPage, MostCommentedPageProps, MostReadPage, MostReadPageProps, MostSharedPage, MostSharedPageProps, MoviesPage, MoviesPageProps, NewsPage, NewsPageProps, PartnerPage, QuizPage, QuizPageProps, RewindPage, RewindPageProps, SearchPage, SearchPageProps, ServicePage, ServicePageProps, ShoppingGuidePage, ShoppingGuidePageProps, SitemapPage, SitemapPageProps, SlideshowPage, SlideshowPageProps, SportPage, SportPageProps, TagPage, TagPageProps, TrafficPage, TrafficPageProps, TvHomePage, TvHomePageProps, TvLivePage, TvLivePageProps, TvMostRecentPage, TvMostRecentPageProps, TvMostViewedPage, TvMostViewedPageProps, TvShowPage, TvShowPageProps, TvShowsPage, TvShowsPageProps, UtiqPage, UtiqPageProps, WeatherPage, WeatherPageProps, WhyCreateAccountPage, WhyCreateAccountPageProps } from '../pages';
|
|
2
2
|
import { TvVideoPage, TvVideoPageProps } from '../pages/TvVideoPage';
|
|
3
3
|
import { PageTemplateProps } from '../templates';
|
|
4
|
-
import { ComponentNameArchives, ComponentNameArticle, ComponentNameCommon, ComponentNameContact, ComponentNameContent, ComponentNameDirect, ComponentNameElections, ComponentNameError, ComponentNameGame, ComponentNameHome, ComponentNameHoroscope, ComponentNameJobs, ComponentNameJournalist, ComponentNameLa21e, ComponentNameLegal, ComponentNameLegalNotice, ComponentNameLive, ComponentNameMobileApps, ComponentNameMostCommented, ComponentNameMostRead, ComponentNameMostShared, ComponentNameMovies, ComponentNameNews, ComponentNameQuiz, ComponentNameRewind, ComponentNameRubric, ComponentNameSearch, ComponentNameService, ComponentNameShoppingGuide, ComponentNameSitemap, ComponentNameSlideshow, ComponentNameSport, ComponentNameStory, ComponentNameTag, ComponentNameTraffic, ComponentNameTvHome, ComponentNameTvLive, ComponentNameTvMostRecent, ComponentNameTvMostViewed, ComponentNameTvShow, ComponentNameTvShows, ComponentNameTvVideo, ComponentNameUtiq, ComponentNameWeather, ComponentNameWhyCreateAccount } from './ComponentConfig';
|
|
4
|
+
import { ComponentNameAdIframe, ComponentNameArchives, ComponentNameArticle, ComponentNameCommon, ComponentNameContact, ComponentNameContent, ComponentNameDirect, ComponentNameElections, ComponentNameError, ComponentNameGame, ComponentNameHome, ComponentNameHoroscope, ComponentNameJobs, ComponentNameJournalist, ComponentNameLa21e, ComponentNameLegal, ComponentNameLegalNotice, ComponentNameLive, ComponentNameMobileApps, ComponentNameMostCommented, ComponentNameMostRead, ComponentNameMostShared, ComponentNameMovies, ComponentNameNews, ComponentNameQuiz, ComponentNameRewind, ComponentNameRubric, ComponentNameSearch, ComponentNameService, ComponentNameShoppingGuide, ComponentNameSitemap, ComponentNameSlideshow, ComponentNameSport, ComponentNameStory, ComponentNameTag, ComponentNameTraffic, ComponentNameTvHome, ComponentNameTvLive, ComponentNameTvMostRecent, ComponentNameTvMostViewed, ComponentNameTvShow, ComponentNameTvShows, ComponentNameTvVideo, ComponentNameUtiq, ComponentNameWeather, ComponentNameWhyCreateAccount } from './ComponentConfig';
|
|
5
5
|
export interface PageComponentConfig<TComponentName = string, TPropName = string> {
|
|
6
6
|
name: TComponentName;
|
|
7
7
|
propName: TPropName;
|
|
@@ -14,6 +14,7 @@ export interface PageConfig<TPageName = string, TComponentPage = React.FC<any>,
|
|
|
14
14
|
components: PageComponentConfig<TComponentName, TPropName>[];
|
|
15
15
|
}
|
|
16
16
|
export type PageTemplateComponentConfigs = PageComponentConfig<ComponentNameCommon, keyof Pick<PageTemplateProps, 'header' | 'headerMini' | 'footer' | 'menu'>>[];
|
|
17
|
+
export type AdIframePageConfig = PageConfig<'adIframe', typeof AdIframePage, ComponentNameAdIframe, keyof AdIframePageProps>;
|
|
17
18
|
export type ArchiveByDayPageConfig = PageConfig<'archiveByDay', typeof ArchiveByDayPage, ComponentNameCommon | ComponentNameArchives | ComponentNameContent, keyof ArchiveByDayPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload'>;
|
|
18
19
|
export type ArchiveByYearPageConfig = PageConfig<'archiveByYear', typeof ArchiveByYearPage, ComponentNameCommon | ComponentNameArchives, keyof ArchiveByYearPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload' | 'preload'>;
|
|
19
20
|
export type ArticlePageConfig = PageConfig<'article', typeof ArticlePage, ComponentNameCommon | ComponentNameRubric | ComponentNameArticle | ComponentNameContent, keyof ArticlePageProps | 'meta' | 'jsonLdBreadcrumb' | 'jsonLdClaimReview' | 'jsonLdNewsArticle' | 'defaultPreload' | 'preload'>;
|
|
@@ -66,6 +67,7 @@ export type UtiqPageConfig = PageConfig<'utiq', typeof UtiqPage, ComponentNameCo
|
|
|
66
67
|
export type WeatherPageConfig = PageConfig<'weather', typeof WeatherPage, ComponentNameCommon | ComponentNameRubric | ComponentNameWeather, keyof WeatherPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload'>;
|
|
67
68
|
export type WhyCreateAccountPageConfig = PageConfig<'whyCreateAccount', typeof WhyCreateAccountPage, ComponentNameCommon | ComponentNameWhyCreateAccount, keyof WhyCreateAccountPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload'>;
|
|
68
69
|
export type PageConfigs = [
|
|
70
|
+
AdIframePageConfig,
|
|
69
71
|
ArchiveByDayPageConfig,
|
|
70
72
|
ArchiveByYearPageConfig,
|
|
71
73
|
ArticlePageConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@20minutes/tyr",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@github.com/20minutes/tyr.git"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@20minutes/draft-convert": "^3.0.2",
|
|
56
|
-
"@20minutes/hela": "^2.12.
|
|
56
|
+
"@20minutes/hela": "^2.12.10",
|
|
57
57
|
"aws-rum-web": "^1.25.0",
|
|
58
58
|
"classnames": "^2.5.1",
|
|
59
59
|
"draft-js": "^0.11.7",
|