northants-design-system 1.3.2 → 1.3.3

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/build/index.js CHANGED
@@ -23204,17 +23204,17 @@ var GoogleMap = function (_a) {
23204
23204
  var title = _a.title, description = _a.description, iframe_html = _a.iframe_html, link_title = _a.link_title, link_url = _a.link_url, allowCookies = _a.allowCookies;
23205
23205
  var cookiesAccepted = wereCookiesAccepted(allowCookies);
23206
23206
  var _b = React.useState(false), notServer = _b[0], setNotServer = _b[1];
23207
- /* We extract the iframe source URL and check it actually goes to www.google.com/maps */
23207
+ /* We extract the iframe source URL and check it actually goes to www.google.com/maps or one.network*/
23208
23208
  var src_matches = iframe_html.match(/src="([^"]+)"/gi);
23209
- var embed_url = (src_matches === null || src_matches === void 0 ? void 0 : src_matches.length) == 1 ? src_matches[0].replace('src="', '') : '';
23209
+ var embed_url = (src_matches === null || src_matches === void 0 ? void 0 : src_matches.length) == 1 ? src_matches[0].replace('src="', '').replace('"', '') : '';
23210
23210
  if (embed_url) {
23211
- var map_matches = embed_url.match(/^https:\/\/www.google.com\/maps/gi);
23212
- embed_url = (map_matches === null || map_matches === void 0 ? void 0 : map_matches.length) == 1 ? embed_url : '';
23211
+ var acceptable_embedded_url_matches = embed_url.match(/^https:\/\/www.google.com\/maps|https:\/\/api-gb\.one\.network\/embedded\//gi);
23212
+ embed_url = (acceptable_embedded_url_matches === null || acceptable_embedded_url_matches === void 0 ? void 0 : acceptable_embedded_url_matches.length) == 1 ? embed_url : '';
23213
23213
  }
23214
- /* We also check the non-embed link goes to goo.gl/maps or www.google.com/maps */
23214
+ /* We also check the non-embed link goes to goo.gl/maps or www.google.com/maps or one.network*/
23215
23215
  if (link_url) {
23216
- var googl_matches = link_url.match(/^https:\/\/goo.gl\/maps|https:\/\/www.google.com\/maps|https:\/\/maps.app.goo.gl/gi);
23217
- link_url = (googl_matches === null || googl_matches === void 0 ? void 0 : googl_matches.length) == 1 ? link_url : '';
23216
+ var acceptable_non_embedded_url_matches = link_url.match(/^https:\/\/goo.gl\/maps|https:\/\/www.google.com\/maps|https:\/\/maps.app.goo.gl|https:\/\/one.network/gi);
23217
+ link_url = (acceptable_non_embedded_url_matches === null || acceptable_non_embedded_url_matches === void 0 ? void 0 : acceptable_non_embedded_url_matches.length) == 1 ? link_url : '';
23218
23218
  }
23219
23219
  React.useEffect(function () {
23220
23220
  setNotServer(true);
@@ -25134,7 +25134,27 @@ const Container$C = styled__default.default.div`
25134
25134
  }
25135
25135
 
25136
25136
  #google_translate_element {
25137
- margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
25137
+ margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
25138
+
25139
+ a {
25140
+ padding: 14px 0;
25141
+ display: inline-block;
25142
+
25143
+ &:hover {
25144
+ ${(props) => props.theme.linkStyles};
25145
+ }
25146
+ &:active {
25147
+ ${(props) => props.theme.linkStylesActive};
25148
+ }
25149
+ &:focus {
25150
+ ${(props) => props.theme.linkStylesFocus};
25151
+ }
25152
+ }
25153
+
25154
+ a::after {
25155
+ content: ' (opens in new window)';
25156
+ font-weight: normal;
25157
+ }
25138
25158
  }
25139
25159
  `;
25140
25160
 
@@ -25151,6 +25171,10 @@ var GoogleTranslate = function (_a) {
25151
25171
  pageLanguage: pageLanguage,
25152
25172
  autoDisplay: false,
25153
25173
  }, 'google_translate_element');
25174
+ var popupForm = document.getElementById('goog-gt-vt');
25175
+ if (popupForm) {
25176
+ popupForm.remove();
25177
+ }
25154
25178
  };
25155
25179
  React.useEffect(function () {
25156
25180
  var addScript = document.createElement('script');