@bytebrand/fe-ui-core 4.2.86 → 4.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.86",
3
+ "version": "4.2.87",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -19,8 +19,7 @@ export const GOOGLE_BUNDLE_COOKIES = {
19
19
  /* tslint:disable */
20
20
  export const COOKIE_SCHEMA = {
21
21
  necessary: {
22
- gdpr: { name: 'DSGVO' },
23
- __cfruid: { name: 'Cloudflare ' },
22
+ __cfruid: { name: 'Cloudflare' },
24
23
  cf_chl_2: { name: 'Cloudflare für Webverkehr zu identifizieren' },
25
24
  cf_chl_rc_ni: { name: 'Cloudflare für den internen Gebrauch' },
26
25
  ['next-i18next']: { name: 'Spracheinstellungen' },
@@ -35,7 +34,7 @@ export const COOKIE_SCHEMA = {
35
34
  callback: { name: 'callback' },
36
35
  demdex: { name: 'demdex' },
37
36
  vuid: { name: 'Vimeo' },
38
- // _fbp: { name: 'Facebook' },
37
+ _fbp: { name: 'Facebook' },
39
38
  hotjar: { name: 'Hotjar-Analytics'},
40
39
  _clck: { name: 'Clarity' },
41
40
  _clsk: { name: 'Clarity' },
@@ -20,6 +20,7 @@ declare global {
20
20
  grantHotjarCookieConsent?: () => void;
21
21
  grantCookieConsentClarity?: () => void;
22
22
  grantCookieConsentMicrosoft?: () => void;
23
+ grantCookieConsentFacebook?: () => void;
23
24
  grantCookieConsent?: (list: string[]) => void;
24
25
  allowGoogle?: () => void;
25
26
  }
@@ -549,6 +550,7 @@ export const updateCookieList = () => {
549
550
  let isHomeGoogleGranted = true; // home page google cookie
550
551
  let isMicrosoftGranted = true; // Microsoft _uetvid _uetsid
551
552
  let isMicrosoftClarity = true; // Microsoft Clarity _clck _clsk
553
+ let isFacebookGranted = true; // Facebook Clarity _fbp _f
552
554
  let isHotjarGranted = true;
553
555
  const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
554
556
 
@@ -566,11 +568,14 @@ export const updateCookieList = () => {
566
568
  else if (cookie === 'hotjar') isHotjarGranted = false;
567
569
  else if (cookie === '_uetvid' || cookie === '_uetsid') isMicrosoftGranted = false;
568
570
  else if (cookie === '_clck' || cookie === '_clsk') isMicrosoftClarity = false;
571
+ else if (cookie === '_fbp') isFacebookGranted = false;
569
572
  });
570
573
  });
574
+
571
575
  // grant google cookies
572
- if (typeof window.grantCookieConsent === 'function')
576
+ if (typeof window.grantCookieConsent === 'function') {
573
577
  window.grantCookieConsent(cookieConsentList);
578
+ };
574
579
 
575
580
  // grant Microsoft cookies
576
581
  if (isMicrosoftGranted && typeof window.grantCookieConsentMicrosoft === 'function') {
@@ -582,6 +587,11 @@ export const updateCookieList = () => {
582
587
  window.grantCookieConsentClarity();
583
588
  }
584
589
 
590
+ // grant Facebook cookies
591
+ if (!isFacebookGranted && typeof window.grantCookieConsentFacebook === 'function') {
592
+ window.grantCookieConsentFacebook();
593
+ };
594
+
585
595
  if (isHomeGoogleGranted && typeof window.allowGoogle === 'function') {
586
596
  window.allowGoogle();
587
597
  }