@colijnit/catalog 12.1.40 → 12.1.41

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.40";
34
- this.publishDate = "1-8-2023 18:53:26";
33
+ this.symVer = "12.1.41";
34
+ this.publishDate = "4-8-2023 13:39:38";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -2553,7 +2553,6 @@
2553
2553
  this.articles = [];
2554
2554
  this.articlesPerPage = 20;
2555
2555
  this._currentPage = 1;
2556
- this._filterText = [];
2557
2556
  this._subs = [];
2558
2557
  this._subs.push(this._optionService.parametersSet.subscribe(function (isSet) {
2559
2558
  if (isSet) {
@@ -2596,7 +2595,7 @@
2596
2595
  },
2597
2596
  set: function (value) {
2598
2597
  this._currentPage = value;
2599
- this.searchArticles();
2598
+ this.searchArticles(false);
2600
2599
  },
2601
2600
  enumerable: false,
2602
2601
  configurable: true
@@ -2604,18 +2603,23 @@
2604
2603
  CatalogSearchService.prototype.ngOnDestroy = function () {
2605
2604
  this._subs.forEach(function (s) { return s.unsubscribe(); });
2606
2605
  };
2607
- CatalogSearchService.prototype.searchArticles = function (getFilters) {
2606
+ CatalogSearchService.prototype.searchArticles = function (resetPaging) {
2608
2607
  var _this = this;
2609
- if (getFilters === void 0) { getFilters = true; }
2610
- var lowerBound = ((this.currentPage - 1) * this.articlesPerPage) + 1;
2608
+ if (resetPaging === void 0) { resetPaging = true; }
2609
+ var lowerBound;
2610
+ if (!resetPaging) {
2611
+ lowerBound = ((this.currentPage - 1) * this.articlesPerPage) + 1;
2612
+ }
2613
+ else {
2614
+ this._currentPage = 1;
2615
+ lowerBound = 1;
2616
+ }
2611
2617
  this.searchRequest.paging = new pagingParameters.PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
2612
2618
  this._catalogConnectorService.getArticlesForCatalog(this.searchRequest).then(function (result) {
2613
2619
  var _a, _b;
2614
2620
  _this.articles = (_a = result.articles) !== null && _a !== void 0 ? _a : [];
2615
2621
  _this.resultCount = (_b = result.count) !== null && _b !== void 0 ? _b : undefined;
2616
- //if (this._settingsService.settings.options.showFilter && getFilters) {
2617
2622
  _this._filterService.getFilters(_this.searchRequest);
2618
- //}
2619
2623
  });
2620
2624
  };
2621
2625
  CatalogSearchService.prototype.resetFilters = function (search) {
@@ -2626,16 +2630,6 @@
2626
2630
  this.searchArticles();
2627
2631
  }
2628
2632
  };
2629
- CatalogSearchService.prototype._resetRequest = function () {
2630
- this.searchRequest = new articleExtendedRequest.ArticleExtendedRequest();
2631
- };
2632
- // public get fullscreen(): boolean {
2633
- // return this.activeSearchViewMode === SearchViewMode.FullScreen;
2634
- // }
2635
- //
2636
- // public get collapsed(): boolean {
2637
- // return this.activeSearchBarViewMode === SearchbarViewMode.Collapsed;
2638
- // }
2639
2633
  CatalogSearchService.prototype.toggleFilter = function () {
2640
2634
  this.showFilterSidebar = !this.showFilterSidebar;
2641
2635
  };
@@ -2650,6 +2644,9 @@
2650
2644
  _this.showFilterSidebar = true;
2651
2645
  }, 10);
2652
2646
  };
2647
+ CatalogSearchService.prototype._resetRequest = function () {
2648
+ this.searchRequest = new articleExtendedRequest.ArticleExtendedRequest();
2649
+ };
2653
2650
  CatalogSearchService.prototype._setRequestParametersAndProps = function (category, turnoverGroup, searchText) {
2654
2651
  this.searchRequest.category = category;
2655
2652
  this.searchRequest.turnoverGroup = turnoverGroup;