@progress/kendo-angular-grid 6.0.4-dev.202202221309 → 6.1.0-dev.202203010950

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.
Files changed (45) hide show
  1. package/dist/cdn/js/kendo-angular-grid.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/columns/sort-settings.js +2 -1
  4. package/dist/es/grid.component.js +22 -4
  5. package/dist/es/main.js +1 -0
  6. package/dist/es/package-metadata.js +1 -1
  7. package/dist/es/rendering/body.module.js +5 -2
  8. package/dist/es/rendering/common/loading.component.js +7 -2
  9. package/dist/es/rendering/header/header.component.js +31 -6
  10. package/dist/es/rendering/list.component.js +5 -1
  11. package/dist/es/rendering/loading-template.directive.js +24 -0
  12. package/dist/es/rendering/table-body.component.js +2 -2
  13. package/dist/es2015/columns/sort-settings.d.ts +33 -69
  14. package/dist/es2015/columns/sort-settings.js +2 -1
  15. package/dist/es2015/grid.component.d.ts +7 -3
  16. package/dist/es2015/grid.component.js +19 -4
  17. package/dist/es2015/index.metadata.json +1 -1
  18. package/dist/es2015/main.d.ts +2 -1
  19. package/dist/es2015/main.js +1 -0
  20. package/dist/es2015/package-metadata.js +1 -1
  21. package/dist/es2015/rendering/body.module.js +5 -2
  22. package/dist/es2015/rendering/common/loading.component.d.ts +2 -0
  23. package/dist/es2015/rendering/common/loading.component.js +13 -4
  24. package/dist/es2015/rendering/header/header.component.d.ts +14 -2
  25. package/dist/es2015/rendering/header/header.component.js +30 -6
  26. package/dist/es2015/rendering/list.component.d.ts +1 -0
  27. package/dist/es2015/rendering/list.component.js +7 -3
  28. package/dist/es2015/rendering/loading-template.directive.d.ts +14 -0
  29. package/dist/es2015/rendering/loading-template.directive.js +23 -0
  30. package/dist/es2015/rendering/table-body.component.d.ts +1 -1
  31. package/dist/es2015/rendering/table-body.component.js +3 -2
  32. package/dist/fesm2015/index.js +94 -23
  33. package/dist/fesm5/index.js +90 -19
  34. package/dist/npm/columns/sort-settings.js +2 -1
  35. package/dist/npm/grid.component.js +22 -4
  36. package/dist/npm/main.js +2 -0
  37. package/dist/npm/package-metadata.js +1 -1
  38. package/dist/npm/rendering/body.module.js +5 -2
  39. package/dist/npm/rendering/common/loading.component.js +6 -1
  40. package/dist/npm/rendering/header/header.component.js +31 -6
  41. package/dist/npm/rendering/list.component.js +5 -1
  42. package/dist/npm/rendering/loading-template.directive.js +26 -0
  43. package/dist/npm/rendering/table-body.component.js +2 -2
  44. package/dist/systemjs/kendo-angular-grid.js +1 -1
  45. package/package.json +5 -3
@@ -15,6 +15,7 @@ export { ToolbarComponent } from './rendering/toolbar/toolbar.component';
15
15
  export { ToolbarTemplateDirective } from './rendering/toolbar/toolbar-template.directive';
16
16
  export { CellTemplateDirective } from './rendering/cell-template.directive';
17
17
  export { CellLoadingTemplateDirective } from './rendering/cell-loading.template.directive';
18
+ export { LoadingTemplateDirective } from './rendering/loading-template.directive';
18
19
  export { HeaderTemplateDirective } from './rendering/header/header-template.directive';
19
20
  export { FooterTemplateDirective } from './rendering/footer/footer-template.directive';
20
21
  export { PagerTemplateDirective } from './pager/pager-template.directive';
@@ -38,7 +39,7 @@ export { GroupFooterItem } from './data/group-footer-item.interface';
38
39
  export { GridItem } from './data/grid-item.interface';
39
40
  export { ScrollMode } from './scrolling/scrollmode';
40
41
  export { SelectionEvent } from './selection/types';
41
- export { ColumnSortSettings, SortSettings } from './columns/sort-settings';
42
+ export { ColumnSortSettings, SingleSortSettings, MultipleSortSettings, SortSettings, ModifierKey } from './columns/sort-settings';
42
43
  export { ResizableContainerDirective } from './layout/resizable.directive';
43
44
  export { TemplateContextDirective } from './rendering/common/template-context.directive';
44
45
  export { GroupableSettings } from './grouping/group-settings';
@@ -15,6 +15,7 @@ export { ToolbarComponent } from './rendering/toolbar/toolbar.component';
15
15
  export { ToolbarTemplateDirective } from './rendering/toolbar/toolbar-template.directive';
16
16
  export { CellTemplateDirective } from './rendering/cell-template.directive';
17
17
  export { CellLoadingTemplateDirective } from './rendering/cell-loading.template.directive';
18
+ export { LoadingTemplateDirective } from './rendering/loading-template.directive';
18
19
  export { HeaderTemplateDirective } from './rendering/header/header-template.directive';
19
20
  export { FooterTemplateDirective } from './rendering/footer/footer-template.directive';
20
21
  export { PagerTemplateDirective } from './pager/pager-template.directive';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-grid',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1645534887,
12
+ publishDate: 1646127685,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -25,6 +25,7 @@ import { GroupModule } from "../grouping/group.module";
25
25
  import { NumericTextBoxModule } from "@progress/kendo-angular-inputs";
26
26
  import { DatePickerModule } from '@progress/kendo-angular-dateinputs';
