plotline-engage 3.1.8 → 3.1.9
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.
- package/index.d.ts +4 -3
- package/index.js +9 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScrollViewProps } from 'react-native';
|
|
2
2
|
import { FlatListProps } from 'react-native';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
|
|
4
5
|
declare class plotline {
|
|
5
6
|
track(eventName: string, properties: {[key: string]: string}): void;
|
|
@@ -12,11 +13,11 @@ declare class plotline {
|
|
|
12
13
|
debug(): void;
|
|
13
14
|
notifyScroll(): void;
|
|
14
15
|
}
|
|
15
|
-
declare class
|
|
16
|
+
declare class ScrollView extends React.Component<ScrollViewProps> {
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
declare class
|
|
19
|
+
declare class FlatList<T> extends React.Component<FlatListProps<T>> {
|
|
19
20
|
}
|
|
20
21
|
declare const Plotline: plotline;
|
|
21
|
-
export {
|
|
22
|
+
export { ScrollView, FlatList };
|
|
22
23
|
export default Plotline;
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { NativeModules
|
|
3
|
-
import { ScrollView, FlatList } from 'react-native';
|
|
2
|
+
import { NativeModules } from 'react-native';
|
|
3
|
+
import { ScrollView as RNScrollView, FlatList as RNFlatList} from 'react-native';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
const { RNPlotline } = NativeModules;
|
|
6
6
|
|
|
@@ -68,7 +68,7 @@ class plotline {
|
|
|
68
68
|
|
|
69
69
|
const Plotline = new plotline();
|
|
70
70
|
|
|
71
|
-
const
|
|
71
|
+
const ScrollView = (props) => {
|
|
72
72
|
const handleScroll = (event) => {
|
|
73
73
|
Plotline.notifyScroll();
|
|
74
74
|
if (props.onScroll) {
|
|
@@ -77,13 +77,13 @@ const PScrollView = (props) => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
|
-
<
|
|
80
|
+
<RNScrollView {...props} onScroll={handleScroll} scrollEventThrottle={16}>
|
|
81
81
|
{props.children}
|
|
82
|
-
</
|
|
82
|
+
</RNScrollView>
|
|
83
83
|
);
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
const
|
|
86
|
+
const FlatList = (props) => {
|
|
87
87
|
const handleScroll = (event) => {
|
|
88
88
|
Plotline.notifyScroll();
|
|
89
89
|
if (props.onScroll) {
|
|
@@ -92,11 +92,11 @@ const PFlatList = (props) => {
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
return (
|
|
95
|
-
<
|
|
95
|
+
<RNFlatList {...props} onScroll={handleScroll} scrollEventThrottle={16}>
|
|
96
96
|
{props.children}
|
|
97
|
-
</
|
|
97
|
+
</RNFlatList>
|
|
98
98
|
);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
export default Plotline;
|
|
102
|
-
export {
|
|
102
|
+
export {ScrollView, FlatList};
|