@progress/kendo-angular-grid 19.3.0-develop.9 → 19.3.1-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/columns/columns-container.d.ts +2 -0
  2. package/common/data-layout-mode.d.ts +21 -0
  3. package/common/grid-col-size.d.ts +13 -0
  4. package/common/provider.service.d.ts +2 -0
  5. package/common/toolbar-tool-base.directive.d.ts +2 -1
  6. package/data/data-mapping.service.d.ts +3 -1
  7. package/directives.d.ts +7 -4
  8. package/editing/toolbar-editing-tool-base.directive.d.ts +3 -2
  9. package/editing-directives/editing-directive-base.d.ts +3 -0
  10. package/editing-directives/in-cell-editing.directive.d.ts +1 -1
  11. package/editing-directives/reactive-editing.directive.d.ts +1 -1
  12. package/editing-directives/template-editing.directive.d.ts +1 -1
  13. package/esm2022/column-menu/column-chooser.component.mjs +1 -1
  14. package/esm2022/column-menu/column-list.component.mjs +8 -7
  15. package/esm2022/column-menu/column-menu-item.directive.mjs +1 -1
  16. package/esm2022/column-resizing/column-handle.directive.mjs +8 -2
  17. package/esm2022/columns/column-base.mjs +4 -4
  18. package/esm2022/columns/column.component.mjs +1 -1
  19. package/esm2022/columns/columns-container.mjs +3 -0
  20. package/esm2022/common/column-info.service.mjs +1 -1
  21. package/esm2022/common/data-layout-mode.mjs +5 -0
  22. package/esm2022/common/grid-col-size.mjs +5 -0
  23. package/esm2022/common/provider.service.mjs +1 -0
  24. package/esm2022/common/toolbar-tool-base.directive.mjs +6 -2
  25. package/esm2022/data/data-mapping.service.mjs +14 -3
  26. package/esm2022/directives.mjs +8 -1
  27. package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +5 -0
  28. package/esm2022/editing-directives/editing-directive-base.mjs +17 -2
  29. package/esm2022/editing-directives/in-cell-editing.directive.mjs +5 -3
  30. package/esm2022/editing-directives/reactive-editing.directive.mjs +1 -1
  31. package/esm2022/editing-directives/template-editing.directive.mjs +1 -1
  32. package/esm2022/filtering/cell/filter-cell-operators.component.mjs +2 -2
  33. package/esm2022/filtering/filter-row.component.mjs +5 -2
  34. package/esm2022/filtering/menu/filter-menu-dropdownlist.directive.mjs +1 -1
  35. package/esm2022/grid.component.mjs +191 -39
  36. package/esm2022/grid.module.mjs +103 -100
  37. package/esm2022/grouping/group-header.component.mjs +39 -4
  38. package/esm2022/grouping/group-panel.component.mjs +13 -8
  39. package/esm2022/highlight/highlight-item.mjs +5 -0
  40. package/esm2022/highlight/highlight.directive.mjs +132 -0
  41. package/esm2022/index.mjs +4 -0
  42. package/esm2022/localization/messages.mjs +57 -3
  43. package/esm2022/navigation/navigation-cursor.mjs +7 -1
  44. package/esm2022/navigation/navigation-metadata.mjs +3 -1
  45. package/esm2022/navigation/navigation.service.mjs +168 -16
  46. package/esm2022/navigation/toolbar-tool-name.mjs +2 -1
  47. package/esm2022/package-metadata.mjs +2 -2
  48. package/esm2022/pdf/export-element.mjs +14 -5
  49. package/esm2022/pdf/pdf.component.mjs +3 -1
  50. package/esm2022/rendering/cell.component.mjs +466 -188
  51. package/esm2022/rendering/common/col-group.component.mjs +21 -7
  52. package/esm2022/rendering/details-expand.directive.mjs +5 -2
  53. package/esm2022/rendering/footer/footer.component.mjs +117 -54
  54. package/esm2022/rendering/header/header.component.mjs +13 -9
  55. package/esm2022/rendering/list.component.mjs +19 -12
  56. package/esm2022/rendering/loading-template.directive.mjs +1 -0
  57. package/esm2022/rendering/table-body.component.mjs +394 -174
  58. package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +305 -0
  59. package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +273 -0
  60. package/esm2022/rendering/toolbar/tools/ai-assistant/utils.mjs +74 -0
  61. package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +5 -4
  62. package/esm2022/rendering/toolbar/tools/group-toolbar-tool.component.mjs +11 -9
  63. package/esm2022/rendering/toolbar/tools/select-all-command-tool.directive.mjs +93 -0
  64. package/esm2022/row-reordering/row-reorder.service.mjs +2 -2
  65. package/esm2022/row-reordering/utils.mjs +6 -4
  66. package/esm2022/selection/cell-selection.service.mjs +6 -3
  67. package/esm2022/selection/pair-set.mjs +87 -10
  68. package/esm2022/selection/selection-checkbox.directive.mjs +1 -1
  69. package/esm2022/selection/selection.directive.mjs +1 -1
  70. package/fesm2022/progress-kendo-angular-grid.mjs +2590 -640
  71. package/filtering/filter-row.component.d.ts +1 -0
  72. package/grid.component.d.ts +29 -1
  73. package/grid.module.d.ts +102 -99
  74. package/grouping/group-header.component.d.ts +1 -0
  75. package/grouping/group-panel.component.d.ts +1 -1
  76. package/highlight/highlight-item.d.ts +17 -0
  77. package/highlight/highlight.directive.d.ts +56 -0
  78. package/index.d.ts +8 -1
  79. package/localization/messages.d.ts +39 -3
  80. package/navigation/focus-group.d.ts +1 -1
  81. package/navigation/navigation-metadata.d.ts +2 -1
  82. package/navigation/navigation.service.d.ts +6 -0
  83. package/navigation/toolbar-tool-name.d.ts +1 -0
  84. package/package.json +22 -21
  85. package/rendering/cell.component.d.ts +30 -15
  86. package/rendering/common/col-group.component.d.ts +5 -0
  87. package/rendering/details-expand.directive.d.ts +5 -2
  88. package/rendering/footer/footer.component.d.ts +4 -1
  89. package/rendering/header/header.component.d.ts +1 -0
  90. package/rendering/list.component.d.ts +4 -1
  91. package/rendering/loading-template.directive.d.ts +1 -0
  92. package/rendering/table-body.component.d.ts +3 -1
  93. package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +49 -0
  94. package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +115 -0
  95. package/rendering/toolbar/tools/ai-assistant/utils.d.ts +131 -0
  96. package/rendering/toolbar/tools/column-chooser-tool.directive.d.ts +0 -1
  97. package/rendering/toolbar/tools/select-all-command-tool.directive.d.ts +36 -0
  98. package/row-reordering/row-reorder.service.d.ts +1 -1
  99. package/row-reordering/utils.d.ts +1 -1
  100. package/schematics/ngAdd/index.js +4 -4
  101. package/selection/cell-selection.service.d.ts +1 -0
  102. package/selection/pair-set.d.ts +36 -8
  103. package/selection/selection.directive.d.ts +1 -1
