@shopgate/pwa-common 7.12.3-beta.1 → 7.12.4-beta.1

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.
@@ -1,5 +1,5 @@
1
1
  import React from'react';import PropTypes from'prop-types';import Portal from'react-portal';import classNames from'classnames';import styles from"./style";/**
2
2
  * The Modal component.
3
3
  * @param {Object} props The component props.
4
- * @returns {JSX}
4
+ * @returns {JSX.Element}
5
5
  */var Modal=function Modal(_ref){var children=_ref.children,classes=_ref.classes;return React.createElement(Portal,{isOpened:true},React.createElement("div",{className:classNames(styles.container,classes===null||classes===void 0?void 0:classes.container,'common__modal')},React.createElement("div",{className:classNames(styles.layout,classes===null||classes===void 0?void 0:classes.layout)},React.createElement("div",{className:classNames(styles.content,classes===null||classes===void 0?void 0:classes.content)},children))));};Modal.defaultProps={children:null,classes:{container:'',layout:'',content:''}};export default Modal;
@@ -1 +1 @@
1
- import{css}from'glamor';var container=css({position:'fixed',top:0,bottom:0,left:0,right:0,overflow:'hidden',zIndex:2000}).toString();var layout=css({display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',height:'100%'}).toString();var content=css({position:'relative',maxWidth:'100vw',maxHeight:'100vh'}).toString();export default{container:container,layout:layout,content:content};
1
+ import{css}from'glamor';var container=css({position:'fixed',top:0,bottom:0,left:0,right:0,overflow:'hidden',zIndex:2000}).toString();var layout=css({display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',height:'100%'}).toString();var content=css({position:'relative',maxWidth:'100vw',maxHeight:'100vh',paddingTop:'var(--safe-area-inset-top)',paddingBottom:'var(--safe-area-inset-bottom)',overflowY:'scroll'}).toString();export default{container:container,layout:layout,content:content};
@@ -28,7 +28,7 @@ function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="s
28
28
  */},{key:"doAutoRerender",value:function doAutoRerender(){this.forceUpdate();this.startAutoRerender();}/**
29
29
  * Create array of elements from widget configuration.
30
30
  * @returns {Array} Array of JSX elements.
31
- */},{key:"createArrayOfElements",value:function createArrayOfElements(){var _this$props=this.props,_this$props$widgets=_this$props.widgets,widgets=_this$props$widgets===void 0?[]:_this$props$widgets,components=_this$props.components;return widgets.filter(function(widget){return shouldShowWidget(widget.settings);}).map(function(widget,index){if(!components[widget.type]&&widget.type!==WIDGET_GRID_TYPE){return null;}var key="w".concat(index);if(widget.type===WIDGET_GRID_TYPE){// If it's a grid just create it and pass the child widgets.
31
+ */},{key:"createArrayOfElements",value:function createArrayOfElements(){var _this$props=this.props,_this$props$widgets=_this$props.widgets,widgets=_this$props$widgets===void 0?[]:_this$props$widgets,components=_this$props.components;return widgets.filter(function(widget){return shouldShowWidget(widget.settings);}).map(function(widget,index){if(!components[widget.type]&&widget.type!==WIDGET_GRID_TYPE){return null;}var key="w".concat((widget===null||widget===void 0?void 0:widget.id)||index);if(widget.type===WIDGET_GRID_TYPE){// If it's a grid just create it and pass the child widgets.
32
32
  return createGridWrapper(key,widget.settings.widgets,components);}if(widget.height){// If it has a definite height wrap the widget in a grid.
33
33
  return createGridWrapper(key,[_extends({},widget,{col:0,row:0,width:GRID_COLUMNS})],components);}// In all other cases just create and return the widget component.
34
34
  return React.createElement(components[widget.type],_extends({},widget,{key:key}));});}/**
@@ -22,8 +22,9 @@ import noop from'lodash/noop';import{isObject}from"../validation";/**
22
22
  * @type {{next: Function, stop: Function, skipRest: Function}}
23
23
  */export var mutableActions={next:next,skipRest:skipRest,stop:stop};/**
24
24
  * Takes a function and makes it mutable.
25
- * @param {Function} func Original function to convert to a mutable
26
- * @returns {Function}
25
+ * @template {Function} T
26
+ * @param {T} func Original function to convert to a mutable
27
+ * @returns {T}
27
28
  */export var mutable=function mutable(func){var original=func;var current=func;var steps=[];/**
28
29
  * Takes the pre-processing steps and calls all step functions, as well as the mutable function
29
30
  * afterwards. Each step can transform the arguments, that are passed in to the next step in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common",
3
- "version": "7.12.3-beta.1",
3
+ "version": "7.12.4-beta.1",
4
4
  "description": "Common library for the Shopgate Connect PWA.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@sentry/browser": "6.0.1",
19
- "@shopgate/pwa-benchmark": "7.12.3-beta.1",
19
+ "@shopgate/pwa-benchmark": "7.12.4-beta.1",
20
20
  "@virtuous/conductor": "~2.5.0",
21
21
  "@virtuous/react-conductor": "~2.5.0",
22
22
  "@virtuous/redux-persister": "1.1.0-beta.7",
@@ -44,7 +44,7 @@
44
44
  "url-search-params": "^0.10.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@shopgate/pwa-core": "7.12.3-beta.1",
47
+ "@shopgate/pwa-core": "7.12.4-beta.1",
48
48
  "lodash": "^4.17.4",
49
49
  "prop-types": "~15.7.2",
50
50
  "react": "~16.12.0",