@commercetools-frontend/cookie-consent 2.4.10 → 2.4.11
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.
|
@@ -20,7 +20,6 @@ var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/value
|
|
|
20
20
|
var CollapsiblePanel = require('@commercetools-uikit/collapsible-panel');
|
|
21
21
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
22
22
|
var Grid = require('@commercetools-uikit/grid');
|
|
23
|
-
var Link = require('@commercetools-uikit/link');
|
|
24
23
|
var Spacings = require('@commercetools-uikit/spacings');
|
|
25
24
|
var Text = require('@commercetools-uikit/text');
|
|
26
25
|
var ToggleInput = require('@commercetools-uikit/toggle-input');
|
|
@@ -48,7 +47,6 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
48
47
|
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
49
48
|
var CollapsiblePanel__default = /*#__PURE__*/_interopDefault(CollapsiblePanel);
|
|
50
49
|
var Grid__default = /*#__PURE__*/_interopDefault(Grid);
|
|
51
|
-
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
52
50
|
var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
53
51
|
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
54
52
|
var ToggleInput__default = /*#__PURE__*/_interopDefault(ToggleInput);
|
|
@@ -430,52 +428,56 @@ const View = {
|
|
|
430
428
|
/**
|
|
431
429
|
* The design spec warranted text that _looks_ like a link, but isn't
|
|
432
430
|
*/
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
431
|
+
var _ref4 = {
|
|
432
|
+
name: "1wbll7q",
|
|
433
|
+
styles: "text-decoration:underline"
|
|
434
|
+
} ;
|
|
435
|
+
const NavigationLink = _ref5 => {
|
|
436
|
+
let onClick = _ref5.onClick,
|
|
437
|
+
label = _ref5.label;
|
|
438
|
+
const underline = _ref4;
|
|
439
|
+
return jsxRuntime.jsx("a", {
|
|
437
440
|
onClick: e => {
|
|
438
441
|
e.preventDefault();
|
|
439
442
|
onClick();
|
|
440
443
|
},
|
|
441
|
-
|
|
444
|
+
href: "",
|
|
445
|
+
css: underline,
|
|
442
446
|
children: label
|
|
443
447
|
});
|
|
444
448
|
};
|
|
445
449
|
var _ref3 = {
|
|
446
|
-
name: "
|
|
447
|
-
styles: "
|
|
450
|
+
name: "1wbll7q",
|
|
451
|
+
styles: "text-decoration:underline"
|
|
448
452
|
} ;
|
|
449
|
-
const InformationLink =
|
|
450
|
-
let to =
|
|
451
|
-
label =
|
|
452
|
-
const
|
|
453
|
-
return jsxRuntime.jsx("
|
|
454
|
-
css:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
})
|
|
453
|
+
const InformationLink = _ref6 => {
|
|
454
|
+
let to = _ref6.to,
|
|
455
|
+
label = _ref6.label;
|
|
456
|
+
const underline = _ref3;
|
|
457
|
+
return jsxRuntime.jsx("a", {
|
|
458
|
+
css: underline,
|
|
459
|
+
href: to,
|
|
460
|
+
target: "_blank",
|
|
461
|
+
rel: "noopener noreferrer",
|
|
462
|
+
children: label
|
|
460
463
|
});
|
|
461
464
|
};
|
|
462
465
|
var _ref2 = {
|
|
463
|
-
name: "
|
|
464
|
-
styles: "
|
|
466
|
+
name: "1wbll7q",
|
|
467
|
+
styles: "text-decoration:underline"
|
|
465
468
|
} ;
|
|
466
|
-
const DetailLink =
|
|
467
|
-
let to =
|
|
468
|
-
label =
|
|
469
|
-
const
|
|
470
|
-
return jsxRuntime.jsx("
|
|
471
|
-
css:
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
})
|
|
469
|
+
const DetailLink = _ref7 => {
|
|
470
|
+
let to = _ref7.to,
|
|
471
|
+
label = _ref7.label;
|
|
472
|
+
const underline = _ref2;
|
|
473
|
+
return jsxRuntime.jsx("a", {
|
|
474
|
+
css: underline,
|
|
475
|
+
href: to,
|
|
476
|
+
target: "_blank",
|
|
477
|
+
rel: "noopener noreferrer",
|
|
478
|
+
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
479
|
+
tone: "primary",
|
|
480
|
+
children: label
|
|
479
481
|
})
|
|
480
482
|
});
|
|
481
483
|
};
|
|
@@ -483,14 +485,14 @@ var _ref$1 = {
|
|
|
483
485
|
name: "qzmnd2",
|
|
484
486
|
styles: "padding-right:10px"
|
|
485
487
|
} ;
|
|
486
|
-
const CookieConsentBodyPrimary =
|
|
487
|
-
let togglePerformanceValue =
|
|
488
|
-
toggleFunctionalValue =
|
|
489
|
-
onTogglePerformance =
|
|
490
|
-
onToggleFunctional =
|
|
491
|
-
onChangeView =
|
|
492
|
-
panelState =
|
|
493
|
-
setPanelState =
|
|
488
|
+
const CookieConsentBodyPrimary = _ref8 => {
|
|
489
|
+
let togglePerformanceValue = _ref8.togglePerformanceValue,
|
|
490
|
+
toggleFunctionalValue = _ref8.toggleFunctionalValue,
|
|
491
|
+
onTogglePerformance = _ref8.onTogglePerformance,
|
|
492
|
+
onToggleFunctional = _ref8.onToggleFunctional,
|
|
493
|
+
onChangeView = _ref8.onChangeView,
|
|
494
|
+
panelState = _ref8.panelState,
|
|
495
|
+
setPanelState = _ref8.setPanelState;
|
|
494
496
|
const _useIntl = reactIntl.useIntl(),
|
|
495
497
|
formatMessage = _useIntl.formatMessage;
|
|
496
498
|
|
|
@@ -562,9 +564,9 @@ const CookieConsentBodyPrimary = _ref7 => {
|
|
|
562
564
|
})]
|
|
563
565
|
});
|
|
564
566
|
};
|
|
565
|
-
const CookieConsentBodyDetails =
|
|
566
|
-
let onChangeView =
|
|
567
|
-
cookieDetails =
|
|
567
|
+
const CookieConsentBodyDetails = _ref9 => {
|
|
568
|
+
let onChangeView = _ref9.onChangeView,
|
|
569
|
+
cookieDetails = _ref9.cookieDetails;
|
|
568
570
|
const _useIntl2 = reactIntl.useIntl(),
|
|
569
571
|
formatMessage = _useIntl2.formatMessage;
|
|
570
572
|
const scrollRef = /*#__PURE__*/react.createRef();
|
|
@@ -737,6 +739,7 @@ const CookieConsentBanner = bannerProps => {
|
|
|
737
739
|
functionalCookies: true,
|
|
738
740
|
performanceCookies: true
|
|
739
741
|
});
|
|
742
|
+
const underline = /*#__PURE__*/react$1.css("text-decoration:underline;color:", designSystem.designTokens.colorPrimary98, ";" + ("" ), "" );
|
|
740
743
|
if (bannerClosed || hasGivenFunctionalCookieConsent || hasGivenPerformanceCookieConsent) return null;
|
|
741
744
|
return (
|
|
742
745
|
// TODO: use lower z-index, prefer ranges per use-case
|
|
@@ -745,7 +748,7 @@ const CookieConsentBanner = bannerProps => {
|
|
|
745
748
|
children: jsxRuntime.jsxs("div", {
|
|
746
749
|
css: /*#__PURE__*/react$1.css("position:sticky;top:calc(100% - ", BANNER_HEIGHT, "px - ", designSystem.designTokens.spacingXl, ");display:flex;flex-direction:column;align-items:center;z-index:9999;width:100%;pointer-events:auto;" + ("" ), "" ),
|
|
747
750
|
children: [jsxRuntime.jsx("div", {
|
|
748
|
-
css: /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorAccent10, ";border-radius:", designSystem.designTokens.borderRadius4, ";box-shadow:", designSystem.designTokens.shadow8, ";margin:0 ", designSystem.designTokens.spacingXl, ";padding:", designSystem.designTokens.spacingM, " ", designSystem.designTokens.spacingL, ";width:fit-content;
|
|
751
|
+
css: /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorAccent10, ";border-radius:", designSystem.designTokens.borderRadius4, ";box-shadow:", designSystem.designTokens.shadow8, ";margin:0 ", designSystem.designTokens.spacingXl, ";padding:", designSystem.designTokens.spacingM, " ", designSystem.designTokens.spacingL, ";width:fit-content;" + ("" ), "" ),
|
|
749
752
|
children: jsxRuntime.jsxs(Spacings__default["default"].Inline, {
|
|
750
753
|
alignItems: "center",
|
|
751
754
|
scale: "xl",
|
|
@@ -753,20 +756,21 @@ const CookieConsentBanner = bannerProps => {
|
|
|
753
756
|
tone: "inverted",
|
|
754
757
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread(_objectSpread({}, messages.bannerMessage), {}, {
|
|
755
758
|
values: {
|
|
756
|
-
privacyLink: jsxRuntime.jsx(
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
759
|
+
privacyLink: jsxRuntime.jsx("a", {
|
|
760
|
+
css: underline,
|
|
761
|
+
href: COOKIE_CONSENT_LINKS.PRIVACY_POLICY,
|
|
762
|
+
target: "_blank",
|
|
763
|
+
rel: "noopener noreferrer",
|
|
764
|
+
children: formatMessage(messages.privacyPolicyLink)
|
|
761
765
|
}),
|
|
762
|
-
modalLink: jsxRuntime.jsx(
|
|
763
|
-
intlMessage: messages.bannerCookiesModalLink,
|
|
766
|
+
modalLink: jsxRuntime.jsx("a", {
|
|
764
767
|
onClick: e => {
|
|
765
768
|
e.preventDefault();
|
|
766
769
|
openModal();
|
|
767
770
|
},
|
|
768
|
-
|
|
769
|
-
|
|
771
|
+
css: underline,
|
|
772
|
+
href: "",
|
|
773
|
+
children: formatMessage(messages.bannerCookiesModalLink)
|
|
770
774
|
})
|
|
771
775
|
}
|
|
772
776
|
}))
|