UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

60 lines (59 loc) 2.21 kB
/** * This module includes a Select Message dialog. * * To be able to use these controls the CanKingDataProvider component must be present in the * component tree above your component. Normally the CanKingDataProvider is added * at the root of the component tree. * * @packageDocumentation */ import { JSX } from 'react'; import { FrameDefinition } from '../models'; /** * Properties of the SelectMessageDialog React component. */ export interface SelectMessageDialogProps { /** * Optional title of the parent dialog to be shown in the title bar as a breadcrumb. */ parentDialogTitle?: string; /** * Optional node identifier to limit the databases to those available on the specified node. * If not specified, all databases available in the system will be shown. */ nodeIdentifier?: string; /** * The source identifier that will be used to filter messages in the select dialog. * Leave undefined if no filtering should be done. */ sourceIdFilter?: string; /** * If true, the dialog is open. */ open: boolean; /** * Callback that is called when a message is selected. * The selected message and source identifier are passed as parameters. */ onSelect: (message: FrameDefinition, sourceId: string) => void; /** * Callback that is called when the dialog is closed. */ onClose: () => void; /** * Whether the dialog should be modal or not. Default is false. */ modal?: boolean; } /** * A react component to be used for showing a select database message dialog. * * The dialog will show a tree view of all messages in the system, organized by source and database. The user can * select a message, which will trigger the onSelect callback with the selected message and source identifier. * * The dialog also includes a search field to filter messages by name. * @param props - Component properties. * @returns The SelectMessageDialog React component. */ declare function SelectMessageDialog({ parentDialogTitle, open, onSelect, nodeIdentifier, sourceIdFilter, onClose, modal, }: SelectMessageDialogProps): JSX.Element; export default SelectMessageDialog;