@colijnit/corecomponents_v12 260.1.8 → 260.1.9

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.
@@ -12398,22 +12398,8 @@
12398
12398
  },] }
12399
12399
  ];
12400
12400
 
12401
- // Values are corresponding dictionary keys in text_nl.
12402
- var BatchDeliveryCategory;
12403
- (function (BatchDeliveryCategory) {
12404
- BatchDeliveryCategory["Overview"] = "OVERVIEW";
12405
- BatchDeliveryCategory["Purchase"] = "COST_OF_SALES";
12406
- BatchDeliveryCategory["Allocate"] = "ALLOCATION";
12407
- BatchDeliveryCategory["Logistics"] = "LOGISTICS";
12408
- BatchDeliveryCategory["DeliveryOrder"] = "DELIVERY_ORDER";
12409
- BatchDeliveryCategory["Invoice"] = "INVOICE";
12410
- BatchDeliveryCategory["ToPick"] = "TO_PICK";
12411
- BatchDeliveryCategory["Picked"] = "PICKED";
12412
- })(BatchDeliveryCategory || (BatchDeliveryCategory = {}));
12413
-
12414
12401
  var ListOfIconsComponent = /** @class */ (function () {
12415
- function ListOfIconsComponent(iconCacheService, icons) {
12416
- this.iconCacheService = iconCacheService;
12402
+ function ListOfIconsComponent(icons) {
12417
12403
  this.icons = icons;
12418
12404
  this.iconSize = 25;
12419
12405
  this.itemSelected = new i0.EventEmitter();
@@ -12421,10 +12407,6 @@
12421
12407
  this.showMenu = false;
12422
12408
  this.showSubCategories = false;
12423
12409
  this._collection = [];
12424
- this.subCategories = [
12425
- { icon: this.iconCacheService.getIcon(this.Icon.BoxesPackingRegular), label: BatchDeliveryCategory.ToPick },
12426
- { icon: this.iconCacheService.getIcon(this.Icon.RegularBoxesPackingCircleCheck), label: BatchDeliveryCategory.Picked }
12427
- ];
12428
12410
  }
12429
12411
  Object.defineProperty(ListOfIconsComponent.prototype, "collection", {
12430
12412
  get: function () {
@@ -12449,7 +12431,7 @@
12449
12431
  this.showMenu = !this.showMenu;
12450
12432
  };
12451
12433
  ListOfIconsComponent.prototype.selectItem = function (item) {
12452
- if (item.label === BatchDeliveryCategory.Logistics) {
12434
+ if (item.children) {
12453
12435
  this.showSubCategories = !this.showSubCategories;
12454
12436
  return;
12455
12437
  }
@@ -12458,8 +12440,9 @@
12458
12440
  this.itemSelected.emit(this.activeItem);
12459
12441
  };
12460
12442
  ListOfIconsComponent.prototype.handlePickingCategoryClicked = function (subCategory) {
12461
- this.itemSelected.emit(subCategory);
12443
+ this.activeItem = subCategory;
12462
12444
  this.showMenu = false;
12445
+ this.itemSelected.emit(subCategory);
12463
12446
  this.showSubCategories = false;
12464
12447
  };
12465
12448
  ListOfIconsComponent.prototype.onClickOutside = function () {
@@ -12471,12 +12454,11 @@
12471
12454
  ListOfIconsComponent.decorators = [
12472
12455
  { type: i0.Component, args: [{
12473
12456
  selector: 'co-list-of-icons',
12474
- template: "\n <div class=\"icon-item active\" [class.menu-opened]=\"showMenu\" (click)=\"toggleMenu()\">\n <co-icon [iconData]=\"activeItem.icon\" [style.width.px]=\"iconSize\" [style.height.px]=\"iconSize\"></co-icon>\n <co-icon *ngIf=\"!showMenu\" class=\"drop-arrow\" [iconData]=\"icons.getIcon(Icon.CaretDownSolid)\"></co-icon>\n <co-icon *ngIf=\"showMenu\" class=\"drop-arrow\" [iconData]=\"icons.getIcon(Icon.CaretUpSolid)\"></co-icon>\n </div>\n <div class=\"dropdown-menu\" *ngIf=\"showMenu\" (clickOutside)=\"onClickOutside()\">\n <div class=\"icon-item\" *ngFor=\"let item of collection\" (click)=\"selectItem(item)\"\n [class.active]=\"item === activeItem\">\n <co-icon [iconData]=\"item.icon\" [style.width.px]=\"iconSize\" [style.height.px]=\"iconSize\"></co-icon>\n <div class=\"label\" [textContent]=\"item.label | coreLocalize\"></div>\n </div>\n <div class=\"picking-type-wrapper\" *ngIf=\"showSubCategories\">\n <div class=\"button-wrapper\" *ngFor=\"let subCategory of subCategories\" (click)=\"handlePickingCategoryClicked(subCategory)\">\n <co-icon\n class=\"co-transaction-button-bar-icon\"\n [iconData]=\"subCategory.icon\"\n [style.width.px]=\"iconSize\"\n [style.height.px]=\"iconSize\">\n </co-icon>\n <span class=\"button-title\" [textContent]=\"subCategory.label | coreLocalize\"></span>\n </div>\n </div>\n </div>\n ",
12457
+ template: "\n <div class=\"icon-item active\" [class.menu-opened]=\"showMenu\" (click)=\"toggleMenu()\">\n <co-icon [iconData]=\"activeItem.icon\" [style.width.px]=\"iconSize\" [style.height.px]=\"iconSize\"></co-icon>\n <co-icon *ngIf=\"!showMenu\" class=\"drop-arrow\" [iconData]=\"icons.getIcon(Icon.CaretDownSolid)\"></co-icon>\n <co-icon *ngIf=\"showMenu\" class=\"drop-arrow\" [iconData]=\"icons.getIcon(Icon.CaretUpSolid)\"></co-icon>\n </div>\n <div class=\"dropdown-menu\" *ngIf=\"showMenu\" (clickOutside)=\"onClickOutside()\">\n <div\n class=\"icon-item\"\n [class.active]=\"item === activeItem\"\n *ngFor=\"let item of collection\" (click)=\"selectItem(item)\">\n <co-icon [iconData]=\"item.icon\" [style.width.px]=\"iconSize\" [style.height.px]=\"iconSize\"></co-icon>\n <div class=\"label\" [textContent]=\"item.label | coreLocalize\"></div>\n <div class=\"picking-type-wrapper\" *ngIf=\"showSubCategories && item.children?.length > 0\">\n <div\n class=\"button-wrapper\"\n *ngFor=\"let subCategory of item.children\"\n (click)=\"handlePickingCategoryClicked(subCategory)\">\n <co-icon\n class=\"co-transaction-button-bar-icon\"\n [iconData]=\"subCategory.icon\"\n [style.width.px]=\"iconSize\"\n [style.height.px]=\"iconSize\">\n </co-icon>\n <span class=\"button-title\" [textContent]=\"subCategory.label | coreLocalize\"></span>\n </div>\n </div>\n </div>\n </div>\n ",
12475
12458
  encapsulation: i0.ViewEncapsulation.None
12476
12459
  },] }
12477
12460
  ];
12478
12461
  ListOfIconsComponent.ctorParameters = function () { return [
12479
- { type: IconCacheService },
12480
12462
  { type: IconCacheService }
12481
12463
  ]; };
12482
12464
  ListOfIconsComponent.propDecorators = {