@justeattakeaway/pie-cookie-banner 0.11.2 → 0.11.4-next.0

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 CHANGED
@@ -56,7 +56,7 @@ import '@justeattakeaway/pie-cookie-banner';
56
56
  ```js
57
57
  // React
58
58
  // For React, you will need to import our React-specific component build
59
- // which wraps the web component using @lit-labs/react
59
+ // which wraps the web component using ​@lit/react
60
60
  import { PieCookieBanner } from '@justeattakeaway/pie-cookie-banner/dist/react';
61
61
  ```
62
62
 
package/dist/index.js CHANGED
@@ -93,7 +93,7 @@ const N = {
93
93
  necessaryOnly: "Necessary only",
94
94
  acceptAll: "Accept all"
95
95
  }
96
- }, z = {
96
+ }, P = {
97
97
  title: "Manage your preferences",
98
98
  description: "You can find all the information in the <linkCookieStatement>Cookie Statement</linkCookieStatement> and <linkCookieTechList>Cookie technology list</linkCookieTechList>.",
99
99
  all: {
@@ -112,7 +112,7 @@ const N = {
112
112
  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."
113
113
  },
114
114
  personalized: {
115
- title: "Personalized (targeting and advertising)",
115
+ title: "Personalised (targeting and advertising)",
116
116
  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 our website and our advertising partners' websites."
117
117
  },
118
118
  cta: {
@@ -121,9 +121,9 @@ const N = {
121
121
  ariaLabel: ""
122
122
  }
123
123
  }
124
- }, P = {
124
+ }, z = {
125
125
  banner: N,
126
- preferencesManagement: z
126
+ preferencesManagement: P
127
127
  };
128
128
  var S = Object.defineProperty, R = Object.getOwnPropertyDescriptor, p = (i, e, n, a) => {
129
129
  for (var t = a > 1 ? void 0 : a ? R(e, n) : e, o = i.length - 1, r; o >= 0; o--)
@@ -133,7 +133,7 @@ var S = Object.defineProperty, R = Object.getOwnPropertyDescriptor, p = (i, e, n
133
133
  const D = "pie-cookie-banner";
134
134
  class l extends m {
135
135
  constructor() {
136
- super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this.hasPrimaryActionsOnly = !1, this.locale = P, this._customTagEnhancers = {
136
+ super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this.hasPrimaryActionsOnly = !1, this.locale = z, this._customTagEnhancers = {
137
137
  linkStatement: (e) => s`<pie-link variant="inverse">${e}</pie-link>`,
138
138
  linkNecessaryOnly: (e) => s`<pie-link data-test-id="body-necessary-only" tag="button" variant="inverse" @click="${this._onNecessaryOnly}">${e}</pie-link>`,
139
139
  linkManagePreferences: (e) => s`<pie-link data-test-id="body-manage-prefs" tag="button" variant="inverse" @click="${this._openManagePreferencesModal}">${e}</pie-link>`,
package/dist/react.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { CSSResult } from 'lit';
2
- import type { EventName } from '@lit-labs/react';
2
+ import type { EventName } from '@lit/react';
3
3
  import type { LitElement } from 'lit';
4
4
  import { PieSwitch } from '@justeattakeaway/pie-switch';
5
- import type { ReactWebComponent } from '@lit-labs/react';
5
+ import type { ReactWebComponent } from '@lit/react';
6
6
  import { TemplateResult } from 'lit';
7
7
 
8
8
  export declare interface CookieBannerLocale {
package/dist/react.js CHANGED
@@ -1,6 +1,7 @@
1
- import * as _ from "react";
2
- import { PieCookieBanner as y } from "./index.js";
3
- import { ON_COOKIE_BANNER_ACCEPT_ALL as $, ON_COOKIE_BANNER_MANAGE_PREFS as j, ON_COOKIE_BANNER_NECESSARY_ONLY as F, ON_COOKIE_BANNER_PREFS_SAVED as H, preferences as T } from "./index.js";
1
+ import * as e from "react";
2
+ import { createComponent as o } from "@lit/react";
3
+ import { PieCookieBanner as n } from "./index.js";
4
+ import { ON_COOKIE_BANNER_ACCEPT_ALL as P, ON_COOKIE_BANNER_MANAGE_PREFS as A, ON_COOKIE_BANNER_NECESSARY_ONLY as B, ON_COOKIE_BANNER_PREFS_SAVED as f, preferences as l } from "./index.js";
4
5
  import "lit";
5
6
  import "lit/decorators.js";
6
7
  import "lit/directives/repeat.js";
@@ -10,65 +11,10 @@ import "@justeattakeaway/pie-icon-button";
10
11
  import "@justeattakeaway/pie-link";
11
12
  import "@justeattakeaway/pie-modal";
12
13
  import "@justeattakeaway/pie-switch";
13
- /**
14
- * @license
15
- * Copyright 2018 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */
18
- const O = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), C = /* @__PURE__ */ new WeakMap(), k = (o, n, c, m, d) => {
19
- const r = d == null ? void 0 : d[n];
20
- r === void 0 || c === m ? c == null && n in HTMLElement.prototype ? o.removeAttribute(n) : o[n] = c : ((s, t, h) => {
21
- let a = C.get(s);
22
- a === void 0 && C.set(s, a = /* @__PURE__ */ new Map());
23
- let l = a.get(t);
24
- h !== void 0 ? l === void 0 ? (a.set(t, l = { handleEvent: h }), s.addEventListener(t, l)) : l.handleEvent = h : l !== void 0 && (a.delete(t), s.removeEventListener(t, l));
25
- })(o, r, c);
26
- }, A = (o, n) => {
27
- typeof o == "function" ? o(n) : o.current = n;
28
- };
29
- function P(o = window.React, n, c, m, d) {
30
- let r, s, t;
31
- if (n === void 0) {
32
- const p = o;
33
- ({ tagName: s, elementClass: t, events: m, displayName: d } = p), r = p.react;
34
- } else
35
- r = o, t = c, s = n;
36
- const h = r.Component, a = r.createElement, l = new Set(Object.keys(m ?? {}));
37
- class v extends h {
38
- constructor() {
39
- super(...arguments), this.o = null;
40
- }
41
- t(e) {
42
- if (this.o !== null)
43
- for (const N in this.i)
44
- k(this.o, N, this.props[N], e ? e[N] : void 0, m);
45
- }
46
- componentDidMount() {
47
- var e;
48
- this.t(), (e = this.o) === null || e === void 0 || e.removeAttribute("defer-hydration");
49
- }
50
- componentDidUpdate(e) {
51
- this.t(e);
52
- }
53
- render() {
54
- const { _$Gl: e, ...N } = this.props;
55
- this.h !== e && (this.u = (i) => {
56
- e !== null && A(e, i), this.o = i, this.h = e;
57
- }), this.i = {};
58
- const u = { ref: this.u };
59
- for (const [i, f] of Object.entries(N))
60
- O.has(i) ? u[i === "className" ? "class" : i] = f : l.has(i) || i in t.prototype ? this.i[i] = f : u[i] = f;
61
- return u.suppressHydrationWarning = !0, a(s, u);
62
- }
63
- }
64
- v.displayName = d ?? t.name;
65
- const E = r.forwardRef((p, e) => a(v, { ...p, _$Gl: e }, p == null ? void 0 : p.children));
66
- return E.displayName = v.displayName, E;
67
- }
68
- const x = P({
14
+ const E = o({
69
15
  displayName: "PieCookieBanner",
70
- elementClass: y,
71
- react: _,
16
+ elementClass: n,
17
+ react: e,
72
18
  tagName: "pie-cookie-banner",
73
19
  events: {
74
20
  onPieCookieBannerAcceptAll: "pie-cookie-banner-accept-all",
@@ -82,10 +28,10 @@ const x = P({
82
28
  }
83
29
  });
84
30
  export {
85
- $ as ON_COOKIE_BANNER_ACCEPT_ALL,
86
- j as ON_COOKIE_BANNER_MANAGE_PREFS,
87
- F as ON_COOKIE_BANNER_NECESSARY_ONLY,
88
- H as ON_COOKIE_BANNER_PREFS_SAVED,
89
- x as PieCookieBanner,
90
- T as preferences
31
+ P as ON_COOKIE_BANNER_ACCEPT_ALL,
32
+ A as ON_COOKIE_BANNER_MANAGE_PREFS,
33
+ B as ON_COOKIE_BANNER_NECESSARY_ONLY,
34
+ f as ON_COOKIE_BANNER_PREFS_SAVED,
35
+ E as PieCookieBanner,
36
+ l as preferences
91
37
  };
@@ -27,7 +27,7 @@
27
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
28
  },
29
29
  "personalized": {
30
- "title": "Personalized (targeting and advertising)",
30
+ "title": "Personalised (targeting and advertising)",
31
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 our website and our advertising partners' websites."
32
32
  },
33
33
  "cta": {
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": "0.11.2",
4
+ "version": "0.11.4-next.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -33,13 +33,13 @@
33
33
  "@justeattakeaway/pie-components-config": "0.6.0"
34
34
  },
35
35
  "dependencies": {
36
- "@justeattakeaway/pie-button": "0.39.0",
37
- "@justeattakeaway/pie-divider": "0.9.1",
38
- "@justeattakeaway/pie-icon-button": "0.21.2",
39
- "@justeattakeaway/pie-link": "0.11.1",
40
- "@justeattakeaway/pie-modal": "0.32.3",
36
+ "@justeattakeaway/pie-button": "0.39.1-next.0",
37
+ "@justeattakeaway/pie-divider": "0.9.2-next.0",
38
+ "@justeattakeaway/pie-icon-button": "0.21.3-next.0",
39
+ "@justeattakeaway/pie-link": "0.11.2-next.0",
40
+ "@justeattakeaway/pie-modal": "0.33.1-next.0",
41
41
  "@justeattakeaway/pie-switch": "0.17.2",
42
- "@justeattakeaway/pie-webc-core": "0.11.0"
42
+ "@justeattakeaway/pie-webc-core": "0.12.0-next.0"
43
43
  },
44
44
  "volta": {
45
45
  "extends": "../../../package.json"