Interfaces
Import these from @grafloria/angular.
Interfaces
ClosestHit
tsinterface ClosestHit
Properties
| Name | Type | Default | Description |
|---|---|---|---|
t | number | Fraction along the path, 0-1. | |
point | Point | ||
distance | number |
GrafloriaCollabOptions
The uniform collab contract every Grafloria wrapper shares.
tsinterface GrafloriaCollabOptions
Properties
| Name | Type | Default | Description |
|---|---|---|---|
transport | SyncTransport | ||
actor | string | ||
presence? | boolean | BindPresenceOptions | Live cursors + remote selection outlines. true for defaults. |
GrafloriaLayoutRequest
Request shape for the declarative [layout] input / applyLayout().
tsinterface GrafloriaLayoutRequest
Properties
| Name | Type | Default | Description |
|---|---|---|---|
name | string | Registry layout name: 'elk' | 'dagre' | 'force' | 'tree' | 'grid' | 'auto' | … | |
options? | Record<string, unknown> |
GrafloriaWidgetTemplateContext
Template context for <ng-template grafloriaWidget> widget templates.
tsinterface GrafloriaWidgetTemplateContext
Properties
| Name | Type | Default | Description |
|---|---|---|---|
$implicit | DashboardWidgetSpec | ||
data | Record<string, unknown> |
InsertNodeOnEdgeOptions
tsinterface InsertNodeOnEdgeOptions
Properties
| Name | Type | Default | Description |
|---|---|---|---|
nodeType? | string | Type of the node dropped onto the edge (default 'basic'). | |
size? | { width: number; height: number } | Size of the inserted node (default 100×50). | |
data? | Record<string, any> | Seed data/label for the new node. | |
label? | string | Label written to the node's label metadata (what most shapes render). | |
configure? | (node: NodeModel) => void | Hook to customise the node before it is committed (set style, ports, …). |
LinkActionContext
Card B — what a link-toolbar button is handed.
Unlike a node action (which only needs the node), an edge action needs to know WHERE on the edge it was invoked: "insert node here" is meaningless without the split point.
tsinterface LinkActionContext
Properties
| Name | Type | Default | Description |
|---|---|---|---|
link | LinkModel | ||
engine | DiagramEngine | ||
t | number | Fraction along the RENDERED path where the toolbar sits (0-1). | |
point | Point | World-space point at t — i.e. exactly under the button the user pressed. | |
tangent? | Point | Unit direction of travel at t; decides which sides an inserted node connects on. |
LinkToolbarAction
Mirrors node-toolbar's ToolbarAction, retyped around LinkActionContext. (Same shape, same rendering contract, same keyboard handling.)
tsinterface LinkToolbarAction
Properties
| Name | Type | Default | Description |
|---|---|---|---|
id | string | ||
label | string | ||
icon? | string | ||
tooltip? | string | ||
disabled? | boolean | ||
hidden? | boolean | ||
visible? | (ctx: LinkActionContext) => boolean | ||
onClick | (ctx: LinkActionContext) => void | ||
group? | string | ||
shortcut? | string |
NodeToolbarConfig
Comprehensive configuration object for NodeToolbar
tsinterface NodeToolbarConfig
Properties
| Name | Type | Default | Description |
|---|---|---|---|
position? | ToolbarPosition | ||
alignment? | ToolbarAlignment | ||
offset? | number | ||
actions? | ToolbarAction[] | ||
actionGroups? | ToolbarActionGroup[] | ||
template? | TemplateRef<any> | ||
style? | ToolbarStyleConfig | ||
animation? | ToolbarAnimationConfig | ||
behavior? | ToolbarBehaviorConfig | ||
ariaLabel? | string | ||
positioningStrategy? | PositioningStrategy |
Point
tsinterface Point
Properties
| Name | Type | Default | Description |
|---|---|---|---|
x | number | ||
y | number |
PropertyPanelChangeEvent
Property panel change event (UI-level event).
tsinterface PropertyPanelChangeEvent
Properties
| Name | Type | Default | Description |
|---|---|---|---|
nodes | PropertyDiagramNode[] | ||
property | string | ||
value | any |
SaveEvent
Save event.
tsinterface SaveEvent
Properties
| Name | Type | Default | Description |
|---|---|---|---|
nodes | PropertyDiagramNode[] | ||
changes | Record<string, any> |
ToolbarAction
tsinterface ToolbarAction
Properties
| Name | Type | Default | Description |
|---|---|---|---|
id | string | ||
label | string | ||
icon? | string | ||
tooltip? | string | ||
disabled? | boolean | ||
hidden? | boolean | ||
visible? | (node: NodeModel) => boolean | ||
onClick | (node: NodeModel) => void | ||
group? | string | ||
shortcut? | string |
ToolbarActionGroup
Toolbar Action Group Organizes actions into logical groups with visual separators
tsinterface ToolbarActionGroup
Properties
| Name | Type | Default | Description |
|---|---|---|---|
id | string | ||
label? | string | ||
actions | ToolbarAction[] | ||
separator? | 'before' | 'after' | 'both' | 'none' |
ToolbarAnimationConfig
tsinterface ToolbarAnimationConfig
Properties
| Name | Type | Default | Description |
|---|---|---|---|
enabled? | boolean | ||
duration? | string | ||
easing? | string | ||
preset? | AnimationPreset |
ToolbarBehaviorConfig
tsinterface ToolbarBehaviorConfig
Properties
| Name | Type | Default | Description |
|---|---|---|---|
autoHide? | boolean | ||
closeOnClickOutside? | boolean | ||
followNode? | boolean | ||
enableKeyboardNav? | boolean | ||
hideOnMultiSelect? | boolean | ||
showAs? | 'toolbar' | 'contextMenu' | 'both' | ||
contextMenuTrigger? | 'rightClick' | 'longPress' | 'both' |
ToolbarConfig
tsinterface ToolbarConfig
Properties
| Name | Type | Default | Description |
|---|---|---|---|
position? | ToolbarPosition | ||
alignment? | ToolbarAlignment | ||
actions? | ToolbarAction[] | ||
template? | TemplateRef<any> | ||
offset? | number | ||
canvasElement? | HTMLElement | ||
viewport? | { x: number; y: number; width: number; height: number } | ||
zoom? | number | ||
behavior? | ToolbarBehaviorConfig | ||
style? | ToolbarStyleConfig |
ToolbarStyleConfig
tsinterface ToolbarStyleConfig
Properties
| Name | Type | Default | Description |
|---|---|---|---|
backgroundColor? | string | ||
borderColor? | string | ||
borderRadius? | string | ||
boxShadow? | string | ||
padding? | string | ||
zIndex? | number | ||
transitionDuration? | string |
ValidationErrorEvent
Validation error event.
tsinterface ValidationErrorEvent
Properties
| Name | Type | Default | Description |
|---|---|---|---|
property | string | ||
errors | string[] |
Was this page helpful?