@frontegg/react-hooks 7.74.0 → 7.75.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 +1 -0
- package/auth/index.js +1 -0
- package/auth/usersEmailsPolicyState.d.ts +5 -0
- package/auth/usersEmailsPolicyState.js +10 -0
- package/index.js +1 -1
- package/node/auth/index.js +12 -0
- package/node/auth/usersEmailsPolicyState.js +18 -0
- package/node/index.js +1 -1
- package/package.json +3 -3
package/auth/index.d.ts
CHANGED
package/auth/index.js
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UserEmailPolicyState, UsersEmailPolicyActions } from '@frontegg/redux-store';
|
|
2
|
+
export type UserEmailPolicyStateMapper<S> = (state: UserEmailPolicyState) => S;
|
|
3
|
+
export declare function useUsersEmailsPolicyState(): UserEmailPolicyState;
|
|
4
|
+
export declare function useUsersEmailsPolicyState<S>(stateMapper: UserEmailPolicyStateMapper<S>): S;
|
|
5
|
+
export declare const useUsersEmailsPolicyActions: () => UsersEmailPolicyActions;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useStore } from '../FronteggStoreContext';
|
|
2
|
+
import { useSnapshot } from '../useSnapshot';
|
|
3
|
+
const defaultMapper = state => state;
|
|
4
|
+
export function useUsersEmailsPolicyState(stateMapper = defaultMapper) {
|
|
5
|
+
const state = useStore().store.auth.userEmailPolicyState;
|
|
6
|
+
return stateMapper(useSnapshot(state));
|
|
7
|
+
}
|
|
8
|
+
export const useUsersEmailsPolicyActions = () => {
|
|
9
|
+
return useStore().stateActions.auth.usersEmailsPolicyActions;
|
|
10
|
+
};
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -407,6 +407,18 @@ Object.keys(_tenants).forEach(function (key) {
|
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
});
|
|
410
|
+
var _usersEmailsPolicyState = require("./usersEmailsPolicyState");
|
|
411
|
+
Object.keys(_usersEmailsPolicyState).forEach(function (key) {
|
|
412
|
+
if (key === "default" || key === "__esModule") return;
|
|
413
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
414
|
+
if (key in exports && exports[key] === _usersEmailsPolicyState[key]) return;
|
|
415
|
+
Object.defineProperty(exports, key, {
|
|
416
|
+
enumerable: true,
|
|
417
|
+
get: function () {
|
|
418
|
+
return _usersEmailsPolicyState[key];
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
});
|
|
410
422
|
var _applications = require("./applications");
|
|
411
423
|
Object.keys(_applications).forEach(function (key) {
|
|
412
424
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useUsersEmailsPolicyActions = void 0;
|
|
7
|
+
exports.useUsersEmailsPolicyState = useUsersEmailsPolicyState;
|
|
8
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
9
|
+
var _useSnapshot = require("../useSnapshot");
|
|
10
|
+
const defaultMapper = state => state;
|
|
11
|
+
function useUsersEmailsPolicyState(stateMapper = defaultMapper) {
|
|
12
|
+
const state = (0, _FronteggStoreContext.useStore)().store.auth.userEmailPolicyState;
|
|
13
|
+
return stateMapper((0, _useSnapshot.useSnapshot)(state));
|
|
14
|
+
}
|
|
15
|
+
const useUsersEmailsPolicyActions = () => {
|
|
16
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.usersEmailsPolicyActions;
|
|
17
|
+
};
|
|
18
|
+
exports.useUsersEmailsPolicyActions = useUsersEmailsPolicyActions;
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.75.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": "7.
|
|
10
|
-
"@frontegg/types": "7.
|
|
9
|
+
"@frontegg/redux-store": "7.75.0-alpha.0",
|
|
10
|
+
"@frontegg/types": "7.75.0-alpha.0",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"@types/react-is": "^17.0.7",
|
|
13
13
|
"get-value": "^3.0.1",
|