@20minutes/tyr 1.1.0 → 1.3.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.
Files changed (35) hide show
  1. package/dist/css/articlePage-mobile-critical.css +1 -1
  2. package/dist/css/articlePage-mobile-no-critical.css +1 -1
  3. package/dist/css/homePage-desktop-critical.css +1 -1
  4. package/dist/css/homePage-desktop-no-critical.css +1 -1
  5. package/dist/css/homePage-mobile-critical.css +1 -1
  6. package/dist/css/homePage-mobile-no-critical.css +1 -1
  7. package/dist/css/videosPage-desktop-critical.css +1 -0
  8. package/dist/css/videosPage-desktop-no-critical.css +1 -0
  9. package/dist/css/videosPage-mobile-critical.css +1 -0
  10. package/dist/css/videosPage-mobile-no-critical.css +1 -0
  11. package/dist/index.es.js +11794 -11605
  12. package/dist/index.umd.js +103 -103
  13. package/dist/js/ads.min.js +2 -2
  14. package/dist/js/main.min.js +6 -6
  15. package/dist/src/assets/main/concern.d.ts +1 -0
  16. package/dist/src/assets/thirdParties/ads/dfpAdSlots.d.ts +1 -0
  17. package/dist/src/assets/thirdParties/ads/types/TargetingType.d.ts +3 -1
  18. package/dist/src/assets/thirdParties/ownpage.d.ts +1 -0
  19. package/dist/src/components/organisms/LivePostsThread/LivePostsThread.d.ts +5 -0
  20. package/dist/src/config/componentConfigs/componentVideosConfigs.d.ts +2 -0
  21. package/dist/src/config/pageConfigs/videosPageConfig.d.ts +2 -0
  22. package/dist/src/containers/LiveRefreshButtonContainer/LiveRefreshButtonContainer.d.ts +2 -0
  23. package/dist/src/containers/LiveRefreshButtonContainer/index.d.ts +1 -0
  24. package/dist/src/pages/VideosPage/VideosPage.d.ts +8 -0
  25. package/dist/src/pages/VideosPage/VideosPage.stories.d.ts +7 -0
  26. package/dist/src/pages/VideosPage/index.d.ts +1 -0
  27. package/dist/src/pages/index.d.ts +1 -0
  28. package/dist/src/templates/ContentTemplate/ContentTemplate.d.ts +0 -1
  29. package/dist/src/types/ComponentConfig.d.ts +6 -1
  30. package/dist/src/types/PageConfig.d.ts +4 -2
  31. package/dist/src/types/ThirdParties/Ownpage.d.ts +3 -0
  32. package/dist/src/types/ThirdParties/index.d.ts +4 -1
  33. package/dist/src/types/Window.d.ts +2 -3
  34. package/dist/src/types/graphql.d.ts +1 -0
  35. package/package.json +17 -17
@@ -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 initOwnpage: () => 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,2 @@
1
+ import { type ComponentConfig, ComponentNameVideos } from '../../types';
2
+ export declare const COMPONENT_VIDEOS_CONFIGS: ComponentConfig<ComponentNameVideos>[];
@@ -0,0 +1,2 @@
1
+ import { type VideosPageConfig } from '../../types';
2
+ export declare const VIDEOS_PAGE_CONFIG: VideosPageConfig;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const LiveRefreshButtonContainer: React.FC;
@@ -0,0 +1 @@
1
+ export * from './LiveRefreshButtonContainer';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { type PageTemplateProps } from '../../templates';
3
+ export interface VideosPageProps extends PageTemplateProps {
4
+ breadcrumb: React.ReactNode;
5
+ headerPage: React.ReactNode;
6
+ tvBlock: React.ReactNode;
7
+ }
8
+ export declare const VideosPage: React.FC<VideosPageProps>;
@@ -0,0 +1,7 @@
1
+ import { VideosPage } from './VideosPage';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ declare const meta: Meta<typeof VideosPage>;
4
+ type Story = StoryObj<typeof VideosPage>;
5
+ export declare const VideosPageDesktop: Story;
6
+ export declare const VideosPageMobile: Story;
7
+ export default meta;
@@ -0,0 +1 @@
1
+ export * from './VideosPage';
@@ -13,4 +13,5 @@ export * from './PartnerPage';
13
13
  export * from './SearchPage';
