@frontegg/react-hooks 6.102.0 → 6.103.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/MSP/allAccounts.d.ts +9 -0
- package/auth/MSP/allAccounts.js +15 -0
- package/auth/index.d.ts +1 -0
- package/auth/index.js +2 -1
- package/index.js +1 -1
- package/node/auth/MSP/allAccounts.js +24 -0
- package/node/auth/index.js +12 -0
- package/node/index.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAllAccountsState, AllAccountsActions, IAllAccountsDialogsState, AllAccountsDialogsActions } from '@frontegg/redux-store';
|
|
2
|
+
export declare type AllAccountsStateMapper<S> = (state: IAllAccountsState) => S;
|
|
3
|
+
export declare function useAllAccountsState(): IAllAccountsState;
|
|
4
|
+
export declare function useAllAccountsState<S>(stateMapper: AllAccountsStateMapper<S>): S;
|
|
5
|
+
export declare const useAllAccountsActions: () => AllAccountsActions;
|
|
6
|
+
export declare type AllAccountsDialogsStateMapper<S> = (state: IAllAccountsDialogsState) => S;
|
|
7
|
+
export declare function useAllAccountsDialogsState(): IAllAccountsDialogsState;
|
|
8
|
+
export declare function useAllAccountsDialogsState<S>(stateMapper: AllAccountsDialogsStateMapper<S>): S;
|
|
9
|
+
export declare const useAllAccountsDialogsActions: () => AllAccountsDialogsActions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { allAccountsActions, allAccountsReducers, allAccountsDialogsReducers } from '@frontegg/redux-store';
|
|
2
|
+
import { reducerActionsGenerator, stateHookGenerator } from '../hooks';
|
|
3
|
+
const defaultMapper = state => state;
|
|
4
|
+
export function useAllAccountsState(stateMapper = defaultMapper) {
|
|
5
|
+
return stateHookGenerator(stateMapper, 'allAccountsState');
|
|
6
|
+
}
|
|
7
|
+
export const useAllAccountsActions = () => reducerActionsGenerator(allAccountsActions, allAccountsReducers);
|
|
8
|
+
|
|
9
|
+
//dialogs
|
|
10
|
+
|
|
11
|
+
const defaultDialogsMapper = state => state;
|
|
12
|
+
export function useAllAccountsDialogsState(stateMapper = defaultDialogsMapper) {
|
|
13
|
+
return stateHookGenerator(stateMapper, 'allAccountsDialogsState');
|
|
14
|
+
}
|
|
15
|
+
export const useAllAccountsDialogsActions = () => reducerActionsGenerator({}, allAccountsDialogsReducers);
|
package/auth/index.d.ts
CHANGED
package/auth/index.js
CHANGED
package/index.js
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useAllAccountsDialogsActions = exports.useAllAccountsActions = void 0;
|
|
7
|
+
exports.useAllAccountsDialogsState = useAllAccountsDialogsState;
|
|
8
|
+
exports.useAllAccountsState = useAllAccountsState;
|
|
9
|
+
var _reduxStore = require("@frontegg/redux-store");
|
|
10
|
+
var _hooks = require("../hooks");
|
|
11
|
+
const defaultMapper = state => state;
|
|
12
|
+
function useAllAccountsState(stateMapper = defaultMapper) {
|
|
13
|
+
return (0, _hooks.stateHookGenerator)(stateMapper, 'allAccountsState');
|
|
14
|
+
}
|
|
15
|
+
const useAllAccountsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.allAccountsActions, _reduxStore.allAccountsReducers);
|
|
16
|
+
|
|
17
|
+
//dialogs
|
|
18
|
+
exports.useAllAccountsActions = useAllAccountsActions;
|
|
19
|
+
const defaultDialogsMapper = state => state;
|
|
20
|
+
function useAllAccountsDialogsState(stateMapper = defaultDialogsMapper) {
|
|
21
|
+
return (0, _hooks.stateHookGenerator)(stateMapper, 'allAccountsDialogsState');
|
|
22
|
+
}
|
|
23
|
+
const useAllAccountsDialogsActions = () => (0, _hooks.reducerActionsGenerator)({}, _reduxStore.allAccountsDialogsReducers);
|
|
24
|
+
exports.useAllAccountsDialogsActions = useAllAccountsDialogsActions;
|
package/node/auth/index.js
CHANGED
|
@@ -337,4 +337,16 @@ Object.keys(_customLogin).forEach(function (key) {
|
|
|
337
337
|
return _customLogin[key];
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
|
+
});
|
|
341
|
+
var _allAccounts = require("./MSP/allAccounts");
|
|
342
|
+
Object.keys(_allAccounts).forEach(function (key) {
|
|
343
|
+
if (key === "default" || key === "__esModule") return;
|
|
344
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
345
|
+
if (key in exports && exports[key] === _allAccounts[key]) return;
|
|
346
|
+
Object.defineProperty(exports, key, {
|
|
347
|
+
enumerable: true,
|
|
348
|
+
get: function () {
|
|
349
|
+
return _allAccounts[key];
|
|
350
|
+
}
|
|
351
|
+
});
|
|
340
352
|
});
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.103.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.
|
|
10
|
-
"@frontegg/types": "6.
|
|
9
|
+
"@frontegg/redux-store": "6.103.0-alpha.0",
|
|
10
|
+
"@frontegg/types": "6.103.0-alpha.0",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"react-redux": "^7.x"
|