27
27
  import { CellLoadingTemplateDirective } from './cell-loading.template.directive';
28
+ import { LoadingTemplateDirective } from './loading-template.directive';
28
29
  const exported = [
29
30
  CommandColumnComponent,
30
31
  CheckboxColumnComponent,
@@ -39,7 +40,8 @@ const exported = [
39
40
  SaveCommandDirective,
40
41
  RemoveCommandDirective,
41
42
  AddCommandDirective,
42
- CellLoadingTemplateDirective
43
+ CellLoadingTemplateDirective,
44
+ LoadingTemplateDirective
43
45
  ];
44
46
  const importedModules = [
45
47
  CommonModule,
@@ -68,7 +70,8 @@ let BodyModule = class BodyModule {
68
70
  SaveCommandDirective,
69
71
  RemoveCommandDirective,
70
72
  AddCommandDirective,
71
- CellLoadingTemplateDirective
73
+ CellLoadingTemplateDirective,
74
+ LoadingTemplateDirective
72
75
  ];
73
76
  }
74
77
  };
@@ -3,12 +3,14 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { LocalizationService } from '@progress/kendo-angular-l10n';
6
+ import { LoadingTemplateDirective } from '../loading-template.directive';
6
7
  /**
7
8
  * @hidden
8
9
  */
9
10
  export declare class LoadingComponent {
10
11
  private localization;
11
12
  hostClass: boolean;
13
+ loadingTemplate: LoadingTemplateDirective;
12
14
  readonly loadingText: string;
13
15
  constructor(localization: LocalizationService);
14
16
  }
@@ -3,8 +3,9 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
- import { Component, HostBinding } from '@angular/core';
6
+ import { Component, HostBinding, Input } from '@angular/core';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
+ import { LoadingTemplateDirective } from '../loading-template.directive';
8
9
  /**
9
10
  * @hidden
10
11
  */
@@ -21,13 +22,21 @@ tslib_1.__decorate([
21
22
  HostBinding('class.k-loading-mask'),
22
23
  tslib_1.__metadata("design:type", Boolean)
23
24
  ], LoadingComponent.prototype, "hostClass", void 0);
