@shopgate/pwa-common 7.25.0-beta.4 → 7.25.0-beta.5

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.
@@ -4,7 +4,7 @@ import React,{useEffect}from'react';import PropTypes from'prop-types';import{Con
4
4
  * @param {boolean} props.disableA11YFocusHandling Whether the internal A11Y focus handling
5
5
  * should be disabled since it's already handled outside the dialog.
6
6
  * @returns {JSX.Element}
7
- */var Modal=function Modal(_ref){var children=_ref.children,classes=_ref.classes,disableA11YFocusHandling=_ref.disableA11YFocusHandling;useEffect(function(){if(disableA11YFocusHandling){return null;}activeModals+=1;// Create a MutationObserver to watch for changes in the DOM. We need to dispatch an UI event
7
+ */var Modal=function Modal(_ref){var children=_ref.children,classes=_ref.classes,disableA11YFocusHandling=_ref.disableA11YFocusHandling;useEffect(function(){if(disableA11YFocusHandling){return undefined;}activeModals+=1;// Create a MutationObserver to watch for changes in the DOM. We need to dispatch an UI event
8
8
  // when the modal is shown, so that the main content is hidden from screen readers.
9
9
  var observer=new MutationObserver(function(){var target=document.querySelector('.engage__view');if(target){// Dispatch an UI event to hide the main content from screen readers.
10
10
  UIEvents.emit(MODAL_EVENTS.SHOW);}});observer.observe(document.body,{childList:true,subtree:true});return function(){observer.disconnect();activeModals-=1;if(activeModals<=0){// Dispatch an UI event to make the main content visible for screen readers again.
@@ -16,6 +16,10 @@ function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="s
16
16
  * @param {string} url The URL to check.
17
17
  * @return {boolean}
18
18
  */export var isExternal=function isExternal(url){return url.includes('http://')||url.includes('https://')||url.includes('//');};/**
19
+ * Checks whether the url is an HTTPS url.
20
+ * @param {string} url The url to open.
21
+ * @return {boolean}
22
+ */export var isHTTPS=function isHTTPS(){var url=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';return url.startsWith('https://');};/**
19
23
  * Returns the actual url to the image, by adding url parameters with the dimensions for img-cdn
20
24
  * @param {string} src Source to the image.
21
25
  * @param {Object} dimension Dimension of the requested image.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common",
3
- "version": "7.25.0-beta.4",
3
+ "version": "7.25.0-beta.5",
4
4
  "description": "Common library for the Shopgate Connect PWA.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@redux-devtools/extension": "^3.3.0",
19
19
  "@sentry/browser": "6.0.1",
20
- "@shopgate/pwa-benchmark": "7.25.0-beta.4",
20
+ "@shopgate/pwa-benchmark": "7.25.0-beta.5",
21
21
  "@virtuous/conductor": "~2.5.0",
22
22
  "@virtuous/react-conductor": "~2.5.0",
23
23
  "@virtuous/redux-persister": "1.1.0-beta.7",
@@ -43,7 +43,7 @@
43
43
  "url-search-params": "^0.10.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@shopgate/pwa-core": "7.25.0-beta.4",
46
+ "@shopgate/pwa-core": "7.25.0-beta.5",
47
47
  "@types/react-portal": "^3.0.9",
48
48
  "lodash": "^4.17.4",
49
49
  "prop-types": "~15.8.1",