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