@progress/kendo-angular-grid 5.5.0-dev.202111231008 → 5.5.1-dev.202112071035

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 (44) hide show
  1. package/dist/cdn/js/kendo-angular-grid.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/columns/checkbox-column.component.js +5 -4
  4. package/dist/es/columns/column-base.js +6 -2
  5. package/dist/es/columns/column-group.component.js +5 -4
  6. package/dist/es/columns/column.component.js +5 -4
  7. package/dist/es/columns/command-column.component.js +5 -4
  8. package/dist/es/columns/span-column.component.js +5 -4
  9. package/dist/es/common/id.service.js +3 -0
  10. package/dist/es/editing-directives/in-cell-editing.directive.js +4 -0
  11. package/dist/es/navigation/navigation.service.js +1 -1
  12. package/dist/es/package-metadata.js +1 -1
  13. package/dist/es2015/columns/checkbox-column.component.d.ts +2 -1
  14. package/dist/es2015/columns/checkbox-column.component.js +5 -4
  15. package/dist/es2015/columns/column-base.d.ts +9 -1
  16. package/dist/es2015/columns/column-base.js +6 -2
  17. package/dist/es2015/columns/column-group.component.d.ts +2 -1
  18. package/dist/es2015/columns/column-group.component.js +5 -4
  19. package/dist/es2015/columns/column.component.d.ts +2 -1
  20. package/dist/es2015/columns/column.component.js +5 -4
  21. package/dist/es2015/columns/command-column.component.d.ts +2 -1
  22. package/dist/es2015/columns/command-column.component.js +5 -4
  23. package/dist/es2015/columns/span-column.component.d.ts +2 -1
  24. package/dist/es2015/columns/span-column.component.js +5 -4
  25. package/dist/es2015/common/id.service.d.ts +1 -0
  26. package/dist/es2015/common/id.service.js +3 -0
  27. package/dist/es2015/editing-directives/in-cell-editing.directive.js +4 -0
  28. package/dist/es2015/index.metadata.json +1 -1
  29. package/dist/es2015/navigation/navigation.service.js +1 -1
  30. package/dist/es2015/package-metadata.js +1 -1
  31. package/dist/fesm2015/index.js +58 -48
  32. package/dist/fesm5/index.js +59 -49
  33. package/dist/npm/columns/checkbox-column.component.js +5 -4
  34. package/dist/npm/columns/column-base.js +6 -2
  35. package/dist/npm/columns/column-group.component.js +5 -4
  36. package/dist/npm/columns/column.component.js +5 -4
  37. package/dist/npm/columns/command-column.component.js +5 -4
  38. package/dist/npm/columns/span-column.component.js +5 -4
  39. package/dist/npm/common/id.service.js +3 -0
  40. package/dist/npm/editing-directives/in-cell-editing.directive.js +4 -0
  41. package/dist/npm/navigation/navigation.service.js +1 -1
  42. package/dist/npm/package-metadata.js +1 -1
  43. package/dist/systemjs/kendo-angular-grid.js +1 -1
  44. package/package.json +4 -4
@@ -6,6 +6,7 @@ import * as tslib_1 from "tslib";
6
6
  import { Component, forwardRef, ContentChild, SkipSelf, Host, Optional, Input } from '@angular/core';
7
7
  import { ColumnBase } from './column-base';
8
8
  import { CellTemplateDirective } from '../rendering/cell-template.directive';
9
+ import { IdService } from '../common/id.service';
9
10
  /**
10
11
  * Represents the checkbox for selecting columns in the Grid. If the column is
11
12
  * defined as empty, it renders a default checkbox for row selection.
@@ -70,8 +71,8 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
70
71
  */
71
72
  var CheckboxColumnComponent = /** @class */ (function (_super) {
72
73
  tslib_1.__extends(CheckboxColumnComponent, _super);
73
- function CheckboxColumnComponent(parent) {
74
- var _this = _super.call(this, parent) || this;
74
+ function CheckboxColumnComponent(parent, idService) {
75
+ var _this = _super.call(this, parent, idService) || this;
75
76
  _this.parent = parent;
76
77
  /*
77
78
  * @hidden
@@ -107,8 +108,8 @@ var CheckboxColumnComponent = /** @class */ (function (_super) {
107
108
  selector: 'kendo-grid-checkbox-column',
108
109
  template: ""
109
110
  }),
110
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
111
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
111
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
112
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
112
113
  ], CheckboxColumnComponent);
113
114
  return CheckboxColumnComponent;
114
115
  }(ColumnBase));
