@commercetools-frontend/cookie-consent 2.4.2 → 2.4.3
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.dev.js +5 -10
- package/core/dist/commercetools-frontend-cookie-consent-core.cjs.prod.js +5 -10
- package/core/dist/commercetools-frontend-cookie-consent-core.esm.js +5 -9
- package/package.json +16 -15
- 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
|
@@ -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) {
|
|
@@ -143,7 +140,6 @@ function getConsentCookieDomain() {
|
|
|
143
140
|
return consentCookieDomain;
|
|
144
141
|
}
|
|
145
142
|
function setConsentCookie(consentGroups, domain) {
|
|
146
|
-
var _context8, _context9, _context10;
|
|
147
143
|
const expiresAt = new Date();
|
|
148
144
|
expiresAt.setFullYear(expiresAt.getFullYear() + 11);
|
|
149
145
|
let consentCookieDomain;
|
|
@@ -156,17 +152,16 @@ function setConsentCookie(consentGroups, domain) {
|
|
|
156
152
|
} else {
|
|
157
153
|
consentCookieDomain = getConsentCookieDomain();
|
|
158
154
|
}
|
|
159
|
-
document.cookie =
|
|
155
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=${generateConsentCookie(consentGroups)}; domain=${consentCookieDomain}; expires=${expiresAt.toUTCString()}; SameSite=Lax; path=/; `;
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
/**
|
|
163
159
|
* Deletes the consent cookie from the browser by setting the cookie's expiration date to a past date.
|
|
164
160
|
*/
|
|
165
161
|
function deleteConsentCookie() {
|
|
166
|
-
var _context11, _context12;
|
|
167
162
|
const beginningOfTime = 'Thu, 01 Jan 1970 00:00:00 GMT';
|
|
168
163
|
const cookieConsentDomain = getConsentCookieDomain();
|
|
169
|
-
document.cookie =
|
|
164
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=; expires=${beginningOfTime}; path=/; domain=${cookieConsentDomain}`;
|
|
170
165
|
}
|
|
171
166
|
|
|
172
167
|
/**
|
|
@@ -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) {
|
|
@@ -143,7 +140,6 @@ function getConsentCookieDomain() {
|
|
|
143
140
|
return consentCookieDomain;
|
|
144
141
|
}
|
|
145
142
|
function setConsentCookie(consentGroups, domain) {
|
|
146
|
-
var _context8, _context9, _context10;
|
|
147
143
|
const expiresAt = new Date();
|
|
148
144
|
expiresAt.setFullYear(expiresAt.getFullYear() + 11);
|
|
149
145
|
let consentCookieDomain;
|
|
@@ -156,17 +152,16 @@ function setConsentCookie(consentGroups, domain) {
|
|
|
156
152
|
} else {
|
|
157
153
|
consentCookieDomain = getConsentCookieDomain();
|
|
158
154
|
}
|
|
159
|
-
document.cookie =
|
|
155
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=${generateConsentCookie(consentGroups)}; domain=${consentCookieDomain}; expires=${expiresAt.toUTCString()}; SameSite=Lax; path=/; `;
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
/**
|
|
163
159
|
* Deletes the consent cookie from the browser by setting the cookie's expiration date to a past date.
|
|
164
160
|
*/
|
|
165
161
|
function deleteConsentCookie() {
|
|
166
|
-
var _context11, _context12;
|
|
167
162
|
const beginningOfTime = 'Thu, 01 Jan 1970 00:00:00 GMT';
|
|
168
163
|
const cookieConsentDomain = getConsentCookieDomain();
|
|
169
|
-
document.cookie =
|
|
164
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=; expires=${beginningOfTime}; path=/; domain=${cookieConsentDomain}`;
|
|
170
165
|
}
|
|
171
166
|
|
|
172
167
|
/**
|
|
@@ -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) {
|
|
@@ -122,7 +120,6 @@ function getConsentCookieDomain() {
|
|
|
122
120
|
return consentCookieDomain;
|
|
123
121
|
}
|
|
124
122
|
function setConsentCookie(consentGroups, domain) {
|
|
125
|
-
var _context8, _context9, _context10;
|
|
126
123
|
const expiresAt = new Date();
|
|
127
124
|
expiresAt.setFullYear(expiresAt.getFullYear() + 11);
|
|
128
125
|
let consentCookieDomain;
|
|
@@ -135,17 +132,16 @@ function setConsentCookie(consentGroups, domain) {
|
|
|
135
132
|
} else {
|
|
136
133
|
consentCookieDomain = getConsentCookieDomain();
|
|
137
134
|
}
|
|
138
|
-
document.cookie =
|
|
135
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=${generateConsentCookie(consentGroups)}; domain=${consentCookieDomain}; expires=${expiresAt.toUTCString()}; SameSite=Lax; path=/; `;
|
|
139
136
|
}
|
|
140
137
|
|
|
141
138
|
/**
|
|
142
139
|
* Deletes the consent cookie from the browser by setting the cookie's expiration date to a past date.
|
|
143
140
|
*/
|
|
144
141
|
function deleteConsentCookie() {
|
|
145
|
-
var _context11, _context12;
|
|
146
142
|
const beginningOfTime = 'Thu, 01 Jan 1970 00:00:00 GMT';
|
|
147
143
|
const cookieConsentDomain = getConsentCookieDomain();
|
|
148
|
-
document.cookie =
|
|
144
|
+
document.cookie = `${CONSENT_COOKIE_NAME}=; expires=${beginningOfTime}; path=/; domain=${cookieConsentDomain}`;
|
|
149
145
|
}
|
|
150
146
|
|
|
151
147
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/cookie-consent",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "A package integrating with OneTrust cookie consent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,24 +22,25 @@
|
|
|
22
22
|
"@babel/core": "^7.22.11",
|
|
23
23
|
"@babel/runtime": "^7.21.0",
|
|
24
24
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
25
|
-
"@commercetools-frontend/application-components": "npm:@commercetools-frontend/application-components@^22.
|
|
26
|
-
"@commercetools-uikit/collapsible-panel": "npm:@commercetools-uikit/collapsible-panel@^19.
|
|
27
|
-
"@commercetools-uikit/design-system": "npm:@commercetools-uikit/design-system@^19.
|
|
28
|
-
"@commercetools-uikit/grid": "npm:@commercetools-uikit/grid@^19.
|
|
29
|
-
"@commercetools-uikit/link": "npm:@commercetools-uikit/link@^19.
|
|
30
|
-
"@commercetools-uikit/primary-button": "npm:@commercetools-uikit/primary-button@^19.
|
|
31
|
-
"@commercetools-uikit/spacings": "npm:@commercetools-uikit/spacings@^19.
|
|
32
|
-
"@commercetools-uikit/text": "npm:@commercetools-uikit/text@^19.
|
|
33
|
-
"@commercetools-uikit/toggle-input": "npm:@commercetools-uikit/toggle-input@^19.
|
|
25
|
+
"@commercetools-frontend/application-components": "npm:@commercetools-frontend/application-components@^22.30.3",
|
|
26
|
+
"@commercetools-uikit/collapsible-panel": "npm:@commercetools-uikit/collapsible-panel@^19.9.0",
|
|
27
|
+
"@commercetools-uikit/design-system": "npm:@commercetools-uikit/design-system@^19.9.0",
|
|
28
|
+
"@commercetools-uikit/grid": "npm:@commercetools-uikit/grid@^19.9.0",
|
|
29
|
+
"@commercetools-uikit/link": "npm:@commercetools-uikit/link@^19.9.0",
|
|
30
|
+
"@commercetools-uikit/primary-button": "npm:@commercetools-uikit/primary-button@^19.9.0",
|
|
31
|
+
"@commercetools-uikit/spacings": "npm:@commercetools-uikit/spacings@^19.9.0",
|
|
32
|
+
"@commercetools-uikit/text": "npm:@commercetools-uikit/text@^19.9.0",
|
|
33
|
+
"@commercetools-uikit/toggle-input": "npm:@commercetools-uikit/toggle-input@^19.9.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@commercetools-frontend/application-shell
|
|
36
|
+
"@apollo/client": "3.7.10",
|
|
37
|
+
"@commercetools-frontend/application-shell": "22.30.3",
|
|
38
|
+
"@commercetools-frontend/application-shell-connectors": "22.30.3",
|
|
38
39
|
"@emotion/react": "^11.11.1",
|
|
39
40
|
"@testing-library/react": "12.1.5",
|
|
40
41
|
"@testing-library/react-hooks": "8.0.1",
|
|
41
42
|
"@types/jest": "^29.5.2",
|
|
42
|
-
"@types/node": "20.14.
|
|
43
|
+
"@types/node": "20.14.14",
|
|
43
44
|
"@types/react": "17.0.80",
|
|
44
45
|
"@types/testing-library__jest-dom": "^5.14.6",
|
|
45
46
|
"react": "17.0.2",
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
"typescript": "5.2.2"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
|
-
"@commercetools-frontend/application-shell": "22.
|
|
51
|
-
"@commercetools-frontend/application-shell-connectors": "22.
|
|
51
|
+
"@commercetools-frontend/application-shell": "^22.30.3",
|
|
52
|
+
"@commercetools-frontend/application-shell-connectors": "^22.30.3",
|
|
52
53
|
"@emotion/react": "11.x",
|
|
53
54
|
"react": "17.x",
|
|
54
55
|
"react-intl": "6.x"
|
|
@@ -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
|
|
|
@@ -261,7 +260,7 @@ const cookieDetailDescriptions = reactIntl.defineMessages({
|
|
|
261
260
|
});
|
|
262
261
|
|
|
263
262
|
const HOSTNAME = 'commercetools.com';
|
|
264
|
-
const createCookieLink = cookieName =>
|
|
263
|
+
const createCookieLink = cookieName => `https://cookiepedia.co.uk/cookies/${cookieName}`;
|
|
265
264
|
const createFunctionalCookieDetails = intl => [{
|
|
266
265
|
name: {
|
|
267
266
|
label: intl.formatMessage(cookieDetailLabels.nameLabel),
|
|
@@ -586,8 +585,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
586
585
|
formatMessage = _useIntl2.formatMessage;
|
|
587
586
|
const scrollRef = /*#__PURE__*/react.createRef();
|
|
588
587
|
react.useEffect(() => {
|
|
589
|
-
|
|
590
|
-
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.scrollIntoView();
|
|
588
|
+
scrollRef.current?.scrollIntoView();
|
|
591
589
|
}, [scrollRef]);
|
|
592
590
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
593
591
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -605,7 +603,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
605
603
|
return jsxRuntime.jsx(Grid__default["default"], {
|
|
606
604
|
gridGap: designSystem.designTokens.spacing40,
|
|
607
605
|
gridRowGap: "0px",
|
|
608
|
-
gridTemplateColumns:
|
|
606
|
+
gridTemplateColumns: `${designSystem.designTokens.constraint2} 1fr`,
|
|
609
607
|
children: _mapInstanceProperty__default["default"](_context = _Object$values__default["default"](detail)).call(_context, value => jsxRuntime.jsxs(react.Fragment, {
|
|
610
608
|
children: [jsxRuntime.jsx(Grid__default["default"].Item, {
|
|
611
609
|
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
|
|
|
@@ -261,7 +260,7 @@ const cookieDetailDescriptions = reactIntl.defineMessages({
|
|
|
261
260
|
});
|
|
262
261
|
|
|
263
262
|
const HOSTNAME = 'commercetools.com';
|
|
264
|
-
const createCookieLink = cookieName =>
|
|
263
|
+
const createCookieLink = cookieName => `https://cookiepedia.co.uk/cookies/${cookieName}`;
|
|
265
264
|
const createFunctionalCookieDetails = intl => [{
|
|
266
265
|
name: {
|
|
267
266
|
label: intl.formatMessage(cookieDetailLabels.nameLabel),
|
|
@@ -570,8 +569,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
570
569
|
formatMessage = _useIntl2.formatMessage;
|
|
571
570
|
const scrollRef = /*#__PURE__*/react.createRef();
|
|
572
571
|
react.useEffect(() => {
|
|
573
|
-
|
|
574
|
-
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.scrollIntoView();
|
|
572
|
+
scrollRef.current?.scrollIntoView();
|
|
575
573
|
}, [scrollRef]);
|
|
576
574
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
577
575
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -589,7 +587,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
589
587
|
return jsxRuntime.jsx(Grid__default["default"], {
|
|
590
588
|
gridGap: designSystem.designTokens.spacing40,
|
|
591
589
|
gridRowGap: "0px",
|
|
592
|
-
gridTemplateColumns:
|
|
590
|
+
gridTemplateColumns: `${designSystem.designTokens.constraint2} 1fr`,
|
|
593
591
|
children: _mapInstanceProperty__default["default"](_context = _Object$values__default["default"](detail)).call(_context, value => jsxRuntime.jsxs(react.Fragment, {
|
|
594
592
|
children: [jsxRuntime.jsx(Grid__default["default"].Item, {
|
|
595
593
|
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,
|
|
@@ -237,7 +236,7 @@ const cookieDetailDescriptions = defineMessages({
|
|
|
237
236
|
});
|
|
238
237
|
|
|
239
238
|
const HOSTNAME = 'commercetools.com';
|
|
240
|
-
const createCookieLink = cookieName =>
|
|
239
|
+
const createCookieLink = cookieName => `https://cookiepedia.co.uk/cookies/${cookieName}`;
|
|
241
240
|
const createFunctionalCookieDetails = intl => [{
|
|
242
241
|
name: {
|
|
243
242
|
label: intl.formatMessage(cookieDetailLabels.nameLabel),
|
|
@@ -562,8 +561,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
562
561
|
formatMessage = _useIntl2.formatMessage;
|
|
563
562
|
const scrollRef = /*#__PURE__*/createRef();
|
|
564
563
|
useEffect(() => {
|
|
565
|
-
|
|
566
|
-
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || _scrollRef$current.scrollIntoView();
|
|
564
|
+
scrollRef.current?.scrollIntoView();
|
|
567
565
|
}, [scrollRef]);
|
|
568
566
|
return jsxs(Fragment, {
|
|
569
567
|
children: [jsx("div", {
|
|
@@ -581,7 +579,7 @@ const CookieConsentBodyDetails = _ref8 => {
|
|
|
581
579
|
return jsx(Grid, {
|
|
582
580
|
gridGap: designTokens.spacing40,
|
|
583
581
|
gridRowGap: "0px",
|
|
584
|
-
gridTemplateColumns:
|
|
582
|
+
gridTemplateColumns: `${designTokens.constraint2} 1fr`,
|
|
585
583
|
children: _mapInstanceProperty(_context = _Object$values(detail)).call(_context, value => jsxs(Fragment$1, {
|
|
586
584
|
children: [jsx(Grid.Item, {
|
|
587
585
|
children: jsx(Text.Detail, {
|