Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bbc/psammead-amp-geo

Package Overview
Dependencies
Maintainers
38
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbc/psammead-amp-geo - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

1

CHANGELOG.md

@@ -6,2 +6,3 @@ # Psammead Amp Geo Changelog

|---------|-------------|
| 1.2.0 | [PR#3539](https://github.com/bbc/psammead/pull/3539) Add gbOrUnknown group to AMP Geo component |
| 1.1.2 | [PR#1942](https://github.com/bbc/psammead/pull/1942) Talos - Bump React to 16.9.0 |

@@ -8,0 +9,0 @@ | 1.1.1 | [PR#1803](https://github.com/bbc/psammead/pull/1803/) Patches broken links on badges in documentation |

7

dist/index.js

@@ -14,3 +14,4 @@ "use strict";

ISOCountryGroups: {
eea: ['at', 'ax', 'be', 'bg', 'bl', 'cy', 'cz', 'de', 'dk', 'ea', 'ee', 'es', 'fi', 'fr', 'gb', 'gf', 'gg', 'gi', 'gp', 'gr', 'hr', 'hu', 'ic', 'ie', 'im', 'is', 'it', 'je', 'li', 'lt', 'lu', 'lv', 'mf', 'mq', 'mt', 'nc', 'nl', 'no', 'pf', 'pl', 'pm', 'pt', 're', 'ro', 'se', 'si', 'sj', 'sk', 'tf', 'va', 'wf', 'yt']
eea: ['at', 'ax', 'be', 'bg', 'bl', 'cy', 'cz', 'de', 'dk', 'ea', 'ee', 'es', 'fi', 'fr', 'gb', 'gf', 'gg', 'gi', 'gp', 'gr', 'hr', 'hu', 'ic', 'ie', 'im', 'is', 'it', 'je', 'li', 'lt', 'lu', 'lv', 'mf', 'mq', 'mt', 'nc', 'nl', 'no', 'pf', 'pl', 'pm', 'pt', 're', 'ro', 'se', 'si', 'sj', 'sk', 'tf', 'va', 'wf', 'yt'],
gbOrUnknown: ['gb', 'gg', 'im', 'je', 'uk', 'unknown']
}

@@ -20,3 +21,3 @@ };

var jsonInlinedScript = function jsonInlinedScript(data) {
return _react.default.createElement("script", {
return /*#__PURE__*/_react.default.createElement("script", {
type: "application/json"

@@ -32,3 +33,3 @@ /* eslint-disable-next-line react/no-danger */

var AmpGeo = function AmpGeo() {
return _react.default.createElement("amp-geo", {
return /*#__PURE__*/_react.default.createElement("amp-geo", {
layout: "nodisplay"

@@ -35,0 +36,0 @@ }, jsonInlinedScript(ampGeoData));

import React from 'react';
var ampGeoData = {
ISOCountryGroups: {
eea: ['at', 'ax', 'be', 'bg', 'bl', 'cy', 'cz', 'de', 'dk', 'ea', 'ee', 'es', 'fi', 'fr', 'gb', 'gf', 'gg', 'gi', 'gp', 'gr', 'hr', 'hu', 'ic', 'ie', 'im', 'is', 'it', 'je', 'li', 'lt', 'lu', 'lv', 'mf', 'mq', 'mt', 'nc', 'nl', 'no', 'pf', 'pl', 'pm', 'pt', 're', 'ro', 'se', 'si', 'sj', 'sk', 'tf', 'va', 'wf', 'yt']
eea: ['at', 'ax', 'be', 'bg', 'bl', 'cy', 'cz', 'de', 'dk', 'ea', 'ee', 'es', 'fi', 'fr', 'gb', 'gf', 'gg', 'gi', 'gp', 'gr', 'hr', 'hu', 'ic', 'ie', 'im', 'is', 'it', 'je', 'li', 'lt', 'lu', 'lv', 'mf', 'mq', 'mt', 'nc', 'nl', 'no', 'pf', 'pl', 'pm', 'pt', 're', 'ro', 'se', 'si', 'sj', 'sk', 'tf', 'va', 'wf', 'yt'],
gbOrUnknown: ['gb', 'gg', 'im', 'je', 'uk', 'unknown']
}

@@ -9,3 +10,3 @@ };

var jsonInlinedScript = function jsonInlinedScript(data) {
return React.createElement("script", {
return /*#__PURE__*/React.createElement("script", {
type: "application/json"

@@ -21,3 +22,3 @@ /* eslint-disable-next-line react/no-danger */

var AmpGeo = function AmpGeo() {
return React.createElement("amp-geo", {
return /*#__PURE__*/React.createElement("amp-geo", {
layout: "nodisplay"

@@ -24,0 +25,0 @@ }, jsonInlinedScript(ampGeoData));

{
"name": "@bbc/psammead-amp-geo",
"version": "1.1.2",
"version": "1.2.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "esm/index.js",

@@ -5,3 +5,3 @@ # psammead-amp-geo - [![Known Vulnerabilities](https://snyk.io/test/github/bbc/psammead/badge.svg?targetFile=packages%2Fcomponents%2Fpsammead-amp-geo%2Fpackage.json)](https://snyk.io/test/github/bbc/psammead?targetFile=packages%2Fcomponents%2Fpsammead-amp-geo%2Fpackage.json) [![Dependency Status](https://david-dm.org/bbc/psammead.svg?path=packages/components/psammead-amp-geo)](https://david-dm.org/bbc/psammead?path=packages/components/psammead-amp-geo) [![peerDependencies Status](https://david-dm.org/bbc/psammead/peer-status.svg?path=packages/components/psammead-amp-geo)](https://david-dm.org/bbc/psammead?path=packages/components/psammead-amp-geo&type=peer) [![Storybook](https://raw.githubusercontent.com/storybooks/brand/master/badge/badge-storybook.svg?sanitize=true)](https://bbc.github.io/psammead/?path=/story/figure--containing-image) [![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/bbc/psammead/blob/latest/LICENSE) [![npm version](https://img.shields.io/npm/v/@bbc/psammead-amp-geo.svg)](https://www.npmjs.com/package/@bbc/psammead-amp-geo) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/bbc/psammead/blob/latest/CONTRIBUTING.md)

The `psammead-amp-geo` component is an `<amp-geo>` element to be used for AMP pages. It has a defined set of ISO country groups that we set for our privacy and cookie banners on AMP pages.
The `psammead-amp-geo` component is an `<amp-geo>` element to be used for AMP pages. It has a defined set of ISO country groups that we set for our privacy and cookie banners on AMP pages ('eea'), and a defined set of ISO country groups to detect if a user should not be shown ads ('gbOrUnknown').

@@ -29,4 +29,5 @@ ## Installation

```
Then you can import the AmpGeo component & use it in conjunction with `<amp-consent>`
Then you can import the AmpGeo component & use it in conjunction with `<amp-consent>`
```jsx

@@ -58,4 +59,7 @@ import AmpGeo from '@bbc/psammead-amp-geo';

Use this component only on AMP pages when you need to have geo-location constrained to a specific list of countries in the EEA, also including Channel Islands and overseas territories.
Use this component only on AMP pages when:
- You need to have geo-location constrained to a specific list of countries in either the EEA, also including Channel Islands and overseas territories ('eea'),
- or if you need to detect if a user should not be shown ads based on geo-location ('gbOrUnknown').
<!-- ### When not to use this component -->

@@ -62,0 +66,0 @@

@@ -59,2 +59,3 @@ import React from 'react';

],
gbOrUnknown: ['gb', 'gg', 'im', 'je', 'uk', 'unknown'],
},

@@ -61,0 +62,0 @@ };

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc