@pinwheel/react-native-pinwheel 3.5.2 → 3.5.3
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/android/build.gradle
CHANGED
|
@@ -89,7 +89,7 @@ class Pinwheel : FrameLayout {
|
|
|
89
89
|
Handler(Looper.getMainLooper()).post {
|
|
90
90
|
if (this.pinwheelFragment == null) {
|
|
91
91
|
this.token?.let {
|
|
92
|
-
val pinwheelFragment = PinwheelFragment.newInstanceWithAdvancedOptions(it, "react native", "3.5.
|
|
92
|
+
val pinwheelFragment = PinwheelFragment.newInstanceWithAdvancedOptions(it, "react native", "3.5.3", getReactNativeVersion(), this.handleInsets, this.useDarkMode)
|
|
93
93
|
pinwheelEventListener?.let { listener ->
|
|
94
94
|
pinwheelFragment.pinwheelEventListener = listener
|
|
95
95
|
}
|
package/ios/RTNPinwheelView.mm
CHANGED
|
@@ -74,7 +74,7 @@ using namespace facebook::react;
|
|
|
74
74
|
[[PinwheelWrapperVC alloc] initWithToken:self.token
|
|
75
75
|
delegate:self
|
|
76
76
|
sdk:@"react native"
|
|
77
|
-
version:@"3.5.
|
|
77
|
+
version:@"3.5.3"
|
|
78
78
|
useDarkMode:self.useDarkMode
|
|
79
79
|
useAppBoundDomains:NO
|
|
80
80
|
useAppBoundDomainsForNativeLink:NO];
|
|
@@ -97,8 +97,6 @@ using namespace facebook::react;
|
|
|
97
97
|
if (!self.pinwheelWrapperVC) {
|
|
98
98
|
[self initPinwheelWrapperVC];
|
|
99
99
|
}
|
|
100
|
-
} else {
|
|
101
|
-
[self cleanUpPinwheelWrapperVC];
|
|
102
100
|
}
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -239,7 +237,7 @@ Class<RCTComponentViewProtocol> RTNPinwheelCls(void) {
|
|
|
239
237
|
[[PinwheelWrapperVC alloc] initWithToken:self.token
|
|
240
238
|
delegate:self
|
|
241
239
|
sdk:@"react native"
|
|
242
|
-
version:@"3.5.
|
|
240
|
+
version:@"3.5.3"
|
|
243
241
|
useDarkMode:self.useDarkMode
|
|
244
242
|
useAppBoundDomains:NO
|
|
245
243
|
useAppBoundDomainsForNativeLink:NO];
|
|
@@ -262,8 +260,6 @@ Class<RCTComponentViewProtocol> RTNPinwheelCls(void) {
|
|
|
262
260
|
if (!self.pinwheelWrapperVC) {
|
|
263
261
|
[self initPinwheelWrapperVC];
|
|
264
262
|
}
|
|
265
|
-
} else {
|
|
266
|
-
[self cleanUpPinwheelWrapperVC];
|
|
267
263
|
}
|
|
268
264
|
}
|
|
269
265
|
|
package/package.json
CHANGED
|
@@ -1,80 +1,67 @@
|
|
|
1
1
|
import type { AdditionsType, ModificationsType, RemovalsType } from '../utils';
|
|
2
|
-
export type PinwheelErrorType =
|
|
3
|
-
| 'sandboxError'
|
|
4
|
-
| 'clientError'
|
|
5
|
-
| 'systemError'
|
|
6
|
-
| 'userActionRequired'
|
|
7
|
-
| 'platformError'
|
|
8
|
-
| 'invalidAccountsConfiguration'
|
|
9
|
-
| 'invalidUserInput'
|
|
10
|
-
| 'invalidLinkToken'
|
|
11
|
-
| 'networkError';
|
|
2
|
+
export type PinwheelErrorType = 'sandboxError' | 'clientError' | 'systemError' | 'userActionRequired' | 'platformError' | 'invalidAccountsConfiguration' | 'invalidUserInput' | 'invalidLinkToken' | 'networkError';
|
|
12
3
|
export type LinkApiJob = 'login' | 'direct_deposit_switch' | 'card_switch';
|
|
13
4
|
export type OpenEventPayload = {};
|
|
14
5
|
export type SelectEmployerEventPayload = {
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
selectedEmployerId: string;
|
|
7
|
+
selectedEmployerName: string;
|
|
17
8
|
};
|
|
18
9
|
export type SelectPlatformEventPayload = {
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
selectedPlatformId: string;
|
|
11
|
+
selectedPlatformName: string;
|
|
21
12
|
};
|
|
22
13
|
export type IncorrectPlatformGivenEventPayload = {};
|
|
23
14
|
export type LoginAttemptEventPayload = {
|
|
24
|
-
|
|
15
|
+
platformId: string;
|
|
25
16
|
};
|
|
26
17
|
export type LoginEventPayload = {
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
accountId: string;
|
|
19
|
+
platformId: string;
|
|
29
20
|
};
|
|
30
21
|
export type InputAmountEventPayload = {
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
value: number;
|
|
23
|
+
unit: '$' | '%';
|
|
33
24
|
};
|
|
34
25
|
type _PartialSwitch<T> = {
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
action: 'partial_switch';
|
|
27
|
+
allocation: T;
|
|
37
28
|
};
|
|
38
29
|
type InputAllocationPercentage = _PartialSwitch<{
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
type: 'percentage';
|
|
31
|
+
value: number;
|
|
41
32
|
}>;
|
|
42
33
|
type InputAllocationAmount = _PartialSwitch<{
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
type: 'amount';
|
|
35
|
+
value: number;
|
|
45
36
|
}>;
|
|
46
37
|
type InputAllocationRemainder = _PartialSwitch<{
|
|
47
|
-
|
|
38
|
+
type: 'remainder';
|
|
48
39
|
}>;
|
|
49
|
-
export type InputAllocationEventPayload =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
| InputAllocationRemainder
|
|
54
|
-
| InputAllocationAmount
|
|
55
|
-
| InputAllocationPercentage;
|
|
40
|
+
export type InputAllocationEventPayload = {
|
|
41
|
+
action: 'full_switch';
|
|
42
|
+
} | InputAllocationRemainder | InputAllocationAmount | InputAllocationPercentage;
|
|
56
43
|
/**
|
|
57
44
|
* @deprecated - Use `InputAllocationEventPayload` instead.
|
|
58
45
|
*/
|
|
59
46
|
export type InputAllocation = InputAllocationEventPayload;
|
|
60
47
|
export type CardSwitchBeginEventPayload = {};
|
|
61
48
|
export type DocUploadsBeginEventPayload = {
|
|
62
|
-
|
|
49
|
+
uploadedDocumentsSubmittedCount?: number;
|
|
63
50
|
};
|
|
64
51
|
export type DocUploadsSubmittedEventPayload = {
|
|
65
|
-
|
|
52
|
+
uploadedDocumentSubmittedCount: number;
|
|
66
53
|
};
|
|
67
54
|
export type DdFormBeginEventPayload = {};
|
|
68
55
|
export type DdFormCreateEventPayload = {
|
|
69
|
-
|
|
56
|
+
url: string;
|
|
70
57
|
};
|
|
71
58
|
export type DdFormDownloadEventPayload = {};
|
|
72
59
|
export type ScreenTransitionEventPayload = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
screenName: string;
|
|
61
|
+
selectedEmployerId?: string;
|
|
62
|
+
selectedEmployerName?: string;
|
|
63
|
+
selectedPlatformId?: string;
|
|
64
|
+
selectedPlatformName?: string;
|
|
78
65
|
};
|
|
79
66
|
/**
|
|
80
67
|
* @deprecated - Use `ScreenTransitionEventPayload` instead.
|
|
@@ -82,80 +69,74 @@ export type ScreenTransitionEventPayload = {
|
|
|
82
69
|
export type ScreenTransition = ScreenTransitionEventPayload;
|
|
83
70
|
export type ExitEventPayload = Record<string, never>;
|
|
84
71
|
export type SuccessEventPayload = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
accountId: string;
|
|
73
|
+
platformId: string;
|
|
74
|
+
job: LinkApiJob;
|
|
75
|
+
params?: {
|
|
76
|
+
amount?: {
|
|
77
|
+
value: number;
|
|
78
|
+
unit: '%' | '$';
|
|
79
|
+
};
|
|
92
80
|
};
|
|
93
|
-
};
|
|
94
81
|
};
|
|
95
82
|
export type ErrorEventPayload = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
83
|
+
type: PinwheelErrorType;
|
|
84
|
+
code: string;
|
|
85
|
+
message: string;
|
|
86
|
+
pendingRetry: boolean;
|
|
100
87
|
};
|
|
101
88
|
export type OtherEventPayload = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
89
|
+
name: string;
|
|
90
|
+
payload: {
|
|
91
|
+
key: string;
|
|
92
|
+
value: string;
|
|
93
|
+
type: 'string' | 'boolean' | 'number';
|
|
94
|
+
}[];
|
|
108
95
|
};
|
|
109
96
|
export type BillSwitchPayload = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
platformId: string;
|
|
98
|
+
platformName: string;
|
|
99
|
+
isGuidedSwitch: boolean;
|
|
100
|
+
isIntegratedSwitch: boolean;
|
|
101
|
+
frequency: string;
|
|
102
|
+
nextPaymentDate: string;
|
|
103
|
+
amountCents: number;
|
|
116
104
|
};
|
|
117
105
|
export type ExternalAccountConnectedPayload = {
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
institutionName: string;
|
|
107
|
+
accountName: string;
|
|
120
108
|
};
|
|
121
109
|
/**
|
|
122
110
|
* @deprecated - Use `ErrorEventPayload` instead.
|
|
123
111
|
*/
|
|
124
112
|
export type PinwheelError = ErrorEventPayload;
|
|
125
113
|
type EventPayloadAdditions = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
114
|
+
open: OpenEventPayload;
|
|
115
|
+
select_employer: SelectEmployerEventPayload;
|
|
116
|
+
select_platform: SelectPlatformEventPayload;
|
|
117
|
+
incorrect_platform_given: IncorrectPlatformGivenEventPayload;
|
|
118
|
+
login_attempt: LoginAttemptEventPayload;
|
|
119
|
+
login: LoginEventPayload;
|
|
120
|
+
input_amount: InputAmountEventPayload;
|
|
121
|
+
input_allocation: InputAllocationEventPayload;
|
|
122
|
+
card_switch_begin: CardSwitchBeginEventPayload;
|
|
123
|
+
doc_uploads_begin: DocUploadsBeginEventPayload;
|
|
124
|
+
doc_uploads_submitted: DocUploadsSubmittedEventPayload;
|
|
125
|
+
dd_form_begin: DdFormBeginEventPayload;
|
|
126
|
+
dd_form_create: DdFormCreateEventPayload;
|
|
127
|
+
dd_form_download: DdFormDownloadEventPayload;
|
|
128
|
+
screen_transition: ScreenTransitionEventPayload;
|
|
129
|
+
exit: ErrorEventPayload | ExitEventPayload;
|
|
130
|
+
other_event: OtherEventPayload;
|
|
131
|
+
success: SuccessEventPayload;
|
|
132
|
+
error: ErrorEventPayload;
|
|
133
|
+
bill_switch_success: BillSwitchPayload;
|
|
134
|
+
bill_removed: BillSwitchPayload;
|
|
135
|
+
external_account_connected: ExternalAccountConnectedPayload;
|
|
136
|
+
merchant_login_success: LoginEventPayload;
|
|
149
137
|
};
|
|
150
138
|
type EventPayloadModifications = {};
|
|
151
139
|
type EventPayloadRemovals = [];
|
|
152
|
-
export type EventPayloadMap = Omit<
|
|
153
|
-
|
|
154
|
-
ModificationsType<EventPayloadModifications>,
|
|
155
|
-
keyof RemovalsType<EventPayloadRemovals>
|
|
156
|
-
>;
|
|
157
|
-
export type EventHandler = <T extends keyof EventPayloadMap>(
|
|
158
|
-
eventName: T,
|
|
159
|
-
payload: EventPayloadMap[T]
|
|
160
|
-
) => void;
|
|
140
|
+
export type EventPayloadMap = Omit<AdditionsType<EventPayloadAdditions> & ModificationsType<EventPayloadModifications>, keyof RemovalsType<EventPayloadRemovals>>;
|
|
141
|
+
export type EventHandler = <T extends keyof EventPayloadMap>(eventName: T, payload: EventPayloadMap[T]) => void;
|
|
161
142
|
export {};
|
|
@@ -126,7 +126,8 @@ export type OtherEventPayload = {
|
|
|
126
126
|
export type BillSwitchPayload = {
|
|
127
127
|
platformId: string;
|
|
128
128
|
platformName: string;
|
|
129
|
-
isGuidedSwitch: boolean;
|
|
129
|
+
isGuidedSwitch: boolean; // deprecated: will be removed in future version
|
|
130
|
+
isIntegratedSwitch: boolean;
|
|
130
131
|
frequency: string;
|
|
131
132
|
nextPaymentDate: string;
|
|
132
133
|
amountCents: number;
|