@progress/kendo-angular-grid 20.0.0-develop.5 → 20.0.0-develop.7

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.
@@ -2178,6 +2178,9 @@ export class GridComponent {
2178
2178
  }
2179
2179
  attachDomEventHandlers() {
2180
2180
  this.cellClickSubscription = this.domEvents.cellClick.subscribe((args) => {
2181
+ if (this.isStacked && !isPresent(args.column)) {
2182
+ return;
2183
+ }
2181
2184
  this.cellClick.emit(Object.assign({ sender: this }, args));
2182
2185
  });
2183
2186
  }
@@ -25,7 +25,7 @@ import * as i1 from "../common/provider.service";
25
25
  * </kendo-grid>
26
26
  * ```
27
27
  * @remarks
28
- * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}.
28
+ * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link NumericTextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}.
29
29
  */
30
30
  export class FocusableDirective {
31
31
  cellContext;
@@ -333,7 +333,11 @@ export class NavigationService {
333
333
  this.deactivateElements();
334
334
  this.enterCell();
335
335
  }
336
- focusable.focus();
336
+ this.zone.runOutsideAngular(() => {
337
+ setTimeout(() => {
338
+ focusable.focus();
339
+ });
340
+ });
337
341
  }
338
342
  else {
339
343
  this.deactivateElements();
@@ -907,7 +911,7 @@ export class NavigationService {
907
911
  tableCellEntered = false;
908
912
  stackedCellEntered = false;
909
913
  handleStackedTabNavigation(args) {
910
- if (!isPresent(this.activeCell.focusGroup)) {
914
+ if (!isPresent(this.activeCell?.focusGroup)) {
911
915
  return;
912
916
  }
913
917
  if (this.stackedFocusedCellIndex === -1) {
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1755869037,
14
- version: '20.0.0-develop.5',
13
+ publishDate: 1756185156,
14
+ version: '20.0.0-develop.7',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -321,8 +321,8 @@ export class TableBodyComponent {
321
321
  if (!selectionEnabled) {
322
322
  return;
323
323
  }
324
- const cellComparer = this.isStackedMode ? closest(target, matchesNodeName('td')) : closest(target, (el) => { matchesNodeName('td') && hasClasses(el, 'k-grid-stack-content'); });
325
- const isCellFocused = cellComparer?.classList.contains('k-focus');
324
+ const cellComparer = this.isStackedMode ? closest(target, (el) => hasClasses(el, 'k-grid-stack-cell')) || closest(target, matchesNodeName('td')) : closest(target, matchesNodeName('td'));
325
+ const isCellFocused = cellComparer?.classList.contains('k-focus') || cellComparer === document.activeElement;
326
326
  const isShiftOrCtrlPressed = eventArg.shiftKey || eventArg.ctrlKey || eventArg.metaKey;
327
327
  if (isCellFocused && !isShiftOrCtrlPressed) {
328
328
  eventArg.preventDefault();
@@ -367,6 +367,26 @@ export class TableBodyComponent {
367
367
  if (cell) {
368
368
  row = cell.parentElement.parentElement;
369
369
  }
370
+ else {
371
+ cell = closest(currentTarget, (el) => {
372
+ if (!matchesNodeName('td')(el)) {
373
+ return false;
374
+ }
375
+ const parentRow = el.parentElement;
376
+ if (!parentRow || !matchesNodeName('tr')(parentRow)) {
377
+ return false;
378
+ }
379
+ return parentRow.parentElement === element;
380
+ });
381
+ if (cell) {
382
+ row = cell.parentElement;
383
+ body = element;
384
+ gridElement = null;
385
+ }
386
+ }
387
+ }
388
+ if (!cell) {
389
+ return;
370
390
  }
371
391
  this.editService.preventCellClose();
372
392
  const focusable = (!isCellTarget && target !== cell) && isFocusableWithTabKey(target, false);
@@ -412,20 +432,27 @@ export class TableBodyComponent {
412
432
  }
413
433
  cellClickArgs(cell, row, eventArg) {
414
434
  const cells = this.isStackedMode ? row.querySelectorAll('.k-grid-stack-cell') : row.cells;
415
- const index = columnCellIndex(cell, cells, this.isStackedMode);
435
+ let index = columnCellIndex(cell, cells, this.isStackedMode);
436
+ // In stacked mode, clicks on the outer cell should not trigger Grid's cellClick event
437
+ let isOuterCellClicked = false;
438
+ if (this.isStackedMode && !isPresent(index)) {
439
+ const cells = row.cells;
440
+ index = columnCellIndex(cell, cells, this.isStackedMode);
441
+ isOuterCellClicked = true;
442
+ }
416
443
  if (!isPresent(index)) {
417
444
  return;
418
445
  }
419
446
  const column = this.columns.toArray()[index];
420
447
  const columnIndex = (this.isStackedMode ? 0 : this.lockedColumnsCount) + index;
421
- let rowIndex = (this.isStackedMode ? row.parentElement.parentElement : row).getAttribute('data-kendo-grid-item-index');
448
+ let rowIndex = (this.isStackedMode && !isOuterCellClicked ? row.parentElement.parentElement : row).getAttribute('data-kendo-grid-item-index');
422
449
  rowIndex = rowIndex ? parseInt(rowIndex, 10) : -1;
423
450
  const dataItem = rowIndex === -1 ? this.editService.newDataItem : this.rowsToRender.find(item => +item.index === rowIndex && item.type === 'data')?.data;
424
451
  const isEditedColumn = this.editService.isEditedColumn(rowIndex, column);
425
452
  const isEditedRow = this.editService.isEdited(rowIndex);
426
453
  const type = eventArg.type === 'keydown' ? 'click' : eventArg.type;
427
454
  return {
428
- column: column,
455
+ column: isOuterCellClicked ? null : column,
429
456
  columnIndex: columnIndex,
430
457
  dataItem: dataItem,
431
458
  isEditedColumn: isEditedColumn,
@@ -901,7 +901,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
901
901
  * </kendo-grid>
902
902
  * ```
