summaryrefslogtreecommitdiff
path: root/themes/blowfish/assets/lib/mermaid/diagrams/class/classDb.d.ts
blob: 16a80bd861e047ca066e835448c1aa4269b52145 (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import type { ClassRelation, ClassNode, ClassNote, ClassMap, NamespaceMap, NamespaceNode } from './classTypes.js';
export declare const setClassLabel: (_id: string, label: string) => void;
/**
 * Function called by parser when a node definition has been found.
 *
 * @param id - Id of the class to add
 * @public
 */
export declare const addClass: (_id: string) => void;
/**
 * Function to lookup domId from id in the graph definition.
 *
 * @param id - class ID to lookup
 * @public
 */
export declare const lookUpDomId: (_id: string) => string;
export declare const clear: () => void;
export declare const getClass: (id: string) => ClassNode;
export declare const getClasses: () => ClassMap;
export declare const getRelations: () => ClassRelation[];
export declare const getNotes: () => ClassNote[];
export declare const addRelation: (relation: ClassRelation) => void;
/**
 * Adds an annotation to the specified class Annotations mark special properties of the given type
 * (like 'interface' or 'service')
 *
 * @param className - The class name
 * @param annotation - The name of the annotation without any brackets
 * @public
 */
export declare const addAnnotation: (className: string, annotation: string) => void;
/**
 * Adds a member to the specified class
 *
 * @param className - The class name
 * @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
 *   treated as an annotation If the member is ending with a closing bracket ) it is treated as a
 *   method Otherwise the member will be treated as a normal property
 * @public
 */
export declare const addMember: (className: string, member: string) => void;
export declare const addMembers: (className: string, members: string[]) => void;
export declare const addNote: (text: string, className: string) => void;
export declare const cleanupLabel: (label: string) => string;
/**
 * Called by parser when assigning cssClass to a class
 *
 * @param ids - Comma separated list of ids
 * @param className - Class to add
 */
export declare const setCssClass: (ids: string, className: string) => void;
export declare const getTooltip: (id: string, namespace?: string) => string | undefined;
/**
 * Called by parser when a link is found. Adds the URL to the vertex data.
 *
 * @param ids - Comma separated list of ids
 * @param linkStr - URL to create a link for
 * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
 */
export declare const setLink: (ids: string, linkStr: string, target: string) => void;
/**
 * Called by parser when a click definition is found. Registers an event handler.
 *
 * @param ids - Comma separated list of ids
 * @param functionName - Function to be called on click
 * @param functionArgs - Function args the function should be called with
 */
export declare const setClickEvent: (ids: string, functionName: string, functionArgs: string) => void;
export declare const bindFunctions: (element: Element) => void;
export declare const lineType: {
    LINE: number;
    DOTTED_LINE: number;
};
export declare const relationType: {
    AGGREGATION: number;
    EXTENSION: number;
    COMPOSITION: number;
    DEPENDENCY: number;
    LOLLIPOP: number;
};
/**
 * Function called by parser when a namespace definition has been found.
 *
 * @param id - Id of the namespace to add
 * @public
 */
export declare const addNamespace: (id: string) => void;
/**
 * Function called by parser when a namespace definition has been found.
 *
 * @param id - Id of the namespace to add
 * @param classNames - Ids of the class to add
 * @public
 */
export declare const addClassesToNamespace: (id: string, classNames: string[]) => void;
export declare const setCssStyle: (id: string, styles: string[]) => void;
declare const _default: {
    setAccTitle: (txt: string) => void;
    getAccTitle: () => string;
    getAccDescription: () => string;
    setAccDescription: (txt: string) => void;
    getConfig: () => import("../../config.type.js").ClassDiagramConfig | undefined;
    addClass: (_id: string) => void;
    bindFunctions: (element: Element) => void;
    clear: () => void;
    getClass: (id: string) => ClassNode;
    getClasses: () => ClassMap;
    getNotes: () => ClassNote[];
    addAnnotation: (className: string, annotation: string) => void;
    addNote: (text: string, className: string) => void;
    getRelations: () => ClassRelation[];
    addRelation: (relation: ClassRelation) => void;
    getDirection: () => string;
    setDirection: (dir: string) => void;
    addMember: (className: string, member: string) => void;
    addMembers: (className: string, members: string[]) => void;
    cleanupLabel: (label: string) => string;
    lineType: {
        LINE: number;
        DOTTED_LINE: number;
    };
    relationType: {
        AGGREGATION: number;
        EXTENSION: number;
        COMPOSITION: number;
        DEPENDENCY: number;
        LOLLIPOP: number;
    };
    setClickEvent: (ids: string, functionName: string, functionArgs: string) => void;
    setCssClass: (ids: string, className: string) => void;
    setLink: (ids: string, linkStr: string, target: string) => void;
    getTooltip: (id: string, namespace?: string | undefined) => string | undefined;
    setTooltip: (ids: string, tooltip?: string | undefined) => void;
    lookUpDomId: (_id: string) => string;
    setDiagramTitle: (txt: string) => void;
    getDiagramTitle: () => string;
    setClassLabel: (_id: string, label: string) => void;
    addNamespace: (id: string) => void;
    addClassesToNamespace: (id: string, classNames: string[]) => void;
    getNamespace: (name: string) => NamespaceNode;
    getNamespaces: () => NamespaceMap;
    setCssStyle: (id: string, styles: string[]) => void;
};
export default _default;