@financial-times/ads-personalised-consent
Advanced tools
Comparing version 5.1.1-beta.1 to 5.1.1
@@ -20,3 +20,4 @@ import { fetchLegislation } from '@financial-times/privacy-legislation-client'; | ||
demographic: false, | ||
programmatic: false | ||
programmatic: false, | ||
all: false | ||
}; // existing legislation policies | ||
@@ -96,3 +97,4 @@ | ||
demographic: false, | ||
programmatic: false | ||
programmatic: false, | ||
all: false | ||
}; | ||
@@ -104,3 +106,4 @@ } else { | ||
demographic: consentCookie.includes("demographicadsOnsite:on"), | ||
programmatic: consentCookie.includes("programmaticadsOnsite:on") | ||
programmatic: consentCookie.includes("programmaticadsOnsite:on"), | ||
all: consentCookie.includes("behaviouraladsOnsite:on") && consentCookie.includes("demographicadsOnsite:on") && consentCookie.includes("programmaticadsOnsite:on") | ||
}; | ||
@@ -146,6 +149,23 @@ } | ||
const isCcpaAndGpc = this.isCcpaAndGpc(); | ||
if (isCcpaAndGpc) { | ||
return { | ||
behavioral: false, | ||
demographic: false, | ||
programmatic: false, | ||
all: false | ||
}; | ||
} | ||
const { | ||
behavioral, | ||
demographic, | ||
programmatic | ||
} = this.consentCookie; | ||
const all = behavioral && demographic && programmatic; | ||
return { | ||
behavioral: !isCcpaAndGpc && this.consentCookie.behavioral, | ||
demographic: !isCcpaAndGpc && this.consentCookie.demographic, | ||
programmatic: !isCcpaAndGpc && this.consentCookie.programmatic | ||
behavioral, | ||
demographic, | ||
programmatic, | ||
all | ||
}; | ||
@@ -152,0 +172,0 @@ } |
@@ -22,3 +22,3 @@ { | ||
}, | ||
"version": "5.1.1-beta.1" | ||
"version": "5.1.1" | ||
} |
@@ -15,2 +15,3 @@ export type Legislation = Set<string> | undefined; | ||
programmatic: boolean; | ||
all: boolean; | ||
}; | ||
@@ -17,0 +18,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
13654
219
1