@frontegg/js 7.50.0-alpha.0 → 7.51.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.
@@ -293,14 +293,9 @@ export var FronteggApp = /*#__PURE__*/function () {
293
293
  } catch (e) {
294
294
  console.error('Failed to add frontegg-loading to body classList');
295
295
  }
296
-
297
- // feature flags loading should be called before requestAuthorize because it uses ff
298
296
  _context4.next = 9;
299
- return this.loadFeatureFlags();
297
+ return Promise.all([this.loadFeatureFlags(), this.loadAdminBoxMetadata(), this.requestAuthorize()]);
300
298
  case 9:
301
- _context4.next = 11;
302
- return Promise.all([this.loadAdminBoxMetadata(), this.requestAuthorize()]);
303
- case 11:
304
299
  if (!this.options.previewMode && !this.options.customLoginBox) {
305
300
  this.loadLoginBox();
306
301
  loadGTM(this.name);
@@ -308,7 +303,7 @@ export var FronteggApp = /*#__PURE__*/function () {
308
303
  if (!this.options.lazyLoadAdminPortal) {
309
304
  this.loadScript('FronteggAdminPortal');
310
305
  }
311
- case 13:
306
+ case 11:
312
307
  case "end":
313
308
  return _context4.stop();
314
309
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.50.0-alpha.0
1
+ /** @license Frontegg v7.51.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.
@@ -300,14 +300,9 @@ var FronteggApp = /*#__PURE__*/function () {
300
300
  } catch (e) {
301
301
  console.error('Failed to add frontegg-loading to body classList');
302
302
  }
303
-
304
- // feature flags loading should be called before requestAuthorize because it uses ff
305
303
  _context4.next = 9;
306
- return this.loadFeatureFlags();
304
+ return Promise.all([this.loadFeatureFlags(), this.loadAdminBoxMetadata(), this.requestAuthorize()]);
307
305
  case 9:
308
- _context4.next = 11;
309
- return Promise.all([this.loadAdminBoxMetadata(), this.requestAuthorize()]);
310
- case 11:
311
306
  if (!this.options.previewMode && !this.options.customLoginBox) {
312
307
  this.loadLoginBox();
313
308
  (0, _utils2.loadGTM)(this.name);
@@ -315,7 +310,7 @@ var FronteggApp = /*#__PURE__*/function () {
315
310
  if (!this.options.lazyLoadAdminPortal) {
316
311
  this.loadScript('FronteggAdminPortal');
317
312
  }
318
- case 13:
313
+ case 11:
319
314
  case "end":
320
315
  return _context4.stop();
321
316
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.50.0-alpha.0
1
+ /** @license Frontegg v7.51.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.50.0-alpha.0'
8
+ cdnVersion: '7.51.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.50.0-alpha.0",
3
+ "version": "7.51.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.50.0-alpha.0"
9
+ "@frontegg/types": "7.51.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -634,14 +634,9 @@ var FronteggApp = /*#__PURE__*/function () {
634
634
  } catch (e) {
635
635
  console.error('Failed to add frontegg-loading to body classList');
636
636
  }
637
-
638
- // feature flags loading should be called before requestAuthorize because it uses ff
639
637
  _context4.next = 9;
640
- return this.loadFeatureFlags();
638
+ return Promise.all([this.loadFeatureFlags(), this.loadAdminBoxMetadata(), this.requestAuthorize()]);
641
639
  case 9:
642
- _context4.next = 11;
643
- return Promise.all([this.loadAdminBoxMetadata(), this.requestAuthorize()]);
644
- case 11:
645
640
  if (!this.options.previewMode && !this.options.customLoginBox) {
646
641
  this.loadLoginBox();
647
642
  (0,_utils__WEBPACK_IMPORTED_MODULE_9__.loadGTM)(this.name);
@@ -649,7 +644,7 @@ var FronteggApp = /*#__PURE__*/function () {
649
644
  if (!this.options.lazyLoadAdminPortal) {
650
645
  this.loadScript('FronteggAdminPortal');
651
646
  }
652
- case 13:
647
+ case 11:
653
648
  case "end":
654
649
  return _context4.stop();
655
650
  }
@@ -1625,7 +1620,7 @@ __webpack_require__.r(__webpack_exports__);
1625
1620
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1626
1621
  /* harmony export */ });
1627
1622
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1628
- cdnVersion: '7.50.0-alpha.0'
1623
+ cdnVersion: '7.51.0'
1629
1624
  });
1630
1625
 
1631
1626
  /***/ }),
