@frontegg/react-hooks 6.80.0 → 6.81.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.
|
@@ -113,9 +113,10 @@ export const FronteggStoreProvider = props => {
|
|
|
113
113
|
};
|
|
114
114
|
ContextHolder.setContext(context);
|
|
115
115
|
const store = useMemo(() => {
|
|
116
|
-
var _app$options7;
|
|
116
|
+
var _app$name, _app$options7;
|
|
117
117
|
return createFronteggStore({
|
|
118
|
-
context
|
|
118
|
+
context,
|
|
119
|
+
appName: (_app$name = app == null ? void 0 : app.name) != null ? _app$name : 'default'
|
|
119
120
|
}, app, previewMode, authOptions, undefined, false, app == null ? void 0 : (_app$options7 = app.options) == null ? void 0 : _app$options7.urlStrategy);
|
|
120
121
|
}, [app, previewMode]);
|
|
121
122
|
return /*#__PURE__*/_jsx(Provider, {
|
package/flags/useFeatureFlags.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FeatureFlags } from '@frontegg/rest-api';
|
|
2
|
+
import { useShadowDom } from '../common';
|
|
2
3
|
export const useFeatureFlags = flags => {
|
|
3
|
-
|
|
4
|
+
const {
|
|
5
|
+
injector
|
|
6
|
+
} = useShadowDom();
|
|
7
|
+
return FeatureFlags.getFeatureFlags(flags, injector.name);
|
|
4
8
|
};
|
package/index.js
CHANGED
|
@@ -121,9 +121,10 @@ const FronteggStoreProvider = props => {
|
|
|
121
121
|
};
|
|
122
122
|
_restApi.ContextHolder.setContext(context);
|
|
123
123
|
const store = (0, _react.useMemo)(() => {
|
|
124
|
-
var _app$options7;
|
|
124
|
+
var _app$name, _app$options7;
|
|
125
125
|
return (0, _reduxStore.createFronteggStore)({
|
|
126
|
-
context
|
|
126
|
+
context,
|
|
127
|
+
appName: (_app$name = app == null ? void 0 : app.name) != null ? _app$name : 'default'
|
|
127
128
|
}, app, previewMode, authOptions, undefined, false, app == null ? void 0 : (_app$options7 = app.options) == null ? void 0 : _app$options7.urlStrategy);
|
|
128
129
|
}, [app, previewMode]);
|
|
129
130
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FronteggStoreContext.Provider, {
|
|
@@ -4,8 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useFeatureFlags = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _restApi = require("@frontegg/rest-api");
|
|
8
|
+
var _common = require("../common");
|
|
8
9
|
const useFeatureFlags = flags => {
|
|
9
|
-
|
|
10
|
+
const {
|
|
11
|
+
injector
|
|
12
|
+
} = (0, _common.useShadowDom)();
|
|
13
|
+
return _restApi.FeatureFlags.getFeatureFlags(flags, injector.name);
|
|
10
14
|
};
|
|
11
15
|
exports.useFeatureFlags = useFeatureFlags;
|
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.81.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.81.0-alpha.0",
|
|
10
|
+
"@frontegg/types": "6.81.0-alpha.0",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"react-redux": "^7.x"
|
|
13
13
|
},
|