@didomi/react
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -135,2 +135,4 @@ var _class, _temp; | ||
DidomiSDK.prototype.init = function init() { | ||
var loaderParams = void 0; | ||
var apiKey = this.props.apiKey; | ||
var gdprAppliesGlobally = this.props.gdprAppliesGlobally === false ? false : true; | ||
@@ -141,2 +143,7 @@ window.didomiConfig = this.props.config || {}; | ||
window.gdprAppliesGlobally = gdprAppliesGlobally; | ||
if (this.props.noticeId) { | ||
loaderParams = 'target_type=notice&target=' + this.props.noticeId; | ||
} else { | ||
loaderParams = 'target=' + document.location.hostname; | ||
} | ||
if (this.props.iabVersion === 2) { | ||
@@ -188,4 +195,4 @@ // TCF v2 | ||
}e("__tcfapi", "__tcfapiBuffer", "__tcfapiCall", "__tcfapiReturn");a("__tcfapiLocator");(function (e) { | ||
var t = document.createElement("script");t.id = "spcloader";t.type = "text/javascript";t.async = true;t.src = "https://sdk.privacy-center.org/" + e + "/loader.js?target=" + document.location.hostname;t.charset = "utf-8";var n = document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t, n); | ||
})(this.props.apiKey); | ||
var t = document.createElement("script");t.id = "spcloader";t.type = "text/javascript";t.async = true;t.src = "https://sdk.privacy-center.org/" + e + "/loader.js?" + loaderParams;t.charset = "utf-8";var n = document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t, n); | ||
})(apiKey); | ||
})(); | ||
@@ -235,4 +242,4 @@ } else { | ||
})();(function (e) { | ||
var t = e ? e + "/" : "";var r = document.createElement("script");r.id = "spcloader";r.type = "text/javascript";r.async = true;r.src = "https://sdk.privacy-center.org/" + t + "loader.js?target=" + document.location.hostname;r.charset = "utf-8";var a = document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r, a); | ||
})(this.props.apiKey); | ||
var t = e ? e + "/" : "";var r = document.createElement("script");r.id = "spcloader";r.type = "text/javascript";r.async = true;r.src = "https://sdk.privacy-center.org/" + t + "loader.js?" + loaderParams;r.charset = "utf-8";var a = document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r, a); | ||
})(apiKey); | ||
} | ||
@@ -239,0 +246,0 @@ }; |
@@ -145,2 +145,4 @@ 'use strict'; | ||
DidomiSDK.prototype.init = function init() { | ||
var loaderParams = void 0; | ||
var apiKey = this.props.apiKey; | ||
var gdprAppliesGlobally = this.props.gdprAppliesGlobally === false ? false : true; | ||
@@ -151,2 +153,7 @@ window.didomiConfig = this.props.config || {}; | ||
window.gdprAppliesGlobally = gdprAppliesGlobally; | ||
if (this.props.noticeId) { | ||
loaderParams = 'target_type=notice&target=' + this.props.noticeId; | ||
} else { | ||
loaderParams = 'target=' + document.location.hostname; | ||
} | ||
if (this.props.iabVersion === 2) { | ||
@@ -198,4 +205,4 @@ // TCF v2 | ||
}e("__tcfapi", "__tcfapiBuffer", "__tcfapiCall", "__tcfapiReturn");a("__tcfapiLocator");(function (e) { | ||
var t = document.createElement("script");t.id = "spcloader";t.type = "text/javascript";t.async = true;t.src = "https://sdk.privacy-center.org/" + e + "/loader.js?target=" + document.location.hostname;t.charset = "utf-8";var n = document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t, n); | ||
})(this.props.apiKey); | ||
var t = document.createElement("script");t.id = "spcloader";t.type = "text/javascript";t.async = true;t.src = "https://sdk.privacy-center.org/" + e + "/loader.js?" + loaderParams;t.charset = "utf-8";var n = document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t, n); | ||
})(apiKey); | ||
})(); | ||
@@ -245,4 +252,4 @@ } else { | ||
})();(function (e) { | ||
var t = e ? e + "/" : "";var r = document.createElement("script");r.id = "spcloader";r.type = "text/javascript";r.async = true;r.src = "https://sdk.privacy-center.org/" + t + "loader.js?target=" + document.location.hostname;r.charset = "utf-8";var a = document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r, a); | ||
})(this.props.apiKey); | ||
var t = e ? e + "/" : "";var r = document.createElement("script");r.id = "spcloader";r.type = "text/javascript";r.async = true;r.src = "https://sdk.privacy-center.org/" + t + "loader.js?" + loaderParams;r.charset = "utf-8";var a = document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r, a); | ||
})(apiKey); | ||
} | ||
@@ -249,0 +256,0 @@ }; |
{ | ||
"name": "@didomi/react", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "didomi-react-test React component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -35,2 +35,3 @@ | ||
iabVersion={1} // If you want to support the TCF v2, don't forget to change this value, even if you selected the TCF v2 in the console. This parameter will load the correct stub in the React Component | ||
noticeId="NOTICE_ID" // If you want to target the notice by ID and not by domain | ||
gdprAppliesGlobally={true} | ||
@@ -83,2 +84,3 @@ onReady={didomi => console.log('Didomi SDK is loaded and ready', didomi)} | ||
iabVersion={1} // If you want to support the TCF v2, don't forget to change this value. This parameter will load the correct stub in the React Component | ||
noticeId="NOTICE_ID" // If you want to target the notice by ID and not by domain | ||
gdprAppliesGlobally={true} | ||
@@ -124,3 +126,3 @@ onReady={didomi => console.log('Didomi SDK is loaded and ready', didomi)} | ||
</tr> | ||
<tr> | ||
<tr> | ||
<td>iabVersion</td> | ||
@@ -132,2 +134,8 @@ <td>number</td> | ||
<tr> | ||
<td>noticeId</td> | ||
<td>string</td> | ||
<td></td> | ||
<td>The ID of the remote notice you want to target (If you choose not the target by domain)</td> | ||
</tr> | ||
<tr> | ||
<td>config</td> | ||
@@ -134,0 +142,0 @@ <td>object</td> |
46524
663
569