{"_id":"@cloversites/redux-infinite-scroll","_rev":"1-ca23b173410ec23a048b6c12ae657e16","name":"@cloversites/redux-infinite-scroll","dist-tags":{"latest":"1.0.9-76f362a"},"versions":{"1.0.9-76f362a":{"name":"@cloversites/redux-infinite-scroll","version":"1.0.9-76f362a","description":"React infinite scroll component designed for a Redux data-flow.","main":"lib/ReduxInfiniteScroll.js","scripts":{"test":"npm run transpile && karma start karma.conf.js","test-watch":"karma start karma.conf.js --single-run=false","transpile":"babel src --out-dir lib","build":"webpack --config production.webpack.js","dev:build:watch":"webpack --config dev.webpack.js --watch","build:min":"webpack --config min.webpack.js","build:release":"npm run transpile && npm run build && npm run build:min"},"repository":{"type":"git","url":"git+https://github.com/RealScout/redux-infinite-scroll.git"},"keywords":["React","Redux","Infinite","Scroll"],"author":{"name":"RealScoutTech"},"license":"MIT","bugs":{"url":"https://github.com/RealScout/redux-infinite-scroll/issues"},"homepage":"https://github.com/RealScout/redux-infinite-scroll#readme","devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-core":"^6.3.15","babel-loader":"^6.2.0","babel-plugin-react-transform":"^2.0.0-beta1","babel-polyfill":"^6.3.14","babel-preset-es2015":"^6.3.13","babel-preset-react":"^6.3.13","babel-preset-stage-0":"^6.16.0","jasmine":"2.3.2","jasmine-core":"2.3.4","karma":"0.13.22","karma-chrome-launcher":"^1.0.1","karma-cli":"0.1.2","karma-jasmine":"0.3.8","karma-jasmine-jquery":"0.1.1","karma-phantomjs-launcher":"1.0.1","karma-sourcemap-loader":"0.3.7","karma-webpack":"1.8.0","phantomjs-prebuilt":"2.1.12","prop-types":"^15.4.0","react":"^15.4.0","react-addons-test-utils":"^15.4.0","react-dom":"^15.4.0","react-immutable-proptypes":"^1.7.0","webpack":"^1.12.9","webpack-dev-middleware":"^1.4.0","webpack-dev-server":"^1.10.1","webpack-hot-middleware":"^2.6.0"},"gitHead":"3ffc0cbd95e14ad79dd8c75575483d02e3e2f43c","_id":"@cloversites/redux-infinite-scroll@1.0.9-76f362a","_nodeVersion":"12.13.1","_npmVersion":"6.13.2","dist":{"integrity":"sha512-9f5GSIVJbBKNsc1llA2UCggqPnAtp3V1Ony0ho1HTXk/7Jlaz512TYYZ3PyIymgrdhsDqZnqrDKvyo7/VcyKDA==","shasum":"42bc88aa16f81509b7fb56fc8e52936da3ed71b6","tarball":"https://registry.npmjs.org/@cloversites/redux-infinite-scroll/-/redux-infinite-scroll-1.0.9-76f362a.tgz","fileCount":21,"unpackedSize":116043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6XoBCRA9TVsSAnZWagAAaUsP/ig1kMK3LqRen6qzkJLd\nptdSGlvqJh0XaSYViGvByZ9QVUbfTG7REdZo+II5U/ccFBo9z3WHssRla+JH\nvcDk+XjKMkL57dWMkFzvd2WBvjhf73UGRoqrE/JxynVrs1pGDAXrJZtqE+3g\nTglHgXYPYFBYBFPeR3EeSRdkmAiXNxwC5D9brk1CYYqqnP1ljj/0TViK3VbN\n91O37+f5wTCrGTZepOO4uDCTTFs7Seh7u55VvAYoR9vxVusHAbm3PcXW4C9i\nzCX0wqSbEQOm3jPp07nly8Ugl5F74xkUik0TavyhYbgYQxSG1JyEuOio8T3Q\nZn5e058qDYFx7QL26Jfzilj9XVi4fH7Wjk6ZjsWW6HiQDSU+JPYdaJTJqBtl\nqL86wAxqCAvhZsTQyUfKla7eA5u0pFTzZmwzq75bMB8gi7hvmGLQoBw5z+0Y\nJRRMofFPG+GgOrwhxd+zY5tszGp673bLENXJuQfcxpJZzn3Fh/k2iTJdwu3e\naNQIQ1Y0tBjpG/DAcN7irOFVb2LlUxaapRBxxfWqjp+J6Mj+SgKNPAZyVkKZ\n5R31keaqLoZh2JIYgcELDeFqC7aX8o60JTmJ2XvRyMtj09RyIRgWTAbNgx3J\nDtlBp2bRxMJ9NYasg4DhGuXT9u/f/Zd61UB0EPb5fG99Rz0nP0Zm/yxoeIcr\nT7ge\r\n=VCCf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHvJNWEqM3ok5K6FDvD/imF7KL3baVc0CduenPJZjVCQIgKey2ZyUHedn54sBUrvAQt3P9uIVQaXc0hnreykiBNVs="}]},"maintainers":[{"name":"jacksonrayhamilton","email":"jackson@jacksonrayhamilton.com"},{"name":"cloversites-admin","email":"servers@cloversites.com"}],"_npmUser":{"name":"jacksonrayhamilton","email":"jackson@jacksonrayhamilton.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-infinite-scroll_1.0.9-76f362a_1575582208894_0.9301094444979674"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-05T21:43:28.659Z","1.0.9-76f362a":"2019-12-05T21:43:29.023Z","modified":"2022-04-04T23:39:52.731Z"},"maintainers":[{"name":"jacksonrayhamilton","email":"jackson@jacksonrayhamilton.com"},{"name":"cloversites-admin","email":"servers@cloversites.com"}],"description":"React infinite scroll component designed for a Redux data-flow.","homepage":"https://github.com/RealScout/redux-infinite-scroll#readme","keywords":["React","Redux","Infinite","Scroll"],"repository":{"type":"git","url":"git+https://github.com/RealScout/redux-infinite-scroll.git"},"author":{"name":"RealScoutTech"},"bugs":{"url":"https://github.com/RealScout/redux-infinite-scroll/issues"},"license":"MIT","readme":"[![Circle CI](https://circleci.com/gh/RealScout/redux-infinite-scroll.svg?style=svg)](https://circleci.com/gh/RealScout/redux-infinite-scroll)\n[![npm version](https://badge.fury.io/js/redux-infinite-scroll.svg)](https://badge.fury.io/js/redux-infinite-scroll)\n[![npm dm](https://img.shields.io/npm/dm/redux-infinite-scroll.svg)](https://www.npmjs.com/package/redux-infinite-scroll)\n[![Package Quality](http://npm.packagequality.com/shield/redux-infinite-scroll.svg)](http://packagequality.com/#?package=redux-infinite-scroll)\n\n# Redux Infinite Scroll\n\nA stateless React infinite scroll component meant for usage within Redux.\n\n## **Important**\nIf you are using an element as the scrollable component, rather than the window, you **MUST** pass a fixed height to the containerHeight prop (many issues will be fixed by following this step).\n\n## Demo & Examples\n\nhttp://realscout.github.io/redux-infinite-scroll/\n\n## Installation\n\n``` bash\nnpm install redux-infinite-scroll --save\n```\n\n## Importing Via AMD/CommonJS\n\n##### ES6 format\n```javascript\nimport ReduxInfiniteScroll from 'redux-infinite-scroll';\n```\n##### ES5 format\n```javascript\nvar ReduxInfiniteScroll = require('redux-infinite-scroll');\n```\n\n## Importing Via Script Tag\nIf you decide to use either one of the distribution files found in `/dist`, then you can access the `ReduxInfiniteScroll` via a global variable.\n\n##### ES6 format\n```javascript\nReduxInfiniteScroll\n```\n##### ES5 format\n```javascript\nReduxInfiniteScroll.default;\n```\nThe difference is due to the `ReduxInfiniteScroll` being an ES6 module and therefore having a different export syntax than ES5.\n\n\n## Usage\n\nIn order to use it in your React app, simply import it and follow the example below.  The component expects to receive \nchild elements that it then injects into the DOM.  The `loadMore` prop expects a function that requests for more \nitems to be loaded once the container/window has reached the bottom `threshold`.  If there are no more items left to \nbe passed to the component, make sure to set the `hasMore` prop to be `false`.  **Important** If you are using \nan element as the scrollable component, rather than the window, you MUST pass a fixed height to the `containerHeight`\nprop.\n\n##### ES6 format\n \n```javascript\n\n// MessageList.jsx\n\nimport InfiniteScroll from 'redux-infinite-scroll';\nimport ChatActions from './ChatActions';\n\nclass MessageList extends Component {\n  _loadMore() {\n    this.props.dispatch(ChatActions.fetchMessages())\n  }\n  \n  _renderMessages() {\n    return _.map(this.props.messages, (msg) => {\n      return(\n          <div>{msg}</div>\n      )\n    })\n  }\n  \n  render() {\n    return (\n        <InfiniteScroll\n          items={this._renderMessages()}\n          loadMore={this._loadMore.bind(this)}\n        />\n    )\n  }\n}\n\n```\n\nWhere your Redux action and reducer might look something like this:\n\n``` javascript\n// ChatActions.js\n\nexport function fetchMessages(params) {\n  return {\n    type: FETCH_MESSAGES,\n    messages: ['hi there', 'hi again', 'still here']\n  };\n}\n\n\n// ChatReducer.js\n\n\nconst initialState = {\n  messages: []\n}\n\nfunction chatReducer(state=initialState, action=undefined) {\n  switch (action.type) {\n    case FETCH_MESSAGES:\n      return Object.assign({}, initialState, {\n        messages: initialState.concat(action.messages)\n      })\n  }\n}\n\n```\n\n\n### Options\n\n| Props  \t|  Type \t|  Required | Default \t| Description  \t|\n|---\t|---\t|---\t|---\t|--- |\n| elementIsScrollable  \t| bool  \t| no |  true \t| Defines whether the div will have a fixed height and listens to the div's overflow event or instead have a non-fixed height and listen to the window scroll event\n| containerHeight  \t|  integer or string \t| no  \t| '100%' | Sets an inline style on the height of the topmost div.\n| threshold | integer | no | 100 | The number of pixels from the bottom that the scroll bar must reach in order to trigger `loadMore`.\n| horizontal  \t|  bool | no  |false| Whether to check for horizontal scrolling\n| hasMore  \t|  bool \t| no  \t| true  \t| Whether there are more items waiting to be displayed. Set this to false once all of the items have been passed down to either `items` or `children`.\n| loadingMore |  bool \t| no  \t|false| A prop that should be set to `true` by the parent component whenever the `loadMore` function gets invoked, and then toggled to `false` once that function has finished updating the `items` prop.\n| loader  \t|  any | no|  Loading... \t| The value of this prop gets injected as the last element of the parent div when `hasMore` `loadingMore` and `showLoader` are all `true`.\n| showLoader  \t| bool  \t| no  \t|  true \t| Whether to show the loader when the `loadingMore` property is `true`\n| loadMore  \t|  function | yes  |undefined| The function is called when the component has reached the `threshold` and `hasMore` is true.\n| holderType | string  \t|no|div| The type the loader is rendered as, could be `ul`, `dl`, etc.\n| className | string  \t|no|''| Any additional classes to be added to the holder.\n| items | array | no | []\t| The array of elements waiting to be rendered.  Use either this or `children`. **Deprecated.**\n| children | array | no | []  | The array of elements waiting to be rendered. Use either this or `items`.\n\n## Credits\n\nRealScout\nHeavily inspired by react-infinite-scroll.\n\n# License\n\nMIT Licensed. Copyright (c) RealScout Inc.\n","readmeFilename":"Readme.md"}