@20minutes/tyr 1.0.0 → 1.2.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/articlePage-desktop-critical.css +1 -1
- package/dist/css/articlePage-desktop-no-critical.css +1 -1
- package/dist/css/articlePage-mobile-critical.css +1 -1
- package/dist/css/articlePage-mobile-no-critical.css +1 -1
- package/dist/css/homePage-desktop-critical.css +1 -1
- package/dist/css/homePage-desktop-no-critical.css +1 -1
- package/dist/css/homePage-mobile-critical.css +1 -1
- package/dist/css/homePage-mobile-no-critical.css +1 -1
- package/dist/css/livePage-desktop-critical.css +1 -1
- package/dist/css/livePage-desktop-no-critical.css +1 -1
- package/dist/index.es.js +5216 -5105
- package/dist/index.umd.js +85 -85
- package/dist/js/ads.min.js +2 -2
- package/dist/js/main.min.js +2 -2
- package/dist/js/script-helpers.min.js +1 -1
- package/dist/src/assets/main/concern.d.ts +1 -0
- package/dist/src/assets/thirdParties/ads/dfpAdSlots.d.ts +1 -0
- package/dist/src/assets/thirdParties/ads/types/TargetingType.d.ts +3 -1
- package/dist/src/assets/thirdParties/sponsoredContent/index.d.ts +1 -0
- package/dist/src/components/organisms/LivePostsThread/LivePostsThread.d.ts +5 -0
- package/dist/src/containers/LiveRefreshButtonContainer/LiveRefreshButtonContainer.d.ts +2 -0
- package/dist/src/containers/LiveRefreshButtonContainer/index.d.ts +1 -0
- package/dist/src/helpers/ads/AdsManager.d.ts +2 -2
- package/dist/src/helpers/scriptHelper.d.ts +1 -0
- package/dist/src/managers/ArticlePageManager.d.ts +1 -1
- package/dist/src/managers/PageManager.d.ts +2 -2
- package/dist/src/templates/ContentTemplate/ContentTemplate.d.ts +1 -2
- package/dist/src/types/Window.d.ts +3 -0
- package/dist/src/types/graphql.d.ts +1 -0
- package/package.json +11 -11
- package/dist/src/assets/thirdParties/outbrain/outbrainManager.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";const r=r=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{t?"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus||("src"in r&&(r=>{const e=document.createElement("script");e.type="text/javascript",r.src&&(e.src=r.src,r.name&&(performance.mark(`20mn:${r.name}:Start`),e.onload=()=>{performance.mark(`20mn:${r.name}:End`)})),r.name&&performance.mark(`20mn:${r.name}:Enable`),r.async&&(e.async=r.async),r.defer&&(e.defer=r.defer),r.text&&(e.innerHTML=r.text),r.dataAttributes&&Object.entries(r.dataAttributes).forEach((([r,t])=>{var i;e.setAttribute(`data-${i=r,i.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`,t)})),document.body.appendChild(e)})({name:r.name,async:!0,src:r.src}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)):console.log(`Issue with ${r.name} callback`)};window.didomiOnReady.push((()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)}))},e=e=>{e?.waitCMP?r(e):(r=>{const e=document.createElement("script");e.type="text/javascript","async"===r.load?e.async=!0:"defer"===r.load&&(e.defer=!0),"src"in r&&(e.src=r.src,r.name&&(performance.mark(`20mn:${r.name}:Start`),e.onload=()=>{performance.mark(`20mn:${r.name}:End`)})),"text"in r&&(e.innerHTML=r.text),r.name&&performance.mark(`20mn:${r.name}:Enable`),document.body?.appendChild(e)})(e)};(()=>{if(!window.thirdPartiesConfig)return;const{thirdPartiesConfig:r}=window,t=r?.veryHighPriority.sort(((r,e)=>r.priority-e.priority)),i=r?.highPriority.sort(((r,e)=>r.priority-e.priority)),n=r?.mediumPriority.sort(((r,e)=>r.priority-e.priority)),a=r?.lowPriority.sort(((r,e)=>r.priority-e.priority));(({veryHighPriority:r,highPriority:t,mediumPriority:i,lowPriority:n})=>{r?.forEach((r=>{e(r)})),t?.forEach((r=>{e(r)})),i?.forEach((r=>{e(r)})),n?.forEach((r=>{e(r)}))})({veryHighPriority:t,highPriority:i,mediumPriority:n,lowPriority:a})})()}();
|
|
1
|
+
!function(){"use strict";const r=r=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{t?"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus||("src"in r&&(r=>{const e=document.createElement("script");e.type="text/javascript",r.src&&(e.src=r.src,r.name&&(performance.mark(`20mn:${r.name}:Start`),e.onload=()=>{performance.mark(`20mn:${r.name}:End`)})),r.name&&performance.mark(`20mn:${r.name}:Enable`),r.async&&(e.async=r.async),r.defer&&(e.defer=r.defer),r.text&&(e.innerHTML=r.text),r.id&&(e.id=r.id),r.dataAttributes&&Object.entries(r.dataAttributes).forEach((([r,t])=>{var i;e.setAttribute(`data-${i=r,i.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`,t)})),document.body.appendChild(e)})({name:r.name,async:!0,src:r.src}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)):console.log(`Issue with ${r.name} callback`)};window.didomiOnReady.push((()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)}))},e=e=>{e?.waitCMP?r(e):(r=>{const e=document.createElement("script");e.type="text/javascript","async"===r.load?e.async=!0:"defer"===r.load&&(e.defer=!0),"src"in r&&(e.src=r.src,r.name&&(performance.mark(`20mn:${r.name}:Start`),e.onload=()=>{performance.mark(`20mn:${r.name}:End`)})),"text"in r&&(e.innerHTML=r.text),r.name&&performance.mark(`20mn:${r.name}:Enable`),document.body?.appendChild(e)})(e)};(()=>{if(!window.thirdPartiesConfig)return;const{thirdPartiesConfig:r}=window,t=r?.veryHighPriority.sort(((r,e)=>r.priority-e.priority)),i=r?.highPriority.sort(((r,e)=>r.priority-e.priority)),n=r?.mediumPriority.sort(((r,e)=>r.priority-e.priority)),a=r?.lowPriority.sort(((r,e)=>r.priority-e.priority));(({veryHighPriority:r,highPriority:t,mediumPriority:i,lowPriority:n})=>{r?.forEach((r=>{e(r)})),t?.forEach((r=>{e(r)})),i?.forEach((r=>{e(r)})),n?.forEach((r=>{e(r)}))})({veryHighPriority:t,highPriority:i,mediumPriority:n,lowPriority:a})})()}();
|
|
@@ -5,3 +5,4 @@ export declare const loadLivePostsContainer: () => void;
|
|
|
5
5
|
export declare const loadLocalNewsContainer: () => void;
|
|
6
6
|
export declare const loadLatestArticlesContainer: () => void;
|
|
7
7
|
export declare const loadMostReadArticlesContainer: () => void;
|
|
8
|
+
export declare const loadLiveRefreshButton: () => void;
|
|
@@ -2,6 +2,7 @@ import { type GlobalTargetingType, type SlotType } from './types';
|
|
|
2
2
|
export declare const adDefinedEvent = "adDefined";
|
|
3
3
|
export declare const getSpecificTargeting: (slot: SlotType) => {
|
|
4
4
|
pos: string;
|
|
5
|
+
posp3: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const exposeSlots: (slots: SlotType[] | SlotType) => void;
|
|
7
8
|
export declare const initDfpSlot: ({ slot, globalTargeting, }: {
|
|
@@ -24,7 +24,8 @@ export declare enum GlobalTargetingKeys {
|
|
|
24
24
|
CONTENTID = "content_id",
|
|
25
25
|
CONTENTTYPE = "content_type",
|
|
26
26
|
CONTENTSLUG = "content_slug",
|
|
27
|
-
BRANDSAFETY = "brand_safety"
|
|
27
|
+
BRANDSAFETY = "brand_safety",
|
|
28
|
+
HASVIDEO = "has_video"
|
|
28
29
|
}
|
|
29
30
|
export declare enum SpecificTargetingKeys {
|
|
30
31
|
POS = "pos"
|
|
@@ -39,4 +40,5 @@ export interface GlobalTargetingType {
|
|
|
39
40
|
category?: string;
|
|
40
41
|
sub_category?: string;
|
|
41
42
|
brand_safety?: string;
|
|
43
|
+
has_video?: string;
|
|
42
44
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sponsoredContentManager: () => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BoxProps, type ButtonProps, LayoutType, type LiveTalkProps, type LiveTitleProps } from '@20minutes/hela';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { LiveStateType } from '../../../types/graphql';
|
|
3
4
|
import type { RawDraftContentState } from 'draft-js';
|
|
4
5
|
export interface LivePostsThreadProps extends BoxProps {
|
|
5
6
|
posts: {
|
|
@@ -18,5 +19,9 @@ export interface LivePostsThreadProps extends BoxProps {
|
|
|
18
19
|
endCursor: string | null;
|
|
19
20
|
hasNextPage: boolean;
|
|
20
21
|
};
|
|
22
|
+
refreshButton?: {
|
|
23
|
+
state: LiveStateType;
|
|
24
|
+
latestPostId: number;
|
|
25
|
+
};
|
|
21
26
|
}
|
|
22
27
|
export declare const LivePostsThread: React.FC<LivePostsThreadProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LiveRefreshButtonContainer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type LayoutType } from '@20minutes/hela';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
interface AdPositions {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
aboveSponsoredContent?: React.ReactNode;
|
|
5
|
+
belowSponsoredContent?: React.ReactNode;
|
|
6
6
|
aboveFooter?: React.ReactNode;
|
|
7
7
|
belowFooter?: React.ReactNode;
|
|
8
8
|
stickyAside?: React.ReactNode;
|
|
@@ -2,7 +2,7 @@ import { LayoutType } from '@20minutes/hela';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type CommonTemplateActivators, PageManager } from './PageManager';
|
|
4
4
|
import type { ArticlePageProps } from '../pages/ArticlePage';
|
|
5
|
-
type ArticlePageTemplateActivators = 'DisplayOnHeaderAd' | 'InArticleAds' | '
|
|
5
|
+
type ArticlePageTemplateActivators = 'DisplayOnHeaderAd' | 'InArticleAds' | 'Audion' | 'SponsoredContent' | CommonTemplateActivators;
|
|
6
6
|
type SelectedProps = 'articleContent' | 'cover' | 'htmlTemplateProps';
|
|
7
7
|
type ArticlePageFilteredProps = Pick<ArticlePageProps, SelectedProps>;
|
|
8
8
|
interface ArticleContent {
|
|
@@ -7,8 +7,8 @@ export declare abstract class PageManager<PageProps = Record<string, unknown>, S
|
|
|
7
7
|
protected templateActivators: {
|
|
8
8
|
enableDisplayOnHeaderAd: boolean;
|
|
9
9
|
enableInArticleAds: boolean;
|
|
10
|
-
enableOutbrain: boolean;
|
|
11
10
|
enableAudion: boolean;
|
|
11
|
+
enableSponsoredContent: boolean;
|
|
12
12
|
} & { [key in NonNullable<Prefix<"enable", PageFeatures>>]: boolean; };
|
|
13
13
|
protected constructor({ data, layout, templateActivators, }: {
|
|
14
14
|
data: Pick<PageProps, SelectedProps>;
|
|
@@ -24,8 +24,8 @@ export declare abstract class PageManager<PageProps = Record<string, unknown>, S
|
|
|
24
24
|
templateActivators: {
|
|
25
25
|
enableDisplayOnHeaderAd: boolean;
|
|
26
26
|
enableInArticleAds: boolean;
|
|
27
|
-
enableOutbrain: boolean;
|
|
28
27
|
enableAudion: boolean;
|
|
28
|
+
enableSponsoredContent: boolean;
|
|
29
29
|
} & { [key in NonNullable<Prefix<"enable", PageFeatures>>]: boolean; };
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -10,7 +10,6 @@ export interface ContentTemplateProps extends PageTemplateProps {
|
|
|
10
10
|
cover?: React.ReactNode;
|
|
11
11
|
socialBar: React.ReactNode;
|
|
12
12
|
signature?: React.ReactNode;
|
|
13
|
-
liveRefreshButton?: React.ReactNode;
|
|
14
13
|
summary?: React.ReactNode;
|
|
15
14
|
topContent?: React.ReactNode;
|
|
16
15
|
readAlsoBlockAbove?: React.ReactNode;
|
|
@@ -29,7 +28,7 @@ export interface ContentTemplateProps extends PageTemplateProps {
|
|
|
29
28
|
templating?: {
|
|
30
29
|
enableInArticleAds: boolean;
|
|
31
30
|
enableAds: boolean;
|
|
32
|
-
|
|
31
|
+
enableSponsoredContent: boolean;
|
|
33
32
|
enableBlockLinks: boolean;
|
|
34
33
|
enableAudion: boolean;
|
|
35
34
|
};
|
|
@@ -17384,6 +17384,7 @@ export type TGetLivePostsQuery = {
|
|
|
17384
17384
|
node?: {
|
|
17385
17385
|
__typename?: 'Live';
|
|
17386
17386
|
legacy_id?: number | null;
|
|
17387
|
+
state?: LiveStateType | null;
|
|
17387
17388
|
livePosts?: {
|
|
17388
17389
|
__typename?: 'LivePostListConnection';
|
|
17389
17390
|
totalCount?: number | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@20minutes/tyr",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"repository": "git@github.com:20minutes/tyr.git",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "20 Minutes",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@20minutes/eslint-config": "^1.2.6",
|
|
72
|
-
"@aws-sdk/client-s3": "3.
|
|
72
|
+
"@aws-sdk/client-s3": "3.515.0",
|
|
73
73
|
"@babel/core": "^7.23.9",
|
|
74
74
|
"@graphql-codegen/cli": "^5.0.2",
|
|
75
75
|
"@graphql-codegen/typescript": "^4.0.4",
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
80
80
|
"@rollup/plugin-replace": "^5.0.5",
|
|
81
81
|
"@rollup/plugin-terser": "^0.4.4",
|
|
82
|
-
"@storybook/addon-actions": "^7.6.
|
|
83
|
-
"@storybook/addon-essentials": "^7.6.
|
|
84
|
-
"@storybook/addon-interactions": "^7.6.
|
|
85
|
-
"@storybook/addon-links": "^7.6.
|
|
86
|
-
"@storybook/addon-mdx-gfm": "^7.6.
|
|
87
|
-
"@storybook/react": "^7.6.
|
|
88
|
-
"@storybook/react-vite": "^7.6.
|
|
82
|
+
"@storybook/addon-actions": "^7.6.16",
|
|
83
|
+
"@storybook/addon-essentials": "^7.6.16",
|
|
84
|
+
"@storybook/addon-interactions": "^7.6.16",
|
|
85
|
+
"@storybook/addon-links": "^7.6.16",
|
|
86
|
+
"@storybook/addon-mdx-gfm": "^7.6.16",
|
|
87
|
+
"@storybook/react": "^7.6.16",
|
|
88
|
+
"@storybook/react-vite": "^7.6.16",
|
|
89
89
|
"@storybook/testing-library": "0.2.2",
|
|
90
90
|
"@testing-library/jest-dom": "^6.4.2",
|
|
91
91
|
"@testing-library/react": "^14.2.1",
|
|
@@ -124,14 +124,14 @@
|
|
|
124
124
|
"prettier": "^3.2.5",
|
|
125
125
|
"purgecss": "^5.0.0",
|
|
126
126
|
"purgecss-from-html": "^5.0.0",
|
|
127
|
-
"rollup": "^4.
|
|
127
|
+
"rollup": "^4.11.0",
|
|
128
128
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
129
129
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
130
130
|
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
131
131
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
132
132
|
"schema-dts": "^1.1.2",
|
|
133
133
|
"start-server-and-test": "^2.0.3",
|
|
134
|
-
"storybook": "^7.6.
|
|
134
|
+
"storybook": "^7.6.16",
|
|
135
135
|
"ts-node": "^10.9.2",
|
|
136
136
|
"tsconfig-paths": "^4.2.0",
|
|
137
137
|
"typescript": "^4.9.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const outbrainManager: () => void;
|