@axinom/mosaic-portal 0.38.0 → 0.38.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.
@@ -31565,7 +31565,6 @@ new policy({
31565
31565
  });
31566
31566
  var PasswordPolicy_1 = policy;
31567
31567
  var charsets_1 = charsets;
31568
- var axauth = "data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Cpath%20fill%3D%22%2300467D%22%20d%3D%22M9.8%2C18.4c-0.7%2C2.4-2%2C5-3.8%2C7.8c-0.7%2C1.1-1.4%2C1.6-2%2C1.6c-0.9%2C0-1.4-0.7-1.5-1.9C1.8%2C21%2C8.1%2C8.6%2C11.3%2C9.4%20C12.7%2C9.7%2C10.2%2C17%2C9.8%2C18.4%20M3.5%2C30.8c1.1%2C0%2C3.6-0.7%2C5.7-5.6c0.9-1.6%2C1.2-2.7%2C1.6-3.2c1.1%2C4.1%2C2.7%2C5.9%2C4.7%2C6.3%20c1.9%2C0.4%2C2.7-0.3%2C3.4-0.6c2.3-1.9%2C2.3-2-0.5-1.4c-1.6%2C0.5-3.1-1.1-3.3-1.2c-1.7-1.9-2.2-4.5-2.2-8.9c0-0.8%2C0.1-2.1%2C0.3-3.8%20s0.3-3%2C0.3-3.8C13.4%2C6.9%2C13%2C6%2C12.1%2C6c-1.3%2C0-3.4%2C2.4-6.3%2C7.3C3%2C18%2C1.2%2C22.7%2C1%2C25.6C0.8%2C28%2C1.5%2C30.8%2C3.5%2C30.8%20M20%2C34%20c0.6%2C0%2C1.4-0.9%2C2.4-2.7c1.9-3.3%2C2.9-5%2C2.9-5c1.2-1.8%2C2.4-2.7%2C3.4-2.7c1.3%2C0.1%2C1.4%2C1.1%2C2.3%2C2.5c1.3%2C2%2C2.3%2C3.7%2C3%2C4.7l1.3-3%20c-0.9-1.2-0.7-0.8-2.1-2.7c-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C0.1%20c-0.3%2C0.8-0.5%2C1.7-0.5%2C2.5c-0.1%2C1.4%2C0%2C2.8%2C0.5%2C4.1C10.2%2C23.5%2C10.3%2C23.6%2C10.3%2C23.7z%22%2F%3E%3C%2Fsvg%3E";
31571
31570
  var imageNotFound = "data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20%20viewBox%3D%220%200%2040%2040%22%3E%3Cpath%20vector-effect%3D%22non-scaling-stroke%22%20fill%3D%22none%22%20stroke%3D%22%23B7B7B7%22%20stroke-width%3D%222%22%20%20d%3D%22M3%2C25.6l9.6-10.5%2C9.3%2C9.3h0M25.2%2C11.1c-1.2%2C0-2.3%2C1-2.3%2C2.3s1%2C2.3%2C2.3%2C2.3%2C2.3-1%2C2.3-2.3-1-2.3-2.3-2.3ZM33.4%2C17.4V7.3H3v25h17.9M25.4%2C32.7l11.6-11.6M37%2C32.7l-11.6-11.6%22%2F%3E%3C%2Fsvg%3E";
@@ -31799,7 +31798,6 @@ if (!style$5) {
31799
31798
  }
31800
31799
  }
31801
31800
  var DEFAULT_BG_IMAGE = MosaicBG;
