@quiltt/react 3.9.2 → 3.9.4
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 -0
- package/dist/index.d.ts +6 -7
- package/dist/index.js +1 -1
- package/dist/{useQuilttConnector-client-BPcRwcNX.js → useQuilttConnector-client-CDNsqITk.js} +2 -2
- package/dist/{useScript-client-Cx5nb9RW.js → useScript-client-CWRBlZBC.js} +0 -3
- package/package.json +6 -6
- package/src/components/QuilttButton.tsx +5 -5
- package/src/components/QuilttContainer.tsx +4 -4
- package/src/types.ts +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @quiltt/react
|
|
2
2
|
|
|
3
|
+
## 3.9.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#321](https://github.com/quiltt/quiltt-js/pull/321) [`642ec0f`](https://github.com/quiltt/quiltt-js/commit/642ec0f34f2506672993b82785b5b5ddb5c69069) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Bugfix: iOS WebView header drag behavior and scrolling
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`642ec0f`](https://github.com/quiltt/quiltt-js/commit/642ec0f34f2506672993b82785b5b5ddb5c69069)]:
|
|
10
|
+
- @quiltt/core@3.9.4
|
|
11
|
+
|
|
12
|
+
## 3.9.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#319](https://github.com/quiltt/quiltt-js/pull/319) [`b97a814`](https://github.com/quiltt/quiltt-js/commit/b97a814b87b8bfec9f8b4bb155e1140724e441eb) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Improve typings for query client and react components
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`b97a814`](https://github.com/quiltt/quiltt-js/commit/b97a814b87b8bfec9f8b4bb155e1140724e441eb)]:
|
|
19
|
+
- @quiltt/core@3.9.3
|
|
20
|
+
|
|
3
21
|
## 3.9.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Maybe, QuilttJWT, UsernamePayload, UnprocessableData, AuthAPI, PasscodePayload, ConnectorSDKConnectorOptions, ConnectorSDKCallbacks } from '@quiltt/core';
|
|
2
2
|
export * from '@quiltt/core';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { RefObject, useLayoutEffect, Dispatch, SetStateAction, FC, PropsWithChildren,
|
|
4
|
+
import { RefObject, useLayoutEffect, Dispatch, SetStateAction, FC, PropsWithChildren, JSX, ComponentType, ElementType, MouseEvent } from 'react';
|
|
5
5
|
import { useApolloClient } from '@apollo/client/react/hooks/useApolloClient.js';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -132,10 +132,9 @@ type QuilttSettingsProviderProps = PropsWithChildren & {
|
|
|
132
132
|
};
|
|
133
133
|
declare const QuilttSettingsProvider: FC<QuilttSettingsProviderProps>;
|
|
134
134
|
|
|
135
|
-
type AnyTag = string | FC<any> | (new (props: any) => Component);
|
|
136
135
|
type PropsOf<Tag> = Tag extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[Tag] : Tag extends ComponentType<infer Props> ? Props & JSX.IntrinsicAttributes : never;
|
|
137
136
|
|
|
138
|
-
type BaseQuilttButtonProps<T extends
|
|
137
|
+
type BaseQuilttButtonProps<T extends ElementType> = {
|
|
139
138
|
as?: T;
|
|
140
139
|
connectorId: string;
|
|
141
140
|
connectionId?: string;
|
|
@@ -146,10 +145,10 @@ type QuilttCallbackProps = Omit<ConnectorSDKCallbacks, 'onLoad'> & {
|
|
|
146
145
|
onLoad?: ConnectorSDKCallbacks['onLoad'];
|
|
147
146
|
onHtmlLoad?: React.ReactEventHandler<HTMLElement>;
|
|
148
147
|
};
|
|
149
|
-
type QuilttButtonProps<T extends
|
|
150
|
-
declare const QuilttButton: <T extends
|
|
148
|
+
type QuilttButtonProps<T extends ElementType> = PropsWithChildren<BaseQuilttButtonProps<T> & QuilttCallbackProps>;
|
|
149
|
+
declare const QuilttButton: <T extends ElementType = "button">({ as, connectorId, connectionId, institution, onEvent, onOpen, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, onClick, onHtmlLoad, children, ...props }: QuilttButtonProps<T> & PropsOf<T>) => react_jsx_runtime.JSX.Element;
|
|
151
150
|
|
|
152
|
-
type QuilttContainerProps<T extends
|
|
151
|
+
type QuilttContainerProps<T extends ElementType> = PropsWithChildren<{
|
|
153
152
|
as?: T;
|
|
154
153
|
connectorId: string;
|
|
155
154
|
connectionId?: string;
|
|
@@ -158,6 +157,6 @@ type QuilttContainerProps<T extends AnyTag> = PropsWithChildren<{
|
|
|
158
157
|
* QuilttContainer uses globally shared callbacks. It's recommended you only use
|
|
159
158
|
* one Container at a time.
|
|
160
159
|
*/
|
|
161
|
-
declare const QuilttContainer: <T extends
|
|
160
|
+
declare const QuilttContainer: <T extends ElementType = "div">({ as, connectorId, connectionId, onEvent, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, children, ...props }: QuilttContainerProps<T> & PropsOf<T>) => react_jsx_runtime.JSX.Element;
|
|
162
161
|
|
|
163
162
|
export { type AuthenticateSession, type IdentifySession, type ImportSession, QuilttAuthProvider, QuilttButton, QuilttContainer, QuilttProvider, QuilttSettings, QuilttSettingsProvider, type RevokeSession, type SetSession, type UseQuilttSession, useAuthenticateSession, useEventListener, useIdentifySession, useImportSession, useIsomorphicLayoutEffect, useQuilttClient, useQuilttConnector, useQuilttSession, useQuilttSettings, useRevokeSession, useSession, useStorage };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { u as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect-clie
|
|
|
4
4
|
import { Q as QuilttAuthProvider } from './QuilttAuthProvider-client-D6Iok6TS.js';
|
|
5
5
|
export { b as useAuthenticateSession, a as useIdentifySession, u as useImportSession, c as useRevokeSession } from './QuilttAuthProvider-client-D6Iok6TS.js';
|
|
6
6
|
export { u as useQuilttClient } from './useQuilttClient-client-CAAUait1.js';
|
|
7
|
-
import { u as useQuilttConnector } from './useQuilttConnector-client-
|
|
7
|
+
import { u as useQuilttConnector } from './useQuilttConnector-client-CDNsqITk.js';
|
|
8
8
|
export { u as useQuilttSession } from './useQuilttSession-client-KZRjdl5I.js';
|
|
9
9
|
export { Q as QuilttSettings, u as useQuilttSettings } from './useQuilttSettings-client-DU_Qfc8X.js';
|
|
10
10
|
export { u as useSession } from './useSession-client-CG5lGS9F.js';
|
package/dist/{useQuilttConnector-client-BPcRwcNX.js → useQuilttConnector-client-CDNsqITk.js}
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { cdnBase } from '@quiltt/core';
|
|
4
4
|
import { u as useQuilttSession } from './useQuilttSession-client-KZRjdl5I.js';
|
|
5
|
-
import { u as useScript } from './useScript-client-
|
|
5
|
+
import { u as useScript } from './useScript-client-CWRBlZBC.js';
|
|
6
6
|
|
|
7
|
-
var version = "3.9.
|
|
7
|
+
var version = "3.9.4";
|
|
8
8
|
|
|
9
9
|
const useQuilttConnector = (connectorId, options)=>{
|
|
10
10
|
const status = useScript(`${cdnBase}/v1/connector.js?agent=react-${version}`);
|
|
@@ -73,9 +73,6 @@ function useScript(src, options) {
|
|
|
73
73
|
scriptNode.removeEventListener('load', setStateFromEvent);
|
|
74
74
|
scriptNode.removeEventListener('error', setStateFromEvent);
|
|
75
75
|
}
|
|
76
|
-
if (scriptNode && options?.removeOnUnmount) {
|
|
77
|
-
scriptNode.remove();
|
|
78
|
-
}
|
|
79
76
|
};
|
|
80
77
|
}, [
|
|
81
78
|
src,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiltt/react",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"description": "React Components and Hooks for Quiltt Connector",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"quiltt",
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
],
|
|
35
35
|
"main": "dist/index.js",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@apollo/client": "^3.
|
|
38
|
-
"@quiltt/core": "3.9.
|
|
37
|
+
"@apollo/client": "^3.12.4",
|
|
38
|
+
"@quiltt/core": "3.9.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@biomejs/biome": "1.9.4",
|
|
42
|
-
"@types/node": "22.10.
|
|
42
|
+
"@types/node": "22.10.5",
|
|
43
43
|
"@types/react": "18.3.12",
|
|
44
44
|
"@types/react-dom": "18.3.1",
|
|
45
|
-
"bunchee": "
|
|
45
|
+
"bunchee": "6.2.0",
|
|
46
46
|
"react": "18.3.1",
|
|
47
47
|
"react-dom": "18.3.1",
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
|
-
"typescript": "5.7.
|
|
49
|
+
"typescript": "5.7.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { MouseEvent, PropsWithChildren } from 'react'
|
|
1
|
+
import type { ElementType, MouseEvent, PropsWithChildren } from 'react'
|
|
2
2
|
|
|
3
3
|
import type { ConnectorSDKCallbacks } from '@quiltt/core'
|
|
4
4
|
|
|
5
5
|
import { useQuilttConnector } from '../hooks/useQuilttConnector'
|
|
6
|
-
import type {
|
|
6
|
+
import type { PropsOf } from '../types'
|
|
7
7
|
|
|
8
8
|
// Base button props without callback-specific properties
|
|
9
|
-
type BaseQuilttButtonProps<T extends
|
|
9
|
+
type BaseQuilttButtonProps<T extends ElementType> = {
|
|
10
10
|
as?: T
|
|
11
11
|
connectorId: string
|
|
12
12
|
connectionId?: string // For Reconnect Mode
|
|
@@ -23,11 +23,11 @@ type QuilttCallbackProps = Omit<ConnectorSDKCallbacks, 'onLoad'> & {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// Combined type for the full component
|
|
26
|
-
type QuilttButtonProps<T extends
|
|
26
|
+
type QuilttButtonProps<T extends ElementType> = PropsWithChildren<
|
|
27
27
|
BaseQuilttButtonProps<T> & QuilttCallbackProps
|
|
28
28
|
>
|
|
29
29
|
|
|
30
|
-
export const QuilttButton = <T extends
|
|
30
|
+
export const QuilttButton = <T extends ElementType = 'button'>({
|
|
31
31
|
as,
|
|
32
32
|
connectorId,
|
|
33
33
|
connectionId,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react'
|
|
1
|
+
import type { ElementType, PropsWithChildren } from 'react'
|
|
2
2
|
|
|
3
3
|
import type { ConnectorSDKCallbacks } from '@quiltt/core'
|
|
4
4
|
|
|
5
5
|
import { useQuilttConnector } from '../hooks/useQuilttConnector'
|
|
6
|
-
import type {
|
|
6
|
+
import type { PropsOf } from '../types'
|
|
7
7
|
|
|
8
|
-
type QuilttContainerProps<T extends
|
|
8
|
+
type QuilttContainerProps<T extends ElementType> = PropsWithChildren<
|
|
9
9
|
{
|
|
10
10
|
as?: T
|
|
11
11
|
connectorId: string
|
|
@@ -17,7 +17,7 @@ type QuilttContainerProps<T extends AnyTag> = PropsWithChildren<
|
|
|
17
17
|
* QuilttContainer uses globally shared callbacks. It's recommended you only use
|
|
18
18
|
* one Container at a time.
|
|
19
19
|
*/
|
|
20
|
-
export const QuilttContainer = <T extends
|
|
20
|
+
export const QuilttContainer = <T extends ElementType = 'div'>({
|
|
21
21
|
as,
|
|
22
22
|
connectorId,
|
|
23
23
|
connectionId,
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type AnyTag = string | FC<any> | (new (props: any) => Component)
|
|
1
|
+
import type { ComponentType, JSX } from 'react'
|
|
4
2
|
|
|
5
3
|
export type PropsOf<Tag> = Tag extends keyof JSX.IntrinsicElements
|
|
6
4
|
? JSX.IntrinsicElements[Tag]
|