@frontegg/js 7.57.0 → 7.58.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.
@@ -18,7 +18,8 @@ export var FronteggApp = /*#__PURE__*/function () {
18
18
  function FronteggApp(_options, name) {
19
19
  var _this = this,
20
20
  _this$options$authOpt3,
21
- _options$authOptions;
21
+ _options$authOptions,
22
+ _options$authOptions2;
22
23
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
23
24
  var allowMultipleRenderers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
24
25
  _classCallCheck(this, FronteggApp);
@@ -237,7 +238,8 @@ export var FronteggApp = /*#__PURE__*/function () {
237
238
  contextHolder.setAppName(appName);
238
239
  this.setEntitlementsOptions(_options.entitlementsOptions);
239
240
  this.setSessionContext({
240
- enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant
241
+ enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant,
242
+ skipUserLoading: (_options$authOptions2 = _options.authOptions) == null ? void 0 : _options$authOptions2.skipUserLoading
241
243
  });
242
244
 
243
245
  // pay attention: basename is used from the router base name, then if it's empty it will be the frontegg options basename
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.57.0
1
+ /** @license Frontegg v7.58.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.
@@ -25,7 +25,8 @@ var FronteggApp = /*#__PURE__*/function () {
25
25
  function FronteggApp(_options, name) {
26
26
  var _this = this,
27
27
  _this$options$authOpt3,
28
- _options$authOptions;
28
+ _options$authOptions,
29
+ _options$authOptions2;
29
30
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30
31
  var allowMultipleRenderers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
31
32
  (0, _classCallCheck2["default"])(this, FronteggApp);
@@ -244,7 +245,8 @@ var FronteggApp = /*#__PURE__*/function () {
244
245
  contextHolder.setAppName(appName);
245
246
  this.setEntitlementsOptions(_options.entitlementsOptions);
246
247
  this.setSessionContext({
247
- enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant
248
+ enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant,
249
+ skipUserLoading: (_options$authOptions2 = _options.authOptions) == null ? void 0 : _options$authOptions2.skipUserLoading
248
250
  });
249
251
 
250
252
  // pay attention: basename is used from the router base name, then if it's empty it will be the frontegg options basename
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.57.0
1
+ /** @license Frontegg v7.58.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/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: '7.57.0'
8
+ cdnVersion: '7.58.0'
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "7.57.0",
3
+ "version": "7.58.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/types": "7.57.0"
9
+ "@frontegg/types": "7.58.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -359,7 +359,8 @@ var FronteggApp = /*#__PURE__*/function () {
359
359
  function FronteggApp(_options, name) {
360
360
  var _this = this,
361
361
  _this$options$authOpt3,
362
- _options$authOptions;
362
+ _options$authOptions,
363
+ _options$authOptions2;
363
364
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
364
365
  var allowMultipleRenderers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
365
366
  (0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, FronteggApp);
@@ -578,7 +579,8 @@ var FronteggApp = /*#__PURE__*/function () {
578
579
  contextHolder.setAppName(appName);
579
580
  this.setEntitlementsOptions(_options.entitlementsOptions);
580
581
  this.setSessionContext({
581
- enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant
582
+ enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant,
583
+ skipUserLoading: (_options$authOptions2 = _options.authOptions) == null ? void 0 : _options$authOptions2.skipUserLoading
582
584
  });
583
585
 
584
586
  // pay attention: basename is used from the router base name, then if it's empty it will be the frontegg options basename
@@ -1628,7 +1630,7 @@ __webpack_require__.r(__webpack_exports__);
1628
1630
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1629
1631
  /* harmony export */ });
1630
1632
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1631
- cdnVersion: '7.57.0'
1633
+ cdnVersion: '7.58.0'
1632
1634
  });
1633
1635
 
1634
1636
  /***/ }),
@@ -18085,7 +18087,7 @@ __webpack_require__.r(__webpack_exports__);
18085
18087
  /* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
18086
18088
  /* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
18087
18089
  /* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
18088
- /** @license Frontegg v7.57.0
18090
+ /** @license Frontegg v7.58.0
18089
18091
  *
18090
18092
  * This source code is licensed under the MIT license found in the
18091
18093
  * LICENSE file in the root directory of this source tree.
@@ -25369,6 +25371,10 @@ class ContextHolder {
25369
25371
  var _this$sessionContext;
25370
25372
  return ((_this$sessionContext = this.sessionContext) == null ? void 0 : _this$sessionContext.enableSessionPerTenant) || false;
25371
25373
  };
25374
+ this.shouldSkipUserLoad = () => {
25375
+ var _this$sessionContext2;
25376
+ return ((_this$sessionContext2 = this.sessionContext) == null ? void 0 : _this$sessionContext2.skipUserLoading) || false;
25377
+ };
25372
25378
  this.getAppName = () => {
25373
25379
  return this.appName;
25374
25380
  };
@@ -26877,6 +26883,10 @@ class AuthenticationApi extends _BaseApiClient__WEBPACK_IMPORTED_MODULE_6__.Base
26877
26883
  }
26878
26884
  };
26879
26885
  this.getMeAndEntitlements = async () => {
26886
+ const shouldSkipUserLoad = _ContextHolder__WEBPACK_IMPORTED_MODULE_9__.ContextHolder.for(this.appName).shouldSkipUserLoad();
26887
+ if (shouldSkipUserLoad) {
26888
+ return {};
26889
+ }
26880
26890
  const actions = [{
26881
26891
  action: this.getMeV2,
26882
26892
  shouldLoad: true
@@ -27195,6 +27205,13 @@ function getTabTenantFromSessionStorage(appName) {
27195
27205
  return sessionStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_0__.FRONTEGG_SEPARATE_TABS_BY_TENANT);
27196
27206
  }
27197
27207
  function getCurrentUserTenantsFunction(appName) {
27208
+ const skipUserLoading = _ContextHolder__WEBPACK_IMPORTED_MODULE_1__.ContextHolder.for(appName).shouldSkipUserLoad();
27209
+ if (skipUserLoading) {
27210
+ return async () => ({
27211
+ tenants: [],
27212
+ activeTenant: {}
27213
+ });
27214
+ }
27198
27215
  const usersApi = new _users__WEBPACK_IMPORTED_MODULE_2__.UsersApi(appName);
27199
27216
  const [useCurrentUserTenantsV1] = _feature_flags__WEBPACK_IMPORTED_MODULE_3__.FeatureFlags.getFeatureFlags([_constants__WEBPACK_IMPORTED_MODULE_0__.USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF], appName);
27200
27217
  if (_ContextHolder__WEBPACK_IMPORTED_MODULE_1__.ContextHolder.for(appName).isSessionPerTenantEnabled()) {
@@ -28140,7 +28157,7 @@ __webpack_require__.r(__webpack_exports__);
28140
28157
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
28141
28158
  /* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
28142
28159
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
28143
- /** @license Frontegg v7.57.0
28160
+ /** @license Frontegg v7.58.0
28144
28161
  *
28145
28162
  * This source code is licensed under the MIT license found in the
28146
28163
  * LICENSE file in the root directory of this source tree.
@@ -30770,7 +30787,7 @@ __webpack_require__.r(__webpack_exports__);
30770
30787
  /* harmony export */ });
30771
30788
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
30772
30789
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
30773
- /** @license Frontegg v7.57.0
30790
+ /** @license Frontegg v7.58.0
30774
30791
  *
30775
30792
  * This source code is licensed under the MIT license found in the
30776
30793
  * LICENSE file in the root directory of this source tree.