@frontegg/react-hooks 6.185.0 → 6.186.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.
@@ -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
@@ -27,3 +27,4 @@ export * from './MSP/allAccounts';
27
27
  export * from './entitlements';
28
28
  export * from './security/securityCenter';
29
29
  export * from './sms';
30
+ export * from './applications';
package/auth/index.js CHANGED
@@ -26,4 +26,5 @@ export * from './customLogin';
26
26
  export * from './MSP/allAccounts';
27
27
  export * from './entitlements';
28
28
  export * from './security/securityCenter';
29
- export * from './sms';
29
+ export * from './sms';
30
+ export * from './applications';
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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.185.0
1
+ /** @license Frontegg v6.186.0-alpha.1
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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;
@@ -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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.185.0
1
+ /** @license Frontegg v6.186.0-alpha.1
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/react-hooks",
3
- "version": "6.185.0",
3
+ "version": "6.186.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.185.0",
10
- "@frontegg/types": "6.185.0",
9
+ "@frontegg/redux-store": "6.186.0-alpha.1",
10
+ "@frontegg/types": "6.186.0-alpha.1",
11
11
  "@types/react": "*",
12
12
  "get-value": "^3.0.1",
13
13
  "react-redux": "^7.x"