@colijnit/catalog 12.1.52 → 12.1.53

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.
@@ -30,8 +30,8 @@
30
30
  function Version() {
31
31
  this.name = "@colijnit/catalog";
32
32
  this.description = "iOne Catalog module based on Angular 12";
33
- this.symVer = "12.1.52";
34
- this.publishDate = "9-11-2023 10:43:48";
33
+ this.symVer = "12.1.53";
34
+ this.publishDate = "30-11-2023 11:19:44";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -4256,6 +4256,7 @@
4256
4256
  this._catalogEventService = _catalogEventService;
4257
4257
  this.iconCacheService = iconCacheService;
4258
4258
  this.icons = IconEnum;
4259
+ this.createFrozenArticle = true;
4259
4260
  this.showNavigation = false;
4260
4261
  this.showLandingPage = false;
4261
4262
  this.showFilter = false;
@@ -4297,8 +4298,8 @@
4297
4298
  case 1:
4298
4299
  _a.sent();
4299
4300
  this._catalogService.init(this._settings);
4300
- this._subs.push(this._catalogEventService.addArticleButtonClick.subscribe(function (json) {
4301
- _this.onAddArticleButtonClick.emit(json);
4301
+ this._subs.push(this._catalogEventService.addArticleButtonClick.subscribe(function (article) {
4302
+ _this.onAddArticleButtonClick.emit(article);
4302
4303
  }), this._catalogEventService.arButtonClick.subscribe(function (article) {
4303
4304
  _this.onArButtonClick.emit(article);
4304
4305
  }), this._catalogEventService.articleClick.subscribe(function (article) {
@@ -4330,7 +4331,7 @@
4330
4331
  CatalogSearchComponent.decorators = [
4331
4332
  { type: i0.Component, args: [{
4332
4333
  selector: 'co-catalog-search',
4333
- template: "\n <div class=\"catalog-search-wrapper\">\n <ng-container *ngIf=\"showFilter\">\n <div class=\"filter-content\" @showHideFilter>\n <div class=\"search-filter-panel-header-wrapper\">\n <div class=\"search-filter-panel-header\">\n <span [textContent]=\"'Filters'\"></span>\n <co-icon class=\"filter-reset-icon clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"\n (click)=\"handleResetButtonClick($event)\">\n </co-icon>\n </div>\n <co-icon class=\"clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.Cancel)\"\n (click)=\"showFilter = false\">\n </co-icon>\n </div>\n\n <!--filter-content-->\n <div class=\"search-filter-wrapper narrow-scrollbar\">\n <co-catalog-filter [showResetFilter]=\"true\"></co-catalog-filter>\n </div>\n </div>\n </ng-container>\n <div class=\"search-content-wrapper\" #contentView>\n <div class=\"search-header\">\n <div class=\"search-catalog-title-wrapper\">\n <div class=\"catalog-title-wrapper\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.WebCatalog)\"></co-icon>\n <div class=\"catalog-title\" [textContent]=\"title\"></div>\n </div>\n <div class=\"catalog-sub-title\" [textContent]=\"subTitle\"></div>\n </div>\n <co-catalog-search-header [placeholder]=\"searchPlaceholder\"\n (filterIconClick)=\"showFilter = !showFilter\"></co-catalog-search-header>\n </div>\n <ng-container *ngIf=\"showViewModes\">\n <button (click)=\"mode = 'tile'\">tile</button>\n <button (click)=\"mode = 'list'\">list</button>\n <button (click)=\"mode = 'grid'\">grid</button>\n </ng-container>\n <co-catalog-navigation *ngIf=\"showNavigation\"\n [view]=\"contentView\"\n (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"\n (externalSourceClick)=\"onExternalSourceClick.emit($event)\"\n ></co-catalog-navigation>\n <co-catalog-categories *ngIf=\"showLandingPage\" (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"></co-catalog-categories>\n <div class=\"search-content\">\n <ng-container *ngIf=\"mode === 'tile'\">\n <co-catalog-search-result-tile></co-catalog-search-result-tile>\n </ng-container>\n <ng-container *ngIf=\"mode === 'list'\">\n <co-catalog-search-result-list></co-catalog-search-result-list>\n </ng-container>\n <ng-container *ngIf=\"mode === 'grid'\">\n <!--\n <co-catalog-search-result></co-catalog-search-result>\n -->\n </ng-container>\n </div>\n </div>\n </div>\n ",
4334
+ template: "\n <div class=\"catalog-search-wrapper\">\n <ng-container *ngIf=\"showFilter\">\n <div class=\"filter-content\" @showHideFilter>\n <div class=\"search-filter-panel-header-wrapper\">\n <div class=\"search-filter-panel-header\">\n <span [textContent]=\"'Filters'\"></span>\n <co-icon class=\"filter-reset-icon clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"\n (click)=\"handleResetButtonClick($event)\">\n </co-icon>\n </div>\n <co-icon class=\"clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.Cancel)\"\n (click)=\"showFilter = false\">\n </co-icon>\n </div>\n\n <!--filter-content-->\n <div class=\"search-filter-wrapper narrow-scrollbar\">\n <co-catalog-filter [showResetFilter]=\"true\"></co-catalog-filter>\n </div>\n </div>\n </ng-container>\n <div class=\"search-content-wrapper\" #contentView>\n <div class=\"search-header\">\n <div class=\"search-catalog-title-wrapper\">\n <div class=\"catalog-title-wrapper\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.WebCatalog)\"></co-icon>\n <div class=\"catalog-title\" [textContent]=\"title\"></div>\n </div>\n <div class=\"catalog-sub-title\" [textContent]=\"subTitle\"></div>\n </div>\n <co-catalog-search-header [placeholder]=\"searchPlaceholder\"\n (filterIconClick)=\"showFilter = !showFilter\"></co-catalog-search-header>\n </div>\n <ng-container *ngIf=\"showViewModes\">\n <button (click)=\"mode = 'tile'\">tile</button>\n <button (click)=\"mode = 'list'\">list</button>\n <button (click)=\"mode = 'grid'\">grid</button>\n </ng-container>\n <co-catalog-navigation *ngIf=\"showNavigation\"\n [view]=\"contentView\"\n (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"\n (externalSourceClick)=\"onExternalSourceClick.emit($event)\"\n ></co-catalog-navigation>\n <co-catalog-categories *ngIf=\"showLandingPage\" (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"></co-catalog-categories>\n <div class=\"search-content\">\n <ng-container *ngIf=\"mode === 'tile'\">\n <co-catalog-search-result-tile\n [createFrozenArticle]=\"createFrozenArticle\"\n ></co-catalog-search-result-tile>\n </ng-container>\n <ng-container *ngIf=\"mode === 'list'\">\n <co-catalog-search-result-list\n [createFrozenArticle]=\"createFrozenArticle\"\n ></co-catalog-search-result-list>\n </ng-container>\n <ng-container *ngIf=\"mode === 'grid'\">\n <!--\n <co-catalog-search-result></co-catalog-search-result>\n -->\n </ng-container>\n </div>\n </div>\n </div>\n ",
4334
4335
  providers: [
4335
4336
  SelectSingleCacheService,
4336
4337
  SelectMultipleCacheService,
@@ -4369,6 +4370,7 @@
4369
4370
  title: [{ type: i0.Input }],
4370
4371
  subTitle: [{ type: i0.Input }],
4371
4372
  searchPlaceholder: [{ type: i0.Input }],
4373
+ createFrozenArticle: [{ type: i0.Input }],
4372
4374
  showNavigation: [{ type: i0.Input }],
4373
4375
  showLandingPage: [{ type: i0.Input }],
4374
4376
  showFilter: [{ type: i0.Input }],
@@ -4436,6 +4438,7 @@
4436
4438
  var CatalogSearchBaseComponent = /** @class */ (function () {
4437
4439
  function CatalogSearchBaseComponent(catalogSearchService) {
4438
4440
  this.catalogSearchService = catalogSearchService;
4441
+ this.createFrozenArticle = true;
4439
4442
  }
4440
4443
  CatalogSearchBaseComponent.prototype.onPreviousClick = function () {
4441
4444
  this.catalogSearchService.currentPage -= 1;
@@ -4453,12 +4456,16 @@
4453
4456
  ];
4454
4457
  CatalogSearchBaseComponent.ctorParameters = function () { return [
4455
4458
  { type: CatalogSearchService }
4456
- ]; };
4459
+ ]; };
4460
+ CatalogSearchBaseComponent.propDecorators = {
4461
+ createFrozenArticle: [{ type: i0.Input }]
4462
+ };
4457
4463
 
4458
4464
  var CatalogSearchResultTileComponent = /** @class */ (function (_super) {
4459
4465
  __extends(CatalogSearchResultTileComponent, _super);
4460
4466
  function CatalogSearchResultTileComponent() {
4461
4467
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
4468
+ _this.createFrozenArticle = true;
4462
4469
  _this.onLookAtArticleButtonClick = new i0.EventEmitter();
4463
4470
  _this.onArButtonClick = new i0.EventEmitter();
4464
4471
  _this.onAddArticleButtonClick = new i0.EventEmitter();
@@ -4473,11 +4480,12 @@
4473
4480
  CatalogSearchResultTileComponent.decorators = [
4474
4481
  { type: i0.Component, args: [{
4475
4482
  selector: 'co-catalog-search-result-tile',
4476
- template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-tile\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n (onArticleClick)=\"onArticleClick.emit($event)\"\n (onAddArticleButtonClick)=\"onAddArticleButtonClick.emit($event)\"\n (onArButtonClick)=\"onArButtonClick.emit($event)\"\n (onLookAtArticleButtonClick)=\"onLookAtArticleButtonClick.emit($event)\"\n (onStockDetailsClick)=\"onStockDetailsClick.emit($event)\"\n >\n </co-catalog-article-tile>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
4483
+ template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-tile\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [createFrozenArticle]=\"createFrozenArticle\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n (onArticleClick)=\"onArticleClick.emit($event)\"\n (onAddArticleButtonClick)=\"onAddArticleButtonClick.emit($event)\"\n (onArButtonClick)=\"onArButtonClick.emit($event)\"\n (onLookAtArticleButtonClick)=\"onLookAtArticleButtonClick.emit($event)\"\n (onStockDetailsClick)=\"onStockDetailsClick.emit($event)\"\n >\n </co-catalog-article-tile>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
4477
4484
  encapsulation: i0.ViewEncapsulation.None
4478
4485
  },] }
4479
4486
  ];
4480
4487
  CatalogSearchResultTileComponent.propDecorators = {
4488
+ createFrozenArticle: [{ type: i0.Input }],
4481
4489
  onLookAtArticleButtonClick: [{ type: i0.Output }],
4482
4490
  onArButtonClick: [{ type: i0.Output }],
4483
4491
  onAddArticleButtonClick: [{ type: i0.Output }],
@@ -4498,6 +4506,7 @@
4498
4506
  this._imageService = _imageService;
4499
4507
  this._settingsService = _settingsService;
4500
4508
  this.icons = IconEnum;
4509
+ this.createFrozenArticle = true;
4501
4510
  this.isSelected = false;
4502
4511
  this.isSmallModus = false;
4503
4512
  this.hasMagnifierButton = false;
@@ -4564,12 +4573,18 @@
4564
4573
  switch (_a.label) {
4565
4574
  case 0:
4566
4575
  event.stopPropagation();
4576
+ if (!this.createFrozenArticle) return [3 /*break*/, 2];
4567
4577
  return [4 /*yield*/, this._getJSONFromArticleObject(this.article)];
4568
4578
  case 1:
4569
4579
  json = _a.sent();
4570
4580
  this._appEventService.addArticleButtonClick.next(json);
4571
4581
  this.onAddArticleButtonClick.emit(json);
4572
- return [2 /*return*/];
4582
+ return [3 /*break*/, 3];
4583
+ case 2:
4584
+ this._appEventService.addArticleButtonClick.next(this.article);
4585
+ this.onAddArticleButtonClick.emit(this.article);
4586
+ _a.label = 3;
4587
+ case 3: return [2 /*return*/];
4573
4588
  }
4574
4589
  });
4575
4590
  });
@@ -4659,6 +4674,7 @@
4659
4674
  article: [{ type: i0.Input }],
4660
4675
  showing: [{ type: i0.Input }],
4661
4676
  imageData: [{ type: i0.Input }],
4677
+ createFrozenArticle: [{ type: i0.Input }],
4662
4678
  price: [{ type: i0.Input }],
4663
4679
  isSelected: [{ type: i0.Input }],
4664
4680
  isSmallModus: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.small-modus',] }],
@@ -4894,7 +4910,7 @@
4894
4910
  CatalogSearchResultListComponent.decorators = [
4895
4911
  { type: i0.Component, args: [{
4896
4912
  selector: 'co-catalog-search-result-list',
4897
- template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-list\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n >\n </co-catalog-article-list>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
4913
+ template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-list\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [createFrozenArticle]=\"createFrozenArticle\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n >\n </co-catalog-article-list>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
4898
4914
  encapsulation: i0.ViewEncapsulation.None
4899
4915
  },] }
4900
4916
  ];
@@ -5073,8 +5089,10 @@
5073
5089
  });
5074
5090
  CatalogExternalSourceComponent.prototype.ngOnInit = function () {
5075
5091
  var _this = this;
5076
- this._subs.push(this._appEventService.addArticleButtonClick.subscribe(function (json) {
5077
- _this.addArticleClick.next(json);
5092
+ this._subs.push(this._appEventService.addArticleButtonClick.subscribe(function (article) {
5093
+ if (!(article instanceof articleExtended_bo.ArticleExtended)) {
5094
+ _this.addArticleClick.next(article);
5095
+ }
5078
5096
  }));
5079
5097
  };
5080
5098
  CatalogExternalSourceComponent.prototype.handleArticleClick = function (article) {