release $npm_package_version

This commit is contained in:
Rick van Lieshout 2021-08-11 11:16:03 +02:00
parent 696200262e
commit a19649bbcf
6 changed files with 648 additions and 612 deletions

View File

@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added the (optional) scrolling effect back in as it is declared legal in some countries now. - Added the (optional) scrolling effect back in as it is declared legal in some countries now.
## [6.2.4]
- version bumps :)
## [[6.2.3](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3)] ## [[6.2.3](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3)]
- Added support for IE11, the webpack generated runtime-code should not use arrow functions - Added support for IE11, the webpack generated runtime-code should not use arrow functions

4
build/index.d.ts vendored
View File

@ -12,7 +12,7 @@ export interface CookieConsentProps {
children?: React.ReactNode; children?: React.ReactNode;
disableStyles?: boolean; disableStyles?: boolean;
hideOnAccept?: boolean; hideOnAccept?: boolean;
onAccept?: Function; onAccept?: (acceptedByScrolling?: boolean) => void;
onDecline?: Function; onDecline?: Function;
buttonText?: Function | React.ReactNode; buttonText?: Function | React.ReactNode;
declineButtonText?: Function | React.ReactNode; declineButtonText?: Function | React.ReactNode;
@ -39,6 +39,8 @@ export interface CookieConsentProps {
overlayStyle?: object; overlayStyle?: object;
ariaAcceptLabel?: string; ariaAcceptLabel?: string;
ariaDeclineLabel?: string; ariaDeclineLabel?: string;
acceptOnScroll?: boolean;
acceptOnScrollPercentage?: number;
} }
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {} export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}

View File

