1 Commits
7.0.1 ... 7.0.0

Author SHA1 Message Date
Peter Krieg
d6c751860c Switch Library Type from CommonJs2 => UMD (#134) 2021-12-08 17:32:57 +01:00
4 changed files with 717 additions and 736 deletions

View File

@@ -5,10 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [[7.0.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.4.1)]
- Switched from CommonJS to UMD module
## [[6.4.1](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.4.1))]
- Added missing typing

View File

@@ -1,14 +1,5 @@
/*! For license information please see index.js.LICENSE.txt */
!(function (e, t) {
"object" == typeof exports && "object" == typeof module
? (module.exports = t())
: "function" == typeof define && define.amd
? define([], t)
: "object" == typeof exports
? (exports.ReactCookieConsent = t())
: (e.ReactCookieConsent = t());
})(self, function () {
return (function () {
!(function () {
var e = {
808: function (e, t, n) {
var o, r, i;
@@ -180,8 +171,7 @@
Object.defineProperty(e, "__esModule", { value: !0 });
});
var o = {};
return (
(function () {
!(function () {
"use strict";
n.r(o),
n.d(o, {
@@ -318,19 +308,19 @@
g = { STRICT: "strict", LAX: "lax", NONE: "none" },
S = { HIDDEN: "hidden", SHOW: "show", BY_COOKIE_VALUE: "byCookieValue" },
C = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : j,
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : w,
t = l().get(e);
return void 0 === t && (t = l().get(x(e))), t;
},
k = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : j;
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : w;
l().remove(e);
},
x = function (e) {
return "".concat(e, "-legacy");
},
j = "CookieConsent",
w = function (e) {
w = "CookieConsent",
j = function (e) {
var t = e.condition,
n = e.wrapper,
o = e.children;
@@ -357,10 +347,7 @@
if ("function" == typeof Proxy) return !0;
try {
return (
Boolean.prototype.valueOf.call(
Reflect.construct(Boolean, [], function () {})
),
!0
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0
);
} catch (e) {
return !1;
@@ -537,7 +524,7 @@
C = n.disableButtonStyles,
k = n.enableDeclineButton,
x = n.flipButtons,
j = n.ButtonComponent,
w = n.ButtonComponent,
T = n.overlay,
B = n.overlayClasses,
E = n.overlayStyle,
@@ -546,18 +533,18 @@
I = {},
_ = {},
N = {},
R = {},
A = {};
A = {},
L = {};
switch (
(a
? ((I = u({}, r)),
(_ = u({}, i)),
(N = u({}, c)),
(R = u({}, l)),
(A = u({}, E)))
(A = u({}, l)),
(L = u({}, E)))
: ((I = u({}, f(f({}, this.state.style), r))),
(R = u({}, f(f({}, this.state.contentStyle), l))),
(A = u({}, f(f({}, this.state.overlayStyle), E))),
(A = u({}, f(f({}, this.state.contentStyle), l))),
(L = u({}, f(f({}, this.state.overlayStyle), E))),
C
? ((_ = u({}, i)), (N = u({}, c)))
: ((_ = u({}, f(f({}, this.state.buttonStyle), i))),
@@ -570,12 +557,12 @@
case m.BOTTOM:
I.bottom = "0";
}
var L = [];
var R = [];
return (
k &&
L.push(
R.push(
t().createElement(
j,
w,
{
key: "declineButton",
style: N,
@@ -589,9 +576,9 @@
p
)
),
L.push(
R.push(
t().createElement(
j,
w,
{
key: "acceptButton",
style: _,
@@ -605,23 +592,23 @@
s
)
),
x && L.reverse(),
x && R.reverse(),
t().createElement(
w,
j,
{
condition: T,
wrapper: function (e) {
return t().createElement("div", { style: A, className: B }, e);
return t().createElement("div", { style: L, className: B }, e);
},
},
t().createElement(
"div",
{ className: "".concat(d), style: I },
t().createElement("div", { style: R, className: b }, this.props.children),
t().createElement("div", { style: A, className: b }, this.props.children),
t().createElement(
"div",
{ className: "".concat(v) },
L.map(function (e) {
R.map(function (e) {
return e;
})
)
@@ -697,7 +684,7 @@
visible: S.BY_COOKIE_VALUE,
onAccept: function () {},
onDecline: function () {},
cookieName: j,
cookieName: w,
cookieValue: !0,
declineCookieValue: !1,
setDeclineCookie: !0,
@@ -752,7 +739,5 @@
});
const B = T;
})(),
o
);
})();
});
(module.exports = o);
})();

4
package-lock.json generated
View File

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

View File

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