@commercetools-frontend/cookie-consent 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/dist/commercetools-frontend-cookie-consent-core.cjs.d.ts +1 -1
- package/core/dist/commercetools-frontend-cookie-consent-core.cjs.dev.js +4 -8
- package/core/dist/commercetools-frontend-cookie-consent-core.cjs.prod.js +4 -8
- package/core/dist/commercetools-frontend-cookie-consent-core.esm.js +4 -7
- package/package.json +15 -15
- package/react/dist/commercetools-frontend-cookie-consent-react.cjs.d.ts +1 -1
- package/react/dist/commercetools-frontend-cookie-consent-react.cjs.dev.js +3 -5
- package/react/dist/commercetools-frontend-cookie-consent-react.cjs.prod.js +3 -5
- package/react/dist/commercetools-frontend-cookie-consent-react.esm.js +3 -5
- package/core/dist/commercetools-frontend-cookie-consent-core.cjs.d.ts.map +0 -1
- package/react/dist/commercetools-frontend-cookie-consent-react.cjs.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "../../dist/declarations/src/core/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1jb29raWUtY29uc2VudC1jb3JlLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZGlzdC9kZWNsYXJhdGlvbnMvc3JjL2NvcmUvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
|
@@ -17,7 +17,6 @@ var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
|
17
17
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
18
18
|
var _URLSearchParams = require('@babel/runtime-corejs3/core-js-stable/url-search-params');
|
|
19
19
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
20
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
21
20
|
|
|
22
21
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
23
22
|
|
|
@@ -34,11 +33,10 @@ var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
|
34
33
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
35
34
|
var _URLSearchParams__default = /*#__PURE__*/_interopDefault(_URLSearchParams);
|
|
36
35
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
37
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
38
36
|
|
|
39
37
|
var _context2;
|
|
40
38
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
39
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
42
40
|
const COOKIE_CONSENT_GROUPS = {
|
|
43
41
|
essentialCookies: 'C0001',
|
|
44
42
|
performanceCookies: 'C0002',
|
|
@@ -93,12 +91,11 @@ function getParsedConsentCookieGroups() {
|
|
|
93
91
|
* This implementation is good enough for the purposes here.
|
|
94
92
|
*/
|
|
95
93
|
function generateUuid(prefix) {
|
|
96
|
-
return prefix ? ((Number(prefix) ^ Math.random() * 16) >> Number(prefix) / 4).toString(16) :
|
|
94
|
+
return prefix ? ((Number(prefix) ^ Math.random() * 16) >> Number(prefix) / 4).toString(16) : `${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g, generateUuid);
|
|
97
95
|
}
|
|
98
96
|
function generateEncodedConsentGroups(consentGroups) {
|
|
99
97
|
var _context5, _context6;
|
|
100
98
|
return _filterInstanceProperty__default["default"](_context5 = _mapInstanceProperty__default["default"](_context6 = _Object$entries__default["default"](consentGroups)).call(_context6, _ref4 => {
|
|
101
|
-
var _context7;
|
|
102
99
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
103
100
|
consentGroupName = _ref5[0],
|
|
104
101
|
consentGroupValue = _ref5[1];
|
|
@@ -106,7 +103,7 @@ function generateEncodedConsentGroups(consentGroups) {
|
|
|
106
103
|
if (!encodedConsentGroup) {
|
|
107
104
|
return null;
|
|
108
105
|
}
|
|
109
|
-
return
|
|
106
|
+
return `${encodedConsentGroup}:${consentGroupValue && '1' || '0'}`;
|
|
110
107
|
})).call(_context5, Boolean).join(',');
|
|
111
108
|
}
|
|
112
109
|
function generateConsentCookie(consentGroups) {
|
|
@@ -128,7 +125,6 @@ function generateConsentCookie(consentGroups) {
|
|
|
128
125
|
return consentCookieValue.toString();
|
|
129
126
|
}
|
|
130
127
|
function setConsentCookie(consentGroups, domain) {
|
|
131
|
-
var _context8, _context9, _context10;
|
|
132
128
|
const expiresAt = new Date();
|
|
133
129
|
expiresAt.setFullYear(expiresAt.getFullYear() + 11);
|
|
134
130
|
let consentCookieDomain;
|
|
@@ -145,7 +141,7 @@ function setConsentCookie(consentGroups, domain) {
|
|
|
145
141
|
} else {
|
|
146
142
|
consentCookieDomain = '.commercetools.com';
|
|
147
143
|
}
|
|
148
|
-
document.cookie =
|
|
144
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=${generateConsentCookie(consentGroups)}; domain=${consentCookieDomain}; expires=${expiresAt.toUTCString()}; SameSite=Lax; path=/; `;
|
|
149
145
|
}
|
|
150
146
|
|
|
151
147
|
exports.CONSENT_COOKIE_NAME = CONSENT_COOKIE_NAME;
|
|
@@ -17,7 +17,6 @@ var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
|
17
17
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
18
18
|
var _URLSearchParams = require('@babel/runtime-corejs3/core-js-stable/url-search-params');
|
|
19
19
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
20
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
21
20
|
|
|
22
21
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
23
22
|
|
|
@@ -34,11 +33,10 @@ var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
|
34
33
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
35
34
|
var _URLSearchParams__default = /*#__PURE__*/_interopDefault(_URLSearchParams);
|
|
36
35
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
37
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
38
36
|
|
|
39
37
|
var _context2;
|
|
40
38
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
39
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
42
40
|
const COOKIE_CONSENT_GROUPS = {
|
|
43
41
|
essentialCookies: 'C0001',
|
|
44
42
|
performanceCookies: 'C0002',
|
|
@@ -93,12 +91,11 @@ function getParsedConsentCookieGroups() {
|
|
|
93
91
|
* This implementation is good enough for the purposes here.
|
|
94
92
|
*/
|
|
95
93
|
function generateUuid(prefix) {
|
|
96
|
-
return prefix ? ((Number(prefix) ^ Math.random() * 16) >> Number(prefix) / 4).toString(16) :
|
|
94
|
+
return prefix ? ((Number(prefix) ^ Math.random() * 16) >> Number(prefix) / 4).toString(16) : `${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g, generateUuid);
|
|
97
95
|
}
|
|
98
96
|
function generateEncodedConsentGroups(consentGroups) {
|
|
99
97
|
var _context5, _context6;
|
|
100
98
|
return _filterInstanceProperty__default["default"](_context5 = _mapInstanceProperty__default["default"](_context6 = _Object$entries__default["default"](consentGroups)).call(_context6, _ref4 => {
|
|
101
|
-
var _context7;
|
|
102
99
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
103
100
|
consentGroupName = _ref5[0],
|
|
104
101
|
consentGroupValue = _ref5[1];
|
|
@@ -106,7 +103,7 @@ function generateEncodedConsentGroups(consentGroups) {
|
|
|
106
103
|
if (!encodedConsentGroup) {
|
|
107
104
|
return null;
|
|
108
105
|
}
|
|
109
|
-
return
|
|
106
|
+
return `${encodedConsentGroup}:${consentGroupValue && '1' || '0'}`;
|
|
110
107
|
})).call(_context5, Boolean).join(',');
|
|
111
108
|
}
|
|
112
109
|
function generateConsentCookie(consentGroups) {
|
|
@@ -128,7 +125,6 @@ function generateConsentCookie(consentGroups) {
|
|
|
128
125
|
return consentCookieValue.toString();
|
|
129
126
|
}
|
|
130
127
|
function setConsentCookie(consentGroups, domain) {
|
|
131
|
-
var _context8, _context9, _context10;
|
|
132
128
|
const expiresAt = new Date();
|
|
133
129
|
expiresAt.setFullYear(expiresAt.getFullYear() + 11);
|
|
134
130
|
let consentCookieDomain;
|
|
@@ -145,7 +141,7 @@ function setConsentCookie(consentGroups, domain) {
|
|
|
145
141
|
} else {
|
|
146
142
|
consentCookieDomain = '.commercetools.com';
|
|
147
143
|
}
|
|
148
|
-
document.cookie =
|
|
144
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=${generateConsentCookie(consentGroups)}; domain=${consentCookieDomain}; expires=${expiresAt.toUTCString()}; SameSite=Lax; path=/; `;
|
|
149
145
|
}
|
|
150
146
|
|
|
151
147
|
exports.CONSENT_COOKIE_NAME = CONSENT_COOKIE_NAME;
|
|
@@ -13,11 +13,10 @@ import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
|
13
13
|
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
14
14
|
import _URLSearchParams from '@babel/runtime-corejs3/core-js-stable/url-search-params';
|
|
15
15
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
16
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
17
16
|
|
|
18
17
|
var _context2;
|
|
19
18
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
20
|
const COOKIE_CONSENT_GROUPS = {
|
|
22
21
|
essentialCookies: 'C0001',
|
|
23
22
|
performanceCookies: 'C0002',
|
|
@@ -72,12 +71,11 @@ function getParsedConsentCookieGroups() {
|
|
|
72
71
|
* This implementation is good enough for the purposes here.
|
|
73
72
|
*/
|
|
74
73
|
function generateUuid(prefix) {
|
|
75
|
-
return prefix ? ((Number(prefix) ^ Math.random() * 16) >> Number(prefix) / 4).toString(16) :
|
|
74
|
+
return prefix ? ((Number(prefix) ^ Math.random() * 16) >> Number(prefix) / 4).toString(16) : `${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g, generateUuid);
|
|
76
75
|
}
|
|
77
76
|
function generateEncodedConsentGroups(consentGroups) {
|
|
78
77
|
var _context5, _context6;
|
|
79
78
|
return _filterInstanceProperty(_context5 = _mapInstanceProperty(_context6 = _Object$entries(consentGroups)).call(_context6, _ref4 => {
|
|
80
|
-
var _context7;
|
|
81
79
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
82
80
|
consentGroupName = _ref5[0],
|
|
83
81
|
consentGroupValue = _ref5[1];
|
|
@@ -85,7 +83,7 @@ function generateEncodedConsentGroups(consentGroups) {
|
|
|
85
83
|
if (!encodedConsentGroup) {
|
|
86
84
|
return null;
|
|
87
85
|
}
|
|
88
|
-
return
|
|
86
|
+
return `${encodedConsentGroup}:${consentGroupValue && '1' || '0'}`;
|
|
89
87
|
})).call(_context5, Boolean).join(',');
|
|
90
88
|
}
|
|
91
89
|
function generateConsentCookie(consentGroups) {
|
|
@@ -107,7 +105,6 @@ function generateConsentCookie(consentGroups) {
|
|
|
107
105
|
return consentCookieValue.toString();
|
|
108
106
|
}
|
|
109
107
|
function setConsentCookie(consentGroups, domain) {
|
|
110
|
-
var _context8, _context9, _context10;
|
|
111
108
|
const expiresAt = new Date();
|
|
112
109
|
expiresAt.setFullYear(expiresAt.getFullYear() + 11);
|
|
113
110
|
let consentCookieDomain;
|
|
@@ -124,7 +121,7 @@ function setConsentCookie(consentGroups, domain) {
|
|
|
124
121
|
} else {
|
|
125
122
|
consentCookieDomain = '.commercetools.com';
|
|
126
123
|
}
|
|
127
|
-
document.cookie =
|
|
124
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=${generateConsentCookie(consentGroups)}; domain=${consentCookieDomain}; expires=${expiresAt.toUTCString()}; SameSite=Lax; path=/; `;
|
|
128
125
|
}
|
|
129
126
|
|
|
130
127
|
export { CONSENT_COOKIE_NAME, COOKIE_CONSENT_GROUPS, generateConsentCookie, getParsedConsentCookieGroups, getRawConsentCookie, setConsentCookie };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/cookie-consent",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "A package integrating with OneTrust cookie consent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/commercetools-frontend-cookie-consent.cjs.js",
|
|
@@ -17,28 +17,28 @@
|
|
|
17
17
|
"@babel/core": "^7.22.11",
|
|
18
18
|
"@babel/runtime": "^7.21.0",
|
|
19
19
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
20
|
-
"@commercetools-frontend/application-components": "^22.
|
|
21
|
-
"@commercetools-uikit/collapsible-panel": "^
|
|
22
|
-
"@commercetools-uikit/design-system": "^
|
|
23
|
-
"@commercetools-uikit/grid": "^
|
|
24
|
-
"@commercetools-uikit/link": "^
|
|
25
|
-
"@commercetools-uikit/primary-button": "^
|
|
26
|
-
"@commercetools-uikit/spacings": "^
|
|
27
|
-
"@commercetools-uikit/text": "^
|
|
28
|
-
"@commercetools-uikit/toggle-input": "^
|
|
20
|
+
"@commercetools-frontend/application-components": "^22.16.0",
|
|
21
|
+
"@commercetools-uikit/collapsible-panel": "^17.0.1",
|
|
22
|
+
"@commercetools-uikit/design-system": "^17.0.1",
|
|
23
|
+
"@commercetools-uikit/grid": "^17.0.1",
|
|
24
|
+
"@commercetools-uikit/link": "^17.0.1",
|
|
25
|
+
"@commercetools-uikit/primary-button": "^17.0.1",
|
|
26
|
+
"@commercetools-uikit/spacings": "^17.0.1",
|
|
27
|
+
"@commercetools-uikit/text": "^17.0.1",
|
|
28
|
+
"@commercetools-uikit/toggle-input": "^17.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@commercetools-frontend/application-shell": "22.
|
|
32
|
-
"@commercetools-frontend/application-shell-connectors": "22.
|
|
31
|
+
"@commercetools-frontend/application-shell": "22.16.0",
|
|
32
|
+
"@commercetools-frontend/application-shell-connectors": "22.16.0",
|
|
33
33
|
"@emotion/react": "^11.11.1",
|
|
34
34
|
"@testing-library/react": "12.1.5",
|
|
35
35
|
"@testing-library/react-hooks": "8.0.1",
|
|
36
36
|
"@types/jest": "^29.5.2",
|
|
37
|
-
"@types/react": "17.0.
|
|
37
|
+
"@types/react": "17.0.75",
|
|
38
38
|
"@types/testing-library__jest-dom": "^5.14.6",
|
|
39
|
-
"@types/node": "20.
|
|
39
|
+
"@types/node": "20.11.5",
|
|
40
40
|
"react": "17.0.2",
|
|
41
|
-
"react-intl": "6.
|
|
41
|
+
"react-intl": "6.6.1",
|
|
42
42
|
"typescript": "5.2.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "../../dist/declarations/src/react/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1jb29raWUtY29uc2VudC1yZWFjdC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2Rpc3QvZGVjbGFyYXRpb25zL3NyYy9yZWFjdC9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|
|
@@ -33,7 +33,6 @@ require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
|
33
33
|
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
34
34
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
35
35
|
require('@babel/runtime-corejs3/core-js-stable/url-search-params');
|
|
36
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
37
36
|
|
|
38
37
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
39
38
|
|
|
@@ -260,7 +259,7 @@ const COOKIE_CONSENT_LINKS = {
|
|
|
260
259
|
};
|
|
261
260
|
|
|
262
261
|
const HOSTNAME = 'commercetools.com';
|
|
263
|
-
const createCookieLink = cookieName =>
|
|
262
|
+
const createCookieLink = cookieName => `https://cookiepedia.co.uk/cookies/${cookieName}`;
|
|
264
263
|
const createEssentialCookieDetails = intl => [{
|
|
265
264
|
name: {
|
|
266
265
|
label: intl.formatMessage(cookieDetailLabels.nameLabel),
|
|
@@ -605,8 +604,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
605
604
|
formatMessage = _useIntl2.formatMessage;
|
|
606
605
|
const scrollRef = /*#__PURE__*/react.createRef();
|
|
607
606
|
react.useEffect(() => {
|
|
608
|
-
|
|
609
|
-
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.scrollIntoView();
|
|
607
|
+
scrollRef.current?.scrollIntoView();
|
|
610
608
|
}, [scrollRef]);
|
|
611
609
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
612
610
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -624,7 +622,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
624
622
|
return jsxRuntime.jsx(Grid__default["default"], {
|
|
625
623
|
gridGap: designSystem.designTokens.spacing40,
|
|
626
624
|
gridRowGap: "0px",
|
|
627
|
-
gridTemplateColumns:
|
|
625
|
+
gridTemplateColumns: `${designSystem.designTokens.constraint2} 1fr`,
|
|
628
626
|
children: _mapInstanceProperty__default["default"](_context = _Object$values__default["default"](detail)).call(_context, value => jsxRuntime.jsxs(react.Fragment, {
|
|
629
627
|
children: [jsxRuntime.jsx(Grid__default["default"].Item, {
|
|
630
628
|
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
@@ -33,7 +33,6 @@ require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
|
33
33
|
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
34
34
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
35
35
|
require('@babel/runtime-corejs3/core-js-stable/url-search-params');
|
|
36
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
37
36
|
|
|
38
37
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
39
38
|
|
|
@@ -260,7 +259,7 @@ const COOKIE_CONSENT_LINKS = {
|
|
|
260
259
|
};
|
|
261
260
|
|
|
262
261
|
const HOSTNAME = 'commercetools.com';
|
|
263
|
-
const createCookieLink = cookieName =>
|
|
262
|
+
const createCookieLink = cookieName => `https://cookiepedia.co.uk/cookies/${cookieName}`;
|
|
264
263
|
const createEssentialCookieDetails = intl => [{
|
|
265
264
|
name: {
|
|
266
265
|
label: intl.formatMessage(cookieDetailLabels.nameLabel),
|
|
@@ -589,8 +588,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
589
588
|
formatMessage = _useIntl2.formatMessage;
|
|
590
589
|
const scrollRef = /*#__PURE__*/react.createRef();
|
|
591
590
|
react.useEffect(() => {
|
|
592
|
-
|
|
593
|
-
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.scrollIntoView();
|
|
591
|
+
scrollRef.current?.scrollIntoView();
|
|
594
592
|
}, [scrollRef]);
|
|
595
593
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
596
594
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -608,7 +606,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
608
606
|
return jsxRuntime.jsx(Grid__default["default"], {
|
|
609
607
|
gridGap: designSystem.designTokens.spacing40,
|
|
610
608
|
gridRowGap: "0px",
|
|
611
|
-
gridTemplateColumns:
|
|
609
|
+
gridTemplateColumns: `${designSystem.designTokens.constraint2} 1fr`,
|
|
612
610
|
children: _mapInstanceProperty__default["default"](_context = _Object$values__default["default"](detail)).call(_context, value => jsxRuntime.jsxs(react.Fragment, {
|
|
613
611
|
children: [jsxRuntime.jsx(Grid__default["default"].Item, {
|
|
614
612
|
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
@@ -29,7 +29,6 @@ import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
|
29
29
|
import '@babel/runtime-corejs3/core-js-stable/object/from-entries';
|
|
30
30
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
31
31
|
import '@babel/runtime-corejs3/core-js-stable/url-search-params';
|
|
32
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
33
32
|
|
|
34
33
|
const defaultConsentOptions = {
|
|
35
34
|
skipConsent: false,
|
|
@@ -236,7 +235,7 @@ const COOKIE_CONSENT_LINKS = {
|
|
|
236
235
|
};
|
|
237
236
|
|
|
238
237
|
const HOSTNAME = 'commercetools.com';
|
|
239
|
-
const createCookieLink = cookieName =>
|
|
238
|
+
const createCookieLink = cookieName => `https://cookiepedia.co.uk/cookies/${cookieName}`;
|
|
240
239
|
const createEssentialCookieDetails = intl => [{
|
|
241
240
|
name: {
|
|
242
241
|
label: intl.formatMessage(cookieDetailLabels.nameLabel),
|
|
@@ -581,8 +580,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
581
580
|
formatMessage = _useIntl2.formatMessage;
|
|
582
581
|
const scrollRef = /*#__PURE__*/createRef();
|
|
583
582
|
useEffect(() => {
|
|
584
|
-
|
|
585
|
-
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.scrollIntoView();
|
|
583
|
+
scrollRef.current?.scrollIntoView();
|
|
586
584
|
}, [scrollRef]);
|
|
587
585
|
return jsxs(Fragment, {
|
|
588
586
|
children: [jsx("div", {
|
|
@@ -600,7 +598,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
600
598
|
return jsx(Grid, {
|
|
601
599
|
gridGap: designTokens.spacing40,
|
|
602
600
|
gridRowGap: "0px",
|
|
603
|
-
gridTemplateColumns:
|
|
601
|
+
gridTemplateColumns: `${designTokens.constraint2} 1fr`,
|
|
604
602
|
children: _mapInstanceProperty(_context = _Object$values(detail)).call(_context, value => jsxs(Fragment$1, {
|
|
605
603
|
children: [jsx(Grid.Item, {
|
|
606
604
|
children: jsx(Text.Detail, {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-cookie-consent-core.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/core/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-cookie-consent-react.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/react/index.d.ts"],"names":[],"mappings":"AAAA"}
|