@shopgate/pwa-common 6.19.5-rc.1 → 6.19.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.
@@ -54,10 +54,10 @@ if(!this.props.enablePromiseBasedLoading){this.isLoading=false;}}/**
54
54
  * Tests if all items have been received and are visible based on current offset.
55
55
  * @param {Object} [props] The current or next component props.
56
56
  * @returns {boolean}
57
- */},{key:"allItemsAreRendered",value:function allItemsAreRendered(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.props;var _this$state$offset2=_slicedToArray(this.state.offset,2),offset=_this$state$offset2[0],limit=_this$state$offset2[1];if(props.enablePromiseBasedLoading){var totalItems=props.totalItems;// At promise based loading the offset is increased after the response came in.
57
+ */},{key:"allItemsAreRendered",value:function allItemsAreRendered(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.props;var totalItems=props.totalItems,items=props.items;var _this$state$offset2=_slicedToArray(this.state.offset,2),offset=_this$state$offset2[0],limit=_this$state$offset2[1];if(props.enablePromiseBasedLoading){// At promise based loading the offset is increased after the response came in.
58
58
  // This method is invoked to evaluate if a new request needs to be dispatched, so we check
59
59
  // against the current offset state.
60
- return totalItems!==null&&offset>=totalItems;}return!this.needsToReceiveItems(props)&&offset+limit>=props.totalItems;}/**
60
+ return totalItems!==null&&(offset>=totalItems||offset===0&&Array.isArray(items)&&items.length===totalItems);}return!this.needsToReceiveItems(props)&&offset+limit>=totalItems;}/**
61
61
  * Increases the current offset by limit (from props).
62
62
  * @returns {Object}
63
63
  */},{key:"increaseOffset",value:function increaseOffset(){var _this$state$offset3=_slicedToArray(this.state.offset,2),start=_this$state$offset3[0],length=_this$state$offset3[1];var newOffset=start+length;/**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common",
3
- "version": "6.19.5-rc.1",
3
+ "version": "6.19.5",
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": "^4.6.3",
19
- "@shopgate/pwa-benchmark": "6.19.5-rc.1",
19
+ "@shopgate/pwa-benchmark": "6.19.5",
20
20
  "@virtuous/conductor": "~2.4.0",
21
21
  "@virtuous/react-conductor": "~2.4.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": "6.19.5-rc.1",
47
+ "@shopgate/pwa-core": "6.19.5",
48
48
  "lodash": "^4.17.4",
49
49
  "prop-types": "~15.7.2",
50
50
  "react": "~16.12.0",