@@ -21,7 +21,10 @@ var ɵ0 = isColumnContainer;
21
21
  * The base class for the column components of the Grid.
22
22
  */
23
23
  var ColumnBase = /** @class */ (function () {
24
- function ColumnBase(parent) {
24
+ /**
25
+ * @hidden
26
+ */
27
+ function ColumnBase(parent, idService) {
25
28
  this.parent = parent;
26
29
  /**
27
30
  * @hidden
@@ -130,7 +133,8 @@ var ColumnBase = /** @class */ (function () {
130
133
  * @hidden
131
134
  */
132
135
  this.columnMenuTemplates = new QueryList();
133
- if (parent && !isColumnContainer(parent)) {
136
+ this.idService = idService;
137
+ if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
134
138
  throw new Error('Columns can be nested only inside ColumnGroupComponent');
135
139
  }
136
140
  }
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Component, forwardRef, SkipSelf, Host, Optional, QueryList, ContentChildren } from '@angular/core';
7
+ import { IdService } from '../common/id.service';
7
8
  import { ColumnBase } from './column-base';
8
9
  import { columnsSpan } from './column-common';
9
10
  /**
@@ -68,8 +69,8 @@ export function isColumnGroupComponent(column) {
68
69
  */
69
70
  var ColumnGroupComponent = /** @class */ (function (_super) {
70
71
  tslib_1.__extends(ColumnGroupComponent, _super);
71
- function ColumnGroupComponent(parent) {
72
- var _this = _super.call(this, parent) || this;
72
+ function ColumnGroupComponent(parent, idService) {
73
+ var _this = _super.call(this, parent, idService) || this;
73
74
  _this.parent = parent;
74
75
  /**
75
76
  * @hidden
@@ -159,8 +160,8 @@ var ColumnGroupComponent = /** @class */ (function (_super) {
159
160
  selector: 'kendo-grid-column-group',
160
161
  template: ""
161
162
  }),
162
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
163
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
163
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
164
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
164
165
  ], ColumnGroupComponent);
165
166
  return ColumnGroupComponent;
166
167
  }(ColumnBase));
@@ -13,6 +13,7 @@ import { ColumnBase } from './column-base';
13
13
  import { isPresent } from '../utils';
14
14
  import { FilterCellTemplateDirective } from '../filtering/cell/filter-cell-template.directive';
15
15
  import { FilterMenuTemplateDirective } from '../filtering/menu/filter-menu-template.directive';
16
+ import { IdService } from '../common/id.service';
16
17
  /**
17
18
  * @hidden
18
19
  */
@@ -69,8 +70,8 @@ export function isColumnComponent(column) {
69
70
  */
70
71
  var ColumnComponent = /** @class */ (function (_super) {
71
72
  tslib_1.__extends(ColumnComponent, _super);
72
- function ColumnComponent(parent) {
73
- var _this = _super.call(this, parent) || this;
73
+ function ColumnComponent(parent, idService) {
74
+ var _this = _super.call(this, parent, idService) || this;
74
75
  /**
75
76
  * Allows the column headers to be clicked and the `sortChange` event emitted.
76
77
  * You have to handle the `sortChange` event yourself and sort the data.
@@ -261,8 +262,8 @@ var ColumnComponent = /** @class */ (function (_super) {
261
262
  selector: 'kendo-grid-column',
262
263
  template: ""
263
264
  }),
264
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
265
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
265
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
266
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
266
267
  ], ColumnComponent);
267
268
  return ColumnComponent;
268
269
  }(ColumnBase));
@@ -6,6 +6,7 @@ import * as tslib_1 from "tslib";
6
6
  import { Component, forwardRef, ContentChild, SkipSelf, Host, Optional } from '@angular/core';
7
7
  import { ColumnBase } from './column-base';
8
8
  import { CellTemplateDirective } from '../rendering/cell-template.directive';
9
+ import { IdService } from '../common/id.service';
9
10
  /**
10
11
  * Represents the command columns of the Grid. You have to define the content of the
11
12
  * column inside an `<ng-template>` tag. The template context is set to the current
@@ -74,8 +75,8 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
74
75
  */
75
76
  var CommandColumnComponent = /** @class */ (function (_super) {
76
77
  tslib_1.__extends(CommandColumnComponent, _super);
77
- function CommandColumnComponent(parent) {
78
- var _this = _super.call(this, parent) || this;
78
+ function CommandColumnComponent(parent, idService) {
79
+ var _this = _super.call(this, parent, idService) || this;
79
80
  _this.parent = parent;
80
81
  return _this;
81
82
  }
@@ -103,8 +104,8 @@ var CommandColumnComponent = /** @class */ (function (_super) {
103
104
  selector: 'kendo-grid-command-column',
104
105
  template: ""
105
106
  }),
106
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
107
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
107
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
108
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
108
109
  ], CommandColumnComponent);
109
110
  return CommandColumnComponent;
110
111
  }(ColumnBase));
@@ -9,6 +9,7 @@ import { EditTemplateDirective } from '../editing/edit-template.directive';
9
9
  import { ColumnBase } from './column-base';
10
10
  import { ColumnComponent } from "./column.component";
11
11
  import { isPresent } from "../utils";
12
+ import { IdService } from '../common/id.service';
12
13
  /**
13
14
  * @hidden
14
15
  */
@@ -83,8 +84,8 @@ export function isSpanColumnComponent(column) {
83
84
  */
84
85
  var SpanColumnComponent = /** @class */ (function (_super) {
85
86
  tslib_1.__extends(SpanColumnComponent, _super);
86
- function SpanColumnComponent(parent) {
87
- var _this = _super.call(this, parent) || this;
87
+ function SpanColumnComponent(parent, idService) {
88
+ var _this = _super.call(this, parent, idService) || this;
88
89
  /*
89
90
  * @hidden
90
91
  */
@@ -303,8 +304,8 @@ var SpanColumnComponent = /** @class */ (function (_super) {
303
304
  selector: 'kendo-grid-span-column',
304
305
  template: ""
305
306
  }),
306
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
307
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
307
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
308
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
308
309
  ], SpanColumnComponent);
309
310
  return SpanColumnComponent;
310
311
  }(ColumnBase));
@@ -13,6 +13,9 @@ var IdService = /** @class */ (function () {
13
13
  function IdService() {
14
14
  this.prefix = "k-grid" + sequence++;
15
15
  }
16
+ IdService.prototype.gridId = function () {
17
+ return this.prefix;
18
+ };
16
19
  IdService.prototype.cellId = function (rowIndex, colIndex) {
17
20
  return this.prefix + "-r" + rowIndex + "c" + colIndex;
18
21
  };
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
6
  import { ChangeDetectorRef, Directive, Input } from '@angular/core';
7
+ import { Keys } from '@progress/kendo-angular-common';
7
8
  import { EditingDirectiveBase } from './editing-directive-base';
8
9
  import { GridComponent } from '../grid.component';
9
10
  import { LocalDataChangesService } from '../editing/local-data-changes.service';
@@ -60,6 +61,9 @@ var InCellEditingDirective = /** @class */ (function (_super) {
60
61
  args.preventDefault();
61
62
  }
62
63
  else if (formGroup.dirty) {
64
+ if (args.originalEvent && args.originalEvent.keyCode === Keys.Escape) {
65
+ return;
66
+ }
63
67
  this.editService.assignValues(dataItem, formGroup.value);
64
68
  this.editService.update(dataItem);
65
69
  }
@@ -559,7 +559,7 @@ var NavigationService = /** @class */ (function () {
559
559
  this.editService.closeCell(args);
560
560
  }
561
561
  else if (cancel) {
562
- this.editService.cancelCell();
562
+ this.editService.closeCell(args);
563
563
  this.cd.detectChanges();
564
564
  }
565
565
  else if (navigate) {
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-grid',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1637661571,
12
+ publishDate: 1638872746,
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
  };
@@ -5,6 +5,7 @@
5
5
  import { TemplateRef } from '@angular/core';
6
6
  import { ColumnBase } from './column-base';
7
7
  import { CellTemplateDirective } from '../rendering/cell-template.directive';
8
+ import { IdService } from '../common/id.service';
8
9
  /**
9
10
  * Represents the checkbox for selecting columns in the Grid. If the column is
10
11
  * defined as empty, it renders a default checkbox for row selection.
@@ -75,6 +76,6 @@ export declare class CheckboxColumnComponent extends ColumnBase {
75
76
  showSelectAll: boolean;
76
77
  readonly isCheckboxColumn: boolean;
77
78
  template: CellTemplateDirective;
78
- constructor(parent?: ColumnBase);
79
+ constructor(parent?: ColumnBase, idService?: IdService);
79
80
  readonly templateRef: TemplateRef<any>;
80
81
  }
@@ -7,6 +7,7 @@ var CheckboxColumnComponent_1;
7
7
  import { Component, forwardRef, ContentChild, SkipSelf, Host, Optional, Input } from '@angular/core';
8
8
  import { ColumnBase } from './column-base';
9
9
  import { CellTemplateDirective } from '../rendering/cell-template.directive';
10
+ import { IdService } from '../common/id.service';
10
11
  /**
11
12
  * Represents the checkbox for selecting columns in the Grid. If the column is
12
13
  * defined as empty, it renders a default checkbox for row selection.
@@ -70,8 +71,8 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
70
71
  * ```
71
72
  */
72
73
  let CheckboxColumnComponent = CheckboxColumnComponent_1 = class CheckboxColumnComponent extends ColumnBase {
73
- constructor(parent) {
74
- super(parent);
74
+ constructor(parent, idService) {
75
+ super(parent, idService);
75
76
  this.parent = parent;
76
77
  /*
77
78
  * @hidden
@@ -101,7 +102,7 @@ CheckboxColumnComponent = CheckboxColumnComponent_1 = tslib_1.__decorate([
101
102
  selector: 'kendo-grid-checkbox-column',
102
103
  template: ``
103
104
  }),
104
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
105
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
105
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
106
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
106
107
  ], CheckboxColumnComponent);
107
108
  export { CheckboxColumnComponent };
@@ -6,6 +6,7 @@ import { TemplateRef, QueryList } from '@angular/core';
6
6
  import { HeaderTemplateDirective } from '../rendering/header/header-template.directive';
7
7
  import { FooterTemplateDirective } from '../rendering/footer/footer-template.directive';
8
8
  import { ColumnMenuTemplateDirective } from '../column-menu/column-menu-template.directive';
9
+ import { IdService } from '../common/id.service';
9
10
  /**
10
11
  * @hidden
11
12
  */
@@ -558,6 +559,10 @@ export declare class ColumnBase {
558
559
  * @hidden
559
560
  */
560
561
  resizeStartWidth: number;
562
+ /**
563
+ * @hidden
564
+ */
565
+ idService: IdService;
561
566
  /**
562
567
  * @hidden
563
568
  */
@@ -595,5 +600,8 @@ export declare class ColumnBase {
595
600
  * @hidden
596
601
  */
597
602
  readonly isVisible: boolean;
598
- constructor(parent?: ColumnBase);
603
+ /**
604
+ * @hidden
605
+ */
606
+ constructor(parent?: ColumnBase, idService?: IdService);
599
607
  }
@@ -21,7 +21,10 @@ const ɵ0 = isColumnContainer;
21
21
  * The base class for the column components of the Grid.
22
22
  */
23
23
  export class ColumnBase {
24
- constructor(parent) {
24
+ /**
25
+ * @hidden
26
+ */
27
+ constructor(parent, idService) {
25
28
  this.parent = parent;
26
29
  /**
27
30
  * @hidden
@@ -130,7 +133,8 @@ export class ColumnBase {
130
133
  * @hidden
131
134
  */
132
135
  this.columnMenuTemplates = new QueryList();
133
- if (parent && !isColumnContainer(parent)) {
136
+ this.idService = idService;
137
+ if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
134
138
  throw new Error('Columns can be nested only inside ColumnGroupComponent');
135
139
  }
136
140
  }
@@ -3,6 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { QueryList } from '@angular/core';
6
+ import { IdService } from '../common/id.service';
6
7
  import { ColumnBase } from './column-base';
7
8
  /**
8
9
  * @hidden
@@ -80,7 +81,7 @@ export declare class ColumnGroupComponent extends ColumnBase {
80
81
  * @hidden
81
82
  */
82
83
  children: QueryList<ColumnBase>;
83
- constructor(parent?: ColumnBase);
84
+ constructor(parent?: ColumnBase, idService?: IdService);
84
85
  /**
85
86
  * @hidden
86
87
  */
@@ -5,6 +5,7 @@
5
5
  import * as tslib_1 from "tslib";
6
6
  var ColumnGroupComponent_1;
7
7
  import { Component, forwardRef, SkipSelf, Host, Optional, QueryList, ContentChildren } from '@angular/core';
8
+ import { IdService } from '../common/id.service';
8
9
  import { ColumnBase } from './column-base';
9
10
  import { columnsSpan } from './column-common';
10
11
  /**
@@ -68,8 +69,8 @@ export function isColumnGroupComponent(column) {
68
69
  * ```
69
70
  */
70
71
  let ColumnGroupComponent = ColumnGroupComponent_1 = class ColumnGroupComponent extends ColumnBase {
71
- constructor(parent) {
72
- super(parent);
72
+ constructor(parent, idService) {
73
+ super(parent, idService);
73
74
  this.parent = parent;
74
75
  /**
75
76
  * @hidden
@@ -134,7 +135,7 @@ ColumnGroupComponent = ColumnGroupComponent_1 = tslib_1.__decorate([
134
135
  selector: 'kendo-grid-column-group',
135
136
  template: ``
136
137
  }),
137
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
138
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
138
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
139
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
139
140
  ], ColumnGroupComponent);
140
141
  export { ColumnGroupComponent };
@@ -12,6 +12,7 @@ import { GroupFooterTemplateDirective } from '../grouping/group-footer-template.
12
12
  import { ColumnBase } from './column-base';
13
13
  import { FilterCellTemplateDirective } from '../filtering/cell/filter-cell-template.directive';
14
14
  import { FilterMenuTemplateDirective } from '../filtering/menu/filter-menu-template.directive';
15
+ import { IdService } from '../common/id.service';
15
16
  /**
16
17
  * @hidden
17
18
  */
@@ -169,7 +170,7 @@ export declare class ColumnComponent extends ColumnBase {
169
170
  editTemplate: EditTemplateDirective;
170
171
  filterCellTemplate: FilterCellTemplateDirective;
171
172
  filterMenuTemplate: FilterMenuTemplateDirective;
172
- constructor(parent?: ColumnBase);
173
+ constructor(parent?: ColumnBase, idService?: IdService);
173
174
  readonly templateRef: TemplateRef<any>;
174
175
  readonly groupHeaderTemplateRef: TemplateRef<any>;
175
176
  readonly groupHeaderColumnTemplateRef: TemplateRef<any>;
@@ -14,6 +14,7 @@ import { ColumnBase } from './column-base';
14
14
  import { isPresent } from '../utils';
15
15
  import { FilterCellTemplateDirective } from '../filtering/cell/filter-cell-template.directive';
16
16
  import { FilterMenuTemplateDirective } from '../filtering/menu/filter-menu-template.directive';
17
+ import { IdService } from '../common/id.service';
17
18
  /**
18
19
  * @hidden
19
20
  */
@@ -69,8 +70,8 @@ export function isColumnComponent(column) {
69
70
  * ```
70
71
  */
71
72
  let ColumnComponent = ColumnComponent_1 = class ColumnComponent extends ColumnBase {
72
- constructor(parent) {
73
- super(parent);
73
+ constructor(parent, idService) {
74
+ super(parent, idService);
74
75
  /**
75
76
  * Allows the column headers to be clicked and the `sortChange` event emitted.
76
77
  * You have to handle the `sortChange` event yourself and sort the data.
@@ -227,7 +228,7 @@ ColumnComponent = ColumnComponent_1 = tslib_1.__decorate([
227
228
  selector: 'kendo-grid-column',
228
229
  template: ``
229
230
  }),
230
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
231
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
231
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
232
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
232
233
  ], ColumnComponent);
233
234
  export { ColumnComponent };
@@ -5,6 +5,7 @@
5
5
  import { TemplateRef } from '@angular/core';
6
6
  import { ColumnBase } from './column-base';
7
7
  import { CellTemplateDirective } from '../rendering/cell-template.directive';
8
+ import { IdService } from '../common/id.service';
8
9
  /**
9
10
  * Represents the command columns of the Grid. You have to define the content of the
10
11
  * column inside an `<ng-template>` tag. The template context is set to the current
@@ -74,6 +75,6 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
74
75
  export declare class CommandColumnComponent extends ColumnBase {
75
76
  parent?: ColumnBase;
76
77
  template: CellTemplateDirective;
77
- constructor(parent?: ColumnBase);
78
+ constructor(parent?: ColumnBase, idService?: IdService);
78
79
  readonly templateRef: TemplateRef<any>;
79
80
  }
@@ -7,6 +7,7 @@ var CommandColumnComponent_1;
7
7
  import { Component, forwardRef, ContentChild, SkipSelf, Host, Optional } from '@angular/core';
8
8
  import { ColumnBase } from './column-base';
9
9
  import { CellTemplateDirective } from '../rendering/cell-template.directive';
10
+ import { IdService } from '../common/id.service';
10
11
  /**
11
12
  * Represents the command columns of the Grid. You have to define the content of the
12
13
  * column inside an `<ng-template>` tag. The template context is set to the current
@@ -74,8 +75,8 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
74
75
  * ```
75
76
  */
76
77
  let CommandColumnComponent = CommandColumnComponent_1 = class CommandColumnComponent extends ColumnBase {
77
- constructor(parent) {
78
- super(parent);
78
+ constructor(parent, idService) {
79
+ super(parent, idService);
79
80
  this.parent = parent;
80
81
  }
81
82
  get templateRef() {
@@ -97,7 +98,7 @@ CommandColumnComponent = CommandColumnComponent_1 = tslib_1.__decorate([
97
98
  selector: 'kendo-grid-command-column',
98
99
  template: ``
99
100
  }),
100
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
101
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
101
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
102
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
102
103
  ], CommandColumnComponent);
103
104
  export { CommandColumnComponent };
@@ -7,6 +7,7 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
7
7
  import { EditTemplateDirective } from '../editing/edit-template.directive';
8
8
  import { ColumnBase } from './column-base';
9
9
  import { ColumnComponent } from "./column.component";
10
+ import { IdService } from '../common/id.service';
10
11
  /**
11
12
  * @hidden
12
13
  */
@@ -149,7 +150,7 @@ export declare class SpanColumnComponent extends ColumnBase {
149
150
  readonly leafIndex: number;
150
151
  private _editable;
151
152
  private _locked;
152
- constructor(parent?: ColumnBase);
153
+ constructor(parent?: ColumnBase, idService?: IdService);
153
154
  /**
154
155
  * @hidden
155
156
  */
@@ -10,6 +10,7 @@ import { EditTemplateDirective } from '../editing/edit-template.directive';
10
10
  import { ColumnBase } from './column-base';
11
11
  import { ColumnComponent } from "./column.component";
12
12
  import { isPresent } from "../utils";
13
+ import { IdService } from '../common/id.service';
13
14
  /**
14
15
  * @hidden
15
16
  */
@@ -83,8 +84,8 @@ export function isSpanColumnComponent(column) {
83
84
  * ```
84
85
  */
85
86
  let SpanColumnComponent = SpanColumnComponent_1 = class SpanColumnComponent extends ColumnBase {
86
- constructor(parent) {
87
- super(parent);
87
+ constructor(parent, idService) {
88
+ super(parent, idService);
88
89
  /*
89
90
  * @hidden
90
91
  */
@@ -265,7 +266,7 @@ SpanColumnComponent = SpanColumnComponent_1 = tslib_1.__decorate([
265
266
  selector: 'kendo-grid-span-column',
266
267
  template: ``
267
268
  }),
268
- tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
269
- tslib_1.__metadata("design:paramtypes", [ColumnBase])
269
+ tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()), tslib_1.__param(1, Optional()),
270
+ tslib_1.__metadata("design:paramtypes", [ColumnBase, IdService])
270
271
  ], SpanColumnComponent);
271
272
  export { SpanColumnComponent };
@@ -8,6 +8,7 @@
8
8
  export declare class IdService {
9
9
  private prefix;
10
10
  constructor();
11
+ gridId(): string;
11
12
  cellId(rowIndex: number, colIndex: number): string;
12
13
  selectionCheckboxId(itemIndex: any): string;
13
14
  selectAllCheckboxId(): string;
@@ -13,6 +13,9 @@ let IdService = class IdService {
13
13
  constructor() {
14
14
  this.prefix = `k-grid${sequence++}`;
15
15
  }
16
+ gridId() {
17
+ return this.prefix;
18
+ }
16
19
  cellId(rowIndex, colIndex) {
17
20
  return `${this.prefix}-r${rowIndex}c${colIndex}`;
18
21
  }
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
6
  import { ChangeDetectorRef, Directive, Input } from '@angular/core';
7
+ import { Keys } from '@progress/kendo-angular-common';
7
8
  import { EditingDirectiveBase } from './editing-directive-base';
8
9
  import { GridComponent } from '../grid.component';
9
10
  import { LocalDataChangesService } from '../editing/local-data-changes.service';
@@ -57,6 +58,9 @@ let InCellEditingDirective = class InCellEditingDirective extends EditingDirecti
57
58
  args.preventDefault();
58
59
  }
59
60
  else if (formGroup.dirty) {
61
+ if (args.originalEvent && args.originalEvent.keyCode === Keys.Escape) {
62
+ return;
63
+ }
60
64
  this.editService.assignValues(dataItem, formGroup.value);
61
65
  this.editService.update(dataItem);
62
66
  }