@colijnit/corecomponents_v12 258.1.27 → 258.1.29

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.
@@ -1883,6 +1883,7 @@ class BaseInputComponent {
1883
1883
  this.keyDown = new EventEmitter();
1884
1884
  this.keyUp = new EventEmitter();
1885
1885
  this.modelChange = new EventEmitter();
1886
+ this.selectedValueChange = new EventEmitter();
1886
1887
  this.userModelChange = new EventEmitter();
1887
1888
  this.hiddenChange = new EventEmitter();
1888
1889
  this.cancelClicked = new EventEmitter();
@@ -2631,6 +2632,7 @@ BaseInputComponent.propDecorators = {
2631
2632
  keyDown: [{ type: Output }],
2632
2633
  keyUp: [{ type: Output }],
2633
2634
  modelChange: [{ type: Output }],
2635
+ selectedValueChange: [{ type: Output }],
2634
2636
  userModelChange: [{ type: Output }],
2635
2637
  hiddenChange: [{ type: Output }],
2636
2638
  cancelClicked: [{ type: Output }],
@@ -10106,6 +10108,11 @@ SimpleGridComponent.decorators = [
10106
10108
  [class.simple-grid-column-auto-fit]="column.autoFit"
10107
10109
  [style.width.px]="column.width"
10108
10110
  [style.min-width.px]="MIN_COLUMN_WIDTH">
10111
+ <col
10112
+ *ngIf="((inlineEdit && showRowButtons) || (showDelete && !showRowButtons)) && (hoveredRowIndex >= 0 || selectedRowIndex >= 0 || isNewRow)"
10113
+ [class.icons-col]="true"
10114
+ [class.col-width-row-buttons]="inlineEdit && showRowButtons"
10115
+ [class.col-width-delete]="!showRowButtons && showDelete">
10109
10116
  </colgroup>
10110
10117
  <thead>
10111
10118
  <tr>
@@ -10217,33 +10224,28 @@ SimpleGridComponent.decorators = [
10217
10224
  <div *ngIf="column.resizable" class="simple-grid-column-sizer-placeholder"></div>
10218
10225
  </td>
10219
10226
  </ng-container>
10220
- <ng-container *ngIf="inlineEdit && showRowButtons">
10221
- <div class="icons-container" *ngIf="!editing">
10222
- <co-icon class="icon-item icon-edit"
10223
- [iconData]="icons.getIcon(Icons.PenToSquareSolid)" *ngIf="hoveredRowIndex === rowIndex"
10224
- (click)="editRow($event, true, rowIndex); $event.stopPropagation()"></co-icon>
10225
- <co-icon class="icon-item icon-delete"
10226
- [iconData]="icons.getIcon(Icons.TrashBin)" *ngIf="hoveredRowIndex === rowIndex"
10227
- (click)="selectTheRow(rowIndex); removeRow();"></co-icon>
10228
- </div>
10229
- <div class="icons-container">
10230
- <co-button class="save-button"
10231
- *ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
10232
- [iconData]="icons.getIcon(Icons.CheckDuotone)"
10233
- (click)="validateAndSave(); $event.stopPropagation()"></co-button>
10234
- <co-button class="close-button"
10235
- *ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
10236
- [iconData]="icons.getIcon(Icons.CrossSkinny)"
10237
- (click)="cancelEditRow(); $event.stopPropagation() "></co-button>
10238
- </div>
10239
- </ng-container>
10240
- <ng-container *ngIf="!(inlineEdit && showRowButtons) && showDelete">
10241
- <div class="icons-container">
10242
- <co-icon class="icon-item icon-delete"
10243
- [iconData]="icons.getIcon(Icons.TrashBin)" *ngIf="hoveredRowIndex === rowIndex"
10244
- (click)="selectTheRow(rowIndex); removeRow();">
10245
- </co-icon>
10246
- </div>
10227
+ <ng-container *ngIf="(inlineEdit && showRowButtons) || (showDelete && !showRowButtons)">
10228
+ <td class="icons-container"
10229
+ *ngIf="(editRowIndex <= -1 && selectedRowIndex === -1 && hoveredRowIndex === rowIndex) || selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex)">
10230
+ <ng-container>
10231
+ <co-icon class="icon-item icon-edit"
10232
+ *ngIf="!editing && (inlineEdit && showRowButtons)"
10233
+ [iconData]="icons.getIcon(Icons.PenToSquareSolid)"
10234
+ (click)="editRow($event, true, rowIndex); $event.stopPropagation()"></co-icon>
10235
+ <co-icon class="icon-item icon-delete"
10236
+ [iconData]="icons.getIcon(Icons.TrashBin)"
10237
+ *ngIf="(!editing && (inlineEdit || !inlineEdit) && showRowButtons) || (!showRowButtons && showDelete)"
10238
+ (click)="selectTheRow(rowIndex); removeRow();"></co-icon>
10239
+ </ng-container>
10240
+ <ng-container *ngIf="editing && inlineEdit && showRowButtons && (selectedRowIndex === rowIndex || isNewRow)">
10241
+ <co-button class="save-button"
10242
+ [iconData]="icons.getIcon(Icons.CheckDuotone)"
10243
+ (click)="validateAndSave(); $event.stopPropagation()"></co-button>
10244
+ <co-button class="close-button"
10245
+ [iconData]="icons.getIcon(Icons.CrossSkinny)"
10246
+ (click)="cancelEditRow(); $event.stopPropagation() "></co-button>
10247
+ </ng-container>
10248
+ </td>
10247
10249
  </ng-container>
10248
10250
  </ng-container>
10249
10251
  </tr>
@@ -11559,7 +11561,7 @@ class ListOfValuesComponent extends BaseInputComponent {
11559
11561
  }
11560
11562
  }
11561
11563
  this.setModel(option);
11562
- this.modelChange.emit(this.model);
11564
+ this.selectedValueChange.emit(this.model);
11563
11565
  this.detectChanges();
11564
11566
  }
11565
11567
  closePopup() {
@@ -11833,22 +11835,8 @@ ListOfValuesModule.decorators = [
11833
11835
  },] }
11834
11836
  ];
