@frontegg/react-hooks 6.143.0-alpha.5 → 6.143.0-alpha.6
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 +1 -0
- package/auth/index.js +2 -1
- package/auth/sms.d.ts +6 -0
- package/auth/sms.js +7 -0
- package/index.js +1 -1
- package/node/auth/index.js +12 -0
- package/node/auth/sms.js +15 -0
- package/node/index.js +1 -1
- package/package.json +3 -3
package/auth/index.d.ts
CHANGED
package/auth/index.js
CHANGED
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
package/node/auth/index.js
CHANGED
|
@@ -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
|
});
|
package/node/auth/sms.js
ADDED
|
@@ -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
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "6.143.0-alpha.
|
|
3
|
+
"version": "6.143.0-alpha.6",
|
|
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.143.0-alpha.
|
|
10
|
-
"@frontegg/types": "6.143.0-alpha.
|
|
9
|
+
"@frontegg/redux-store": "6.143.0-alpha.6",
|
|
10
|
+
"@frontegg/types": "6.143.0-alpha.6",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"react-redux": "^7.x"
|