@frontegg/react-hooks 6.144.0 → 6.145.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/index.d.ts CHANGED
@@ -25,3 +25,4 @@ export * from './customLogin';
25
25
  export * from './MSP/allAccounts';
26
26
  export * from './entitlements';
27
27
  export * from './security/securityCenter';
28
+ export * from './sms';
package/auth/index.js CHANGED
@@ -24,4 +24,5 @@ export * from './groups';
24
24
  export * from './customLogin';
25
25
  export * from './MSP/allAccounts';
26
26
  export * from './entitlements';
27
- export * from './security/securityCenter';
27
+ export * from './security/securityCenter';
28
+ export * from './sms';
package/auth/sms.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { SmsActions, SmsState } from '@frontegg/redux-store';
2
+ declare type AuthSmsStateMapper<S> = (state: SmsState) => S;
3
+ export declare function useSmsState(): SmsState;
4
+ export declare function useSmsState<S>(stateMapper: AuthSmsStateMapper<S>): S;
5
+ export declare const useSmsActions: () => SmsActions;
6
+ export {};
package/auth/sms.js ADDED
@@ -0,0 +1,7 @@
1
+ import { smsActions, smsReducers } from '@frontegg/redux-store';
2
+ import { reducerActionsGenerator, stateHookGenerator } from './hooks';
3
+ const defaultMapper = state => state;
4
+ export function useSmsState(stateMapper = defaultMapper) {
5
+ return stateHookGenerator(stateMapper, 'smsState');
6
+ }
7
+ export const useSmsActions = () => reducerActionsGenerator(smsActions, smsReducers);
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.144.0
1
+ /** @license Frontegg v6.145.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.
@@ -373,4 +373,16 @@ Object.keys(_securityCenter).forEach(function (key) {
373
373
  return _securityCenter[key];
374
374
  }
375
375
  });
376
+ });
377
+ var _sms = require("./sms");
378
+ Object.keys(_sms).forEach(function (key) {
379
+ if (key === "default" || key === "__esModule") return;
380
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
381
+ if (key in exports && exports[key] === _sms[key]) return;
382
+ Object.defineProperty(exports, key, {
383
+ enumerable: true,
384
+ get: function () {
385
+ return _sms[key];
386
+ }
387
+ });
376
388
  });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useSmsActions = void 0;
7
+ exports.useSmsState = useSmsState;
8
+ var _reduxStore = require("@frontegg/redux-store");
9
+ var _hooks = require("./hooks");
10
+ const defaultMapper = state => state;
11
+ function useSmsState(stateMapper = defaultMapper) {
12
+ return (0, _hooks.stateHookGenerator)(stateMapper, 'smsState');
13
+ }
14
+ const useSmsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.smsActions, _reduxStore.smsReducers);
15
+ exports.useSmsActions = useSmsActions;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.144.0
1
+ /** @license Frontegg v6.145.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": "6.144.0",
3
+ "version": "6.145.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": "6.144.0",
10
- "@frontegg/types": "6.144.0",
9
+ "@frontegg/redux-store": "6.145.0-alpha.0",
10
+ "@frontegg/types": "6.145.0-alpha.0",
11
11
  "@types/react": "*",
12
12
  "get-value": "^3.0.1",
13
13
  "react-redux": "^7.x"