Skip to content

Commit e1ec877

Browse files
committed
Revert "@0.0.1"
This reverts commit 6a76068.
1 parent 6a76068 commit e1ec877

File tree

139 files changed

+20614
-5036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+20614
-5036
lines changed

README.md

Lines changed: 217 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,217 @@
1-
ackage for [reco cli: react.cordova](https://www.npmjs.com/package/react.cordova)
1+
# react.cordova-navigation_controller
2+
3+
## Plugin for react
4+
It's manager for your pages like mobile app.<br>
5+
6+
#### `import Navigator from './mobile-navigation-controller';`
7+
8+
<br>
9+
For example:
10+
In the render function return
11+
12+
```
13+
<Navigator onRef={ref => (this.navigatorRef = ref)} >
14+
15+
16+
<MyHomePage key="home" levelPage={0} />
17+
18+
<AboutPage key="about"
19+
levelPage={1}
20+
/>
21+
22+
23+
</Navigator>
24+
```
25+
**Note: prop `levelPage` important to manage the returs (from back button) in the structure of a tree**<br><br>
26+
27+
28+
29+
30+
To change page you get the ref and do:
31+
#### `this.navigatorRef.changePage("about");`
32+
the option to changePage it's:
33+
```
34+
this.navigatorRef.changePage(
35+
goToPage //Required
36+
,{options}// Not requred
37+
);
38+
```
39+
options => { animationIn:integer // have defult
40+
, animationOut:string // have defult
41+
, timeAnimationInMS:integer // defult=250(ms)
42+
, callbackFun:function
43+
, props:{...}
44+
}
45+
46+
*`animationIn` and `animationOut` need name animate from [here](https://daneden.github.io/animate.css/) <br>
47+
*the animate.css includ in this package
48+
49+
## Options:
50+
51+
### Navigator props
52+
53+
54+
<table>
55+
<thead>
56+
<tr>
57+
<th>prop</th>
58+
<th>type</th>
59+
<th>required</th>
60+
<th>defult</th>
61+
<th>node</th>
62+
</tr>
63+
</thead>
64+
<tbody>
65+
<tr>
66+
<td>onRef</td>
67+
<td></td>
68+
<td>required</td>
69+
<td>-</td>
70+
<td> onRef={ref => (this.navigatorRef = ref)} </td>
71+
</tr>
72+
<tr>
73+
<td>key</td>
74+
<td>string</td>
75+
<td>required</td>
76+
<td>-</td>
77+
<td></td>
78+
</tr>
79+
<tr>
80+
<td>height</td>
81+
<td>string or integer</td>
82+
<td>optional</td>
83+
<td>"100%"</td>
84+
<td></td>
85+
</tr>
86+
<tr>
87+
<td>onChangePage</td>
88+
<td>function</td>
89+
<td>optional</td>
90+
<td>-</td>
91+
<td>(nowPageKey,levelAction) => { ... }</td>
92+
</tr>
93+
<tr>
94+
<td>beforChangePage</td>
95+
<td>function</td>
96+
<td>optional</td>
97+
<td>-</td>
98+
<td>(goToPageKey,levelAction) => { ... }</td>
99+
</tr>
100+
<tr>
101+
<tr>
102+
<td>changeRoute</td>
103+
<td>boolean</td>
104+
<td>optional</td>
105+
<td>true (on cordova native platforms => false)</td>
106+
<td>Determines whether to change the URL to the component key</td>
107+
</tr>
108+
<td>homePageKey</td>
109+
<td>string</td>
110+
<td>optional</td>
111+
<td>The key of the first child</td>
112+
<td>(nowPageKey,levelAction) => { ... }</td>
113+
</tr>
114+
</tbody>
115+
</table>
116+
*levelAction return "Out" or "In" or "SameLevel"
117+
118+
119+
120+
### Child props
121+
122+
123+
<table>
124+
<thead>
125+
<tr>
126+
<th>prop</th>
127+
<th>type</th>
128+
<th>required</th>
129+
<th>defult</th>
130+
<th>node</th>
131+
</tr>
132+
</thead>
133+
<tbody>
134+
<tr>
135+
<td>levelPage</td>
136+
<td>integer</td>
137+
<td>required</td>
138+
<td>-</td>
139+
<td>important!</td>
140+
</tr>
141+
<tr>
142+
<td>backgroundColor</td>
143+
<td>string</td>
144+
<td>optional</td>
145+
<td>#fff</td>
146+
<td></td>
147+
</tr>
148+
<tr>
149+
<td>height</td>
150+
<td>string or integer</td>
151+
<td>optional</td>
152+
<td>"100%"</td>
153+
<td></td>
154+
</tr>
155+
<tr>
156+
<td>backOnSwipeRight</td>
157+
<td>boolean</td>
158+
<td>optional</td>
159+
<td>false</td>
160+
<td>May be problematic with css "padding-left" </td>
161+
</tr>
162+
<tr>
163+
<td>alwaysLive</td>
164+
<td>boolean</td>
165+
<td>optional</td>
166+
<td>false</td>
167+
<td>Don't kill the child. Life is always in the background</td>
168+
</tr>
169+
170+
</tbody>
171+
</table>
172+
173+
174+
#### Check what is page now
175+
```
176+
const nowPage= this.navigatorRef.nowPage;
177+
```
178+
#### Get the historyPages list
179+
```
180+
const historyPages= this.navigatorRef.historyPages();
181+
```
182+
183+
#### Get the listLevelPages list
184+
```
185+
const listLevelPages= this.navigatorRef.listLevelPages();
186+
```
187+
#### Back 1 page history
188+
```
189+
this.navigatorRef.back();
190+
```
191+
or
192+
```
193+
this.navigatorRef.back({options...});
194+
```
195+
options => { animationIn:integer // have defult , animationOut:string // have defult , timeAnimationInMS:integer // defult=250(ms) , callbackFun:function , props:{...} }
196+
197+
198+
#### Check if the mangerPages is busy
199+
```
200+
const navigator_busy= this.navigatorRef.busy;
201+
```
202+
*busy return boolean
203+
<br><br><br>
204+
205+
206+
207+
## If you have any problem, please let us know [here](https://github.com/orchoban/react.cordova-navigation_controller/issues), and we will make an effort to resolve it soon
208+
## Feel free to editing the code yourself: go to [src/index.js](https://github.com/orchoban/react.cordova-navigation_controller/blob/master/src/index.js)
209+
210+
211+
212+
213+
Credit:
214+
Arik Wald
215+
<br><br>
216+
Credit animated:
217+
***animate.css -https://daneden.github.io/animate.css/***

dist/corodva_URL

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)