@20minutes/tyr 0.1.85 → 0.1.87

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 (64) hide show
  1. package/dist/assets/scripts/helpers/ajax.d.ts +3 -0
  2. package/dist/components/organisms/TagPage/TagPageArticlesList.d.ts +10 -3
  3. package/dist/containers/ArticleListBottomContainer/ArticleListBottomContainer.d.ts +3 -0
  4. package/dist/containers/ArticleListBottomContainer/index.d.ts +1 -0
  5. package/dist/css/articlePage-desktop-critical.css +1 -1
  6. package/dist/css/articlePage-mobile-critical.css +1 -1
  7. package/dist/css/articlePage-mobile-no-critical.css +1 -1
  8. package/dist/css/errorPage-desktop-critical.css +1 -1
  9. package/dist/css/errorPage-desktop-no-critical.css +1 -1
  10. package/dist/css/errorPage-mobile-no-critical.css +1 -1
  11. package/dist/css/global.css +1 -1
  12. package/dist/css/horoscopePage-desktop-critical.css +1 -1
  13. package/dist/css/horoscopePage-desktop-no-critical.css +1 -1
  14. package/dist/css/horoscopePage-mobile-no-critical.css +1 -1
  15. package/dist/css/horoscopehomePage-desktop-critical.css +1 -1
  16. package/dist/css/horoscopehomePage-desktop-no-critical.css +1 -1
  17. package/dist/css/horoscopehomePage-mobile-no-critical.css +1 -1
  18. package/dist/css/searchPage-desktop-critical.css +1 -1
  19. package/dist/css/searchPage-desktop-no-critical.css +1 -1
  20. package/dist/css/searchPage-mobile-no-critical.css +1 -1
  21. package/dist/css/tagPage-desktop-critical.css +1 -1
  22. package/dist/css/tagPage-desktop-no-critical.css +1 -1
  23. package/dist/css/tagPage-mobile-no-critical.css +1 -1
  24. package/dist/helpers/assetsHelper.d.ts +10 -0
  25. package/dist/helpers/base64Helper.d.ts +2 -0
  26. package/dist/helpers/dateHelper.d.ts +2 -0
  27. package/dist/helpers/globalIdHelper.d.ts +2 -0
  28. package/dist/helpers/helaHelper.d.ts +3 -0
  29. package/dist/helpers/index.d.ts +1 -3
  30. package/dist/helpers/transformQueryResultIntoPropsHelper.d.ts +9 -0
  31. package/dist/helpers/url.d.ts +3 -0
  32. package/dist/index.d.ts +5 -0
  33. package/dist/index.es.js +13671 -13458
  34. package/dist/index.umd.js +134 -134
  35. package/dist/js/atinternet.min.js +1 -1
  36. package/dist/js/awsRum.min.js +5 -5
  37. package/dist/js/datalayer.min.js +1 -1
  38. package/dist/js/main.min.js +38 -38
  39. package/dist/js/react-and-react-dom.min.js +33212 -397
  40. package/dist/managers/article/ArticlePageManager.d.ts +1 -1
  41. package/dist/templates/HtmlTemplate/HtmlTemplate.d.ts +2 -2
  42. package/dist/types/{ThirdParties/DataLayer → DataLayer}/DataLayerType.d.ts +2 -2
  43. package/dist/types/DataLayer/VariablesDataLayerType.d.ts +23 -0
  44. package/dist/types/EnvVariablesType.d.ts +2 -0
  45. package/dist/types/PageConfig.d.ts +1 -1
  46. package/dist/types/graphql.d.ts +13386 -0
  47. package/dist/types/index.d.ts +1 -1
  48. package/package.json +16 -10
  49. package/dist/types/ThirdParties/Ads/AdSizesType.d.ts +0 -83
  50. package/dist/types/ThirdParties/Ads/SlotType.d.ts +0 -5
  51. package/dist/types/ThirdParties/Ads/TargetingType.d.ts +0 -26
  52. package/dist/types/ThirdParties/Ads/index.d.ts +0 -3
  53. package/dist/types/ThirdParties/AtInternet.d.ts +0 -56
  54. package/dist/types/ThirdParties/Cmp/Didomi.d.ts +0 -31
  55. package/dist/types/ThirdParties/Cmp/VariablesCmpType.d.ts +0 -8
  56. package/dist/types/ThirdParties/Cmp/index.d.ts +0 -2
  57. package/dist/types/ThirdParties/DataLayer/VariablesDataLayerType.d.ts +0 -14
  58. package/dist/types/ThirdParties/Digiteka.d.ts +0 -6
  59. package/dist/types/ThirdParties/Hubvisor.d.ts +0 -4
  60. package/dist/types/ThirdParties/index.d.ts +0 -6
  61. package/dist/types/Window.d.ts +0 -28
  62. /package/dist/types/{ThirdParties/DataLayer → DataLayer}/DefaultDataLayerType.d.ts +0 -0
  63. /package/dist/types/{ThirdParties/DataLayer → DataLayer}/UserDataLayerType.d.ts +0 -0
  64. /package/dist/types/{ThirdParties/DataLayer → DataLayer}/index.d.ts +0 -0
