monkey-front-core 0.0.593 → 0.0.595

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable, InjectionToken, DEFAULT_CURRENCY_CODE, Inject, EventEmitter, Directive, Output, HostBinding, HostListener, forwardRef, Self, Optional, inject, SkipSelf, ErrorHandler } from '@angular/core';
2
+ import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable, InjectionToken, DEFAULT_CURRENCY_CODE, Inject, EventEmitter, Directive, Output, HostBinding, HostListener, forwardRef, Self, Optional, inject, SkipSelf, NgZone, ErrorHandler } from '@angular/core';
3
3
  import * as i1 from 'monkey-style-guide';
4
4
  import { MonkeyButtonModule, MonkeyModalModule, MonkeyIconModule, MonkeyInputModule, MonkeyRadioButtonModule, MonkeyOptionModule, MonkeyUtils, MonkeyStyleGuideModule, MonkeyStyleGuideModalService, MonkeyStyleGuideSettingsService, MonkeyStyleGuideSnackbarService } from 'monkey-style-guide';
5
5
  import * as i2 from '@angular/common';
@@ -5227,8 +5227,11 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
5227
5227
  }
5228
5228
  showMessage(message, error, mkc) {
5229
5229
  const { snackbarService } = this;
5230
+ console.log('#########');
5231
+ console.log(error.status);
5230
5232
  if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
5231
5233
  const keepOnUrlChange = error.status === 401;
5234
+ console.log('keepOnUrlChange', keepOnUrlChange);
5232
5235
  snackbarService.show({
5233
5236
  title: this.__i18n?.TITLE,
5234
5237
  message,
@@ -5259,6 +5262,9 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
5259
5262
  if (notifications) {
5260
5263
  customMessage = notifications;
5261
5264
  }
5265
+ console.log('@@@@@');
5266
+ console.log(error);
5267
+ console.log('@@@@@');
5262
5268
  if (!customMessage) {
5263
5269
  if (error.error instanceof Blob) {
5264
5270
  const blob = new Blob([error.error], {
@@ -5315,8 +5321,10 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
5315
5321
  handleErrorRefreshToken(error, mkc) {
5316
5322
  const hasToRefresh = this.monkeyecxAuthenticationService.refreshShouldHappen(error);
5317
5323
  if ((error.status === 401 || error.status === 400) && hasToRefresh) {
5318
- // NgZone.call(this.monkeyecxAuthenticationService.redirectLoginWelcomeBack(), {});
5319
- // this.handleMessage(error, mkc);
5324
+ NgZone.call(this.monkeyecxAuthenticationService.redirectLoginWelcomeBack(), {});
5325
+ setTimeout(() => {
5326
+ this.handleMessage(error, mkc);
5327
+ }, 1200);
5320
5328
  }
5321
5329
  else if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
5322
5330
  this.handleMessage(error, mkc);