/
types.ts
112 lines (103 loc) · 3 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/**
* Copyright 2021 Bonitasoft S.A.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BpmnElementKind } from '../../model/bpmn/internal/api';
/**
* @category Custom Behavior
*/
export interface BpmnSemantic {
id: string;
name: string;
/** `true` when relates to a BPMN Shape, `false` when relates to a BPMN Edge. */
isShape: boolean;
kind: BpmnElementKind;
}
/**
* @category Custom Behavior
*/
export interface BpmnElement {
bpmnSemantic: BpmnSemantic;
htmlElement: HTMLElement;
}
/**
* @category Overlays
*/
export type OverlayShapePosition = 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center' | 'middle-left' | 'middle-right';
/**
* @category Overlays
*/
export type OverlayEdgePosition = 'start' | 'middle' | 'end';
/**
* @category Overlays
*/
export type OverlayPosition = OverlayShapePosition | OverlayEdgePosition;
/**
* @category Overlays
*/
export interface OverlayStyle {
font?: OverlayFont;
fill?: OverlayFill;
stroke?: OverlayStroke;
}
/**
* The font family is {@link StyleDefault.DEFAULT_FONT_FAMILY}.
* @category Overlays
*/
export interface OverlayFont {
/** @default {@link StyleDefault.DEFAULT_OVERLAY_FONT_COLOR} */
color?: string;
/** @default {@link StyleDefault.DEFAULT_OVERLAY_FONT_SIZE} */
size?: number;
}
/**
* @category Overlays
*/
export interface OverlayFill {
/** @default {@link StyleDefault.DEFAULT_OVERLAY_FILL_COLOR} */
color?: string;
/**
* A number between `0` (transparent) and `100` (opaque).
*
* <b>IMPORTANT</b>: this is currently not considered by the default Badge Overlay. See {@link https://github.com/process-analytics/bpmn-visualization-js/issues/1234 issue 1234}
* @default {@link StyleDefault.DEFAULT_OVERLAY_FILL_OPACITY}
*/
opacity?: number;
}
/**
* @category Overlays
*/
export interface OverlayStroke {
/**
* If you don't want to display a stroke, you can set the color to
* * `transparent`
* * the same value as for the fill color. This increases the padding/margin.
*
* @default {@link StyleDefault.DEFAULT_OVERLAY_STROKE_COLOR}
* */
color?: string;
/**
* <b>IMPORTANT</b>: this is currently not considered by the default Badge Overlay. See {@link https://github.com/process-analytics/bpmn-visualization-js/issues/1234 issue 1234}
* @default {@link StyleDefault.DEFAULT_OVERLAY_STROKE_WIDTH}
*/
width?: number;
}
/**
* @category Overlays
*/
export interface Overlay {
position: OverlayPosition;
label?: string;
style?: OverlayStyle;
}