@colijnit/corecomponents_v12 259.1.19 → 259.1.21

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.
@@ -12367,22 +12367,8 @@
12367
12367
  },] }
12368
12368
  ];
12369
12369
 
12370
- // Values are corresponding dictionary keys in text_nl.
12371
- var BatchDeliveryCategory;
12372
- (function (BatchDeliveryCategory) {
12373
- BatchDeliveryCategory["Overview"] = "OVERVIEW";
12374
- BatchDeliveryCategory["Purchase"] = "COST_OF_SALES";
12375
- BatchDeliveryCategory["Allocate"] = "ALLOCATION";
12376
- BatchDeliveryCategory["Logistics"] = "LOGISTICS";
12377
- BatchDeliveryCategory["DeliveryOrder"] = "DELIVERY_ORDER";
12378
- BatchDeliveryCategory["Invoice"] = "INVOICE";
12379
- BatchDeliveryCategory["ToPick"] = "TO_PICK";
12380
- BatchDeliveryCategory["Picked"] = "PICKED";
12381
- })(BatchDeliveryCategory || (BatchDeliveryCategory = {}));
12382
-
12383
12370
  var ListOfIconsComponent = /** @class */ (function () {
12384
- function ListOfIconsComponent(iconCacheService, icons) {
12385
- this.iconCacheService = iconCacheService;
12371
+ function ListOfIconsComponent(icons) {
12386
12372
  this.icons = icons;
12387
12373
  this.iconSize = 25;
12388
12374
  this.itemSelected = new i0.EventEmitter();
@@ -12390,10 +12376,6 @@
12390
12376
  this.showMenu = false;
12391
12377
  this.showSubCategories = false;
12392
12378
  this._collection = [];
12393
- this.subCategories = [
12394
- { icon: this.iconCacheService.getIcon(this.Icon.BoxesPackingRegular), label: BatchDeliveryCategory.ToPick },
12395
- { icon: this.iconCacheService.getIcon(this.Icon.RegularBoxesPackingCircleCheck), label: BatchDeliveryCategory.Picked }
12396
- ];
12397
12379
  }
12398
12380
  Object.defineProperty(ListOfIconsComponent.prototype, "collection", {
12399
12381
  get: function () {
@@ -12401,6 +12383,7 @@
12401
12383
  },
12402
12384
  set: function (value) {
12403
12385
  this._collection = value || [];
12386
+ this.activeItem = this.collection[0];
12404
12387
  },
12405
12388
  enumerable: false,
12406
12389
  configurable: true
@@ -12417,7 +12400,7 @@
12417
12400
  this.showMenu = !this.showMenu;
12418
12401
  };
12419
12402
  ListOfIconsComponent.prototype.selectItem = function (item) {
12420
- if (item.label.toUpperCase() === BatchDeliveryCategory.Logistics) {
12403
+ if (item.children) {
12421
12404
  this.showSubCategories = !this.showSubCategories;
12422
12405
  return;
12423
12406
  }
@@ -12426,8 +12409,9 @@
12426
12409
  this.itemSelected.emit(this.activeItem);
12427
12410
  };
12428
12411
  ListOfIconsComponent.prototype.handlePickingCategoryClicked = function (subCategory) {
12429
- this.itemSelected.emit(subCategory);
12412
+ this.activeItem = subCategory;
12430
12413
  this.showMenu = false;
12414
+ this.itemSelected.emit(subCategory);
12431
12415
  this.showSubCategories = false;
12432
12416
  };
12433
12417
  ListOfIconsComponent.prototype.onClickOutside = function () {
@@ -12439,12 +12423,11 @@
12439
12423
  ListOfIconsComponent.decorators = [
12440
12424
  { type: i0.Component, args: [{
12441
12425
  selector: 'co-list-of-icons',
12442
- 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 ",
12426
+ 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 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 ",
12443
12427
  encapsulation: i0.ViewEncapsulation.None
12444
12428
  },] }
12445
12429
  ];
12446
12430
  ListOfIconsComponent.ctorParameters = function () { return [
12447
- { type: IconCacheService },
12448
12431
  { type: IconCacheService }
12449
12432
  ]; };
12450
12433
  ListOfIconsComponent.propDecorators = {