@progress/kendo-angular-grid 21.2.0 → 21.3.0-develop.10
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/column-menu/column-list.component.d.ts +1 -0
- package/common/id.service.d.ts +6 -1
- package/esm2022/column-menu/column-list.component.mjs +2 -1
- package/esm2022/column-menu/column-menu-chooser.component.mjs +1 -2
- package/esm2022/column-menu/column-menu.component.mjs +4 -6
- package/esm2022/columns/column-base.mjs +1 -2
- package/esm2022/common/id.service.mjs +25 -3
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +7 -7
- package/esm2022/grid.component.mjs +325 -274
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/header/header.component.mjs +4 -4
- package/esm2022/rendering/list.component.mjs +10 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +11 -588
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-request-response.service.mjs +624 -0
- package/esm2022/scrolling/scroller.service.mjs +5 -1
- package/fesm2022/progress-kendo-angular-grid.mjs +1511 -1392
- package/filtering/menu/date-filter-menu-input.component.d.ts +2 -2
- package/grid.component.d.ts +41 -1
- package/package.json +25 -25
- package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +3 -23
- package/rendering/toolbar/tools/ai-assistant/ai-request-response.service.d.ts +61 -0
- package/schematics/ngAdd/index.js +7 -7
- package/scrolling/scroller.service.d.ts +2 -1
|
@@ -54,6 +54,7 @@ export declare class ColumnListComponent implements OnInit, OnDestroy {
|
|
|
54
54
|
private _columns;
|
|
55
55
|
private domSubscriptions;
|
|
56
56
|
private lastDisabledCheckbox;
|
|
57
|
+
private handledKeys;
|
|
57
58
|
constructor(element: ElementRef, ngZone: NgZone, renderer: Renderer2, listNavigationService: ColumnListKeyboardNavigation, cdr: ChangeDetectorRef, columnInfoService: ColumnInfoService, adaptiveGridService: AdaptiveGridService, ctx: ContextService);
|
|
58
59
|
ngOnInit(): void;
|
|
59
60
|
ngAfterViewInit(): void;
|
package/common/id.service.d.ts
CHANGED
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { OnDestroy } from "@angular/core";
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* @hidden
|
|
8
9
|
*/
|
|
9
|
-
export declare class IdService {
|
|
10
|
+
export declare class IdService implements OnDestroy {
|
|
10
11
|
private prefix;
|
|
12
|
+
private gridIndex;
|
|
13
|
+
private columnCounter;
|
|
11
14
|
constructor();
|
|
15
|
+
ngOnDestroy(): void;
|
|
12
16
|
gridId(): string;
|
|
13
17
|
cellId(rowIndex: number, colIndex: number): string;
|
|
14
18
|
selectionCheckboxId(itemIndex: any): string;
|
|
15
19
|
selectAllCheckboxId(): string;
|
|
16
20
|
columnId(colIndex: number): string;
|
|
21
|
+
nextColumnId(): string;
|
|
17
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdService, never>;
|
|
18
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<IdService>;
|
|
19
24
|
}
|
|
@@ -86,6 +86,7 @@ export class ColumnListComponent {
|
|
|
86
86
|
_columns;
|
|
87
87
|
domSubscriptions = new Subscription();
|
|
88
88
|
lastDisabledCheckbox;
|
|
89
|
+
handledKeys = [Keys.ArrowDown, Keys.ArrowUp, Keys.Space];
|
|
89
90
|
constructor(element, ngZone, renderer, listNavigationService, cdr, columnInfoService, adaptiveGridService, ctx) {
|
|
90
91
|
this.element = element;
|
|
91
92
|
this.ngZone = ngZone;
|
|
@@ -228,7 +229,7 @@ export class ColumnListComponent {
|
|
|
228
229
|
}
|
|
229
230
|
onKeydown = (e) => {
|
|
230
231
|
const code = normalizeKeys(e);
|
|
231
|
-
if (code
|
|
232
|
+
if (this.handledKeys.includes(code)) {
|
|
232
233
|
e.preventDefault();
|
|
233
234
|
}
|
|
234
235
|
if (code === 'Tab' && e.shiftKey) {
|
|
@@ -7,7 +7,6 @@ import { ColumnInfoService } from '../common/column-info.service';
|
|
|
7
7
|
import { ColumnMenuItemBase } from './column-menu-item-base';
|
|
8
8
|
import { columnsIcon } from '@progress/kendo-svg-icons';
|
|
9
9
|
import { ContextService } from '../common/provider.service';
|
|
10
|
-
import { ColumnListComponent } from './column-list.component';
|
|
11
10
|
import { ColumnMenuItemContentTemplateDirective } from './column-menu-item-content-template.directive';
|
|
12
11
|
import { ColumnMenuItemComponent } from './column-menu-item.component';
|
|
13
12
|
import { ColumnChooserContentComponent } from './column-chooser-content.component';
|
|
@@ -139,7 +138,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
139
138
|
</kendo-grid-columnmenu-item>
|
|
140
139
|
`,
|
|
141
140
|
standalone: true,
|
|
142
|
-
imports: [ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective,
|
|
141
|
+
imports: [ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnChooserContentComponent]
|
|
143
142
|
}]
|
|
144
143
|
}], ctorParameters: () => [{ type: i1.ContextService }, { type: i2.ColumnInfoService }, { type: i0.ElementRef }], propDecorators: { expand: [{
|
|
145
144
|
type: Output
|
|
@@ -15,7 +15,6 @@ import { moreVerticalIcon, columnsIcon, filterIcon, slidersIcon } from '@progres
|
|
|
15
15
|
import { TabContentDirective, TabStripComponent, TabStripTabComponent, TabTitleDirective } from '@progress/kendo-angular-layout';
|
|
16
16
|
import { ColumnInfoService } from '../common/column-info.service';
|
|
17
17
|
import { IdService } from '../common/id.service';
|
|
18
|
-
import { ColumnListComponent } from './column-list.component';
|
|
19
18
|
import { FilterMenuContainerComponent } from '../filtering/menu/filter-menu-container.component';
|
|
20
19
|
import { ColumnMenuFilterComponent } from './column-menu-filter.component';
|
|
21
20
|
import { ColumnMenuAutoSizeAllColumnsComponent } from './column-menu-autosize-all.component';
|
|
@@ -437,7 +436,7 @@ export class ColumnMenuComponent {
|
|
|
437
436
|
>
|
|
438
437
|
</kendo-grid-columnmenu-autosize-column>
|
|
439
438
|
}
|
|
440
|
-
|
|
439
|
+
|
|
441
440
|
@if (hasAutoSizeAllColumns) {
|
|
442
441
|
<kendo-grid-columnmenu-autosize-all-columns
|
|
443
442
|
#autoSizeAllColumnsItem
|
|
@@ -565,7 +564,7 @@ export class ColumnMenuComponent {
|
|
|
565
564
|
}
|
|
566
565
|
</kendo-tabstrip>
|
|
567
566
|
</ng-template>
|
|
568
|
-
|
|
567
|
+
|
|
569
568
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { kind: "directive", type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { kind: "component", type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { kind: "component", type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { kind: "component", type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "size", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { kind: "component", type: TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { kind: "directive", type: TabTitleDirective, selector: "[kendoTabTitle]" }, { kind: "directive", type: TabContentDirective, selector: "[kendoTabContent]" }, { kind: "component", type: FilterMenuContainerComponent, selector: "kendo-grid-filter-menu-container", inputs: ["column", "isLast", "isExpanded", "menuTabbingService", "filter", "actionsClass"], outputs: ["close"] }, { kind: "component", type: ColumnChooserContentComponent, selector: "kendo-grid-column-chooser-content", inputs: ["filterable", "showSelectAll", "showCheckedCount", "allowHideAll", "autoSync", "actionsClass", "closeOnReset", "columns", "isLast", "isExpanded", "service"], outputs: ["close"] }] });
|
|
570
569
|
}
|
|
571
570
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuComponent, decorators: [{
|
|
@@ -648,7 +647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
648
647
|
>
|
|
649
648
|
</kendo-grid-columnmenu-autosize-column>
|
|
650
649
|
}
|
|
651
|
-
|
|
650
|
+
|
|
652
651
|
@if (hasAutoSizeAllColumns) {
|
|
653
652
|
<kendo-grid-columnmenu-autosize-all-columns
|
|
654
653
|
#autoSizeAllColumnsItem
|
|
@@ -776,7 +775,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
776
775
|
}
|
|
777
776
|
</kendo-tabstrip>
|
|
778
777
|
</ng-template>
|
|
779
|
-
|
|
778
|
+
|
|
780
779
|
`,
|
|
781
780
|
standalone: true,
|
|
782
781
|
imports: [
|
|
@@ -798,7 +797,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
798
797
|
TabTitleDirective,
|
|
799
798
|
TabContentDirective,
|
|
800
799
|
FilterMenuContainerComponent,
|
|
801
|
-
ColumnListComponent,
|
|
802
800
|
ColumnChooserContentComponent
|
|
803
801
|
]
|
|
804
802
|
}]
|
|
@@ -24,7 +24,6 @@ export const isCheckboxColumn = column => column?.isCheckboxColumn;
|
|
|
24
24
|
*/
|
|
25
25
|
export const isRowReorderColumn = column => column?.isRowReorderColumn;
|
|
26
26
|
const isColumnContainer = column => column?.isColumnGroup || isSpanColumn(column);
|
|
27
|
-
let columnId = 0;
|
|
28
27
|
/**
|
|
29
28
|
* The base class for the column components of the Grid.
|
|
30
29
|
*
|
|
@@ -355,7 +354,7 @@ export class ColumnBase {
|
|
|
355
354
|
if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
|
|
356
355
|
throw new Error(ColumnConfigurationErrorMessages.columnNested);
|
|
357
356
|
}
|
|
358
|
-
this._id = this.idService?.
|
|
357
|
+
this._id = this.idService?.nextColumnId();
|
|
359
358
|
}
|
|
360
359
|
ngAfterViewInit() {
|
|
361
360
|
this.initialMinResizableWidth = this.minResizableWidth || 10;
|
|
@@ -4,15 +4,34 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Injectable } from "@angular/core";
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
//
|
|
8
|
-
|
|
7
|
+
// Registry to track active Grid instances and their indices
|
|
8
|
+
const activeGridIndices = new Set();
|
|
9
|
+
// Get the next available grid index (reuses freed indices)
|
|
10
|
+
function getNextGridIndex() {
|
|
11
|
+
let index = 0;
|
|
12
|
+
while (activeGridIndices.has(index)) {
|
|
13
|
+
index++;
|
|
14
|
+
}
|
|
15
|
+
activeGridIndices.add(index);
|
|
16
|
+
return index;
|
|
17
|
+
}
|
|
18
|
+
// Release a grid index when the Grid is destroyed
|
|
19
|
+
function releaseGridIndex(index) {
|
|
20
|
+
activeGridIndices.delete(index);
|
|
21
|
+
}
|
|
9
22
|
/**
|
|
10
23
|
* @hidden
|
|
11
24
|
*/
|
|
12
25
|
export class IdService {
|
|
13
26
|
prefix;
|
|
27
|
+
gridIndex;
|
|
28
|
+
columnCounter = 0;
|
|
14
29
|
constructor() {
|
|
15
|
-
this.
|
|
30
|
+
this.gridIndex = getNextGridIndex();
|
|
31
|
+
this.prefix = `k-grid${this.gridIndex}`;
|
|
32
|
+
}
|
|
33
|
+
ngOnDestroy() {
|
|
34
|
+
releaseGridIndex(this.gridIndex);
|
|
16
35
|
}
|
|
17
36
|
gridId() {
|
|
18
37
|
return this.prefix;
|
|
@@ -29,6 +48,9 @@ export class IdService {
|
|
|
29
48
|
columnId(colIndex) {
|
|
30
49
|
return `${this.prefix}-col${colIndex}`;
|
|
31
50
|
}
|
|
51
|
+
nextColumnId() {
|
|
52
|
+
return `${this.prefix}-col${this.columnCounter++}`;
|
|
53
|
+
}
|
|
32
54
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
55
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService });
|
|
34
56
|
}
|
|
@@ -7,7 +7,7 @@ import { Component, Input } from '@angular/core';
|
|
|
7
7
|
import { ColumnComponent } from "../../columns/column.component";
|
|
8
8
|
import { FilterService } from '../filter.service';
|
|
9
9
|
import { SinglePopupService } from '../../common/single-popup.service';
|
|
10
|
-
import {
|
|
10
|
+
import { filter } from 'rxjs/operators';
|
|
11
11
|
import { DatePickerComponent, DatePickerCustomMessagesComponent } from '@progress/kendo-angular-dateinputs';
|
|
12
12
|
import { ContextService } from '../../common/provider.service';
|
|
13
13
|
import { FilterInputDirective } from '../filter-input.directive';
|
|
@@ -49,12 +49,12 @@ export class DateFilterMenuInputComponent {
|
|
|
49
49
|
this.subscription.unsubscribe();
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
open() {
|
|
52
|
+
open(picker) {
|
|
53
53
|
if (this.subscription) {
|
|
54
54
|
this.subscription.unsubscribe();
|
|
55
55
|
}
|
|
56
56
|
this.subscription = this.popupService.onClose
|
|
57
|
-
.pipe(
|
|
57
|
+
.pipe(filter(() => picker.isActive))
|
|
58
58
|
.subscribe(e => e.preventDefault());
|
|
59
59
|
}
|
|
60
60
|
messageFor(key) {
|
|
@@ -76,13 +76,13 @@ export class DateFilterMenuInputComponent {
|
|
|
76
76
|
[filterService]="filterService"
|
|
77
77
|
[isFirstDropDown]="isFirstDropDown"
|
|
78
78
|
[menuTabbingService]="menuTabbingService">
|
|
79
|
-
<kendo-datepicker
|
|
79
|
+
<kendo-datepicker #picker
|
|
80
80
|
kendoFilterInput
|
|
81
81
|
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
82
82
|
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
83
83
|
[columnLabel]="columnLabel"
|
|
84
84
|
[filterDelay]="0"
|
|
85
|
-
(open)="open()"
|
|
85
|
+
(open)="open(picker)"
|
|
86
86
|
[value]="currentFilter?.value"
|
|
87
87
|
[placeholder]="placeholder"
|
|
88
88
|
[formatPlaceholder]="formatPlaceholder"
|
|
@@ -115,13 +115,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
115
115
|
[filterService]="filterService"
|
|
116
116
|
[isFirstDropDown]="isFirstDropDown"
|
|
117
117
|
[menuTabbingService]="menuTabbingService">
|
|
118
|
-
<kendo-datepicker
|
|
118
|
+
<kendo-datepicker #picker
|
|
119
119
|
kendoFilterInput
|
|
120
120
|
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
121
121
|
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
122
122
|
[columnLabel]="columnLabel"
|
|
123
123
|
[filterDelay]="0"
|
|
124
|
-
(open)="open()"
|
|
124
|
+
(open)="open(picker)"
|
|
125
125
|
[value]="currentFilter?.value"
|
|
126
126
|
[placeholder]="placeholder"
|
|
127
127
|
[formatPlaceholder]="formatPlaceholder"
|