Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "frontend-packages/react-cookie-banner/src/types/commonContext"

Index

Type aliases

CommonContextI18nProps

CommonContextI18nProps<AdditionalI18n>: { close: string; consent: string; cookieRefresh: string; duration: string; durationUnit: { d: string; h: string; m: string; mo: string; s: string; y: string }; ePrivacyUSA: string; host: string; legalBasis: string; legalRequirement: string; legitimateInterest: string; no: string; noExpiration: string; provider: string; providerPrivacyPolicyUrl: string; purpose: string; technicalCookieDefinition: string; type: string; unknown: string; usesCookies: string; usesNonCookieAccess: string; yes: string } & AdditionalI18n

This is different to Customize["texts"] as this texts are not meant to be customizable by software and should not be managed by a website owner as this are strict, legal texts.

Type parameters

  • AdditionalI18n = {}

CommonContextProps

CommonContextProps<AdditionalI18n>: { affiliate: { description: string | false; labelBehind: string | false; link: string }; ageNotice: boolean; consent: ConsentProps; consentForwardingExternalHosts: string[] | false; ePrivacyUSA: boolean; groups: VisualServiceGroup[]; i18n: CommonContextI18nProps<AdditionalI18n>; isTcf: boolean; keepVariablesInTexts: boolean; listServicesNotice: boolean; pageByIdUrl: string; pageIdToPermalink: Record<number, string>; poweredLink: HTMLAnchorElement; productionNotice: ReactNode }

This properties are used for both banner and content blocker contexts.

Type parameters

  • AdditionalI18n = {}

Type declaration

  • affiliate: { description: string | false; labelBehind: string | false; link: string }

    Customize the poweredLink with an affiliate link.

    • description: string | false
    • labelBehind: string | false
    • link: string
  • ageNotice: boolean
  • consent: ConsentProps

    Current consent state.

  • consentForwardingExternalHosts: string[] | false
  • ePrivacyUSA: boolean
  • groups: VisualServiceGroup[]

    None-IAB cookie groups.

  • i18n: CommonContextI18nProps<AdditionalI18n>
  • isTcf: boolean

    Indicates that TCF is enabled and active, if set to true you need to also populate the tcf object.

    Attention: The visual content blocker does currently not support TCF!

  • keepVariablesInTexts: boolean

    See useBannerTexts, if this is true the placeholders {{placeholder}} are not replaced. This is useful if you e.g. are using a tool like TranslatePress and want to translate the texts.

  • listServicesNotice: boolean
  • pageByIdUrl: string
  • pageIdToPermalink: Record<number, string>
  • poweredLink: HTMLAnchorElement

    If set, the link will be used for the powered-by link directly in the cookie banner and content blocker. This link needs to be rendered server-side for SEO reasons.

  • productionNotice: ReactNode

    Render this dev notice under the buttons so you can e.g. show a label like "Sandbox system, demo purposes only".

ConsentProps

ConsentProps: { groups: DecisionConsentGroups }

This is the consent which got given after clicking on a button. Currently, it holds only a list of accepted groups and services inside the groups.

Type declaration

Generated using TypeDoc