monkey-front-core 0.0.38 → 0.0.42

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.
@@ -1401,6 +1401,8 @@ function MonkeyEcxCoreService(params) {
1401
1401
  const method = propertyDescriptor.value;
1402
1402
  propertyDescriptor.value = function (...args) {
1403
1403
  const context = this;
1404
+ console.log('context');
1405
+ console.log(context);
1404
1406
  if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
1405
1407
  context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
1406
1408
  context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials(params);
@@ -1767,7 +1769,7 @@ class MonkeyEcxCommonsService {
1767
1769
  }
1768
1770
  if (this.otherArgs?.router) {
1769
1771
  const { clearOnChangeRoute } = this.otherArgs?.schedule?.options || {
1770
- clearOnChangeRoute: false
1772
+ clearOnChangeRoute: false,
1771
1773
  };
1772
1774
  this.otherArgs.router.events
1773
1775
  .pipe(filter((event) => {
@@ -1819,21 +1821,21 @@ class MonkeyEcxCommonsService {
1819
1821
  403: 'forbidden',
1820
1822
  404: 'not-found',
1821
1823
  500: 'service-problems',
1822
- 503: 'service-problems'
1824
+ 503: 'service-problems',
1823
1825
  };
1824
1826
  if (!router) {
1825
1827
  console.error('Router must be declared');
1826
1828
  }
1827
1829
  else {
1828
1830
  router?.navigate([`/app/pages/${routes[statusCode]}`.toLowerCase()], {
1829
- skipLocationChange: true
1831
+ skipLocationChange: true,
1830
1832
  });
1831
1833
  }
1832
1834
  }
1833
1835
  setPage(requestPaged) {
1834
1836
  this.__requestPaged = {
1835
1837
  ...this.__requestPaged,
1836
- ...requestPaged
1838
+ ...requestPaged,
1837
1839
  };
1838
1840
  return this;
1839
1841
  }
@@ -1847,8 +1849,8 @@ class MonkeyEcxCommonsService {
1847
1849
  ...this.__requestPaged,
1848
1850
  page: {
1849
1851
  ...page,
1850
- number: number + 1
1851
- }
1852
+ number: number + 1,
1853
+ },
1852
1854
  };
1853
1855
  return true;
1854
1856
  }
@@ -1863,7 +1865,10 @@ class MonkeyEcxCommonsService {
1863
1865
  return new MonkeyEcxRequestPagedHandling(url, __requestPaged || {}).getRequestWithPagedParams();
1864
1866
  }
1865
1867
  clear(clearData) {
1868
+ console.log('----> clear');
1866
1869
  if (clearData) {
1870
+ console.log('veio clear data');
1871
+ console.log(this.__data);
1867
1872
  this.__data = null;
1868
1873
  this.__requestPaged = null;
1869
1874
  this.__params = null;
@@ -1882,9 +1887,9 @@ class MonkeyEcxCommonsService {
1882
1887
  this.flagValidator = false;
1883
1888
  }
1884
1889
  resolve(route, state, otherArgs) {
1885
- this.__data = null;
1886
- this.__page = null;
1887
- this.__requestPaged = null;
1890
+ //this.__data = null;
1891
+ //this.__page = null;
1892
+ //this.__requestPaged = null;
1888
1893
  this.flagValidator = true;
1889
1894
  if (this.tokenStorage) {
1890
1895
  this.__tokenCredentials = this.tokenStorage.getToken();
@@ -1904,8 +1909,8 @@ class MonkeyEcxCommonsService {
1904
1909
  this.setPage({
1905
1910
  page: {
1906
1911
  number: 0,
1907
- size: 10
1908
- }
1912
+ size: 10,
1913
+ },
1909
1914
  });
1910
1915
  }
1911
1916
  if (otherArgs?.callbackPagination) {
@@ -1913,8 +1918,8 @@ class MonkeyEcxCommonsService {
1913
1918
  if (!this.__onLoadingInProgress$.value) {
1914
1919
  const hasMorePages = this.setPage({
1915
1920
  page: {
1916
- ...this.__page
1917
- }
1921
+ ...this.__page,
1922
+ },
1918
1923
  }).nextPage();
1919
1924
  if (hasMorePages && otherArgs?.callbackPagination) {
1920
1925
  otherArgs.callbackPagination();
@@ -1956,7 +1961,7 @@ class MonkeyEcxCommonsService {
1956
1961
  getHTTPHeaderApplicationPDF() {
1957
1962
  return {
1958
1963
  observe: 'response',
1959
- responseType: 'blob'
1964
+ responseType: 'blob',
1960
1965
  };
1961
1966
  }
1962
1967
  genericMethod(link, data, callback) {
@@ -1983,9 +1988,7 @@ class MonkeyEcxCommonsService {
1983
1988
  });
1984
1989
  }
1985
1990
  geti18n(translateService, keys) {
1986
- translateService
1987
- .getStreamOnTranslationChange(keys)
1988
- .subscribe((translations) => {
1991
+ translateService.getStreamOnTranslationChange(keys).subscribe((translations) => {
1989
1992
  this.__i18n = translations;
1990
1993
  this.__oni18nDataChanged$.next(null);
1991
1994
  });
@@ -1994,8 +1997,8 @@ class MonkeyEcxCommonsService {
1994
1997
  __decorate([
1995
1998
  MonkeyEcxCoreService({
1996
1999
  requestInProgress: {
1997
- showProgress: true
1998
- }
2000
+ showProgress: true,
2001
+ },
1999
2002
  })
2000
2003
  ], MonkeyEcxCommonsService.prototype, "genericMethod", null);
2001
2004
 
@@ -3250,8 +3253,12 @@ class MonkeyEcxErrorHandlingService {
3250
3253
  const handlingService = injector.get(MonkeyEcxHandlingService);
3251
3254
  const httpErrorHandlingService = injector.get(MonkeyEcxHttpErrorHandlingService);
3252
3255
  const othersErrorsHandlingService = injector.get(MonkeyEcxOthersErrorsHandlingService);
3256
+ console.log('======error');
3257
+ console.log(error);
3253
3258
  if (error instanceof HttpErrorResponse) {
3254
3259
  const sCredentials = handlingService?.getMonkeyEcxServiceCredentials() || {};
3260
+ console.log('sCredentials');
3261
+ console.log(sCredentials);
3255
3262
  if (MonkeyEcxUtils.persistNullEmptyUndefined(type) && type === 'refresh_token') {
3256
3263
  httpErrorHandlingService.handleErrorRefreshToken(error, sCredentials);
3257
3264
  }