31802
- _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, dist.IdentityProvider.AX_AUTH, axauth), dist.IdentityProvider.AZURE_AD, azure), dist.IdentityProvider.GOOGLE, google), dist.IdentityProvider.AXINOM, axinom);
31803
31801
  var getIdpImageUrl = function getIdpImageUrl(idpImageUrl) {
31804
31802
  switch (idpImageUrl) {
31805
31803
  case 'DEFAULT_AZURE':
@@ -31824,10 +31822,10 @@ var passwordPolicy = new PasswordPolicy_1({
31824
31822
  /**
31825
31823
  * Renders the login component
31826
31824
  */
31827
- var Login = function Login(_ref52) {
31828
- var providers = _ref52.providers,
31829
- brandingOptions = _ref52.brandingOptions,
31830
- isDirectSignInEnabled = _ref52.isDirectSignInEnabled;
31825
+ var Login = function Login(_ref51) {
31826
+ var providers = _ref51.providers,
31827
+ brandingOptions = _ref51.brandingOptions,
31828
+ isDirectSignInEnabled = _ref51.isDirectSignInEnabled;
31831
31829
  var _a, _b;
31832
31830
  var _useIdentityService5 = useIdentityService(),
31833
31831
  getIdpAuthUrl = _useIdentityService5.getIdpAuthUrl,
@@ -32212,8 +32210,8 @@ var Login = function Login(_ref52) {
32212
32210
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("img", {
32213
32211
  alt: idp.displayName,
32214
32212
  src: getIdpImageUrl(idp.idpImageUrl),
32215
- onError: function onError(_ref53) {
32216
- var currentTarget = _ref53.currentTarget;
32213
+ onError: function onError(_ref52) {
32214
+ var currentTarget = _ref52.currentTarget;
32217
32215
  currentTarget.onerror = null;
32218
32216
  currentTarget.src = imageNotFound;
32219
32217
  }
@@ -32409,21 +32407,21 @@ var ButtonContext;
32409
32407
  * @example
32410
32408
  * <TextButton type="button" text="Click me!" />
32411
32409
  */
32412
- var TextButton = function TextButton(_ref54) {
32413
- var _ref54$type = _ref54.type,
32414
- type = _ref54$type === void 0 ? 'button' : _ref54$type,
32415
- height = _ref54.height,
32416
- width = _ref54.width,
32417
- _ref54$buttonContext = _ref54.buttonContext,
32418
- buttonContext = _ref54$buttonContext === void 0 ? ButtonContext.Context : _ref54$buttonContext,
32419
- _ref54$disabled = _ref54.disabled,
32420
- disabled = _ref54$disabled === void 0 ? false : _ref54$disabled,
32421
- _ref54$text = _ref54.text,
32422
- text = _ref54$text === void 0 ? '' : _ref54$text,
32423
- className = _ref54.className,
32424
- _ref54$dataTestId = _ref54.dataTestId,
32425
- dataTestId = _ref54$dataTestId === void 0 ? undefined : _ref54$dataTestId,
32426
- onButtonClicked = _ref54.onButtonClicked;
32410
+ var TextButton = function TextButton(_ref53) {
32411
+ var _ref53$type = _ref53.type,
32412
+ type = _ref53$type === void 0 ? 'button' : _ref53$type,
32413
+ height = _ref53.height,
32414
+ width = _ref53.width,
32415
+ _ref53$buttonContext = _ref53.buttonContext,
32416
+ buttonContext = _ref53$buttonContext === void 0 ? ButtonContext.Context : _ref53$buttonContext,
32417
+ _ref53$disabled = _ref53.disabled,
32418
+ disabled = _ref53$disabled === void 0 ? false : _ref53$disabled,
32419
+ _ref53$text = _ref53.text,
32420
+ text = _ref53$text === void 0 ? '' : _ref53$text,
32421
+ className = _ref53.className,
32422
+ _ref53$dataTestId = _ref53.dataTestId,
32423
+ dataTestId = _ref53$dataTestId === void 0 ? undefined : _ref53$dataTestId,
32424
+ onButtonClicked = _ref53.onButtonClicked;
32427
32425
  var customStyles = {
32428
32426
  height: height,
32429
32427
  width: width
@@ -32453,9 +32451,9 @@ if (!style$1) {
32453
32451
  }
32454
32452
  }
32455
32453
  var localStorageKey = 'MOSAIC_PORTAL_CONFIG';
32456
- var EnvironmentInformationBox = function EnvironmentInformationBox(_ref55) {
32457
- var tenantId = _ref55.tenantId,
32458
- environmentId = _ref55.environmentId;
32454
+ var EnvironmentInformationBox = function EnvironmentInformationBox(_ref54) {
32455
+ var tenantId = _ref54.tenantId,
32456
+ environmentId = _ref54.environmentId;
32459
32457
  var _useState21 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),
32460
32458
  _useState22 = _slicedToArray(_useState21, 2),
32461
32459
  show = _useState22[0],
@@ -32542,9 +32540,9 @@ var Loading = function Loading() {
32542
32540
  * The content passed as children will be rendered only if authentication is successful.
32543
32541
  * @props brandingOptions: Includes companyLogo: image, background: colorCode|image to customize the login view
32544
32542
  */
32545
- var EnsureAuthentication = function EnsureAuthentication(_ref56) {
32546
- var children = _ref56.children,
32547
- brandingOptions = _ref56.brandingOptions;
32543
+ var EnsureAuthentication = function EnsureAuthentication(_ref55) {
32544
+ var children = _ref55.children,
32545
+ brandingOptions = _ref55.brandingOptions;
32548
32546
  var _useIdentityService6 = useIdentityService(),
32549
32547
  getToken = _useIdentityService6.getToken,
32550
32548
  getConfiguration = _useIdentityService6.getConfiguration,
@@ -32598,6 +32596,7 @@ var EnsureAuthentication = function EnsureAuthentication(_ref56) {
32598
32596
  case 14:
32599
32597
  _context11.prev = 14;
32600
32598
  _context11.t2 = _context11["catch"](1);
32599
+ // eslint-disable-next-line no-console
32601
32600
  console.error(_context11.t2);
32602
32601
  setIsProbableApiMismatch(true);
32603
32602
  case 18:
@@ -32644,7 +32643,14 @@ var EnsureAuthentication = function EnsureAuthentication(_ref56) {
32644
32643
  });
32645
32644
  } else if (!(tokenResponse === null || tokenResponse === void 0 ? void 0 : tokenResponse.user)) {
32646
32645
  content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Login, {
32647
- providers: configuration.providers,
32646
+ providers: configuration.providers.filter(function (provider) {
32647
+ // TODO: We filter out the Axinom provider when running on localhost until we have a proper solution for it (TASK ID: 45803)
32648
+ if (provider.idpId === dist.IdentityProvider.AXINOM && window.location.hostname === 'localhost') {
32649
+ return false;
32650
+ } else {
32651
+ return true;
32652
+ }
32653
+ }),
32648
32654
  brandingOptions: brandingOptions,
32649
32655
  isDirectSignInEnabled: configuration.isDirectSignInEnabled
32650
32656
  });
@@ -32692,10 +32698,10 @@ var PermissionDeniedError = function PermissionDeniedError() {
32692
32698
  * Renders the children only if the current user has the required permissions.
32693
32699
  * The component that will be shown when the permissions are insufficient can be defined through the `denied` prop.
32694
32700
  */
32695
- var EnsurePermission = function EnsurePermission(_ref57) {
32696
- var children = _ref57.children,
32697
- permissions = _ref57.permissions,
32698
- denied = _ref57.denied;
32701
+ var EnsurePermission = function EnsurePermission(_ref56) {
32702
+ var children = _ref56.children,
32703
+ permissions = _ref56.permissions,
32704
+ denied = _ref56.denied;
32699
32705
  var checkPermission = useHasPermissions();
32700
32706
  var _useState31 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
32701
32707
  _useState32 = _slicedToArray(_useState31, 2),
@@ -40573,7 +40579,7 @@ __webpack_require__.r(__webpack_exports__);
40573
40579
  /* harmony export */ });
40574
40580
  var shellInfo = {
40575
40581
  name: "@axinom/mosaic-portal",
40576
- version: "0.38.0"
40582
+ version: "0.38.1"
40577
40583
  };
40578
40584
 
40579
40585
  /***/ }),
@@ -45687,11 +45693,11 @@ function installPiralDebug(options) {
45687
45693
  debug: debugApiVersion,
45688
45694
  instance: {
45689
45695
  name: "@axinom/mosaic-portal",
45690
- version: "0.38.0",
45696
+ version: "0.38.1",
45691
45697
  dependencies: "react,react-dom,react-router,react-router-dom,tslib",
45692
45698
  },
45693
45699
  build: {
45694
- date: "2024-11-08T07:04:51.070Z",
45700
+ date: "2024-11-13T08:33:20.277Z",
45695
45701
  cli: "1.5.2",
45696
45702
  compat: "1",
45697
45703
  },
@@ -94132,4 +94138,4 @@ var App = function App() {
94132
94138
 
94133
94139
  /******/ })()
94134
94140
  ;
94135
- //# sourceMappingURL=index.3a7858.js.map
94141
+ //# sourceMappingURL=index.bedfc4.js.map