@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.
- package/dist/cdn/js/kendo-angular-grid.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/columns/checkbox-column.component.js +5 -4
- package/dist/es/columns/column-base.js +6 -2
- package/dist/es/columns/column-group.component.js +5 -4
- package/dist/es/columns/column.component.js +5 -4
- package/dist/es/columns/command-column.component.js +5 -4
- package/dist/es/columns/span-column.component.js +5 -4
- package/dist/es/common/id.service.js +3 -0
- package/dist/es/editing-directives/in-cell-editing.directive.js +4 -0
- package/dist/es/navigation/navigation.service.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/columns/checkbox-column.component.d.ts +2 -1
- package/dist/es2015/columns/checkbox-column.component.js +5 -4
- package/dist/es2015/columns/column-base.d.ts +9 -1
- package/dist/es2015/columns/column-base.js +6 -2
- package/dist/es2015/columns/column-group.component.d.ts +2 -1
- package/dist/es2015/columns/column-group.component.js +5 -4
- package/dist/es2015/columns/column.component.d.ts +2 -1
- package/dist/es2015/columns/column.component.js +5 -4
- package/dist/es2015/columns/command-column.component.d.ts +2 -1
- package/dist/es2015/columns/command-column.component.js +5 -4
- package/dist/es2015/columns/span-column.component.d.ts +2 -1
- package/dist/es2015/columns/span-column.component.js +5 -4
- package/dist/es2015/common/id.service.d.ts +1 -0
- package/dist/es2015/common/id.service.js +3 -0
- package/dist/es2015/editing-directives/in-cell-editing.directive.js +4 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/navigation/navigation.service.js +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +58 -48
- package/dist/fesm5/index.js +59 -49
- package/dist/npm/columns/checkbox-column.component.js +5 -4
- package/dist/npm/columns/column-base.js +6 -2
- package/dist/npm/columns/column-group.component.js +5 -4
- package/dist/npm/columns/column.component.js +5 -4
- package/dist/npm/columns/command-column.component.js +5 -4
- package/dist/npm/columns/span-column.component.js +5 -4
- package/dist/npm/common/id.service.js +3 -0
- package/dist/npm/editing-directives/in-cell-editing.directive.js +4 -0
- package/dist/npm/navigation/navigation.service.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-grid.js +1 -1
- package/package.json +4 -4
|
@@ -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:
|
|
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
|
};
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -1915,7 +1915,7 @@ let NavigationService = class NavigationService {
|
|
|
1915
1915
|
this.editService.closeCell(args);
|
|
1916
1916
|
}
|
|
1917
1917
|
else if (cancel) {
|
|
1918
|
-
this.editService.
|
|
1918
|
+
this.editService.closeCell(args);
|
|
1919
1919
|
this.cd.detectChanges();
|
|
1920
1920
|
}
|
|
1921
1921
|
else if (navigate) {
|
|
@@ -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:
|
|
2834
|
+
publishDate: 1638872746,
|
|
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
|
};
|
|
@@ -3277,7 +3277,10 @@ const isColumnContainer = column => column.isColumnGroup || isSpanColumn(column)
|
|
|
3277
3277
|
* The base class for the column components of the Grid.
|
|
3278
3278
|
*/
|
|
3279
3279
|
class ColumnBase$1 {
|
|
3280
|
-
|
|
3280
|
+
/**
|
|
3281
|
+
* @hidden
|
|
3282
|
+
*/
|
|
3283
|
+
constructor(parent, idService) {
|
|
3281
3284
|
this.parent = parent;
|
|
3282
3285
|
/**
|
|
3283
3286
|
* @hidden
|
|
@@ -3386,7 +3389,8 @@ class ColumnBase$1 {
|
|
|
3386
3389
|
* @hidden
|
|
3387
3390
|
*/
|
|
3388
3391
|
this.columnMenuTemplates = new QueryList();
|
|
3389
|
-
|
|
3392
|
+
this.idService = idService;
|
|
3393
|
+
if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
|
|
3390
3394
|
throw new Error('Columns can be nested only inside ColumnGroupComponent');
|
|
3391
3395
|
}
|
|
3392
3396
|
}
|
|
@@ -3592,6 +3596,33 @@ FilterMenuTemplateDirective = __decorate([
|
|
|
3592
3596
|
__metadata("design:paramtypes", [TemplateRef])
|
|
3593
3597
|
], FilterMenuTemplateDirective);
|
|
3594
3598
|
|
|
3599
|
+
// Incremented each time the service is instantiated.
|
|
3600
|
+
let sequence = 0;
|
|
3601
|
+
/**
|
|
3602
|
+
* @hidden
|
|
3603
|
+
*/
|
|
3604
|
+
let IdService = class IdService {
|
|
3605
|
+
constructor() {
|
|
3606
|
+
this.prefix = `k-grid${sequence++}`;
|
|
3607
|
+
}
|
|
3608
|
+
gridId() {
|
|
3609
|
+
return this.prefix;
|
|
3610
|
+
}
|
|
3611
|
+
cellId(rowIndex, colIndex) {
|
|
3612
|
+
return `${this.prefix}-r${rowIndex}c${colIndex}`;
|
|
3613
|
+
}
|
|
3614
|
+
selectionCheckboxId(itemIndex) {
|
|
3615
|
+
return `${this.prefix}-checkbox${itemIndex}`;
|
|
3616
|
+
}
|
|
3617
|
+
selectAllCheckboxId() {
|
|
3618
|
+
return `${this.prefix}-select-all`;
|
|
3619
|
+
}
|
|
3620
|
+
};
|
|
3621
|
+
IdService = __decorate([
|
|
3622
|
+
Injectable(),
|
|
3623
|
+
__metadata("design:paramtypes", [])
|
|
3624
|
+
], IdService);
|
|
3625
|
+
|
|
3595
3626
|
var ColumnComponent_1;
|
|
3596
3627
|
/**
|
|
3597
3628
|
* @hidden
|
|
@@ -3648,8 +3679,8 @@ function isColumnComponent(column) {
|
|
|
3648
3679
|
* ```
|
|
3649
3680
|
*/
|
|
3650
3681
|
let ColumnComponent = ColumnComponent_1 = class ColumnComponent extends ColumnBase$1 {
|
|
3651
|
-
constructor(parent) {
|
|
3652
|
-
super(parent);
|
|
3682
|
+
constructor(parent, idService) {
|
|
3683
|
+
super(parent, idService);
|
|
3653
3684
|
/**
|
|
3654
3685
|
* Allows the column headers to be clicked and the `sortChange` event emitted.
|
|
3655
3686
|
* You have to handle the `sortChange` event yourself and sort the data.
|
|
@@ -3806,8 +3837,8 @@ ColumnComponent = ColumnComponent_1 = __decorate([
|
|
|
3806
3837
|
selector: 'kendo-grid-column',
|
|
3807
3838
|
template: ``
|
|
3808
3839
|
}),
|
|
3809
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
3810
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
3840
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
3841
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
3811
3842
|
], ColumnComponent);
|
|
3812
3843
|
|
|
3813
3844
|
var SpanColumnComponent_1;
|
|
@@ -3884,8 +3915,8 @@ function isSpanColumnComponent(column) {
|
|
|
3884
3915
|
* ```
|
|
3885
3916
|
*/
|
|
3886
3917
|
let SpanColumnComponent = SpanColumnComponent_1 = class SpanColumnComponent extends ColumnBase$1 {
|
|
3887
|
-
constructor(parent) {
|
|
3888
|
-
super(parent);
|
|
3918
|
+
constructor(parent, idService) {
|
|
3919
|
+
super(parent, idService);
|
|
3889
3920
|
/*
|
|
3890
3921
|
* @hidden
|
|
3891
3922
|
*/
|
|
@@ -4066,8 +4097,8 @@ SpanColumnComponent = SpanColumnComponent_1 = __decorate([
|
|
|
4066
4097
|
selector: 'kendo-grid-span-column',
|
|
4067
4098
|
template: ``
|
|
4068
4099
|
}),
|
|
4069
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
4070
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
4100
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
4101
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
4071
4102
|
], SpanColumnComponent);
|
|
4072
4103
|
|
|
4073
4104
|
/**
|
|
@@ -4202,8 +4233,8 @@ function isColumnGroupComponent(column) {
|
|
|
4202
4233
|
* ```
|
|
4203
4234
|
*/
|
|
4204
4235
|
let ColumnGroupComponent = ColumnGroupComponent_1 = class ColumnGroupComponent extends ColumnBase$1 {
|
|
4205
|
-
constructor(parent) {
|
|
4206
|
-
super(parent);
|
|
4236
|
+
constructor(parent, idService) {
|
|
4237
|
+
super(parent, idService);
|
|
4207
4238
|
this.parent = parent;
|
|
4208
4239
|
/**
|
|
4209
4240
|
* @hidden
|
|
@@ -4268,8 +4299,8 @@ ColumnGroupComponent = ColumnGroupComponent_1 = __decorate([
|
|
|
4268
4299
|
selector: 'kendo-grid-column-group',
|
|
4269
4300
|
template: ``
|
|
4270
4301
|
}),
|
|
4271
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
4272
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
4302
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
4303
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
4273
4304
|
], ColumnGroupComponent);
|
|
4274
4305
|
|
|
4275
4306
|
/**
|
|
@@ -6165,30 +6196,6 @@ class NavigationMetadata {
|
|
|
6165
6196
|
}
|
|
6166
6197
|
}
|
|
6167
6198
|
|
|
6168
|
-
// Incremented each time the service is instantiated.
|
|
6169
|
-
let sequence = 0;
|
|
6170
|
-
/**
|
|
6171
|
-
* @hidden
|
|
6172
|
-
*/
|
|
6173
|
-
let IdService = class IdService {
|
|
6174
|
-
constructor() {
|
|
6175
|
-
this.prefix = `k-grid${sequence++}`;
|
|
6176
|
-
}
|
|
6177
|
-
cellId(rowIndex, colIndex) {
|
|
6178
|
-
return `${this.prefix}-r${rowIndex}c${colIndex}`;
|
|
6179
|
-
}
|
|
6180
|
-
selectionCheckboxId(itemIndex) {
|
|
6181
|
-
return `${this.prefix}-checkbox${itemIndex}`;
|
|
6182
|
-
}
|
|
6183
|
-
selectAllCheckboxId() {
|
|
6184
|
-
return `${this.prefix}-select-all`;
|
|
6185
|
-
}
|
|
6186
|
-
};
|
|
6187
|
-
IdService = __decorate([
|
|
6188
|
-
Injectable(),
|
|
6189
|
-
__metadata("design:paramtypes", [])
|
|
6190
|
-
], IdService);
|
|
6191
|
-
|
|
6192
6199
|
const NO_STICKY = { left: '0px', right: '0px' };
|
|
6193
6200
|
/**
|
|
6194
6201
|
* @hidden
|
|
@@ -20212,8 +20219,8 @@ var CommandColumnComponent_1;
|
|
|
20212
20219
|
* ```
|
|
20213
20220
|
*/
|
|
20214
20221
|
let CommandColumnComponent = CommandColumnComponent_1 = class CommandColumnComponent extends ColumnBase$1 {
|
|
20215
|
-
constructor(parent) {
|
|
20216
|
-
super(parent);
|
|
20222
|
+
constructor(parent, idService) {
|
|
20223
|
+
super(parent, idService);
|
|
20217
20224
|
this.parent = parent;
|
|
20218
20225
|
}
|
|
20219
20226
|
get templateRef() {
|
|
@@ -20235,8 +20242,8 @@ CommandColumnComponent = CommandColumnComponent_1 = __decorate([
|
|
|
20235
20242
|
selector: 'kendo-grid-command-column',
|
|
20236
20243
|
template: ``
|
|
20237
20244
|
}),
|
|
20238
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
20239
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
20245
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
20246
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
20240
20247
|
], CommandColumnComponent);
|
|
20241
20248
|
|
|
20242
20249
|
var CheckboxColumnComponent_1;
|
|
@@ -20303,8 +20310,8 @@ var CheckboxColumnComponent_1;
|
|
|
20303
20310
|
* ```
|
|
20304
20311
|
*/
|
|
20305
20312
|
let CheckboxColumnComponent = CheckboxColumnComponent_1 = class CheckboxColumnComponent extends ColumnBase$1 {
|
|
20306
|
-
constructor(parent) {
|
|
20307
|
-
super(parent);
|
|
20313
|
+
constructor(parent, idService) {
|
|
20314
|
+
super(parent, idService);
|
|
20308
20315
|
this.parent = parent;
|
|
20309
20316
|
/*
|
|
20310
20317
|
* @hidden
|
|
@@ -20334,8 +20341,8 @@ CheckboxColumnComponent = CheckboxColumnComponent_1 = __decorate([
|
|
|
20334
20341
|
selector: 'kendo-grid-checkbox-column',
|
|
20335
20342
|
template: ``
|
|
20336
20343
|
}),
|
|
20337
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
20338
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
20344
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
20345
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
20339
20346
|
], CheckboxColumnComponent);
|
|
20340
20347
|
|
|
20341
20348
|
/**
|
|
@@ -22298,6 +22305,9 @@ let InCellEditingDirective = class InCellEditingDirective extends EditingDirecti
|
|
|
22298
22305
|
args.preventDefault();
|
|
22299
22306
|
}
|
|
22300
22307
|
else if (formGroup.dirty) {
|
|
22308
|
+
if (args.originalEvent && args.originalEvent.keyCode === Keys.Escape) {
|
|
22309
|
+
return;
|
|
22310
|
+
}
|
|
22301
22311
|
this.editService.assignValues(dataItem, formGroup.value);
|
|
22302
22312
|
this.editService.update(dataItem);
|
|
22303
22313
|
}
|
package/dist/fesm5/index.js
CHANGED
|
@@ -2076,7 +2076,7 @@ var NavigationService = /** @class */ (function () {
|
|
|
2076
2076
|
this.editService.closeCell(args);
|
|
2077
2077
|
}
|
|
2078
2078
|
else if (cancel) {
|
|
2079
|
-
this.editService.
|
|
2079
|
+
this.editService.closeCell(args);
|
|
2080
2080
|
this.cd.detectChanges();
|
|
2081
2081
|
}
|
|
2082
2082
|
else if (navigate) {
|
|
@@ -3046,7 +3046,7 @@ var packageMetadata = {
|
|
|
3046
3046
|
name: '@progress/kendo-angular-grid',
|
|
3047
3047
|
productName: 'Kendo UI for Angular',
|
|
3048
3048
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
3049
|
-
publishDate:
|
|
3049
|
+
publishDate: 1638872746,
|
|
3050
3050
|
version: '',
|
|
3051
3051
|
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'
|
|
3052
3052
|
};
|
|
@@ -3500,7 +3500,10 @@ var isColumnContainer = function (column) { return column.isColumnGroup || isSpa
|
|
|
3500
3500
|
* The base class for the column components of the Grid.
|
|
3501
3501
|
*/
|
|
3502
3502
|
var ColumnBase$1 = /** @class */ (function () {
|
|
3503
|
-
|
|
3503
|
+
/**
|
|
3504
|
+
* @hidden
|
|
3505
|
+
*/
|
|
3506
|
+
function ColumnBase$$1(parent, idService) {
|
|
3504
3507
|
this.parent = parent;
|
|
3505
3508
|
/**
|
|
3506
3509
|
* @hidden
|
|
@@ -3609,7 +3612,8 @@ var ColumnBase$1 = /** @class */ (function () {
|
|
|
3609
3612
|
* @hidden
|
|
3610
3613
|
*/
|
|
3611
3614
|
this.columnMenuTemplates = new QueryList();
|
|
3612
|
-
|
|
3615
|
+
this.idService = idService;
|
|
3616
|
+
if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
|
|
3613
3617
|
throw new Error('Columns can be nested only inside ColumnGroupComponent');
|
|
3614
3618
|
}
|
|
3615
3619
|
}
|
|
@@ -3854,6 +3858,34 @@ var FilterMenuTemplateDirective = /** @class */ (function () {
|
|
|
3854
3858
|
return FilterMenuTemplateDirective;
|
|
3855
3859
|
}());
|
|
3856
3860
|
|
|
3861
|
+
// Incremented each time the service is instantiated.
|
|
3862
|
+
var sequence = 0;
|
|
3863
|
+
/**
|
|
3864
|
+
* @hidden
|
|
3865
|
+
*/
|
|
3866
|
+
var IdService = /** @class */ (function () {
|
|
3867
|
+
function IdService() {
|
|
3868
|
+
this.prefix = "k-grid" + sequence++;
|
|
3869
|
+
}
|
|
3870
|
+
IdService.prototype.gridId = function () {
|
|
3871
|
+
return this.prefix;
|
|
3872
|
+
};
|
|
3873
|
+
IdService.prototype.cellId = function (rowIndex, colIndex) {
|
|
3874
|
+
return this.prefix + "-r" + rowIndex + "c" + colIndex;
|
|
3875
|
+
};
|
|
3876
|
+
IdService.prototype.selectionCheckboxId = function (itemIndex) {
|
|
3877
|
+
return this.prefix + "-checkbox" + itemIndex;
|
|
3878
|
+
};
|
|
3879
|
+
IdService.prototype.selectAllCheckboxId = function () {
|
|
3880
|
+
return this.prefix + "-select-all";
|
|
3881
|
+
};
|
|
3882
|
+
IdService = __decorate([
|
|
3883
|
+
Injectable(),
|
|
3884
|
+
__metadata("design:paramtypes", [])
|
|
3885
|
+
], IdService);
|
|
3886
|
+
return IdService;
|
|
3887
|
+
}());
|
|
3888
|
+
|
|
3857
3889
|
/**
|
|
3858
3890
|
* @hidden
|
|
3859
3891
|
*/
|
|
@@ -3910,8 +3942,8 @@ function isColumnComponent(column) {
|
|
|
3910
3942
|
*/
|
|
3911
3943
|
var ColumnComponent = /** @class */ (function (_super) {
|
|
3912
3944
|
__extends(ColumnComponent, _super);
|
|
3913
|
-
function ColumnComponent(parent) {
|
|
3914
|
-
var _this = _super.call(this, parent) || this;
|
|
3945
|
+
function ColumnComponent(parent, idService) {
|
|
3946
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
3915
3947
|
/**
|
|
3916
3948
|
* Allows the column headers to be clicked and the `sortChange` event emitted.
|
|
3917
3949
|
* You have to handle the `sortChange` event yourself and sort the data.
|
|
@@ -4102,8 +4134,8 @@ var ColumnComponent = /** @class */ (function (_super) {
|
|
|
4102
4134
|
selector: 'kendo-grid-column',
|
|
4103
4135
|
template: ""
|
|
4104
4136
|
}),
|
|
4105
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
4106
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
4137
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
4138
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
4107
4139
|
], ColumnComponent);
|
|
4108
4140
|
return ColumnComponent;
|
|
4109
4141
|
}(ColumnBase$1));
|
|
@@ -4182,8 +4214,8 @@ function isSpanColumnComponent(column) {
|
|
|
4182
4214
|
*/
|
|
4183
4215
|
var SpanColumnComponent = /** @class */ (function (_super) {
|
|
4184
4216
|
__extends(SpanColumnComponent, _super);
|
|
4185
|
-
function SpanColumnComponent(parent) {
|
|
4186
|
-
var _this = _super.call(this, parent) || this;
|
|
4217
|
+
function SpanColumnComponent(parent, idService) {
|
|
4218
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
4187
4219
|
/*
|
|
4188
4220
|
* @hidden
|
|
4189
4221
|
*/
|
|
@@ -4402,8 +4434,8 @@ var SpanColumnComponent = /** @class */ (function (_super) {
|
|
|
4402
4434
|
selector: 'kendo-grid-span-column',
|
|
4403
4435
|
template: ""
|
|
4404
4436
|
}),
|
|
4405
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
4406
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
4437
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
4438
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
4407
4439
|
], SpanColumnComponent);
|
|
4408
4440
|
return SpanColumnComponent;
|
|
4409
4441
|
}(ColumnBase$1));
|
|
@@ -4554,8 +4586,8 @@ function isColumnGroupComponent(column) {
|
|
|
4554
4586
|
*/
|
|
4555
4587
|
var ColumnGroupComponent = /** @class */ (function (_super) {
|
|
4556
4588
|
__extends(ColumnGroupComponent, _super);
|
|
4557
|
-
function ColumnGroupComponent(parent) {
|
|
4558
|
-
var _this = _super.call(this, parent) || this;
|
|
4589
|
+
function ColumnGroupComponent(parent, idService) {
|
|
4590
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
4559
4591
|
_this.parent = parent;
|
|
4560
4592
|
/**
|
|
4561
4593
|
* @hidden
|
|
@@ -4645,8 +4677,8 @@ var ColumnGroupComponent = /** @class */ (function (_super) {
|
|
|
4645
4677
|
selector: 'kendo-grid-column-group',
|
|
4646
4678
|
template: ""
|
|
4647
4679
|
}),
|
|
4648
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
4649
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
4680
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
4681
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
4650
4682
|
], ColumnGroupComponent);
|
|
4651
4683
|
return ColumnGroupComponent;
|
|
4652
4684
|
}(ColumnBase$1));
|
|
@@ -6677,31 +6709,6 @@ var NavigationMetadata = /** @class */ (function () {
|
|
|
6677
6709
|
return NavigationMetadata;
|
|
6678
6710
|
}());
|
|
6679
6711
|
|
|
6680
|
-
// Incremented each time the service is instantiated.
|
|
6681
|
-
var sequence = 0;
|
|
6682
|
-
/**
|
|
6683
|
-
* @hidden
|
|
6684
|
-
*/
|
|
6685
|
-
var IdService = /** @class */ (function () {
|
|
6686
|
-
function IdService() {
|
|
6687
|
-
this.prefix = "k-grid" + sequence++;
|
|
6688
|
-
}
|
|
6689
|
-
IdService.prototype.cellId = function (rowIndex, colIndex) {
|
|
6690
|
-
return this.prefix + "-r" + rowIndex + "c" + colIndex;
|
|
6691
|
-
};
|
|
6692
|
-
IdService.prototype.selectionCheckboxId = function (itemIndex) {
|
|
6693
|
-
return this.prefix + "-checkbox" + itemIndex;
|
|
6694
|
-
};
|
|
6695
|
-
IdService.prototype.selectAllCheckboxId = function () {
|
|
6696
|
-
return this.prefix + "-select-all";
|
|
6697
|
-
};
|
|
6698
|
-
IdService = __decorate([
|
|
6699
|
-
Injectable(),
|
|
6700
|
-
__metadata("design:paramtypes", [])
|
|
6701
|
-
], IdService);
|
|
6702
|
-
return IdService;
|
|
6703
|
-
}());
|
|
6704
|
-
|
|
6705
6712
|
var NO_STICKY = { left: '0px', right: '0px' };
|
|
6706
6713
|
/**
|
|
6707
6714
|
* @hidden
|
|
@@ -20442,8 +20449,8 @@ var HeaderModule = /** @class */ (function () {
|
|
|
20442
20449
|
*/
|
|
20443
20450
|
var CommandColumnComponent = /** @class */ (function (_super) {
|
|
20444
20451
|
__extends(CommandColumnComponent, _super);
|
|
20445
|
-
function CommandColumnComponent(parent) {
|
|
20446
|
-
var _this = _super.call(this, parent) || this;
|
|
20452
|
+
function CommandColumnComponent(parent, idService) {
|
|
20453
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
20447
20454
|
_this.parent = parent;
|
|
20448
20455
|
return _this;
|
|
20449
20456
|
}
|
|
@@ -20471,8 +20478,8 @@ var CommandColumnComponent = /** @class */ (function (_super) {
|
|
|
20471
20478
|
selector: 'kendo-grid-command-column',
|
|
20472
20479
|
template: ""
|
|
20473
20480
|
}),
|
|
20474
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
20475
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
20481
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
20482
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
20476
20483
|
], CommandColumnComponent);
|
|
20477
20484
|
return CommandColumnComponent;
|
|
20478
20485
|
}(ColumnBase$1));
|
|
@@ -20541,8 +20548,8 @@ var CommandColumnComponent = /** @class */ (function (_super) {
|
|
|
20541
20548
|
*/
|
|
20542
20549
|
var CheckboxColumnComponent = /** @class */ (function (_super) {
|
|
20543
20550
|
__extends(CheckboxColumnComponent, _super);
|
|
20544
|
-
function CheckboxColumnComponent(parent) {
|
|
20545
|
-
var _this = _super.call(this, parent) || this;
|
|
20551
|
+
function CheckboxColumnComponent(parent, idService) {
|
|
20552
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
20546
20553
|
_this.parent = parent;
|
|
20547
20554
|
/*
|
|
20548
20555
|
* @hidden
|
|
@@ -20578,8 +20585,8 @@ var CheckboxColumnComponent = /** @class */ (function (_super) {
|
|
|
20578
20585
|
selector: 'kendo-grid-checkbox-column',
|
|
20579
20586
|
template: ""
|
|
20580
20587
|
}),
|
|
20581
|
-
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
20582
|
-
__metadata("design:paramtypes", [ColumnBase$1])
|
|
20588
|
+
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()), __param(1, Optional()),
|
|
20589
|
+
__metadata("design:paramtypes", [ColumnBase$1, IdService])
|
|
20583
20590
|
], CheckboxColumnComponent);
|
|
20584
20591
|
return CheckboxColumnComponent;
|
|
20585
20592
|
}(ColumnBase$1));
|
|
@@ -22412,6 +22419,9 @@ var InCellEditingDirective = /** @class */ (function (_super) {
|
|
|
22412
22419
|
args.preventDefault();
|
|
22413
22420
|
}
|
|
22414
22421
|
else if (formGroup.dirty) {
|
|
22422
|
+
if (args.originalEvent && args.originalEvent.keyCode === Keys.Escape) {
|
|
22423
|
+
return;
|
|
22424
|
+
}
|
|
22415
22425
|
this.editService.assignValues(dataItem, formGroup.value);
|
|
22416
22426
|
this.editService.update(dataItem);
|
|
22417
22427
|
}
|
|
@@ -8,6 +8,7 @@ var tslib_1 = require("tslib");
|
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
var column_base_1 = require("./column-base");
|
|
10
10
|
var cell_template_directive_1 = require("../rendering/cell-template.directive");
|
|
11
|
+
var id_service_1 = require("../common/id.service");
|
|
11
12
|
/**
|
|
12
13
|
* Represents the checkbox for selecting columns in the Grid. If the column is
|
|
13
14
|
* defined as empty, it renders a default checkbox for row selection.
|
|
@@ -72,8 +73,8 @@ var cell_template_directive_1 = require("../rendering/cell-template.directive");
|
|
|
72
73
|
*/
|
|
73
74
|
var CheckboxColumnComponent = /** @class */ (function (_super) {
|
|
74
75
|
tslib_1.__extends(CheckboxColumnComponent, _super);
|
|
75
|
-
function CheckboxColumnComponent(parent) {
|
|
76
|
-
var _this = _super.call(this, parent) || this;
|
|
76
|
+
function CheckboxColumnComponent(parent, idService) {
|
|
77
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
77
78
|
_this.parent = parent;
|
|
78
79
|
/*
|
|
79
80
|
* @hidden
|
|
@@ -109,8 +110,8 @@ var CheckboxColumnComponent = /** @class */ (function (_super) {
|
|
|
109
110
|
selector: 'kendo-grid-checkbox-column',
|
|
110
111
|
template: ""
|
|
111
112
|
}),
|
|
112
|
-
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()),
|
|
113
|
-
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase])
|
|
113
|
+
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()), tslib_1.__param(1, core_1.Optional()),
|
|
114
|
+
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase, id_service_1.IdService])
|
|
114
115
|
], CheckboxColumnComponent);
|
|
115
116
|
return CheckboxColumnComponent;
|
|
116
117
|
}(column_base_1.ColumnBase));
|
|
@@ -24,7 +24,10 @@ exports.ɵ0 = ɵ0;
|
|
|
24
24
|
* The base class for the column components of the Grid.
|
|
25
25
|
*/
|
|
26
26
|
var ColumnBase = /** @class */ (function () {
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
function ColumnBase(parent, idService) {
|
|
28
31
|
this.parent = parent;
|
|
29
32
|
/**
|
|
30
33
|
* @hidden
|
|
@@ -133,7 +136,8 @@ var ColumnBase = /** @class */ (function () {
|
|
|
133
136
|
* @hidden
|
|
134
137
|
*/
|
|
135
138
|
this.columnMenuTemplates = new core_1.QueryList();
|
|
136
|
-
|
|
139
|
+
this.idService = idService;
|
|
140
|
+
if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
|
|
137
141
|
throw new Error('Columns can be nested only inside ColumnGroupComponent');
|
|
138
142
|
}
|
|
139
143
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
|
+
var id_service_1 = require("../common/id.service");
|
|
9
10
|
var column_base_1 = require("./column-base");
|
|
10
11
|
var column_common_1 = require("./column-common");
|
|
11
12
|
/**
|
|
@@ -71,8 +72,8 @@ exports.isColumnGroupComponent = isColumnGroupComponent;
|
|
|
71
72
|
*/
|
|
72
73
|
var ColumnGroupComponent = /** @class */ (function (_super) {
|
|
73
74
|
tslib_1.__extends(ColumnGroupComponent, _super);
|
|
74
|
-
function ColumnGroupComponent(parent) {
|
|
75
|
-
var _this = _super.call(this, parent) || this;
|
|
75
|
+
function ColumnGroupComponent(parent, idService) {
|
|
76
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
76
77
|
_this.parent = parent;
|
|
77
78
|
/**
|
|
78
79
|
* @hidden
|
|
@@ -162,8 +163,8 @@ var ColumnGroupComponent = /** @class */ (function (_super) {
|
|
|
162
163
|
selector: 'kendo-grid-column-group',
|
|
163
164
|
template: ""
|
|
164
165
|
}),
|
|
165
|
-
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()),
|
|
166
|
-
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase])
|
|
166
|
+
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()), tslib_1.__param(1, core_1.Optional()),
|
|
167
|
+
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase, id_service_1.IdService])
|
|
167
168
|
], ColumnGroupComponent);
|
|
168
169
|
return ColumnGroupComponent;
|
|
169
170
|
}(column_base_1.ColumnBase));
|
|
@@ -15,6 +15,7 @@ var column_base_1 = require("./column-base");
|
|
|
15
15
|
var utils_1 = require("../utils");
|
|
16
16
|
var filter_cell_template_directive_1 = require("../filtering/cell/filter-cell-template.directive");
|
|
17
17
|
var filter_menu_template_directive_1 = require("../filtering/menu/filter-menu-template.directive");
|
|
18
|
+
var id_service_1 = require("../common/id.service");
|
|
18
19
|
/**
|
|
19
20
|
* @hidden
|
|
20
21
|
*/
|
|
@@ -72,8 +73,8 @@ exports.isColumnComponent = isColumnComponent;
|
|
|
72
73
|
*/
|
|
73
74
|
var ColumnComponent = /** @class */ (function (_super) {
|
|
74
75
|
tslib_1.__extends(ColumnComponent, _super);
|
|
75
|
-
function ColumnComponent(parent) {
|
|
76
|
-
var _this = _super.call(this, parent) || this;
|
|
76
|
+
function ColumnComponent(parent, idService) {
|
|
77
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
77
78
|
/**
|
|
78
79
|
* Allows the column headers to be clicked and the `sortChange` event emitted.
|
|
79
80
|
* You have to handle the `sortChange` event yourself and sort the data.
|
|
@@ -264,8 +265,8 @@ var ColumnComponent = /** @class */ (function (_super) {
|
|
|
264
265
|
selector: 'kendo-grid-column',
|
|
265
266
|
template: ""
|
|
266
267
|
}),
|
|
267
|
-
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()),
|
|
268
|
-
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase])
|
|
268
|
+
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()), tslib_1.__param(1, core_1.Optional()),
|
|
269
|
+
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase, id_service_1.IdService])
|
|
269
270
|
], ColumnComponent);
|
|
270
271
|
return ColumnComponent;
|
|
271
272
|
}(column_base_1.ColumnBase));
|
|
@@ -8,6 +8,7 @@ var tslib_1 = require("tslib");
|
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
var column_base_1 = require("./column-base");
|
|
10
10
|
var cell_template_directive_1 = require("../rendering/cell-template.directive");
|
|
11
|
+
var id_service_1 = require("../common/id.service");
|
|
11
12
|
/**
|
|
12
13
|
* Represents the command columns of the Grid. You have to define the content of the
|
|
13
14
|
* column inside an `<ng-template>` tag. The template context is set to the current
|
|
@@ -76,8 +77,8 @@ var cell_template_directive_1 = require("../rendering/cell-template.directive");
|
|
|
76
77
|
*/
|
|
77
78
|
var CommandColumnComponent = /** @class */ (function (_super) {
|
|
78
79
|
tslib_1.__extends(CommandColumnComponent, _super);
|
|
79
|
-
function CommandColumnComponent(parent) {
|
|
80
|
-
var _this = _super.call(this, parent) || this;
|
|
80
|
+
function CommandColumnComponent(parent, idService) {
|
|
81
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
81
82
|
_this.parent = parent;
|
|
82
83
|
return _this;
|
|
83
84
|
}
|
|
@@ -105,8 +106,8 @@ var CommandColumnComponent = /** @class */ (function (_super) {
|
|
|
105
106
|
selector: 'kendo-grid-command-column',
|
|
106
107
|
template: ""
|
|
107
108
|
}),
|
|
108
|
-
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()),
|
|
109
|
-
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase])
|
|
109
|
+
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()), tslib_1.__param(1, core_1.Optional()),
|
|
110
|
+
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase, id_service_1.IdService])
|
|
110
111
|
], CommandColumnComponent);
|
|
111
112
|
return CommandColumnComponent;
|
|
112
113
|
}(column_base_1.ColumnBase));
|
|
@@ -11,6 +11,7 @@ var edit_template_directive_1 = require("../editing/edit-template.directive");
|
|
|
11
11
|
var column_base_1 = require("./column-base");
|
|
12
12
|
var column_component_1 = require("./column.component");
|
|
13
13
|
var utils_1 = require("../utils");
|
|
14
|
+
var id_service_1 = require("../common/id.service");
|
|
14
15
|
/**
|
|
15
16
|
* @hidden
|
|
16
17
|
*/
|
|
@@ -86,8 +87,8 @@ exports.isSpanColumnComponent = isSpanColumnComponent;
|
|
|
86
87
|
*/
|
|
87
88
|
var SpanColumnComponent = /** @class */ (function (_super) {
|
|
88
89
|
tslib_1.__extends(SpanColumnComponent, _super);
|
|
89
|
-
function SpanColumnComponent(parent) {
|
|
90
|
-
var _this = _super.call(this, parent) || this;
|
|
90
|
+
function SpanColumnComponent(parent, idService) {
|
|
91
|
+
var _this = _super.call(this, parent, idService) || this;
|
|
91
92
|
/*
|
|
92
93
|
* @hidden
|
|
93
94
|
*/
|
|
@@ -306,8 +307,8 @@ var SpanColumnComponent = /** @class */ (function (_super) {
|
|
|
306
307
|
selector: 'kendo-grid-span-column',
|
|
307
308
|
template: ""
|
|
308
309
|
}),
|
|
309
|
-
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()),
|
|
310
|
-
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase])
|
|
310
|
+
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()), tslib_1.__param(1, core_1.Optional()),
|
|
311
|
+
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase, id_service_1.IdService])
|
|
311
312
|
], SpanColumnComponent);
|
|
312
313
|
return SpanColumnComponent;
|
|
313
314
|
}(column_base_1.ColumnBase));
|
|
@@ -15,6 +15,9 @@ var IdService = /** @class */ (function () {
|
|
|
15
15
|
function IdService() {
|
|
16
16
|
this.prefix = "k-grid" + sequence++;
|
|
17
17
|
}
|
|
18
|
+
IdService.prototype.gridId = function () {
|
|
19
|
+
return this.prefix;
|
|
20
|
+
};
|
|
18
21
|
IdService.prototype.cellId = function (rowIndex, colIndex) {
|
|
19
22
|
return this.prefix + "-r" + rowIndex + "c" + colIndex;
|
|
20
23
|
};
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
|
+
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
9
10
|
var editing_directive_base_1 = require("./editing-directive-base");
|
|
10
11
|
var grid_component_1 = require("../grid.component");
|
|
11
12
|
var local_data_changes_service_1 = require("../editing/local-data-changes.service");
|
|
@@ -62,6 +63,9 @@ var InCellEditingDirective = /** @class */ (function (_super) {
|
|
|
62
63
|
args.preventDefault();
|
|
63
64
|
}
|
|
64
65
|
else if (formGroup.dirty) {
|
|
66
|
+
if (args.originalEvent && args.originalEvent.keyCode === kendo_angular_common_1.Keys.Escape) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
65
69
|
this.editService.assignValues(dataItem, formGroup.value);
|
|
66
70
|
this.editService.update(dataItem);
|
|
67
71
|
}
|