@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
62 lines (61 loc) • 2.63 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { NgZone } from '@angular/core';
import { ColumnInfoService } from './../../../../common/column-info.service';
import { ContextService } from './../../../../common/provider.service';
import { GridAICommand } from './models';
import * as i0 from "@angular/core";
/**
* @hidden
*
* Service that builds AI requests and processes AI responses for the Grid.
* Used internally by both the Grid component and the AI Assistant tool.
*/
export declare class GridAIRequestResponseService {
private ctx;
private columnInfoService;
private zone;
constructor(ctx: ContextService, columnInfoService: ColumnInfoService, zone: NgZone);
/**
* Builds the request body for the AI service based on the Grid's column structure.
* Returns a column descriptor tree that includes column metadata for the AI service.
*/
buildRequestBody(promptMessage: string, role?: string): any;
/**
* Builds a nested column descriptor tree based on the Grid's column structure.
* Includes root columns and their nested children (for ColumnGroup and SpanColumn).
*/
private buildColumnDescriptors;
/**
* Processes AI response commands and applies them to the Grid.
* Returns an array of display messages for each command.
*/
processCommands(commands: GridAICommand[], columns: {
field: string;
}[], leafColumns: any[]): string[];
private executeCommands;
private processArrayResponse;
private runExportWithFileName;
private processPageCommand;
private processPageSizeCommand;
private emitGridPageChange;
private ensurePageSizeOption;
private getCurrentPageSizeValue;
private getTotalItemsCount;
private getSelectionInstance;
private updateLastMessage;
private isColumnCommand;
private getColumnReplacement;
private replaceQuotedColumnId;
private getHighlightItems;
private processSelectionResponse;
private mapHighlightItemsToSelection;
private applySelectionState;
private processHighlightResponse;
private processFilterResponse;
private changeColumnPosition;
static ɵfac: i0.ɵɵFactoryDeclaration<GridAIRequestResponseService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<GridAIRequestResponseService>;
}