{"_id":"@around25/react-native-swipe-pager","_rev":"7-5168fc6761080e7a01c19370291e3a39","name":"@around25/react-native-swipe-pager","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@around25/react-native-swipe-pager","version":"1.0.0","description":"This component allow to swipe pages.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/Around25/react-native-swipe-pager.git"},"peerDependencies":{"react":"^16.4.1","react-native":"0.55.4"},"dependencies":{"warning":"^2.1.0"},"keywords":["react-native","pager","swipe","swipper"],"author":{"name":"Andrei Rat"},"license":"ISC","bugs":{"url":"https://github.com/Around25/react-native-swipe-pager/issues"},"homepage":"https://github.com/Around25/react-native-swipe-pager#readme","gitHead":"36630be1536cdacb28b6cd0af2548f8db8c2e831","_id":"@around25/react-native-swipe-pager@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"andreirat","email":"andrei.rat@around25.com"},"dist":{"integrity":"sha512-rAU6i5RT/pLQ9HDhV5297UjIVha9juuU1grPLZVLp71XJPhstG6RGKhi72T9T15oWSlBUEJEUYYTdW1PPu4I9A==","shasum":"a24d17ddf0cc8c8ed624b1e285c8380182c8f0ee","tarball":"https://registry.npmjs.org/@around25/react-native-swipe-pager/-/react-native-swipe-pager-1.0.0.tgz","fileCount":7203,"unpackedSize":383025480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM535CRA9TVsSAnZWagAAbVQP/RsUaEMO6Ipc96RVd1jX\nOHdwXfmgBKPlI0QZGz74PWI8D+hoEwFSslL8Q4a28iFZ190qchq366Ne9myH\nS2NxbuyOxRXLga5DOWARR9w0ibKU+vgd5efaeOmJg59/pBn58SMiQ+VkD4mJ\ni3HhKISDmTJZl0NZrdqBKaV648cT7vUA11Gdlo8KUyd73HniznA275O4j6gE\nKLaDByi/c80YYXdMfDF/T468Zkq9KMvTuBKuG9GXiMRMpjHgyG83GnEdKpiq\nyt67CutCXtQEGi2t5HSX7WrxGUdxrBW/W5mlZAtwm8jAFpQ9/kLyoxzSBYYP\nIYZILLud6cma4YURgt6XXOC8YqTkTiq1X3546RIGb9GPfeRpyVIoEl+va7bF\nBPz0xUhsGeenUR5PfuWqNTbpc7iVsa5de53DGs8+d1SR+NdUqp5MhCQv6Cq+\nN5pALSqTrZ4v0RqgY74tAlAxgcXAi5IHjATNtGGlMnQ3Q/JTGf6SqB8zqy8I\nWG9vexBzC6wfvddpV1mcy3ogFAwFuoc1Ufj1JAv9VOzRopOulU6gwZvBubvH\nDK5R6zfAR5ES3g0vuM7g+QhWPPgC3iZzM2A96eAcopCIbD1Womyhiar9PnTw\nMLgqkU5Ove2ircfn+ZLUZUnYYVzhp7NC0JUZnfWmjPVgMlVevtDtOoCRc56h\naAjJ\r\n=yVON\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGPdqqzidYpuz1u87RNVDs5Ls/4NMNG2gpPvoB30UsZaAiEA3q4lAiNxdAOMEokyH//LCgSObUvHkQrsNdd3KkIZeNo="}]},"maintainers":[{"name":"alinporumb","email":"alin.porumb@gmail.com"},{"name":"andreirat","email":"andrei.rat@around25.com"},{"name":"calintamas","email":"calinntamas@gmail.com"},{"name":"cosminharangus","email":"cosmin@around25.com"},{"name":"cupsadarius","email":"cupsadarius@gmail.com"},{"name":"daniel.suciu.developer","email":"suciudaniel2@gmail.com"},{"name":"deniel","email":"denielheinrich@gmail.com"},{"name":"gabicg","email":"dogabicg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-swipe-pager_1.0.0_1530109427749_0.8769166940711621"},"_hasShrinkwrap":false},"1.0.1":{"name":"@around25/react-native-swipe-pager","version":"1.0.1","description":"This component allow to swipe pages.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/Around25/react-native-swipe-pager.git"},"peerDependencies":{"react":"^16.4.1","react-native":"0.55.4"},"dependencies":{"warning":"^2.1.0"},"keywords":["react-native","pager","swipe","swipper"],"author":{"name":"Andrei Rat"},"license":"ISC","bugs":{"url":"https://github.com/Around25/react-native-swipe-pager/issues"},"homepage":"https://github.com/Around25/react-native-swipe-pager#readme","gitHead":"762d0286dde7cfd85484593799c420ff104af6b4","_id":"@around25/react-native-swipe-pager@1.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"andreirat","email":"andrei.rat@around25.com"},"dist":{"integrity":"sha512-OKHOVD/cYmJLGEX0+8vWRMTXbxjo/sVHYTQ4wlW7Z0yjMpDEDq3BqyJisin+7sb/YsBSmtakRfT4iH6eMmwHFw==","shasum":"9b06d448c89d0f7641475f136879523211b3cf00","tarball":"https://registry.npmjs.org/@around25/react-native-swipe-pager/-/react-native-swipe-pager-1.0.1.tgz","fileCount":7203,"unpackedSize":383025480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNJqSCRA9TVsSAnZWagAASj4P/2VgCLtZKj4JZUa+LK3t\nqXklVPAgorA50gOGzqBSBvg1wi9ZUY1kzu7KqIb5WAA6g208opKboC8wtF/6\ncD4pjSESh+Qd7p9AM5PQT0/PPNSA8HXb3sfH7UABpNdw6j54Axm6wA/gF2Yj\n8lnzyb3lAz24eJcsH9eKmTOyZSLZccBRcszHcE9pgnKvq+6ZrtEJE60JsSs2\nZlHJDlrme6SbYTmDb8Z3p9YA/fUfUr1wJ9THtLZpTonuU1fMCP963CY2yw72\nT7YySvtZEVxxIl5jkTnQkmAZMDV1z/atdXMbtL1+yTxkqwGXplwVgQDjtfZq\nzx4lIAvmWNg54YNZIFRMCHBKoVoap602kog+hG6z9Bft8GHI4XCjZc368rc6\nvQznMXi4Vqx+UmQJmTWRGFuzGWOFVxPqerI7KbeTa0eW+9KioDoTsp3QlIl4\nucQGrkNvrffblG0C99llB5DdOzRjHZYXUy73B0sHDaIdQjg9x3BFqgQBkyTP\nBwYdIWz3nXgv7JmlxTKpr4FD2yqaCUrFaIXkP6bbSVrDc/ben8tzL/PSWWWM\ntN4sU9vA0SpEBcfdvD6NJUhdu+C6BkFxiuajVOVhSHaJm8n0DYgIsE1XcI7I\nBiMI0E4pT25Ny4ZTnsY/GRgkPBLCiEbqzoICVcp5XWn/8P0LKTmTk8BKe1+8\nwns0\r\n=KwCq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHMR3H5gLLQ6ar2bLvw7Sf1MLAxIiUKDWXiWYR17bp/gIga0wEl9dSyzfsgEW6nZmerQT51D3XdzGD7gK57xhgv5o="}]},"maintainers":[{"name":"alinporumb","email":"alin.porumb@gmail.com"},{"name":"andreirat","email":"andrei.rat@around25.com"},{"name":"calintamas","email":"calinntamas@gmail.com"},{"name":"cosminharangus","email":"cosmin@around25.com"},{"name":"cupsadarius","email":"cupsadarius@gmail.com"},{"name":"daniel.suciu.developer","email":"suciudaniel2@gmail.com"},{"name":"deniel","email":"denielheinrich@gmail.com"},{"name":"gabicg","email":"dogabicg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-swipe-pager_1.0.1_1530174094857_0.4576040906411223"},"_hasShrinkwrap":false},"1.0.2":{"name":"@around25/react-native-swipe-pager","version":"1.0.2","description":"This component allow to swipe pages.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/Around25/react-native-swipe-pager.git"},"peerDependencies":{"react":"^16.4.1","react-native":"0.55.4"},"dependencies":{"warning":"^2.1.0"},"keywords":["react-native","pager","swipe","swipper"],"author":{"name":"Andrei Rat"},"license":"ISC","bugs":{"url":"https://github.com/Around25/react-native-swipe-pager/issues"},"homepage":"https://github.com/Around25/react-native-swipe-pager#readme","gitHead":"ac5066749425c2944e0fb6066ae167699416db08","_id":"@around25/react-native-swipe-pager@1.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"andreirat","email":"andrei.rat@around25.com"},"dist":{"integrity":"sha512-rIKYSwEbOKMsQMfDLwWoDyudhi0OMtxQ37vgtqQeAHPWTj3R8HUqsxDiRjHwl1SSZE70l0QjZPAQBzigIjfPIg==","shasum":"30863c8eb8c38b13a194663f30c38a0b20ce71f9","tarball":"https://registry.npmjs.org/@around25/react-native-swipe-pager/-/react-native-swipe-pager-1.0.2.tgz","fileCount":7203,"unpackedSize":383025480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNKHUCRA9TVsSAnZWagAAJVcP+gPuFisxulVAOHteCnn9\nC3hpX5z5ui9vjST2E0yY7wOWWLGQzXj4W1Fvi4tnqQAvczI8Ej29l8A+SGZY\n5Kzf70AHaB7cHg+VMqo3K/ZJAGZ62QLqoptKO2l5641WsajhplYH3L4KE3Nw\n+Hqg9lEVwMSzeNCkukUoAcFQ7fgCfYAenxm6WK/KTfllISta8/DVm7fryS+q\n3Sr1bVvZGWYo8V/YJZVwwbtjlBD8r5bh3diI02Yr90ATPJdrj/9rLQjuDO30\nV7vzoHqr8yjWhmx9HeuNosVMRM9SSjRSK7uBx1nVXWNQVqeyJTM09+xwJN6M\nbUdaHx1ZZCGKwJhfm4yhjKw8tqk4XTal918zTJzrzV2G95NVQZag75VherPB\nbKgeyj9qxX/e085Cem8+bmrnL7gJ3DPQQzcbwALG/O790fQnzsXK5IN6S4Kg\n+JVjSML1tcdVfjQnTCJyv2OUQGJHKICcpIqvQeL18QzABUXiWOZ2whXh8bmV\n5QRyKBJg5QJr+YX/dSPaJmqT0CBiLgyFY025wIqGNA2jDaku6mCs5T6togSK\nGyXiLYGAi/kuaVkOQFy3+zTBryf9/elFwZsn/Egaf4tuP4z+mRNEaTVZeNXV\nBNRLaXyOxKArA4nFltA4mkiV7+iF54Gbkco7e4bp5RzodBF/gZ2lPNZ4Mlt/\niTyw\r\n=hNFG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcPYWOxklcKbJ/FMS054tWdnulv9am1Akv0ZuE7SkTlAiBeQtybF0qCP3mKBxGQIXhP7ag0J/CTrRt2/RMXAVZ42w=="}]},"maintainers":[{"name":"alinporumb","email":"alin.porumb@gmail.com"},{"name":"andreirat","email":"andrei.rat@around25.com"},{"name":"calintamas","email":"calinntamas@gmail.com"},{"name":"cosminharangus","email":"cosmin@around25.com"},{"name":"cupsadarius","email":"cupsadarius@gmail.com"},{"name":"daniel.suciu.developer","email":"suciudaniel2@gmail.com"},{"name":"deniel","email":"denielheinrich@gmail.com"},{"name":"gabicg","email":"dogabicg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-swipe-pager_1.0.2_1530175942757_0.09210200707776206"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-27T14:23:47.607Z","1.0.0":"2018-06-27T14:23:53.284Z","modified":"2022-04-04T15:34:04.404Z","1.0.1":"2018-06-28T08:21:38.669Z","1.0.2":"2018-06-28T08:52:36.670Z"},"maintainers":[{"email":"farcas.bianca25@gmail.com","name":"biancap"},{"email":"adrian@around25.com","name":"adrian.boros"},{"email":"dogabicg@gmail.com","name":"gabicg"},{"email":"suciudaniel2@gmail.com","name":"daniel.suciu.developer"},{"email":"cupsadarius@gmail.com","name":"cupsadarius"},{"email":"calinntamas@gmail.com","name":"calintamas"},{"email":"cosmin@around25.com","name":"cosminharangus"}],"description":"This component allow to swipe pages.","homepage":"https://github.com/Around25/react-native-swipe-pager#readme","keywords":["react-native","pager","swipe","swipper"],"repository":{"type":"git","url":"git+ssh://git@github.com/Around25/react-native-swipe-pager.git"},"author":{"name":"Andrei Rat"},"bugs":{"url":"https://github.com/Around25/react-native-swipe-pager/issues"},"license":"ISC","readme":"# @around25/react-native-swipe-pager\n\n![npm](https://img.shields.io/npm/v/@around25/react-native-swipe-pager.svg) ![npm](https://img.shields.io/npm/l/@around25/react-native-swipe-pager.svg) ![npm](https://img.shields.io/npm/dw/@around25/react-native-swipe-pager.svg) ![npm](https://img.shields.io/npm/dt/@around25/react-native-swipe-pager.svg)\n\nThis component is a implementation of pager for React Native. It allows you to swipe between pages, turn on auto play, to set timeout for auto plat and so on.\n\n  - works on iOS and Android\n\n### Features\n  - can render hundreds of pages\n  - set auto play\n  - lock swipe action\n  - set timeout for auto play\n  - render custom page indicator\n  - enable/disable loop\n\n### Installation\n\n```sh\n$ npm i @around25/react-native-swipe-pager --save\n```\n\n### Options\n\n| Option | iOS    | Android | Description | Default | Options | Type\n|:------:|:------:|:-------:|:----:|:-------------:|:--------:|:----:|\n| `dataSource` | YES | YES | ***Required*** - Provide pages data | - | - | -\n| `renderSwipePage` | YES | YES | Render page view  | - | - | **{component}**\n| `autoPlay` | YES | YES | If is set to `true`, pages will change automatically | ***false*** | *true*, *false* | **{boolean}**\n| `initialPage` | YES | YES | The initial page to display. It requires the index of the page. | ***0*** | - | **{number}**\n| `isLoop` | YES | YES | If is set to `true`, infinite swipe is enabled | ***false*** | *true*, *false* | **{boolean}**\n| `locked` | YES | YES | If is set to `true`, swipe to change pages is disabled | ***false*** | *true*, *false* | **{boolean}**\n| `renderPageIndicator` | YES | YES | If is set to `true`, indicator will hide. If is set to nothing, it will show the default indicator with dots. Custom component can be passed instead of `false` | -  | *false*, *<CustomComponent/>* | **{boolean/component}**\n| `autoPlayTimeout` | YES | YES | Specify the timeout of auto play. | ***5000***  | - | **{number(miliseconds)}**\n| `animation` | YES | YES | Pass custom function with animation, if not, the default animation will be applied. | -  | - | **{function}**\n\n### Methods\n| Method | Description | Type\n|:------:|:-----------:|:----:|\n| `onSwipe` | Callback when the page is changed | ***{function}***\n\n### Example \n\n## App.js\n\n```javascript\nimport React, { Component } from 'react';\nimport { Text, View, Animated, Easing } from 'react-native';\nimport RNSwipePager from '@around25/react-native-swipe-pager';\n\nimport styles from './styles';\n\nexport default class App extends Component {\n  constructor(props) {\n    let dataSource = new RNSwipePager.DataSource({\n      pageHasChanged: (p1, p2) => p1 !== p2,\n    });\n    super(props);\n    this.state = {\n      dataSource: dataSource.cloneWithPages([{name: 'Kidgarten'}, {name: 'Engage'}, {name: 'Around25'}, {name: 'CleverWash'}])\n    }\n  }\n  \n  /**\n   * @description Function called when page is changed\n   * @param pageIndex\n   */\n  onSwipe = (pageIndex) => {\n    // Do whatever you want\n  };\n  \n  \n  /**\n   * @description Render page with content\n   * @param data\n   * @return {XML}\n   */\n  renderPage = (data) => {\n    return (\n      <View style={styles.page}>\n        <Text style={styles.name}>{data.name}</Text>\n      </View>\n    )\n  };\n  \n  render() {\n    return (\n      <View style={styles.container}>\n        <RNSwipePager\n          style={styles.pager}\n          dataSource={this.state.dataSource}\n          renderSwipePage={this.renderPage}\n          renderPageIndicator={false}\n          autoPlay={true}\n          autoPlayTimeout={1000}\n          locked={true}\n          onSwipe={this.onSwipe}\n        />\n      </View>\n    );\n  }\n}\n\n```\n\n## styles.js\n```javascript\nimport { StyleSheet } from 'react-native';\n\nexport default StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n  page: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: 'gray',\n    height: '100%',\n    width: '100%'\n  },\n  pager: {\n    flex: 1,\n    backgroundColor: 'red',\n    width: '100%',\n    height: '100%'\n  },\n  name: {\n    fontSize: 40\n  }\n});\n\n```\n## An example with `animation` \n``` javascript\n<RNSwipePager\n          style={styles.pager}\n          dataSource={this.state.dataSource}\n          renderSwipePage={this.renderPage}\n          isLoop={true}\n          animation={(animatedValue, toValue, gestureState) => {\n            let velocity = Math.abs(gestureState.vx);\n            let baseDuration = 300;\n            let duration = (velocity > 1) ? 1 / velocity * baseDuration : baseDuration;\n            \n            return Animated.timing(animatedValue,\n              {\n                toValue: toValue,\n                duration: duration,\n                easing: Easing.out(Easing.exp),\n                bounce: 10\n              });\n          }}\n          onSwipe={this.onSwipe}\n          autoPlay={false}\n        />\n```\n\n# License\n\nMIT\n","readmeFilename":"README.md"}