@colijnit/catalog 255.1.3 → 255.1.4

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 = "255.1.3";
34
- this.publishDate = "13/08/2024, 09:50:34";
33
+ this.symVer = "255.1.4";
34
+ this.publishDate = "23/08/2024, 12:48:49";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -3319,6 +3319,8 @@
3319
3319
  this.searchTextChanged = new rxjs.Subject();
3320
3320
  this.showPageChanged = new rxjs.Subject();
3321
3321
  this.onResetFilters = new rxjs.Subject();
3322
+ this.activeStockViewSubject = new rxjs.BehaviorSubject(undefined);
3323
+ this.activeStockView = this.activeStockViewSubject.asObservable();
3322
3324
  this._currentPage = 1;
3323
3325
  this._filterText = [];
3324
3326
  this.minMillisBetweenArticleSearches = 400;
@@ -3494,6 +3496,9 @@
3494
3496
  this.showCatOrTurnoverGroupArticles = false;
3495
3497
  this.showExternalSource = false;
3496
3498
  };
3499
+ CatalogService.prototype.setActiveStockView = function (value) {
3500
+ this.activeStockViewSubject.next(value);
3501
+ };
3497
3502
  return CatalogService;
3498
3503
  }());
3499
3504
  CatalogService.decorators = [
@@ -3507,7 +3512,14 @@
3507
3512
  { type: CatalogImageService },
3508
3513
  { type: CatalogFilterService },
3509
3514
  { type: CatalogSearchService }
3510
- ]; };
3515
+ ]; };
3516
+ exports.StockView = void 0;
3517
+ (function (StockView) {
3518
+ StockView["PriceCards"] = "PriceCards";
3519
+ StockView["StockOverview"] = "StockOverview";
3520
+ StockView["WarehouseTransfers"] = "WarehouseTransfers";
3521
+ StockView["StockComparison"] = "StockComparison";
3522
+ })(exports.StockView || (exports.StockView = {}));
3511
3523
 
3512
3524
  var CatalogCategoriesComponent = /** @class */ (function () {
3513
3525
  function CatalogCategoriesComponent(_catalogService, _adapterService) {
@@ -3687,14 +3699,15 @@
3687
3699
  ]; };
3688
3700
 
3689
3701
  var CatalogFilterComponent = /** @class */ (function () {
3690
- function CatalogFilterComponent(iconCache, _settingsService, changeDetector, _catalogConnectorService, _adapterService, searchService) {
3702
+ function CatalogFilterComponent(iconCache, catalogService, searchService, _settingsService, changeDetector, _catalogConnectorService, _adapterService) {
3691
3703
  var _this = this;
3692
3704
  this.iconCache = iconCache;
3705
+ this.catalogService = catalogService;
3706
+ this.searchService = searchService;
3693
3707
  this._settingsService = _settingsService;
3694
3708
  this.changeDetector = changeDetector;
3695
3709
  this._catalogConnectorService = _catalogConnectorService;
3696
3710
  this._adapterService = _adapterService;
3697
- this.searchService = searchService;
3698
3711
  this.icons = IconEnum;
3699
3712
  this.updatePreset = false;
3700
3713
  this.showResetFilter = true;
@@ -3709,6 +3722,9 @@
3709
3722
  if (initialized) {
3710
3723
  _this.getUserGroups();
3711
3724
  }
3725
+ }), this.catalogService.activeStockView.subscribe(function (value) {
3726
+ _this.activeStockView = value;
3727
+ _this._showActiveCategory();
3712
3728
  }));
3713
3729
  }
3714
3730
  CatalogFilterComponent.prototype.showClass = function () {
@@ -3725,12 +3741,6 @@
3725
3741
  x.unsubscribe();
3726
3742
  });
3727
3743
  };
3728
- CatalogFilterComponent.prototype.getUserGroups = function () {
3729
- var _this = this;
3730
- this._catalogConnectorService.getUserGroups().then(function (userGroups) {
3731
- _this.userGroupCollection = userGroups;
3732
- });
3733
- };
3734
3744
  CatalogFilterComponent.prototype.handleCategoryClick = function (cat) {
3735
3745
  if (cat === 'Algemeen') {
3736
3746
  this.filterItems.nativeElement.scrollLeft = this.generalFilter.nativeElement.offsetLeft - this.filterItems.nativeElement.offsetLeft;
@@ -3742,6 +3752,17 @@
3742
3752
  this.filterItems.nativeElement.scrollLeft = this.logisticsFilter.nativeElement.offsetLeft - this.filterItems.nativeElement.offsetLeft;
3743
3753
  }
3744
3754
  };
