@justeattakeaway/pie-cookie-banner 1.7.19 → 1.7.21
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/README.md +2 -0
- package/cdn_dist/index.js +12 -12
- package/custom-elements.json +1 -1
- package/dist/en-ca-BWMoXxW2.js +43 -0
- package/dist/fr-ca-B2Z4Z4i0.js +43 -0
- package/dist/index.js +79 -77
- package/locales/en-ca.js +40 -0
- package/locales/fr-ca.js +40 -0
- package/package.json +10 -10
- package/src/defs.ts +2 -0
package/custom-elements.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
{
|
|
84
84
|
"kind": "variable",
|
|
85
85
|
"name": "availableLocales",
|
|
86
|
-
"default": "new Set([\n `${Language.BULGARIAN}`,\n `${Language.DANISH}`,\n `${Language.ENGLISH}-${Country.FRANCE}`,\n `${Language.FRENCH}-${Country.FRANCE}`,\n `${Language.FRENCH}`,\n `${Language.GERMAN}`,\n `${Language.ENGLISH}`,\n `${Language.HEBREW}`,\n `${Language.ITALIAN}`,\n `${Language.DUTCH}`,\n `${Language.POLISH}`,\n `${Language.SLOVAK}`,\n `${Language.CATALAN}`,\n `${Language.SPANISH}`,\n])"
|
|
86
|
+
"default": "new Set([\n `${Language.BULGARIAN}`,\n `${Language.ENGLISH}-${Country.CANADA}`,\n `${Language.FRENCH}-${Country.CANADA}`,\n `${Language.DANISH}`,\n `${Language.ENGLISH}-${Country.FRANCE}`,\n `${Language.FRENCH}-${Country.FRANCE}`,\n `${Language.FRENCH}`,\n `${Language.GERMAN}`,\n `${Language.ENGLISH}`,\n `${Language.HEBREW}`,\n `${Language.ITALIAN}`,\n `${Language.DUTCH}`,\n `${Language.POLISH}`,\n `${Language.SLOVAK}`,\n `${Language.CATALAN}`,\n `${Language.SPANISH}`,\n])"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"kind": "variable",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
banner: {
|
|
3
|
+
title: "Cookies",
|
|
4
|
+
description: 'We use cookies and other technologies to ensure our website works, to improve and personalize your experience, to perform analytics for optimization and advertisements in partnership with third parties. We use our own cookies and cookies from third parties. We always set necessary cookies. By choosing "Reject All", you can close the banner and only necessary cookies will be set. Click Manage Preferences to adjust your preferences and find more information about our cookie policy.',
|
|
5
|
+
cta: {
|
|
6
|
+
managePreferences: "Manage preferences",
|
|
7
|
+
necessaryOnly: "Reject All",
|
|
8
|
+
acceptAll: "Accept all"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
preferencesManagement: {
|
|
12
|
+
title: "Manage your preferences",
|
|
13
|
+
description: "For more information about our cookie policy, please see the cookie section of our <linkCookieStatement>privacy policy</linkCookieStatement>",
|
|
14
|
+
all: {
|
|
15
|
+
title: "Allow All Additional Cookies"
|
|
16
|
+
},
|
|
17
|
+
necessary: {
|
|
18
|
+
title: "Necessary Cookies (Always Active)",
|
|
19
|
+
description: "These cookies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these cookies."
|
|
20
|
+
},
|
|
21
|
+
functional: {
|
|
22
|
+
title: "Functional",
|
|
23
|
+
description: "These cookies allow the website to remember the choices you make to give you better functionality and personal features."
|
|
24
|
+
},
|
|
25
|
+
analytical: {
|
|
26
|
+
title: "Analytical",
|
|
27
|
+
description: "These analytical cookies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website."
|
|
28
|
+
},
|
|
29
|
+
personalized: {
|
|
30
|
+
title: "Personalised (targeting and advertising)",
|
|
31
|
+
description: `These marketing cookies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on your website and our advertising partners' websites. By toggling this setting "on", you consent both to the processing of these marketing cookies, as well as receiving targeted advertising from Skip.`
|
|
32
|
+
},
|
|
33
|
+
cta: {
|
|
34
|
+
save: {
|
|
35
|
+
label: "Save",
|
|
36
|
+
ariaLabel: ""
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
e as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
banner: {
|
|
3
|
+
title: "Témoins",
|
|
4
|
+
description: "Nous utilisons des témoins et autres technologies pour faire fonctionner notre site Web, pour améliorer et personnaliser ton expérience, et pour effectuer des analyses en vue de l’optimisation et des publicités en partenariat avec des tiers. Nous utilisons nos propres témoins et des témoins de tiers. Nous configurons toujours les témoins nécessaires. En choisissant Tout rejeter, tu peux fermer la bannière et seuls les témoins nécessaires seront appliqués. En cliquant sur Gérer les préférences, tu peux ajuster tes préférences et obtenir plus de renseignements à propos de notre politique sur les témoins.",
|
|
5
|
+
cta: {
|
|
6
|
+
managePreferences: "Gérer les préférences",
|
|
7
|
+
necessaryOnly: "Tout rejeter",
|
|
8
|
+
acceptAll: "Tout accepter"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
preferencesManagement: {
|
|
12
|
+
title: "Gérer des préférences",
|
|
13
|
+
description: "Pour obtenir plus de renseignements au sujet de notre politique sur les témoins, veuillez consulter la section sur les témoins de notre <linkCookieStatement>politique de confidentialité</linkCookieStatement>.",
|
|
14
|
+
all: {
|
|
15
|
+
title: "Accepter tous les témoins supplémentaires"
|
|
16
|
+
},
|
|
17
|
+
necessary: {
|
|
18
|
+
title: "Témoins nécessaires (toujours actifs)",
|
|
19
|
+
description: "Ces témoins sont nécessaires pour assurer le bon fonctionnement du site Web et de ses fonctionnalités. Les services que vous avez demandés ne peuvent pas être fournis sans ces témoins."
|
|
20
|
+
},
|
|
21
|
+
functional: {
|
|
22
|
+
title: "Fonctionnels",
|
|
23
|
+
description: "Ces témoins permettent au site Web de mémoriser les choix que vous faites pour que vous puissiez profiter de meilleures fonctionnalités et de fonctions personnalisées."
|
|
24
|
+
},
|
|
25
|
+
analytical: {
|
|
26
|
+
title: "Analytiques",
|
|
27
|
+
description: "Ces témoins, y compris certaines statistiques, sont utilisés pour comprendre comment les gens interagissent avec le site Web. Nous pouvons ainsi calculer la performance de notre site Web et l’améliorer."
|
|
28
|
+
},
|
|
29
|
+
personalized: {
|
|
30
|
+
title: "Personnalisés (ciblage et publicité)",
|
|
31
|
+
description: "Ces témoins marketing sont utilisés pour personnaliser les renseignements que nous vous fournissons selon vos intérêts et pour calculer l’efficacité de telles publicités, sur notre site Web et sur ceux de nos partenaires publicitaires. "
|
|
32
|
+
},
|
|
33
|
+
cta: {
|
|
34
|
+
save: {
|
|
35
|
+
label: "Enregistrer",
|
|
36
|
+
ariaLabel: ""
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
e as default
|
|
43
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -7,16 +7,16 @@ import "@justeattakeaway/pie-icon-button";
|
|
|
7
7
|
import "@justeattakeaway/pie-link";
|
|
8
8
|
import "@justeattakeaway/pie-modal";
|
|
9
9
|
import "@justeattakeaway/pie-switch";
|
|
10
|
-
import { safeCustomElement as
|
|
10
|
+
import { safeCustomElement as C, dispatchCustomEvent as b } from "@justeattakeaway/pie-webc-core";
|
|
11
11
|
import L from "@justeattakeaway/pie-cookie-banner/locales/en.js";
|
|
12
|
-
const
|
|
12
|
+
const w = (e, t, i) => {
|
|
13
13
|
const a = e[t];
|
|
14
14
|
return a ? typeof a == "function" ? a() : Promise.resolve(a) : new Promise((o, s) => {
|
|
15
15
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
16
16
|
s.bind(
|
|
17
17
|
null,
|
|
18
18
|
new Error(
|
|
19
|
-
"Unknown variable dynamic import: " + t + (t.split("/").length !==
|
|
19
|
+
"Unknown variable dynamic import: " + t + (t.split("/").length !== i ? ". Note that variables only represent file names one level deep." : "")
|
|
20
20
|
)
|
|
21
21
|
)
|
|
22
22
|
);
|
|
@@ -26,9 +26,9 @@ const C = (e, t, n) => {
|
|
|
26
26
|
this.getAttribute("v") || this.setAttribute("v", k.v);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
k.v = "1.7.
|
|
29
|
+
k.v = "1.7.21";
|
|
30
30
|
let A = k;
|
|
31
|
-
const O = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb-font-family: var(--dt-font-interactive-l-family);--cb-font-size: calc(var(--dt-font-body-l-size) * 1px);--cb-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--cb-font-weight: var(--dt-font-body-l-weight);--cb-padding-inline: var(--dt-spacing-d);--cb-padding-block: var(--dt-spacing-d);--cb-offset: 0;color-scheme:only dark;background-color:var(--dt-color-background-dark);color:var(--dt-color-content-inverse);font-family:var(--cb-font-family);font-size:var(--cb-font-size);line-height:var(--cb-line-height);font-weight:var(--cb-font-weight);padding-block-start:var(--cb-padding-block);padding-block-end:var(--cb-padding-block);max-height:432px;position:fixed;bottom:var(--cb-offset);left:var(--cb-offset);right:var(--cb-offset);border-top-left-radius:var(--dt-radius-rounded-c);border-top-right-radius:var(--dt-radius-rounded-c);z-index:var(--dt-z-index-cookie-banner)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner{--cb-padding-inline: var(--dt-spacing-f);--cb-offset: var(--dt-spacing-d);max-height:90%;border-bottom-left-radius:var(--dt-radius-rounded-c);border-bottom-right-radius:var(--dt-radius-rounded-c)}}.c-cookieBanner[isCookieBannerHidden]{display:none}@media (prefers-reduced-motion: no-preference){.c-cookieBanner{animation:.5s animate-enter ease-out}@keyframes animate-enter{0%{transform:translate3d(0,75%,0)}to{transform:translateZ(0)}}}.c-cookieBanner-title,.c-cookieBanner-body,.c-cookieBanner-actions{padding-inline-start:var(--cb-padding-inline);padding-inline-end:var(--cb-padding-inline)}.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--narrow);--cb-title-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-title-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-title-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--wide);--cb-title-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-body{--cb-scroll-shadow-color: var(--dt-color-black);margin-block-start:var(--dt-spacing-a);max-height:200px;overflow-y:auto;background:linear-gradient(to bottom,transparent,var(--dt-color-background-dark) 75%) center bottom,linear-gradient(transparent,var(--cb-scroll-shadow-color)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 8px;background-attachment:local,scroll}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-body{max-height:150px}}.c-cookieBanner-actions{--cb-actions-flex-dir: column;margin-block-start:var(--dt-spacing-d);display:flex;gap:var(--dt-spacing-d);flex-direction:var(--cb-actions-flex-dir)}.c-cookieBanner-actions>pie-link{text-align:center;align-self:center}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-actions{--cb-actions-flex-dir: row-reverse;justify-content:flex-start;align-items:center}.c-cookieBanner-actions>pie-button{width:auto}}.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--narrow);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-subheading-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-subheading-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--wide);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-description{font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px)}.c-cookieBanner-preference{display:flex;gap:var(--dt-spacing-d);justify-content:space-between;margin-block-start:var(--dt-spacing-e);margin-block-end:var(--dt-spacing-e)}.c-cookieBanner-preference p{margin-block-start:var(--dt-spacing-b)}.c-cookieBanner-preference:last-child{margin-block-end:0}",
|
|
31
|
+
const O = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb-font-family: var(--dt-font-interactive-l-family);--cb-font-size: calc(var(--dt-font-body-l-size) * 1px);--cb-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--cb-font-weight: var(--dt-font-body-l-weight);--cb-padding-inline: var(--dt-spacing-d);--cb-padding-block: var(--dt-spacing-d);--cb-offset: 0;color-scheme:only dark;background-color:var(--dt-color-background-dark);color:var(--dt-color-content-inverse);font-family:var(--cb-font-family);font-size:var(--cb-font-size);line-height:var(--cb-line-height);font-weight:var(--cb-font-weight);padding-block-start:var(--cb-padding-block);padding-block-end:var(--cb-padding-block);max-height:432px;position:fixed;bottom:var(--cb-offset);left:var(--cb-offset);right:var(--cb-offset);border-top-left-radius:var(--dt-radius-rounded-c);border-top-right-radius:var(--dt-radius-rounded-c);z-index:var(--dt-z-index-cookie-banner)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner{--cb-padding-inline: var(--dt-spacing-f);--cb-offset: var(--dt-spacing-d);max-height:90%;border-bottom-left-radius:var(--dt-radius-rounded-c);border-bottom-right-radius:var(--dt-radius-rounded-c)}}.c-cookieBanner[isCookieBannerHidden]{display:none}@media (prefers-reduced-motion: no-preference){.c-cookieBanner{animation:.5s animate-enter ease-out}@keyframes animate-enter{0%{transform:translate3d(0,75%,0)}to{transform:translateZ(0)}}}.c-cookieBanner-title,.c-cookieBanner-body,.c-cookieBanner-actions{padding-inline-start:var(--cb-padding-inline);padding-inline-end:var(--cb-padding-inline)}.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--narrow);--cb-title-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-title-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-title-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--wide);--cb-title-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-body{--cb-scroll-shadow-color: var(--dt-color-black);margin-block-start:var(--dt-spacing-a);max-height:200px;overflow-y:auto;background:linear-gradient(to bottom,transparent,var(--dt-color-background-dark) 75%) center bottom,linear-gradient(transparent,var(--cb-scroll-shadow-color)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 8px;background-attachment:local,scroll}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-body{max-height:150px}}.c-cookieBanner-actions{--cb-actions-flex-dir: column;margin-block-start:var(--dt-spacing-d);display:flex;gap:var(--dt-spacing-d);flex-direction:var(--cb-actions-flex-dir)}.c-cookieBanner-actions>pie-link{text-align:center;align-self:center}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-actions{--cb-actions-flex-dir: row-reverse;justify-content:flex-start;align-items:center}.c-cookieBanner-actions>pie-button{width:auto}}.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--narrow);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-subheading-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-subheading-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--wide);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-description{font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px)}.c-cookieBanner-preference{display:flex;gap:var(--dt-spacing-d);justify-content:space-between;margin-block-start:var(--dt-spacing-e);margin-block-end:var(--dt-spacing-e)}.c-cookieBanner-preference p{margin-block-start:var(--dt-spacing-b)}.c-cookieBanner-preference:last-child{margin-block-end:0}", n = {
|
|
32
32
|
BULGARIAN: "bg",
|
|
33
33
|
CATALAN: "ca",
|
|
34
34
|
DANISH: "da",
|
|
@@ -60,7 +60,7 @@ const O = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb
|
|
|
60
60
|
SLOVAKIA: "sk",
|
|
61
61
|
SPAIN: "es",
|
|
62
62
|
SWITZERLAND: "ch"
|
|
63
|
-
}, H = "pie-cookie-banner-accept-all", P = "pie-cookie-banner-necessary-only", M = "pie-cookie-banner-manage-prefs", D = "pie-cookie-banner-prefs-saved",
|
|
63
|
+
}, H = "pie-cookie-banner-accept-all", P = "pie-cookie-banner-necessary-only", M = "pie-cookie-banner-manage-prefs", D = "pie-cookie-banner-prefs-saved", G = [
|
|
64
64
|
{
|
|
65
65
|
id: "all",
|
|
66
66
|
hasDivider: !0,
|
|
@@ -88,66 +88,68 @@ const O = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb
|
|
|
88
88
|
hasPrimaryActionsOnly: !1,
|
|
89
89
|
defaultPreferences: {},
|
|
90
90
|
country: r.GREAT_BRITAIN,
|
|
91
|
-
language:
|
|
91
|
+
language: n.ENGLISH,
|
|
92
92
|
cookieStatementLink: "",
|
|
93
93
|
cookieTechnologiesLink: "",
|
|
94
94
|
openLinksInSameTab: !1
|
|
95
95
|
}, m = /* @__PURE__ */ new Set([
|
|
96
|
-
`${
|
|
97
|
-
`${
|
|
98
|
-
`${
|
|
99
|
-
`${
|
|
100
|
-
`${
|
|
101
|
-
`${
|
|
102
|
-
`${
|
|
103
|
-
`${
|
|
104
|
-
`${
|
|
105
|
-
`${
|
|
106
|
-
`${
|
|
107
|
-
`${
|
|
108
|
-
`${
|
|
109
|
-
`${
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
[r.
|
|
114
|
-
[r.
|
|
115
|
-
[r.
|
|
116
|
-
[r.
|
|
117
|
-
[r.
|
|
118
|
-
[r.
|
|
119
|
-
[r.
|
|
120
|
-
[r.
|
|
121
|
-
[r.
|
|
122
|
-
[r.
|
|
123
|
-
[r.
|
|
124
|
-
[r.
|
|
125
|
-
[r.
|
|
126
|
-
[r.
|
|
127
|
-
[r.
|
|
128
|
-
[r.
|
|
96
|
+
`${n.BULGARIAN}`,
|
|
97
|
+
`${n.ENGLISH}-${r.CANADA}`,
|
|
98
|
+
`${n.FRENCH}-${r.CANADA}`,
|
|
99
|
+
`${n.DANISH}`,
|
|
100
|
+
`${n.ENGLISH}-${r.FRANCE}`,
|
|
101
|
+
`${n.FRENCH}-${r.FRANCE}`,
|
|
102
|
+
`${n.FRENCH}`,
|
|
103
|
+
`${n.GERMAN}`,
|
|
104
|
+
`${n.ENGLISH}`,
|
|
105
|
+
`${n.HEBREW}`,
|
|
106
|
+
`${n.ITALIAN}`,
|
|
107
|
+
`${n.DUTCH}`,
|
|
108
|
+
`${n.POLISH}`,
|
|
109
|
+
`${n.SLOVAK}`,
|
|
110
|
+
`${n.CATALAN}`,
|
|
111
|
+
`${n.SPANISH}`
|
|
112
|
+
]), z = /* @__PURE__ */ new Map([
|
|
113
|
+
[r.AUSTRALIA, `${n.ENGLISH}`],
|
|
114
|
+
[r.AUSTRIA, `${n.GERMAN}`],
|
|
115
|
+
[r.BELGIUM, `${n.DUTCH}`],
|
|
116
|
+
[r.BULGARIA, `${n.BULGARIAN}`],
|
|
117
|
+
[r.CANADA, `${n.ENGLISH}`],
|
|
118
|
+
[r.DENMARK, `${n.DANISH}`],
|
|
119
|
+
[r.FRANCE, `${n.FRENCH}-${r.FRANCE}`],
|
|
120
|
+
[r.GERMANY, `${n.GERMAN}`],
|
|
121
|
+
[r.GREAT_BRITAIN, `${n.ENGLISH}`],
|
|
122
|
+
[r.IRELAND, `${n.ENGLISH}`],
|
|
123
|
+
[r.ISRAEL, `${n.HEBREW}`],
|
|
124
|
+
[r.ITALY, `${n.ITALIAN}`],
|
|
125
|
+
[r.LUXEMBOURG, `${n.FRENCH}`],
|
|
126
|
+
[r.NETHERLANDS, `${n.DUTCH}`],
|
|
127
|
+
[r.POLAND, `${n.POLISH}`],
|
|
128
|
+
[r.SLOVAKIA, `${n.SLOVAK}`],
|
|
129
|
+
[r.SPAIN, `${n.SPANISH}`],
|
|
130
|
+
[r.SWITZERLAND, `${n.GERMAN}`]
|
|
129
131
|
]);
|
|
130
132
|
function E(e) {
|
|
131
133
|
console.error(`[localisation-utils]: ${e}`);
|
|
132
134
|
}
|
|
133
135
|
function j(e, t) {
|
|
134
|
-
const
|
|
136
|
+
const i = (o) => String.prototype.split.call(t, o).filter(Boolean).reduce((s, l) => s != null && typeof s == "object" ? s[l] : s, e), a = i(/[,[\]]+?/) || i(/[,[\].]+?/);
|
|
135
137
|
return typeof a != "string" ? "" : a;
|
|
136
138
|
}
|
|
137
139
|
function S(e, t) {
|
|
138
140
|
if (!e) throw new Error('"locale" parameter cannot be empty');
|
|
139
141
|
if (!t) throw new Error('"key" parameter cannot be empty');
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
+
const i = j(e, t);
|
|
143
|
+
return i || (E(`Couldn't find a value for the key "${t}", it will be used as fallback.`), t);
|
|
142
144
|
}
|
|
143
145
|
function U(e) {
|
|
144
|
-
const
|
|
145
|
-
return new RegExp(
|
|
146
|
+
const i = e.map((o) => `(<${o}.*>.*</${o}>)`).join("|");
|
|
147
|
+
return new RegExp(i, "igm");
|
|
146
148
|
}
|
|
147
149
|
function F(e, t) {
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
const a = U(
|
|
150
|
+
const i = Object.keys(t);
|
|
151
|
+
if (i.length === 0) return [e];
|
|
152
|
+
const a = U(i);
|
|
151
153
|
return e.split(a).filter((o) => !!o).map((o) => {
|
|
152
154
|
if (!o.match(a)) return o;
|
|
153
155
|
const l = o.match(/<(.*)>(.*)<\/.*>/);
|
|
@@ -160,25 +162,25 @@ function F(e, t) {
|
|
|
160
162
|
return u || typeof u == "function" ? u(g) : (E(`Custom tag "${l}" does not have a matching enhancer function`), g);
|
|
161
163
|
});
|
|
162
164
|
}
|
|
163
|
-
function K(e, t,
|
|
165
|
+
function K(e, t, i) {
|
|
164
166
|
if (!e) throw new Error('"locale" parameter cannot be empty');
|
|
165
167
|
if (!t) throw new Error('"key" parameter cannot be empty');
|
|
166
|
-
if (!
|
|
168
|
+
if (!i) throw new Error('"customTagEnhancers" parameter cannot be empty');
|
|
167
169
|
const a = S(e, t);
|
|
168
|
-
return F(a,
|
|
170
|
+
return F(a, i);
|
|
169
171
|
}
|
|
170
|
-
var V = Object.defineProperty, W = Object.getOwnPropertyDescriptor, d = (e, t,
|
|
171
|
-
for (var o = a > 1 ? void 0 : a ? W(t,
|
|
172
|
-
(l = e[s]) && (o = (a ? l(t,
|
|
173
|
-
return a && o && V(t,
|
|
172
|
+
var V = Object.defineProperty, W = Object.getOwnPropertyDescriptor, d = (e, t, i, a) => {
|
|
173
|
+
for (var o = a > 1 ? void 0 : a ? W(t, i) : t, s = e.length - 1, l; s >= 0; s--)
|
|
174
|
+
(l = e[s]) && (o = (a ? l(t, i, o) : l(o)) || o);
|
|
175
|
+
return a && o && V(t, i, o), o;
|
|
174
176
|
};
|
|
175
177
|
let c = class extends A {
|
|
176
178
|
constructor() {
|
|
177
179
|
super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this._locale = L, this.hasPrimaryActionsOnly = h.hasPrimaryActionsOnly, this.defaultPreferences = h.defaultPreferences, this.cookieStatementLink = h.cookieStatementLink, this.cookieTechnologiesLink = h.cookieTechnologiesLink, this.country = h.country, this.language = h.language, this.openLinksInSameTab = h.openLinksInSameTab, this._getLocaleString = (e, t) => {
|
|
178
|
-
let
|
|
179
|
-
if (m.has(
|
|
180
|
-
return
|
|
181
|
-
const a =
|
|
180
|
+
let i = `${e}-${t}`.toLowerCase();
|
|
181
|
+
if (m.has(i) || (i = `${e}`.toLowerCase(), m.has(i)))
|
|
182
|
+
return i;
|
|
183
|
+
const a = z.get(t.toLowerCase());
|
|
182
184
|
return a && m.has(a) ? a : `${h.language}`;
|
|
183
185
|
}, this._customTagEnhancers = {
|
|
184
186
|
linkStatement: (e) => p`<pie-link href="${this.cookieStatementLink}" variant="inverse" target="${this._linkTargetAttribute}" data-test-id="cookie-statement-link">${e}</pie-link>`,
|
|
@@ -194,14 +196,14 @@ let c = class extends A {
|
|
|
194
196
|
}, this._openManagePreferencesModal = () => {
|
|
195
197
|
this._isCookieBannerHidden = !0, b(this, M), this._isModalOpen = !0;
|
|
196
198
|
}, this._handleSwitchStates = (e) => {
|
|
197
|
-
const { id: t } = e == null ? void 0 : e.currentTarget,
|
|
198
|
-
if (t ===
|
|
199
|
+
const { id: t } = e == null ? void 0 : e.currentTarget, i = [...this._preferencesNodes].find(({ id: a }) => a === "all");
|
|
200
|
+
if (t === i.id) {
|
|
199
201
|
const { checked: a } = e.target;
|
|
200
202
|
this._preferencesNodes.forEach((o) => {
|
|
201
203
|
o.checked = o.disabled ? o.checked : a;
|
|
202
204
|
});
|
|
203
205
|
} else
|
|
204
|
-
|
|
206
|
+
i.checked = [...this._preferencesNodes].filter(({ id: a }) => a !== "all").every(({ checked: a }) => a);
|
|
205
207
|
};
|
|
206
208
|
}
|
|
207
209
|
/**
|
|
@@ -218,8 +220,8 @@ let c = class extends A {
|
|
|
218
220
|
// Dynamically import locale JSON based on country and language
|
|
219
221
|
async _setLocaleBasedOnCountryAndLanguage(e, t) {
|
|
220
222
|
try {
|
|
221
|
-
const
|
|
222
|
-
this._locale = (await
|
|
223
|
+
const i = this._getLocaleString(e, t);
|
|
224
|
+
this._locale = (await w(/* @__PURE__ */ Object.assign({ "../locales/bg.js": () => import("./bg-DGJESQ4e.js"), "../locales/ca.js": () => import("./ca-Bcf7sXQS.js"), "../locales/da.js": () => import("./da-zmkmo2qP.js"), "../locales/de.js": () => import("./de-CCDQDaL_.js"), "../locales/en-ca.js": () => import("./en-ca-BWMoXxW2.js"), "../locales/en-fr.js": () => import("./en-fr-B3W1OBz4.js"), "../locales/en.js": () => import("./en-Cg12pw29.js"), "../locales/es.js": () => import("./es-BGd5IeE8.js"), "../locales/fr-ca.js": () => import("./fr-ca-B2Z4Z4i0.js"), "../locales/fr-fr.js": () => import("./fr-fr-Bj0z2tFA.js"), "../locales/fr.js": () => import("./fr-ZJirJTQ1.js"), "../locales/he.js": () => import("./he-CD4nZodw.js"), "../locales/it.js": () => import("./it-C20n5M6-.js"), "../locales/nl.js": () => import("./nl-potC62A2.js"), "../locales/pl.js": () => import("./pl-BZMXvf-W.js"), "../locales/sk.js": () => import("./sk-B2GkzqzB.js") }), `../locales/${i}.js`, 3)).default;
|
|
223
225
|
} catch {
|
|
224
226
|
this._locale = L;
|
|
225
227
|
}
|
|
@@ -248,8 +250,8 @@ let c = class extends A {
|
|
|
248
250
|
*/
|
|
249
251
|
_handlePreferencesSaved() {
|
|
250
252
|
let e = {};
|
|
251
|
-
[...this._preferencesNodes].filter(({ id: t }) => t !== "all").forEach(({ id: t, checked:
|
|
252
|
-
e = { ...e, [t]:
|
|
253
|
+
[...this._preferencesNodes].filter(({ id: t }) => t !== "all").forEach(({ id: t, checked: i }) => {
|
|
254
|
+
e = { ...e, [t]: i };
|
|
253
255
|
}), b(this, D, e), this._isModalOpen = !1, this._isCookieBannerHidden = !0;
|
|
254
256
|
}
|
|
255
257
|
/**
|
|
@@ -259,14 +261,14 @@ let c = class extends A {
|
|
|
259
261
|
renderPreference({
|
|
260
262
|
id: e,
|
|
261
263
|
checked: t,
|
|
262
|
-
disabled:
|
|
264
|
+
disabled: i,
|
|
263
265
|
hasDivider: a,
|
|
264
266
|
hasDescription: o
|
|
265
267
|
}) {
|
|
266
|
-
var
|
|
268
|
+
var $;
|
|
267
269
|
const s = this._localiseText(`preferencesManagement.${e}.title`), l = `preferencesManagement.${e}.description`, g = o && this._localiseText(l), v = ["functional", "personalized", "analytical"].every((B) => {
|
|
268
|
-
var
|
|
269
|
-
return ((
|
|
270
|
+
var _;
|
|
271
|
+
return ((_ = this.defaultPreferences) == null ? void 0 : _[B]) === !0;
|
|
270
272
|
});
|
|
271
273
|
return p`
|
|
272
274
|
<div class="c-cookieBanner-preference">
|
|
@@ -276,8 +278,8 @@ let c = class extends A {
|
|
|
276
278
|
</div>
|
|
277
279
|
<pie-switch
|
|
278
280
|
id="${e}"
|
|
279
|
-
?checked="${((
|
|
280
|
-
?disabled="${
|
|
281
|
+
?checked="${(($ = this.defaultPreferences) == null ? void 0 : $[e]) || v || t}"
|
|
282
|
+
?disabled="${i}"
|
|
281
283
|
@change="${this._handleSwitchStates}">
|
|
282
284
|
</pie-switch>
|
|
283
285
|
</div>
|
|
@@ -293,7 +295,7 @@ let c = class extends A {
|
|
|
293
295
|
${this._localiseRichText("preferencesManagement.description")}
|
|
294
296
|
</p>
|
|
295
297
|
${R(
|
|
296
|
-
|
|
298
|
+
G,
|
|
297
299
|
({ id: e }) => e,
|
|
298
300
|
(e) => this.renderPreference(e)
|
|
299
301
|
)}`;
|
|
@@ -385,18 +387,18 @@ d([
|
|
|
385
387
|
I("pie-switch")
|
|
386
388
|
], c.prototype, "_preferencesNodes", 2);
|
|
387
389
|
c = d([
|
|
388
|
-
|
|
390
|
+
C("pie-cookie-banner")
|
|
389
391
|
], c);
|
|
390
392
|
export {
|
|
391
393
|
r as Country,
|
|
392
|
-
|
|
394
|
+
n as Language,
|
|
393
395
|
H as ON_COOKIE_BANNER_ACCEPT_ALL,
|
|
394
396
|
M as ON_COOKIE_BANNER_MANAGE_PREFS,
|
|
395
397
|
P as ON_COOKIE_BANNER_NECESSARY_ONLY,
|
|
396
398
|
D as ON_COOKIE_BANNER_PREFS_SAVED,
|
|
397
399
|
c as PieCookieBanner,
|
|
398
400
|
m as availableLocales,
|
|
399
|
-
|
|
401
|
+
z as defaultLocaleForCountry,
|
|
400
402
|
h as defaultProps,
|
|
401
|
-
|
|
403
|
+
G as preferences
|
|
402
404
|
};
|
package/locales/en-ca.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
banner: {
|
|
3
|
+
title: 'Cookies',
|
|
4
|
+
description: 'We use cookies and other technologies to ensure our website works, to improve and personalize your experience, to perform analytics for optimization and advertisements in partnership with third parties. We use our own cookies and cookies from third parties. We always set necessary cookies. By choosing "Reject All", you can close the banner and only necessary cookies will be set. Click Manage Preferences to adjust your preferences and find more information about our cookie policy.',
|
|
5
|
+
cta: {
|
|
6
|
+
managePreferences: 'Manage preferences',
|
|
7
|
+
necessaryOnly: 'Reject All',
|
|
8
|
+
acceptAll: 'Accept all',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
preferencesManagement: {
|
|
12
|
+
title: 'Manage your preferences',
|
|
13
|
+
description: 'For more information about our cookie policy, please see the cookie section of our <linkCookieStatement>privacy policy</linkCookieStatement>',
|
|
14
|
+
all: {
|
|
15
|
+
title: 'Allow All Additional Cookies',
|
|
16
|
+
},
|
|
17
|
+
necessary: {
|
|
18
|
+
title: 'Necessary Cookies (Always Active)',
|
|
19
|
+
description: 'These cookies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these cookies.',
|
|
20
|
+
},
|
|
21
|
+
functional: {
|
|
22
|
+
title: 'Functional',
|
|
23
|
+
description: 'These cookies allow the website to remember the choices you make to give you better functionality and personal features.',
|
|
24
|
+
},
|
|
25
|
+
analytical: {
|
|
26
|
+
title: 'Analytical',
|
|
27
|
+
description: 'These analytical cookies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website.',
|
|
28
|
+
},
|
|
29
|
+
personalized: {
|
|
30
|
+
title: 'Personalised (targeting and advertising)',
|
|
31
|
+
description: "These marketing cookies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on your website and our advertising partners' websites. By toggling this setting \"on\", you consent both to the processing of these marketing cookies, as well as receiving targeted advertising from Skip.",
|
|
32
|
+
},
|
|
33
|
+
cta: {
|
|
34
|
+
save: {
|
|
35
|
+
label: 'Save',
|
|
36
|
+
ariaLabel: '',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
package/locales/fr-ca.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
banner: {
|
|
3
|
+
title: 'Témoins',
|
|
4
|
+
description: 'Nous utilisons des témoins et autres technologies pour faire fonctionner notre site Web, pour améliorer et personnaliser ton expérience, et pour effectuer des analyses en vue de l’optimisation et des publicités en partenariat avec des tiers. Nous utilisons nos propres témoins et des témoins de tiers. Nous configurons toujours les témoins nécessaires. En choisissant Tout rejeter, tu peux fermer la bannière et seuls les témoins nécessaires seront appliqués. En cliquant sur Gérer les préférences, tu peux ajuster tes préférences et obtenir plus de renseignements à propos de notre politique sur les témoins.',
|
|
5
|
+
cta: {
|
|
6
|
+
managePreferences: 'Gérer les préférences',
|
|
7
|
+
necessaryOnly: 'Tout rejeter',
|
|
8
|
+
acceptAll: 'Tout accepter',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
preferencesManagement: {
|
|
12
|
+
title: 'Gérer des préférences',
|
|
13
|
+
description: 'Pour obtenir plus de renseignements au sujet de notre politique sur les témoins, veuillez consulter la section sur les témoins de notre <linkCookieStatement>politique de confidentialité</linkCookieStatement>.',
|
|
14
|
+
all: {
|
|
15
|
+
title: 'Accepter tous les témoins supplémentaires',
|
|
16
|
+
},
|
|
17
|
+
necessary: {
|
|
18
|
+
title: 'Témoins nécessaires (toujours actifs)',
|
|
19
|
+
description: 'Ces témoins sont nécessaires pour assurer le bon fonctionnement du site Web et de ses fonctionnalités. Les services que vous avez demandés ne peuvent pas être fournis sans ces témoins.',
|
|
20
|
+
},
|
|
21
|
+
functional: {
|
|
22
|
+
title: 'Fonctionnels',
|
|
23
|
+
description: 'Ces témoins permettent au site Web de mémoriser les choix que vous faites pour que vous puissiez profiter de meilleures fonctionnalités et de fonctions personnalisées.',
|
|
24
|
+
},
|
|
25
|
+
analytical: {
|
|
26
|
+
title: 'Analytiques',
|
|
27
|
+
description: 'Ces témoins, y compris certaines statistiques, sont utilisés pour comprendre comment les gens interagissent avec le site Web. Nous pouvons ainsi calculer la performance de notre site Web et l’améliorer.',
|
|
28
|
+
},
|
|
29
|
+
personalized: {
|
|
30
|
+
title: 'Personnalisés (ciblage et publicité)',
|
|
31
|
+
description: 'Ces témoins marketing sont utilisés pour personnaliser les renseignements que nous vous fournissons selon vos intérêts et pour calculer l’efficacité de telles publicités, sur notre site Web et sur ceux de nos partenaires publicitaires. ',
|
|
32
|
+
},
|
|
33
|
+
cta: {
|
|
34
|
+
save: {
|
|
35
|
+
label: 'Enregistrer',
|
|
36
|
+
ariaLabel: '',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-cookie-banner",
|
|
3
3
|
"description": "PIE Design System Cookie Banner built using Web Components",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.21",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/justeattakeaway/pie",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
53
53
|
"@justeattakeaway/pie-components-config": "0.21.0",
|
|
54
|
-
"@justeattakeaway/pie-css": "0.
|
|
54
|
+
"@justeattakeaway/pie-css": "1.0.0",
|
|
55
55
|
"@justeattakeaway/pie-monorepo-utils": "0.7.0",
|
|
56
|
-
"@justeattakeaway/pie-wrapper-react": "0.14.
|
|
56
|
+
"@justeattakeaway/pie-wrapper-react": "0.14.4",
|
|
57
57
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@justeattakeaway/pie-button": "1.13.
|
|
61
|
-
"@justeattakeaway/pie-divider": "1.5.
|
|
62
|
-
"@justeattakeaway/pie-icon-button": "2.7.
|
|
63
|
-
"@justeattakeaway/pie-link": "1.3.
|
|
64
|
-
"@justeattakeaway/pie-modal": "1.25.
|
|
65
|
-
"@justeattakeaway/pie-switch": "2.3.
|
|
66
|
-
"@justeattakeaway/pie-webc-core": "
|
|
60
|
+
"@justeattakeaway/pie-button": "1.13.2",
|
|
61
|
+
"@justeattakeaway/pie-divider": "1.5.19",
|
|
62
|
+
"@justeattakeaway/pie-icon-button": "2.7.5",
|
|
63
|
+
"@justeattakeaway/pie-link": "1.3.21",
|
|
64
|
+
"@justeattakeaway/pie-modal": "1.25.11",
|
|
65
|
+
"@justeattakeaway/pie-switch": "2.3.23",
|
|
66
|
+
"@justeattakeaway/pie-webc-core": "13.0.0"
|
|
67
67
|
},
|
|
68
68
|
"volta": {
|
|
69
69
|
"extends": "../../../package.json"
|
package/src/defs.ts
CHANGED
|
@@ -212,6 +212,8 @@ export const defaultProps: DefaultProps = {
|
|
|
212
212
|
// Available locale files
|
|
213
213
|
export const availableLocales = new Set([
|
|
214
214
|
`${Language.BULGARIAN}`,
|
|
215
|
+
`${Language.ENGLISH}-${Country.CANADA}`,
|
|
216
|
+
`${Language.FRENCH}-${Country.CANADA}`,
|
|
215
217
|
`${Language.DANISH}`,
|
|
216
218
|
`${Language.ENGLISH}-${Country.FRANCE}`,
|
|
217
219
|
`${Language.FRENCH}-${Country.FRANCE}`,
|