@progress/kendo-angular-grid 6.0.2 → 6.1.0-dev.202202221518

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/grid.component.js +22 -4
  4. package/dist/es/index.js +0 -1
  5. package/dist/es/main.js +3 -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/list.component.js +5 -1
  10. package/dist/es/rendering/loading-template.directive.js +24 -0
  11. package/dist/es/rendering/table-body.component.js +2 -2
  12. package/dist/es/selection/selectall-checkbox.directive.js +18 -11
  13. package/dist/es2015/grid.component.d.ts +7 -3
  14. package/dist/es2015/grid.component.js +19 -4
  15. package/dist/es2015/index.d.ts +0 -1
  16. package/dist/es2015/index.js +0 -1
  17. package/dist/es2015/index.metadata.json +1 -1
  18. package/dist/es2015/main.d.ts +2 -0
  19. package/dist/es2015/main.js +3 -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/list.component.d.ts +1 -0
  25. package/dist/es2015/rendering/list.component.js +7 -3
  26. package/dist/es2015/rendering/loading-template.directive.d.ts +14 -0
  27. package/dist/es2015/rendering/loading-template.directive.js +23 -0
  28. package/dist/es2015/rendering/table-body.component.d.ts +1 -1
  29. package/dist/es2015/rendering/table-body.component.js +3 -2
  30. package/dist/es2015/selection/selectall-checkbox.directive.d.ts +1 -1
  31. package/dist/es2015/selection/selectall-checkbox.directive.js +18 -11
  32. package/dist/fesm2015/index.js +78 -26
  33. package/dist/fesm5/index.js +73 -22
  34. package/dist/npm/grid.component.js +22 -4
  35. package/dist/npm/index.js +0 -2
  36. package/dist/npm/main.js +5 -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/list.component.js +5 -1
  41. package/dist/npm/rendering/loading-template.directive.js +26 -0
  42. package/dist/npm/rendering/table-body.component.js +2 -2
  43. package/dist/npm/selection/selectall-checkbox.directive.js +17 -10
  44. package/dist/systemjs/kendo-angular-grid.js +1 -1
  45. package/package.json +1 -1
@@ -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';
@@ -147,3 +148,4 @@ export { ColumnLockedChangeEvent } from './column-menu/column-locked-change-even
147
148
  export { ColumnStickyChangeEvent } from './column-menu/column-sticky-change-event';
148
149
  export { SinglePopupService, PopupCloseEvent } from './common/single-popup.service';
149
150
  export { ScrollRequest } from './scrolling/scroll-request.service';
151
+ export { MenuTabbingService } from './filtering/menu/menu-tabbing.service';
@@ -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';
@@ -110,3 +111,5 @@ export { ColumnMenuComponent } from './column-menu/column-menu.component';
110
111
  export { ColumnLockedChangeEvent } from './column-menu/column-locked-change-event';
111
112
  export { ColumnStickyChangeEvent } from './column-menu/column-sticky-change-event';
112
113
  export { SinglePopupService, PopupCloseEvent } from './common/single-popup.service';
114
+ // Needed as it is an optional injection of the FilterService
115
+ export { MenuTabbingService } from './filtering/menu/menu-tabbing.service';
@@ -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: 1644844868,
12
+ publishDate: 1645542579,
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])
@@ -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)"
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Renderer2, ElementRef, OnDestroy, AfterContentChecked, OnChanges, EventEmitter, NgZone } from '@angular/core';
6
6
  import { SelectionService } from './selection.service';
7
- import { SelectAllCheckboxState } from "./types";
7
+ import { SelectAllCheckboxState } from './types';
8
8
  /**
9
9
  * Represents the select-all checkbox feature of the Grid ([see example]({% slug selection_grid %}#toc-select-all-feature)).
10
10
  */
@@ -6,7 +6,8 @@ import * as tslib_1 from "tslib";
6
6
  import { detectIE } from './../utils';
7
7
  import { Directive, HostBinding, Renderer2, ElementRef, Input, Output, EventEmitter, NgZone } from '@angular/core';
8
8
  import { SelectionService } from './selection.service';
9
- import { isPresent } from "../utils";
9
+ import { isPresent } from '../utils';
10
+ import { hasObservers } from '@progress/kendo-angular-common';
10
11
  /**
11
12
  * Represents the select-all checkbox feature of the Grid ([see example]({% slug selection_grid %}#toc-select-all-feature)).
12
13
  */
