@quiltt/react 3.6.14 → 3.7.1

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @quiltt/react
2
2
 
3
+ ## 3.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`524a0d7`](https://github.com/quiltt/quiltt-js/commit/524a0d7f83c92648522c7712b82619fcd72e56c8) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Add missing opened Enum type
8
+
9
+ - Updated dependencies [[`524a0d7`](https://github.com/quiltt/quiltt-js/commit/524a0d7f83c92648522c7712b82619fcd72e56c8)]:
10
+ - @quiltt/core@3.7.1
11
+
12
+ ## 3.7.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#281](https://github.com/quiltt/quiltt-js/pull/281) [`0c5fd75`](https://github.com/quiltt/quiltt-js/commit/0c5fd757fa1f688f205431c21c98bb54ea6ea72a) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Add bindings for a new onOpen callback event for Connector Modals
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [[`0c5fd75`](https://github.com/quiltt/quiltt-js/commit/0c5fd757fa1f688f205431c21c98bb54ea6ea72a)]:
21
+ - @quiltt/core@3.7.0
22
+
3
23
  ## 3.6.14
4
24
 
5
25
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -138,7 +138,7 @@ type QuilttButtonProps<T extends AnyTag> = PropsWithChildren<{
138
138
  connectionId?: string;
139
139
  institution?: string;
140
140
  } & ConnectorSDKCallbacks>;
141
- declare const QuilttButton: <T extends AnyTag = "button">({ as, connectorId, connectionId, institution, onEvent, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, children, ...props }: QuilttButtonProps<T> & PropsOf<T>) => react_jsx_runtime.JSX.Element;
141
+ declare const QuilttButton: <T extends AnyTag = "button">({ as, connectorId, connectionId, institution, onEvent, onOpen, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, children, ...props }: QuilttButtonProps<T> & PropsOf<T>) => react_jsx_runtime.JSX.Element;
142
142
 
143
143
  type QuilttContainerProps<T extends AnyTag> = PropsWithChildren<{
144
144
  as?: T;
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-uO21FlYI.js';
5
5
  export { c as useAuthenticateSession, b as useIdentifySession, a as useImportSession, d as useRevokeSession } from './QuilttAuthProvider-client-uO21FlYI.js';
6
6
  export { u as useQuilttClient } from './useQuilttClient-client-4no_TYct.js';
7
- import { u as useQuilttConnector } from './useQuilttConnector-client-BJ1M8rJl.js';
7
+ import { u as useQuilttConnector } from './useQuilttConnector-client-Cdd4BzUJ.js';
8
8
  export { u as useQuilttSession } from './useQuilttSession-client-D2WZ1XHW.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';
@@ -22,11 +22,12 @@ const QuilttProvider = ({ clientId, token, children })=>{
22
22
  });
23
23
  };
24
24
 
25
- const QuilttButton = ({ as, connectorId, connectionId, institution, onEvent, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, children, ...props })=>{
25
+ const QuilttButton = ({ as, connectorId, connectionId, institution, onEvent, onOpen, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, children, ...props })=>{
26
26
  const { open } = useQuilttConnector(connectorId, {
27
27
  connectionId,
28
28
  institution,
29
29
  onEvent,
30
+ onOpen,
30
31
  onLoad,
31
32
  onExit,
32
33
  onExitSuccess,
@@ -5,7 +5,7 @@ import { u as useQuilttSession } from './useQuilttSession-client-D2WZ1XHW.js';
5
5
  import { u as useScript } from './useScript-client-Cx5nb9RW.js';
6
6
 
7
7
  // Generated by genversion.
8
- const version = '3.6.14';
8
+ const version = '3.7.1';
9
9
 
10
10
  const useQuilttConnector = (connectorId, options)=>{
11
11
  const status = useScript(`${cdnBase}/v1/connector.js?agent=react-${version}`);
@@ -49,6 +49,15 @@ const useQuilttConnector = (connectorId, options)=>{
49
49
  connector,
50
50
  options?.onEvent
51
51
  ]);
52
+ // onOpen
53
+ useEffect(()=>{
54
+ if (!connector || !options?.onOpen) return;
55
+ connector.onOpen(options.onOpen);
56
+ return ()=>connector.offOpen(options.onOpen);
57
+ }, [
58
+ connector,
59
+ options?.onOpen
60
+ ]);
52
61
  // onLoad
53
62
  useEffect(()=>{
54
63
  if (!connector || !options?.onLoad) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/react",
3
- "version": "3.6.14",
3
+ "version": "3.7.1",
4
4
  "description": "React components and hooks for Quiltt Connector",
5
5
  "keywords": [
6
6
  "quiltt",
@@ -37,7 +37,7 @@
37
37
  "CHANGELOG.md"
38
38
  ],
39
39
  "dependencies": {
40
- "@quiltt/core": "3.6.14"
40
+ "@quiltt/core": "3.7.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@apollo/client": "3.9.9",
@@ -20,6 +20,7 @@ export const QuilttButton = <T extends AnyTag = 'button'>({
20
20
  connectionId,
21
21
  institution,
22
22
  onEvent,
23
+ onOpen,
23
24
  onLoad,
24
25
  onExit,
25
26
  onExitSuccess,
@@ -32,6 +33,7 @@ export const QuilttButton = <T extends AnyTag = 'button'>({
32
33
  connectionId,
33
34
  institution,
34
35
  onEvent,
36
+ onOpen,
35
37
  onLoad,
36
38
  onExit,
37
39
  onExitSuccess,
@@ -52,6 +52,15 @@ export const useQuilttConnector = (
52
52
  return () => connector.offEvent(options.onEvent as any)
53
53
  }, [connector, options?.onEvent])
54
54
 
55
+ // onOpen
56
+ useEffect(() => {
57
+ if (!connector || !options?.onOpen) return
58
+
59
+ connector.onOpen(options.onOpen)
60
+ return () => connector.offOpen(options.onOpen as any)
61
+ }, [connector, options?.onOpen])
62
+
63
+
55
64
  // onLoad
56
65
  useEffect(() => {
57
66
  if (!connector || !options?.onLoad) return
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '3.6.14'
2
+ export const version = '3.7.1'