@@ -1,3 +1,3 @@
1
1
  export * from './ComponentConfig';
2
2
  export * from './PageConfig';
3
- export * from './Window';
3
+ export * from './DataLayer';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@20minutes/tyr",
3
- "version": "0.1.85",
3
+ "version": "0.1.87",
4
4
  "repository": "git@github.com:20minutes/tyr.git",
5
5
  "license": "MIT",
6
6
  "author": "20 Minutes",
@@ -25,7 +25,8 @@
25
25
  ],
26
26
  "scripts": {
27
27
  "prepare": "husky install && ts-node scripts/copyAssets",
28
- "build:library": "yarn vite build && rollup -c && ts-node scripts/buildStylesForPage",
28
+ "update-schema": "graphql-codegen -r dotenv/config",
29
+ "build:library": "yarn vite build && rollup -c && ts-node --transpileOnly scripts/buildStylesForPage",
29
30
  "storybook": "start-storybook -p 6007",
30
31
  "build:storybook": "build-storybook",
31
32
  "lint": "eslint --ext .js,.ts,.tsx src scripts tests",
@@ -43,8 +44,8 @@
43
44
  "node": ">=16"
44
45
  },
45
46
  "dependencies": {
46
- "@20minutes/hela": "^0.1.75",
47
- "aws-rum-web": "^1.13.4",
47
+ "@20minutes/hela": "^0.1.80",
48
+ "aws-rum-web": "^1.13.6",
48
49
  "html-entities": "^2.3.3",
49
50
  "node-html-parser": "^6.1.5",
50
51
  "react": "^18.2.0",
@@ -53,6 +54,9 @@
53
54
  "devDependencies": {
54
55
  "@20minutes/eslint-config": "^1.2.4",
55
56
  "@babel/core": "^7.21.3",
57
+ "@graphql-codegen/cli": "^3.2.2",
58
+ "@graphql-codegen/typescript": "^3.0.2",
59
+ "@graphql-codegen/typescript-operations": "^3.0.2",
56
60
  "@rollup/plugin-commonjs": "^24.0.1",
57
61
  "@rollup/plugin-node-resolve": "^15.0.1",
58
62
  "@rollup/plugin-replace": "^5.0.2",
@@ -67,13 +71,13 @@
67
71
  "@types/jest": "^29.5.0",
68
72
  "@types/react": "^18.0.28",
69
73
  "@types/react-dom": "^18.0.11",
70
- "@typescript-eslint/eslint-plugin": "^5.55.0",
71
- "@typescript-eslint/parser": "^5.55.0",
74
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
75
+ "@typescript-eslint/parser": "^5.56.0",
72
76
  "@vitejs/plugin-react": "^3.1.0",
73
77
  "babel-loader": "^9.1.2",
74
78
  "eslint": "^8.36.0",
75
79
  "eslint-config-airbnb": "^19.0.4",
76
- "eslint-config-prettier": "^8.7.0",
80
+ "eslint-config-prettier": "^8.8.0",
77
81
  "eslint-import-resolver-typescript": "^3.5.3",
78
82
  "eslint-plugin-babel": "^5.3.1",
79
83
  "eslint-plugin-import": "^2.27.5",
@@ -81,12 +85,13 @@
81
85
  "eslint-plugin-prettier": "^4.2.1",
82
86
  "eslint-plugin-react": "^7.32.2",
83
87
  "eslint-plugin-simple-import-sort": "^10.0.0",
88
+ "graphql": "^16.6.0",
84
89
  "husky": "^8.0.3",
85
90
  "jest": "^29.5.0",
86
91
  "lint-staged": "^13.2.0",
87
- "prettier": "^2.8.4",
92
+ "prettier": "^2.8.6",
88
93
  "purgecss": "^5.0.0",
89
- "rollup": "^3.19.1",
94
+ "rollup": "^3.20.0",
90
95
  "rollup-plugin-cleanup": "^3.2.1",
91
96
  "rollup-plugin-commonjs": "^10.1.0",
92
97
  "rollup-plugin-esbuild": "^5.0.0",
@@ -94,8 +99,9 @@
94
99
  "rollup-plugin-visualizer": "^5.9.0",
95
100
  "ts-jest": "^29.0.5",
96
101
  "ts-node": "^10.9.1",
102
+ "tsconfig-paths": "^4.1.2",
97
103
  "typescript": "^4.9.5",
98
- "vite": "^4.2.0",
104
+ "vite": "^4.2.1",
99
105
  "vite-plugin-dts": "^2.1.0",
100
106
  "vite-tsconfig-paths": "^4.0.7"
101
107
  }
@@ -1,83 +0,0 @@
1
- export declare const adSizesList: {
2
- desktop: {
3
- article: {
4
- BAN_ATF: string;
5
- BAN_BTF: string;
6
- BAN_MTF: string;
7
- INREAD: string;
8
- INSTREAM_DESKTOP: string;
9
- PAVE_ARTICLE: string;
10
- PAVE_ATF: string;
11
- PAVE_BTF: string;
12
- PAVE_COM: string;
13
- PAVE_MTF: string;
14
- };
15
- divers: {
16
- BAN_ATF: string;
17
- BAN_BTF: string;
18
- BAN_MTF: string;
19
- INREAD: string;
20
- PAVE_ARTICLE: string;
21
- PAVE_ATF: string;
22
- PAVE_BTF: string;
23
- PAVE_COM: string;
24
- PAVE_MTF: string;
25
- };
26
- horoscope: {
27
- BAN_ATF: string;
28
- BAN_BTF: string;
29
- BAN_MTF: string;
30
- INREAD: string;
31
- PAVE_ARTICLE: string;
32
- PAVE_ATF: string;
33
- PAVE_BTF: string;
34
- PAVE_COM: string;
35
- PAVE_MTF: string;
36
- };
37
- };
38
- mobile: {
39
- article: {
40
- ARTICLE_ATF: string;
41
- ARTICLE_BTF: string;
42
- ARTICLE_MTF: string;
43
- HEADER_AD: string;
44
- INREAD: string;
45
- INSTREAM_DESKTOP: string;
46
- INTRASTITIEL_GAG: string;
47
- INTRASTITIEL_PROG: string;
48
- PAVE_COM: string;
49
- };
50
- divers: {
51
- ARTICLE_ATF: string;
52
- ARTICLE_BTF: string;
53
- ARTICLE_MTF: string;
54
- HEADER_AD: string;
55
- INREAD: string;
56
- INTRASTITIEL_GAG: string;
57
- INTRASTITIEL_PROG: string;
58
- NFB_1: string;
59
- NFB_2: string;
60
- };
61
- horoscope: {
62
- ARTICLE_ATF: string;
63
- ARTICLE_BTF: string;
64
- ARTICLE_MTF: string;
65
- HEADER_AD: string;
66
- INREAD: string;
67
- INTRASTITIEL_GAG: string;
68
- INTRASTITIEL_PROG: string;
69
- NFB_1: string;
70
- NFB_2: string;
71
- };
72
- };
73
- };
74
- export declare enum AdPagesTypeEnum {
75
- 'article' = 0,
76
- 'divers' = 1,
77
- 'horoscope' = 2
78
- }
79
- export type AdSizesType = {
80
- desktop: keyof (typeof adSizesList)['desktop']['article'] & keyof (typeof adSizesList)['desktop']['divers'] & keyof (typeof adSizesList)['desktop']['horoscope'];
81
- mobile: keyof (typeof adSizesList)['mobile']['article'] & keyof (typeof adSizesList)['mobile']['divers'] & keyof (typeof adSizesList)['mobile']['horoscope'];
82
- };
83
- export type AdPagesType = keyof typeof AdPagesTypeEnum;
@@ -1,5 +0,0 @@
1
- export type SlotType = {
2
- slotElementId: string;
3
- path: string;
4
- sizes: string;
5
- };
@@ -1,26 +0,0 @@
1
- export declare enum pageType {
2
- UNKNOWN = "Non connu",
3
- SLIDESHOW_COVER = "Slideshow cover",
4
- SLIDESHOW_COVER_LISTING_PAGE = "Slideshow listing page",
5
- SLIDESHOW_PAGE = "Slideshow page",
6
- ARTICLE = "article",
7
- MISC = "divers",
8
- HOME = "home",
9
- LIVE = "live",
10
- SECTION = "section",
11
- TAG = "tag"
12
- }
13
- export declare enum tagsType {
14
- MISC = "divers",
15
- HOME = "home",
16
- LOCAL = "local",
17
- PLANET = "plan\u00E8te"
18
- }
19
- export declare enum targetingKeys {
20
- PAGETYPE = "pageType",
21
- TAGS = "tags"
22
- }
23
- export type TargetingType = {
24
- pageType: string;
25
- tags: string;
26
- };
@@ -1,3 +0,0 @@
1
- export * from './SlotType';
2
- export * from './AdSizesType';
3
- export * from './TargetingType';
@@ -1,56 +0,0 @@
1
- type Privacy = {
2
- setVisitorMode: (authority: string, mode: string) => void;
3
- getVisitorMode: () => Record<string, unknown>;
4
- setVisitorOptin: () => void;
5
- };
6
- type CustomVars = {
7
- set: (arg0: {
8
- site: Record<number, unknown>;
9
- }) => void;
10
- };
11
- type Props = Record<string, string | boolean>;
12
- type IdentifiedVisitor = {
13
- set: (arg0: Record<string, unknown>) => void;
14
- };
15
- type PageDefaultKeys = {
16
- name: string;
17
- chapter1: string;
18
- chapter2: string;
19
- chapter3: string;
20
- customObject: {
21
- device: string;
22
- };
23
- };
24
- export type EventObject = {
25
- elem: HTMLElement;
26
- type: string;
27
- name: string;
28
- chapter1: string;
29
- chapter2: string;
30
- chapter3: string;
31
- };
32
- export type Tag = {
33
- privacy: Privacy;
34
- identifiedVisitor: IdentifiedVisitor;
35
- customVars: CustomVars;
36
- page: {
37
- set: (pageDefaultKeys: PageDefaultKeys) => void;
38
- };
39
- setProps: (props: Props, persistent: boolean) => void;
40
- dispatch: () => void;
41
- click: {
42
- send: (eventObject: EventObject) => void;
43
- };
44
- };
45
- interface TagConstructor {
46
- new (): Tag;
47
- }
48
- export interface Tracker {
49
- Tag: TagConstructor;
50
- instances?: Tag[];
51
- }
52
- export type ATInternetType = {
53
- Tracker?: Tracker;
54
- onTrackerLoad: () => void;
55
- };
56
- export {};
@@ -1,31 +0,0 @@
1
- type Purposes = 'Cookies' | 'CookiesAnalytics' | 'CookiesSocial' | 'AdvertisingPersonalization' | 'CookiesMarketing' | 'Analytics' | 'ContentPersonalization' | 'AdDelivery' | 'DeviceAccess' | 'OfflineMatch' | 'LinkDevices' | 'PreciseGeo' | 'SelectBasicAds' | 'CreateAdsProfile' | 'SelectPersonalizedAds' | 'CreateContentProfile' | 'SelectPersonalizedContent' | 'MeasureAdPerformance' | 'MeasureContentPerformance' | 'MarketResearch' | 'ImproveProducts' | 'mesureda-6qyqaZXC' | 'publicite-Nfb9aWMW' | 'publicite-9qedKJMX';
2
- type PurposesList = {
3
- [key in Purposes]: string;
4
- };
5
- type Notice = {
6
- show: () => void;
7
- };
8
- export interface Didomi {
9
- CCPA: string[];
10
- Purposes: PurposesList;
11
- notice: Notice;
12
- preferences: string[];
13
- theme: string[];
14
- version: string;
15
- getUserConsentStatusForPurpose: (purpose: Purposes) => boolean;
16
- reset: () => void;
17
- }
18
- export type DidomiOnReady = (() => void)[];
19
- type EventListener = {
20
- event: string;
21
- listener: () => void;
22
- };
23
- export type DidomiEventListeners = EventListener[];
24
- export type CmpType = {
25
- consentEventsCount: number;
26
- };
27
- export type TcData = {
28
- eventStatus: string;
29
- listenerId: number;
30
- };
31
- export {};
@@ -1,8 +0,0 @@
1
- import { Didomi, DidomiEventListeners, DidomiOnReady, TcData } from './Didomi';
2
- export type VariablesCmpType = {
3
- Didomi: Didomi;
4
- didomiOnReady: DidomiOnReady;
5
- disapproveDidomiGTMEvents: boolean;
6
- didomiEventListeners: DidomiEventListeners;
7
- __tcfapi: (arg1: string, arg2: number, arg3: ((tcData: TcData, success: boolean) => void) | null, arg4?: number) => void;
8
- };
@@ -1,2 +0,0 @@
1
- export * from './Didomi';
2
- export * from './VariablesCmpType';
@@ -1,14 +0,0 @@
1
- export interface VariablesDataLayerType {
2
- signature?: string;
3
- nbParagraphs?: number;
4
- pageType?: string;
5
- tags?: string;
6
- article_section?: string;
7
- content_id?: string;
8
- libelle?: string;
9
- chapter1?: string;
10
- has_instream_video?: boolean;
11
- }
12
- export interface VariablesdatalayerInfoType {
13
- datalayerInfo: VariablesDataLayerType;
14
- }
@@ -1,6 +0,0 @@
1
- export type VariablesSmartPlayerDigitekaType = {
2
- ULTIMEDIA_mdtk: string;
3
- ULTIMEDIA_zone: string;
4
- ULTIMEDIA_target: string;
5
- ULTIMEDIA_async: boolean;
6
- };
@@ -1,4 +0,0 @@
1
- export type HubvisorType = {
2
- (event: '20minutes:refresh', elements: string[], callback: () => void): void;
3
- cmd: (() => void)[];
4
- };
@@ -1,6 +0,0 @@
1
- export * from './AtInternet';
2
- export * from './Digiteka';
3
- export * from './DataLayer';
4
- export * from './Ads';
5
- export * from './Cmp';
6
- export * from './Hubvisor';
@@ -1,28 +0,0 @@
1
- import { AwsRum } from 'aws-rum-web';
2
- import type { LayoutType } from '@20minutes/hela';
3
- import type { AwsRumVariablesType } from './AwsRumVariablesType';
4
- import type { EnvVariablesType } from './EnvVariablesType';
5
- import type { ATInternetType, CmpType, DataLayerType, HubvisorType, SlotType, TargetingType, VariablesCmpType, VariablesDataLayerType, VariablesSmartPlayerDigitekaType, VariablesdatalayerInfoType } from './ThirdParties';
6
- declare global {
7
- interface Window extends VariablesDataLayerType, VariablesdatalayerInfoType, VariablesCmpType, VariablesSmartPlayerDigitekaType {
8
- layout: LayoutType;
9
- datalayer: Partial<DataLayerType>;
10
- dataLayer: Record<number, unknown>;
11
- awsRumVariables: AwsRumVariablesType;
12
- dfpVariables: TargetingType;
13
- awsRum?: AwsRum;
14
- dfp: {
15
- slotsReady: boolean;
16
- hubvisorEnd: boolean;
17
- slots: SlotType[];
18
- targeting: Partial<TargetingType>;
19
- initDfpSlot: (slot: HTMLDivElement, targeting: Partial<TargetingType>) => void;
20
- callSlots: (id: string[]) => void;
21
- } | Record<string, never>;
22
- cmpVariables: CmpType;
23
- ATInternet: ATInternetType;
24
- Hubvisor: HubvisorType;
25
- adsapp: boolean;
26
- envVariables: EnvVariablesType;
27
- }
28
- }