wt-front-shared 19.0.9 → 19.0.11

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.
@@ -1843,7 +1843,6 @@ class Behavior {
1843
1843
  }
1844
1844
  }
1845
1845
 
1846
- ;
1847
1846
  class LoginSendBehavior extends Behavior {
1848
1847
  constructor(action, result) {
1849
1848
  super(action);
@@ -1856,13 +1855,19 @@ class LoginSendBehavior extends Behavior {
1856
1855
  switch (status) {
1857
1856
  case ResponseStatus.STATUS_200: {
1858
1857
  const response = this.result.data;
1859
- const { user, services } = response.body?.['data'];
1858
+ const user = response.body?.user;
1859
+ const services = response.body?.services;
1860
1860
  // const userData: UserModel = this.modelAdapter.convertItem<UserModel, UserModel>(UserModel, user);
1861
- console.log('response.body', response.body);
1862
- console.log('user, services', user, services);
1863
- returnedActions = [
1864
- LoginSendSuccess({ payload: { user, services } })
1865
- ];
1861
+ if (user) {
1862
+ returnedActions = [
1863
+ LoginSendSuccess({ payload: { user, services } })
1864
+ ];
1865
+ }
1866
+ else {
1867
+ returnedActions = [
1868
+ LoginSendFail({ payload: { error: 'incorrect-response' } })
1869
+ ];
1870
+ }
1866
1871
  break;
1867
1872
  }
1868
1873
  case ResponseStatus.STATUS_400:
@@ -2021,16 +2026,6 @@ class BaseAPIService {
2021
2026
  }
2022
2027
  });
2023
2028
  }
2024
- console.log('base-api.updateRequestData', {
2025
- endPointUrl,
2026
- itemId,
2027
- secondEndPointUrl,
2028
- formId: response?.body?.meta?.formId || formId,
2029
- method: params.httpMethod,
2030
- status: this.statuses.LOADED,
2031
- data: response?.body?.data,
2032
- subRouting
2033
- });
2034
2029
  this.requestsFacade.updateRequestData({
2035
2030
  endPointUrl,
2036
2031
  itemId,
@@ -6527,7 +6522,6 @@ class AutoFormService extends BaseAutoFormService {
6527
6522
  itemId = +form.get('id').value;
6528
6523
  }
6529
6524
  const type = options.type;
6530
- console.log('itemValueExistsValidator', options, value);
6531
6525
  // If the value for this type is checked before not need to do this checking again
6532
6526
  if (this.validatorsData[type] && this.validatorsData[type].value === value && this.validatorsData[type].valid) {
6533
6527
  return Promise.resolve();
@@ -8817,7 +8811,6 @@ class FormFieldSelectShowComponent {
8817
8811
  }
8818
8812
  }
8819
8813
  getItemsFromStore(keyFromStore, ids) {
8820
- console.log('[wt-front-shared][getItemsFromStore]', keyFromStore, ids);
8821
8814
  this.coreFacade.getStoreByName(keyFromStore)
8822
8815
  .pipe(untilComponentDestroyed(this))
8823
8816
  .subscribe(items => {
@@ -10719,7 +10712,6 @@ class AutoFormMainComponent {
10719
10712
  const newSubscription = this.formErrors.getFormErrors(this.formId)
10720
10713
  .pipe(filter((errors) => !!(errors && errors.length)))
10721
10714
  .subscribe((errors) => {
10722
- console.log('subscribeToFormErrors.errors', errors);
10723
10715
  if (errors && errors.length) {
10724
10716
  errors.forEach(error => {
10725
10717
  const { field, code } = error;
@@ -12270,7 +12262,6 @@ class StaticDataDetailsComponent {
12270
12262
  this.currentUserData = this.authService.currentUserValue;
12271
12263
  }
12272
12264
  ngOnInit() {
12273
- console.log('currentUserData', this.currentUserData);
12274
12265
  this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
12275
12266
  this.loadStaticDataConfiguration();
12276
12267
  this.init();
@@ -12362,7 +12353,6 @@ class StaticDataDetailsComponent {
12362
12353
  }
12363
12354
  }).afterClosed().toPromise()
12364
12355
  .then((result) => {
12365
- console.log('result', result);
12366
12356
  /*if (result) {
12367
12357
  this.publicationMessagesFacade.unPublishPost('static-data', this.itemId, this.contentType);
12368
12358
  }*/
@@ -14018,18 +14008,6 @@ class HeadersInterceptor {
14018
14008
  else {
14019
14009
  subRouting = urlParams2[3];
14020
14010
  }
14021
- console.log('header.updateRequestData', {
14022
- endPointUrl,
14023
- error,
14024
- formId,
14025
- subRouting,
14026
- url: urlParams[1],
14027
- method: httpMethod.toLowerCase(),
14028
- itemId: itemIdOrSlug,
14029
- status: RequestStatus.LOADED,
14030
- secondEndPointUrl: secondEndPointUrl,
14031
- data: errorData
14032
- });
14033
14011
  this.requestsFacade.updateRequestData({
14034
14012
  endPointUrl,
14035
14013
  error,