@@ -21,10 +22,10 @@ let SelectAllCheckboxDirective = class SelectAllCheckboxDirective {
21
22
  * ([see example]({% slug selection_grid %}#toc-select-all-feature)).
22
23
  */
23
24
  this.selectAllChange = new EventEmitter();
24
- this.type = "checkbox";
25
+ this.type = 'checkbox';
25
26
  this.stateSet = false;
26
27
  this.ngZone.runOutsideAngular(() => {
27
- this.destroyClick = this.renderer.listen(this.el.nativeElement, "click", this.onClick.bind(this));
28
+ this.destroyClick = this.renderer.listen(this.el.nativeElement, 'click', this.onClick.bind(this));
28
29
  });
29
30
  }
30
31
  ngAfterContentChecked() {
@@ -42,14 +43,20 @@ let SelectAllCheckboxDirective = class SelectAllCheckboxDirective {
42
43
  * @hidden
43
44
  */
44
45
  onClick() {
45
- // yields consistent cross-browser behavior when clicking an "indeterminate" checkbox
46
+ // yields consistent cross-browser behavior when clicking an indeterminate checkbox
46
47
  const undefinedCheckedStateInIE = detectIE() && this.selectionService.selectAllState === undefined;
47
48
  const isChecked = undefinedCheckedStateInIE ? true : this.el.nativeElement.checked;
48
49
  const options = this.selectionService.options;
49
- this.selectAllChange.emit(isChecked ? "checked" : "unchecked");
50
- if (options.enabled && options.mode === "multiple") {
50
+ const enabledAndMultiple = options.enabled && options.mode === 'multiple';
51
+ const shouldEmitSelectAll = hasObservers(this.selectAllChange);
52
+ if (enabledAndMultiple || shouldEmitSelectAll) {
51
53
  this.ngZone.run(() => {
52
- this.selectionService.updateAll(isChecked);
54
+ if (enabledAndMultiple) {
55
+ this.selectionService.updateAll(isChecked);
56
+ }
57
+ if (shouldEmitSelectAll) {
58
+ this.selectAllChange.emit(isChecked ? 'checked' : 'unchecked');
59
+ }
53
60
  });
54
61
  }
55
62
  }
@@ -59,17 +66,17 @@ let SelectAllCheckboxDirective = class SelectAllCheckboxDirective {
59
66
  setState() {
60
67
  const state = this.stateSet ? this.stateToBool() : this.selectionService.selectAllState;
61
68
  const elem = this.el.nativeElement;
62
- this.renderer.setProperty(elem, "indeterminate", !isPresent(state));
63
- this.renderer.setProperty(elem, "checked", isPresent(state) ? state : false);
69
+ this.renderer.setProperty(elem, 'indeterminate', !isPresent(state));
70
+ this.renderer.setProperty(elem, 'checked', isPresent(state) ? state : false);
64
71
  }
65
72
  /**
66
73
  * @hidden
67
74
  */
68
75
  stateToBool() {
69
76
  switch (this.state) {
70
- case "checked":
77
+ case 'checked':
71
78
  return true;
72
- case "unchecked":
79
+ case 'unchecked':
73
80
  return false;
74
81
  default:
75
82
  return undefined;
@@ -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: 1644844868,
2834
+ publishDate: 1645542579,
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])
@@ -17329,10 +17372,10 @@ let SelectAllCheckboxDirective = class SelectAllCheckboxDirective {
17329
17372
  * ([see example]({% slug selection_grid %}#toc-select-all-feature)).
17330
17373
  */
17331
17374
  this.selectAllChange = new EventEmitter();
17332
- this.type = "checkbox";
17375
+ this.type = 'checkbox';
17333
17376
  this.stateSet = false;
17334
17377
  this.ngZone.runOutsideAngular(() => {
17335
- this.destroyClick = this.renderer.listen(this.el.nativeElement, "click", this.onClick.bind(this));
17378
+ this.destroyClick = this.renderer.listen(this.el.nativeElement, 'click', this.onClick.bind(this));
17336
17379
  });
17337
17380
  }
17338
17381
  ngAfterContentChecked() {
@@ -17350,14 +17393,20 @@ let SelectAllCheckboxDirective = class SelectAllCheckboxDirective {
17350
17393
  * @hidden
17351
17394
  */
17352
17395
  onClick() {
17353
- // yields consistent cross-browser behavior when clicking an "indeterminate" checkbox
17396
+ // yields consistent cross-browser behavior when clicking an indeterminate checkbox
17354
17397
  const undefinedCheckedStateInIE = detectIE() && this.selectionService.selectAllState === undefined;
17355
17398
  const isChecked = undefinedCheckedStateInIE ? true : this.el.nativeElement.checked;
17356
17399
  const options = this.selectionService.options;
17357
- this.selectAllChange.emit(isChecked ? "checked" : "unchecked");
17358
- if (options.enabled && options.mode === "multiple") {
17400
+ const enabledAndMultiple = options.enabled && options.mode === 'multiple';
17401
+ const shouldEmitSelectAll = hasObservers(this.selectAllChange);
17402
+ if (enabledAndMultiple || shouldEmitSelectAll) {
17359
17403
  this.ngZone.run(() => {
17360
- this.selectionService.updateAll(isChecked);
17404
+ if (enabledAndMultiple) {
17405
+ this.selectionService.updateAll(isChecked);
17406
+ }
17407
+ if (shouldEmitSelectAll) {
17408
+ this.selectAllChange.emit(isChecked ? 'checked' : 'unchecked');
17409
+ }
17361
17410
  });
17362
17411
  }
17363
17412
  }
@@ -17367,17 +17416,17 @@ let SelectAllCheckboxDirective = class SelectAllCheckboxDirective {
17367
17416
  setState() {
17368
17417
  const state$$1 = this.stateSet ? this.stateToBool() : this.selectionService.selectAllState;
17369
17418
  const elem = this.el.nativeElement;
17370
- this.renderer.setProperty(elem, "indeterminate", !isPresent(state$$1));
17371
- this.renderer.setProperty(elem, "checked", isPresent(state$$1) ? state$$1 : false);
17419
+ this.renderer.setProperty(elem, 'indeterminate', !isPresent(state$$1));
17420
+ this.renderer.setProperty(elem, 'checked', isPresent(state$$1) ? state$$1 : false);
17372
17421
  }
17373
17422
  /**
17374
17423
  * @hidden
17375
17424
  */
17376
17425
  stateToBool() {
17377
17426
  switch (this.state) {
17378
- case "checked":
17427
+ case 'checked':
17379
17428
  return true;
17380
- case "unchecked":
17429
+ case 'unchecked':
17381
17430
  return false;
17382
17431
  default:
17383
17432
  return undefined;
@@ -20953,7 +21002,7 @@ __decorate([
20953
21002
  __decorate([
20954
21003
  Input(),
20955
21004
  __metadata("design:type", TemplateRef)
20956
- ], TableBodyComponent.prototype, "loadingTemplate", void 0);
21005
+ ], TableBodyComponent.prototype, "cellLoadingTemplate", void 0);
20957
21006
  __decorate([
20958
21007
  Input(),
20959
21008
  __metadata("design:type", Boolean)
@@ -21041,6 +21090,7 @@ TableBodyComponent = __decorate([
21041
21090
  </ng-container>
21042
21091
  </td>
21043
21092
  </tr>
21093
+
21044
21094
  <ng-template ngFor
21045
21095
  [ngForOf]="data"
21046
21096
  [ngForTrackBy]="trackByWrapper"
@@ -21108,7 +21158,7 @@ TableBodyComponent = __decorate([
21108
21158
  [dataItem]="item.data"
21109
21159
  [isLoading]="isLoading"
21110
21160
  [isVirtual]="isVirtual"
21111
- [loadingTemplate]="loadingTemplate"
21161
+ [loadingTemplate]="cellLoadingTemplate"
21112
21162
  kendoGridLogicalCell
21113
21163
  [logicalRowIndex]="logicalRowIndex(rowIndex)"
21114
21164
  [logicalColIndex]="logicalColIndex(column)"
@@ -21867,7 +21917,8 @@ const exported$1 = [
21867
21917
  SaveCommandDirective,
21868
21918
  RemoveCommandDirective,
21869
21919
  AddCommandDirective,
21870
- CellLoadingTemplateDirective
21920
+ CellLoadingTemplateDirective,
21921
+ LoadingTemplateDirective
21871
21922
  ];
21872
21923
  const importedModules$3 = [
21873
21924
  CommonModule,
@@ -21896,7 +21947,8 @@ let BodyModule = class BodyModule {
21896
21947
  SaveCommandDirective,
21897
21948
  RemoveCommandDirective,
21898
21949
  AddCommandDirective,
21899
- CellLoadingTemplateDirective
21950
+ CellLoadingTemplateDirective,
21951
+ LoadingTemplateDirective
21900
21952
  ];
21901
21953
  }
21902
21954
  };
@@ -23658,4 +23710,4 @@ ExcelModule = __decorate([
23658
23710
  * Generated bundle index. Do not edit.
23659
23711
  */
23660
23712
 
23661
- 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, MenuTabbingService, 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 };
23713
+ 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 };