UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

164 lines (163 loc) 4.25 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { SVGIcon } from '@progress/kendo-svg-icons'; import { SmartBoxMode } from '../interfaces/index.js'; /** * Represents a history item for the list data. * * @hidden */ export interface SmartBoxListHistoryItem { /** * The text content of the history item. */ text: string; /** * The timestamp when the history item was created. */ timestamp: Date; } /** * Represents the history settings for the list data. * * @hidden */ export interface SmartBoxListHistorySettings { /** * The format string for displaying timestamps. */ timestampFormat?: string; } /** * Represents a search mode list item. * * @hidden */ export interface SmartBoxSearchListItem { /** * The display text for the list item. */ text: string; /** * The description text for the list item. */ description: string; /** * Indicates whether the item is currently selected. */ selected: boolean; /** * The mode this item represents. */ mode: SmartBoxMode; } /** * Represents a general list data item (for suggestions and history). * * @hidden */ export interface SmartBoxListDataItem { /** * The unique identifier for the item. */ id: string; /** * The display text for the item. */ text: string; /** * The description text for the item (e.g., formatted timestamp). */ description?: string; /** * The group name this item belongs to. */ group: string; /** * The SVG icon for the group header. */ groupSvgIcon?: SVGIcon; /** * Indicates whether this is a history item. */ isHistoryItem?: boolean; /** * The timestamp for history items. */ timestamp?: Date; } /** * Represents the props for the useSmartBoxListData hook. * * @hidden */ export interface UseSmartBoxListDataProps { /** * The currently selected view mode. */ selectedView: SmartBoxMode | null; /** * Indicates whether search mode is enabled. */ searchModeEnabled?: boolean; /** * Indicates whether semantic search mode is enabled. */ semanticSearchModeEnabled?: boolean; /** * The list of prompt suggestions for AI assistant mode. */ promptSuggestions: string[]; /** * The current history items for the selected mode. */ currentHistory: SmartBoxListHistoryItem[]; /** * The current history settings for the selected mode. */ currentHistorySettings: SmartBoxListHistorySettings | null; } /** * Represents the return value of the useSmartBoxListData hook. * * @hidden */ export interface UseSmartBoxListDataResult { /** * The list data for search mode selection (search vs semantic search). */ searchListData: SmartBoxSearchListItem[]; /** * The list data for AI assistant mode (suggestions and history). */ aiAssistantListData: SmartBoxListDataItem[]; /** * The list data for search history. */ searchHistoryListData: SmartBoxListDataItem[]; /** * The localized label for suggested prompts. */ suggestedPromptsLabel: string; /** * The localized label for history items. */ historyLabel: string; } /** * Hook to compute list data for SmartBox popup content. * * This hook generates the list data for the popup based on the selected mode, * including search mode selection items, prompt suggestions, and history items. * * @param props - The hook properties. * @returns An object containing computed list data arrays and labels. * * @hidden */ export declare function useSmartBoxListData({ selectedView, searchModeEnabled, semanticSearchModeEnabled, promptSuggestions, currentHistory, currentHistorySettings }: UseSmartBoxListDataProps): UseSmartBoxListDataResult;