@progress/kendo-angular-grid 19.2.0-develop.9 → 19.2.0

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/README.md CHANGED
@@ -4,9 +4,14 @@
4
4
 
5
5
  ## Kendo UI for Angular Data Grid Component
6
6
 
7
- > * This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)—a commercial UI library.
8
- > * You must [install a license key](https://www.telerik.com/kendo-angular-ui/my-license) when adding the package to your project. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
9
- > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular team!
7
+ > * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)—a commercial UI library.
8
+ > * To use this package, you must install a license key file, whether you are on a paid license or a 30-day free trial. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or start a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
9
+ > * Adding a valid license key file ensures a seamless experience during the trial period—no watermarks, no warnings, and full access to all components and features.
10
+ > * Trial users can register for a free license key file. Without it, your trial may be interrupted by visual indicators or functionality limitations.
11
+ > * Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular team!
12
+ > * Learn more: https://www.telerik.com/kendo-angular-ui/components/licensing
13
+ >
14
+ > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui) and speed up your development process!
10
15
 
11
16
  The [Kendo UI for Angular Data Grid](https://www.telerik.com/kendo-angular-ui/components/grid) includes a comprehensive set of ready-to-use features covering everything from paging, sorting, filtering, editing, and grouping to row and column virtualization, exporting to PDF and Excel, and accessibility support. This Data Grid Component (sometimes called a Data Table) is built on Angular from the ground up, by a company with a long history of making enterprise-ready Grids. This results in an Angular data grid that delivers lighting fast performance and is highly customizable.
12
17
 
@@ -6,7 +6,7 @@ import { ChangeDetectorRef, ElementRef, NgZone, Renderer2 } from '@angular/core'
6
6
  import { ContextService } from '../common/provider.service';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
- * Represents a directive that manages keyboard navigation for a column menu item. [See example](slug:columnmenu_grid#customizing-the-content).
9
+ * Represents a directive that manages keyboard navigation for a column menu item ([see example](slug:columnmenu_grid#customizing-the-content)).
10
10
  *
11
11
  * @example
12
12
  * ```html
@@ -7,7 +7,7 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import type { GridComponent } from '../grid.component';
8
8
  import { GridToolbarNavigationService } from '../rendering/toolbar/toolbar-navigation.service';
9
9
  import type { GroupBindingDirective } from '../grouping/group-scroll-binding.directive';
10
- import { DataBindingDirective } from '../databinding.directive';
10
+ import type { DataBindingDirective } from '../databinding.directive';
11
11
  import * as i0 from "@angular/core";
12
12
  /**
13
13
  * @hidden
@@ -12,7 +12,7 @@ import { ContextService } from '../common/provider.service';
12
12
  import * as i0 from "@angular/core";
13
13
  import * as i1 from "../common/provider.service";
14
14
  /**
15
- * Represents a directive that manages keyboard navigation for a column menu item. [See example](slug:columnmenu_grid#customizing-the-content).
15
+ * Represents a directive that manages keyboard navigation for a column menu item ([see example](slug:columnmenu_grid#customizing-the-content)).
16
16
  *
17
17
  * @example
18
18
  * ```html
@@ -94,12 +94,10 @@ export class TableDirective {
94
94
  if (isConstrainedMode && !this.service.autoFitResize) {
95
95
  this.renderer.setStyle(this.element.nativeElement, 'width', this.service.originalWidth + 'px');
96
96
  }
97
- else {
98
- if (!this.virtualColumns || this.locked) {
99
- const delta = deltas.reduce((sum, item) => sum + item, 0);
100
- const width = this.service.originalWidth + delta;
101
- this.renderer.setStyle(this.element.nativeElement, 'width', width + 'px');
102
- }
97
+ else if (!this.virtualColumns || this.locked) {
98
+ const delta = deltas.reduce((sum, item) => sum + item, 0);
99
+ const width = this.service.originalWidth + delta;
100
+ this.renderer.setStyle(this.element.nativeElement, 'width', width + 'px');
103
101
  }
104
102
  this.cdr.detectChanges();
105
103
  }
@@ -100,7 +100,6 @@ import { AdaptiveGridService } from './common/adaptiveness.service';
100
100
  import { AdaptiveRendererComponent } from './adaptiveness/adaptive-renderer.component';
101
101
  import { ColumnMenuService } from './column-menu/column-menu.service';
102
102
  import { MenuTabbingService } from './filtering/menu/menu-tabbing.service';
103
- import { GroupBindingDirective } from './grouping/group-scroll-binding.directive';
104
103
  import { DataMappingService } from './data/data-mapping.service';
105
104
  import * as i0 from "@angular/core";
106
105
  import * as i1 from "./layout/browser-support.service";
@@ -2306,7 +2305,7 @@ export class GridComponent {
2306
2305
  }
2307
2306
  if (this.groupsService.isExpanded({ groupIndex: index }) !== expand) {
2308
2307
  this.groupsService.toggleRow({ index }, false);
2309
- if (this.ctx.dataBindingDirective && this.ctx.dataBindingDirective instanceof GroupBindingDirective) {
2308
+ if (this.ctx.dataBindingDirective && isPresent(this.ctx.dataBindingDirective.groupExpand)) {
2310
2309
  this.ctx.dataBindingDirective[`group${expand ? 'Expand' : 'Collapse'}`]({ groupIndex: index });
2311
2310
  }
2312
2311
  }
@@ -284,6 +284,12 @@ export class GroupBindingDirective extends DataBindingDirective {
284
284
  this.grid.data = this.dataResult(this.state.skip, this.state.take);
285
285
  }
286
286
  process(state) {
287
+ if (this.grid.isVirtual && (!isPresent(state.take) || state.take === 0)) {
288
+ return {
289
+ data: [],
290
+ total: this.originalData?.length || 0
291
+ };
292
+ }
287
293
  if (state.group && state.group.length) {
288
294
  const groups = this.processGroups(state);
289
295
  this.grid.skip -= skippedHeaders(groups.data[0]);
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1751035948,
14
- version: '19.2.0-develop.9',
13
+ publishDate: 1751463227,
14
+ version: '19.2.0',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -274,7 +274,7 @@ export class ListComponent {
274
274
  if (shouldCalculatePageSize) {
275
275
  const calculatedPageSize = this.calcVirtualPageSize();
276
276
  if (calculatedPageSize > 0) {
277
- this.ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {
277
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
278
278
  this.ctx.grid.pageSize = calculatedPageSize;
279
279
  this.ngZone.run(() => {
280
280
  this.pageChange.emit({
@@ -77,15 +77,6 @@ export class UndoRedoDirective {
77
77
  }
78
78
  ngOnInit() {
79
79
  this.stack = new UndoRedoStack(this.maxStoredStates);
80
- this.stack.add({
81
- originalEvent: {
82
- skip: this.host.skip,
83
- take: this.host.pageSize,
84
- sort: this.host.sort,
85
- filter: this.host.filter,
86
- group: this.host.group
87
- }, gridState: this.host.currentState
88
- });
89
80
  this.subs = this.host.gridStateChange.subscribe((state) => {
90
81
  if (this.addToState) {
91
82
  this.stack.add({
@@ -156,7 +147,7 @@ export class UndoRedoDirective {
156
147
  if (isSaveOrRemove) {
157
148
  if (originalAction === 'save') {
158
149
  const stateItem = this.getGridDataItems(this.stack.current.gridState.currentData).find(item => item[this.itemIdKey] === event.originalEvent.dataItem[this.itemIdKey]);
159
- Object.assign(event.originalEvent.originalDataItem, stateItem);
150
+ this.localDataChangesService?.data.splice(event.originalEvent.rowIndex, 1, stateItem);
160
151
  }
161
152
  else if (action === 'Undo') {
162
153
  this.localDataChangesService?.data.splice(event.originalEvent.rowIndex, 0, event.originalEvent.dataItem);
@@ -169,13 +160,24 @@ export class UndoRedoDirective {
169
160
  else {
170
161
  this.host.loadState({ ...this.stack.current.gridState, currentData: null });
171
162
  if (this.isDataStateChangeEvent(event.originalEvent)) {
172
- const { skip, take, sort, filter, group } = this.stack.current.gridState;
163
+ const { skip, take, sort, filter, group } = event.gridState;
173
164
  this.host.dataStateChange.emit({ skip, take, sort, filter, group });
174
165
  }
175
166
  }
176
167
  }));
177
168
  });
178
169
  }
170
+ ngAfterViewInit() {
171
+ this.stack.add({
172
+ originalEvent: {
173
+ skip: this.host.skip,
174
+ take: this.host.pageSize,
175
+ sort: this.host.sort,
176
+ filter: this.host.filter,
177
+ group: this.host.group
178
+ }, gridState: this.host.currentState
179
+ });
180
+ }
179
181
  ngOnDestroy() {
180
182
  this.stack.clear();
181
183
  this.stack = null;