@frontegg/js 6.80.0 → 6.81.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.
@@ -25,9 +25,17 @@ export var AdminPortalRenderer = /*#__PURE__*/function () {
25
25
  var contextOptions = {
26
26
  baseUrl: 'preview'
27
27
  };
28
- this.store = store != null ? store : createFronteggStore({
29
- context: contextOptions
30
- }, this, true, undefined, undefined, true);
28
+ if (store) {
29
+ this.store = store;
30
+ if (store.getState().root.appName !== name) {
31
+ throw Error('Mismatch in store names');
32
+ }
33
+ } else {
34
+ this.store = createFronteggStore({
35
+ context: contextOptions,
36
+ appName: name
37
+ }, this, true, undefined, undefined, true);
38
+ }
31
39
  this.options = _extends({
32
40
  themeOptions: themeOptions,
33
41
  iframeRendering: true,
@@ -15,10 +15,7 @@ import { mockFlagsList } from '../utils/mockFlagsList';
15
15
  export var FronteggApp = /*#__PURE__*/function () {
16
16
  function FronteggApp(_options, name) {
17
17
  var _this = this,
18
- _this$options$authOpt,
19
- _this$options$store,
20
- _this$options$authOpt2,
21
- _this$options$auditsO;
18
+ _this$options$authOpt;
22
19
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
23
20
  _classCallCheck(this, FronteggApp);
24
21
  this.name = void 0;
@@ -96,9 +93,7 @@ export var FronteggApp = /*#__PURE__*/function () {
96
93
  _context3.next = 4;
97
94
  break;
98
95
  }
99
- FronteggRestApi.FeatureFlags.set({
100
- flags: mockFlagsList
101
- });
96
+ FronteggRestApi.FeatureFlags.set(mockFlagsList, _this.name);
102
97
  _context3.next = 14;
103
98
  break;
104
99
  case 4:
@@ -107,9 +102,7 @@ export var FronteggApp = /*#__PURE__*/function () {
107
102
  return FronteggRestApi.loadFeatureFlags();
108
103
  case 7:
109
104
  flags = _context3.sent;
110
- FronteggRestApi.FeatureFlags.set({
111
- flags: flags
112
- });
105
+ FronteggRestApi.FeatureFlags.set(flags, _this.name);
113
106
  _context3.next = 14;
114
107
  break;
115
108
  case 11:
@@ -144,12 +137,21 @@ export var FronteggApp = /*#__PURE__*/function () {
144
137
  hostedLoginBox: this.options.hostedLoginBox
145
138
  };
146
139
  authOptions.disableSilentRefresh = (_this$options$authOpt = this.options.authOptions) == null ? void 0 : _this$options$authOpt.disableSilentRefresh;
147
- this.store = (_this$options$store = this.options.store) != null ? _this$options$store : createFronteggStore({
148
- context: this.options.contextOptions
149
- }, this, this.options.previewMode, authOptions, {
150
- auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
151
- audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
152
- }, false, this.options.urlStrategy);
140
+ if (this.options.store) {
141
+ this.store = this.options.store;
142
+ if (this.options.store.getState().root.appName !== name) {
143
+ throw Error('Mismatch in store names');
144
+ }
145
+ } else {
146
+ var _this$options$authOpt2, _this$options$auditsO;
147
+ this.store = createFronteggStore({
148
+ context: this.options.contextOptions,
149
+ appName: this.name
150
+ }, this, this.options.previewMode, authOptions, {
151
+ auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
152
+ audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
153
+ }, false, this.options.urlStrategy);
154
+ }
153
155
  AppHolder.setInstance(appName, this);
154
156
  }
155
157
  _createClass(FronteggApp, [{
@@ -27,9 +27,17 @@ export var LoginBoxRenderer = /*#__PURE__*/function () {
27
27
  var contextOptions = {
28
28
  baseUrl: 'preview'
29
29
  };
30
- this.store = store != null ? store : createFronteggStore({
31
- context: contextOptions
32
- }, this, true, undefined, undefined, true);
30
+ if (store) {
31
+ this.store = store;
32
+ if (store.getState().root.appName !== name) {
33
+ throw Error('Mismatch in store names');
34
+ }
35
+ } else {
36
+ this.store = createFronteggStore({
37
+ context: contextOptions,
38
+ appName: name
39
+ }, this, true, undefined, undefined, true);
40
+ }
33
41
  this.options = _extends({
34
42
  themeOptions: themeOptions,
35
43
  iframeRendering: true,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.80.0
1
+ /** @license Frontegg v6.81.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.
@@ -33,9 +33,17 @@ var AdminPortalRenderer = /*#__PURE__*/function () {
33
33
  var contextOptions = {
34
34
  baseUrl: 'preview'
35
35
  };
36
- this.store = store != null ? store : (0, _reduxStore.createFronteggStore)({
37
- context: contextOptions
38
- }, this, true, undefined, undefined, true);
36
+ if (store) {
37
+ this.store = store;
38
+ if (store.getState().root.appName !== name) {
39
+ throw Error('Mismatch in store names');
40
+ }
41
+ } else {
42
+ this.store = (0, _reduxStore.createFronteggStore)({
43
+ context: contextOptions,
44
+ appName: name
45
+ }, this, true, undefined, undefined, true);
46
+ }
39
47
  this.options = (0, _extends2["default"])({
40
48
  themeOptions: themeOptions,
41
49
  iframeRendering: true,
@@ -23,10 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
  var FronteggApp = /*#__PURE__*/function () {
24
24
  function FronteggApp(_options, name) {
25
25
  var _this = this,
26
- _this$options$authOpt,
27
- _this$options$store,
28
- _this$options$authOpt2,
29
- _this$options$auditsO;
26
+ _this$options$authOpt;
30
27
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
31
28
  (0, _classCallCheck2["default"])(this, FronteggApp);
32
29
  this.name = void 0;
@@ -104,9 +101,7 @@ var FronteggApp = /*#__PURE__*/function () {
104
101
  _context3.next = 4;
105
102
  break;
106
103
  }
107
- FronteggRestApi.FeatureFlags.set({
108
- flags: _mockFlagsList.mockFlagsList
109
- });
104
+ FronteggRestApi.FeatureFlags.set(_mockFlagsList.mockFlagsList, _this.name);
110
105
  _context3.next = 14;
111
106
  break;
112
107
  case 4:
@@ -115,9 +110,7 @@ var FronteggApp = /*#__PURE__*/function () {
115
110
  return FronteggRestApi.loadFeatureFlags();
116
111
  case 7:
117
112
  flags = _context3.sent;
118
- FronteggRestApi.FeatureFlags.set({
119
- flags: flags
120
- });
113
+ FronteggRestApi.FeatureFlags.set(flags, _this.name);
121
114
  _context3.next = 14;
122
115
  break;
123
116
  case 11:
@@ -152,12 +145,21 @@ var FronteggApp = /*#__PURE__*/function () {
152
145
  hostedLoginBox: this.options.hostedLoginBox
153
146
  };
154
147
  authOptions.disableSilentRefresh = (_this$options$authOpt = this.options.authOptions) == null ? void 0 : _this$options$authOpt.disableSilentRefresh;
155
- this.store = (_this$options$store = this.options.store) != null ? _this$options$store : (0, _reduxStore.createFronteggStore)({
156
- context: this.options.contextOptions
157
- }, this, this.options.previewMode, authOptions, {
158
- auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
159
- audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
160
- }, false, this.options.urlStrategy);
148
+ if (this.options.store) {
149
+ this.store = this.options.store;
150
+ if (this.options.store.getState().root.appName !== name) {
151
+ throw Error('Mismatch in store names');
152
+ }
153
+ } else {
154
+ var _this$options$authOpt2, _this$options$auditsO;
155
+ this.store = (0, _reduxStore.createFronteggStore)({
156
+ context: this.options.contextOptions,
157
+ appName: this.name
158
+ }, this, this.options.previewMode, authOptions, {
159
+ auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
160
+ audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
161
+ }, false, this.options.urlStrategy);
162
+ }
161
163
  _AppHolder.AppHolder.setInstance(appName, this);
162
164
  }
163
165
  (0, _createClass2["default"])(FronteggApp, [{
@@ -35,9 +35,17 @@ var LoginBoxRenderer = /*#__PURE__*/function () {
35
35
  var contextOptions = {
36
36
  baseUrl: 'preview'
37
37
  };
38
- this.store = store != null ? store : (0, _reduxStore.createFronteggStore)({
39
- context: contextOptions
40
- }, this, true, undefined, undefined, true);
38
+ if (store) {
39
+ this.store = store;
40
+ if (store.getState().root.appName !== name) {
41
+ throw Error('Mismatch in store names');
42
+ }
43
+ } else {
44
+ this.store = (0, _reduxStore.createFronteggStore)({
45
+ context: contextOptions,
46
+ appName: name
47
+ }, this, true, undefined, undefined, true);
48
+ }
41
49
  this.options = (0, _extends2["default"])({
42
50
  themeOptions: themeOptions,
43
51
  iframeRendering: true,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.80.0
1
+ /** @license Frontegg v6.81.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.
@@ -7,6 +7,7 @@ exports.mockFlagsList = void 0;
7
7
  var mockFlagsList = {
8
8
  admin_portal_ip_restrictions: 'on',
9
9
  admin_portal_domain_restrictions: 'on',
10
- 'new-mfa-pages': 'on'
10
+ 'new-mfa-pages': 'on',
11
+ 'show-passkeys': 'off'
11
12
  };
12
13
  exports.mockFlagsList = mockFlagsList;
package/node/version.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- cdnVersion: '6.80.0'
8
+ "cdnVersion": "6.81.0-alpha.1"
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "6.80.0",
3
+ "version": "6.81.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/types": "6.80.0"
9
+ "@frontegg/types": "6.81.0-alpha.1"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -100,9 +100,17 @@ var AdminPortalRenderer = /*#__PURE__*/function () {
100
100
  var contextOptions = {
101
101
  baseUrl: 'preview'
102
102
  };
103
- this.store = store != null ? store : (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_7__.createFronteggStore)({
104
- context: contextOptions
105
- }, this, true, undefined, undefined, true);
103
+ if (store) {
104
+ this.store = store;
105
+ if (store.getState().root.appName !== name) {
106
+ throw Error('Mismatch in store names');
107
+ }
108
+ } else {
109
+ this.store = (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_7__.createFronteggStore)({
110
+ context: contextOptions,
111
+ appName: name
112
+ }, this, true, undefined, undefined, true);
113
+ }
106
114
  this.options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
107
115
  themeOptions: themeOptions,
108
116
  iframeRendering: true,
@@ -318,10 +326,7 @@ __webpack_require__.r(__webpack_exports__);
318
326
  var FronteggApp = /*#__PURE__*/function () {
319
327
  function FronteggApp(_options, name) {
320
328
  var _this = this,
321
- _this$options$authOpt,
322
- _this$options$store,
323
- _this$options$authOpt2,
324
- _this$options$auditsO;
329
+ _this$options$authOpt;
325
330
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
326
331
  (0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, FronteggApp);
327
332
  this.name = void 0;
@@ -399,9 +404,7 @@ var FronteggApp = /*#__PURE__*/function () {
399
404
  _context3.next = 4;
400
405
  break;
401
406
  }
402
- _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.FeatureFlags.set({
403
- flags: _utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_8__.mockFlagsList
404
- });
407
+ _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.FeatureFlags.set(_utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_8__.mockFlagsList, _this.name);
405
408
  _context3.next = 14;
406
409
  break;
407
410
  case 4:
@@ -410,9 +413,7 @@ var FronteggApp = /*#__PURE__*/function () {
410
413
  return _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.loadFeatureFlags();
411
414
  case 7:
412
415
  flags = _context3.sent;
413
- _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.FeatureFlags.set({
414
- flags: flags
415
- });
416
+ _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.FeatureFlags.set(flags, _this.name);
416
417
  _context3.next = 14;
417
418
  break;
418
419
  case 11:
@@ -447,12 +448,21 @@ var FronteggApp = /*#__PURE__*/function () {
447
448
  hostedLoginBox: this.options.hostedLoginBox
448
449
  };
449
450
  authOptions.disableSilentRefresh = (_this$options$authOpt = this.options.authOptions) == null ? void 0 : _this$options$authOpt.disableSilentRefresh;
450
- this.store = (_this$options$store = this.options.store) != null ? _this$options$store : (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_12__.createFronteggStore)({
451
- context: this.options.contextOptions
452
- }, this, this.options.previewMode, authOptions, {
453
- auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
454
- audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
455
- }, false, this.options.urlStrategy);
451
+ if (this.options.store) {
452
+ this.store = this.options.store;
453
+ if (this.options.store.getState().root.appName !== name) {
454
+ throw Error('Mismatch in store names');
455
+ }
456
+ } else {
457
+ var _this$options$authOpt2, _this$options$auditsO;
458
+ this.store = (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_12__.createFronteggStore)({
459
+ context: this.options.contextOptions,
460
+ appName: this.name
461
+ }, this, this.options.previewMode, authOptions, {
462
+ auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
463
+ audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
464
+ }, false, this.options.urlStrategy);
465
+ }
456
466
  _AppHolder__WEBPACK_IMPORTED_MODULE_6__.AppHolder.setInstance(appName, this);
457
467
  }
458
468
  (0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(FronteggApp, [{
@@ -840,9 +850,17 @@ var LoginBoxRenderer = /*#__PURE__*/function () {
840
850
  var contextOptions = {
841
851
  baseUrl: 'preview'
842
852
  };
843
- this.store = store != null ? store : (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_7__.createFronteggStore)({
844
- context: contextOptions
845
- }, this, true, undefined, undefined, true);
853
+ if (store) {
854
+ this.store = store;
855
+ if (store.getState().root.appName !== name) {
856
+ throw Error('Mismatch in store names');
857
+ }
858
+ } else {
859
+ this.store = (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_7__.createFronteggStore)({
860
+ context: contextOptions,
861
+ appName: name
862
+ }, this, true, undefined, undefined, true);
863
+ }
846
864
  this.options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
847
865
  themeOptions: themeOptions,
848
866
  iframeRendering: true,
@@ -1160,7 +1178,8 @@ __webpack_require__.r(__webpack_exports__);
1160
1178
  var mockFlagsList = {
1161
1179
  admin_portal_ip_restrictions: 'on',
1162
1180
  admin_portal_domain_restrictions: 'on',
1163
- 'new-mfa-pages': 'on'
1181
+ 'new-mfa-pages': 'on',
1182
+ 'show-passkeys': 'off'
1164
1183
  };
1165
1184
 
1166
1185
  /***/ }),
@@ -1177,7 +1196,7 @@ __webpack_require__.r(__webpack_exports__);
1177
1196
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1178
1197
  /* harmony export */ });
1179
1198
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1180
- cdnVersion: '6.80.0'
1199
+ "cdnVersion": "6.81.0-alpha.1"
1181
1200
  });
1182
1201
 
1183
1202
  /***/ }),
@@ -5724,7 +5743,7 @@ function* shouldShowPromptPasskeys() {
5724
5743
  const isPasskeysEnabledByVendor = (0,_PasskeysState_helpers__WEBPACK_IMPORTED_MODULE_19__.useIsPasskeysEnabled)(policy);
5725
5744
  const isLoggedInWithPasskeys = localStorage.getItem('preferred-login-method') === 'Passkeys';
5726
5745
  const isMarkedDontShowAgainPrompt = localStorage.getItem('dont-show-again-prompt-passkeys') === 'true';
5727
- const [showPasskeys] = (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.useFeatureFlags)(['show-passkeys']);
5746
+ const [showPasskeys] = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_helpers__WEBPACK_IMPORTED_MODULE_16__.getFeatureFlags, ['show-passkeys']);
5728
5747
  if (!showPasskeys || !isPasskeysEnabledByVendor || isLoggedInWithPasskeys || isMarkedDontShowAgainPrompt) {
5729
5748
  return false;
5730
5749
  } else {
@@ -10883,7 +10902,7 @@ function* loadPublicSecurityPolicy() {
10883
10902
  }));
10884
10903
  try {
10885
10904
  const policy = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.api.auth.getVendorConfig);
10886
- const [withLoginPerTenant] = (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.useFeatureFlags)(['admin_portal_login_per_tenant']);
10905
+ const [withLoginPerTenant] = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_helpers__WEBPACK_IMPORTED_MODULE_5__.getFeatureFlags, ['admin_portal_login_per_tenant']);
10887
10906
  if (withLoginPerTenant) {
10888
10907
  const authStrategies = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.api.auth.getVendorPublicAuthStrategiesConfig);
10889
10908
  if (authStrategies.mainAuthStrategies.length > 0) {
@@ -11855,7 +11874,7 @@ function* loadAllowSignUps() {
11855
11874
  try {
11856
11875
  const policy = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.auth.getVendorConfig);
11857
11876
  const authStrategies = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.auth.getVendorPublicAuthStrategiesConfig);
11858
- const [withLoginPerTenant] = (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.useFeatureFlags)(['admin_portal_login_per_tenant']);
11877
+ const [withLoginPerTenant] = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_helpers__WEBPACK_IMPORTED_MODULE_4__.getFeatureFlags, ['admin_portal_login_per_tenant']);
11859
11878
  if (withLoginPerTenant) {
11860
11879
  const authStrategies = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.auth.getVendorPublicAuthStrategiesConfig);
11861
11880
  if (authStrategies.mainAuthStrategies.length > 0) {
@@ -15922,13 +15941,14 @@ __webpack_require__.r(__webpack_exports__);
15922
15941
  /* harmony export */ "createRandomString": () => (/* binding */ createRandomString),
15923
15942
  /* harmony export */ "generateActionCreator": () => (/* binding */ generateActionCreator),
15924
15943
  /* harmony export */ "generateCodeChallenge": () => (/* binding */ generateCodeChallenge),
15944
+ /* harmony export */ "getFeatureFlags": () => (/* binding */ getFeatureFlags),
15925
15945
  /* harmony export */ "omitProps": () => (/* binding */ omitProps),
15926
- /* harmony export */ "readFileAsText": () => (/* binding */ readFileAsText),
15927
- /* harmony export */ "useFeatureFlags": () => (/* binding */ useFeatureFlags)
15946
+ /* harmony export */ "readFileAsText": () => (/* binding */ readFileAsText)
15928
15947
  /* harmony export */ });
15929
15948
  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../node_modules/@babel/runtime/helpers/esm/extends.js");
15930
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
15931
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @reduxjs/toolkit */ "../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
15949
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
15950
+ /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @reduxjs/toolkit */ "../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
15951
+ /* harmony import */ var redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-saga/effects */ "../../node_modules/redux-saga/dist/redux-saga-effects-npm-proxy.esm.js");
15932
15952
 
15933
15953
 
15934
15954
 
@@ -15942,9 +15962,9 @@ function omitProps(props, keys) {
15942
15962
  return newProps;
15943
15963
  }
15944
15964
  function generateActionCreator(storeName) {
15945
- return (key, withPayload) => withPayload ? (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${storeName}/${key}`, payload => ({
15965
+ return (key, withPayload) => withPayload ? (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_2__.createAction)(`${storeName}/${key}`, payload => ({
15946
15966
  payload
15947
- })) : (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${storeName}/${key}`);
15967
+ })) : (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_2__.createAction)(`${storeName}/${key}`);
15948
15968
  }
15949
15969
  async function generateCodeChallenge(codeVerifier) {
15950
15970
  const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(codeVerifier));
@@ -15966,9 +15986,10 @@ const readFileAsText = file => new Promise((resolve, reject) => {
15966
15986
  reader.onload = () => resolve(reader.result);
15967
15987
  reader.onerror = reject;
15968
15988
  });
15969
- const useFeatureFlags = flags => {
15970
- return _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.FeatureFlags.getFeatureFlags(flags);
15971
- };
15989
+ function* getFeatureFlags(flags) {
15990
+ const appName = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.select)(state => state.root.appName);
15991
+ return _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.FeatureFlags.getFeatureFlags(flags, appName);
15992
+ }
15972
15993
 
15973
15994
  /***/ }),
15974
15995
 
@@ -17873,7 +17894,8 @@ __webpack_require__.r(__webpack_exports__);
17873
17894
  const initialState = {
17874
17895
  context: undefined,
17875
17896
  urlStrategy: 'path',
17876
- previewMode: false
17897
+ previewMode: false,
17898
+ appName: 'default'
17877
17899
  };
17878
17900
  const {
17879
17901
  reducer: rootReducer
@@ -17906,7 +17928,7 @@ const createFronteggStore = (rootInitialState, storeHolder, previewMode = false,
17906
17928
  holder = window;
17907
17929
  }
17908
17930
  if (!holder.store) {
17909
- var _overrideInitialState, _authInitialState$rou, _overrideInitialState2, _overrideInitialState3, _overrideInitialState4, _overrideInitialState5, _overrideInitialState6, _overrideInitialState7, _overrideInitialState8, _overrideInitialState9;
17931
+ var _storeHolder$appName, _overrideInitialState, _authInitialState$rou, _overrideInitialState2, _overrideInitialState3, _overrideInitialState4, _overrideInitialState5, _overrideInitialState6, _overrideInitialState7, _overrideInitialState8, _overrideInitialState9;
17910
17932
  if (!previewMode && !builderMode) {
17911
17933
  _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_7__.ContextHolder.setContext(rootInitialState.context);
17912
17934
  }
@@ -17922,7 +17944,8 @@ const createFronteggStore = (rootInitialState, storeHolder, previewMode = false,
17922
17944
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
17923
17945
  root: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, rootInitialState, {
17924
17946
  previewMode,
17925
- urlStrategy: urlStrategy
17947
+ urlStrategy: urlStrategy,
17948
+ appName: (_storeHolder$appName = storeHolder == null ? void 0 : storeHolder.appName) != null ? _storeHolder$appName : 'default'
17926
17949
  }),
17927
17950
  [_auth__WEBPACK_IMPORTED_MODULE_8__["default"].storeName]: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _auth__WEBPACK_IMPORTED_MODULE_8__["default"].initialState, authInitialState, (_overrideInitialState = overrideInitialState == null ? void 0 : overrideInitialState.auth) != null ? _overrideInitialState : {}, {
17928
17951
  routes: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _auth__WEBPACK_IMPORTED_MODULE_8__["default"].initialState.routes, (_authInitialState$rou = authInitialState == null ? void 0 : authInitialState.routes) != null ? _authInitialState$rou : {}, (_overrideInitialState2 = overrideInitialState == null ? void 0 : (_overrideInitialState3 = overrideInitialState.auth) == null ? void 0 : _overrideInitialState3.routes) != null ? _overrideInitialState2 : {})
@@ -18825,7 +18848,7 @@ __webpack_require__.r(__webpack_exports__);
18825
18848
  /* harmony export */ });
18826
18849
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
18827
18850
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
18828
- /** @license Frontegg v6.80.0
18851
+ /** @license Frontegg v6.81.0-alpha.1
18829
18852
  *
18830
18853
  * This source code is licensed under the MIT license found in the
18831
18854
  * LICENSE file in the root directory of this source tree.
@@ -20446,7 +20469,10 @@ const defaultFeatureFlags = {
20446
20469
  };
20447
20470
  class FeatureFlags {
20448
20471
  constructor() {
20449
- this._flags = defaultFeatureFlags.flags;
20472
+ var _defaultFeatureFlags$;
20473
+
20474
+ this._flags = {};
20475
+ this._flags = (_defaultFeatureFlags$ = defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$ : {};
20450
20476
  }
20451
20477
 
20452
20478
  static getInstance(name = "default") {
@@ -20460,8 +20486,8 @@ class FeatureFlags {
20460
20486
  return featureFlagsInstance;
20461
20487
  }
20462
20488
 
20463
- static getFeatureFlags(flags) {
20464
- const featureFlagsInstance = this.getInstance();
20489
+ static getFeatureFlags(flags, name) {
20490
+ const featureFlagsInstance = this.getInstance(name);
20465
20491
  return flags.map(flag => (featureFlagsInstance == null ? void 0 : featureFlagsInstance._flags[flag]) === "on");
20466
20492
  }
20467
20493
 
@@ -20472,9 +20498,9 @@ class FeatureFlags {
20472
20498
  }
20473
20499
 
20474
20500
  set(featureFlags) {
20475
- var _defaultFeatureFlags$, _featureFlags$flags;
20501
+ var _defaultFeatureFlags$2;
20476
20502
 
20477
- this._flags = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, (_defaultFeatureFlags$ = defaultFeatureFlags == null ? void 0 : defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$ : {}, (_featureFlags$flags = featureFlags == null ? void 0 : featureFlags.flags) != null ? _featureFlags$flags : {});
20503
+ this._flags = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, (_defaultFeatureFlags$2 = defaultFeatureFlags == null ? void 0 : defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$2 : {}, featureFlags != null ? featureFlags : {});
20478
20504
  }
20479
20505
 
20480
20506
  }
@@ -20887,7 +20913,7 @@ __webpack_require__.r(__webpack_exports__);
20887
20913
  /* harmony import */ var _directory_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./directory/interfaces */ "../../node_modules/@frontegg/rest-api/directory/interfaces.js");
20888
20914
  /* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./auth */ "../../node_modules/@frontegg/rest-api/auth/enums.js");
20889
20915
  /* harmony import */ var _subscriptions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./subscriptions */ "../../node_modules/@frontegg/rest-api/subscriptions/enums.js");
20890
- /** @license Frontegg v3.0.90
20916
+ /** @license Frontegg v3.0.92
20891
20917
  *
20892
20918
  * This source code is licensed under the MIT license found in the
20893
20919
  * LICENSE file in the root directory of this source tree.