@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
178 lines (177 loc) • 5.22 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { SpeechToTextButtonSettings } from "@progress/kendo-angular-buttons";
import { GridAIRequestData, GridAIRequestOptions } from "../../ai-assistant/models";
import { HttpErrorResponse, HttpResponse } from "@angular/common/http";
import { PreventableEvent } from "@progress/kendo-angular-common";
import { CompositeFilterDescriptor, FilterDescriptor } from "@progress/kendo-data-query";
/**
* @hidden
*/
export interface SmartBoxSearchSettings {
/**
* Sets the settings for the history queries.
*/
history?: boolean | SmartBoxHistorySettings;
/**
* The placeholder of the input in Search mode.
*/
placeholder?: string;
/**
* Determines the delay in milliseconds between the user typing a new search value and the component emitting the **search** event. Default is `300`.
*/
delay?: number;
/**
* Specifies whether the mode is enabled.
*
* @default true
*/
enabled?: boolean;
/**
* Defines a list of fields which will be included in the search. If values for the property are not defined the grid will search in all column fields.
*/
fields?: Array<string>;
}
/**
* @hidden
*/
export interface SmartBoxSemanticSearchSettings {
/**
* Sets the settings for the history queries.
*/
history?: boolean | SmartBoxHistorySettings;
/**
* The placeholder of the input in Semantic Search mode.
*/
placeholder?: string;
/**
* Determines the delay in milliseconds between the user typing a new search value and the component emitting the **semanticSearch** event. Default is `500`.
*/
delay?: number;
/**
* Specifies whether the mode is enabled.
*
* @default true
*/
enabled?: boolean;
}
/**
* @hidden
*/
export interface SmartBoxAIAssistantSettings {
/**
* Sets the settings for the history queries.
*/
history?: boolean | SmartBoxHistorySettings;
/**
* The placeholder of the input in Semantic Search mode.
*/
placeholder?: string;
/**
* Specifies whether the mode is enabled.
*
* @default true
*/
enabled?: boolean;
/**
* Defines a list of prompts to be suggested.
*/
promptSuggestions?: Array<string>;
/**
* The URL to which the SmartBox tool sends the AI request. When you set this property, the SmartBox tool sends and handles an HTTP request to the provided URL. You can handle the promptRequest event to modify the request options before the tool sends it. When you do not set this property, the SmartBox tool does not send an HTTP request. You should handle the **promptRequest** event to send and handle a custom HTTP request.
*/
requestUrl?: string;
/**
* Configures the request options that the SmartBox tool sends with the AI request.
*
* @default { headers: new HttpHeaders({ 'Content-Type': 'application/json' }), role: 'user', method: 'POST', responseType: 'json', withCredentials: false }
*/
requestOptions?: GridAIRequestOptions;
/**
* Sets the settings for the Speech to Text button.
*/
speechToTextButton?: boolean | SpeechToTextButtonSettings;
}
/**
* @hidden
*/
export interface SmartBoxHistorySettings {
/**
* Specifies the maximum number of history queries that will be rendered. Default is `5`.
*/
size?: number;
/**
* Specifies the date format that is used to display the history queries timestamps.
*/
timestampFormat?: string;
}
/**
* @hidden
*/
export interface SmartBoxRequestEvent {
requestData: GridAIRequestData;
}
/**
* @hidden
*/
export declare class SmartBoxResponseErrorEvent extends PreventableEvent {
/**
* The HTTP error response from the AI service.
*/
error: HttpErrorResponse;
constructor(error: HttpErrorResponse);
}
/**
* @hidden
*/
export declare class SmartBoxResponseSuccessEvent extends PreventableEvent {
/**
* The HTTP response from the AI service.
*/
response: HttpResponse<any>;
constructor(response: HttpResponse<any>);
}
/**
* @hidden
*/
export declare class SmartBoxSearchEvent extends PreventableEvent {
/**
* The user's input value.
*/
searchValue: string;
/**
* The input-based filters that will be applied to the Grid.
*/
filters: Array<FilterDescriptor> | Array<CompositeFilterDescriptor>;
/**
* The logic applied to the filters.
*/
logic: 'or' | 'and';
/**
* @hidden
*/
constructor();
}
/**
* @hidden
*/
export interface SmartBoxSemanticSearchEvent {
/**
* The user's input value.
*/
searchValue: string;
}
/**
* @hidden
*/
export interface HistoryItem {
text: string;
timestamp: Date;
format: string;
}
/**
* @hidden
*/
export type SmartBoxSize = 'small' | 'medium' | 'large';