@frontegg/react-hooks 6.185.0 → 6.186.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/applications.d.ts +5 -0
- package/auth/applications.js +7 -0
- package/auth/index.d.ts +1 -0
- package/auth/index.js +2 -1
- package/common/index.d.ts +1 -0
- package/index.js +1 -1
- package/node/auth/applications.js +15 -0
- package/node/auth/index.js +12 -0
- package/node/index.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ApplicationsActions, ApplicationsState } from '@frontegg/redux-store';
|
|
2
|
+
export declare type ApplicationsStateMapper<S> = (state: ApplicationsState) => S;
|
|
3
|
+
export declare function useApplicationsState(): ApplicationsState;
|
|
4
|
+
export declare function useApplicationsState<S>(stateMapper: ApplicationsStateMapper<S>): S;
|
|
5
|
+
export declare const useApplicationsActions: () => ApplicationsActions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { applicationsActions, applicationsReducers } from '@frontegg/redux-store';
|
|
2
|
+
import { reducerActionsGenerator, stateHookGenerator } from './hooks';
|
|
3
|
+
const defaultMapper = state => state;
|
|
4
|
+
export function useApplicationsState(stateMapper = defaultMapper) {
|
|
5
|
+
return stateHookGenerator(stateMapper, 'applicationsState');
|
|
6
|
+
}
|
|
7
|
+
export const useApplicationsActions = () => reducerActionsGenerator(applicationsActions, applicationsReducers);
|
package/auth/index.d.ts
CHANGED
package/auth/index.js
CHANGED
package/common/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ interface ShadowDomContextData extends FronteggAppOptions {
|
|
|
9
9
|
rootEl: HTMLElement;
|
|
10
10
|
staticRoute?: string;
|
|
11
11
|
setStaticRouteSetter?: (action: Dispatch<SetStateAction<string | undefined>>) => void;
|
|
12
|
+
isMultiApp?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export interface DomContext extends ShadowDomContextData {
|
|
14
15
|
isShadowDom: boolean;
|
package/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useApplicationsActions = void 0;
|
|
7
|
+
exports.useApplicationsState = useApplicationsState;
|
|
8
|
+
var _reduxStore = require("@frontegg/redux-store");
|
|
9
|
+
var _hooks = require("./hooks");
|
|
10
|
+
const defaultMapper = state => state;
|
|
11
|
+
function useApplicationsState(stateMapper = defaultMapper) {
|
|
12
|
+
return (0, _hooks.stateHookGenerator)(stateMapper, 'applicationsState');
|
|
13
|
+
}
|
|
14
|
+
const useApplicationsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.applicationsActions, _reduxStore.applicationsReducers);
|
|
15
|
+
exports.useApplicationsActions = useApplicationsActions;
|
package/node/auth/index.js
CHANGED
|
@@ -404,4 +404,16 @@ Object.keys(_sms).forEach(function (key) {
|
|
|
404
404
|
return _sms[key];
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
|
+
});
|
|
408
|
+
var _applications = require("./applications");
|
|
409
|
+
Object.keys(_applications).forEach(function (key) {
|
|
410
|
+
if (key === "default" || key === "__esModule") return;
|
|
411
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
412
|
+
if (key in exports && exports[key] === _applications[key]) return;
|
|
413
|
+
Object.defineProperty(exports, key, {
|
|
414
|
+
enumerable: true,
|
|
415
|
+
get: function () {
|
|
416
|
+
return _applications[key];
|
|
417
|
+
}
|
|
418
|
+
});
|
|
407
419
|
});
|
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.186.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.186.0-alpha.0",
|
|
10
|
+
"@frontegg/types": "6.186.0-alpha.0",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"react-redux": "^7.x"
|