@colijnit/catalog 12.1.54 → 12.1.56

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.
@@ -49,8 +49,8 @@ class Version {
49
49
  constructor() {
50
50
  this.name = "@colijnit/catalog";
51
51
  this.description = "iOne Catalog module based on Angular 12";
52
- this.symVer = "12.1.54";
53
- this.publishDate = "6-12-2023 16:40:16";
52
+ this.symVer = "12.1.56";
53
+ this.publishDate = "15-12-2023 15:13:21";
54
54
  }
55
55
  }
56
56
 
@@ -98,15 +98,23 @@ class JsonUtils {
98
98
  try {
99
99
  const response = yield fetch(filePath);
100
100
  if (!response.ok) {
101
- console.error('Error getting translation:', response.statusText);
101
+ console.error('Error getting json file:', response.statusText);
102
102
  return '';
103
103
  }
104
104
  else {
105
- return response.json();
105
+ try {
106
+ const json = yield response.json().catch(() => {
107
+ return null;
108
+ });
109
+ return json;
110
+ }
111
+ catch (e) {
112
+ return null;
113
+ }
106
114
  }
107
115
  }
108
116
  catch (e) {
109
- console.error('Error getting translation:', e.message);
117
+ console.error('Error getting json file:', e.message);
110
118
  return '';
111
119
  }
112
120
  });
@@ -2520,6 +2528,20 @@ CatalogFilterContentGeneralComponent.decorators = [
2520
2528
 
2521
2529
  <div class="catalog-filter-wrapper">
2522
2530
  <div class="filter-items-wrapper co-small-scrollbar">
2531
+ <div class="filter-item-wrapper">
2532
+ <co-catalog-filter-item [placeholder]="'ARTICLENR'"
2533
+ [mode]="modes.TextField"
2534
+ [(model)]="catalogSearchService.searchRequest.articleNumber"
2535
+ >
2536
+ </co-catalog-filter-item>
2537
+ </div>
2538
+ <div class="filter-item-wrapper">
2539
+ <co-catalog-filter-item [placeholder]="'BARCODE'"
2540
+ [mode]="modes.TextField"
2541
+ [(model)]="catalogSearchService.searchRequest.barcode"
2542
+ >
2543
+ </co-catalog-filter-item>
2544
+ </div>
2523
2545
  <div class="filter-item-wrapper">
2524
2546
  <co-catalog-filter-item [placeholder]="'PRICE'"
2525
2547
  [mode]="modes.Slider"
@@ -3162,6 +3184,7 @@ class CatalogNavigationComponent {
3162
3184
  this._subs.push(this._adapterService.controllerInitialized.subscribe((initialized) => {
3163
3185
  if (initialized) {
3164
3186
  this.getCategories();
3187
+ this.getExternalSources();
3165
3188
  }
3166
3189
  }));
3167
3190
  }
@@ -3804,7 +3827,7 @@ CatalogSearchBaseComponent.propDecorators = {
3804
3827
  };
3805
3828
 
3806
3829
  class ArticleBaseComponent {
3807
- constructor(iconCache, catalogService, options, _iOne, _changeDetector, _appEventService, _imageService, _settingsService) {
3830
+ constructor(iconCache, catalogService, options, _iOne, _changeDetector, _appEventService, _imageService, _settingsService, _dictionaryService) {
3808
3831
  this.iconCache = iconCache;
3809
3832
  this.catalogService = catalogService;
3810
3833
  this.options = options;
@@ -3813,6 +3836,7 @@ class ArticleBaseComponent {
3813
3836
  this._appEventService = _appEventService;
3814
3837
  this._imageService = _imageService;
3815
3838
  this._settingsService = _settingsService;
3839
+ this._dictionaryService = _dictionaryService;
3816
3840
  this.icons = IconEnum;
3817
3841
  this.createFrozenArticle = true;
3818
3842
  this.isSelected = false;
@@ -3832,6 +3856,7 @@ class ArticleBaseComponent {
3832
3856
  this.configurable = false;
3833
3857
  this.threeD = false;
3834
3858
  this.valutaSymbol = '€';
3859
+ this.deliveryTimeLabel = ' ';
3835
3860
  this.inStock = false;
3836
3861
  }
3837
3862
  set article(value) {
@@ -3938,6 +3963,10 @@ class ArticleBaseComponent {
3938
3963
  }
3939
3964
  });
3940
3965
  }
3966
+ if (this._article.totalDeliveryDays !== null && this._article.totalDeliveryDays !== undefined && this._article.totalDeliveryDays !== 0) {
3967
+ this.deliveryTimeLabel = this._dictionaryService.get('DELIVERY_TIME_PERIOD') + ' ' + this._article.totalDeliveryDays
3968
+ + ' ' + this._dictionaryService.get('DAYS', false);
3969
+ }
3941
3970
  }
3942
3971
  }
3943
3972
  ArticleBaseComponent.decorators = [
@@ -3951,7 +3980,8 @@ ArticleBaseComponent.ctorParameters = () => [
3951
3980
  { type: ChangeDetectorRef },
3952
3981
  { type: CatalogEventService },
3953
3982
  { type: CatalogImageService },
3954
- { type: CatalogSettingsService }
3983
+ { type: CatalogSettingsService },
3984
+ { type: DictionaryService }
3955
3985
  ];
3956
3986
  ArticleBaseComponent.propDecorators = {
3957
3987
  article: [{ type: Input }],
@@ -4015,6 +4045,7 @@ CatalogArticleTileComponent.decorators = [
4015
4045
  <span [innerText]="article.articleNumber"></span>
4016
4046
  </div>
4017
4047
  <div [innerText]="stockLabel | localize" [class.in-stock]="inStock" (click)="handleStockDetailsButtonClick($event)"></div>
4048
+ <div [innerText]="deliveryTimeLabel"></div>
4018
4049
  </div>
4019
4050
  <div *ngIf="options.showAddArticleButton" class="on-article-buttons">
4020
4051
  <co-button *ngIf="!configurable"