14
14
  export * from './TagPage';
15
15
  export * from './TrafficPage';
16
+ export * from './VideosPage';
16
17
  export * from './WeatherPage';
@@ -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;
@@ -80,6 +80,11 @@ export declare const enum ComponentNameHome {
80
80
  HOME_CITY_BY_CITY = "home/city-by-city",
81
81
  HOME_PARTNERS = "home/partners"
82
82
  }
83
+ export declare const enum ComponentNameVideos {
84
+ VIDEOS_HEADER_PAGE = "videos/header-page",
85
+ VIDEOS_BREADCRUMB = "videos/breadcrumb",
86
+ VIDEOS_TV_BLOCK = "videos/tv-block"
87
+ }
83
88
  export declare const enum ComponentNameContact {
84
89
  CONTACT_BREADCRUMB = "contact/breadcrumb",
85
90
  CONTACT_ADDRESSES = "contact/addresses",
@@ -156,7 +161,7 @@ export declare const enum ComponentNameWeather {
156
161
  WEATHER_JSON_LD_BREADCRUMB = "weather/json-ld-breadcrumb",
157
162
  WEATHER_META = "weather/meta"
158
163
  }
159
- export interface ComponentConfig<TComponentName = ComponentNameArticle | ComponentNameCommon | ComponentNameContact | ComponentNameContent | ComponentNameDirect | ComponentNameElections | ComponentNameError | ComponentNameHome | ComponentNameHoroscope | ComponentNameJobs | ComponentNameLive | ComponentNameRubric | ComponentNameSearch | ComponentNameTag | ComponentNameTraffic | ComponentNameWeather, TComponent = React.FC<any>> {
164
+ export interface ComponentConfig<TComponentName = ComponentNameArticle | ComponentNameCommon | ComponentNameContact | ComponentNameContent | ComponentNameDirect | ComponentNameElections | ComponentNameError | ComponentNameHome | ComponentNameHoroscope | ComponentNameJobs | ComponentNameLive | ComponentNameRubric | ComponentNameSearch | ComponentNameTag | ComponentNameTraffic | ComponentNameVideos | ComponentNameWeather, TComponent = React.FC<any>> {
160
165
  componentName: TComponentName;
161
166
  component: TComponent;
162
167
  expiration?: number;
@@ -1,6 +1,6 @@
1
- import type { ArticlePage, ArticlePageProps, ContactPage, ContactPageProps, DirectPage, DirectPageProps, ElectionsPage, ElectionsPageProps, ErrorPage, ErrorPageProps, HomePage, HomePageProps, HoroscopeHomePage, HoroscopeHomePageProps, HoroscopePage, HoroscopePageProps, JobDetailsPage, JobDetailsPageProps, JobsPage, JobsPageProps, LivePage, LivePageProps, PartnerPage, SearchPage, SearchPageProps, TagPage, TagPageProps, TrafficPage, TrafficPageProps, WeatherPage, WeatherPageProps } from '../pages';
1
+ import type { ArticlePage, ArticlePageProps, ContactPage, ContactPageProps, DirectPage, DirectPageProps, ElectionsPage, ElectionsPageProps, ErrorPage, ErrorPageProps, HomePage, HomePageProps, HoroscopeHomePage, HoroscopeHomePageProps, HoroscopePage, HoroscopePageProps, JobDetailsPage, JobDetailsPageProps, JobsPage, JobsPageProps, LivePage, LivePageProps, PartnerPage, SearchPage, SearchPageProps, TagPage, TagPageProps, TrafficPage, TrafficPageProps, VideosPage, VideosPageProps, WeatherPage, WeatherPageProps } from '../pages';
2
2
  import type { PageTemplateProps } from '../templates';
3
- import type { ComponentNameArticle, ComponentNameCommon, ComponentNameContact, ComponentNameContent, ComponentNameDirect, ComponentNameElections, ComponentNameError, ComponentNameHome, ComponentNameHoroscope, ComponentNameJobs, ComponentNameLive, ComponentNameRubric, ComponentNameSearch, ComponentNameTag, ComponentNameTraffic, ComponentNameWeather } from './ComponentConfig';
3
+ import type { ComponentNameArticle, ComponentNameCommon, ComponentNameContact, ComponentNameContent, ComponentNameDirect, ComponentNameElections, ComponentNameError, ComponentNameHome, ComponentNameHoroscope, ComponentNameJobs, ComponentNameLive, ComponentNameRubric, ComponentNameSearch, ComponentNameTag, ComponentNameTraffic, ComponentNameVideos, ComponentNameWeather } from './ComponentConfig';
4
4
  export interface PageComponentConfig<TComponentName = string, TPropName = string> {
5
5
  name: TComponentName;
6
6
  propName: TPropName;
@@ -29,6 +29,7 @@ export type SearchPageConfig = PageConfig<'search', typeof SearchPage, Component
29
29
  export type TagPageConfig = PageConfig<'tag', typeof TagPage, ComponentNameCommon | ComponentNameTag, keyof TagPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload' | 'preload'>;
30
30
  export type TrafficPageConfig = PageConfig<'traffic', typeof TrafficPage, ComponentNameCommon | ComponentNameRubric | ComponentNameTraffic, keyof TrafficPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload'>;
31
31
  export type WeatherPageConfig = PageConfig<'weather', typeof WeatherPage, ComponentNameCommon | ComponentNameRubric | ComponentNameWeather, keyof WeatherPageProps | 'meta' | 'jsonLdBreadcrumb' | 'defaultPreload'>;
32
+ export type VideosPageConfig = PageConfig<'videos', typeof VideosPage, ComponentNameCommon | ComponentNameVideos, keyof VideosPageProps | 'meta' | 'defaultPreload'>;
32
33
  export type PageConfigs = [
33
34
  ArticlePageConfig,
34
35
  ContactPageConfig,
@@ -45,6 +46,7 @@ export type PageConfigs = [
45
46
  SearchPageConfig,
46
47
  TagPageConfig,
47
48
  TrafficPageConfig,
49
+ VideosPageConfig,
48
50
  WeatherPageConfig
49
51
  ];
50
52
  export type PageConfigAvailable = PageConfigs[number];
@@ -0,0 +1,3 @@
1
+ export interface OwnpageType {
2
+ trackPage: (key: string) => void;
3
+ }
@@ -1,4 +1,7 @@
1
1
  export * from './AtInternet';
2
+ export * from './Chartbeat';
2
3
  export * from './Cmp';
3
- export * from './Hubvisor';
4
4
  export * from './Helpers';
5
+ export * from './Hubvisor';
6
+ export * from './Ownpage';
7
+ export * from './Paywall';
@@ -8,11 +8,9 @@ import type { LivePostsThreadProps } from '../components/organisms/LivePostsThre
8
8
  import type { LocalNewsProps } from '../components/organisms/LocalNews';
9
9
  import type { MostReadArticlesProps } from '../components/organisms/MostReadArticles';
10
10
  import type { VariablesSmartPlayerDigitekaType } from './Digiteka';
11
- import type { ATInternetType, ATPageInfo, CmpType, HubvisorType, Tag, ThirdPartiesConfigType, VariablesCmpType } from './ThirdParties';
12
- import type { ChartbeatConfigType } from './ThirdParties/Chartbeat';
11
+ import type { ATInternetType, ATPageInfo, ChartbeatConfigType, CmpType, HubvisorType, OwnpageType, PayWallAccess, Tag, ThirdPartiesConfigType, VariablesCmpType } from './ThirdParties';
13
12
  import type { AwsRumVariablesType } from './AwsRumVariablesType';
14
13
  import type { EnvVariablesType } from './EnvVariablesType';
15
- import type { PayWallAccess } from './ThirdParties/Paywall';
16
14
  import type { LayoutType } from '@20minutes/hela';
17
15
  import type { AwsRum } from 'aws-rum-web';
18
16
  import type ReactDOMClient from 'react-dom/client';
@@ -33,6 +31,7 @@ declare global {
33
31
  cmpVariables: CmpType;
34
32
  ATInternet: ATInternetType;
35
33
  Hubvisor: HubvisorType;
34
+ Ownpage: OwnpageType;
36
35
  ATTag: Tag;
37
36
  ATPageInfo: ATPageInfo;
38
37
  adsapp: boolean;
@@ -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.1.0",
3
+ "version": "1.3.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.514.0",
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,30 +79,30 @@
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.15",
83
- "@storybook/addon-essentials": "^7.6.15",
84
- "@storybook/addon-interactions": "^7.6.15",
85
- "@storybook/addon-links": "^7.6.15",
86
- "@storybook/addon-mdx-gfm": "^7.6.15",
87
- "@storybook/react": "^7.6.15",
88
- "@storybook/react-vite": "^7.6.15",
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",
92
92
  "@types/draft-convert": "^2.1.8",
93
93
  "@types/draft-js": "^0.11.17",
94
- "@types/googletag": "^3.1.2",
94
+ "@types/googletag": "^3.1.3",
95
95
  "@types/jsdom": "^21.1.6",
96
- "@types/react": "^18.2.55",
96
+ "@types/react": "^18.2.56",
97
97
  "@types/react-dom": "^18.2.19",
98
98
  "@types/sinon": "^17.0.3",
99
99
  "@typescript-eslint/eslint-plugin": "^7.0.1",
100
100
  "@typescript-eslint/parser": "^7.0.1",
101
101
  "@vitejs/plugin-react": "^4.2.1",
102
- "@vitest/coverage-v8": "^1.2.2",
102
+ "@vitest/coverage-v8": "^1.3.0",
103
103
  "babel-loader": "^9.1.3",
104
104
  "cypress": "13.6.4",
105
- "cypress-each": "^1.13.3",
105
+ "cypress-each": "^1.14.0",
106
106
  "eslint": "^8.56.0",
107
107
  "eslint-config-airbnb": "^19.0.4",
108
108
  "eslint-config-prettier": "^9.1.0",
@@ -115,7 +115,7 @@
115
115
  "eslint-plugin-prettier": "^5.1.3",
116
116
  "eslint-plugin-react": "^7.33.2",
117
117
  "eslint-plugin-simple-import-sort": "^12.0.0",
118
- "eslint-plugin-storybook": "^0.6.15",
118
+ "eslint-plugin-storybook": "^0.8.0",
119
119
  "graphql": "^16.8.1",
120
120
  "http-server": "^14.1.1",
121
121
  "husky": "^9.0.11",
@@ -124,20 +124,20 @@
124
124
  "prettier": "^3.2.5",
125
125
  "purgecss": "^5.0.0",
126
126
  "purgecss-from-html": "^5.0.0",
127
- "rollup": "^4.10.0",
127
+ "rollup": "^4.12.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.15",
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",
138
138
  "vite": "^4.5.2",
139
139
  "vite-plugin-dts": "^3.7.2",
140
140
  "vite-tsconfig-paths": "^4.3.1",
141
- "vitest": "1.2.2"
141
+ "vitest": "1.3.0"
142
142
  }
143
143
  }