@quiltt/react-native 3.6.7 → 3.6.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/CHANGELOG.md +20 -0
- package/README.md +2 -2
- package/dist/index.cjs +21 -16
- package/dist/index.js +21 -16
- package/package.json +3 -3
- package/src/components/QuilttConnector.tsx +21 -12
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @quiltt/react-native
|
|
2
2
|
|
|
3
|
+
## 3.6.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#260](https://github.com/quiltt/quiltt-js/pull/260) [`6e80930`](https://github.com/quiltt/quiltt-js/commit/6e80930f84013f483e2c75fcb37a28dc4996dadc) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Refactor QuilttConnector to remove URL allow list
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`6e80930`](https://github.com/quiltt/quiltt-js/commit/6e80930f84013f483e2c75fcb37a28dc4996dadc)]:
|
|
10
|
+
- @quiltt/core@3.6.9
|
|
11
|
+
- @quiltt/react@3.6.9
|
|
12
|
+
|
|
13
|
+
## 3.6.8
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#258](https://github.com/quiltt/quiltt-js/pull/258) [`dc97e95`](https://github.com/quiltt/quiltt-js/commit/dc97e95dfa73bc1ccf09add6af70e4f95a458fab) Thanks [@rubendinho](https://github.com/rubendinho)! - Add URLs to WebView allowList
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`dc97e95`](https://github.com/quiltt/quiltt-js/commit/dc97e95dfa73bc1ccf09add6af70e4f95a458fab)]:
|
|
20
|
+
- @quiltt/core@3.6.8
|
|
21
|
+
- @quiltt/react@3.6.8
|
|
22
|
+
|
|
3
23
|
## 3.6.7
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -27,11 +27,11 @@ Launch the [Quiltt Connector](https://www.quiltt.dev/connector) in a webview.
|
|
|
27
27
|
|
|
28
28
|
`@quiltt/react-native` does not include any navigation library, you might want to navigate to a new "page" when using QuilttConnector to get the best result.
|
|
29
29
|
|
|
30
|
-
For simple usage of `react-navigation`, please see [App.tsx](examples/expo/App.tsx) and [ConnectorScreen.tsx](examples/expo/screens/ConnectorScreen.tsx).
|
|
30
|
+
For simple usage of `react-navigation`, please see [App.tsx](../../examples/react-native-expo/App.tsx) and [ConnectorScreen.tsx](../../examples/react-native-expo/screens/ConnectorScreen.tsx).
|
|
31
31
|
|
|
32
32
|
#### Example
|
|
33
33
|
|
|
34
|
-
```
|
|
34
|
+
```tsx
|
|
35
35
|
import { useState } from 'react'
|
|
36
36
|
import { QuilttProvider } from '@quiltt/react'
|
|
37
37
|
import { QuilttConnector } from '@quiltt/react-native'
|
package/dist/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ var reactNative = require('react-native');
|
|
|
11
11
|
var util = require('@honeybadger-io/core/build/src/util');
|
|
12
12
|
|
|
13
13
|
// Generated by genversion.
|
|
14
|
-
const version = '3.6.
|
|
14
|
+
const version = '3.6.9';
|
|
15
15
|
|
|
16
16
|
const AndroidSafeAreaView = ({ testId, children })=>/*#__PURE__*/ jsxRuntime.jsx(reactNative.SafeAreaView, {
|
|
17
17
|
testID: testId,
|
|
@@ -319,25 +319,30 @@ const QuilttConnector = ({ testId, connectorId, connectionId, institution, oauth
|
|
|
319
319
|
institution,
|
|
320
320
|
session?.token
|
|
321
321
|
]);
|
|
322
|
-
//
|
|
323
|
-
// For other urls, we assume those are bank urls, which
|
|
324
|
-
// TODO:
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
322
|
+
// urlAllowList & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
|
|
323
|
+
// For other urls, we assume those are bank urls, which need to be handled in external browser.
|
|
324
|
+
// TODO: Need to regroup on this and figure out a better way to handle a URL allow list
|
|
325
|
+
// const urlAllowList = useMemo(
|
|
326
|
+
// () => [
|
|
327
|
+
// 'quiltt.io',
|
|
328
|
+
// 'quiltt.app',
|
|
329
|
+
// 'quiltt.dev',
|
|
330
|
+
// 'moneydesktop.com',
|
|
331
|
+
// 'plaid.com',
|
|
332
|
+
// 'https://cdn.plaid.com/link',
|
|
333
|
+
// 'https://www.google.com/recaptcha',
|
|
334
|
+
// 'https://challenges.cloudflare.com',
|
|
335
|
+
// 'https://api.stripe.com',
|
|
336
|
+
// 'https://cdn.jsdelivr.net',
|
|
337
|
+
// 'https://auth0.com',
|
|
338
|
+
// ],
|
|
339
|
+
// []
|
|
340
|
+
// )
|
|
332
341
|
const isQuilttEvent = react$1.useCallback((url)=>url.protocol === 'quilttconnector:', []);
|
|
333
342
|
const shouldRender = react$1.useCallback((url)=>{
|
|
334
343
|
if (isQuilttEvent(url)) return false;
|
|
335
|
-
|
|
336
|
-
return false;
|
|
337
|
-
}
|
|
338
|
-
return allowedListUrl.some((href)=>url.href.includes(href));
|
|
344
|
+
return url.protocol === 'https:';
|
|
339
345
|
}, [
|
|
340
|
-
allowedListUrl,
|
|
341
346
|
isQuilttEvent
|
|
342
347
|
]);
|
|
343
348
|
const clearLocalStorage = ()=>{
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { StyleSheet, Platform, StatusBar, SafeAreaView, View, Text, Pressable, A
|
|
|
10
10
|
import { generateStackTrace, makeBacktrace, getCauses } from '@honeybadger-io/core/build/src/util';
|
|
11
11
|
|
|
12
12
|
// Generated by genversion.
|
|
13
|
-
const version = '3.6.
|
|
13
|
+
const version = '3.6.9';
|
|
14
14
|
|
|
15
15
|
const AndroidSafeAreaView = ({ testId, children })=>/*#__PURE__*/ jsx(SafeAreaView, {
|
|
16
16
|
testID: testId,
|
|
@@ -318,25 +318,30 @@ const QuilttConnector = ({ testId, connectorId, connectionId, institution, oauth
|
|
|
318
318
|
institution,
|
|
319
319
|
session?.token
|
|
320
320
|
]);
|
|
321
|
-
//
|
|
322
|
-
// For other urls, we assume those are bank urls, which
|
|
323
|
-
// TODO:
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
321
|
+
// urlAllowList & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
|
|
322
|
+
// For other urls, we assume those are bank urls, which need to be handled in external browser.
|
|
323
|
+
// TODO: Need to regroup on this and figure out a better way to handle a URL allow list
|
|
324
|
+
// const urlAllowList = useMemo(
|
|
325
|
+
// () => [
|
|
326
|
+
// 'quiltt.io',
|
|
327
|
+
// 'quiltt.app',
|
|
328
|
+
// 'quiltt.dev',
|
|
329
|
+
// 'moneydesktop.com',
|
|
330
|
+
// 'plaid.com',
|
|
331
|
+
// 'https://cdn.plaid.com/link',
|
|
332
|
+
// 'https://www.google.com/recaptcha',
|
|
333
|
+
// 'https://challenges.cloudflare.com',
|
|
334
|
+
// 'https://api.stripe.com',
|
|
335
|
+
// 'https://cdn.jsdelivr.net',
|
|
336
|
+
// 'https://auth0.com',
|
|
337
|
+
// ],
|
|
338
|
+
// []
|
|
339
|
+
// )
|
|
331
340
|
const isQuilttEvent = useCallback((url)=>url.protocol === 'quilttconnector:', []);
|
|
332
341
|
const shouldRender = useCallback((url)=>{
|
|
333
342
|
if (isQuilttEvent(url)) return false;
|
|
334
|
-
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
return allowedListUrl.some((href)=>url.href.includes(href));
|
|
343
|
+
return url.protocol === 'https:';
|
|
338
344
|
}, [
|
|
339
|
-
allowedListUrl,
|
|
340
345
|
isQuilttEvent
|
|
341
346
|
]);
|
|
342
347
|
const clearLocalStorage = ()=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiltt/react-native",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.9",
|
|
4
4
|
"description": "React Native components for Quiltt Connector",
|
|
5
5
|
"homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/react-native#readme",
|
|
6
6
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@honeybadger-io/core": "6.6.0",
|
|
30
|
-
"@quiltt/core": "3.6.
|
|
31
|
-
"@quiltt/react": "3.6.
|
|
30
|
+
"@quiltt/core": "3.6.9",
|
|
31
|
+
"@quiltt/react": "3.6.9"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@apollo/client": "3.9.9",
|
|
@@ -86,25 +86,34 @@ const QuilttConnector = ({
|
|
|
86
86
|
webViewRef.current?.injectJavaScript(script)
|
|
87
87
|
}, [connectionId, connectorId, institution, session?.token])
|
|
88
88
|
|
|
89
|
-
//
|
|
90
|
-
// For other urls, we assume those are bank urls, which
|
|
91
|
-
// TODO:
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
// urlAllowList & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
|
|
90
|
+
// For other urls, we assume those are bank urls, which need to be handled in external browser.
|
|
91
|
+
// TODO: Need to regroup on this and figure out a better way to handle a URL allow list
|
|
92
|
+
// const urlAllowList = useMemo(
|
|
93
|
+
// () => [
|
|
94
|
+
// 'quiltt.io',
|
|
95
|
+
// 'quiltt.app',
|
|
96
|
+
// 'quiltt.dev',
|
|
97
|
+
// 'moneydesktop.com',
|
|
98
|
+
// 'plaid.com',
|
|
99
|
+
// 'https://cdn.plaid.com/link',
|
|
100
|
+
// 'https://www.google.com/recaptcha',
|
|
101
|
+
// 'https://challenges.cloudflare.com',
|
|
102
|
+
// 'https://api.stripe.com',
|
|
103
|
+
// 'https://cdn.jsdelivr.net',
|
|
104
|
+
// 'https://auth0.com',
|
|
105
|
+
// ],
|
|
106
|
+
// []
|
|
107
|
+
// )
|
|
96
108
|
|
|
97
109
|
const isQuilttEvent = useCallback((url: URL) => url.protocol === 'quilttconnector:', [])
|
|
98
110
|
|
|
99
111
|
const shouldRender = useCallback(
|
|
100
112
|
(url: URL) => {
|
|
101
113
|
if (isQuilttEvent(url)) return false
|
|
102
|
-
|
|
103
|
-
return false
|
|
104
|
-
}
|
|
105
|
-
return allowedListUrl.some((href) => url.href.includes(href))
|
|
114
|
+
return url.protocol === 'https:'
|
|
106
115
|
},
|
|
107
|
-
[
|
|
116
|
+
[isQuilttEvent]
|
|
108
117
|
)
|
|
109
118
|
|
|
110
119
|
const clearLocalStorage = () => {
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '3.6.
|
|
2
|
+
export const version = '3.6.9'
|