@pinwheel/react-native-pinwheel 3.0.4 → 3.0.5
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/CHANGELOG.md +18 -5
- package/RNPinwheelSDK.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/underdog_tech/react/PinwheelViewManager.kt +2 -2
- package/dist/client-events/registry/v2.3.d.ts +9 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/pinwheel-wrapper.android.js +7 -2
- package/ios/RNTPinwheelView.m +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,9 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
# 3.0.x Releases
|
|
6
6
|
|
|
7
|
-
- `3.0.x` Releases - [3.0.0](#300) | [3.0.1](#301) | [3.0.2](#302) | [3.0.3](#303) | [3.0.4](#304)
|
|
7
|
+
- `3.0.x` Releases - [3.0.0](#300) | [3.0.1](#301) | [3.0.2](#302) | [3.0.3](#303) | [3.0.4](#304) | [3.0.5](#305)
|
|
8
8
|
|
|
9
9
|
---
|
|
10
|
+
|
|
11
|
+
### [3.0.5](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/3.0.5)
|
|
12
|
+
|
|
13
|
+
Expand internal functionality to support a broader range of platforms and increase conversion rate. Export `OtherEventPayload` event payload type for the `other_event` event.
|
|
14
|
+
|
|
10
15
|
### [3.0.4](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/3.0.4)
|
|
11
16
|
|
|
12
17
|
####
|
|
@@ -18,7 +23,7 @@ Changed Minimum Android SDK requirements to 22
|
|
|
18
23
|
|
|
19
24
|
### [3.0.2](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/3.0.2)
|
|
20
25
|
|
|
21
|
-
Changed Minimum Android SDK requirements to 22
|
|
26
|
+
Changed example app Minimum Android SDK requirements to 22
|
|
22
27
|
|
|
23
28
|
### [3.0.1](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/3.0.1)
|
|
24
29
|
|
|
@@ -44,16 +49,24 @@ This new major version bump introduces an updated API to support partner-based s
|
|
|
44
49
|
|
|
45
50
|
## 2.5.x Releases
|
|
46
51
|
|
|
47
|
-
[2.5.0](#250) | [2.5.1](#251) | [2.5.2](#252) | [2.5.3](#253)
|
|
52
|
+
[2.5.0](#250) | [2.5.1](#251) | [2.5.2](#252) | [2.5.3](#253) | [2.5.4](#254)
|
|
48
53
|
|
|
49
54
|
---
|
|
55
|
+
### [2.5.4](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/2.5.4)
|
|
56
|
+
|
|
57
|
+
#### Bugfix
|
|
58
|
+
Normalize event names to lower case. Event names began firing as uppercase in versions 3.0.0 and 2.5.0.
|
|
59
|
+
|
|
50
60
|
### [2.5.3](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/2.5.3)
|
|
51
61
|
|
|
52
|
-
####
|
|
53
|
-
|
|
62
|
+
#### Notes
|
|
63
|
+
|
|
64
|
+
Changed Minimum Android SDK requirements to 22
|
|
54
65
|
|
|
55
66
|
### [2.5.2](https://www.npmjs.com/package/@pinwheel/react-native-pinwheel/v/2.5.2)
|
|
56
67
|
|
|
68
|
+
#### Notes
|
|
69
|
+
|
|
57
70
|
Expand internal functionality to support a broader range of platforms and increase conversion rate.
|
|
58
71
|
|
|
59
72
|
### 2.5.1
|
package/RNPinwheelSDK.podspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = "RNPinwheelSDK"
|
|
3
|
-
s.version = "3.0.
|
|
3
|
+
s.version = "3.0.5"
|
|
4
4
|
s.summary = "React Native plugin for Pinwheel's SDK"
|
|
5
5
|
s.description = <<-DESC
|
|
6
6
|
An open source React Native plugin for calling Pinwheel's native SDKs to manage payroll data.
|
|
@@ -14,5 +14,5 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.public_header_files = 'ios/**/*.h'
|
|
15
15
|
s.requires_arc = true
|
|
16
16
|
s.dependency "React"
|
|
17
|
-
s.dependency 'PinwheelSDK', '3.0.
|
|
17
|
+
s.dependency 'PinwheelSDK', '3.0.5'
|
|
18
18
|
end
|
package/android/build.gradle
CHANGED
|
@@ -41,10 +41,10 @@ rootProject.allprojects {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
def
|
|
44
|
+
def PW_ANDROID_SDK_VERSION = '3.0.4'
|
|
45
45
|
|
|
46
46
|
dependencies {
|
|
47
|
-
def pwVersion = rootProject.hasProperty('pwVersion') ? rootProject.pwVersion :
|
|
47
|
+
def pwVersion = rootProject.hasProperty('pwVersion') ? rootProject.pwVersion : PW_ANDROID_SDK_VERSION
|
|
48
48
|
implementation 'com.facebook.react:react-native:+'
|
|
49
49
|
implementation "com.getpinwheel:pinwheel-android:$pwVersion"
|
|
50
50
|
}
|
|
@@ -158,7 +158,7 @@ class PinwheelViewManager(
|
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
this.token?.let {
|
|
161
|
-
val pinwheelFragment = PinwheelFragment.newInstance(it, "react native", "3.0.
|
|
161
|
+
val pinwheelFragment = PinwheelFragment.newInstance(it, "react native", "3.0.5")
|
|
162
162
|
pinwheelFragment.pinwheelEventListener = this
|
|
163
163
|
val activity = reactContext.currentActivity as FragmentActivity
|
|
164
164
|
activity.supportFragmentManager
|
|
@@ -206,4 +206,4 @@ class PinwheelViewManager(
|
|
|
206
206
|
private const val REACT_CLASS = "RNTPinwheel"
|
|
207
207
|
private const val COMMAND_CREATE = 1
|
|
208
208
|
}
|
|
209
|
-
}
|
|
209
|
+
}
|
|
@@ -85,6 +85,14 @@ export type ErrorEventPayload = {
|
|
|
85
85
|
message: string;
|
|
86
86
|
pendingRetry: boolean;
|
|
87
87
|
};
|
|
88
|
+
export type OtherEventPayload = {
|
|
89
|
+
name: string;
|
|
90
|
+
payload: {
|
|
91
|
+
key: string;
|
|
92
|
+
value: string;
|
|
93
|
+
type: 'string' | 'boolean' | 'number';
|
|
94
|
+
}[];
|
|
95
|
+
};
|
|
88
96
|
/**
|
|
89
97
|
* @deprecated - Use `ErrorEventPayload` instead.
|
|
90
98
|
*/
|
|
@@ -106,6 +114,7 @@ type EventPayloadAdditions = {
|
|
|
106
114
|
dd_form_download: DdFormDownloadEventPayload;
|
|
107
115
|
screen_transition: ScreenTransitionEventPayload;
|
|
108
116
|
exit: ErrorEventPayload | ExitEventPayload;
|
|
117
|
+
other_event: OtherEventPayload;
|
|
109
118
|
success: SuccessEventPayload;
|
|
110
119
|
error: ErrorEventPayload;
|
|
111
120
|
};
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -9,6 +9,7 @@ const createFragment = (viewId) => {
|
|
|
9
9
|
};
|
|
10
10
|
const RNTPinwheelView = (props) => {
|
|
11
11
|
const ref = useRef(null);
|
|
12
|
+
const eventListenerRef = useRef(null);
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
setTimeout(() => {
|
|
14
15
|
const viewId = findNodeHandle(ref.current);
|
|
@@ -18,11 +19,15 @@ const RNTPinwheelView = (props) => {
|
|
|
18
19
|
// events
|
|
19
20
|
const { RNTPinwheelEvents } = NativeModules;
|
|
20
21
|
const eventEmitter = new NativeEventEmitter(RNTPinwheelEvents);
|
|
21
|
-
|
|
22
|
+
eventListenerRef.current = eventEmitter.addListener('PINWHEEL_EVENT', (event) => {
|
|
22
23
|
props.onEvent(event);
|
|
23
24
|
});
|
|
24
25
|
}, 10);
|
|
26
|
+
return () => {
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = eventListenerRef.current) === null || _a === void 0 ? void 0 : _a.remove();
|
|
29
|
+
};
|
|
25
30
|
}, []);
|
|
26
|
-
return <RNTPinwheel {...props}
|
|
31
|
+
return <RNTPinwheel {...props} ref={ref}/>;
|
|
27
32
|
};
|
|
28
33
|
export default RNTPinwheelView;
|
package/ios/RNTPinwheelView.m
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
- (void)initPinwheelWrapperVC {
|
|
20
20
|
if (self.token != nil && self.pinwheelWrapperVC == nil) {
|
|
21
|
-
self.pinwheelWrapperVC = [[PinwheelWrapperVC alloc] initWithToken:self.token delegate:self sdk:@"react native" version: @"3.0.
|
|
21
|
+
self.pinwheelWrapperVC = [[PinwheelWrapperVC alloc] initWithToken:self.token delegate:self sdk:@"react native" version: @"3.0.5"];
|
|
22
22
|
[self addSubview:self.pinwheelWrapperVC.view];
|
|
23
23
|
}
|
|
24
24
|
}
|