@ -1,34 +1,204 @@
/*! For license information please see index.js.LICENSE.txt */ /*! For license information please see index.js.LICENSE.txt */
module.exports = (function () { !(function () {
var e = { var e = {
866: function (e, t, n) { 808: function (e, t, n) {
var o, r, i;
void 0 ===
(r =
"function" ==
typeof (o = i =
function () {
function e() {
for (var e = 0, t = {}; e < arguments.length; e++) {
var n = arguments[e];
for (var o in n) t[o] = n[o];
}
return t;
}
function t(e) {
return e.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
}
return (function n(o) {
function r() {}
function i(t, n, i) {
if ("undefined" != typeof document) {
"number" == typeof (i = e({ path: "/" }, r.defaults, i)).expires &&
(i.expires = new Date(1 * new Date() + 864e5 * i.expires)),
(i.expires = i.expires ? i.expires.toUTCString() : "");
try {
var c = JSON.stringify(n);
/^[\{\[]/.test(c) && (n = c);
} catch (e) {}
(n = o.write
? o.write(n, t)
: encodeURIComponent(String(n)).replace(
/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
decodeURIComponent
)),
(t = encodeURIComponent(String(t))
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
.replace(/[\(\)]/g, escape));
var l = "";
for (var a in i)
i[a] && ((l += "; " + a), !0 !== i[a] && (l += "=" + i[a].split(";")[0]));
return (document.cookie = t + "=" + n + l);
}
}
function c(e, n) {
if ("undefined" != typeof document) {
for (
var r = {}, i = document.cookie ? document.cookie.split("; ") : [], c = 0;
c < i.length;
c++
) {
var l = i[c].split("="),
a = l.slice(1).join("=");
n || '"' !== a.charAt(0) || (a = a.slice(1, -1));
try {
var s = t(l[0]);
if (((a = (o.read || o)(a, s) || t(a)), n))
try {
a = JSON.parse(a);
} catch (e) {}
if (((r[s] = a), e === s)) break;
} catch (e) {}
}
return e ? r[e] : r;
}
}
return (
(r.set = i),
(r.get = function (e) {
return c(e, !1);
}),
(r.getJSON = function (e) {
return c(e, !0);
}),
(r.remove = function (t, n) {
i(t, "", e(n, { expires: -1 }));
}),
(r.defaults = {}),
(r.withConverter = n),
r
);
})(function () {});
})
? o.call(t, n, t, e)
: o) || (e.exports = r),
(e.exports = i());
},
703: function (e, t, n) {
"use strict"; "use strict";
n.r(t), var o = n(414);
n.d(t, { function r() {}
function i() {}
(i.resetWarningCache = r),
(e.exports = function () {
function e(e, t, n, r, i, c) {
if (c !== o) {
var l = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
);
throw ((l.name = "Invariant Violation"), l);
}
}
function t() {
return e;
}
e.isRequired = e;
var n = {
array: e,
bool: e,
func: e,
number: e,
object: e,
string: e,
symbol: e,
any: e,
arrayOf: t,
element: e,
elementType: e,
instanceOf: t,
node: e,
objectOf: t,
oneOf: t,
oneOfType: t,
shape: t,
exact: t,
checkPropTypes: i,
resetWarningCache: r,
};
return (n.PropTypes = n), n;
});
},
697: function (e, t, n) {
e.exports = n(703)();
},
414: function (e) {
"use strict";
e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
},
},
t = {};
function n(o) {
var r = t[o];
if (void 0 !== r) return r.exports;
var i = (t[o] = { exports: {} });
return e[o](i, i.exports, n), i.exports;
}
(n.n = function (e) {
var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return n.d(t, { a: t }), t;
}),
(n.d = function (e, t) {
for (var o in t)
n.o(t, o) && !n.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
}),
(n.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}),
(n.r = function (e) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(e, "__esModule", { value: !0 });
});
var o = {};
!(function () {
"use strict";
n.r(o),
n.d(o, {
Cookies: function () { Cookies: function () {
return s(); return l();
}, },
OPTIONS: function () { OPTIONS: function () {
return h; return O;
}, },
SAME_SITE_OPTIONS: function () { SAME_SITE_OPTIONS: function () {
return m;
},
default: function () {
return j;
},
getCookieConsentValue: function () {
return g; return g;
}, },
default: function () {
return w;
},
getCookieConsentValue: function () {
return S;
},
}); });
const o = require("react"); const e = require("react");
var r = n.n(o), var t = n.n(e),
i = n(697), r = n(697),
c = n.n(i), i = n.n(r),
a = n(808), c = n(808),
s = n.n(a); l = n.n(c);
function l(e) { function a(e) {
return (l = return (a =
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
? function (e) { ? function (e) {
return typeof e; return typeof e;
@ -42,6 +212,7 @@ module.exports = (function () {
: typeof e; : typeof e;
})(e); })(e);
} }
var s = ["children"];
function u() { function u() {
return (u = return (u =
Object.assign || Object.assign ||
@ -70,7 +241,7 @@ module.exports = (function () {
var n = null != arguments[t] ? arguments[t] : {}; var n = null != arguments[t] ? arguments[t] : {};
t % 2 t % 2
? p(Object(n), !0).forEach(function (t) { ? p(Object(n), !0).forEach(function (t) {
b(e, t, n[t]); h(e, t, n[t]);
}) })
: Object.getOwnPropertyDescriptors : Object.getOwnPropertyDescriptors
? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
@ -80,7 +251,41 @@ module.exports = (function () {
} }
return e; return e;
} }
function b(e, t, n) { function d(e, t) {
for (var n = 0; n < t.length; n++) {
var o = t[n];
(o.enumerable = o.enumerable || !1),
(o.configurable = !0),
"value" in o && (o.writable = !0),
Object.defineProperty(e, o.key, o);
}
}
function b(e, t) {
return (b =
Object.setPrototypeOf ||
function (e, t) {
return (e.__proto__ = t), e;
})(e, t);
}
function y(e, t) {
if (t && ("object" === a(t) || "function" == typeof t)) return t;
if (void 0 !== t)
throw new TypeError("Derived constructors may only return object or undefined");
return v(e);
}
function v(e) {
if (void 0 === e)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
function m(e) {
return (m = Object.setPrototypeOf
? Object.getPrototypeOf
: function (e) {
return e.__proto__ || Object.getPrototypeOf(e);
})(e);
}
function h(e, t, n) {
return ( return (
t in e t in e
? Object.defineProperty(e, t, { ? Object.defineProperty(e, t, {
@ -93,79 +298,45 @@ module.exports = (function () {
e e
); );
} }
function y(e, t) { var O = { TOP: "top", BOTTOM: "bottom", NONE: "none" },
for (var n = 0; n < t.length; n++) { g = { STRICT: "strict", LAX: "lax", NONE: "none" },
var o = t[n]; S = function () {
(o.enumerable = o.enumerable || !1), var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : k,
(o.configurable = !0), t = l().get(e);
"value" in o && (o.writable = !0), return void 0 === t && (t = l().get(C(e))), t;
Object.defineProperty(e, o.key, o);
}
}
function d(e, t) {
return (d =
Object.setPrototypeOf ||
function (e, t) {
return (e.__proto__ = t), e;
})(e, t);
}
function v(e, t) {
return !t || ("object" !== l(t) && "function" != typeof t)
? (function (e) {
if (void 0 === e)
throw new ReferenceError(
"this hasn't been initialised - super() hasn't been called"
);
return e;
})(e)
: t;
}
function O(e) {
return (O = Object.setPrototypeOf
? Object.getPrototypeOf
: function (e) {
return e.__proto__ || Object.getPrototypeOf(e);
})(e);
}
var h = { TOP: "top", BOTTOM: "bottom", NONE: "none" },
m = { STRICT: "strict", LAX: "lax", NONE: "none" },
g = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : C,
t = s().get(e);
return void 0 === t && (t = s().get(S(e))), t;
}, },
S = function (e) { C = function (e) {
return "".concat(e, "-legacy"); return "".concat(e, "-legacy");
}, },
C = "CookieConsent", k = "CookieConsent",
k = function (e) { x = function (e) {
var t = e.condition, var t = e.condition,
n = e.wrapper, n = e.wrapper,
o = e.children; o = e.children;
return t ? n(o) : o; return t ? n(o) : o;
}, },
x = (function (e) { j = (function (e) {
!(function (e, t) { !(function (e, t) {
if ("function" != typeof t && null !== t) if ("function" != typeof t && null !== t)
throw new TypeError("Super expression must either be null or a function"); throw new TypeError("Super expression must either be null or a function");
(e.prototype = Object.create(t && t.prototype, { (e.prototype = Object.create(t && t.prototype, {
constructor: { value: e, writable: !0, configurable: !0 }, constructor: { value: e, writable: !0, configurable: !0 },
})), })),
t && d(e, t); t && b(e, t);
})(a, e); })(a, e);
var t, var n,
n,
o, o,
r,
i, i,
c = c =
((o = a), ((r = a),
(i = (function () { (i = (function () {
if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
if (Reflect.construct.sham) return !1; if (Reflect.construct.sham) return !1;
if ("function" == typeof Proxy) return !0; if ("function" == typeof Proxy) return !0;
try { try {
return ( return (
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0
); );
} catch (e) { } catch (e) {
return !1; return !1;
@ -173,12 +344,12 @@ module.exports = (function () {
})()), })()),
function () { function () {
var e, var e,
t = O(o); t = m(r);
if (i) { if (i) {
var n = O(this).constructor; var n = m(this).constructor;
e = Reflect.construct(t, arguments, n); e = Reflect.construct(t, arguments, n);
} else e = t.apply(this, arguments); } else e = t.apply(this, arguments);
return v(this, e); return y(this, e);
}); });
function a(e) { function a(e) {
var t; var t;
@ -186,7 +357,18 @@ module.exports = (function () {
(function (e, t) { (function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
})(this, a), })(this, a),
((t = c.call(this, e)).state = { h(v((t = c.call(this, e))), "handleScroll", function () {
var e = t.props.acceptOnScrollPercentage,
n = document.documentElement,
o = document.body,
r = "scrollTop",
i = "scrollHeight";
((n[r] || o[r]) / ((n[i] || o[i]) - n.clientHeight)) * 100 > e && t.accept(!0);
}),
h(v(t), "removeScrollListener", function () {
t.props.acceptOnScroll && window.removeEventListener("scroll", t.handleScroll);
}),
(t.state = {
visible: !1, visible: !1,
style: { style: {
alignItems: "baseline", alignItems: "baseline",
@ -237,24 +419,36 @@ module.exports = (function () {
); );
} }
return ( return (
(t = a), (n = a),
(n = [ (o = [
{ {
key: "componentDidMount", key: "componentDidMount",
value: function () { value: function () {
var e = this.props.debug; var e = this.props.debug;
(void 0 === this.getCookieValue() || e) && this.setState({ visible: !0 }); (void 0 === this.getCookieValue() || e) &&
(this.setState({ visible: !0 }),
this.props.acceptOnScroll &&
window.addEventListener("scroll", this.handleScroll, { passive: !0 }));
},
},
{
key: "componentWillUnmount",
value: function () {
this.removeScrollListener();
}, },
}, },
{ {
key: "accept", key: "accept",
value: function () { value: function () {
var e = this.props, var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
t = e.cookieName, t = this.props,
n = e.cookieValue, n = t.cookieName,
o = e.hideOnAccept, o = t.cookieValue,
r = e.onAccept; r = t.hideOnAccept,
this.setCookie(t, n), r(), o && this.setState({ visible: !1 }); i = t.onAccept;
this.setCookie(n, o),
i(null != e && e),
r && (this.setState({ visible: !1 }), this.removeScrollListener());
}, },
}, },
{ {
@ -280,14 +474,14 @@ module.exports = (function () {
c = this.props.cookieSecurity; c = this.props.cookieSecurity;
void 0 === c && (c = !location || "https:" === location.protocol); void 0 === c && (c = !location || "https:" === location.protocol);
var a = f(f({ expires: r }, o), {}, { sameSite: i, secure: c }); var a = f(f({ expires: r }, o), {}, { sameSite: i, secure: c });
i === m.NONE && s().set(S(e), t, a), s().set(e, t, a); i === g.NONE && l().set(C(e), t, a), l().set(e, t, a);
}, },
}, },
{ {
key: "getCookieValue", key: "getCookieValue",
value: function () { value: function () {
var e = this.props.cookieName; var e = this.props.cookieName;
return g(e); return S(e);
}, },
}, },
{ {
@ -295,70 +489,70 @@ module.exports = (function () {
value: function () { value: function () {
var e = this; var e = this;
if (!this.state.visible) return null; if (!this.state.visible) return null;
var t = this.props, var n = this.props,
n = t.location, o = n.location,
o = t.style, r = n.style,
i = t.buttonStyle, i = n.buttonStyle,
c = t.declineButtonStyle, c = n.declineButtonStyle,
a = t.contentStyle, l = n.contentStyle,
s = t.disableStyles, a = n.disableStyles,
l = t.buttonText, s = n.buttonText,
p = t.declineButtonText, p = n.declineButtonText,
b = t.containerClasses, d = n.containerClasses,
y = t.contentClasses, b = n.contentClasses,
d = t.buttonClasses, y = n.buttonClasses,
v = t.buttonWrapperClasses, v = n.buttonWrapperClasses,
O = t.declineButtonClasses, m = n.declineButtonClasses,
m = t.buttonId, h = n.buttonId,
g = t.declineButtonId, g = n.declineButtonId,
S = t.disableButtonStyles, S = n.disableButtonStyles,
C = t.enableDeclineButton, C = n.enableDeclineButton,
x = t.flipButtons, k = n.flipButtons,
j = t.ButtonComponent, j = n.ButtonComponent,
T = t.overlay, w = n.overlay,
w = t.overlayClasses, T = n.overlayClasses,
B = t.overlayStyle, B = n.overlayStyle,
P = t.ariaAcceptLabel, P = n.ariaAcceptLabel,
D = t.ariaDeclineLabel, E = n.ariaDeclineLabel,
E = {}, D = {},
I = {}, I = {},
N = {}, N = {},
_ = {}, _ = {},
R = {}; R = {};
switch ( switch (
(s (a
? ((E = u({}, o)), ? ((D = u({}, r)),
(I = u({}, i)), (I = u({}, i)),
(N = u({}, c)), (N = u({}, c)),
(_ = u({}, a)), (_ = u({}, l)),
(R = u({}, B))) (R = u({}, B)))
: ((E = u({}, f(f({}, this.state.style), o))), : ((D = u({}, f(f({}, this.state.style), r))),
(_ = u({}, f(f({}, this.state.contentStyle), a))), (_ = u({}, f(f({}, this.state.contentStyle), l))),
(R = u({}, f(f({}, this.state.overlayStyle), B))), (R = u({}, f(f({}, this.state.overlayStyle), B))),
S S
? ((I = u({}, i)), (N = u({}, c))) ? ((I = u({}, i)), (N = u({}, c)))
: ((I = u({}, f(f({}, this.state.buttonStyle), i))), : ((I = u({}, f(f({}, this.state.buttonStyle), i))),
(N = u({}, f(f({}, this.state.declineButtonStyle), c))))), (N = u({}, f(f({}, this.state.declineButtonStyle), c))))),
n) o)
) { ) {
case h.TOP: case O.TOP:
E.top = "0"; D.top = "0";
break; break;
case h.BOTTOM: case O.BOTTOM:
E.bottom = "0"; D.bottom = "0";
} }
var A = []; var A = [];
return ( return (
C && C &&
A.push( A.push(
r().createElement( t().createElement(
j, j,
{ {
key: "declineButton", key: "declineButton",
style: N, style: N,
className: O, className: m,
id: g, id: g,
"aria-label": D, "aria-label": E,
onClick: function () { onClick: function () {
e.decline(); e.decline();
}, },
@ -367,35 +561,35 @@ module.exports = (function () {
) )
), ),
A.push( A.push(
r().createElement( t().createElement(
j, j,
{ {
key: "acceptButton", key: "acceptButton",
style: I, style: I,
className: d, className: y,
id: m, id: h,
"aria-label": P, "aria-label": P,
onClick: function () { onClick: function () {
e.accept(); e.accept();
}, },
}, },
l s
) )
), ),
x && A.reverse(), k && A.reverse(),
r().createElement( t().createElement(
k, x,
{ {
condition: T, condition: w,
wrapper: function (e) { wrapper: function (e) {
return r().createElement("div", { style: R, className: w }, e); return t().createElement("div", { style: R, className: T }, e);
}, },
}, },
r().createElement( t().createElement(
"div", "div",
{ className: "".concat(b), style: E }, { className: "".concat(d), style: D },
r().createElement("div", { style: _, className: y }, this.props.children), t().createElement("div", { style: _, className: b }, this.props.children),
r().createElement( t().createElement(
"div", "div",
{ className: "".concat(v) }, { className: "".concat(v) },
A.map(function (e) { A.map(function (e) {
@ -407,66 +601,68 @@ module.exports = (function () {
); );
}, },
}, },
]) && y(t.prototype, n), ]) && d(n.prototype, o),
a a
); );
})(o.Component); })(e.Component);
(x.propTypes = { (j.propTypes = {
location: c().oneOf( location: i().oneOf(
Object.keys(h).map(function (e) { Object.keys(O).map(function (e) {
return h[e]; return O[e];
}) })
), ),
sameSite: c().oneOf( sameSite: i().oneOf(
Object.keys(m).map(function (e) { Object.keys(g).map(function (e) {
return m[e]; return g[e];
}) })
), ),
style: c().object, style: i().object,
buttonStyle: c().object, buttonStyle: i().object,
declineButtonStyle: c().object, declineButtonStyle: i().object,
contentStyle: c().object, contentStyle: i().object,
children: c().any, children: i().any,
disableStyles: c().bool, disableStyles: i().bool,
hideOnAccept: c().bool, hideOnAccept: i().bool,
hideOnDecline: c().bool, hideOnDecline: i().bool,
onAccept: c().func, onAccept: i().func,
onDecline: c().func, onDecline: i().func,
buttonText: c().oneOfType([c().string, c().func, c().element]), buttonText: i().oneOfType([i().string, i().func, i().element]),
declineButtonText: c().oneOfType([c().string, c().func, c().element]), declineButtonText: i().oneOfType([i().string, i().func, i().element]),
cookieName: c().string, cookieName: i().string,
cookieValue: c().oneOfType([c().string, c().bool, c().number]), cookieValue: i().oneOfType([i().string, i().bool, i().number]),
declineCookieValue: c().oneOfType([c().string, c().bool, c().number]), declineCookieValue: i().oneOfType([i().string, i().bool, i().number]),
setDeclineCookie: c().bool, setDeclineCookie: i().bool,
debug: c().bool, debug: i().bool,
expires: c().number, expires: i().number,
containerClasses: c().string, containerClasses: i().string,
contentClasses: c().string, contentClasses: i().string,
buttonClasses: c().string, buttonClasses: i().string,
buttonWrapperClasses: c().string, buttonWrapperClasses: i().string,
declineButtonClasses: c().string, declineButtonClasses: i().string,
buttonId: c().string, buttonId: i().string,
declineButtonId: c().string, declineButtonId: i().string,
extraCookieOptions: c().object, extraCookieOptions: i().object,
disableButtonStyles: c().bool, disableButtonStyles: i().bool,
enableDeclineButton: c().bool, enableDeclineButton: i().bool,
flipButtons: c().bool, flipButtons: i().bool,
ButtonComponent: c().elementType, ButtonComponent: i().elementType,
cookieSecurity: c().bool, cookieSecurity: i().bool,
overlay: c().bool, overlay: i().bool,
overlayClasses: c().string, overlayClasses: i().string,
overlayStyle: c().object, overlayStyle: i().object,
ariaAcceptLabel: c().string, ariaAcceptLabel: i().string,
ariaDeclineLabel: c().string, ariaDeclineLabel: i().string,
acceptOnScroll: i().bool,
acceptOnScrollPercentage: i().number,
}), }),
(x.defaultProps = { (j.defaultProps = {
disableStyles: !1, disableStyles: !1,
hideOnAccept: !0, hideOnAccept: !0,
hideOnDecline: !0, hideOnDecline: !0,
location: h.BOTTOM, location: O.BOTTOM,
onAccept: function () {}, onAccept: function () {},
onDecline: function () {}, onDecline: function () {},
cookieName: C, cookieName: k,
cookieValue: !0, cookieValue: !0,
declineCookieValue: !1, declineCookieValue: !1,
setDeclineCookie: !0, setDeclineCookie: !0,
@ -485,10 +681,10 @@ module.exports = (function () {
disableButtonStyles: !1, disableButtonStyles: !1,
enableDeclineButton: !1, enableDeclineButton: !1,
flipButtons: !1, flipButtons: !1,
sameSite: m.LAX, sameSite: g.LAX,
ButtonComponent: function (e) { ButtonComponent: function (e) {
var t = e.children, var n = e.children,
n = (function (e, t) { o = (function (e, t) {
if (null == e) return {}; if (null == e) return {};
var n, var n,
o, o,
@ -509,184 +705,17 @@ module.exports = (function () {
(Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n])); (Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]));
} }
return r; return r;
})(e, ["children"]); })(e, s);
return r().createElement("button", n, t); return t().createElement("button", o, n);
}, },
overlay: !1, overlay: !1,
overlayClasses: "", overlayClasses: "",
ariaAcceptLabel: "Accept cookies", ariaAcceptLabel: "Accept cookies",
ariaDeclineLabel: "Decline cookies", ariaDeclineLabel: "Decline cookies",
acceptOnScroll: !1,
acceptOnScrollPercentage: 25,
}); });
const j = x; const w = j;
}, })(),
808: function (e, t, n) { (module.exports = o);
var o, r, i;
void 0 ===
(r =
"function" ==
typeof (o = i = function () {
function e() {
for (var e = 0, t = {}; e < arguments.length; e++) {
var n = arguments[e];
for (var o in n) t[o] = n[o];
}
return t;
}
function t(e) {
return e.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
}
return (function n(o) {
function r() {}
function i(t, n, i) {
if ("undefined" != typeof document) {
"number" == typeof (i = e({ path: "/" }, r.defaults, i)).expires &&
(i.expires = new Date(1 * new Date() + 864e5 * i.expires)),
(i.expires = i.expires ? i.expires.toUTCString() : "");
try {
var c = JSON.stringify(n);
/^[\{\[]/.test(c) && (n = c);
} catch (e) {}
(n = o.write
? o.write(n, t)
: encodeURIComponent(String(n)).replace(
/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
decodeURIComponent
)),
(t = encodeURIComponent(String(t))
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
.replace(/[\(\)]/g, escape));
var a = "";
for (var s in i)
i[s] && ((a += "; " + s), !0 !== i[s] && (a += "=" + i[s].split(";")[0]));
return (document.cookie = t + "=" + n + a);
}
}
function c(e, n) {
if ("undefined" != typeof document) {
for (
var r = {}, i = document.cookie ? document.cookie.split("; ") : [], c = 0;
c < i.length;
c++
) {
var a = i[c].split("="),
s = a.slice(1).join("=");
n || '"' !== s.charAt(0) || (s = s.slice(1, -1));
try {
var l = t(a[0]);
if (((s = (o.read || o)(s, l) || t(s)), n))
try {
s = JSON.parse(s);
} catch (e) {}
if (((r[l] = s), e === l)) break;
} catch (e) {}
}
return e ? r[e] : r;
}
}
return (
(r.set = i),
(r.get = function (e) {
return c(e, !1);
}),
(r.getJSON = function (e) {
return c(e, !0);
}),
(r.remove = function (t, n) {
i(t, "", e(n, { expires: -1 }));
}),
(r.defaults = {}),
(r.withConverter = n),
r
);
})(function () {});
})
? o.call(t, n, t, e)
: o) || (e.exports = r),
(e.exports = i());
},
703: function (e, t, n) {
"use strict";
var o = n(414);
function r() {}
function i() {}
(i.resetWarningCache = r),
(e.exports = function () {
function e(e, t, n, r, i, c) {
if (c !== o) {
var a = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
);
throw ((a.name = "Invariant Violation"), a);
}
}
function t() {
return e;
}
e.isRequired = e;
var n = {
array: e,
bool: e,
func: e,
number: e,
object: e,
string: e,
symbol: e,
any: e,
arrayOf: t,
element: e,
elementType: e,
instanceOf: t,
node: e,
objectOf: t,
oneOf: t,
oneOfType: t,
shape: t,
exact: t,
checkPropTypes: i,
resetWarningCache: r,
};
return (n.PropTypes = n), n;
});
},
697: function (e, t, n) {
e.exports = n(703)();
},
414: function (e) {
"use strict";
e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
},
},
t = {};
function n(o) {
if (t[o]) return t[o].exports;
var r = (t[o] = { exports: {} });
return e[o](r, r.exports, n), r.exports;
}
return (
(n.n = function (e) {
var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return n.d(t, { a: t }), t;
}),
(n.d = function (e, t) {
for (var o in t)
n.o(t, o) && !n.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
}),
(n.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}),
(n.r = function (e) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(e, "__esModule", { value: !0 });
}),
n(866)
);
})(); })();

1
example Submodule

@ -0,0 +1 @@
Subproject commit bff8dd76c5c13a0bf38a555b2d551e11540d30f0

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "react-cookie-consent", "name": "react-cookie-consent",
"version": "6.2.4", "version": "6.3.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "6.2.4", "version": "6.3.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",

View File

@ -4,7 +4,7 @@
"name": "Rick van Lieshout", "name": "Rick van Lieshout",
"email": "info@rickvanlieshout.com" "email": "info@rickvanlieshout.com"
}, },
"version": "6.2.4", "version": "6.3.0",
"description": "A small, simple and customizable cookie consent bar for use in React applications.", "description": "A small, simple and customizable cookie consent bar for use in React applications.",
"main": "build/index.js", "main": "build/index.js",
"types": "build/index.d.ts", "types": "build/index.d.ts",