@didomi/react
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -47,3 +47,3 @@ var _class, _temp; | ||
Didomi.on('notice.shown', function (e) { | ||
_this2.props.onNoticeShown('test changed'); | ||
_this2.props.onNoticeShown(); | ||
}); | ||
@@ -54,3 +54,3 @@ } | ||
Didomi.on('notice.hidden', function (e) { | ||
_this2.props.onNoticeHidden('test changed'); | ||
_this2.props.onNoticeHidden(); | ||
}); | ||
@@ -66,3 +66,5 @@ } | ||
DidomiSDK.prototype.init = function init() { | ||
window.gdprAppliesGlobally = true;(function () { | ||
var gdprAppliesGlobally = this.props.gdprAppliesGlobally === false ? false : true; | ||
window.gdprAppliesGlobally = gdprAppliesGlobally;(function () { | ||
function a() { | ||
@@ -133,2 +135,3 @@ if (!window.frames.__cmpLocator) { | ||
config: {}, | ||
gdprAppliesGlobally: true, | ||
onConsentChanged: function onConsentChanged() {}, | ||
@@ -139,2 +142,3 @@ onNoticeShown: function onNoticeShown() {}, | ||
config: PropTypes.object, | ||
gdprAppliesGlobally: PropTypes.bool, | ||
onConsentChanged: PropTypes.func, | ||
@@ -141,0 +145,0 @@ onNoticeShown: PropTypes.func, |
@@ -57,3 +57,3 @@ 'use strict'; | ||
Didomi.on('notice.shown', function (e) { | ||
_this2.props.onNoticeShown('test changed'); | ||
_this2.props.onNoticeShown(); | ||
}); | ||
@@ -64,3 +64,3 @@ } | ||
Didomi.on('notice.hidden', function (e) { | ||
_this2.props.onNoticeHidden('test changed'); | ||
_this2.props.onNoticeHidden(); | ||
}); | ||
@@ -76,3 +76,5 @@ } | ||
DidomiSDK.prototype.init = function init() { | ||
window.gdprAppliesGlobally = true;(function () { | ||
var gdprAppliesGlobally = this.props.gdprAppliesGlobally === false ? false : true; | ||
window.gdprAppliesGlobally = gdprAppliesGlobally;(function () { | ||
function a() { | ||
@@ -143,2 +145,3 @@ if (!window.frames.__cmpLocator) { | ||
config: {}, | ||
gdprAppliesGlobally: true, | ||
onConsentChanged: function onConsentChanged() {}, | ||
@@ -149,2 +152,3 @@ onNoticeShown: function onNoticeShown() {}, | ||
config: _propTypes2.default.object, | ||
gdprAppliesGlobally: _propTypes2.default.bool, | ||
onConsentChanged: _propTypes2.default.func, | ||
@@ -151,0 +155,0 @@ onNoticeShown: _propTypes2.default.func, |
{ | ||
"name": "@didomi/react", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "didomi-react-test React component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -39,2 +39,3 @@ | ||
config={didomiConfig} | ||
gdprAppliesGlobally={true} | ||
onReady={didomi => console.log('Didomi SDK is loaded and ready', didomi)} | ||
@@ -67,2 +68,9 @@ onConsentChanged={cwtToken => console.log('A consent has been given/withdrawn', cwtToken)} | ||
<tr> | ||
<td>gdprAppliesGlobally</td> | ||
<td>boolean</td> | ||
<td>true</td> | ||
<td>The banner should display to all users no matter where they are located. If you are a non EU-based company then you are only required to collect consent and show the banner to EU visitors and can configure the banner to do so by changing the gdprAppliesGlobally variable to false in the tag above (that variable is separate from the window.didomiConfig variable).<br> | ||
Please note that if you are an EU-based company then you must collect consent and display the banner to all visitors, no matter where they are from.</td> | ||
</tr> | ||
<tr> | ||
<td>onReady</td> | ||
@@ -108,3 +116,3 @@ <td>function</td> | ||
vendors: { | ||
iab: { // You either choose the option 'all', with optionally 'exclude', or the 'include' option where you add the vendors manually | ||
iab: { // You either choose the option 'all', with optionaly 'exclude', or the 'include' option where you add the vendors manually | ||
all: true, | ||
@@ -298,2 +306,3 @@ exclude: [1], | ||
config={didomiConfig} | ||
gdprAppliesGlobally={true} | ||
onReady={this.onDidomiReady.bind(this)} | ||
@@ -300,0 +309,0 @@ onConsentChanged={this.consentHasChanged.bind(this)} |
19805
241
321