@justeattakeaway/pie-cookie-banner 1.6.39 → 1.7.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 +1 -0
- package/cdn_dist/index.d.ts +13 -0
- package/cdn_dist/index.js +47 -47
- package/custom-elements.json +14 -2
- package/dist/index.d.ts +13 -0
- package/dist/index.js +85 -73
- package/dist/react.d.ts +13 -0
- package/package.json +9 -9
- package/src/defs.ts +8 -0
- package/src/index.ts +15 -3
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ Ideally, you should install the component using the **`@justeattakeaway/pie-webc
|
|
|
42
42
|
| `cookieStatementLink` | — | The URL of the cookie statement page the banner should link to. | `""` |
|
|
43
43
|
| `cookieTechnologiesLink`| — | The URL for the cookie technology link. | `""` |
|
|
44
44
|
| `defaultPreferences` | `all`, `necessary`, `functional`, `analytical`, `personalized` | Allows default preferences to be passed in by the consumer, for example `{ 'functional': true, 'personalized': true, 'analytical': true }`. | `{}` |
|
|
45
|
+
| `openLinksInSameTab` | `true`, `false` | When true, external links (Cookie Statement, Cookie Technologies) will open in the same tab (`target="_self"`). When false, links open in a new browser tab (`target="_blank"`). | `false` |
|
|
45
46
|
|
|
46
47
|
### Slots
|
|
47
48
|
This component does not have any slots. All content is controlled through properties.
|
package/cdn_dist/index.d.ts
CHANGED
|
@@ -78,6 +78,12 @@ export declare interface CookieBannerProps {
|
|
|
78
78
|
* or { 'functional': true, 'personalized': true, 'analytical': true }
|
|
79
79
|
*/
|
|
80
80
|
defaultPreferences?: Partial<Record<PreferenceIds, boolean>>;
|
|
81
|
+
/**
|
|
82
|
+
* When true, external links (Cookie Statement, Cookie Technologies)
|
|
83
|
+
* will open in the same tab (`target="_self"`).
|
|
84
|
+
* When false (default), links open in a new browser tab (`target="_blank"`).
|
|
85
|
+
*/
|
|
86
|
+
openLinksInSameTab?: boolean;
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
export declare const Country: {
|
|
@@ -147,7 +153,14 @@ export declare class PieCookieBanner extends PieElement implements CookieBannerP
|
|
|
147
153
|
cookieTechnologiesLink: string;
|
|
148
154
|
country: string;
|
|
149
155
|
language: string;
|
|
156
|
+
openLinksInSameTab: boolean;
|
|
150
157
|
_preferencesNodes: NodeListOf<PieSwitch>;
|
|
158
|
+
/**
|
|
159
|
+
* Returns the target attribute value for external links based on the openLinksInSameTab prop.
|
|
160
|
+
* - false (default): returns '_blank' (new tab)
|
|
161
|
+
* - true: returns '_self' (same tab)
|
|
162
|
+
*/
|
|
163
|
+
private get _linkTargetAttribute();
|
|
151
164
|
updated(changedProperties: PropertyValues<this>): Promise<void>;
|
|
152
165
|
private _setLocaleBasedOnCountryAndLanguage;
|
|
153
166
|
/**
|