-
Notifications
You must be signed in to change notification settings - Fork 2
/
mxUrlConverter.d.ts
100 lines (88 loc) · 1.84 KB
/
mxUrlConverter.d.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
/**
* Copyright (c) 2006-2015, JGraph Ltd
* Copyright (c) 2006-2015, Gaudenz Alder
*/
/**
*
* Class: mxUrlConverter
*
* Converts relative and absolute URLs to absolute URLs with protocol and domain.
*/
declare namespace mxgraph {
export class mxUrlConverter {
constructor();
/**
* Variable: enabled
*
* Specifies if the converter is enabled. Default is true.
*/
enabled: boolean;
/**
* Variable: baseUrl
*
* Specifies the base URL to be used as a prefix for relative URLs.
*/
baseUrl: string;
/**
* Variable: baseDomain
*
* Specifies the base domain to be used as a prefix for absolute URLs.
*/
baseDomain: string;
/**
* Function: updateBaseUrl
*
* Private helper function to update the base URL.
*/
updateBaseUrl(): void;
/**
* Function: isEnabled
*
* Returns <enabled>.
*/
isEnabled(): boolean;
/**
* Function: setEnabled
*
* Sets <enabled>.
*/
setEnabled(value: boolean): void;
/**
* Function: getBaseUrl
*
* Returns <baseUrl>.
*/
getBaseUrl(): string;
/**
* Function: setBaseUrl
*
* Sets <baseUrl>.
*/
setBaseUrl(value: string): void;
/**
* Function: getBaseDomain
*
* Returns <baseDomain>.
*/
getBaseDomain(): string;
/**
* Function: setBaseDomain
*
* Sets <baseDomain>.
*/
setBaseDomain(value: string): void;
/**
* Function: isRelativeUrl
*
* Returns true if the given URL is relative.
*/
isRelativeUrl(url: string): boolean;
/**
* Function: convert
*
* Converts the given URL to an absolute URL with protol and domain.
* Relative URLs are first converted to absolute URLs.
*/
convert(url: string): string;
}
}