3755
+ CatalogFilterComponent.prototype.getUserGroups = function () {
3756
+ var _this = this;
3757
+ this._catalogConnectorService.getUserGroups().then(function (userGroups) {
3758
+ _this.userGroupCollection = userGroups;
3759
+ });
3760
+ };
3761
+ CatalogFilterComponent.prototype._showActiveCategory = function () {
3762
+ if (this.filterItems && this.activeStockView !== undefined) {
3763
+ this.filterItems.nativeElement.scrollLeft = this.logisticsFilter.nativeElement.offsetLeft - this.filterItems.nativeElement.offsetLeft;
3764
+ }
3765
+ };
3745
3766
  CatalogFilterComponent.prototype.detectChanges = function () {
3746
3767
  if (!this._destroyed) {
3747
3768
  this.changeDetector.detectChanges();
@@ -3752,7 +3773,7 @@
3752
3773
  CatalogFilterComponent.decorators = [
3753
3774
  { type: i0.Component, args: [{
3754
3775
  selector: 'co-catalog-filter',
3755
- template: "\n <!--<div class=\"preset-button\">\n <co-button [iconData]=\"iconCache.getIcon(icons.MagicWand)\"\n (onClick)=\"loadSelectedPreset()\">\n </co-button>\n <co-button [iconData]=\"iconCache.getIcon(icons.Check)\"\n (onClick)=\"showSavePresetPopup()\">\n </co-button>\n </div>-->\n <div class=\"catalog-filter-categories\">\n <co-catalog-filter-categories [categories]=\"filterCategories\"\n (categoryClick)=\"handleCategoryClick($event)\"></co-catalog-filter-categories>\n </div>\n <div #filterItems class=\"catalog-category-filter-wrapper\" data-ride=\"carousel\">\n <div #generalFilter class=\"catalog-filter-category-content\">\n <co-catalog-filter-content-general></co-catalog-filter-content-general>\n </div>\n <div #purchaseFilter class=\"catalog-filter-category-content\">\n <co-catalog-filter-content-purchase></co-catalog-filter-content-purchase>\n </div>\n <div #logisticsFilter class=\"catalog-filter-category-content\">\n <co-catalog-filter-content-logistics></co-catalog-filter-content-logistics>\n </div>\n </div> \n \n <!--<co-dialog *ngIf=\"showSavePopup\" [headerTemplate]=\"headerTemplate\" [footerTemplate]=\"footerTemplate\" (closeClick)=\"cancelClicked()\">\n <ng-template #headerTemplate>\n <span class=\"header\" [textContent]=\"'SAVE_PRESET' | localize\"></span>\n </ng-template>\n \n <div class=\"save-dialog-contents\">\n <co-input-text \n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [(model)]=\"searchService.currentPreset.name\"\n [label]=\"'PRESET_NAME' | localize\"\n [placeholder]=\"'PRESET_NAME' | localize\"\n ></co-input-text>\n <co-list-of-values [collection]=\"userGroupCollection\" \n [displayField]=\"'description'\"\n [label]=\"'USERGROUPS'| localize\"\n [(model)]=\"userGroupsChosen\"\n (modelChange)=\"userGroupsChanged()\"\n [multiselect]=\"true\"\n ></co-list-of-values>\n &lt;!&ndash;<co-input-checkbox *ngIf=\"updatePreset\"\n [(model)]=\"searchService.currentPreset.default\"\n [label]=\"'SAVE_AS_NEW' | localize\"\n ></co-input-checkbox> &ndash;&gt;\n </div>\n \n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <ng-container >\n <co-button [label]=\"'SAVE' | localize\" (click)=\"saveClicked()\"></co-button>\n <co-button [label]=\"'CANCEL' | localize\" (click)=\"cancelClicked()\"></co-button>\n </ng-container>\n </div>\n </ng-template>\n </co-dialog> --> \n ",
3776
+ template: "\n <!--<div class=\"preset-button\">\n <co-button [iconData]=\"iconCache.getIcon(icons.MagicWand)\"\n (onClick)=\"loadSelectedPreset()\">\n </co-button>\n <co-button [iconData]=\"iconCache.getIcon(icons.Check)\"\n (onClick)=\"showSavePresetPopup()\">\n </co-button>\n </div>-->\n <div class=\"catalog-filter-categories\">\n <co-catalog-filter-categories\n [categories]=\"filterCategories\"\n (categoryClick)=\"handleCategoryClick($event)\">\n </co-catalog-filter-categories>\n </div>\n \n <div #filterItems class=\"catalog-category-filter-wrapper\" data-ride=\"carousel\">\n <div #generalFilter class=\"catalog-filter-category-content\">\n <co-catalog-filter-content-general></co-catalog-filter-content-general>\n </div>\n <div #purchaseFilter class=\"catalog-filter-category-content\">\n <co-catalog-filter-content-purchase></co-catalog-filter-content-purchase>\n </div>\n <div #logisticsFilter class=\"catalog-filter-category-content\">\n <co-catalog-filter-content-logistics></co-catalog-filter-content-logistics>\n </div>\n </div>\n\n <!--<co-dialog *ngIf=\"showSavePopup\" [headerTemplate]=\"headerTemplate\" [footerTemplate]=\"footerTemplate\" (closeClick)=\"cancelClicked()\">\n <ng-template #headerTemplate>\n <span class=\"header\" [textContent]=\"'SAVE_PRESET' | localize\"></span>\n </ng-template>\n \n <div class=\"save-dialog-contents\">\n <co-input-text \n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [(model)]=\"searchService.currentPreset.name\"\n [label]=\"'PRESET_NAME' | localize\"\n [placeholder]=\"'PRESET_NAME' | localize\"\n ></co-input-text>\n <co-list-of-values [collection]=\"userGroupCollection\" \n [displayField]=\"'description'\"\n [label]=\"'USERGROUPS'| localize\"\n [(model)]=\"userGroupsChosen\"\n (modelChange)=\"userGroupsChanged()\"\n [multiselect]=\"true\"\n ></co-list-of-values>\n &lt;!&ndash;<co-input-checkbox *ngIf=\"updatePreset\"\n [(model)]=\"searchService.currentPreset.default\"\n [label]=\"'SAVE_AS_NEW' | localize\"\n ></co-input-checkbox> &ndash;&gt;\n </div>\n \n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <ng-container >\n <co-button [label]=\"'SAVE' | localize\" (click)=\"saveClicked()\"></co-button>\n <co-button [label]=\"'CANCEL' | localize\" (click)=\"cancelClicked()\"></co-button>\n </ng-container>\n </div>\n </ng-template>\n </co-dialog> -->\n ",
3756
3777
  animations: [
3757
3778
  animations.trigger('showFilterItem', [
3758
3779
  animations.state('closed', animations.style({ height: '80px' })),
@@ -3765,11 +3786,12 @@
3765
3786
  ];
3766
3787
  CatalogFilterComponent.ctorParameters = function () { return [
3767
3788
  { type: IconCacheService },
3789
+ { type: CatalogService },
3790
+ { type: CatalogSearchService },
3768
3791
  { type: CatalogSettingsService },
3769
3792
  { type: i0.ChangeDetectorRef },
3770
3793
  { type: CatalogConnectorService },
3771
- { type: CatalogConnectorAdapterService },
3772
- { type: CatalogSearchService }
3794
+ { type: CatalogConnectorAdapterService }
3773
3795
  ]; };
3774
3796
  CatalogFilterComponent.propDecorators = {
3775
3797
  filterItems: [{ type: i0.ViewChild, args: ['filterItems', { read: i0.ElementRef },] }],
@@ -4212,28 +4234,41 @@
4212
4234
  ];
4213
4235
 
4214
4236
  var CatalogFilterContentLogisticsComponent = /** @class */ (function () {
4215
- function CatalogFilterContentLogisticsComponent(catalogSearchService, iconCache) {
4237
+ function CatalogFilterContentLogisticsComponent(catalogSearchService, iconCache, catalogService) {
4216
4238
  this.catalogSearchService = catalogSearchService;
4217
4239
  this.iconCache = iconCache;
4240
+ this.catalogService = catalogService;
4218
4241
  this.modes = corecomponents_v12.FilterItemMode;
4219
4242
  this.icons = IconEnum;
4243
+ this.StockView = exports.StockView;
4244
+ this._subs = [];
4220
4245
  }
4221
4246
  CatalogFilterContentLogisticsComponent.prototype.showClass = function () {
4222
4247
  return true;
4223
4248
  };
4224
4249
  CatalogFilterContentLogisticsComponent.prototype.ngOnInit = function () {
4250
+ var _this = this;
4251
+ this._subs.push(this.catalogService.activeStockView.subscribe(function (value) {
4252
+ _this.activeStockView = value;
4253
+ }));
4254
+ };
4255
+ CatalogFilterContentLogisticsComponent.prototype.ngOnDestroy = function () {
4256
+ this._subs.forEach(function (x) {
4257
+ x.unsubscribe();
4258
+ });
4225
4259
  };
4226
4260
  return CatalogFilterContentLogisticsComponent;
4227
4261
  }());
4228
4262
  CatalogFilterContentLogisticsComponent.decorators = [
4229
4263
  { type: i0.Component, args: [{
4230
4264
  selector: 'co-catalog-filter-content-logistics',
4231
- template: "\n <div class=\"catalog-filter-content-logistics-wrapper catalog-filter-content-wrapper\">\n\n <div class=\"catalog-filter-wrapper\">\n <div class=\"filter-items-wrapper co-small-scrollbar\">\n \n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item [placeholder]=\"'SERIALNUMBER'\"\n [mode]=\"modes.TextField\"\n [(model)]=\"catalogSearchService.searchRequest.serialNumber\">\n </co-catalog-filter-item> \n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item [placeholder]=\"'BATCH_NUMBER'\"\n [mode]=\"modes.TextField\"\n [(model)]=\"catalogSearchService.searchRequest.batchNumber\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item [placeholder]=\"'MUTATION_DATE'\"\n [mode]=\"modes.DateField\"\n [(model)]=\"catalogSearchService.searchRequest.dateModified\">\n </co-catalog-filter-item>\n </div> \n </div>\n </div> \n </div>\n "
4265
+ template: "\n <div class=\"catalog-filter-content-logistics-wrapper catalog-filter-content-wrapper\">\n\n <div class=\"catalog-filter-wrapper\">\n <div class=\"filter-items-wrapper co-small-scrollbar\">\n\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'SERIALNUMBER'\"\n [mode]=\"modes.TextField\"\n [(model)]=\"catalogSearchService.searchRequest.serialNumber\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'BATCH_NUMBER'\"\n [mode]=\"modes.TextField\"\n [(model)]=\"catalogSearchService.searchRequest.batchNumber\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'MUTATION_DATE'\"\n [mode]=\"modes.DateField\"\n [(model)]=\"catalogSearchService.searchRequest.dateModified\">\n </co-catalog-filter-item>\n </div>\n\n <ng-container *ngIf=\"activeStockView === StockView.PriceCards\">\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'UPDATE_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'STOCK_MUTATION_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n </ng-container>\n <ng-container *ngIf=\"activeStockView === StockView.StockOverview\">\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'UPDATE_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'STOCK_MUTATION_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'WAREHOUSE'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'STOCK_STATUS'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'SERIAL_NUMBER'\"\n [mode]=\"modes.TextField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'BATCH_NO'\"\n [mode]=\"modes.TextField\">\n </co-catalog-filter-item>\n </div>\n </ng-container>\n <ng-container *ngIf=\"activeStockView === StockView.WarehouseTransfers\">\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'UPDATE_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'STOCK_MUTATION_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'STOCK_STATUS'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'SERIAL_NUMBER'\"\n [mode]=\"modes.TextField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'BATCH_NO'\"\n [mode]=\"modes.TextField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'SOURCE_WAREHOUSE'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'TARGET_WAREHOUSE'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n </ng-container>\n <ng-container *ngIf=\"activeStockView === StockView.StockComparison\">\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'UPDATE_DATE'\"\n [mode]=\"modes.DateRangeField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'STOCK_STATUS'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'SERIAL_NUMBER'\"\n [mode]=\"modes.TextField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'BATCH_NO'\"\n [mode]=\"modes.TextField\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'SOURCE_WAREHOUSE'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n <div class=\"filter-item-wrapper\">\n <co-catalog-filter-item\n [placeholder]=\"'TARGET_WAREHOUSE'\"\n [mode]=\"modes.Filterlist\">\n </co-catalog-filter-item>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n "
4232
4266
  },] }
4233
4267
  ];
4234
4268
  CatalogFilterContentLogisticsComponent.ctorParameters = function () { return [
4235
4269
  { type: CatalogSearchService },
4236
- { type: IconCacheService }
4270
+ { type: IconCacheService },
4271
+ { type: CatalogService }
4237
4272
  ]; };
4238
4273
  CatalogFilterContentLogisticsComponent.propDecorators = {
4239
4274
  showClass: [{ type: i0.HostBinding, args: ['class.co-catalog-filter',] }],