plotline-engage 3.1.7 → 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.
Files changed (3) hide show
  1. package/index.d.ts +4 -3
  2. package/index.js +10 -9
  3. 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 PScrollView extends React.Component<ScrollViewProps> {
16
+ declare class ScrollView extends React.Component<ScrollViewProps> {
16
17
  }
17
18
 
18
- declare class PFlatList<T> extends React.Component<FlatListProps<T>> {
19
+ declare class FlatList<T> extends React.Component<FlatListProps<T>> {
19
20
  }
20
21
  declare const Plotline: plotline;
21
- export { PScrollView, PFlatList };
22
+ export { ScrollView, FlatList };
22
23
  export default Plotline;
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
- import { NativeModules, Platform } from 'react-native';
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
+ import React from 'react';
4
5
  const { RNPlotline } = NativeModules;
5
6
 
6
7
  class plotline {
@@ -67,7 +68,7 @@ class plotline {
67
68
 
68
69
  const Plotline = new plotline();
69
70
 
70
- const PScrollView = (props) => {
71
+ const ScrollView = (props) => {
71
72
  const handleScroll = (event) => {
72
73
  Plotline.notifyScroll();
73
74
  if (props.onScroll) {
@@ -76,13 +77,13 @@ const PScrollView = (props) => {
76
77
  };
77
78
 
78
79
  return (
79
- <ScrollView {...props} onScroll={handleScroll} scrollEventThrottle={16}>
80
+ <RNScrollView {...props} onScroll={handleScroll} scrollEventThrottle={16}>
80
81
  {props.children}
81
- </ScrollView>
82
+ </RNScrollView>
82
83
  );
83
84
  };
84
85
 
85
- const PFlatList = (props) => {
86
+ const FlatList = (props) => {
86
87
  const handleScroll = (event) => {
87
88
  Plotline.notifyScroll();
88
89
  if (props.onScroll) {
@@ -91,11 +92,11 @@ const PFlatList = (props) => {
91
92
  };
92
93
 
93
94
  return (
94
- <FlatList {...props} onScroll={handleScroll} scrollEventThrottle={16}>
95
+ <RNFlatList {...props} onScroll={handleScroll} scrollEventThrottle={16}>
95
96
  {props.children}
96
- </FlatList>
97
+ </RNFlatList>
97
98
  );
98
99
  };
99
100
 
100
101
  export default Plotline;
101
- export {PScrollView, PFlatList};
102
+ export {ScrollView, FlatList};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotline-engage",
3
- "version": "3.1.7",
3
+ "version": "3.1.9",
4
4
  "description": "React Native plugin for Plotline",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"