2024-01-30 14:46:14 +01:00
|
|
|
export type { BlockDiagramConfig as BlockConfig } from '../../config.type.js';
|
2023-08-28 12:51:49 +02:00
|
|
|
|
|
|
|
export type BlockType =
|
2024-01-04 14:15:30 +01:00
|
|
|
| 'na'
|
2023-09-01 16:22:23 +02:00
|
|
|
| 'column-setting'
|
2024-01-04 14:15:30 +01:00
|
|
|
| 'edge'
|
2023-08-28 12:51:49 +02:00
|
|
|
| 'round'
|
2023-10-26 22:01:44 +02:00
|
|
|
| 'block_arrow'
|
|
|
|
| 'space'
|
2023-08-28 12:51:49 +02:00
|
|
|
| 'square'
|
|
|
|
| 'diamond'
|
|
|
|
| 'hexagon'
|
|
|
|
| 'odd'
|
|
|
|
| 'lean_right'
|
|
|
|
| 'lean_left'
|
|
|
|
| 'trapezoid'
|
|
|
|
| 'inv_trapezoid'
|
2023-10-26 22:02:16 +02:00
|
|
|
| 'rect_left_inv_arrow'
|
2023-08-28 12:51:49 +02:00
|
|
|
| 'odd_right'
|
|
|
|
| 'circle'
|
|
|
|
| 'ellipse'
|
|
|
|
| 'stadium'
|
|
|
|
| 'subroutine'
|
|
|
|
| 'cylinder'
|
|
|
|
| 'group'
|
2023-09-01 14:06:13 +02:00
|
|
|
| 'doublecircle'
|
2024-01-05 15:13:15 +01:00
|
|
|
| 'classDef'
|
|
|
|
| 'applyClass'
|
2024-01-05 20:56:57 +01:00
|
|
|
| 'applyStyles'
|
2023-09-01 16:22:23 +02:00
|
|
|
| 'composite';
|
2023-08-28 12:51:49 +02:00
|
|
|
|
|
|
|
export interface Block {
|
2024-01-04 14:15:30 +01:00
|
|
|
// When the block have the type edge, the start and end are the id of the source and target blocks
|
|
|
|
start?: string;
|
|
|
|
end?: string;
|
|
|
|
arrowTypeEnd?: string;
|
|
|
|
arrowTypeStart?: string;
|
2023-10-26 22:02:16 +02:00
|
|
|
width?: number;
|
2023-09-01 14:06:13 +02:00
|
|
|
id: string;
|
2023-08-28 12:51:49 +02:00
|
|
|
label?: string;
|
2024-01-04 14:15:30 +01:00
|
|
|
intersect?: any;
|
2023-08-28 12:51:49 +02:00
|
|
|
parent?: Block;
|
|
|
|
type?: BlockType;
|
2023-09-01 14:06:13 +02:00
|
|
|
children: Block[];
|
2023-09-05 11:13:27 +02:00
|
|
|
size?: {
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
};
|
|
|
|
node?: any;
|
2023-08-28 12:51:49 +02:00
|
|
|
columns?: number; // | TBlockColumnsDefaultValue;
|
2023-10-15 22:21:25 +02:00
|
|
|
classes?: string[];
|
2023-10-26 22:01:44 +02:00
|
|
|
directions?: string[];
|
2024-01-05 15:13:15 +01:00
|
|
|
css?: string;
|
|
|
|
styleClass?: string;
|
2024-01-05 20:56:57 +01:00
|
|
|
styles?: string[];
|
2024-01-18 15:31:14 +01:00
|
|
|
stylesStr?: string;
|
2024-01-30 16:05:16 +01:00
|
|
|
widthInColumns?: number;
|
2023-08-28 12:51:49 +02:00
|
|
|
}
|
2024-01-05 15:13:15 +01:00
|
|
|
|
|
|
|
export interface ClassDef {
|
|
|
|
id: string;
|
|
|
|
textStyles: string[];
|
|
|
|
styles: string[];
|
|
|
|
}
|
2024-01-30 17:48:46 +01:00
|
|
|
|
|
|
|
export type Direction = 'up' | 'down' | 'left' | 'right' | 'x' | 'y';
|