@colijnit/corecomponents_v12 258.1.27 → 258.1.28

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.
@@ -12320,22 +12320,8 @@
12320
12320
  },] }
12321
12321
  ];
12322
12322
 
12323
- // Values are corresponding dictionary keys in text_nl.
12324
- var BatchDeliveryCategory;
12325
- (function (BatchDeliveryCategory) {
12326
- BatchDeliveryCategory["Overview"] = "OVERVIEW";
12327
- BatchDeliveryCategory["Purchase"] = "COST_OF_SALES";
12328
- BatchDeliveryCategory["Allocate"] = "ALLOCATION";
12329
- BatchDeliveryCategory["Logistics"] = "LOGISTICS";
12330
- BatchDeliveryCategory["DeliveryOrder"] = "DELIVERY_ORDER";
12331
- BatchDeliveryCategory["Invoice"] = "INVOICE";
12332
- BatchDeliveryCategory["ToPick"] = "TO_PICK";
12333
- BatchDeliveryCategory["Picked"] = "PICKED";
12334
- })(BatchDeliveryCategory || (BatchDeliveryCategory = {}));
12335
-
12336
12323
  var ListOfIconsComponent = /** @class */ (function () {
12337
- function ListOfIconsComponent(iconCacheService, icons) {
12338
- this.iconCacheService = iconCacheService;
12324
+ function ListOfIconsComponent(icons) {
12339
12325
  this.icons = icons;
12340
12326
  this.iconSize = 25;
12341
12327
  this.itemSelected = new i0.EventEmitter();
@@ -12343,10 +12329,6 @@
12343
12329
  this.showMenu = false;
12344
12330
  this.showSubCategories = false;
12345
12331
  this._collection = [];
12346
- this.subCategories = [
12347
- { icon: this.iconCacheService.getIcon(this.Icon.BoxesPackingRegular), label: BatchDeliveryCategory.ToPick },
12348
- { icon: this.iconCacheService.getIcon(this.Icon.RegularBoxesPackingCircleCheck), label: BatchDeliveryCategory.Picked }
12349
- ];
12350
12332
  }
12351
12333
  Object.defineProperty(ListOfIconsComponent.prototype, "collection", {
12352
12334
  get: function () {
@@ -12371,7 +12353,7 @@
12371
12353
  this.showMenu = !this.showMenu;
12372
12354
  };
12373
12355
  ListOfIconsComponent.prototype.selectItem = function (item) {
12374
- if (item.label.toUpperCase() === BatchDeliveryCategory.Logistics) {
12356
+ if (item.children) {
12375
12357
  this.showSubCategories = !this.showSubCategories;
12376
12358
  return;
12377
12359
  }
@@ -12380,8 +12362,9 @@
12380
12362
  this.itemSelected.emit(this.activeItem);
12381
12363
  };
12382
12364
  ListOfIconsComponent.prototype.handlePickingCategoryClicked = function (subCategory) {
12383
- this.itemSelected.emit(subCategory);
12365
+ this.activeItem = subCategory;
12384
12366
  this.showMenu = false;
12367
+ this.itemSelected.emit(subCategory);
12385
12368
  this.showSubCategories = false;
12386
12369
  };
12387
12370
  ListOfIconsComponent.prototype.onClickOutside = function () {
@@ -12393,12 +12376,11 @@
12393
12376
  ListOfIconsComponent.decorators = [
12394
12377
  { type: i0.Component, args: [{
12395
12378
  selector: 'co-list-of-icons',
12396
- 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 ",
12379
+ 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 ",
12397
12380
  encapsulation: i0.ViewEncapsulation.None
12398
12381
  },] }
12399
12382
  ];
12400
12383
  ListOfIconsComponent.ctorParameters = function () { return [
12401
- { type: IconCacheService },
12402
12384
  { type: IconCacheService }
12403
12385
  ]; };
12404
12386
  ListOfIconsComponent.propDecorators = {