@progress/kendo-angular-grid 21.2.0 → 21.3.0-develop.2
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/common/id.service.d.ts +2 -0
- 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 +4 -0
- 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/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/fesm2022/progress-kendo-angular-grid.mjs +1456 -1370
- 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/grid.component.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { CellSelectedFn, GridSelectionItem, SelectableSettings, SelectionEvent }
|
|
|
7
7
|
import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, QueryList, SimpleChange, NgZone, ChangeDetectorRef, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core';
|
|
8
8
|
import { FormGroup } from '@angular/forms';
|
|
9
9
|
import { SortDescriptor, GroupDescriptor, CompositeFilterDescriptor } from '@progress/kendo-data-query';
|
|
10
|
+
import { GridAIRequestResponseService } from './rendering/toolbar/tools/ai-assistant/ai-request-response.service';
|
|
10
11
|
import { DetailTemplateDirective } from './rendering/details/detail-template.directive';
|
|
11
12
|
import { ScrollMode } from './scrolling/scrollmode';
|
|
12
13
|
import { SortSettings } from './columns/sort-settings';
|
|
@@ -55,6 +56,7 @@ import { ColumnReorderConfig } from './dragdrop/column-reorder-config';
|
|
|
55
56
|
import { NavigationService } from './navigation/navigation.service';
|
|
56
57
|
import { NavigationCell } from './navigation/navigation-cell.interface';
|
|
57
58
|
import { NavigationRow } from './navigation/navigation-row.interface';
|
|
59
|
+
import { IdService } from './common/id.service';
|
|
58
60
|
import { ColumnInfoService } from "./common/column-info.service";
|
|
59
61
|
import { ScrollRequestService, ScrollRequest, ScrollToItemRequest } from './scrolling/scroll-request.service';
|
|
60
62
|
import { SortService } from './common/sort.service';
|
|
@@ -157,6 +159,8 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
157
159
|
adaptiveGridService: AdaptiveGridService;
|
|
158
160
|
rowReorderService: RowReorderService;
|
|
159
161
|
private dataMappingService;
|
|
162
|
+
private aiRequestResponseService;
|
|
163
|
+
private idService;
|
|
160
164
|
/**
|
|
161
165
|
* Sets the data of the Grid. If you provide an array, the Grid gets the total count automatically.
|
|
162
166
|
* ([more information and example]({% slug binding_grid %})).
|
|
@@ -741,7 +745,7 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
741
745
|
private rowReorderSubscription;
|
|
742
746
|
private rtl;
|
|
743
747
|
private _rowSticky;
|
|
744
|
-
constructor(supportService: BrowserSupportService, selectionService: SelectionService, cellSelectionService: CellSelectionService, wrapper: ElementRef, groupInfoService: GroupInfoService, groupsService: GroupsService, changeNotification: ChangeNotificationService, detailsService: DetailsService, editService: EditService, filterService: FilterService, pdfService: PDFService, responsiveService: ResponsiveService, renderer: Renderer2, excelService: ExcelService, ngZone: NgZone, scrollSyncService: ScrollSyncService, domEvents: DomEventsService, columnResizingService: ColumnResizingService, changeDetectorRef: ChangeDetectorRef, columnReorderService: ColumnReorderService, columnInfoService: ColumnInfoService, navigationService: NavigationService, sortService: SortService, scrollRequestService: ScrollRequestService, localization: LocalizationService, ctx: ContextService, sizingService: SizingOptionsService, adaptiveGridService: AdaptiveGridService, rowReorderService: RowReorderService, dataMappingService: DataMappingService);
|
|
748
|
+
constructor(supportService: BrowserSupportService, selectionService: SelectionService, cellSelectionService: CellSelectionService, wrapper: ElementRef, groupInfoService: GroupInfoService, groupsService: GroupsService, changeNotification: ChangeNotificationService, detailsService: DetailsService, editService: EditService, filterService: FilterService, pdfService: PDFService, responsiveService: ResponsiveService, renderer: Renderer2, excelService: ExcelService, ngZone: NgZone, scrollSyncService: ScrollSyncService, domEvents: DomEventsService, columnResizingService: ColumnResizingService, changeDetectorRef: ChangeDetectorRef, columnReorderService: ColumnReorderService, columnInfoService: ColumnInfoService, navigationService: NavigationService, sortService: SortService, scrollRequestService: ScrollRequestService, localization: LocalizationService, ctx: ContextService, sizingService: SizingOptionsService, adaptiveGridService: AdaptiveGridService, rowReorderService: RowReorderService, dataMappingService: DataMappingService, aiRequestResponseService: GridAIRequestResponseService, idService: IdService);
|
|
745
749
|
/**
|
|
746
750
|
* Expands the master row at the specified data row index ([see example]({% slug hierarchy_grid %})).
|
|
747
751
|
*
|
|
@@ -784,6 +788,42 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
784
788
|
* @hidden
|
|
785
789
|
*/
|
|
786
790
|
resetGroupsState(): void;
|
|
791
|
+
/**
|
|
792
|
+
* Builds the request body for the AI service based on the provided prompt message.
|
|
793
|
+
* Allows developers to construct their own AI service requests.
|
|
794
|
+
*
|
|
795
|
+
* @param promptMessage - The prompt message to send to the AI service.
|
|
796
|
+
* @returns The request body object ready to be sent to the AI service.
|
|
797
|
+
*
|
|
798
|
+
* @example
|
|
799
|
+
* ```ts
|
|
800
|
+
* const requestBody = this.grid.getAIRequest('Sort by Product Name ascending');
|
|
801
|
+
*
|
|
802
|
+
* // Send to your AI service
|
|
803
|
+
* this.http.post('https://your-ai-service.com/api', requestBody).subscribe(response => {
|
|
804
|
+
* this.grid.handleAIResponse(response);
|
|
805
|
+
* });
|
|
806
|
+
* ```
|
|
807
|
+
*/
|
|
808
|
+
getAIRequest(promptMessage: string): any;
|
|
809
|
+
/**
|
|
810
|
+
* Processes an AI service response and applies the commands to the Grid.
|
|
811
|
+
* Allows developers to handle their own AI service responses manually.
|
|
812
|
+
*
|
|
813
|
+
* @param response - The AI service response containing optional message and commands array.
|
|
814
|
+
*
|
|
815
|
+
* @example
|
|
816
|
+
* ```ts
|
|
817
|
+
* const response = {
|
|
818
|
+
* message: 'Applying sorting',
|
|
819
|
+
* commands: [
|
|
820
|
+
* { type: 'GridSort', sort: { field: 'ProductName', dir: 'asc' }, message: 'Sorted by Product Name' }
|
|
821
|
+
* ]
|
|
822
|
+
* };
|
|
823
|
+
* this.grid.handleAIResponse(response);
|
|
824
|
+
* ```
|
|
825
|
+
*/
|
|
826
|
+
handleAIResponse(response: any): void;
|
|
787
827
|
/**
|
|
788
828
|
* @hidden
|
|
789
829
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.3.0-develop.2",
|
|
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",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"package": {
|
|
74
74
|
"productName": "Kendo UI for Angular",
|
|
75
75
|
"productCode": "KENDOUIANGULAR",
|
|
76
|
-
"publishDate":
|
|
76
|
+
"publishDate": 1764927764,
|
|
77
77
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
78
78
|
}
|
|
79
79
|
},
|
|
@@ -84,34 +84,34 @@
|
|
|
84
84
|
"@angular/forms": "18 - 21",
|
|
85
85
|
"@angular/platform-browser": "18 - 21",
|
|
86
86
|
"@progress/kendo-data-query": "^1.0.0",
|
|
87
|
-
"@progress/kendo-drawing": "^1.
|
|
87
|
+
"@progress/kendo-drawing": "^1.23.1",
|
|
88
88
|
"@progress/kendo-licensing": "^1.7.0",
|
|
89
|
-
"@progress/kendo-angular-buttons": "21.
|
|
90
|
-
"@progress/kendo-angular-common": "21.
|
|
91
|
-
"@progress/kendo-angular-dateinputs": "21.
|
|
92
|
-
"@progress/kendo-angular-layout": "21.
|
|
93
|
-
"@progress/kendo-angular-navigation": "21.
|
|
94
|
-
"@progress/kendo-angular-dropdowns": "21.
|
|
95
|
-
"@progress/kendo-angular-excel-export": "21.
|
|
96
|
-
"@progress/kendo-angular-icons": "21.
|
|
97
|
-
"@progress/kendo-angular-indicators": "21.
|
|
98
|
-
"@progress/kendo-angular-inputs": "21.
|
|
99
|
-
"@progress/kendo-angular-conversational-ui": "21.
|
|
100
|
-
"@progress/kendo-angular-intl": "21.
|
|
101
|
-
"@progress/kendo-angular-l10n": "21.
|
|
102
|
-
"@progress/kendo-angular-label": "21.
|
|
103
|
-
"@progress/kendo-angular-menu": "21.
|
|
104
|
-
"@progress/kendo-angular-pager": "21.
|
|
105
|
-
"@progress/kendo-angular-pdf-export": "21.
|
|
106
|
-
"@progress/kendo-angular-popup": "21.
|
|
107
|
-
"@progress/kendo-angular-toolbar": "21.
|
|
108
|
-
"@progress/kendo-angular-upload": "21.
|
|
109
|
-
"@progress/kendo-angular-utils": "21.
|
|
89
|
+
"@progress/kendo-angular-buttons": "21.3.0-develop.2",
|
|
90
|
+
"@progress/kendo-angular-common": "21.3.0-develop.2",
|
|
91
|
+
"@progress/kendo-angular-dateinputs": "21.3.0-develop.2",
|
|
92
|
+
"@progress/kendo-angular-layout": "21.3.0-develop.2",
|
|
93
|
+
"@progress/kendo-angular-navigation": "21.3.0-develop.2",
|
|
94
|
+
"@progress/kendo-angular-dropdowns": "21.3.0-develop.2",
|
|
95
|
+
"@progress/kendo-angular-excel-export": "21.3.0-develop.2",
|
|
96
|
+
"@progress/kendo-angular-icons": "21.3.0-develop.2",
|
|
97
|
+
"@progress/kendo-angular-indicators": "21.3.0-develop.2",
|
|
98
|
+
"@progress/kendo-angular-inputs": "21.3.0-develop.2",
|
|
99
|
+
"@progress/kendo-angular-conversational-ui": "21.3.0-develop.2",
|
|
100
|
+
"@progress/kendo-angular-intl": "21.3.0-develop.2",
|
|
101
|
+
"@progress/kendo-angular-l10n": "21.3.0-develop.2",
|
|
102
|
+
"@progress/kendo-angular-label": "21.3.0-develop.2",
|
|
103
|
+
"@progress/kendo-angular-menu": "21.3.0-develop.2",
|
|
104
|
+
"@progress/kendo-angular-pager": "21.3.0-develop.2",
|
|
105
|
+
"@progress/kendo-angular-pdf-export": "21.3.0-develop.2",
|
|
106
|
+
"@progress/kendo-angular-popup": "21.3.0-develop.2",
|
|
107
|
+
"@progress/kendo-angular-toolbar": "21.3.0-develop.2",
|
|
108
|
+
"@progress/kendo-angular-upload": "21.3.0-develop.2",
|
|
109
|
+
"@progress/kendo-angular-utils": "21.3.0-develop.2",
|
|
110
110
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"tslib": "^2.3.1",
|
|
114
|
-
"@progress/kendo-angular-schematics": "21.
|
|
114
|
+
"@progress/kendo-angular-schematics": "21.3.0-develop.2",
|
|
115
115
|
"@progress/kendo-common": "^1.0.1",
|
|
116
116
|
"@progress/kendo-file-saver": "^1.0.0"
|
|
117
117
|
},
|
|
@@ -9,6 +9,7 @@ import { ContextService } from './../../../../common/provider.service';
|
|
|
9
9
|
import { ColumnInfoService } from './../../../../common/column-info.service';
|
|
10
10
|
import { AIAssistantToolbarDirective } from './ai-tool.directive';
|
|
11
11
|
import { GridAIAssistantPromptSettings, GridAIRequestOptions } from './models';
|
|
12
|
+
import { GridAIRequestResponseService } from './ai-request-response.service';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
/**
|
|
14
15
|
* @hidden
|
|
@@ -18,6 +19,7 @@ export declare class AiAssistantComponent implements OnDestroy, AfterViewInit {
|
|
|
18
19
|
private ctx;
|
|
19
20
|
private columnInfoService;
|
|
20
21
|
private zone;
|
|
22
|
+
private aiRequestResponseService;
|
|
21
23
|
aiPrompt: AIPromptComponent;
|
|
22
24
|
activeView: number;
|
|
23
25
|
requestUrl: string;
|
|
@@ -32,9 +34,8 @@ export declare class AiAssistantComponent implements OnDestroy, AfterViewInit {
|
|
|
32
34
|
private loadingOutput;
|
|
33
35
|
private columns;
|
|
34
36
|
private leafColumns;
|
|
35
|
-
private columnsTree;
|
|
36
37
|
private idCounter;
|
|
37
|
-
constructor(http: HttpClient, ctx: ContextService, columnInfoService: ColumnInfoService, zone: NgZone);
|
|
38
|
+
constructor(http: HttpClient, ctx: ContextService, columnInfoService: ColumnInfoService, zone: NgZone, aiRequestResponseService: GridAIRequestResponseService);
|
|
38
39
|
ngAfterViewInit(): void;
|
|
39
40
|
ngOnDestroy(): void;
|
|
40
41
|
message(message: string): string;
|
|
@@ -45,27 +46,6 @@ export declare class AiAssistantComponent implements OnDestroy, AfterViewInit {
|
|
|
45
46
|
private handleError;
|
|
46
47
|
private deleteLoadingOutput;
|
|
47
48
|
private unsubscribeCurrentRequest;
|
|
48
|
-
private processArrayResponse;
|
|
49
|
-
private processCommands;
|
|
50
|
-
private runExportWithFileName;
|
|
51
|
-
private processPageCommand;
|
|
52
|
-
private processPageSizeCommand;
|
|
53
|
-
private emitGridPageChange;
|
|
54
|
-
private ensurePageSizeOption;
|
|
55
|
-
private getCurrentPageSizeValue;
|
|
56
|
-
private getTotalItemsCount;
|
|
57
|
-
private getSelectionInstance;
|
|
58
|
-
private updateLastMessage;
|
|
59
|
-
private getHighlightItems;
|
|
60
|
-
private processSelectionResponse;
|
|
61
|
-
private mapHighlightItemsToSelection;
|
|
62
|
-
private applySelectionState;
|
|
63
|
-
private replaceQuotedColumnId;
|
|
64
|
-
private isColumnCommand;
|
|
65
|
-
private getColumnReplacement;
|
|
66
|
-
private processHighlightResponse;
|
|
67
|
-
private processFilterResponse;
|
|
68
|
-
private changeColumnPosition;
|
|
69
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<AiAssistantComponent, never>;
|
|
70
50
|
static ɵcmp: i0.ɵɵComponentDeclaration<AiAssistantComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
71
51
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { NgZone } from '@angular/core';
|
|
6
|
+
import { ColumnInfoService } from './../../../../common/column-info.service';
|
|
7
|
+
import { ContextService } from './../../../../common/provider.service';
|
|
8
|
+
import { GridAICommand } from './models';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*
|
|
13
|
+
* Service that builds AI requests and processes AI responses for the Grid.
|
|
14
|
+
* Used internally by both the Grid component and the AI Assistant tool.
|
|
15
|
+
*/
|
|
16
|
+
export declare class GridAIRequestResponseService {
|
|
17
|
+
private ctx;
|
|
18
|
+
private columnInfoService;
|
|
19
|
+
private zone;
|
|
20
|
+
constructor(ctx: ContextService, columnInfoService: ColumnInfoService, zone: NgZone);
|
|
21
|
+
/**
|
|
22
|
+
* Builds the request body for the AI service based on the Grid's column structure.
|
|
23
|
+
* Returns a column descriptor tree that includes column metadata for the AI service.
|
|
24
|
+
*/
|
|
25
|
+
buildRequestBody(promptMessage: string, role?: string): any;
|
|
26
|
+
/**
|
|
27
|
+
* Builds a nested column descriptor tree based on the Grid's column structure.
|
|
28
|
+
* Includes root columns and their nested children (for ColumnGroup and SpanColumn).
|
|
29
|
+
*/
|
|
30
|
+
private buildColumnDescriptors;
|
|
31
|
+
/**
|
|
32
|
+
* Processes AI response commands and applies them to the Grid.
|
|
33
|
+
* Returns an array of display messages for each command.
|
|
34
|
+
*/
|
|
35
|
+
processCommands(commands: GridAICommand[], columns: {
|
|
36
|
+
field: string;
|
|
37
|
+
}[], leafColumns: any[]): string[];
|
|
38
|
+
private executeCommands;
|
|
39
|
+
private processArrayResponse;
|
|
40
|
+
private runExportWithFileName;
|
|
41
|
+
private processPageCommand;
|
|
42
|
+
private processPageSizeCommand;
|
|
43
|
+
private emitGridPageChange;
|
|
44
|
+
private ensurePageSizeOption;
|
|
45
|
+
private getCurrentPageSizeValue;
|
|
46
|
+
private getTotalItemsCount;
|
|
47
|
+
private getSelectionInstance;
|
|
48
|
+
private updateLastMessage;
|
|
49
|
+
private isColumnCommand;
|
|
50
|
+
private getColumnReplacement;
|
|
51
|
+
private replaceQuotedColumnId;
|
|
52
|
+
private getHighlightItems;
|
|
53
|
+
private processSelectionResponse;
|
|
54
|
+
private mapHighlightItemsToSelection;
|
|
55
|
+
private applySelectionState;
|
|
56
|
+
private processHighlightResponse;
|
|
57
|
+
private processFilterResponse;
|
|
58
|
+
private changeColumnPosition;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GridAIRequestResponseService, never>;
|
|
60
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GridAIRequestResponseService>;
|
|
61
|
+
}
|
|
@@ -9,19 +9,19 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
9
9
|
function default_1(options) {
|
|
10
10
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
|
|
11
11
|
// peer deps of the dropdowns
|
|
12
|
-
'@progress/kendo-angular-treeview': '21.
|
|
13
|
-
'@progress/kendo-angular-navigation': '21.
|
|
12
|
+
'@progress/kendo-angular-treeview': '21.3.0-develop.2',
|
|
13
|
+
'@progress/kendo-angular-navigation': '21.3.0-develop.2',
|
|
14
14
|
// peer dependency of kendo-angular-inputs
|
|
15
|
-
'@progress/kendo-angular-dialog': '21.
|
|
15
|
+
'@progress/kendo-angular-dialog': '21.3.0-develop.2',
|
|
16
16
|
// peer dependency of kendo-angular-icons
|
|
17
17
|
'@progress/kendo-svg-icons': '^4.0.0',
|
|
18
18
|
// peer dependency of kendo-angular-layout
|
|
19
|
-
'@progress/kendo-angular-progressbar': '21.
|
|
19
|
+
'@progress/kendo-angular-progressbar': '21.3.0-develop.2',
|
|
20
20
|
// transitive peer dependencies from toolbar
|
|
21
|
-
'@progress/kendo-angular-indicators': '21.
|
|
21
|
+
'@progress/kendo-angular-indicators': '21.3.0-develop.2',
|
|
22
22
|
// transitive peer dependencies from conversational-ui
|
|
23
|
-
'@progress/kendo-angular-menu': '21.
|
|
24
|
-
'@progress/kendo-angular-upload': '21.
|
|
23
|
+
'@progress/kendo-angular-menu': '21.3.0-develop.2',
|
|
24
|
+
'@progress/kendo-angular-upload': '21.3.0-develop.2'
|
|
25
25
|
} });
|
|
26
26
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
27
27
|
}
|