@frontegg/react-hooks 6.96.0-alpha.0 → 6.96.0-alpha.2

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,6 @@
1
+ import { CustomLoginActions } from '@frontegg/redux-store';
2
+ import { CustomLoginState } from '@frontegg/types';
3
+ export declare type CustomLoginStateMapper<S> = (state: CustomLoginState) => S;
4
+ export declare function useCustomLoginState(): CustomLoginState;
5
+ export declare function useCustomLoginState<S>(stateMapper: CustomLoginStateMapper<S>): S;
6
+ export declare const useCustomLoginActions: () => CustomLoginActions;
@@ -0,0 +1,7 @@
1
+ import { customLoginActions, customLoginReducers } from '@frontegg/redux-store';
2
+ import { reducerActionsGenerator, stateHookGenerator } from './hooks';
3
+ const defaultMapper = state => state;
4
+ export function useCustomLoginState(stateMapper = defaultMapper) {
5
+ return stateHookGenerator(stateMapper, 'customLoginState');
6
+ }
7
+ export const useCustomLoginActions = () => reducerActionsGenerator(customLoginActions, customLoginReducers);
package/auth/index.d.ts CHANGED
@@ -21,3 +21,4 @@ export * from './provisioning';
21
21
  export * from './impersonate';
22
22
  export * from './passkeys';
23
23
  export * from './groups';
24
+ export * from './customLogin';
package/auth/index.js CHANGED
@@ -20,4 +20,5 @@ export * from './restrictions';
20
20
  export * from './provisioning';
21
21
  export * from './impersonate';
22
22
  export * from './passkeys';
23
- export * from './groups';
23
+ export * from './groups';
24
+ export * from './customLogin';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.96.0-alpha.0
1
+ /** @license Frontegg v6.96.0-alpha.2
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,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useCustomLoginActions = void 0;
7
+ exports.useCustomLoginState = useCustomLoginState;
8
+ var _reduxStore = require("@frontegg/redux-store");
9
+ var _hooks = require("./hooks");
10
+ const defaultMapper = state => state;
11
+ function useCustomLoginState(stateMapper = defaultMapper) {
12
+ return (0, _hooks.stateHookGenerator)(stateMapper, 'customLoginState');
13
+ }
14
+ const useCustomLoginActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.customLoginActions, _reduxStore.customLoginReducers);
15
+ exports.useCustomLoginActions = useCustomLoginActions;
@@ -325,4 +325,16 @@ Object.keys(_groups).forEach(function (key) {
325
325
  return _groups[key];
326
326
  }
327
327
  });
328
+ });
329
+ var _customLogin = require("./customLogin");
330
+ Object.keys(_customLogin).forEach(function (key) {
331
+ if (key === "default" || key === "__esModule") return;
332
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
333
+ if (key in exports && exports[key] === _customLogin[key]) return;
334
+ Object.defineProperty(exports, key, {
335
+ enumerable: true,
336
+ get: function () {
337
+ return _customLogin[key];
338
+ }
339
+ });
328
340
  });
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.96.0-alpha.0
1
+ /** @license Frontegg v6.96.0-alpha.2
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": "6.96.0-alpha.0",
3
+ "version": "6.96.0-alpha.2",
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": "6.96.0-alpha.0",
10
- "@frontegg/types": "6.96.0-alpha.0",
9
+ "@frontegg/redux-store": "6.96.0-alpha.2",
10
+ "@frontegg/types": "6.96.0-alpha.2",
11
11
  "@types/react": "*",
12
12
  "react-redux": "^7.x"
13
13
  },