@20minutes/hela 0.0.13 → 0.0.15

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.d.ts CHANGED
@@ -21,15 +21,28 @@ interface ContentDataLayerType {
21
21
  nbParagraphs?: number;
22
22
  pageType?: string;
23
23
  tags?: string;
24
+ article_section?: string;
25
+ content_id?: string;
24
26
  }
25
27
 
26
28
  interface DefaultDataLayerType {
27
29
  page_uri: string;
28
- page_type: string;
30
+ page_type?: string;
31
+ libelle?: string;
32
+ chapter1?: string;
33
+ chapter2?: string;
34
+ chapter3?: string;
35
+ chapter4?: string;
36
+ ac?: string;
37
+ an?: string;
29
38
  }
30
39
 
31
40
  interface UserDataLayerType {
32
- darkmode: number;
41
+ darkmode: string;
42
+ adblock: string;
43
+ referrer: string;
44
+ source_type: string;
45
+ user_status: string;
33
46
  }
34
47
 
35
48
  interface DataLayerType extends DefaultDataLayerType, UserDataLayerType, ContentDataLayerType {
@@ -88,8 +101,87 @@ declare type Targeting = {
88
101
 
89
102
  declare type DfpDataLayerType = Targeting;
90
103
 
104
+ declare type Purposes = 'Cookies' | 'CookiesAnalytics' | 'CookiesMarketing' | 'CookiesSocial' | 'AdvertisingPersonalization' | 'CookiesMarketing' | 'Analytics' | 'ContentPersonalization' | 'AdDelivery' | 'DeviceAccess' | 'OfflineMatch' | 'LinkDevices' | 'PreciseGeo' | 'SelectBasicAds' | 'CreateAdsProfile' | 'SelectPersonalizedAds' | 'CreateContentProfile' | 'SelectPersonalizedContent' | 'MeasureAdPerformance' | 'MeasureContentPerformance' | 'MarketResearch' | 'ImproveProducts' | 'mesureda-6qyqaZXC' | 'publicite-Nfb9aWMW';
105
+ declare type PurposesList = {
106
+ [key in Purposes]: string;
107
+ };
108
+ declare type Notice = {
109
+ show: () => void;
110
+ };
111
+ interface Didomi {
112
+ CCPA: string[];
113
+ Purposes: PurposesList;
114
+ notice: Notice;
115
+ preferences: string[];
116
+ theme: string[];
117
+ version: string;
118
+ getUserConsentStatusForPurpose: (purpose: Purposes) => boolean;
119
+ reset: () => void;
120
+ }
121
+ declare type DidomiOnReady = (() => void)[];
122
+ declare type EventListener = {
123
+ event: string;
124
+ listener: () => void;
125
+ };
126
+ declare type DidomiEventListeners = EventListener[];
127
+ declare type CmpType = {
128
+ consentEventsCount: number;
129
+ };
130
+
131
+ declare type VariablesCmpType = {
132
+ Didomi: Didomi;
133
+ didomiOnReady: DidomiOnReady;
134
+ disapproveDidomiGTMEvents: boolean;
135
+ didomiEventListeners: DidomiEventListeners;
136
+ };
137
+
138
+ declare type Privacy = {
139
+ setVisitorMode: (authority: string, mode: string) => void;
140
+ getVisitorMode: () => Record<string, unknown>;
141
+ setVisitorOptin: () => void;
142
+ };
143
+ declare type CustomVars = {
144
+ set: (arg0: {
145
+ site: Record<number, unknown>;
146
+ }) => void;
147
+ };
148
+ declare type Props = Record<string, string | boolean>;
149
+ declare type IdentifiedVisitor = {
150
+ set: (arg0: Record<string, unknown>) => void;
151
+ };
152
+ declare type PageDefaultKeys = {
153
+ name: string;
154
+ chapter1: string;
155
+ chapter2: string;
156
+ chapter3: string;
157
+ customObject: {
158
+ device: string;
159
+ };
160
+ };
161
+ declare type Tag$1 = {
162
+ privacy: Privacy;
163
+ identifiedVisitor: IdentifiedVisitor;
164
+ customVars: CustomVars;
165
+ page: {
166
+ set: (pageDefaultKeys: PageDefaultKeys) => void;
167
+ };
168
+ setProps: (props: Props, persistent: boolean) => void;
169
+ dispatch: () => void;
170
+ };
171
+ interface TagConstructor {
172
+ new (): Tag$1;
173
+ }
174
+ interface Tracker {
175
+ Tag: TagConstructor;
176
+ instances: Tag$1[];
177
+ }
178
+ declare type ATInternetType = {
179
+ Tracker?: Tracker;
180
+ onTrackerLoad: () => void;
181
+ };
182
+
91
183
  declare global {
92
- interface Window extends VariablesDataLayerType {
184
+ interface Window extends VariablesDataLayerType, VariablesCmpType {
93
185
  datalayer: Partial<DataLayerType>;
94
186
  awsRumVariables: AwsRumVariablesType;
95
187
  dfpVariables: DfpDataLayerType;
@@ -99,6 +191,8 @@ declare global {
99
191
  slots: Slot[];
100
192
  targeting: Partial<Targeting>;
101
193
  } | Record<string, never>;
194
+ cmpVariables: CmpType;
195
+ ATInternet: ATInternetType;
102
196
  }
103
197
  }
104
198
 
@@ -122,7 +216,8 @@ declare const enum ComponentNameArticle {
122
216
  ARTICLE_SUMMARY = "article/article-summary",
123
217
  ARTICLE_CONTENT = "article/article-content",
124
218
  ARTICLE_TAG_BAR = "article/tag-bar",
125
- ARTICLE_SIGNATURE = "article/signature"
219
+ ARTICLE_SIGNATURE = "article/signature",
220
+ ARTICLE_SCROLL_PROGRESS_BAR = "article/scroll-progress-bar"
126
221
  }
127
222
  declare const enum ComponentNameHoroscope {
128
223
  HOROSCOPE_BREADCRUMB = "horoscope/breadcrumb",
@@ -133,7 +228,13 @@ declare const enum ComponentNameHoroscope {
133
228
  HOROSCOPE_HOROSCOPE_TILES = "horoscope/horoscope-tiles",
134
229
  HOROSCOPE_HOROSCOPE_LINK_NEXT_TYPE = "horoscope/horoscope-link-next-type"
135
230
  }
136
- interface ComponentConfig<TComponentName = ComponentNameCommon | ComponentNameRubric | ComponentNameArticle | ComponentNameHoroscope, TComponent = React$1.FC<any>> {
231
+ declare const enum ComponentNameHoroscopeHomepage {
232
+ HOROSCOPE_HOMEPAGE_BREADCRUMB = "horoscopeHome/breadcrumb",
233
+ HOROSCOPE_HOMEPAGE_HEADER_PAGE = "horoscopeHome/header-page",
234
+ HOROSCOPE_HOMEPAGE_HOROSCOPE_TILES = "horoscopeHome/horoscope-tiles",
235
+ HOROSCOPE_HOMEPAGE_LINK_NEXT_TYPE = "horoscopeHome/horoscope-link-next-type"
236
+ }
237
+ interface ComponentConfig<TComponentName = ComponentNameCommon | ComponentNameRubric | ComponentNameArticle | ComponentNameHoroscope | ComponentNameHoroscopeHomepage, TComponent = React$1.FC<any>> {
137
238
  componentName: TComponentName;
138
239
  component: TComponent;
139
240
  expiration?: number;
@@ -145,14 +246,15 @@ interface PageTemplateProps {
145
246
  url: string;
146
247
  }[];
147
248
  criticalCss?: string;
249
+ didomiScript: string;
148
250
  mainInlineScript?: string;
149
251
  awsRum?: {
150
252
  variables: AwsRumVariablesType;
151
253
  inlineScript: string;
152
254
  };
153
255
  datalayerInlineScript?: string;
154
- callCriticalScripts?: string;
155
256
  dfpInlineScript?: string;
257
+ callCriticalScripts?: string;
156
258
  children: React$1.ReactNode;
157
259
  datalayerVariables?: VariablesDataLayerType;
158
260
  header: React$1.ReactNode;
@@ -175,6 +277,7 @@ interface ArticlePageProps extends PageTemplateProps {
175
277
  newsCards: React$1.ReactNode;
176
278
  newsletter: React$1.ReactNode;
177
279
  partnerCards: React$1.ReactNode;
280
+ scrollProgressBar: React$1.ReactNode;
178
281
  layout?: LayoutType;
179
282
  }
180
283
  declare const ArticlePage: React$1.FC<ArticlePageProps>;
@@ -191,6 +294,15 @@ interface HoroscopePageProps extends PageTemplateProps {
191
294
  }
192
295
  declare const HoroscopePage: React$1.FC<HoroscopePageProps>;
193
296
 
297
+ interface HoroscopeHomePageProps extends PageTemplateProps {
298
+ breadcrumb: React$1.ReactNode;
299
+ headerPage: React$1.ReactNode;
300
+ horoscopeTiles: React$1.ReactNode;
301
+ horoscopeLinkNextType: React$1.ReactNode;
302
+ layout?: LayoutType;
303
+ }
304
+ declare const HoroscopeHomePage: React$1.FC<HoroscopeHomePageProps>;
305
+
194
306
  declare type PageComponentConfig<TComponentName = string, TPropName = string> = {
195
307
  name: TComponentName;
196
308
  propName: TPropName;
@@ -206,9 +318,12 @@ declare type PageConfig<TPageName = string, TComponentPage = React.FC<any>, TCom
206
318
  declare type PageTemplateComponentConfigs = PageComponentConfig<ComponentNameCommon, keyof PageTemplateProps>[];
207
319
  declare type ArticlePageConfig = PageConfig<'article', typeof ArticlePage, ComponentNameCommon | ComponentNameRubric | ComponentNameArticle, keyof ArticlePageProps>;
208
320
  declare type HoroscopePageConfig = PageConfig<'horoscope', typeof HoroscopePage, ComponentNameCommon | ComponentNameRubric | ComponentNameHoroscope, keyof HoroscopePageProps>;
209
- declare type PageConfigs = [ArticlePageConfig, HoroscopePageConfig];
321
+ declare type HoroscopeHomePageConfig = PageConfig<'horoscopeHome', typeof HoroscopeHomePage, ComponentNameCommon | ComponentNameRubric | ComponentNameHoroscopeHomepage, keyof HoroscopeHomePageProps>;
322
+ declare type PageConfigs = [ArticlePageConfig, HoroscopePageConfig, HoroscopeHomePageConfig];
210
323
  declare type PageConfigAvailable = PageConfigs[number];
211
324
 
325
+ declare type HeaderScriptsType = 'callCriticalScripts' | 'dfpInlineScript' | 'datalayerInlineScript' | 'didomiScript';
326
+
212
327
  declare const COMPONENT_CONFIGS: ComponentConfig[];
213
328
 
214
329
  declare const PAGE_CONFIGS: PageConfigs;
@@ -237,7 +352,7 @@ interface AvatarProps {
237
352
  }
238
353
  declare const Avatar: React__default.FC<AvatarProps>;
239
354
 
240
- declare type IconName = '20mn-pub' | 'apple' | 'arrow' | 'bookmark' | 'comment' | 'connect' | 'dailymotion' | 'diode-leaning' | 'diode' | 'facebook' | 'flipboard' | 'googleplay' | 'health' | 'heart' | 'home' | 'instagram' | 'local' | 'logo' | 'menu' | 'mood' | 'podcast' | 'report' | 'search' | 'share' | 'snapchat' | 'tiktok' | 'twitter' | 'view' | 'youtube' | 'work';
355
+ declare type IconName = '20mn-pub' | 'apple' | 'arrow' | 'bookmark' | 'chevron' | 'comment' | 'connect' | 'dailymotion' | 'diode-leaning' | 'diode' | 'facebook' | 'flipboard' | 'googleplay' | 'health' | 'heart' | 'home' | 'instagram' | 'local' | 'logo' | 'menu' | 'mood' | 'podcast' | 'report' | 'search' | 'share' | 'snapchat' | 'tiktok' | 'twitter' | 'view' | 'youtube' | 'work';
241
356
  declare type IconHoroscopeName = 'horoscope-belier' | 'horoscope-taureau' | 'horoscope-gemeaux' | 'horoscope-cancer' | 'horoscope-lion' | 'horoscope-vierge' | 'horoscope-balance' | 'horoscope-scorpion' | 'horoscope-sagittaire' | 'horoscope-capricorne' | 'horoscope-verseau' | 'horoscope-poissons' | 'horoscope-buffle' | 'horoscope-cheval' | 'horoscope-chevre' | 'horoscope-chien' | 'horoscope-cochon' | 'horoscope-coq' | 'horoscope-dragon' | 'horoscope-lapin' | 'horoscope-rat' | 'horoscope-serpent' | 'horoscope-singe' | 'horoscope-tigre';
242
357
  interface IconProps extends Omit<React__default.SVGAttributes<SVGElement>, 'width' | 'height'> {
243
358
  className?: string;
@@ -249,7 +364,7 @@ interface IconProps extends Omit<React__default.SVGAttributes<SVGElement>, 'widt
249
364
  declare const Icon: React__default.FC<IconProps>;
250
365
 
251
366
  interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
252
- variant?: 'primary' | 'secondary' | 'icon';
367
+ variant?: 'primary' | 'secondary' | 'icon' | 'navigation';
253
368
  children?: React__default.ReactNode;
254
369
  icon?: IconName;
255
370
  iconClassNames?: string;
@@ -303,7 +418,7 @@ interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElemen
303
418
  }
304
419
  declare const Link: React__default.FC<LinkProps>;
305
420
 
306
- interface TagProps {
421
+ interface TagProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'id'> {
307
422
  children?: React__default.ReactNode;
308
423
  id?: number;
309
424
  link?: string;
@@ -352,7 +467,9 @@ interface TypographyProps<HTMLElementType> extends React__default.HTMLAttributes
352
467
  }
353
468
 
354
469
  declare type HeadingHTMLElementType = Pick<JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
355
- declare type HeadingProps = TypographyProps<HeadingHTMLElementType>;
470
+ interface HeadingProps extends TypographyProps<HeadingHTMLElementType> {
471
+ variant?: 'default' | 'secondary';
472
+ }
356
473
  declare const Heading: React__default.FC<HeadingProps>;
357
474
 
358
475
  declare type TextHTMLElementType = Pick<JSX.IntrinsicElements, 'p' | 'span' | 'strong' | 'em'>;
@@ -375,6 +492,13 @@ interface TabPanelProps {
375
492
  }
376
493
  declare const TabPanel: React__default.FC<TabPanelProps>;
377
494
 
495
+ interface ScrollProgressBarProps extends React__default.HTMLAttributes<HTMLDivElement> {
496
+ colorScheme?: ColorSchemeTheme;
497
+ hasLimit?: boolean;
498
+ variant?: 'article-mobile';
499
+ }
500
+ declare const ScrollProgressBar: React__default.FC<ScrollProgressBarProps>;
501
+
378
502
  interface CategoryCardProps {
379
503
  link: string;
380
504
  title: string;
@@ -453,7 +577,7 @@ interface MediumCardProps {
453
577
  headline: string;
454
578
  cover: string;
455
579
  socialBarProps: SocialBarProps;
456
- signatureProps: SignatureProps;
580
+ signatureProps?: SignatureProps;
457
581
  layout?: LayoutType;
458
582
  }
459
583
  declare function MediumCard({ link, title, cover, headline, socialBarProps, signatureProps, layout, }: MediumCardProps): JSX.Element;
@@ -485,7 +609,7 @@ interface NewsCardProps {
485
609
  cover: string;
486
610
  headline: string;
487
611
  title: string;
488
- link: 'https://www.20minutes.fr/';
612
+ link: string;
489
613
  layout?: LayoutType;
490
614
  }
491
615
  declare function NewsCard({ link, cover, headline, title, layout, }: NewsCardProps): JSX.Element;
@@ -618,6 +742,7 @@ interface BreadcrumbProps {
618
742
  link?: string;
619
743
  }[];
620
744
  colorScheme?: ColorSchemeTheme;
745
+ layout?: LayoutType;
621
746
  }
622
747
  declare const Breadcrumb: React$1.FC<BreadcrumbProps>;
623
748
 
@@ -644,6 +769,7 @@ interface FooterLinksProps {
644
769
  links: {
645
770
  name: string;
646
771
  url: string;
772
+ javascript?: string;
647
773
  }[];
648
774
  }[];
649
775
  }
@@ -721,7 +847,7 @@ interface SocialIconProps {
721
847
  }
722
848
  declare const SocialIcon: React$1.FC<SocialIconProps>;
723
849
 
724
- interface TagBarProps {
850
+ interface TagBarProps extends React__default.HTMLAttributes<HTMLDivElement> {
725
851
  tags: TagProps[];
726
852
  }
727
853
  declare const TagBar: React__default.FC<TagBarProps>;
@@ -773,4 +899,4 @@ interface HeaderProps extends HeaderDesktopProps {
773
899
  }
774
900
  declare const Header: React$1.FC<HeaderProps>;
775
901
 
776
- export { Ad, AdProps, AdSizesType, AdSizesTypeKey, Alert, AlertProps, ArticleContent, ArticleContentProps, ArticleHeader, ArticleHeaderProps, ArticleImageCover, ArticleImageCoverProps, ArticlePage, ArticlePageConfig, ArticlePageProps, ArticleSummary, ArticleSummaryProps, ArticleVideoCover, ArticleVideoCoverProps, Avatar, AvatarProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, COMPONENT_CONFIGS, CategoryCard, CategoryCardProps, CategoryCards, CategoryCardsProps, Color, ColorSchemeBrand, ColorSchemeGeneric, ColorSchemeTheme, ComponentConfig, ComponentNameArticle, ComponentNameCommon, ComponentNameHoroscope, ComponentNameRubric, ContentDataLayerType, DataLayerType, DefaultDataLayerType, DfpDataLayerType, Divider, DividerProps, DividerSection, DividerSectionProps, Footer, FooterCategories, FooterCategoriesProps, FooterLinks, FooterLinksProps, FooterProps, GameCard, GameCardProps, Header, HeaderBanner, HeaderBannerProps, HeaderPage, HeaderPageProps, HeaderProps, Heading, HeadingProps, HomeLiveCard, HomeLiveCardProps, HoroscopeContent, HoroscopeContentProps, HoroscopePage, HoroscopePageConfig, HoroscopePageProps, HoroscopeTiles, HoroscopeTilesProps, HoroscopeTopicCard, HoroscopeTopicCardProps, Icon, IconHoroscopeName, IconName, IconProps, Img, ImgProps, InfoBanner, InfoBannerProps, Input, InputProps, Label, LabelProps, LabelSection, LabelSectionProps, LargeCard, LargeCardProps, LayoutType, Link, LinkProps, LiveCard, LiveCardProps, MediumCard, MediumCardProps, MenuCard, MenuCardProps, MostReadArticles, MostReadArticlesProps, MostReadCard, MostReadCardProps, NewsCard, NewsCardProps, NewsCards, NewsCardsProps, Newsletter, NewsletterProps, OverviewBar, OverviewBarProps, OverviewCard, OverviewCardProps, PAGE_CONFIGS, PageComponentConfig, PageConfig, PageConfigAvailable, PageConfigs, PageTemplate, PageTemplateComponentConfigs, PageTemplateProps, PartnerCards, PartnerCardsProps, Pipe, PodcastCard, PodcastCardProps, ReadAlso, ReadAlsoProps, RegionalCard, RegionalCardProps, RubricCard, RubricCardProps, Section, SectionProps, Signature, SignatureProps, Slot, SmallCard, SmallCardProps, SmallCategoryCard, SmallCategoryCardProps, SmallGameCard, SmallGameCardProps, SmallLiveCard, SmallLiveCardProps, SocialBar, SocialBarProps, SocialIcon, SocialIconProps, Switch, SwitchDarkMode, SwitchDarkModeProps, SwitchProps, Tab, TabPanel, TabPanelProps, TabProps, Tag, TagBar, TagBarProps, TagProps, Targeting, TargetingKeys, Text, TextProps, ThemeType, UserDataLayerType, VariablesDataLayerType, pageType, tagsType };
902
+ export { Ad, AdProps, AdSizesType, AdSizesTypeKey, Alert, AlertProps, ArticleContent, ArticleContentProps, ArticleHeader, ArticleHeaderProps, ArticleImageCover, ArticleImageCoverProps, ArticlePage, ArticlePageConfig, ArticlePageProps, ArticleSummary, ArticleSummaryProps, ArticleVideoCover, ArticleVideoCoverProps, Avatar, AvatarProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, COMPONENT_CONFIGS, CategoryCard, CategoryCardProps, CategoryCards, CategoryCardsProps, CmpType, Color, ColorSchemeBrand, ColorSchemeGeneric, ColorSchemeTheme, ComponentConfig, ComponentNameArticle, ComponentNameCommon, ComponentNameHoroscope, ComponentNameHoroscopeHomepage, ComponentNameRubric, ContentDataLayerType, DataLayerType, DefaultDataLayerType, DfpDataLayerType, Didomi, DidomiEventListeners, DidomiOnReady, Divider, DividerProps, DividerSection, DividerSectionProps, Footer, FooterCategories, FooterCategoriesProps, FooterLinks, FooterLinksProps, FooterProps, GameCard, GameCardProps, Header, HeaderBanner, HeaderBannerProps, HeaderPage, HeaderPageProps, HeaderProps, HeaderScriptsType, Heading, HeadingProps, HomeLiveCard, HomeLiveCardProps, HoroscopeContent, HoroscopeContentProps, HoroscopeHomePageConfig, HoroscopePage, HoroscopePageConfig, HoroscopePageProps, HoroscopeTiles, HoroscopeTilesProps, HoroscopeTopicCard, HoroscopeTopicCardProps, Icon, IconHoroscopeName, IconName, IconProps, Img, ImgProps, InfoBanner, InfoBannerProps, Input, InputProps, Label, LabelProps, LabelSection, LabelSectionProps, LargeCard, LargeCardProps, LayoutType, Link, LinkProps, LiveCard, LiveCardProps, MediumCard, MediumCardProps, MenuCard, MenuCardProps, MostReadArticles, MostReadArticlesProps, MostReadCard, MostReadCardProps, NewsCard, NewsCardProps, NewsCards, NewsCardsProps, Newsletter, NewsletterProps, OverviewBar, OverviewBarProps, OverviewCard, OverviewCardProps, PAGE_CONFIGS, PageComponentConfig, PageConfig, PageConfigAvailable, PageConfigs, PageTemplate, PageTemplateComponentConfigs, PageTemplateProps, PartnerCards, PartnerCardsProps, Pipe, PodcastCard, PodcastCardProps, ReadAlso, ReadAlsoProps, RegionalCard, RegionalCardProps, RubricCard, RubricCardProps, ScrollProgressBar, ScrollProgressBarProps, Section, SectionProps, Signature, SignatureProps, Slot, SmallCard, SmallCardProps, SmallCategoryCard, SmallCategoryCardProps, SmallGameCard, SmallGameCardProps, SmallLiveCard, SmallLiveCardProps, SocialBar, SocialBarProps, SocialIcon, SocialIconProps, Switch, SwitchDarkMode, SwitchDarkModeProps, SwitchProps, Tab, TabPanel, TabPanelProps, TabProps, Tag, TagBar, TagBarProps, TagProps, Targeting, TargetingKeys, Text, TextProps, ThemeType, UserDataLayerType, VariablesCmpType, VariablesDataLayerType, pageType, tagsType };