@frontegg/react-hooks 6.85.0 → 6.86.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.
@@ -1 +1,2 @@
1
1
  export declare const useFeatureFlags: (flags: string[]) => boolean[];
2
+ export declare const useFeatureFlagsChecker: () => (flags: string[]) => boolean[];
@@ -5,4 +5,12 @@ export const useFeatureFlags = flags => {
5
5
  injector
6
6
  } = useShadowDom();
7
7
  return FeatureFlags.getFeatureFlags(flags, injector.name);
8
+ };
9
+ export const useFeatureFlagsChecker = () => {
10
+ const {
11
+ injector
12
+ } = useShadowDom();
13
+ return flags => {
14
+ return FeatureFlags.getFeatureFlags(flags, injector.name);
15
+ };
8
16
  };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.85.0
1
+ /** @license Frontegg v6.86.0
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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useFeatureFlags = void 0;
6
+ exports.useFeatureFlagsChecker = exports.useFeatureFlags = void 0;
7
7
  var _restApi = require("@frontegg/rest-api");
8
8
  var _common = require("../common");
9
9
  const useFeatureFlags = flags => {
@@ -12,4 +12,13 @@ const useFeatureFlags = flags => {
12
12
  } = (0, _common.useShadowDom)();
13
13
  return _restApi.FeatureFlags.getFeatureFlags(flags, injector.name);
14
14
  };
15
- exports.useFeatureFlags = useFeatureFlags;
15
+ exports.useFeatureFlags = useFeatureFlags;
16
+ const useFeatureFlagsChecker = () => {
17
+ const {
18
+ injector
19
+ } = (0, _common.useShadowDom)();
20
+ return flags => {
21
+ return _restApi.FeatureFlags.getFeatureFlags(flags, injector.name);
22
+ };
23
+ };
24
+ exports.useFeatureFlagsChecker = useFeatureFlagsChecker;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.85.0
1
+ /** @license Frontegg v6.86.0
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.85.0",
3
+ "version": "6.86.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.85.0",
10
- "@frontegg/types": "6.85.0",
9
+ "@frontegg/redux-store": "6.86.0",
10
+ "@frontegg/types": "6.86.0",
11
11
  "@types/react": "*",
12
12
  "react-redux": "^7.x"
13
13
  },