Skip to content

Commit 98ef3a2

Browse files
author
Bart Arribe
authored
Merge branch 'master' into greenkeeper/updtr-2.0.0
2 parents e00b2ce + a568f6a commit 98ef3a2

File tree

40 files changed

+5666
-279
lines changed

40 files changed

+5666
-279
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### Which OS ?
2+
3+
### Version
4+
Which versions are you using:
5+
6+
- react-native-swiper v?
7+
- react-native v0.?.?
8+
9+
### Expected behaviour
10+
11+
12+
13+
### Actual behaviour
14+
15+
16+
### How to reproduce it>
17+
To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.
18+
-
19+
20+
### Steps to reproduce
21+
1.
22+
2.
23+
3.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Is it a bugfix ?
2+
- Yes or No ?
3+
- If yes, which issue (fix #number) ?
4+
5+
### Is it a new feature ?
6+
- Yes or no ?
7+
- Include documentation, demo GIF if applicable
8+
9+
### Describe what you've done:
10+
11+
### How to test it ?

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- [1.5.11]
2+
+ Typescript Definition
3+
14
- [1.5.1]
25
+ Allow scroll without animate, ref: [scrollBy(index, animated)](#scrollbyindex-animated)
36
+ Remove [#254](https://github.com/leecade/react-native-swiper/pull/254) which break the scroll direction in loop mode

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@
2222
> see: [ROADMAP.md](ROADMAP.md)
2323
2424
## Changelogs
25+
- **[1.5.6]**
26+
+ Fix [#16](https://github.com/leecade/react-native-swiper/issues/16), [#36](https://github.com/leecade/react-native-swiper/issues/36), [#371](https://github.com/leecade/react-native-swiper/issues/371), [#410](https://github.com/leecade/react-native-swiper/issues/410), [#411](https://github.com/leecade/react-native-swiper/issues/411), [#422](https://github.com/leecade/react-native-swiper/issues/422), [#468](https://github.com/leecade/react-native-swiper/issues/468) Fix landscape orientation auto resize! (thanks [@ahmed3mar](https://github.com/ahmed3mar), [@timmywil](https://github.com/timmywil))
27+
+ Add containerStyle prop to customize the view container.
28+
29+
- [1.5.5]
30+
+ Update: using PropTypes from prop-types and Change View.propTypes to ViewPropTypes
2531

26-
- **[1.5.4]**
32+
33+
- [1.5.4]
2734
+ Added easily accessible pagination point manipulation: use `dotColor` / `activeDotColor` and `dotStyle` / `activeDotStyle` (thanks [@denizs](https://github.com/denizs))
2835
+ Added scrollEnabled prop to documentation (thanks [@ibandominguez](https://github.com/ibandominguez))
2936

@@ -45,29 +52,24 @@
4552
4653
### [examples/components/Basic](https://github.com/leecade/react-native-swiper/blob/master/examples/components/Basic)
4754

48-
![](http://i.imgur.com/zrsazAG.gif =300x)
55+
![](http://i.imgur.com/zrsazAG.gif=300x)
4956

5057
### [examples/components/Swiper](https://github.com/leecade/react-native-swiper/blob/master/examples/components/Swiper)
5158

52-
![](http://i.imgur.com/hP3f3oO.gif =300x)
59+
![](http://i.imgur.com/hP3f3oO.gif=300x)
5360

5461
### [examples/components/SwiperNumber](https://github.com/leecade/react-native-swiper/blob/master/examples/components/SwiperNumber)
5562

56-
![](http://i.imgur.com/0rqESVb.gif =300x)
63+
![](http://i.imgur.com/0rqESVb.gif=300x)
5764

5865
### [examples/components/Phone](https://github.com/leecade/react-native-swiper/blob/master/examples/components/Phone)
5966

60-
![](http://i.imgur.com/c1BhjZm.gif =300x)
67+
![](http://i.imgur.com/c1BhjZm.gif=300x)
6168

6269
### [examples/components/LoadMinimal](https://github.com/leecade/react-native-swiper/blob/master/examples/components/LoadMinimal)
6370

64-
![](http://i.imgur.com/LAOHbJA.gif =300x)
65-
66-
### [examples/components/PhotoView](https://github.com/leecade/react-native-swiper/blob/master/examples/components/PhotoView)
67-
68-
![](http://i.imgur.com/GkIRzjO.gif =300x)
71+
![](http://i.imgur.com/LAOHbJA.gif=300x)
6972

70-
> with [react-native-photo-view](https://github.com/alwx/react-native-photo-view)
7173

7274
## Getting Started
7375

@@ -96,7 +98,7 @@ $ npm i react-native-swiper --save
9698
- Install `react-native` first
9799

98100
```bash
99-
$ npm i react-native -g
101+
$ npm i react-native-cli -g
100102
```
101103

102104
- Initialization of a react-native project
@@ -178,6 +180,7 @@ AppRegistry.registerComponent('myproject', () => swiper);
178180
| index | 0 | `number` | Index number of initial slide. |
179181
| showsButtons | false | `bool` | Set to `true` make control buttons visible. |
180182
| autoplay | false | `bool` | Set to `true` enable auto play mode. |
183+
| onIndexChanged | (index) => null | `func` | Called with the new index when the user swiped |
181184

182185
#### Custom basic style & content
183186

examples/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["react-native"]
3+
}

examples/.flowconfig

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
24

3-
# We fork some components by platform.
4-
.*/*.android.js
5-
6-
# Ignore templates with `@flow` in header
7-
.*/local-cli/generator.*
8-
9-
# Ignore malformed json
10-
.*/node_modules/y18n/test/.*\.json
11-
12-
# Ignore the website subdir
13-
<PROJECT_ROOT>/website/.*
14-
15-
# Ignore BUCK generated dirs
5+
; Ignore "BUCK" generated dirs
166
<PROJECT_ROOT>/\.buckd/
177

18-
# Ignore unexpected extra @providesModule
19-
.*/node_modules/commoner/test/source/widget/share.js
8+
; Ignore unexpected extra "@providesModule"
9+
.*/node_modules/.*/node_modules/fbjs/.*
2010

21-
# Ignore duplicate module providers
22-
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
11+
; Ignore duplicate module providers
12+
; For RN Apps installed via npm, "Libraries" folder is inside
13+
; "node_modules/react-native" but in the source repo it is in the root
2314
.*/Libraries/react-native/React.js
2415
.*/Libraries/react-native/ReactNative.js
25-
.*/node_modules/jest-runtime/build/__tests__/.*
2616

2717
[include]
2818

@@ -32,27 +22,24 @@ node_modules/react-native/flow
3222
flow/
3323

3424
[options]
35-
module.system=haste
36-
37-
esproposal.class_static_fields=enable
38-
esproposal.class_instance_fields=enable
25+
emoji=true
3926

40-
experimental.strict_type_args=true
27+
module.system=haste
4128

4229
munge_underscores=true
4330

44-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
4531
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
4632

4733
suppress_type=$FlowIssue
4834
suppress_type=$FlowFixMe
4935
suppress_type=$FixMe
5036

51-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
37+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
5339
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5441

5542
unsafe.enable_getters_and_setters=true
5643

5744
[version]
58-
^0.30.0
45+
^0.49.1

examples/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

examples/.gitignore

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,32 @@ DerivedData
2222
*.xcuserstate
2323
project.xcworkspace
2424

25-
# Android/IJ
25+
# Android/IntelliJ
2626
#
27-
*.iml
27+
build/
2828
.idea
2929
.gradle
3030
local.properties
31+
*.iml
3132

3233
# node.js
3334
#
3435
node_modules/
3536
npm-debug.log
37+
yarn-error.log
3638

3739
# BUCK
3840
buck-out/
3941
\.buckd/
40-
android/app/libs
41-
android/keystores/debug.keystore
42+
*.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50+
51+
fastlane/report.xml
52+
fastlane/Preview.html
53+
fastlane/screenshots

examples/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { AppRegistry } from 'react-native'
22
import Basic from './components/Basic/'
33
// import Dynamic from './components/Dynamic/'
4-
// import Phone from './components/Phone/'
5-
// import Swiper from './components/Swiper/'
6-
// import SwiperNumber from './components/SwiperNumber/'
74
// import LoadMinimal from './components/LoadMinimal/'
8-
// import PhotoView from './components/PhotoView/'
9-
AppRegistry.registerComponent('examples', () => Basic)
5+
// import Phone from './components/Phone/'
6+
// import PhotoView from './components/PhotoView/' // not working
7+
// import Swiper from './components/Swiper/' // working but no title displayed
8+
// import SwiperNumber from './components/SwiperNumber/' // working but no title displayed
9+
AppRegistry.registerComponent('examples', () => Basic);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'react-native';
2+
import React from 'react';
3+
import Index from '../index.android.js';
4+
5+
// Note: test renderer must be required after react-native.
6+
import renderer from 'react-test-renderer';
7+
8+
it('renders correctly', () => {
9+
const tree = renderer.create(
10+
<Index />
11+
);
12+
});

0 commit comments

Comments
 (0)