@frontegg/react-hooks 7.90.0 → 7.92.0

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.
@@ -0,0 +1,5 @@
1
+ import { ApprovalFlowState, ApprovalFlowActions } from '@frontegg/redux-store';
2
+ export type ApprovalFlowStateMapper<S> = (state: ApprovalFlowState) => S;
3
+ export declare function useApprovalFlowState(): ApprovalFlowState;
4
+ export declare function useApprovalFlowState<S>(stateMapper: ApprovalFlowStateMapper<S>): S;
5
+ export declare const useApprovalFlowActions: () => ApprovalFlowActions;
@@ -0,0 +1,10 @@
1
+ import { useStore } from '../FronteggStoreContext';
2
+ import { useSnapshot } from '../useSnapshot';
3
+ const defaultMapper = state => state;
4
+ export function useApprovalFlowState(stateMapper = defaultMapper) {
5
+ const state = useStore().store.auth.approvalFlowState;
6
+ return stateMapper(useSnapshot(state));
7
+ }
8
+ export const useApprovalFlowActions = () => {
9
+ return useStore().stateActions.auth.approvalFlowActions;
10
+ };
package/auth/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { useAuthState, useAuth, useAuthActions, useOnRedirectTo, useAuthRoutes,
2
2
  export * from './acceptInvitation';
3
3
  export * from './unlockAccount';
4
4
  export * from './activateAccount';
5
+ export * from './approvalFlow';
5
6
  export * from './allAccounts';
6
7
  export * from './apiTokens';
7
8
  export * from './customLogin';
package/auth/index.js CHANGED
@@ -2,6 +2,7 @@ export { useAuthState, useAuth, useAuthActions, useOnRedirectTo, useAuthRoutes,
2
2
  export * from './acceptInvitation';
3
3
  export * from './unlockAccount';
4
4
  export * from './activateAccount';
5
+ export * from './approvalFlow';
5
6
  export * from './allAccounts';
6
7
  export * from './apiTokens';
7
8
  export * from './customLogin';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.90.0
1
+ /** @license Frontegg v7.92.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useApprovalFlowActions = void 0;
7
+ exports.useApprovalFlowState = useApprovalFlowState;
8
+ var _FronteggStoreContext = require("../FronteggStoreContext");
9
+ var _useSnapshot = require("../useSnapshot");
10
+ const defaultMapper = state => state;
11
+ function useApprovalFlowState(stateMapper = defaultMapper) {
12
+ const state = (0, _FronteggStoreContext.useStore)().store.auth.approvalFlowState;
13
+ return stateMapper((0, _useSnapshot.useSnapshot)(state));
14
+ }
15
+ const useApprovalFlowActions = () => {
16
+ return (0, _FronteggStoreContext.useStore)().stateActions.auth.approvalFlowActions;
17
+ };
18
+ exports.useApprovalFlowActions = useApprovalFlowActions;
@@ -119,6 +119,18 @@ Object.keys(_activateAccount).forEach(function (key) {
119
119
  }
120
120
  });
121
121
  });
122
+ var _approvalFlow = require("./approvalFlow");
123
+ Object.keys(_approvalFlow).forEach(function (key) {
124
+ if (key === "default" || key === "__esModule") return;
125
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
126
+ if (key in exports && exports[key] === _approvalFlow[key]) return;
127
+ Object.defineProperty(exports, key, {
128
+ enumerable: true,
129
+ get: function () {
130
+ return _approvalFlow[key];
131
+ }
132
+ });
133
+ });
122
134
  var _allAccounts = require("./allAccounts");
123
135
  Object.keys(_allAccounts).forEach(function (key) {
124
136
  if (key === "default" || key === "__esModule") return;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.90.0
1
+ /** @license Frontegg v7.92.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/react-hooks",
3
- "version": "7.90.0",
3
+ "version": "7.92.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.18.6",
9
- "@frontegg/redux-store": "7.90.0",
10
- "@frontegg/types": "7.90.0",
9
+ "@frontegg/redux-store": "7.92.0",
10
+ "@frontegg/types": "7.92.0",
11
11
  "@types/react": "*",
12
12
  "@types/react-is": "^17.0.7",
13
13
  "get-value": "^3.0.1",