@@ -11,6 +11,7 @@ import { take } from 'rxjs/operators';
11
11
  import { DialogService } from '@progress/kendo-angular-dialog';
12
12
  import { checkIcon, xIcon } from '@progress/kendo-svg-icons';
13
13
  import { LocalizationService } from '@progress/kendo-angular-l10n';
14
+ import { NavigationService } from '../navigation/navigation.service';
14
15
  import * as i0 from "@angular/core";
15
16
  import * as i1 from "../grid.component";
16
17
  import * as i2 from "../editing/local-data-changes.service";
@@ -64,12 +65,14 @@ export class EditingDirectiveBase {
64
65
  subscriptions = new Subscription();
65
66
  defaultEditService;
66
67
  userEditService;
68
+ navigationService;
67
69
  constructor(grid, localDataChangesService) {
68
70
  this.grid = grid;
69
71
  this.localDataChangesService = localDataChangesService;
70
72
  this.defaultEditService = this.createDefaultService();
71
73
  this.dialogService = inject(DialogService);
72
74
  this.localization = inject(LocalizationService);
75
+ this.navigationService = inject(NavigationService);
73
76
  }
74
77
  /**
75
78
  * @hidden
@@ -118,13 +121,20 @@ export class EditingDirectiveBase {
118
121
  const confirmationCallback = typeof this.removeConfirmation === 'boolean' ? this.defaultRemoveConfirmation : this.removeConfirmation;
119
122
  const result = confirmationCallback(dataItem);
120
123
  if (result instanceof Promise) {
121
- result.then(removeItem);
124
+ result.then((res) => {
125
+ removeItem(res);
126
+ this.returnFocusToGrid();
127
+ });
122
128
  }
123
129
  else if (result instanceof Observable) {
124
- result.pipe(take(1)).subscribe(removeItem);
130
+ result.pipe(take(1)).subscribe((res) => {
131
+ removeItem(res);
132
+ this.returnFocusToGrid();
133
+ });
125
134
  }
126
135
  else {
127
136
  removeItem(result);
137
+ this.returnFocusToGrid();
128
138
  }
129
139
  }
130
140
  else {
@@ -137,6 +147,11 @@ export class EditingDirectiveBase {
137
147
  closeEditor(rowIndex) {
138
148
  this.grid.closeRow(rowIndex);
139
149
  }
150
+ returnFocusToGrid() {
151
+ if (!this.navigationService.focusCell()) {
152
+ this.navigationService.focusPrevCell() || this.navigationService.focusNextCell();
153
+ }
154
+ }
140
155
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: i1.GridComponent }, { token: i2.LocalDataChangesService }], target: i0.ɵɵFactoryTarget.Directive });
141
156
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EditingDirectiveBase, selector: "[kendoGridEditingDirectiveBase]", inputs: { editService: "editService", removeConfirmation: "removeConfirmation" }, ngImport: i0 });
142
157
  }
@@ -15,7 +15,7 @@ import * as i2 from "../editing/local-data-changes.service";
15
15
  * Represent the directive that manages in-cell editing operations in the Grid when using Reactive Forms ([see example]({% slug editing_directives_grid %}#toc-in-cell-editing)).
16
16
  *
17
17
  * @example
18
- * ```typescript
18
+ * ```html
19
19
  * <kendo-grid [data]="data" kendoGridInCellEditing></kendo-grid>
20
20
  * ```
21
21
  * @remarks
@@ -63,7 +63,8 @@ export class InCellEditingDirective extends EditingDirectiveBase {
63
63
  }
64
64
  cellClickHandler(args) {
65
65
  if (!args.isEdited && args.type !== 'contextmenu') {
66
- this.grid.editCell(args.rowIndex, args.columnIndex, this.createFormGroup(args));
66
+ const colIndex = this.grid.isStacked ? args.column.leafIndex : args.columnIndex;
67
+ this.grid.editCell(args.rowIndex, colIndex, this.createFormGroup(args));
67
68
  this.cdr.markForCheck();
68
69
  }
69
70
  }
@@ -73,12 +74,13 @@ export class InCellEditingDirective extends EditingDirectiveBase {
73
74
  args.preventDefault();
74
75
  }
75
76
  else if (formGroup.dirty) {
76
- if (args.originalEvent && args.originalEvent.keyCode === Keys.Escape) {
77
+ if (args.originalEvent && args.originalEvent.code === Keys.Escape) {
77
78
  return;
78
79
  }
79
80
  this.editService.assignValues(dataItem, formGroup.value);
80
81
  this.editService.update(dataItem);
81
82
  }
83
+ this.cdr.markForCheck();
82
84
  }
83
85
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InCellEditingDirective, deps: [{ token: i1.GridComponent }, { token: i2.LocalDataChangesService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
84
86
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: InCellEditingDirective, isStandalone: true, selector: "[kendoGridInCellEditing]", inputs: { createFormGroup: ["kendoGridInCellEditing", "createFormGroup"] }, usesInheritance: true, ngImport: i0 });
@@ -14,7 +14,7 @@ import * as i2 from "../editing/local-data-changes.service";
14
14
  * Represents the directive that manages editing operations in the Grid when using Reactive Forms ([see example](slug:editing_directives_grid#toc-reactive-editing-directive)).
15
15
  *
16
16
  * @example
17
- * ```typescript
17
+ * ```html
18
18
  * <kendo-grid [data]="data" kendoGridReactiveEditing></kendo-grid>
19
19
  * ```
20
20
  * @remarks
@@ -13,7 +13,7 @@ import * as i2 from "../editing/local-data-changes.service";
13
13
  * Represents the directive that manages editing operations in the Grid when using Template-Driven Angular Forms ([see example]({% slug editing_directives_grid %}#toc-template-editing-directive)).
14
14
  *
15
15
  * @example
16
- * ```typescript
16
+ * ```html
17
17
  * <kendo-grid [data]="data" kendoGridTemplateEditing></kendo-grid>
18
18
  * ```
19
19
  * @remarks
@@ -114,7 +114,7 @@ export class FilterCellOperatorsComponent {
114
114
  * @hidden
115
115
  */
116
116
  clearKeydown(args) {
117
- if (args.keyCode === Keys.Enter || args.keyCode === Keys.Space) {
117
+ if (args.code === Keys.Enter || args.code === Keys.NumpadEnter || args.code === Keys.Space) {
118
118
  this.clear.emit();
119
119
  }
120
120
  }
@@ -125,7 +125,7 @@ export class FilterCellOperatorsComponent {
125
125
  if (args.defaultPrevented) {
126
126
  return;
127
127
  }
128
- if (args.keyCode === Keys.Enter && !this.dropdown.isOpen) {
128
+ if ((args.code === Keys.Enter || args.code === Keys.NumpadEnter) && !this.dropdown.isOpen) {
129
129
  this.dropdown.toggle(true);
130
130
  args.preventDefault();
131
131
  }
@@ -43,6 +43,9 @@ export class FilterRowComponent {
43
43
  const colIndex = this.lockedColumnsCount + columnIndex;
44
44
  return this.detailTemplate?.templateRef ? colIndex + 1 : colIndex;
45
45
  }
46
+ get isStacked() {
47
+ return this.ctx.grid?.isStacked;
48
+ }
46
49
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterRowComponent, deps: [{ token: i1.ContextService }, { token: i2.ColumnInfoService }], target: i0.ɵɵFactoryTarget.Component });
47
50
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterRowComponent, isStandalone: true, selector: "[kendoGridFilterRow]", inputs: { columns: "columns", filter: "filter", groups: "groups", detailTemplate: "detailTemplate", logicalRowIndex: "logicalRowIndex", lockedColumnsCount: "lockedColumnsCount" }, host: { properties: { "class.k-filter-row": "this.filterRowClass" } }, ngImport: i0, template: `
48
51
  <td
@@ -52,7 +55,7 @@ export class FilterRowComponent {
52
55
  </td>
53
56
  <td
54
57
  class="k-table-td k-hierarchy-cell"
55
- *ngIf="detailTemplate?.templateRef"
58
+ *ngIf="detailTemplate?.templateRef && !isStacked"
56
59
  role="presentation">
57
60
  </td>
58
61
  <td *ngFor="let column of columns; let columnIndex = index"
@@ -82,7 +85,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
82
85
  </td>
83
86
  <td
84
87
  class="k-table-td k-hierarchy-cell"
85
- *ngIf="detailTemplate?.templateRef"
88
+ *ngIf="detailTemplate?.templateRef && !isStacked"
86
89
  role="presentation">
87
90
  </td>
88
91
  <td *ngFor="let column of columns; let columnIndex = index"
@@ -25,7 +25,7 @@ export class FilterMenuDropDownListDirective {
25
25
  this.host.wrapper.nativeElement.removeEventListener('keydown', this.keydownHandler);
26
26
  }
27
27
  keydownHandler = (e) => {
28
- if (e.keyCode === Keys.Escape && this.host.isOpen) {
28
+ if (e.code === Keys.Escape && this.host.isOpen) {
29
29
  e.stopPropagation();
30
30
  this.host.toggle(false);
31
31
  }