11835
11837
 
11836
- // Values are corresponding dictionary keys in text_nl.
11837
- var BatchDeliveryCategory;
11838
- (function (BatchDeliveryCategory) {
11839
- BatchDeliveryCategory["Overview"] = "OVERVIEW";
11840
- BatchDeliveryCategory["Purchase"] = "COST_OF_SALES";
11841
- BatchDeliveryCategory["Allocate"] = "ALLOCATION";
11842
- BatchDeliveryCategory["Logistics"] = "LOGISTICS";
11843
- BatchDeliveryCategory["DeliveryOrder"] = "DELIVERY_ORDER";
11844
- BatchDeliveryCategory["Invoice"] = "INVOICE";
11845
- BatchDeliveryCategory["ToPick"] = "TO_PICK";
11846
- BatchDeliveryCategory["Picked"] = "PICKED";
11847
- })(BatchDeliveryCategory || (BatchDeliveryCategory = {}));
11848
-
11849
11838
  class ListOfIconsComponent {
11850
- constructor(iconCacheService, icons) {
11851
- this.iconCacheService = iconCacheService;
11839
+ constructor(icons) {
11852
11840
  this.icons = icons;
11853
11841
  this.iconSize = 25;
11854
11842
  this.itemSelected = new EventEmitter();
@@ -11856,10 +11844,6 @@ class ListOfIconsComponent {
11856
11844
  this.showMenu = false;
11857
11845
  this.showSubCategories = false;
11858
11846
  this._collection = [];
11859
- this.subCategories = [
11860
- { icon: this.iconCacheService.getIcon(this.Icon.BoxesPackingRegular), label: BatchDeliveryCategory.ToPick },
11861
- { icon: this.iconCacheService.getIcon(this.Icon.RegularBoxesPackingCircleCheck), label: BatchDeliveryCategory.Picked }
11862
- ];
11863
11847
  }
11864
11848
  set collection(value) {
11865
11849
  this._collection = value || [];
@@ -11880,7 +11864,7 @@ class ListOfIconsComponent {
11880
11864
  this.showMenu = !this.showMenu;
11881
11865
  }
11882
11866
  selectItem(item) {
11883
- if (item.label.toUpperCase() === BatchDeliveryCategory.Logistics) {
11867
+ if (item.children) {
11884
11868
  this.showSubCategories = !this.showSubCategories;
11885
11869
  return;
11886
11870
  }
@@ -11889,8 +11873,9 @@ class ListOfIconsComponent {
11889
11873
  this.itemSelected.emit(this.activeItem);
11890
11874
  }
11891
11875
  handlePickingCategoryClicked(subCategory) {
11892
- this.itemSelected.emit(subCategory);
11876
+ this.activeItem = subCategory;
11893
11877
  this.showMenu = false;
11878
+ this.itemSelected.emit(subCategory);
11894
11879
  this.showSubCategories = false;
11895
11880
  }
11896
11881
  onClickOutside() {
@@ -11901,36 +11886,38 @@ class ListOfIconsComponent {
11901
11886
  ListOfIconsComponent.decorators = [
11902
11887
  { type: Component, args: [{
11903
11888
  selector: 'co-list-of-icons',
11904
- template: `
11905
- <div class="icon-item active" [class.menu-opened]="showMenu" (click)="toggleMenu()">
11906
- <co-icon [iconData]="activeItem.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
11907
- <co-icon *ngIf="!showMenu" class="drop-arrow" [iconData]="icons.getIcon(Icon.CaretDownSolid)"></co-icon>
11908
- <co-icon *ngIf="showMenu" class="drop-arrow" [iconData]="icons.getIcon(Icon.CaretUpSolid)"></co-icon>
11909
- </div>
11910
- <div class="dropdown-menu" *ngIf="showMenu" (clickOutside)="onClickOutside()">
11911
- <div class="icon-item" *ngFor="let item of collection" (click)="selectItem(item)"
11912
- [class.active]="item === activeItem">
11913
- <co-icon [iconData]="item.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
11914
- <div class="label" [textContent]="item.label | coreLocalize"></div>
11915
- </div>
11916
- <div class="picking-type-wrapper" *ngIf="showSubCategories">
11917
- <div class="button-wrapper" *ngFor="let subCategory of subCategories" (click)="handlePickingCategoryClicked(subCategory)">
11918
- <co-icon
11919
- class="co-transaction-button-bar-icon"
11920
- [iconData]="subCategory.icon"
11921
- [style.width.px]="iconSize"
11922
- [style.height.px]="iconSize">
11923
- </co-icon>
11924
- <span class="button-title" [textContent]="subCategory.label | coreLocalize"></span>
11925
- </div>
11926
- </div>
11927
- </div>
11889
+ template: `
11890
+ <div class="icon-item active" [class.menu-opened]="showMenu" (click)="toggleMenu()">
11891
+ <co-icon [iconData]="activeItem.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
11892
+ <co-icon *ngIf="!showMenu" class="drop-arrow" [iconData]="icons.getIcon(Icon.CaretDownSolid)"></co-icon>
11893
+ <co-icon *ngIf="showMenu" class="drop-arrow" [iconData]="icons.getIcon(Icon.CaretUpSolid)"></co-icon>
11894
+ </div>
11895
+ <div class="dropdown-menu" *ngIf="showMenu" (clickOutside)="onClickOutside()">
11896
+ <div class="icon-item" *ngFor="let item of collection" (click)="selectItem(item)"
11897
+ [class.active]="item === activeItem">
11898
+ <co-icon [iconData]="item.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
11899
+ <div class="label" [textContent]="item.label | coreLocalize"></div>
11900
+ <div class="picking-type-wrapper" *ngIf="showSubCategories && item.children?.length > 0">
11901
+ <div
11902
+ class="button-wrapper"
11903
+ *ngFor="let subCategory of item.children"
11904
+ (click)="handlePickingCategoryClicked(subCategory)">
11905
+ <co-icon
11906
+ class="co-transaction-button-bar-icon"
11907
+ [iconData]="subCategory.icon"
11908
+ [style.width.px]="iconSize"
11909
+ [style.height.px]="iconSize">
11910
+ </co-icon>
11911
+ <span class="button-title" [textContent]="subCategory.label | coreLocalize"></span>
11912
+ </div>
11913
+ </div>
11914
+ </div>
11915
+ </div>
11928
11916
  `,
11929
11917
  encapsulation: ViewEncapsulation.None
11930
11918
  },] }
11931
11919
  ];
11932
11920
  ListOfIconsComponent.ctorParameters = () => [
11933
- { type: IconCacheService },
11934
11921
  { type: IconCacheService }
11935
11922
  ];
11936
11923
  ListOfIconsComponent.propDecorators = {