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.
@@ -23193,17 +23193,17 @@ var GoogleMap = function (_a) {
23193
23193
  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;
23194
23194
  var cookiesAccepted = wereCookiesAccepted(allowCookies);
23195
23195
  var _b = useState(false), notServer = _b[0], setNotServer = _b[1];
23196
- /* We extract the iframe source URL and check it actually goes to www.google.com/maps */
23196
+ /* We extract the iframe source URL and check it actually goes to www.google.com/maps or one.network*/
23197
23197
  var src_matches = iframe_html.match(/src="([^"]+)"/gi);
23198
- var embed_url = (src_matches === null || src_matches === void 0 ? void 0 : src_matches.length) == 1 ? src_matches[0].replace('src="', '') : '';
23198
+ var embed_url = (src_matches === null || src_matches === void 0 ? void 0 : src_matches.length) == 1 ? src_matches[0].replace('src="', '').replace('"', '') : '';
23199
23199
  if (embed_url) {
23200
- var map_matches = embed_url.match(/^https:\/\/www.google.com\/maps/gi);
23201
- embed_url = (map_matches === null || map_matches === void 0 ? void 0 : map_matches.length) == 1 ? embed_url : '';
23200
+ var acceptable_embedded_url_matches = embed_url.match(/^https:\/\/www.google.com\/maps|https:\/\/api-gb\.one\.network\/embedded\//gi);
23201
+ embed_url = (acceptable_embedded_url_matches === null || acceptable_embedded_url_matches === void 0 ? void 0 : acceptable_embedded_url_matches.length) == 1 ? embed_url : '';
23202
23202
  }
23203
- /* We also check the non-embed link goes to goo.gl/maps or www.google.com/maps */
23203
+ /* We also check the non-embed link goes to goo.gl/maps or www.google.com/maps or one.network*/
23204
23204
  if (link_url) {
23205
- var googl_matches = link_url.match(/^https:\/\/goo.gl\/maps|https:\/\/www.google.com\/maps|https:\/\/maps.app.goo.gl/gi);
23206
- link_url = (googl_matches === null || googl_matches === void 0 ? void 0 : googl_matches.length) == 1 ? link_url : '';
23205
+ 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);
23206
+ 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 : '';
23207
23207
  }
23208
23208
  useEffect(function () {
23209
23209
  setNotServer(true);
@@ -25123,7 +25123,27 @@ const Container$C = styled.div`
25123
25123
  }
25124
25124
 
25125
25125
  #google_translate_element {
25126
- margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
25126
+ margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
25127
+
25128
+ a {
25129
+ padding: 14px 0;
25130
+ display: inline-block;
25131
+
25132
+ &:hover {
25133
+ ${(props) => props.theme.linkStyles};
25134
+ }
25135
+ &:active {
25136
+ ${(props) => props.theme.linkStylesActive};
25137
+ }
25138
+ &:focus {
25139
+ ${(props) => props.theme.linkStylesFocus};
25140
+ }
25141
+ }
25142
+
25143
+ a::after {
25144
+ content: ' (opens in new window)';
25145
+ font-weight: normal;
25146
+ }
25127
25147
  }
25128
25148
  `;
25129
25149
 
@@ -25140,6 +25160,10 @@ var GoogleTranslate = function (_a) {
25140
25160
  pageLanguage: pageLanguage,
25141
25161
  autoDisplay: false,
25142
25162
  }, 'google_translate_element');
25163
+ var popupForm = document.getElementById('goog-gt-vt');
25164
+ if (popupForm) {
25165
+ popupForm.remove();
25166
+ }
25143
25167
  };
25144
25168
  useEffect(function () {
25145
25169
  var addScript = document.createElement('script');