@frontegg/react-hooks 7.67.0 → 7.68.0-alpha.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.
package/auth/hooks.d.ts CHANGED
@@ -93,3 +93,4 @@ export declare const useAuthUser: () => User;
93
93
  * Use this `frontegg` hook function to retrieve the authenticated user. If the user is not authenticated, this hook will return null. To redirect the user to the login page in case they are not authenticated, use the `useAuthUser` method.
94
94
  */
95
95
  export declare const useAuthUserOrNull: () => User | null;
96
+ export declare const useStoreActions: () => import("@frontegg/redux-store").FronteggActions;
package/auth/hooks.js CHANGED
@@ -161,4 +161,8 @@ export const useAuthUserOrNull = () => {
161
161
  user
162
162
  } = useAuth();
163
163
  return user || null;
164
+ };
165
+ export const useStoreActions = () => {
166
+ const store = useStore();
167
+ return store.actions;
164
168
  };
package/auth/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { useAuthState, useAuth, useAuthActions, useOnRedirectTo, useAuthRoutes, useIsAuthenticated, useAuthUser, useAuthUserOrNull, useLoginWithRedirect, useLoginWithRedirectV2, } from './hooks';
1
+ export { useAuthState, useAuth, useAuthActions, useOnRedirectTo, useAuthRoutes, useIsAuthenticated, useAuthUser, useAuthUserOrNull, useLoginWithRedirect, useLoginWithRedirectV2, useStoreActions, } from './hooks';
2
2
  export * from './acceptInvitation';
3
3
  export * from './unlockAccount';
4
4
  export * from './activateAccount';
package/auth/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { useAuthState, useAuth, useAuthActions, useOnRedirectTo, useAuthRoutes, useIsAuthenticated, useAuthUser, useAuthUserOrNull, useLoginWithRedirect, useLoginWithRedirectV2 } from './hooks';
1
+ export { useAuthState, useAuth, useAuthActions, useOnRedirectTo, useAuthRoutes, useIsAuthenticated, useAuthUser, useAuthUserOrNull, useLoginWithRedirect, useLoginWithRedirectV2, useStoreActions } from './hooks';
2
2
  export * from './acceptInvitation';
3
3
  export * from './unlockAccount';
4
4
  export * from './activateAccount';
@@ -67,10 +67,13 @@ export const CustomComponentRegister = ({
67
67
  return [];
68
68
  }
69
69
  const loop = (key, obj, keyPath) => {
70
+ if (key === 'overrideSignupFields') {
71
+ return [];
72
+ }
70
73
  if (typeof obj !== 'object' && typeof obj !== 'function') {
71
74
  return [];
72
75
  }
73
- if (typeof obj === 'function') {
76
+ if (typeof obj === 'function' && key) {
74
77
  try {
75
78
  const reactElement = /*#__PURE__*/React.createElement(obj, {
76
79
  title: 'title'
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.67.0
1
+ /** @license Frontegg v7.68.0-alpha.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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useAuth = useAuth;
7
7
  exports.useAuthRoutes = exports.useAuthActions = void 0;
8
8
  exports.useAuthState = useAuthState;
9
- exports.useOnRedirectTo = exports.useLoginWithRedirectV2 = exports.useLoginWithRedirect = exports.useIsAuthenticated = exports.useAuthUserOrNull = exports.useAuthUser = void 0;
9
+ exports.useStoreActions = exports.useOnRedirectTo = exports.useLoginWithRedirectV2 = exports.useLoginWithRedirect = exports.useIsAuthenticated = exports.useAuthUserOrNull = exports.useAuthUser = void 0;
10
10
  var _react = require("react");
11
11
  var _restApi = require("@frontegg/rest-api");
12
12
  var _FronteggStoreContext = require("../FronteggStoreContext");
@@ -178,4 +178,9 @@ const useAuthUserOrNull = () => {
178
178
  } = useAuth();
179
179
  return user || null;
180
180
  };
181
- exports.useAuthUserOrNull = useAuthUserOrNull;
181
+ exports.useAuthUserOrNull = useAuthUserOrNull;
182
+ const useStoreActions = () => {
183
+ const store = (0, _FronteggStoreContext.useStore)();
184
+ return store.actions;
185
+ };
186
+ exports.useStoreActions = useStoreActions;
@@ -13,7 +13,8 @@ var _exportNames = {
13
13
  useAuthUser: true,
14
14
  useAuthUserOrNull: true,
15
15
  useLoginWithRedirect: true,
16
- useLoginWithRedirectV2: true
16
+ useLoginWithRedirectV2: true,
17
+ useStoreActions: true
17
18
  };
18
19
  Object.defineProperty(exports, "useAuth", {
19
20
  enumerable: true,
@@ -75,6 +76,12 @@ Object.defineProperty(exports, "useOnRedirectTo", {
75
76
  return _hooks.useOnRedirectTo;
76
77
  }
77
78
  });
79
+ Object.defineProperty(exports, "useStoreActions", {
80
+ enumerable: true,
81
+ get: function () {
82
+ return _hooks.useStoreActions;
83
+ }
84
+ });
78
85
  var _hooks = require("./hooks");
79
86
  var _acceptInvitation = require("./acceptInvitation");
80
87
  Object.keys(_acceptInvitation).forEach(function (key) {
@@ -75,10 +75,13 @@ const CustomComponentRegister = ({
75
75
  return [];
76
76
  }
77
77
  const loop = (key, obj, keyPath) => {
78
+ if (key === 'overrideSignupFields') {
79
+ return [];
80
+ }
78
81
  if (typeof obj !== 'object' && typeof obj !== 'function') {
79
82
  return [];
80
83
  }
81
- if (typeof obj === 'function') {
84
+ if (typeof obj === 'function' && key) {
82
85
  try {
83
86
  const reactElement = /*#__PURE__*/_react.default.createElement(obj, {
84
87
  title: 'title'
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.67.0
1
+ /** @license Frontegg v7.68.0-alpha.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.67.0",
3
+ "version": "7.68.0-alpha.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.67.0",
10
- "@frontegg/types": "7.67.0",
9
+ "@frontegg/redux-store": "7.68.0-alpha.0",
10
+ "@frontegg/types": "7.68.0-alpha.0",
11
11
  "@types/react": "*",
12
12
  "@types/react-is": "^17.0.7",
13
13
  "get-value": "^3.0.1",