@progress/kendo-angular-grid 13.2.0-develop.9 → 13.2.1-develop.1

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.
@@ -24,6 +24,7 @@ import { NON_DATA_CELL_CLASSES, NON_DATA_ROW_CLASSES, IGNORE_TARGET_CLASSSES, IG
24
24
  import { CellSelectionService } from '../selection/cell-selection.service';
25
25
  import { minusIcon, plusIcon } from '@progress/kendo-svg-icons';
26
26
  import { ContextService } from '../common/provider.service';
27
+ import { ColumnsContainer } from '../columns/columns-container';
27
28
  import * as i0 from "@angular/core";
28
29
  import * as i1 from "./details/details.service";
29
30
  import * as i2 from "../grouping/groups.service";
@@ -94,8 +95,17 @@ export class TableBodyComponent {
94
95
  return this.editService.newDataItem;
95
96
  }
96
97
  // Number of unlocked columns in the next table, if any
97
- get unlockedColumnsCount() {
98
- return this.totalColumnsCount - this.lockedColumnsCount - (this.allColumns || this.columns).length;
98
+ unlockedColumnsCount(item) {
99
+ const allColumns = this.allColumns || this.columns;
100
+ let allColumnsCount = allColumns.length;
101
+ allColumns.forEach(column => {
102
+ if (column.isSpanColumn) {
103
+ allColumnsCount += column.colspan - 1;
104
+ }
105
+ });
106
+ const contentColumnsCount = this.totalColumnsCount - this.lockedColumnsCount - allColumnsCount;
107
+ const headerFooterColumnsCount = this.totalColumnsCount - this.lockedColumnsCount - (this.allColumns || this.columns).length;
108
+ return item && this.isDataItem(item) ? contentColumnsCount : headerFooterColumnsCount;
99
109
  }
100
110
  isAriaSelected(item, column) {
101
111
  return this.cellSelectionService.isCellSelected(item, column) ||
@@ -389,14 +399,15 @@ export class TableBodyComponent {
389
399
  }
390
400
  }
391
401
  TableBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TableBodyComponent, deps: [{ token: i1.DetailsService }, { token: i2.GroupsService }, { token: i3.ChangeNotificationService }, { token: i4.EditService }, { token: i5.ContextService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i6.DomEventsService }, { token: i7.SelectionService }, { token: i8.CellSelectionService }, { token: i9.ColumnInfoService }, { token: i10.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
392
- TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TableBodyComponent, selector: "[kendoGridTableBody]", inputs: { columns: "columns", allColumns: "allColumns", groups: "groups", detailTemplate: "detailTemplate", noRecordsTemplate: "noRecordsTemplate", data: "data", skip: "skip", selectable: "selectable", filterable: "filterable", noRecordsText: "noRecordsText", isLocked: "isLocked", isLoading: "isLoading", isVirtual: "isVirtual", cellLoadingTemplate: "cellLoadingTemplate", skipGroupDecoration: "skipGroupDecoration", showGroupFooters: "showGroupFooters", lockedColumnsCount: "lockedColumnsCount", totalColumnsCount: "totalColumnsCount", virtualColumns: "virtualColumns", trackBy: "trackBy", rowSticky: "rowSticky", rowClass: "rowClass" }, host: { properties: { "class.k-table-tbody": "this.hostClass" } }, usesOnChanges: true, ngImport: i0, template: `
402
+ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TableBodyComponent, selector: "[kendoGridTableBody]", inputs: { columns: "columns", allColumns: "allColumns", groups: "groups", detailTemplate: "detailTemplate", noRecordsTemplate: "noRecordsTemplate", data: "data", skip: "skip", selectable: "selectable", filterable: "filterable", noRecordsText: "noRecordsText", isLocked: "isLocked", isLoading: "isLoading", isVirtual: "isVirtual", cellLoadingTemplate: "cellLoadingTemplate", skipGroupDecoration: "skipGroupDecoration", showGroupFooters: "showGroupFooters", lockedColumnsCount: "lockedColumnsCount", totalColumnsCount: "totalColumnsCount", virtualColumns: "virtualColumns", trackBy: "trackBy", rowSticky: "rowSticky", totalColumns: "totalColumns", rowClass: "rowClass" }, host: { properties: { "class.k-table-tbody": "this.hostClass" } }, usesOnChanges: true, ngImport: i0, template: `
393
403
  <ng-container *ngIf="editService.hasNewItem">
394
404
  <tr class="k-grid-add-row k-grid-edit-row k-master-row"
395
405
  kendoGridLogicalRow
396
406
  [logicalRowIndex]="addRowLogicalIndex()"
397
407
  [logicalSlaveRow]="lockedColumnsCount > 0"
398
408
  [logicalCellsCount]="columns.length"
399
- [logicalSlaveCellsCount]="unlockedColumnsCount">
409
+ [logicalSlaveCellsCount]="unlockedColumnsCount()"
410
+ [totalColumns]="totalColumns">
400
411
  <ng-container *ngIf="!skipGroupDecoration">
401
412
  <td class="k-group-cell k-table-td" *ngFor="let g of groups" role="presentation"></td>
402
413
  </ng-container>
@@ -458,6 +469,7 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
458
469
  kendoGridLogicalRow
459
470
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
460
471
  [logicalSlaveRow]="lockedColumnsCount > 0"
472
+ [totalColumns]="totalColumns"
461
473
  [logicalCellsCount]="columns.length"
462
474
  [logicalSlaveCellsCount]="groupHeaderSlaveCellsCount">
463
475
  </tr>
@@ -468,14 +480,15 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
468
480
  [dataItem]="item.data"
469
481
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
470
482
  [logicalSlaveRow]="lockedColumnsCount > 0"
483
+ [totalColumns]="totalColumns"
471
484
  [logicalCellsCount]="columns.length"
472
- [logicalSlaveCellsCount]="unlockedColumnsCount"
485
+ [logicalSlaveCellsCount]="unlockedColumnsCount(item)"
473
486
  class="{{ isOdd(item) ? 'k-alt k-table-alt-row' : ''}}"
474
487
  [class.k-grid-row-sticky]="rowSticky ? rowSticky({ dataItem: item.data, index: $any(item).index }) : false"
475
488
  [ngClass]="rowClass({ dataItem: item.data, index: $any(item).index })"
476
489
  [class.k-master-row]="true"
477
490
  [class.k-grid-edit-row]="isEditingRow($any(item).index)"
478
- [attr.aria-selected]="isSelectable() && isRowSelected(item)"
491
+ [attr.aria-selected]="lockedColumnsCount < 1 ? isSelectable() && isRowSelected(item) : undefined"
479
492
  [attr.data-kendo-grid-item-index]="$any(item).index"
480
493
  [class.k-selected]="isSelectable() && isRowSelected(item)">
481
494
  <ng-container *ngIf="!skipGroupDecoration">
@@ -520,7 +533,7 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
520
533
  [colSpan]="column.colspan"
521
534
  role="gridcell"
522
535
  class="k-table-td"
523
- [attr.aria-selected]="isSelectable() ? isAriaSelected(item, column) : undefined"
536
+ [attr.aria-selected]="lockedColumnsCount < 1 && isSelectable() ? isAriaSelected(item, column) : undefined"
524
537
  [class.k-grid-content-sticky]="column.sticky"
525
538
  [class.k-touch-action-none]="isSelectable() && $any(selectable).drag"
526
539
  [class.k-touch-action-auto]="!(isSelectable() && $any(selectable).drag)"
@@ -577,8 +590,9 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
577
590
  kendoGridLogicalRow
578
591
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
579
592
  [logicalSlaveRow]="lockedColumnsCount > 0"
593
+ [totalColumns]="totalColumns"
580
594
  [logicalCellsCount]="columns.length"
581
- [logicalSlaveCellsCount]="unlockedColumnsCount">
595
+ [logicalSlaveCellsCount]="unlockedColumnsCount(item)">
582
596
  <ng-container *ngIf="!skipGroupDecoration">
583
597
  <td class="k-group-cell" *ngFor="let g of groups"></td>
584
598
  </ng-container>
@@ -610,7 +624,7 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
610
624
  </tr>
611
625
  </ng-container>
612
626
  <kendo-resize-sensor *ngIf="rowSticky" (resize)="resizeHandler()"></kendo-resize-sensor>
613
- `, isInline: true, components: [{ type: i11.CellComponent, selector: "[kendoGridCell]", inputs: ["column", "columnIndex", "isNew", "isLoading", "isVirtual", "loadingTemplate", "rowIndex", "dataItem"] }, { type: i12.GroupHeaderComponent, selector: "[kendoGridGroupHeader]", inputs: ["rowIndex", "logicalRowIndex", "item", "skipGroupDecoration", "hasDetails", "totalColumnsCount", "hasGroupHeaderColumn", "groupHeaderColumns", "columns", "groups"] }, { type: i13.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i14.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i15.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16.LogicalRowDirective, selector: "[kendoGridLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem"] }, { type: i15.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i17.LogicalCellDirective, selector: "[kendoGridLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "colIndex", "colSpan", "rowSpan", "groupItem", "dataRowIndex", "dataItem", "detailExpandCell", "headerLabelText"] }, { type: i15.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i15.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i18.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i15.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
627
+ `, isInline: true, components: [{ type: i11.CellComponent, selector: "[kendoGridCell]", inputs: ["column", "columnIndex", "isNew", "isLoading", "isVirtual", "loadingTemplate", "rowIndex", "dataItem"] }, { type: i12.GroupHeaderComponent, selector: "[kendoGridGroupHeader]", inputs: ["rowIndex", "logicalRowIndex", "item", "skipGroupDecoration", "hasDetails", "totalColumnsCount", "hasGroupHeaderColumn", "groupHeaderColumns", "columns", "groups"] }, { type: i13.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i14.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i15.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16.LogicalRowDirective, selector: "[kendoGridLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "totalColumns"] }, { type: i15.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i17.LogicalCellDirective, selector: "[kendoGridLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "colIndex", "colSpan", "rowSpan", "groupItem", "dataRowIndex", "dataItem", "detailExpandCell", "headerLabelText"] }, { type: i15.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i15.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i18.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i15.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
614
628
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TableBodyComponent, decorators: [{
615
629
  type: Component,
616
630
  args: [{
@@ -622,7 +636,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
622
636
  [logicalRowIndex]="addRowLogicalIndex()"
623
637
  [logicalSlaveRow]="lockedColumnsCount > 0"
624
638
  [logicalCellsCount]="columns.length"
625
- [logicalSlaveCellsCount]="unlockedColumnsCount">
639
+ [logicalSlaveCellsCount]="unlockedColumnsCount()"
640
+ [totalColumns]="totalColumns">
626
641
  <ng-container *ngIf="!skipGroupDecoration">
627
642
  <td class="k-group-cell k-table-td" *ngFor="let g of groups" role="presentation"></td>
628
643
  </ng-container>
@@ -684,6 +699,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
684
699
  kendoGridLogicalRow
685
700
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
686
701
  [logicalSlaveRow]="lockedColumnsCount > 0"
702
+ [totalColumns]="totalColumns"
687
703
  [logicalCellsCount]="columns.length"
688
704
  [logicalSlaveCellsCount]="groupHeaderSlaveCellsCount">
689
705
  </tr>
@@ -694,14 +710,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
694
710
  [dataItem]="item.data"
695
711
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
696
712
  [logicalSlaveRow]="lockedColumnsCount > 0"
713
+ [totalColumns]="totalColumns"
697
714
  [logicalCellsCount]="columns.length"
698
- [logicalSlaveCellsCount]="unlockedColumnsCount"
715
+ [logicalSlaveCellsCount]="unlockedColumnsCount(item)"
699
716
  class="{{ isOdd(item) ? 'k-alt k-table-alt-row' : ''}}"
700
717
  [class.k-grid-row-sticky]="rowSticky ? rowSticky({ dataItem: item.data, index: $any(item).index }) : false"
701
718
  [ngClass]="rowClass({ dataItem: item.data, index: $any(item).index })"
702
719
  [class.k-master-row]="true"
703
720
  [class.k-grid-edit-row]="isEditingRow($any(item).index)"
704
- [attr.aria-selected]="isSelectable() && isRowSelected(item)"
721
+ [attr.aria-selected]="lockedColumnsCount < 1 ? isSelectable() && isRowSelected(item) : undefined"
705
722
  [attr.data-kendo-grid-item-index]="$any(item).index"
706
723
  [class.k-selected]="isSelectable() && isRowSelected(item)">
707
724
  <ng-container *ngIf="!skipGroupDecoration">
@@ -746,7 +763,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
746
763
  [colSpan]="column.colspan"
747
764
  role="gridcell"
748
765
  class="k-table-td"
749
- [attr.aria-selected]="isSelectable() ? isAriaSelected(item, column) : undefined"
766
+ [attr.aria-selected]="lockedColumnsCount < 1 && isSelectable() ? isAriaSelected(item, column) : undefined"
750
767
  [class.k-grid-content-sticky]="column.sticky"
751
768
  [class.k-touch-action-none]="isSelectable() && $any(selectable).drag"
752
769
  [class.k-touch-action-auto]="!(isSelectable() && $any(selectable).drag)"
@@ -803,8 +820,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
803
820
  kendoGridLogicalRow
804
821
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
805
822
  [logicalSlaveRow]="lockedColumnsCount > 0"
823
+ [totalColumns]="totalColumns"
806
824
  [logicalCellsCount]="columns.length"
807
- [logicalSlaveCellsCount]="unlockedColumnsCount">
825
+ [logicalSlaveCellsCount]="unlockedColumnsCount(item)">
808
826
  <ng-container *ngIf="!skipGroupDecoration">
809
827
  <td class="k-group-cell" *ngFor="let g of groups"></td>
810
828
  </ng-container>
@@ -880,6 +898,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
880
898
  type: Input
881
899
  }], rowSticky: [{
882
900
  type: Input
901
+ }], totalColumns: [{
902
+ type: Input
883
903
  }], hostClass: [{
884
904
  type: HostBinding,
885
905
  args: ['class.k-table-tbody']