UNPKG

2.49 kBTypeScriptView Raw
1/**
2 * Checks if eventDefinition of the given element matches with semantic type.
3 *
4 * @param event
5 * @param eventDefinitionType
6 *
7 * @return
8 */
9export function isTypedEvent(event: any, eventDefinitionType: string): boolean;
10
11/**
12 * Check if element is a throw event.
13 *
14 * @param event
15 *
16 * @return
17 */
18export function isThrowEvent(event: any): boolean;
19
20/**
21 * Check if element is a throw event.
22 *
23 * @param element
24 *
25 * @return
26 */
27export function isCollection(element: any): boolean;
28
29/**
30 * @param element
31 * @param defaultColor
32 * @param overrideColor
33 *
34 * @return
35 */
36export function getFillColor(element: any, defaultColor?: string, overrideColor?: string): string;
37
38/**
39 * @param element
40 * @param defaultColor
41 * @param overrideColor
42 *
43 * @return
44 */
45export function getStrokeColor(element: any, defaultColor?: string, overrideColor?: string): string;
46
47/**
48 * @param element
49 * @param defaultColor
50 * @param defaultStrokeColor
51 * @param overrideColor
52 *
53 * @return
54 */
55export function getLabelColor(element: any, defaultColor?: string, defaultStrokeColor?: string, overrideColor?: string): string;
56
57/**
58 * @param shape
59 *
60 * @return path
61 */
62export function getCirclePath(shape: any): string;
63
64/**
65 * @param shape
66 * @param borderRadius
67 *
68 * @return path
69 */
70export function getRoundRectPath(shape: any, borderRadius?: number): string;
71
72/**
73 * @param shape
74 *
75 * @return path
76 */
77export function getDiamondPath(shape: any): string;
78
79/**
80 * @param shape
81 *
82 * @return path
83 */
84export function getRectPath(shape: any): string;
85
86/**
87 * Get width and height from element or overrides.
88 *
89 * @param bounds
90 * @param overrides
91 *
92 * @returns
93 */
94export function getBounds(bounds: Dimensions | Rect | ShapeLike, overrides?: any): Dimensions;
95
96/**
97 * Get width from element or overrides.
98 *
99 * @param bounds
100 * @param overrides
101 *
102 * @returns
103 */
104export function getWidth(bounds: Dimensions | Rect | ShapeLike, overrides?: any): number;
105
106/**
107 * Get height from element or overrides.
108 *
109 * @param bounds
110 * @param overrides
111 *
112 * @returns
113 */
114export function getHeight(bounds: Dimensions | Rect | ShapeLike, overrides?: any): number;
115
116export const black: string;
117export const white: string;
118export type ModdleElement = any;
119export type Element = any;
120export type ShapeLike = any;
121type Dimensions = import('diagram-js/lib/util/Types').Dimensions;
122type Rect = import('diagram-js/lib/util/Types').Rect;
123export { getDi, getBusinessObject as getSemantic } from "../util/ModelUtil";