@justeattakeaway/pie-cookie-banner 0.11.2-next.0 → 0.11.2
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/dist/react.d.ts +2 -2
- package/dist/react.js +61 -38
- package/package.json +7 -7
package/dist/react.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CSSResult } from 'lit';
|
|
2
|
-
import type { EventName } from '@lit/react';
|
|
2
|
+
import type { EventName } from '@lit-labs/react';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
4
|
import { PieSwitch } from '@justeattakeaway/pie-switch';
|
|
5
|
-
import type { ReactWebComponent } from '@lit/react';
|
|
5
|
+
import type { ReactWebComponent } from '@lit-labs/react';
|
|
6
6
|
import { TemplateResult } from 'lit';
|
|
7
7
|
|
|
8
8
|
export declare interface CookieBannerLocale {
|
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { PieCookieBanner as
|
|
3
|
-
import { ON_COOKIE_BANNER_ACCEPT_ALL as
|
|
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";
|
|
4
4
|
import "lit";
|
|
5
5
|
import "lit/decorators.js";
|
|
6
6
|
import "lit/directives/repeat.js";
|
|
@@ -15,37 +15,60 @@ import "@justeattakeaway/pie-switch";
|
|
|
15
15
|
* Copyright 2018 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
let a =
|
|
22
|
-
a === void 0 &&
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
})(
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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() {
|
|
38
47
|
var e;
|
|
39
|
-
(e =
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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({
|
|
46
69
|
displayName: "PieCookieBanner",
|
|
47
|
-
elementClass:
|
|
48
|
-
react:
|
|
70
|
+
elementClass: y,
|
|
71
|
+
react: _,
|
|
49
72
|
tagName: "pie-cookie-banner",
|
|
50
73
|
events: {
|
|
51
74
|
onPieCookieBannerAcceptAll: "pie-cookie-banner-accept-all",
|
|
@@ -59,10 +82,10 @@ const v = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cla
|
|
|
59
82
|
}
|
|
60
83
|
});
|
|
61
84
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
|
68
91
|
};
|
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.2",
|
|
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.
|
|
37
|
-
"@justeattakeaway/pie-divider": "0.9.
|
|
38
|
-
"@justeattakeaway/pie-icon-button": "0.21.
|
|
39
|
-
"@justeattakeaway/pie-link": "0.11.
|
|
40
|
-
"@justeattakeaway/pie-modal": "0.32.3
|
|
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",
|
|
41
41
|
"@justeattakeaway/pie-switch": "0.17.2",
|
|
42
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
42
|
+
"@justeattakeaway/pie-webc-core": "0.11.0"
|
|
43
43
|
},
|
|
44
44
|
"volta": {
|
|
45
45
|
"extends": "../../../package.json"
|