@jahia/javascript-modules-library 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +35 -0
- package/core/index.js +1 -0
- package/core/server/components/AbsoluteArea.js +1 -0
- package/core/server/components/AddContentButtons.js +1 -0
- package/core/server/components/AddResources.js +1 -0
- package/core/server/components/Area.js +1 -0
- package/core/server/components/index.js +1 -0
- package/core/server/components/render/HydrateInBrowser.js +1 -0
- package/core/server/components/render/Render.js +1 -0
- package/core/server/components/render/RenderInBrowser.js +1 -0
- package/core/server/components/render/index.js +1 -0
- package/core/server/components/render/internal/InBrowser.js +1 -0
- package/core/server/framework/defineJahiaComponent.js +1 -0
- package/core/server/framework/index.js +1 -0
- package/core/server/framework/register.js +1 -0
- package/core/server/hooks/index.js +1 -0
- package/core/server/hooks/useGQLQuery.js +1 -0
- package/core/server/hooks/useJCRQuery.js +1 -0
- package/core/server/hooks/useServerContext.js +1 -0
- package/core/server/hooks/useUrlBuilder.js +1 -0
- package/core/server/index.js +1 -0
- package/core/server/utils/index.js +1 -0
- package/core/server/utils/jcr/getChildNodes.js +1 -0
- package/core/server/utils/jcr/getNodeFromPathOrId.js +1 -0
- package/core/server/utils/jcr/getNodeProps.js +1 -0
- package/core/server/utils/jcr/getNodesByJCRQuery.js +1 -0
- package/core/server/utils/jcr/index.js +1 -0
- package/core/server/utils/urlBuilder/index.js +1 -0
- package/core/server/utils/urlBuilder/urlBuilder.js +1 -0
- package/index.js +1 -0
- package/nav/index.js +1 -0
- package/nav/server/index.js +1 -0
- package/nav/server/navBuilder/index.js +1 -0
- package/nav/server/navBuilder/navBuilder.js +24 -0
- package/package.json +60 -0
- package/types/@jahia/javascript-modules-library-private.d.ts +60 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/server/components/AbsoluteArea.d.ts +29 -0
- package/types/core/server/components/AddContentButtons.d.ts +13 -0
- package/types/core/server/components/AddResources.d.ts +31 -0
- package/types/core/server/components/Area.d.ts +27 -0
- package/types/core/server/components/index.d.ts +5 -0
- package/types/core/server/components/render/HydrateInBrowser.d.ts +13 -0
- package/types/core/server/components/render/Render.d.ts +23 -0
- package/types/core/server/components/render/RenderInBrowser.d.ts +13 -0
- package/types/core/server/components/render/index.d.ts +3 -0
- package/types/core/server/components/render/internal/InBrowser.d.ts +8 -0
- package/types/core/server/framework/defineJahiaComponent.d.ts +41 -0
- package/types/core/server/framework/index.d.ts +2 -0
- package/types/core/server/framework/register.d.ts +7 -0
- package/types/core/server/hooks/index.d.ts +4 -0
- package/types/core/server/hooks/useGQLQuery.d.ts +5 -0
- package/types/core/server/hooks/useJCRQuery.d.ts +3 -0
- package/types/core/server/hooks/useServerContext.d.ts +14 -0
- package/types/core/server/hooks/useUrlBuilder.d.ts +31 -0
- package/types/core/server/index.d.ts +4 -0
- package/types/core/server/utils/index.d.ts +2 -0
- package/types/core/server/utils/jcr/getChildNodes.d.ts +9 -0
- package/types/core/server/utils/jcr/getNodeFromPathOrId.d.ts +12 -0
- package/types/core/server/utils/jcr/getNodeProps.d.ts +7 -0
- package/types/core/server/utils/jcr/getNodesByJCRQuery.d.ts +9 -0
- package/types/core/server/utils/jcr/index.d.ts +4 -0
- package/types/core/server/utils/urlBuilder/index.d.ts +1 -0
- package/types/core/server/utils/urlBuilder/urlBuilder.d.ts +27 -0
- package/types/globals.d.ts +11 -0
- package/types/index.d.ts +19 -0
- package/types/java.io.d.ts +694 -0
- package/types/java.net.d.ts +190 -0
- package/types/java.security.d.ts +27 -0
- package/types/java.util.d.ts +1536 -0
- package/types/javax.jcr.d.ts +1250 -0
- package/types/javax.servlet.d.ts +426 -0
- package/types/javax.servlet.http.d.ts +1431 -0
- package/types/nav/index.d.ts +1 -0
- package/types/nav/server/index.d.ts +1 -0
- package/types/nav/server/navBuilder/index.d.ts +1 -0
- package/types/nav/server/navBuilder/navBuilder.d.ts +78 -0
- package/types/org.jahia.modules.npm.modules.engine.js.server.d.ts +292 -0
- package/types/org.jahia.services.content.d.ts +1463 -0
- package/types/org.jahia.services.content.decorator.d.ts +92 -0
- package/types/org.jahia.services.query.d.ts +35 -0
- package/types/org.jahia.services.render.d.ts +168 -0
- package/types/org.jahia.services.usermanager.d.ts +85 -0
- package/types/org.osgi.framework.d.ts +1004 -0
- package/types/server.d.ts +27 -0
- package/types/servercontext.d.ts +29 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
declare module 'java.net' {
|
|
2
|
+
/**
|
|
3
|
+
* Class `URL` represents a Uniform Resource
|
|
4
|
+
* Locator, a pointer to a "resource" on the World
|
|
5
|
+
* Wide Web. A resource can be something as simple as a file or a
|
|
6
|
+
* directory, or it can be a reference to a more complicated object,
|
|
7
|
+
* such as a query to a database or to a search engine. More
|
|
8
|
+
* information on the types of URLs and their formats can be found at:
|
|
9
|
+
*
|
|
10
|
+
* Types of URL
|
|
11
|
+
*
|
|
12
|
+
* In general, a URL can be broken into several parts. Consider the
|
|
13
|
+
* following example:
|
|
14
|
+
* * http://www.example.com/docs/resource1.html
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* The URL above indicates that the protocol to use is
|
|
18
|
+
* `http` (HyperText Transfer Protocol) and that the
|
|
19
|
+
* information resides on a host machine named
|
|
20
|
+
* `www.example.com`. The information on that host
|
|
21
|
+
* machine is named `/docs/resource1.html`. The exact
|
|
22
|
+
* meaning of this name on the host machine is both protocol
|
|
23
|
+
* dependent and host dependent. The information normally resides in
|
|
24
|
+
* a file, but it could be generated on the fly. This component of
|
|
25
|
+
* the URL is called the path component.
|
|
26
|
+
*
|
|
27
|
+
* A URL can optionally specify a "port", which is the
|
|
28
|
+
* port number to which the TCP connection is made on the remote host
|
|
29
|
+
* machine. If the port is not specified, the default port for
|
|
30
|
+
* the protocol is used instead. For example, the default port for
|
|
31
|
+
* `http` is `80`. An alternative port could be
|
|
32
|
+
* specified as:
|
|
33
|
+
* * http://www.example.com:1080/docs/resource1.html
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* The syntax of `URL` is defined by RFC 2396: Uniform
|
|
37
|
+
* Resource Identifiers (URI): Generic Syntax, amended by RFC 2732: Format for
|
|
38
|
+
* Literal IPv6 Addresses in URLs. The Literal IPv6 address format
|
|
39
|
+
* also supports scope_ids. The syntax and usage of scope_ids is described
|
|
40
|
+
* here.
|
|
41
|
+
*
|
|
42
|
+
* A URL may have appended to it a "fragment", also known
|
|
43
|
+
* as a "ref" or a "reference". The fragment is indicated by the sharp
|
|
44
|
+
* sign character "#" followed by more characters. For example,
|
|
45
|
+
* * http://java.sun.com/index.html#chapter1
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* This fragment is not technically part of the URL. Rather, it
|
|
49
|
+
* indicates that after the specified resource is retrieved, the
|
|
50
|
+
* application is specifically interested in that part of the
|
|
51
|
+
* document that has the tag `chapter1` attached to it. The
|
|
52
|
+
* meaning of a tag is resource specific.
|
|
53
|
+
*
|
|
54
|
+
* An application can also specify a "relative URL",
|
|
55
|
+
* which contains only enough information to reach the resource
|
|
56
|
+
* relative to another URL. Relative URLs are frequently used within
|
|
57
|
+
* HTML pages. For example, if the contents of the URL:
|
|
58
|
+
* * http://java.sun.com/index.html
|
|
59
|
+
*
|
|
60
|
+
* contained within it the relative URL:
|
|
61
|
+
* * FAQ.html
|
|
62
|
+
*
|
|
63
|
+
* it would be a shorthand for:
|
|
64
|
+
* * http://java.sun.com/FAQ.html
|
|
65
|
+
*
|
|
66
|
+
*
|
|
67
|
+
* The relative URL need not specify all the components of a URL. If
|
|
68
|
+
* the protocol, host name, or port number is missing, the value is
|
|
69
|
+
* inherited from the fully specified URL. The file component must be
|
|
70
|
+
* specified. The optional fragment is not inherited.
|
|
71
|
+
*
|
|
72
|
+
* The URL class does not itself encode or decode any URL components
|
|
73
|
+
* according to the escaping mechanism defined in RFC2396. It is the
|
|
74
|
+
* responsibility of the caller to encode any fields, which need to be
|
|
75
|
+
* escaped prior to calling URL, and also to decode any escaped fields,
|
|
76
|
+
* that are returned from URL. Furthermore, because URL has no knowledge
|
|
77
|
+
* of URL escaping, it does not recognise equivalence between the encoded
|
|
78
|
+
* or decoded form of the same URL. For example, the two URLs:
|
|
79
|
+
* http://foo.com/hello world/ and http://foo.com/hello%20world
|
|
80
|
+
* would be considered not equal to each other.
|
|
81
|
+
*
|
|
82
|
+
* Note, the {@link java.net.URI} class does perform escaping of its
|
|
83
|
+
* component fields in certain circumstances. The recommended way
|
|
84
|
+
* to manage the encoding and decoding of URLs is to use {@link java.net.URI},
|
|
85
|
+
* and to convert between these two classes using {@link #toURI()} and
|
|
86
|
+
* {@link URI#toURL()}.
|
|
87
|
+
*
|
|
88
|
+
* The {@link URLEncoder} and {@link URLDecoder} classes can also be
|
|
89
|
+
* used, but only for HTML form encoding, which is not the same
|
|
90
|
+
* as the encoding scheme defined in RFC2396.
|
|
91
|
+
*
|
|
92
|
+
* @author James Gosling
|
|
93
|
+
* @since 1.0
|
|
94
|
+
*/
|
|
95
|
+
export class URL {
|
|
96
|
+
/**
|
|
97
|
+
* Gets the query part of this `URL`.
|
|
98
|
+
*
|
|
99
|
+
* @return the query part of this `URL`,
|
|
100
|
+
* or null if one does not exist
|
|
101
|
+
* @since 1.3
|
|
102
|
+
*/
|
|
103
|
+
getQuery(): string;
|
|
104
|
+
/**
|
|
105
|
+
* Gets the path part of this `URL`.
|
|
106
|
+
*
|
|
107
|
+
* @return the path part of this `URL`, or an
|
|
108
|
+
* empty string if one does not exist
|
|
109
|
+
* @since 1.3
|
|
110
|
+
*/
|
|
111
|
+
getPath(): string;
|
|
112
|
+
/**
|
|
113
|
+
* Gets the userInfo part of this `URL`.
|
|
114
|
+
*
|
|
115
|
+
* @return the userInfo part of this `URL`, or
|
|
116
|
+
* null if one does not exist
|
|
117
|
+
* @since 1.3
|
|
118
|
+
*/
|
|
119
|
+
getUserInfo(): string;
|
|
120
|
+
/**
|
|
121
|
+
* Gets the authority part of this `URL`.
|
|
122
|
+
*
|
|
123
|
+
* @return the authority part of this `URL`
|
|
124
|
+
* @since 1.3
|
|
125
|
+
*/
|
|
126
|
+
getAuthority(): string;
|
|
127
|
+
/**
|
|
128
|
+
* Gets the port number of this `URL`.
|
|
129
|
+
*
|
|
130
|
+
* @return the port number, or -1 if the port is not set
|
|
131
|
+
*/
|
|
132
|
+
getPort(): number;
|
|
133
|
+
/**
|
|
134
|
+
* Gets the default port number of the protocol associated
|
|
135
|
+
* with this `URL`. If the URL scheme or the URLStreamHandler
|
|
136
|
+
* for the URL do not define a default port number,
|
|
137
|
+
* then -1 is returned.
|
|
138
|
+
*
|
|
139
|
+
* @return the port number
|
|
140
|
+
* @since 1.4
|
|
141
|
+
*/
|
|
142
|
+
getDefaultPort(): number;
|
|
143
|
+
/**
|
|
144
|
+
* Gets the protocol name of this `URL`.
|
|
145
|
+
*
|
|
146
|
+
* @return the protocol of this `URL`.
|
|
147
|
+
*/
|
|
148
|
+
getProtocol(): string;
|
|
149
|
+
/**
|
|
150
|
+
* Gets the host name of this `URL`, if applicable.
|
|
151
|
+
* The format of the host conforms to RFC 2732, i.e. for a
|
|
152
|
+
* literal IPv6 address, this method will return the IPv6 address
|
|
153
|
+
* enclosed in square brackets (`'['` and `']'`).
|
|
154
|
+
*
|
|
155
|
+
* @return the host name of this `URL`.
|
|
156
|
+
*/
|
|
157
|
+
getHost(): string;
|
|
158
|
+
/**
|
|
159
|
+
* Gets the file name of this `URL`.
|
|
160
|
+
* The returned file portion will be
|
|
161
|
+
* the same as getPath(), plus the concatenation of
|
|
162
|
+
* the value of getQuery(), if any. If there is
|
|
163
|
+
* no query portion, this method and getPath() will
|
|
164
|
+
* return identical results.
|
|
165
|
+
*
|
|
166
|
+
* @return the file name of this `URL`,
|
|
167
|
+
* or an empty string if one does not exist
|
|
168
|
+
*/
|
|
169
|
+
getFile(): string;
|
|
170
|
+
/**
|
|
171
|
+
* Gets the anchor (also known as the "reference") of this
|
|
172
|
+
* `URL`.
|
|
173
|
+
*
|
|
174
|
+
* @return the anchor (also known as the "reference") of this
|
|
175
|
+
* `URL`, or null if one does not exist
|
|
176
|
+
*/
|
|
177
|
+
getRef(): string;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the contents of this URL. This method is a shorthand for:
|
|
180
|
+
* * openConnection().getContent()
|
|
181
|
+
*
|
|
182
|
+
*
|
|
183
|
+
* @return the contents of this URL.
|
|
184
|
+
* @exception IOException if an I/O exception occurs.
|
|
185
|
+
* @see java.net.URLConnection#getContent()
|
|
186
|
+
*/
|
|
187
|
+
getContent(): any;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare module 'java.security' {
|
|
2
|
+
/**
|
|
3
|
+
* This interface represents the abstract notion of a principal, which
|
|
4
|
+
* can be used to represent any entity, such as an individual, a
|
|
5
|
+
* corporation, and a login id.
|
|
6
|
+
*
|
|
7
|
+
* @see java.security.cert.X509Certificate
|
|
8
|
+
*
|
|
9
|
+
* @author Li Gong
|
|
10
|
+
* @since 1.1
|
|
11
|
+
*/
|
|
12
|
+
export class Principal {
|
|
13
|
+
/**
|
|
14
|
+
* Returns a string representation of this principal.
|
|
15
|
+
*
|
|
16
|
+
* @return a string representation of this principal.
|
|
17
|
+
*/
|
|
18
|
+
toString(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the name of this principal.
|
|
21
|
+
*
|
|
22
|
+
* @return the name of this principal.
|
|
23
|
+
*/
|
|
24
|
+
getName(): string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|