@progress/kendo-angular-diagrams
Version:
Kendo UI Angular diagrams component
209 lines (208 loc) • 6 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 { ShapeDefaultsBase, ConnectionDefaultsBase, ConnectionOptionsBase, ShapeOptionsBase, NavigationOptions } from '@progress/kendo-diagram-common';
/**
* Defines the navigation configuration options for the `Diagram`.
*/
export interface DiagramNavigationOptions extends Pick<NavigationOptions, 'smallStep' | 'largeStep'> {
/**
* Controls whether navigation is enabled.
*/
enabled?: boolean;
}
/**
* Defines the tooltip configuration for shapes and connections.
* Controls the visibility, content, and styling of tooltips.
*/
export interface TooltipOptions {
/**
* Controls whether the tooltip displays when you hover over the item.
*/
visible?: boolean;
/**
* Sets custom CSS classes for the Tooltip wrapper element. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
*/
cssClass?: any;
}
/**
* Defines the configuration options for diagram shapes.
* Extends the base shape options and adds tooltip support.
*/
export interface ShapeOptions extends Omit<ShapeOptionsBase, ''> {
/**
* Configures the tooltip that displays when you hover over the shape.
*/
tooltip?: TooltipOptions;
/**
* Sets the text content displayed in the tooltip.
*/
tooltipText?: string;
}
/**
* Defines the configuration options for diagram connections.
* Extends the base connection options and adds tooltip support.
*/
export interface ConnectionOptions extends Omit<ConnectionOptionsBase, ''> {
/**
* Configures the tooltip that displays when you hover over the connection.
*/
tooltip?: TooltipOptions;
/**
* Sets the text content displayed in the tooltip.
*/
tooltipText?: string;
}
/**
* Defines the default configuration options for all connections in the `Diagram`.
* These settings apply to connections unless overridden by individual connection options.
*/
export interface ConnectionDefaults extends Omit<ConnectionDefaultsBase, ''> {
/**
* Configures the default tooltip settings for all connections.
*/
tooltip?: TooltipOptions;
}
/**
* Defines the default configuration options for all shapes in the `Diagram`.
* These settings apply to shapes unless overridden by individual shape options.
*/
export interface ShapeDefaults extends Omit<ShapeDefaultsBase, ''> {
/**
* Configures the default tooltip settings for all shapes.
*/
tooltip?: TooltipOptions;
}
/**
* Defines the field mapping configuration for shapes data binding.
* Maps source object properties to `Diagram` shape properties.
*/
export interface ShapeModelFields {
/**
* The field that contains the unique identifier of the shape.
*/
id?: string;
/**
* The field that contains the connectors configuration.
*/
connectors?: string;
/**
* The field that contains the connector defaults configuration.
*/
connectorDefaults?: string;
/**
* The field that contains the content configuration.
*/
content?: string;
/**
* The field that contains the editable configuration.
*/
editable?: string;
/**
* The field that contains the fill configuration.
*/
fill?: string;
/**
* The field that contains the height value.
*/
height?: string;
/**
* The field that contains the hover configuration.
*/
hover?: string;
/**
* The field that contains the minimum height value.
*/
minHeight?: string;
/**
* The field that contains the minimum width value.
*/
minWidth?: string;
/**
* The field that contains the path configuration.
*/
path?: string;
/**
* The field that contains the rotation configuration.
*/
rotation?: string;
/**
* The field that contains the selectable configuration.
*/
selectable?: string;
/**
* The field that contains the source configuration.
*/
source?: string;
/**
* The field that contains the stroke configuration.
*/
stroke?: string;
/**
* The field that contains the type configuration.
*/
type?: string;
/**
* The field that contains the visual configuration.
*/
visual?: string;
/**
* The field that contains the width value.
*/
width?: string;
/**
* The field that contains the x coordinate.
*/
x?: string;
/**
* The field that contains the y coordinate.
*/
y?: string;
/**
* The field that contains the corner radius value.
*/
cornerRadius?: string;
/**
* The field that contains the center configuration.
*/
center?: string;
/**
* The field that contains the radius value.
*/
radius?: string;
/**
* The field that contains the data item reference.
*/
dataItem?: string;
/**
* The field that contains the tooltip text.
*/
tooltipText?: string;
}
/**
* Defines the field mapping configuration for connections data binding.
* Maps source object properties to `Diagram` connection properties.
*/
export interface ConnectionModelFields {
/**
* The field that contains the source shape identifier.
*/
from?: string;
/**
* The field that contains the target shape identifier.
*/
to?: string;
/**
* The field that contains the connection points.
*/
points?: string;
/**
* The field that contains the data item reference.
*/
dataItem?: string;
/**
* The field that contains the tooltip text.
*/
tooltipText?: string;
}