@frontegg/react-hooks 7.75.0-alpha.0 → 7.75.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/index.d.ts +0 -1
- package/auth/index.js +0 -1
- package/index.js +1 -1
- package/node/auth/index.js +0 -12
- package/node/index.js +1 -1
- package/package.json +3 -3
- package/auth/usersEmailsPolicyState.d.ts +0 -5
- package/auth/usersEmailsPolicyState.js +0 -10
- package/node/auth/usersEmailsPolicyState.js +0 -18
package/auth/index.d.ts
CHANGED
package/auth/index.js
CHANGED
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -407,18 +407,6 @@ 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
|
-
});
|
|
422
410
|
var _applications = require("./applications");
|
|
423
411
|
Object.keys(_applications).forEach(function (key) {
|
|
424
412
|
if (key === "default" || key === "__esModule") return;
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "7.75.0-alpha.
|
|
3
|
+
"version": "7.75.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": "7.75.0-alpha.
|
|
10
|
-
"@frontegg/types": "7.75.0-alpha.
|
|
9
|
+
"@frontegg/redux-store": "7.75.0-alpha.1",
|
|
10
|
+
"@frontegg/types": "7.75.0-alpha.1",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"@types/react-is": "^17.0.7",
|
|
13
13
|
"get-value": "^3.0.1",
|
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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;
|