903
903
  * @remarks
904
- * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}.
904
+ * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link NumericTextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}.
905
905
  */
906
906
  class FocusableDirective {
907
907
  cellContext;
@@ -3677,7 +3677,11 @@ class NavigationService {
3677
3677
  this.deactivateElements();
3678
3678
  this.enterCell();
3679
3679
  }
3680
- focusable.focus();
3680
+ this.zone.runOutsideAngular(() => {
3681
+ setTimeout(() => {
3682
+ focusable.focus();
3683
+ });
3684
+ });
3681
3685
  }
3682
3686
  else {
3683
3687
  this.deactivateElements();
@@ -4251,7 +4255,7 @@ class NavigationService {
4251
4255
  tableCellEntered = false;
4252
4256
  stackedCellEntered = false;
4253
4257
  handleStackedTabNavigation(args) {
4254
- if (!isPresent$1(this.activeCell.focusGroup)) {
4258
+ if (!isPresent$1(this.activeCell?.focusGroup)) {
4255
4259
  return;
4256
4260
  }
4257
4261
  if (this.stackedFocusedCellIndex === -1) {
@@ -20483,8 +20487,8 @@ class TableBodyComponent {
20483
20487
  if (!selectionEnabled) {
20484
20488
  return;
20485
20489
  }
20486
- const cellComparer = this.isStackedMode ? closest(target, matchesNodeName('td')) : closest(target, (el) => { matchesNodeName('td') && hasClasses(el, 'k-grid-stack-content'); });
20487
- const isCellFocused = cellComparer?.classList.contains('k-focus');
20490
+ const cellComparer = this.isStackedMode ? closest(target, (el) => hasClasses(el, 'k-grid-stack-cell')) || closest(target, matchesNodeName('td')) : closest(target, matchesNodeName('td'));
20491
+ const isCellFocused = cellComparer?.classList.contains('k-focus') || cellComparer === document.activeElement;
20488
20492
  const isShiftOrCtrlPressed = eventArg.shiftKey || eventArg.ctrlKey || eventArg.metaKey;
20489
20493
  if (isCellFocused && !isShiftOrCtrlPressed) {
20490
20494
  eventArg.preventDefault();
@@ -20529,6 +20533,26 @@ class TableBodyComponent {
20529
20533
  if (cell) {
20530
20534
  row = cell.parentElement.parentElement;
20531
20535
  }
20536
+ else {
20537
+ cell = closest(currentTarget, (el) => {
20538
+ if (!matchesNodeName('td')(el)) {
20539
+ return false;
20540
+ }
20541
+ const parentRow = el.parentElement;
20542
+ if (!parentRow || !matchesNodeName('tr')(parentRow)) {
20543
+ return false;
20544
+ }
20545
+ return parentRow.parentElement === element;
20546
+ });
20547
+ if (cell) {
20548
+ row = cell.parentElement;
20549
+ body = element;
20550
+ gridElement = null;
20551
+ }
20552
+ }
20553
+ }
20554
+ if (!cell) {
20555
+ return;
20532
20556
  }
20533
20557
  this.editService.preventCellClose();
20534
20558
  const focusable = (!isCellTarget && target !== cell) && isFocusableWithTabKey(target, false);
@@ -20574,20 +20598,27 @@ class TableBodyComponent {
20574
20598
  }
20575
20599
  cellClickArgs(cell, row, eventArg) {
20576
20600
  const cells = this.isStackedMode ? row.querySelectorAll('.k-grid-stack-cell') : row.cells;
20577
- const index = columnCellIndex(cell, cells, this.isStackedMode);
20601
+ let index = columnCellIndex(cell, cells, this.isStackedMode);
20602
+ // In stacked mode, clicks on the outer cell should not trigger Grid's cellClick event
20603
+ let isOuterCellClicked = false;
20604
+ if (this.isStackedMode && !isPresent(index)) {
20605
+ const cells = row.cells;
20606
+ index = columnCellIndex(cell, cells, this.isStackedMode);
20607
+ isOuterCellClicked = true;
20608
+ }
20578
20609
  if (!isPresent(index)) {
20579
20610
  return;
20580
20611
  }
20581
20612
  const column = this.columns.toArray()[index];
20582
20613
  const columnIndex = (this.isStackedMode ? 0 : this.lockedColumnsCount) + index;
20583
- let rowIndex = (this.isStackedMode ? row.parentElement.parentElement : row).getAttribute('data-kendo-grid-item-index');
20614
+ let rowIndex = (this.isStackedMode && !isOuterCellClicked ? row.parentElement.parentElement : row).getAttribute('data-kendo-grid-item-index');
20584
20615
  rowIndex = rowIndex ? parseInt(rowIndex, 10) : -1;
20585
20616
  const dataItem = rowIndex === -1 ? this.editService.newDataItem : this.rowsToRender.find(item => +item.index === rowIndex && item.type === 'data')?.data;
20586
20617
  const isEditedColumn = this.editService.isEditedColumn(rowIndex, column);
20587
20618
  const isEditedRow = this.editService.isEdited(rowIndex);
20588
20619
  const type = eventArg.type === 'keydown' ? 'click' : eventArg.type;
20589
20620
  return {
20590
- column: column,
20621
+ column: isOuterCellClicked ? null : column,
20591
20622
  columnIndex: columnIndex,
20592
20623
  dataItem: dataItem,
20593
20624
  isEditedColumn: isEditedColumn,
@@ -22057,8 +22088,8 @@ const packageMetadata = {
22057
22088
  productName: 'Kendo UI for Angular',
22058
22089
  productCode: 'KENDOUIANGULAR',
22059
22090
  productCodes: ['KENDOUIANGULAR'],
22060
- publishDate: 1755869037,
22061
- version: '20.0.0-develop.5',
22091
+ publishDate: 1756185156,
22092
+ version: '20.0.0-develop.7',
22062
22093
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
22063
22094
  };
22064
22095
 
@@ -31557,6 +31588,9 @@ class GridComponent {
31557
31588
  }
31558
31589
  attachDomEventHandlers() {
31559
31590
  this.cellClickSubscription = this.domEvents.cellClick.subscribe((args) => {
31591
+ if (this.isStacked && !isPresent(args.column)) {
31592
+ return;
31593
+ }
31560
31594
  this.cellClick.emit(Object.assign({ sender: this }, args));
31561
31595
  });
31562
31596
  }
@@ -24,7 +24,7 @@ import * as i0 from "@angular/core";
24
24
  * </kendo-grid>
25
25
  * ```
26
26
  * @remarks
27
- * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}.
27
+ * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link NumericTextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}.
28
28
  */
29
29
  export declare class FocusableDirective implements FocusableElement, AfterViewInit, OnDestroy {
30
30
  private cellContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "20.0.0-develop.5",
3
+ "version": "20.0.0-develop.7",
4
4
  "description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -41,7 +41,7 @@
41
41
  "package": {
42
42
  "productName": "Kendo UI for Angular",
43
43
  "productCode": "KENDOUIANGULAR",
44
- "publishDate": 1755869037,
44
+ "publishDate": 1756185156,
45
45
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
46
46
  }
47
47
  },
@@ -54,29 +54,29 @@
54
54
  "@progress/kendo-data-query": "^1.0.0",
55
55
  "@progress/kendo-drawing": "^1.21.0",
56
56
  "@progress/kendo-licensing": "^1.7.0",
57
- "@progress/kendo-angular-buttons": "20.0.0-develop.5",
58
- "@progress/kendo-angular-common": "20.0.0-develop.5",
59
- "@progress/kendo-angular-dateinputs": "20.0.0-develop.5",
60
- "@progress/kendo-angular-layout": "20.0.0-develop.5",
61
- "@progress/kendo-angular-navigation": "20.0.0-develop.5",
62
- "@progress/kendo-angular-dropdowns": "20.0.0-develop.5",
63
- "@progress/kendo-angular-excel-export": "20.0.0-develop.5",
64
- "@progress/kendo-angular-icons": "20.0.0-develop.5",
65
- "@progress/kendo-angular-inputs": "20.0.0-develop.5",
66
- "@progress/kendo-angular-conversational-ui": "20.0.0-develop.5",
67
- "@progress/kendo-angular-intl": "20.0.0-develop.5",
68
- "@progress/kendo-angular-l10n": "20.0.0-develop.5",
69
- "@progress/kendo-angular-label": "20.0.0-develop.5",
70
- "@progress/kendo-angular-pager": "20.0.0-develop.5",
71
- "@progress/kendo-angular-pdf-export": "20.0.0-develop.5",
72
- "@progress/kendo-angular-popup": "20.0.0-develop.5",
73
- "@progress/kendo-angular-toolbar": "20.0.0-develop.5",
74
- "@progress/kendo-angular-utils": "20.0.0-develop.5",
57
+ "@progress/kendo-angular-buttons": "20.0.0-develop.7",
58
+ "@progress/kendo-angular-common": "20.0.0-develop.7",
59
+ "@progress/kendo-angular-dateinputs": "20.0.0-develop.7",
60
+ "@progress/kendo-angular-layout": "20.0.0-develop.7",
61
+ "@progress/kendo-angular-navigation": "20.0.0-develop.7",
62
+ "@progress/kendo-angular-dropdowns": "20.0.0-develop.7",
63
+ "@progress/kendo-angular-excel-export": "20.0.0-develop.7",
64
+ "@progress/kendo-angular-icons": "20.0.0-develop.7",
65
+ "@progress/kendo-angular-inputs": "20.0.0-develop.7",
66
+ "@progress/kendo-angular-conversational-ui": "20.0.0-develop.7",
67
+ "@progress/kendo-angular-intl": "20.0.0-develop.7",
68
+ "@progress/kendo-angular-l10n": "20.0.0-develop.7",
69
+ "@progress/kendo-angular-label": "20.0.0-develop.7",
70
+ "@progress/kendo-angular-pager": "20.0.0-develop.7",
71
+ "@progress/kendo-angular-pdf-export": "20.0.0-develop.7",
72
+ "@progress/kendo-angular-popup": "20.0.0-develop.7",
73
+ "@progress/kendo-angular-toolbar": "20.0.0-develop.7",
74
+ "@progress/kendo-angular-utils": "20.0.0-develop.7",
75
75
  "rxjs": "^6.5.3 || ^7.0.0"
76
76
  },
77
77
  "dependencies": {
78
78
  "tslib": "^2.3.1",
79
- "@progress/kendo-angular-schematics": "20.0.0-develop.5",
79
+ "@progress/kendo-angular-schematics": "20.0.0-develop.7",
80
80
  "@progress/kendo-common": "^1.0.1",
81
81
  "@progress/kendo-file-saver": "^1.0.0"
82
82
  },
@@ -4,14 +4,14 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
6
6
  // peer deps of the dropdowns
7
- '@progress/kendo-angular-treeview': '20.0.0-develop.5',
8
- '@progress/kendo-angular-navigation': '20.0.0-develop.5',
7
+ '@progress/kendo-angular-treeview': '20.0.0-develop.7',
8
+ '@progress/kendo-angular-navigation': '20.0.0-develop.7',
9
9
  // peer dependency of kendo-angular-inputs
10
- '@progress/kendo-angular-dialog': '20.0.0-develop.5',
10
+ '@progress/kendo-angular-dialog': '20.0.0-develop.7',
11
11
  // peer dependency of kendo-angular-icons
12
12
  '@progress/kendo-svg-icons': '^4.0.0',
13
13
  // peer dependency of kendo-angular-layout
14
- '@progress/kendo-angular-progressbar': '20.0.0-develop.5'
14
+ '@progress/kendo-angular-progressbar': '20.0.0-develop.7'
15
15
  } });
16
16
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
17
17
  }