25
+ tslib_1.__decorate([
26
+ Input(),
27
+ tslib_1.__metadata("design:type", LoadingTemplateDirective)
28
+ ], LoadingComponent.prototype, "loadingTemplate", void 0);
24
29
  LoadingComponent = tslib_1.__decorate([
25
30
  Component({
26
31
  selector: '[kendoGridLoading]',
27
32
  template: `
28
- <span class="k-loading-text">{{ loadingText }}</span>
29
- <div class="k-loading-image"></div>
30
- <div class="k-loading-color"></div>
33
+ <ng-container *ngIf="!loadingTemplate">
34
+ <span class="k-loading-text">{{ loadingText }}</span>
35
+ <div class="k-loading-image"></div>
36
+ <div class="k-loading-color"></div>
37
+ </ng-container>
38
+ <ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate?.templateRef">
39
+ </ng-template>
31
40
  `
32
41
  }),
33
42
  tslib_1.__metadata("design:paramtypes", [LocalizationService])
@@ -66,7 +66,7 @@ export declare class HeaderComponent implements AfterViewInit, OnInit, OnChanges
66
66
  private targetSubscription;
67
67
  private _leafColumns;
68
68
  constructor(popupService: SinglePopupService, hint: DragHintService, cue: DropCueService, reorderService: ColumnReorderService, idService: IdService, sortService: SortService, localization: LocalizationService, columnInfoService: ColumnInfoService, cd: ChangeDetectorRef);
69
- sortColumn(column: ColumnComponent): void;
69
+ sortColumn(descriptor: SortDescriptor[]): void;
70
70
  onSortClick(column: ColumnComponent, event: MouseEvent, link: Element): void;
71
71
  onHeaderKeydown(column: ColumnComponent, args: KeyboardEvent): void;
72
72
  showSortNumbering(column: ColumnComponent): boolean;
@@ -74,7 +74,19 @@ export declare class HeaderComponent implements AfterViewInit, OnInit, OnChanges
74
74
  sortIcon(field: string): any;
75
75
  sortState(column: ColumnComponent): string;
76
76
  sortStatus(column: ColumnComponent): string;
77
- toggleSort(column: ColumnComponent): Array<SortDescriptor>;
77
+ /**
78
+ *
79
+ * @param column
80
+ * @param modifier - Indicates whether the client-defined `multiSortKey` modifier is met. Defaults to `true`.
81
+ * @returns - SortDescriptor[]
82
+ */
83
+ toggleSort(column: ColumnComponent, modifier?: boolean): Array<SortDescriptor>;
84
+ /**
85
+ *
86
+ * Determines whether the modifier key (if any) passed
87
+ * with a click/keyboard event matches the user-defined multiSortKey.
88
+ */
89
+ matchModifier(event: MouseEvent | KeyboardEvent): boolean;
78
90
  ngAfterViewInit(): void;
79
91
  ngDoCheck(): void;
80
92
  ngOnChanges(changes: any): void;
@@ -60,6 +60,7 @@ const lockable = ({ draggable, target }) => draggable.context.column.lockable !=
60
60
  draggable.context.column.isLocked === target.context.column.isLocked;
61
61
  const ɵ10 = lockable;
62
62
  const rules = and(ofColumnType, reorderable, notInSpanColumn, notSameElement, sameParent, not(lastNonLocked), lockable);
63
+ const modifierKeys = ['alt', 'ctrl', 'shift', 'meta'];
63
64
  /**
64
65
  * @hidden
65
66
  */
@@ -98,8 +99,8 @@ let HeaderComponent = class HeaderComponent {
98
99
  get unlockedColumnsCount() {
99
100
  return this.totalColumnsCount - this.lockedColumnsCount - this.columns.length;
100
101
  }
101
- sortColumn(column) {
102
- this.sortService.sort(this.toggleSort(column));
102
+ sortColumn(descriptor) {
103
+ this.sortService.sort(descriptor);
103
104
  }
104
105
  onSortClick(column, event, link) {
105
106
  const target = event.target;
@@ -110,7 +111,9 @@ let HeaderComponent = class HeaderComponent {
110
111
  return;
111
112
  }
112
113
  }
113
- this.sortColumn(column);
114
+ const modifier = this.matchModifier(event);
115
+ const toggledColumn = this.toggleSort(column, modifier);
116
+ this.sortColumn(toggledColumn);
114
117
  }
115
118
  onHeaderKeydown(column, args) {
116
119
  if (args.keyCode === Keys.ArrowDown && args.altKey && this.showFilterMenu) {
@@ -129,7 +132,8 @@ let HeaderComponent = class HeaderComponent {
129
132
  return;
130
133
  }
131
134
  if (args.keyCode === Keys.Enter && isPresent(column.field)) {
132
- this.sortService.sort(this.toggleSort(column));
135
+ const modifier = this.matchModifier(args);
136
+ this.sortService.sort(this.toggleSort(column, modifier));
133
137
  }
134
138
  }
135
139
  showSortNumbering(column) {
@@ -179,14 +183,34 @@ let HeaderComponent = class HeaderComponent {
179
183
  }
180
184
  return this.localization.get(msg);
181
185
  }
182
- toggleSort(column) {
186
+ /**
187
+ *
188
+ * @param column
189
+ * @param modifier - Indicates whether the client-defined `multiSortKey` modifier is met. Defaults to `true`.
190
+ * @returns - SortDescriptor[]
191
+ */
192
+ toggleSort(column, modifier = true) {
183
193
  const { allowUnsort, mode, initialDirection } = normalize(this.sortable, column.sortable);
184
194
  const descriptor = this.toggleDirection(column.field, allowUnsort, initialDirection);
185
- if (mode === 'single') {
195
+ if (mode === 'single' || !modifier) {
186
196
  return [descriptor];
187
197
  }
188
198
  return [...this.sort.filter(desc => desc.field !== column.field), descriptor];
189
199
  }
200
+ /**
201
+ *
202
+ * Determines whether the modifier key (if any) passed
203
+ * with a click/keyboard event matches the user-defined multiSortKey.
204
+ */
205
+ matchModifier(event) {
206
+ const { multiSortKey } = normalize(this.sortable);
207
+ if (multiSortKey === 'none') {
208
+ return modifierKeys.every(key => !event[`${key}Key`]);
209
+ }
210
+ return multiSortKey === 'ctrl'
211
+ ? event.ctrlKey || event.metaKey
212
+ : event[`${multiSortKey}Key`];
213
+ }
190
214
  ngAfterViewInit() {
191
215
  this.subscription.add(observe(this.dropTargets)
192
216
  .subscribe(this.attachTargets.bind(this)));
@@ -79,6 +79,7 @@ export declare class ListComponent implements OnInit, OnDestroy, AfterViewInit,
79
79
  trackBy: TrackByFunction<GridItem>;
80
80
  virtualColumns: boolean;
81
81
  isVirtual: boolean;
82
+ cellLoadingTemplate: TemplateRef<any>;
82
83
  loadingTemplate: TemplateRef<any>;
83
84
  contentScroll: EventEmitter<any>;
84
85
  pageChange: EventEmitter<Action>;
@@ -657,6 +657,10 @@ tslib_1.__decorate([
657
657
  Input(),
658
658
  tslib_1.__metadata("design:type", Boolean)
659
659
  ], ListComponent.prototype, "isVirtual", void 0);
660
+ tslib_1.__decorate([
661
+ Input(),
662
+ tslib_1.__metadata("design:type", TemplateRef)
663
+ ], ListComponent.prototype, "cellLoadingTemplate", void 0);
660
664
  tslib_1.__decorate([
661
665
  Input(),
662
666
  tslib_1.__metadata("design:type", TemplateRef)
@@ -738,7 +742,7 @@ ListComponent = tslib_1.__decorate([
738
742
  [rowClass]="rowClass"
739
743
  [isLoading]="loading"
740
744
  [isVirtual]="isVirtual"
741
- [loadingTemplate]="loadingTemplate">
745
+ [cellLoadingTemplate]="cellLoadingTemplate">
742
746
  </tbody>
743
747
  </table>
744
748
  <kendo-resize-sensor></kendo-resize-sensor>
@@ -781,7 +785,7 @@ ListComponent = tslib_1.__decorate([
781
785
  [virtualColumns]="virtualColumns"
782
786
  [isLoading]="loading"
783
787
  [isVirtual]="isVirtual"
784
- [loadingTemplate]="loadingTemplate">
788
+ [cellLoadingTemplate]="cellLoadingTemplate">
785
789
  </tbody>
786
790
  </table>
787
791
  <kendo-resize-sensor *ngIf="isLocked"></kendo-resize-sensor>
@@ -794,7 +798,7 @@ ListComponent = tslib_1.__decorate([
794
798
  <div [style.width.px]="totalWidth"></div>
795
799
  </div>
796
800
  </div>
797
- <div *ngIf="loading" kendoGridLoading>
801
+ <div [loadingTemplate]="loadingTemplate" *ngIf="loading" kendoGridLoading>
798
802
  </div>
799
803
  `
800
804
  }),
@@ -0,0 +1,14 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { TemplateRef } from '@angular/core';
6
+ /**
7
+ * Creates a loading template that overrides the default loading indicator of the Grid Component.
8
+ * To define a loading template, nest an `<ng-template>` tag with the `kendoGridLoadingTemplate` directive inside the `<kendo-grid>` tag
9
+ * [see example]({% slug databinding_grid %}#toc-loading-template).
10
+ */
11
+ export declare class LoadingTemplateDirective {
12
+ templateRef: TemplateRef<any>;
13
+ constructor(templateRef: TemplateRef<any>);
14
+ }
@@ -0,0 +1,23 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as tslib_1 from "tslib";
6
+ import { Directive, TemplateRef } from '@angular/core';
7
+ /**
8
+ * Creates a loading template that overrides the default loading indicator of the Grid Component.
9
+ * To define a loading template, nest an `<ng-template>` tag with the `kendoGridLoadingTemplate` directive inside the `<kendo-grid>` tag
10
+ * [see example]({% slug databinding_grid %}#toc-loading-template).
11
+ */
12
+ let LoadingTemplateDirective = class LoadingTemplateDirective {
13
+ constructor(templateRef) {
14
+ this.templateRef = templateRef;
15
+ }
16
+ };
17
+ LoadingTemplateDirective = tslib_1.__decorate([
18
+ Directive({
19
+ selector: '[kendoGridLoadingTemplate]'
20
+ }),
21
+ tslib_1.__metadata("design:paramtypes", [TemplateRef])
22
+ ], LoadingTemplateDirective);
23
+ export { LoadingTemplateDirective };
@@ -54,7 +54,7 @@ export declare class TableBodyComponent implements OnInit, OnDestroy, OnChanges,
54
54
  isLocked: boolean;
55
55
  isLoading: boolean;
56
56
  isVirtual: boolean;
57
- loadingTemplate: TemplateRef<any>;
57
+ cellLoadingTemplate: TemplateRef<any>;
58
58
  skipGroupDecoration: boolean;
59
59
  showGroupFooters: boolean;
60
60
  lockedColumnsCount: number;
@@ -409,7 +409,7 @@ tslib_1.__decorate([
409
409
  tslib_1.__decorate([
410
410
  Input(),
411
411
  tslib_1.__metadata("design:type", TemplateRef)
412
- ], TableBodyComponent.prototype, "loadingTemplate", void 0);
412
+ ], TableBodyComponent.prototype, "cellLoadingTemplate", void 0);
413
413
  tslib_1.__decorate([
414
414
  Input(),
415
415
  tslib_1.__metadata("design:type", Boolean)
@@ -497,6 +497,7 @@ TableBodyComponent = tslib_1.__decorate([
497
497
  </ng-container>
498
498
  </td>
499
499
  </tr>
500
+
500
501
  <ng-template ngFor
501
502
  [ngForOf]="data"
502
503
  [ngForTrackBy]="trackByWrapper"
@@ -564,7 +565,7 @@ TableBodyComponent = tslib_1.__decorate([
564
565
  [dataItem]="item.data"
565
566
  [isLoading]="isLoading"
566
567
  [isVirtual]="isVirtual"
567
- [loadingTemplate]="loadingTemplate"
568
+ [loadingTemplate]="cellLoadingTemplate"
568
569
  kendoGridLogicalCell
569
570
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
570
571
  [logicalColIndex]="logicalColIndex(column)"
@@ -2831,7 +2831,7 @@ const packageMetadata = {
2831
2831
  name: '@progress/kendo-angular-grid',
2832
2832
  productName: 'Kendo UI for Angular',
2833
2833
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
2834
- publishDate: 1645534887,
2834
+ publishDate: 1646127685,
2835
2835
  version: '',
2836
2836
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
2837
2837
  };
@@ -6466,6 +6466,23 @@ CellLoadingTemplateDirective = __decorate([
6466
6466
  __metadata("design:paramtypes", [TemplateRef])
6467
6467
  ], CellLoadingTemplateDirective);
6468
6468
 
6469
+ /**
6470
+ * Creates a loading template that overrides the default loading indicator of the Grid Component.
6471
+ * To define a loading template, nest an `<ng-template>` tag with the `kendoGridLoadingTemplate` directive inside the `<kendo-grid>` tag
6472
+ * [see example]({% slug databinding_grid %}#toc-loading-template).
6473
+ */
6474
+ let LoadingTemplateDirective = class LoadingTemplateDirective {
6475
+ constructor(templateRef) {
6476
+ this.templateRef = templateRef;
6477
+ }
6478
+ };
6479
+ LoadingTemplateDirective = __decorate([
6480
+ Directive({
6481
+ selector: '[kendoGridLoadingTemplate]'
6482
+ }),
6483
+ __metadata("design:paramtypes", [TemplateRef])
6484
+ ], LoadingTemplateDirective);
6485
+
6469
6486
  const createControl = (source) => (acc, key) => {
6470
6487
  acc[key] = new FormControl(source[key]);
6471
6488
  return acc;
@@ -7096,14 +7113,23 @@ let GridComponent = class GridComponent {
7096
7113
  set detailTemplate(detailTemplate) {
7097
7114
  this._customDetailTemplate = detailTemplate;
7098
7115
  }
7099
- get loadingTemplate() {
7100
- if (this._customLoadingTemplate) {
7116
+ get cellLoadingTemplate() {
7117
+ if (this._cellLoadingTemplate) {
7101
7118
  return this._customDetailTemplate;
7102
7119
  }
7120
+ return this.cellLoadingTemplateChildren ? this.cellLoadingTemplateChildren.first : undefined;
7121
+ }
7122
+ set cellLoadingTemplate(cellLoadingTemplate) {
7123
+ this._cellLoadingTemplate = cellLoadingTemplate;
7124
+ }
7125
+ get loadingTemplate() {
7126
+ if (this._loadingTemplate) {
7127
+ return this._loadingTemplate;
7128
+ }
7103
7129
  return this.loadingTemplateChildren ? this.loadingTemplateChildren.first : undefined;
7104
7130
  }
7105
7131
  set loadingTemplate(loadingTemplate) {
7106
- this._customLoadingTemplate = loadingTemplate;
7132
+ this._loadingTemplate = loadingTemplate;
7107
7133
  }
7108
7134
  get noRecordsTemplate() {
7109
7135
  if (this._customNoRecordsTemplate) {
@@ -8708,6 +8734,10 @@ __decorate([
8708
8734
  __decorate([
8709
8735
  ContentChildren(CellLoadingTemplateDirective),
8710
8736
  __metadata("design:type", QueryList)
8737
+ ], GridComponent.prototype, "cellLoadingTemplateChildren", void 0);
8738
+ __decorate([
8739
+ ContentChildren(LoadingTemplateDirective),
8740
+ __metadata("design:type", QueryList)
8711
8741
  ], GridComponent.prototype, "loadingTemplateChildren", void 0);
8712
8742
  __decorate([
8713
8743
  ContentChildren(NoRecordsTemplateDirective),
@@ -9137,6 +9167,7 @@ GridComponent = __decorate([
9137
9167
  [rowSticky]="rowSticky"
9138
9168
  [loading]="loading"
9139
9169
  [isVirtual]="isVirtual"
9170
+ [cellLoadingTemplate]="cellLoadingTemplate?.templateRef"
9140
9171
  [loadingTemplate]="loadingTemplate?.templateRef"
9141
9172
  [virtualColumns]="virtualColumns"
9142
9173
  (scrollBottom)="notifyScrollBottom()"
@@ -9241,7 +9272,7 @@ GridComponent = __decorate([
9241
9272
  [detailTemplate]="detailTemplate">
9242
9273
  </tfoot>
9243
9274
  </table>
9244
- <div *ngIf="loading" kendoGridLoading>
9275
+ <div [loadingTemplate]="loadingTemplate" *ngIf="loading" kendoGridLoading>
9245
9276
  </div>
9246
9277
  </ng-template>
9247
9278
  </div>
@@ -10085,6 +10116,10 @@ __decorate([
10085
10116
  Input(),
10086
10117
  __metadata("design:type", Boolean)
10087
10118
  ], ListComponent.prototype, "isVirtual", void 0);
10119
+ __decorate([
10120
+ Input(),
10121
+ __metadata("design:type", TemplateRef)
10122
+ ], ListComponent.prototype, "cellLoadingTemplate", void 0);
10088
10123
  __decorate([
10089
10124
  Input(),
10090
10125
  __metadata("design:type", TemplateRef)
@@ -10166,7 +10201,7 @@ ListComponent = __decorate([
10166
10201
  [rowClass]="rowClass"
10167
10202
  [isLoading]="loading"
10168
10203
  [isVirtual]="isVirtual"
10169
- [loadingTemplate]="loadingTemplate">
10204
+ [cellLoadingTemplate]="cellLoadingTemplate">
10170
10205
  </tbody>
10171
10206
  </table>
10172
10207
  <kendo-resize-sensor></kendo-resize-sensor>
@@ -10209,7 +10244,7 @@ ListComponent = __decorate([
10209
10244
  [virtualColumns]="virtualColumns"
10210
10245
  [isLoading]="loading"
10211
10246
  [isVirtual]="isVirtual"
10212
- [loadingTemplate]="loadingTemplate">
10247
+ [cellLoadingTemplate]="cellLoadingTemplate">
10213
10248
  </tbody>
10214
10249
  </table>
10215
10250
  <kendo-resize-sensor *ngIf="isLocked"></kendo-resize-sensor>
@@ -10222,7 +10257,7 @@ ListComponent = __decorate([
10222
10257
  <div [style.width.px]="totalWidth"></div>
10223
10258
  </div>
10224
10259
  </div>
10225
- <div *ngIf="loading" kendoGridLoading>
10260
+ <div [loadingTemplate]="loadingTemplate" *ngIf="loading" kendoGridLoading>
10226
10261
  </div>
10227
10262
  `
10228
10263
  }),
@@ -12727,13 +12762,21 @@ __decorate([
12727
12762
  HostBinding('class.k-loading-mask'),
12728
12763
  __metadata("design:type", Boolean)
12729
12764
  ], LoadingComponent.prototype, "hostClass", void 0);
12765
+ __decorate([
12766
+ Input(),
12767
+ __metadata("design:type", LoadingTemplateDirective)
12768
+ ], LoadingComponent.prototype, "loadingTemplate", void 0);
12730
12769
  LoadingComponent = __decorate([
12731
12770
  Component({
12732
12771
  selector: '[kendoGridLoading]',
12733
12772
  template: `
12734
- <span class="k-loading-text">{{ loadingText }}</span>
12735
- <div class="k-loading-image"></div>
12736
- <div class="k-loading-color"></div>
12773
+ <ng-container *ngIf="!loadingTemplate">
12774
+ <span class="k-loading-text">{{ loadingText }}</span>
12775
+ <div class="k-loading-image"></div>
12776
+ <div class="k-loading-color"></div>
12777
+ </ng-container>
12778
+ <ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate?.templateRef">
12779
+ </ng-template>
12737
12780
  `
12738
12781
  }),
12739
12782
  __metadata("design:paramtypes", [LocalizationService])
@@ -16012,7 +16055,8 @@ const DEFAULTS = {
16012
16055
  allowUnsort: true,
16013
16056
  mode: 'single',
16014
16057
  showIndexes: true,
16015
- initialDirection: 'asc'
16058
+ initialDirection: 'asc',
16059
+ multiSortKey: 'none'
16016
16060
  };
16017
16061
  /**
16018
16062
  * @hidden
@@ -16462,6 +16506,7 @@ const reorderable = ({ draggable }) => draggable.context.column.reorderable;
16462
16506
  const lockable = ({ draggable, target }) => draggable.context.column.lockable !== false ||
16463
16507
  draggable.context.column.isLocked === target.context.column.isLocked;
16464
16508
  const rules = and(ofColumnType, reorderable, notInSpanColumn, notSameElement, sameParent, not(lastNonLocked), lockable);
16509
+ const modifierKeys = ['alt', 'ctrl', 'shift', 'meta'];
16465
16510
  /**
16466
16511
  * @hidden
16467
16512
  */
@@ -16500,8 +16545,8 @@ let HeaderComponent = class HeaderComponent {
16500
16545
  get unlockedColumnsCount() {
16501
16546
  return this.totalColumnsCount - this.lockedColumnsCount - this.columns.length;
16502
16547
  }
16503
- sortColumn(column) {
16504
- this.sortService.sort(this.toggleSort(column));
16548
+ sortColumn(descriptor) {
16549
+ this.sortService.sort(descriptor);
16505
16550
  }
16506
16551
  onSortClick(column, event, link) {
16507
16552
  const target = event.target;
@@ -16512,7 +16557,9 @@ let HeaderComponent = class HeaderComponent {
16512
16557
  return;
16513
16558
  }
16514
16559
  }
16515
- this.sortColumn(column);
16560
+ const modifier = this.matchModifier(event);
16561
+ const toggledColumn = this.toggleSort(column, modifier);
16562
+ this.sortColumn(toggledColumn);
16516
16563
  }
16517
16564
  onHeaderKeydown(column, args) {
16518
16565
  if (args.keyCode === Keys.ArrowDown && args.altKey && this.showFilterMenu) {
@@ -16531,7 +16578,8 @@ let HeaderComponent = class HeaderComponent {
16531
16578
  return;
16532
16579
  }
16533
16580
  if (args.keyCode === Keys.Enter && isPresent(column.field)) {
16534
- this.sortService.sort(this.toggleSort(column));
16581
+ const modifier = this.matchModifier(args);
16582
+ this.sortService.sort(this.toggleSort(column, modifier));
16535
16583
  }
16536
16584
  }
16537
16585
  showSortNumbering(column) {
@@ -16581,14 +16629,34 @@ let HeaderComponent = class HeaderComponent {
16581
16629
  }
16582
16630
  return this.localization.get(msg);
16583
16631
  }
16584
- toggleSort(column) {
16632
+ /**
16633
+ *
16634
+ * @param column
16635
+ * @param modifier - Indicates whether the client-defined `multiSortKey` modifier is met. Defaults to `true`.
16636
+ * @returns - SortDescriptor[]
16637
+ */
16638
+ toggleSort(column, modifier = true) {
16585
16639
  const { allowUnsort, mode, initialDirection } = normalize$1(this.sortable, column.sortable);
16586
16640
  const descriptor = this.toggleDirection(column.field, allowUnsort, initialDirection);
16587
- if (mode === 'single') {
16641
+ if (mode === 'single' || !modifier) {
16588
16642
  return [descriptor];
16589
16643
  }
16590
16644
  return [...this.sort.filter(desc => desc.field !== column.field), descriptor];
16591
16645
  }
16646
+ /**
16647
+ *
16648
+ * Determines whether the modifier key (if any) passed
16649
+ * with a click/keyboard event matches the user-defined multiSortKey.
16650
+ */
16651
+ matchModifier(event) {
16652
+ const { multiSortKey } = normalize$1(this.sortable);
16653
+ if (multiSortKey === 'none') {
16654
+ return modifierKeys.every(key => !event[`${key}Key`]);
16655
+ }
16656
+ return multiSortKey === 'ctrl'
16657
+ ? event.ctrlKey || event.metaKey
16658
+ : event[`${multiSortKey}Key`];
16659
+ }
16592
16660
  ngAfterViewInit() {
16593
16661
  this.subscription.add(observe(this.dropTargets)
16594
16662
  .subscribe(this.attachTargets.bind(this)));
@@ -20959,7 +21027,7 @@ __decorate([
20959
21027
  __decorate([
20960
21028
  Input(),
20961
21029
  __metadata("design:type", TemplateRef)
20962
- ], TableBodyComponent.prototype, "loadingTemplate", void 0);
21030
+ ], TableBodyComponent.prototype, "cellLoadingTemplate", void 0);
20963
21031
  __decorate([
20964
21032
  Input(),
20965
21033
  __metadata("design:type", Boolean)
@@ -21047,6 +21115,7 @@ TableBodyComponent = __decorate([
21047
21115
  </ng-container>
21048
21116
  </td>
21049
21117
  </tr>
21118
+
21050
21119
  <ng-template ngFor
21051
21120
  [ngForOf]="data"
21052
21121
  [ngForTrackBy]="trackByWrapper"
@@ -21114,7 +21183,7 @@ TableBodyComponent = __decorate([
21114
21183
  [dataItem]="item.data"
21115
21184
  [isLoading]="isLoading"
21116
21185
  [isVirtual]="isVirtual"
21117
- [loadingTemplate]="loadingTemplate"
21186
+ [loadingTemplate]="cellLoadingTemplate"
21118
21187
  kendoGridLogicalCell
21119
21188
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
21120
21189
  [logicalColIndex]="logicalColIndex(column)"
@@ -21873,7 +21942,8 @@ const exported$1 = [
21873
21942
  SaveCommandDirective,
21874
21943
  RemoveCommandDirective,
21875
21944
  AddCommandDirective,
21876
- CellLoadingTemplateDirective
21945
+ CellLoadingTemplateDirective,
21946
+ LoadingTemplateDirective
21877
21947
  ];
21878
21948
  const importedModules$3 = [
21879
21949
  CommonModule,
@@ -21902,7 +21972,8 @@ let BodyModule = class BodyModule {
21902
21972
  SaveCommandDirective,
21903
21973
  RemoveCommandDirective,
21904
21974
  AddCommandDirective,
21905
- CellLoadingTemplateDirective
21975
+ CellLoadingTemplateDirective,
21976
+ LoadingTemplateDirective
21906
21977
  ];
21907
21978
  }
21908
21979
  };
@@ -23664,4 +23735,4 @@ ExcelModule = __decorate([
23664
23735
  * Generated bundle index. Do not edit.
23665
23736
  */
23666
23737
 
23667
- export { ColumnChooserComponent, ColumnListComponent, ColumnMenuChooserComponent, ColumnMenuContainerComponent, ColumnMenuFilterComponent, ColumnMenuItemBase, ColumnMenuItemContentTemplateDirective, ColumnMenuItemComponent, ColumnMenuItemDirective, ColumnMenuLockComponent, ColumnMenuPositionComponent, ColumnMenuSortComponent, ColumnMenuStickComponent, ColumnMenuTemplateDirective, ColumnMenuModule, ColumnMenuService, ColumnHandleDirective, ColumnResizingService, TableDirective, ColumnInfoService, DomEventsService, IdService, PreventableEvent, SortService, ChangeNotificationService, ColumnReorderService, DragAndDropModule, DragAndDropService, DragHintService, DraggableColumnDirective, DropCueService, DropTargetDirective, EditingDirectiveBase, RowEditingDirectiveBase, AddCommandDirective, CancelCommandDirective, EditCommandDirective, EditService as EditService$1, LocalDataChangesService, RemoveCommandDirective, SaveCommandDirective, ExcelCommandDirective, BooleanFilterComponent, BooleanFilterCellComponent, FilterCellHostDirective, FilterCellOperatorsComponent, FilterCellWrapperComponent, DateFilterComponent, FilterHostDirective, FilterInputWrapperComponent, FilterInputDirective, FilterRowComponent, DateFilterMenuInputComponent, FilterMenuContainerComponent, FilterMenuDropDownListDirective, FilterMenuHostDirective, FilterMenuInputWrapperComponent, FilterMenuComponent, BooleanFilterRadioButtonDirective, NumericFilterMenuInputComponent, StringFilterMenuInputComponent, NumericFilterComponent, FilterOperatorBase, SharedFilterModule, StringFilterComponent, GroupHeaderComponent, GroupIndicatorComponent, GroupInfoService, GroupPanelComponent, GroupsService, BrowserSupportService, ResizeService, ResponsiveService, LocalizedMessagesDirective, Messages, FocusGroup, FOCUS_ROOT_ACTIVE, FocusRoot, LogicalCellDirective, LogicalRowDirective, NavigationService, PagerContextService, PagerDropDownListDirective, PagerElementComponent, PagerInputDirective, PDFCommandDirective, PDFTemplateDirective, CellComponent, CELL_CONTEXT, EMPTY_CELL_CONTEXT, FieldAccessorPipe, DetailsService, DEFAULT_SCROLLER_FACTORY, SCROLLER_FACTORY_TOKEN, ScrollRequestService, ScrollSyncService, ScrollerService, CellSelectionService, GridMarqueeDirective, SelectAllCheckboxDirective, SelectionCheckboxDirective, Selection, SelectionService, GridModule, SharedModule, GridComponent, ColumnBase$1 as ColumnBase, ColumnComponent, CommandColumnComponent, SpanColumnComponent, ColumnGroupComponent, CheckboxColumnComponent, ToolbarComponent, ToolbarTemplateDirective, CellTemplateDirective, CellLoadingTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, PagerTemplateDirective, GridSpacerComponent, ExpandDetailsDirective, ExpandGroupDirective, DetailTemplateDirective, DetailExpandEvent, DetailCollapseEvent, GroupHeaderTemplateDirective, GroupHeaderColumnTemplateDirective, GroupFooterTemplateDirective, ResizableContainerDirective, TemplateContextDirective, NoRecordsTemplateDirective, DataBindingDirective, SelectionDirective, FilterService, FilterCellTemplateDirective, FilterCellComponent, StringFilterCellComponent, DateFilterCellComponent, BaseFilterCellComponent, FilterMenuTemplateDirective, NumericFilterMenuComponent, StringFilterMenuComponent, DateFilterMenuComponent, BooleanFilterMenuComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, AfterEqFilterOperatorComponent, AfterFilterOperatorComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, NumericFilterCellComponent, AutoCompleteFilterCellComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, PagerPrevButtonsComponent, PagerNextButtonsComponent, PagerNumericButtonsComponent, PagerInputComponent, PagerInfoComponent, PagerPageSizesComponent, RowFilterModule, FilterMenuModule, BodyModule, GroupModule, HeaderModule, FooterModule, PagerModule, TemplateEditingDirective, ReactiveEditingDirective, InCellEditingDirective, EditTemplateDirective, ColGroupComponent, HeaderComponent, ListComponent, FooterComponent, TableBodyComponent, PagerComponent, CustomMessagesComponent, LoadingComponent, PDFModule, PDFComponent, PDFMarginComponent, PDFService, ExcelModule, ExcelComponent, ExcelService, ExcelExportEvent, CellCloseEvent, SuspendService, GroupBindingDirective, slice, count, Skip, ColumnReorderEvent, FocusableDirective, ColumnVisibilityChangeEvent, ColumnMenuComponent, ColumnLockedChangeEvent, ColumnStickyChangeEvent, SinglePopupService, PopupCloseEvent, MenuTabbingService };
23738
+ export { ColumnChooserComponent, ColumnListComponent, ColumnMenuChooserComponent, ColumnMenuContainerComponent, ColumnMenuFilterComponent, ColumnMenuItemBase, ColumnMenuItemContentTemplateDirective, ColumnMenuItemComponent, ColumnMenuItemDirective, ColumnMenuLockComponent, ColumnMenuPositionComponent, ColumnMenuSortComponent, ColumnMenuStickComponent, ColumnMenuTemplateDirective, ColumnMenuModule, ColumnMenuService, ColumnHandleDirective, ColumnResizingService, TableDirective, ColumnInfoService, DomEventsService, IdService, PreventableEvent, SortService, ChangeNotificationService, ColumnReorderService, DragAndDropModule, DragAndDropService, DragHintService, DraggableColumnDirective, DropCueService, DropTargetDirective, EditingDirectiveBase, RowEditingDirectiveBase, AddCommandDirective, CancelCommandDirective, EditCommandDirective, EditService as EditService$1, LocalDataChangesService, RemoveCommandDirective, SaveCommandDirective, ExcelCommandDirective, BooleanFilterComponent, BooleanFilterCellComponent, FilterCellHostDirective, FilterCellOperatorsComponent, FilterCellWrapperComponent, DateFilterComponent, FilterHostDirective, FilterInputWrapperComponent, FilterInputDirective, FilterRowComponent, DateFilterMenuInputComponent, FilterMenuContainerComponent, FilterMenuDropDownListDirective, FilterMenuHostDirective, FilterMenuInputWrapperComponent, FilterMenuComponent, BooleanFilterRadioButtonDirective, NumericFilterMenuInputComponent, StringFilterMenuInputComponent, NumericFilterComponent, FilterOperatorBase, SharedFilterModule, StringFilterComponent, GroupHeaderComponent, GroupIndicatorComponent, GroupInfoService, GroupPanelComponent, GroupsService, BrowserSupportService, ResizeService, ResponsiveService, LocalizedMessagesDirective, Messages, FocusGroup, FOCUS_ROOT_ACTIVE, FocusRoot, LogicalCellDirective, LogicalRowDirective, NavigationService, PagerContextService, PagerDropDownListDirective, PagerElementComponent, PagerInputDirective, PDFCommandDirective, PDFTemplateDirective, CellComponent, CELL_CONTEXT, EMPTY_CELL_CONTEXT, FieldAccessorPipe, DetailsService, DEFAULT_SCROLLER_FACTORY, SCROLLER_FACTORY_TOKEN, ScrollRequestService, ScrollSyncService, ScrollerService, CellSelectionService, GridMarqueeDirective, SelectAllCheckboxDirective, SelectionCheckboxDirective, Selection, SelectionService, GridModule, SharedModule, GridComponent, ColumnBase$1 as ColumnBase, ColumnComponent, CommandColumnComponent, SpanColumnComponent, ColumnGroupComponent, CheckboxColumnComponent, ToolbarComponent, ToolbarTemplateDirective, CellTemplateDirective, CellLoadingTemplateDirective, LoadingTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, PagerTemplateDirective, GridSpacerComponent, ExpandDetailsDirective, ExpandGroupDirective, DetailTemplateDirective, DetailExpandEvent, DetailCollapseEvent, GroupHeaderTemplateDirective, GroupHeaderColumnTemplateDirective, GroupFooterTemplateDirective, ResizableContainerDirective, TemplateContextDirective, NoRecordsTemplateDirective, DataBindingDirective, SelectionDirective, FilterService, FilterCellTemplateDirective, FilterCellComponent, StringFilterCellComponent, DateFilterCellComponent, BaseFilterCellComponent, FilterMenuTemplateDirective, NumericFilterMenuComponent, StringFilterMenuComponent, DateFilterMenuComponent, BooleanFilterMenuComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, AfterEqFilterOperatorComponent, AfterFilterOperatorComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, NumericFilterCellComponent, AutoCompleteFilterCellComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, PagerPrevButtonsComponent, PagerNextButtonsComponent, PagerNumericButtonsComponent, PagerInputComponent, PagerInfoComponent, PagerPageSizesComponent, RowFilterModule, FilterMenuModule, BodyModule, GroupModule, HeaderModule, FooterModule, PagerModule, TemplateEditingDirective, ReactiveEditingDirective, InCellEditingDirective, EditTemplateDirective, ColGroupComponent, HeaderComponent, ListComponent, FooterComponent, TableBodyComponent, PagerComponent, CustomMessagesComponent, LoadingComponent, PDFModule, PDFComponent, PDFMarginComponent, PDFService, ExcelModule, ExcelComponent, ExcelService, ExcelExportEvent, CellCloseEvent, SuspendService, GroupBindingDirective, slice, count, Skip, ColumnReorderEvent, FocusableDirective, ColumnVisibilityChangeEvent, ColumnMenuComponent, ColumnLockedChangeEvent, ColumnStickyChangeEvent, SinglePopupService, PopupCloseEvent, MenuTabbingService };