@shopgate/pwa-common 7.9.0-beta.1 → 7.9.0-beta.10

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/App.js CHANGED
@@ -7,7 +7,8 @@ import _regeneratorRuntime from"@babel/runtime/regenerator";function _typeof(obj
7
7
  * Registers the component for the native events and fires the onload AppCommand.
8
8
  */value:function componentDidMount(){var _this=this;/**
9
9
  * Async helper function that performs optional steps before appDidStart action is dispatched
10
- */var performAppStart=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){return _regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(!getIsSessionExpired(_this.props.store.getState())){_context.next=3;break;}_context.next=3;return _this.props.store.dispatch(logout(undefined,true));case 3:_this.props.store.dispatch(appDidStart("".concat(window.location.pathname).concat(window.location.search)));case 4:case"end":return _context.stop();}}},_callee);}));return function performAppStart(){return _ref.apply(this,arguments);};}();performAppStart();loadCustomStyles();}/**
10
+ */var performAppStart=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){return _regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(!getIsSessionExpired(_this.props.store.getState())){_context.next=9;break;}_context.prev=1;_context.next=4;return _this.props.store.dispatch(logout(undefined,true));case 4:_context.next=9;break;case 6:_context.prev=6;_context.t0=_context["catch"](1);// Noting to do here
11
+ console.error('AppStartLogout failed',_context.t0);case 9:_this.props.store.dispatch(appDidStart("".concat(window.location.pathname).concat(window.location.search)));case 10:case"end":return _context.stop();}}},_callee,null,[[1,6]]);}));return function performAppStart(){return _ref.apply(this,arguments);};}();performAppStart();loadCustomStyles();}/**
11
12
  * Renders the component.
12
13
  * @returns {JSX}
13
14
  */},{key:"render",value:function render(){return React.createElement(CookiesProvider,null,React.createElement(ErrorBoundary,{key:"error.root",store:this.props.store,isRoot:true},React.createElement(Provider,{store:this.props.store},React.createElement(I18n.Provider,null,React.createElement("div",null,this.props.children)))));}}]);return App;}(Component);export default App;
@@ -17,4 +17,4 @@ function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="s
17
17
  */},{key:"render",/**
18
18
  * Renders the component.
19
19
  * @returns {JSX}
20
- */value:function render(){var _this$props=this.props,alwaysActive=_this$props.alwaysActive,className=_this$props.className,children=_this$props.children,isOpen=_this$props.isOpen,animation=_this$props.animation;var active=this.state.active;var animationIn=animation["in"]||styles.animation["in"];var animationOut=animation.out||styles.animation.out;var combinedClassName=classNames(className,styles.container,_defineProperty({},animationIn,isOpen),_defineProperty({},animationOut,!isOpen));var style={};if(typeof animation.duration==='number'){style.animationDuration="".concat(animation.duration,"ms");}return active||alwaysActive?React.createElement("div",{className:combinedClassName,style:style,onAnimationEnd:this.handleAnimationEnd},children):null;}}]);return Drawer;}(Component);_defineProperty(Drawer,"defaultProps",{alwaysActive:false,className:'',children:null,isOpen:false,onOpen:function onOpen(){},onClose:function onClose(){},onDidClose:function onDidClose(){},onDidOpen:function onDidOpen(){},animation:{duration:null,"in":'',out:''}});export default Drawer;
20
+ */value:function render(){var _this$props=this.props,alwaysActive=_this$props.alwaysActive,className=_this$props.className,children=_this$props.children,isOpen=_this$props.isOpen,animation=_this$props.animation;var active=this.state.active;var animationIn=animation["in"]||styles.animation["in"];var animationOut=animation.out||styles.animation.out;var combinedClassName=classNames(className,styles.container,_defineProperty({},animationIn,isOpen),_defineProperty({},animationOut,!isOpen));var style={};if(typeof animation.duration==='number'){style.animationDuration="".concat(animation.duration,"ms");}return active||alwaysActive?React.createElement("div",{className:combinedClassName,style:style,onAnimationEnd:this.handleAnimationEnd,role:"dialog","aria-modal":true},children):null;}}]);return Drawer;}(Component);_defineProperty(Drawer,"defaultProps",{alwaysActive:false,className:'',children:null,isOpen:false,onOpen:function onOpen(){},onClose:function onClose(){},onDidClose:function onDidClose(){},onDidOpen:function onDidOpen(){},animation:{duration:null,"in":'',out:''}});export default Drawer;
@@ -5,4 +5,4 @@ function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="s
5
5
  */var SelectBoxItem=/*#__PURE__*/function(_Component){_inherits(SelectBoxItem,_Component);function SelectBoxItem(){var _getPrototypeOf2;var _this;_classCallCheck(this,SelectBoxItem);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(SelectBoxItem)).call.apply(_getPrototypeOf2,[this].concat(args)));_defineProperty(_assertThisInitialized(_this),"handleSelectionUpdate",function(){_this.props.handleSelectionUpdate(_this.props.value);});return _this;}_createClass(SelectBoxItem,[{key:"render",/**
6
6
  * Renders the component
7
7
  * @returns {JSX}
8
- */value:function render(){var Wrapper=this.props.wrapper;var _this$props$className=this.props.classNames,selectItem=_this$props$className.selectItem,selectItemSelected=_this$props$className.selectItemSelected;return React.createElement("li",{className:classNames(selectItem,item,_defineProperty({},selectItemSelected,this.props.isSelected)),onKeyUp:function onKeyUp(){},onClick:this.handleSelectionUpdate,"data-test-id":this.props.label,role:"menuitem",ref:this.props.forwardedRef,tabIndex:this.props.isSelected?'0':'-1'},React.createElement(Wrapper,null,React.createElement(I18n.Text,{string:this.props.label})));}}]);return SelectBoxItem;}(Component);_defineProperty(SelectBoxItem,"defaultProps",{forwardedRef:null,classNames:{}});export default SelectBoxItem;
8
+ */value:function render(){var Wrapper=this.props.wrapper;var _this$props$className=this.props.classNames,selectItem=_this$props$className.selectItem,selectItemSelected=_this$props$className.selectItemSelected;return React.createElement("li",{className:classNames(selectItem,item,_defineProperty({},selectItemSelected,this.props.isSelected)),onKeyUp:function onKeyUp(){},onClick:this.handleSelectionUpdate,"data-test-id":this.props.label,role:"menuitem",ref:this.props.forwardedRef,tabIndex:this.props.isSelected?'0':'-1',"aria-current":this.props.isSelected},React.createElement(Wrapper,null,React.createElement(I18n.Text,{string:this.props.label})));}}]);return SelectBoxItem;}(Component);_defineProperty(SelectBoxItem,"defaultProps",{forwardedRef:null,classNames:{}});export default SelectBoxItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common",
3
- "version": "7.9.0-beta.1",
3
+ "version": "7.9.0-beta.10",
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.9.0-beta.1",
19
+ "@shopgate/pwa-benchmark": "7.9.0-beta.10",
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.9.0-beta.1",
47
+ "@shopgate/pwa-core": "7.9.0-beta.10",
48
48
  "lodash": "^4.17.4",
49
49
  "prop-types": "~15.7.2",
50
50
  "react": "~16.12.0",