@@ -18044,7 +18039,7 @@ __webpack_require__.r(__webpack_exports__);
18044
18039
  /* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
18045
18040
  /* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
18046
18041
  /* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
18047
- /** @license Frontegg v7.50.0-alpha.0
18042
+ /** @license Frontegg v7.51.0
18048
18043
  *
18049
18044
  * This source code is licensed under the MIT license found in the
18050
18045
  * LICENSE file in the root directory of this source tree.
@@ -24229,13 +24224,13 @@ __webpack_require__.r(__webpack_exports__);
24229
24224
  class FronteggNativeModule {
24230
24225
  constructor() {
24231
24226
  this.loginWithSSO = email => {
24232
- if (this.isWebkitAvailable()) {
24227
+ if (this.isIOSNativeBridgeAvailable()) {
24233
24228
  var _window$webkit, _window$webkit$messag, _window$webkit$messag2;
24234
24229
  (_window$webkit = window.webkit) == null ? void 0 : (_window$webkit$messag = _window$webkit.messageHandlers) == null ? void 0 : (_window$webkit$messag2 = _window$webkit$messag.FronteggNativeBridge) == null ? void 0 : _window$webkit$messag2.postMessage(JSON.stringify({
24235
24230
  action: 'loginWithSSO',
24236
24231
  payload: email
24237
24232
  }));
24238
- } else if (this.isJsInterfaceAvailable()) {
24233
+ } else if (this.isAndroidNativeBridgeAvailable()) {
24239
24234
  var _window$FronteggNativ;
24240
24235
  (_window$FronteggNativ = window.FronteggNativeBridge) == null ? void 0 : _window$FronteggNativ.loginWithSSO(email);
24241
24236
  } else {
@@ -24243,13 +24238,13 @@ class FronteggNativeModule {
24243
24238
  }
24244
24239
  };
24245
24240
  this.loginWithSocialLogin = url => {
24246
- if (this.isWebkitAvailable()) {
24241
+ if (this.isIOSNativeBridgeAvailable()) {
24247
24242
  var _window$webkit2, _window$webkit2$messa, _window$webkit2$messa2;
24248
24243
  (_window$webkit2 = window.webkit) == null ? void 0 : (_window$webkit2$messa = _window$webkit2.messageHandlers) == null ? void 0 : (_window$webkit2$messa2 = _window$webkit2$messa.FronteggNativeBridge) == null ? void 0 : _window$webkit2$messa2.postMessage(JSON.stringify({
24249
24244
  action: 'loginWithSocialLogin',
24250
24245
  payload: url
24251
24246
  }));
24252
- } else if (this.isJsInterfaceAvailable()) {
24247
+ } else if (this.isAndroidNativeBridgeAvailable()) {
24253
24248
  var _window$FronteggNativ2;
24254
24249
  (_window$FronteggNativ2 = window.FronteggNativeBridge) == null ? void 0 : _window$FronteggNativ2.loginWithSocialLogin(url);
24255
24250
  } else {
@@ -24257,13 +24252,13 @@ class FronteggNativeModule {
24257
24252
  }
24258
24253
  };
24259
24254
  this.loginWithSocialLoginProvider = provider => {
24260
- if (this.isWebkitAvailable()) {
24255
+ if (this.isIOSNativeBridgeAvailable()) {
24261
24256
  var _window$webkit3, _window$webkit3$messa, _window$webkit3$messa2;
24262
24257
  (_window$webkit3 = window.webkit) == null ? void 0 : (_window$webkit3$messa = _window$webkit3.messageHandlers) == null ? void 0 : (_window$webkit3$messa2 = _window$webkit3$messa.FronteggNativeBridge) == null ? void 0 : _window$webkit3$messa2.postMessage(JSON.stringify({
24263
24258
  action: 'loginWithSocialLoginProvider',
24264
24259
  payload: provider
24265
24260
  }));
24266
- } else if (this.isJsInterfaceAvailable()) {
24261
+ } else if (this.isAndroidNativeBridgeAvailable()) {
24267
24262
  var _window$FronteggNativ3;
24268
24263
  (_window$FronteggNativ3 = window.FronteggNativeBridge) == null ? void 0 : _window$FronteggNativ3.loginWithSocialLoginProvider(provider);
24269
24264
  } else {
@@ -24271,13 +24266,13 @@ class FronteggNativeModule {
24271
24266
  }
24272
24267
  };
24273
24268
  this.loginWithCustomSocialLoginProvider = providerId => {
24274
- if (this.isWebkitAvailable()) {
24269
+ if (this.isIOSNativeBridgeAvailable()) {
24275
24270
  var _window$webkit4, _window$webkit4$messa, _window$webkit4$messa2;
24276
24271
  (_window$webkit4 = window.webkit) == null ? void 0 : (_window$webkit4$messa = _window$webkit4.messageHandlers) == null ? void 0 : (_window$webkit4$messa2 = _window$webkit4$messa.FronteggNativeBridge) == null ? void 0 : _window$webkit4$messa2.postMessage(JSON.stringify({
24277
24272
  action: 'loginWithCustomSocialLoginProvider',
24278
24273
  payload: providerId
24279
24274
  }));
24280
- } else if (this.isJsInterfaceAvailable()) {
24275
+ } else if (this.isAndroidNativeBridgeAvailable()) {
24281
24276
  var _window$FronteggNativ4;
24282
24277
  (_window$FronteggNativ4 = window.FronteggNativeBridge) == null ? void 0 : _window$FronteggNativ4.loginWithCustomSocialLoginProvider(providerId);
24283
24278
  } else {
@@ -24285,7 +24280,7 @@ class FronteggNativeModule {
24285
24280
  }
24286
24281
  };
24287
24282
  this.suggestSavePassword = (email, password) => {
24288
- if (this.isWebkitAvailable()) {
24283
+ if (this.isIOSNativeBridgeAvailable()) {
24289
24284
  var _window$webkit5, _window$webkit5$messa, _window$webkit5$messa2;
24290
24285
  (_window$webkit5 = window.webkit) == null ? void 0 : (_window$webkit5$messa = _window$webkit5.messageHandlers) == null ? void 0 : (_window$webkit5$messa2 = _window$webkit5$messa.FronteggNativeBridge) == null ? void 0 : _window$webkit5$messa2.postMessage(JSON.stringify({
24291
24286
  action: 'suggestSavePassword',
@@ -24294,7 +24289,7 @@ class FronteggNativeModule {
24294
24289
  password
24295
24290
  })
24296
24291
  }));
24297
- } else if (this.isJsInterfaceAvailable()) {
24292
+ } else if (this.isAndroidNativeBridgeAvailable()) {
24298
24293
  var _window$FronteggNativ5;
24299
24294
  (_window$FronteggNativ5 = window.FronteggNativeBridge) == null ? void 0 : _window$FronteggNativ5.suggestSavePassword(email, password);
24300
24295
  } else {
@@ -24306,11 +24301,11 @@ class FronteggNativeModule {
24306
24301
  return (_window$FronteggNativ6 = (_window$FronteggNativ7 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ7['shouldPromptSocialLoginConsent']) != null ? _window$FronteggNativ6 : false;
24307
24302
  };
24308
24303
  }
24309
- isWebkitAvailable() {
24304
+ isIOSNativeBridgeAvailable() {
24310
24305
  var _window$webkit6, _window$webkit6$messa;
24311
24306
  return ((_window$webkit6 = window.webkit) == null ? void 0 : (_window$webkit6$messa = _window$webkit6.messageHandlers) == null ? void 0 : _window$webkit6$messa.FronteggNativeBridge) != null;
24312
24307
  }
24313
- isJsInterfaceAvailable() {
24308
+ isAndroidNativeBridgeAvailable() {
24314
24309
  return window.FronteggNativeBridge != null;
24315
24310
  }
24316
24311
 
@@ -24333,7 +24328,7 @@ class FronteggNativeModule {
24333
24328
  return this.isAvailable('suggestSavePassword');
24334
24329
  }
24335
24330
  isAvailable(method) {
24336
- if (this.isWebkitAvailable() || this.isJsInterfaceAvailable()) {
24331
+ if (this.isIOSNativeBridgeAvailable() || this.isAndroidNativeBridgeAvailable()) {
24337
24332
  var _window$FronteggNativ8, _window$FronteggNativ9;
24338
24333
  return (_window$FronteggNativ8 = (_window$FronteggNativ9 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ9[method]) != null ? _window$FronteggNativ8 : false;
24339
24334
  }
@@ -28088,7 +28083,7 @@ __webpack_require__.r(__webpack_exports__);
28088
28083
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
28089
28084
  /* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
28090
28085
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
28091
- /** @license Frontegg v7.50.0-alpha.0
28086
+ /** @license Frontegg v7.51.0
28092
28087
  *
28093
28088
  * This source code is licensed under the MIT license found in the
28094
28089
  * LICENSE file in the root directory of this source tree.
@@ -30718,7 +30713,7 @@ __webpack_require__.r(__webpack_exports__);
30718
30713
  /* harmony export */ });
30719
30714
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
30720
30715
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
30721
- /** @license Frontegg v7.50.0-alpha.0
30716
+ /** @license Frontegg v7.51.0
30722
30717
  *
30723
30718
  * This source code is licensed under the MIT license found in the
30724
30719
  * LICENSE file in the root directory of this source tree.