@@ -0,0 +1,6 | |||
|
1 | syntax: glob | |
|
2 | .gradle/ | |
|
3 | .settings/ | |
|
4 | .project | |
|
5 | dojo-typings/build/ | |
|
6 | node_modules/ |
@@ -0,0 +1,59 | |||
|
1 | import org.gradle.internal.os.OperatingSystem; | |
|
2 | ||
|
3 | plugins { | |
|
4 | id "org.implab.gradle-typescript" version "1.3.4" | |
|
5 | } | |
|
6 | ||
|
7 | def isWindows = OperatingSystem.current().isWindows(); | |
|
8 | ||
|
9 | npm { | |
|
10 | npmCmd = isWindows ? 'npm.cmd' : 'npm'; | |
|
11 | } | |
|
12 | ||
|
13 | sources { | |
|
14 | main { me -> | |
|
15 | ts { | |
|
16 | srcDir me.typings | |
|
17 | } | |
|
18 | } | |
|
19 | } | |
|
20 | ||
|
21 | typescript { | |
|
22 | compilerOptions { | |
|
23 | lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable"] | |
|
24 | declaration = true | |
|
25 | types = ["requirejs"] | |
|
26 | module = "amd" | |
|
27 | it.target = "es5" | |
|
28 | moduleResolution = "node" | |
|
29 | // traceResolution = true | |
|
30 | ||
|
31 | } | |
|
32 | ||
|
33 | // Π΄Π»Ρ Π²Π°ΡΠΈΠ°Π½ΡΠ° Ρ Π»ΠΎΠΊΠ°Π»ΡΠ½ΡΠΌΠΈ tsc, eslint, tslint | |
|
34 | tscCmd = "${projectDir}/node_modules/.bin/" + (isWindows ? 'tsc.cmd' : 'tsc') | |
|
35 | esLintCmd = "${projectDir}/node_modules/.bin/" + (isWindows ? 'eslint.cmd' : 'eslint') | |
|
36 | tsLintCmd = "${projectDir}/node_modules/.bin/" + (isWindows ? 'tslint.cmd' : 'tslint') | |
|
37 | } | |
|
38 | ||
|
39 | configureTsTest { | |
|
40 | compilerOptions { | |
|
41 | types = ["../main/typings/dojo/modules","../main/typings/dijit/modules"]; | |
|
42 | } | |
|
43 | } | |
|
44 | ||
|
45 | npmPackMeta { | |
|
46 | meta { | |
|
47 | name = "@$npmScope/$project.name" | |
|
48 | } | |
|
49 | } | |
|
50 | ||
|
51 | task printVersion { | |
|
52 | doLast { | |
|
53 | println "packageName: ${npmPackMeta.metadata.get().name}"; | |
|
54 | println "version: $version"; | |
|
55 | println "target: $typescript.compilerOptions.target"; | |
|
56 | println "module: $typescript.compilerOptions.module"; | |
|
57 | println "symbols: $symbols"; | |
|
58 | } | |
|
59 | } No newline at end of file |
This diff has been collapsed as it changes many lines, (2496 lines changed) Show them Hide them | |||
@@ -0,0 +1,2496 | |||
|
1 | { | |
|
2 | "name": "dojo-typings", | |
|
3 | "version": "0.0.1", | |
|
4 | "lockfileVersion": 2, | |
|
5 | "requires": true, | |
|
6 | "packages": { | |
|
7 | "": { | |
|
8 | "version": "0.0.1", | |
|
9 | "license": "MIT", | |
|
10 | "devDependencies": { | |
|
11 | "@types/requirejs": "latest", | |
|
12 | "eslint": "7.7.0", | |
|
13 | "tslint": "6.1.3", | |
|
14 | "typescript": "^4.4.2" | |
|
15 | } | |
|
16 | }, | |
|
17 | "node_modules/@babel/code-frame": { | |
|
18 | "version": "7.14.5", | |
|
19 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", | |
|
20 | "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", | |
|
21 | "dev": true, | |
|
22 | "dependencies": { | |
|
23 | "@babel/highlight": "^7.14.5" | |
|
24 | }, | |
|
25 | "engines": { | |
|
26 | "node": ">=6.9.0" | |
|
27 | } | |
|
28 | }, | |
|
29 | "node_modules/@babel/helper-validator-identifier": { | |
|
30 | "version": "7.14.9", | |
|
31 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", | |
|
32 | "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", | |
|
33 | "dev": true, | |
|
34 | "engines": { | |
|
35 | "node": ">=6.9.0" | |
|
36 | } | |
|
37 | }, | |
|
38 | "node_modules/@babel/highlight": { | |
|
39 | "version": "7.14.5", | |
|
40 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", | |
|
41 | "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", | |
|
42 | "dev": true, | |
|
43 | "dependencies": { | |
|
44 | "@babel/helper-validator-identifier": "^7.14.5", | |
|
45 | "chalk": "^2.0.0", | |
|
46 | "js-tokens": "^4.0.0" | |
|
47 | }, | |
|
48 | "engines": { | |
|
49 | "node": ">=6.9.0" | |
|
50 | } | |
|
51 | }, | |
|
52 | "node_modules/@babel/highlight/node_modules/ansi-styles": { | |
|
53 | "version": "3.2.1", | |
|
54 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | |
|
55 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | |
|
56 | "dev": true, | |
|
57 | "dependencies": { | |
|
58 | "color-convert": "^1.9.0" | |
|
59 | }, | |
|
60 | "engines": { | |
|
61 | "node": ">=4" | |
|
62 | } | |
|
63 | }, | |
|
64 | "node_modules/@babel/highlight/node_modules/chalk": { | |
|
65 | "version": "2.4.2", | |
|
66 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", | |
|
67 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", | |
|
68 | "dev": true, | |
|
69 | "dependencies": { | |
|
70 | "ansi-styles": "^3.2.1", | |
|
71 | "escape-string-regexp": "^1.0.5", | |
|
72 | "supports-color": "^5.3.0" | |
|
73 | }, | |
|
74 | "engines": { | |
|
75 | "node": ">=4" | |
|
76 | } | |
|
77 | }, | |
|
78 | "node_modules/@babel/highlight/node_modules/color-convert": { | |
|
79 | "version": "1.9.3", | |
|
80 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | |
|
81 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | |
|
82 | "dev": true, | |
|
83 | "dependencies": { | |
|
84 | "color-name": "1.1.3" | |
|
85 | } | |
|
86 | }, | |
|
87 | "node_modules/@babel/highlight/node_modules/color-name": { | |
|
88 | "version": "1.1.3", | |
|
89 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | |
|
90 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | |
|
91 | "dev": true | |
|
92 | }, | |
|
93 | "node_modules/@babel/highlight/node_modules/has-flag": { | |
|
94 | "version": "3.0.0", | |
|
95 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | |
|
96 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", | |
|
97 | "dev": true, | |
|
98 | "engines": { | |
|
99 | "node": ">=4" | |
|
100 | } | |
|
101 | }, | |
|
102 | "node_modules/@babel/highlight/node_modules/supports-color": { | |
|
103 | "version": "5.5.0", | |
|
104 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | |
|
105 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", | |
|
106 | "dev": true, | |
|
107 | "dependencies": { | |
|
108 | "has-flag": "^3.0.0" | |
|
109 | }, | |
|
110 | "engines": { | |
|
111 | "node": ">=4" | |
|
112 | } | |
|
113 | }, | |
|
114 | "node_modules/@types/requirejs": { | |
|
115 | "version": "2.1.33", | |
|
116 | "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.33.tgz", | |
|
117 | "integrity": "sha512-1ZUCLJY3BztlR+HZWpoOkUt/n0YES/TuiBsW5dnk6OXUJSjbYfRJyiSf1yyyWMNWeX1RR7mTso2piU/dP1hgsw==", | |
|
118 | "dev": true | |
|
119 | }, | |
|
120 | "node_modules/acorn": { | |
|
121 | "version": "7.4.1", | |
|
122 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", | |
|
123 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", | |
|
124 | "dev": true, | |
|
125 | "bin": { | |
|
126 | "acorn": "bin/acorn" | |
|
127 | }, | |
|
128 | "engines": { | |
|
129 | "node": ">=0.4.0" | |
|
130 | } | |
|
131 | }, | |
|
132 | "node_modules/acorn-jsx": { | |
|
133 | "version": "5.3.2", | |
|
134 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", | |
|
135 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", | |
|
136 | "dev": true, | |
|
137 | "peerDependencies": { | |
|
138 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" | |
|
139 | } | |
|
140 | }, | |
|
141 | "node_modules/ajv": { | |
|
142 | "version": "6.12.6", | |
|
143 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", | |
|
144 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", | |
|
145 | "dev": true, | |
|
146 | "dependencies": { | |
|
147 | "fast-deep-equal": "^3.1.1", | |
|
148 | "fast-json-stable-stringify": "^2.0.0", | |
|
149 | "json-schema-traverse": "^0.4.1", | |
|
150 | "uri-js": "^4.2.2" | |
|
151 | }, | |
|
152 | "funding": { | |
|
153 | "type": "github", | |
|
154 | "url": "https://github.com/sponsors/epoberezkin" | |
|
155 | } | |
|
156 | }, | |
|
157 | "node_modules/ansi-colors": { | |
|
158 | "version": "4.1.1", | |
|
159 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", | |
|
160 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", | |
|
161 | "dev": true, | |
|
162 | "engines": { | |
|
163 | "node": ">=6" | |
|
164 | } | |
|
165 | }, | |
|
166 | "node_modules/ansi-regex": { | |
|
167 | "version": "5.0.0", | |
|
168 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", | |
|
169 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", | |
|
170 | "dev": true, | |
|
171 | "engines": { | |
|
172 | "node": ">=8" | |
|
173 | } | |
|
174 | }, | |
|
175 | "node_modules/ansi-styles": { | |
|
176 | "version": "4.3.0", | |
|
177 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", | |
|
178 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", | |
|
179 | "dev": true, | |
|
180 | "dependencies": { | |
|
181 | "color-convert": "^2.0.1" | |
|
182 | }, | |
|
183 | "engines": { | |
|
184 | "node": ">=8" | |
|
185 | }, | |
|
186 | "funding": { | |
|
187 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" | |
|
188 | } | |
|
189 | }, | |
|
190 | "node_modules/argparse": { | |
|
191 | "version": "1.0.10", | |
|
192 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", | |
|
193 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", | |
|
194 | "dev": true, | |
|
195 | "dependencies": { | |
|
196 | "sprintf-js": "~1.0.2" | |
|
197 | } | |
|
198 | }, | |
|
199 | "node_modules/astral-regex": { | |
|
200 | "version": "1.0.0", | |
|
201 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", | |
|
202 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", | |
|
203 | "dev": true, | |
|
204 | "engines": { | |
|
205 | "node": ">=4" | |
|
206 | } | |
|
207 | }, | |
|
208 | "node_modules/balanced-match": { | |
|
209 | "version": "1.0.2", | |
|
210 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", | |
|
211 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", | |
|
212 | "dev": true | |
|
213 | }, | |
|
214 | "node_modules/brace-expansion": { | |
|
215 | "version": "1.1.11", | |
|
216 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | |
|
217 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | |
|
218 | "dev": true, | |
|
219 | "dependencies": { | |
|
220 | "balanced-match": "^1.0.0", | |
|
221 | "concat-map": "0.0.1" | |
|
222 | } | |
|
223 | }, | |
|
224 | "node_modules/builtin-modules": { | |
|
225 | "version": "1.1.1", | |
|
226 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", | |
|
227 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", | |
|
228 | "dev": true, | |
|
229 | "engines": { | |
|
230 | "node": ">=0.10.0" | |
|
231 | } | |
|
232 | }, | |
|
233 | "node_modules/callsites": { | |
|
234 | "version": "3.1.0", | |
|
235 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", | |
|
236 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", | |
|
237 | "dev": true, | |
|
238 | "engines": { | |
|
239 | "node": ">=6" | |
|
240 | } | |
|
241 | }, | |
|
242 | "node_modules/chalk": { | |
|
243 | "version": "4.1.2", | |
|
244 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", | |
|
245 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", | |
|
246 | "dev": true, | |
|
247 | "dependencies": { | |
|
248 | "ansi-styles": "^4.1.0", | |
|
249 | "supports-color": "^7.1.0" | |
|
250 | }, | |
|
251 | "engines": { | |
|
252 | "node": ">=10" | |
|
253 | }, | |
|
254 | "funding": { | |
|
255 | "url": "https://github.com/chalk/chalk?sponsor=1" | |
|
256 | } | |
|
257 | }, | |
|
258 | "node_modules/color-convert": { | |
|
259 | "version": "2.0.1", | |
|
260 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", | |
|
261 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", | |
|
262 | "dev": true, | |
|
263 | "dependencies": { | |
|
264 | "color-name": "~1.1.4" | |
|
265 | }, | |
|
266 | "engines": { | |
|
267 | "node": ">=7.0.0" | |
|
268 | } | |
|
269 | }, | |
|
270 | "node_modules/color-name": { | |
|
271 | "version": "1.1.4", | |
|
272 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", | |
|
273 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", | |
|
274 | "dev": true | |
|
275 | }, | |
|
276 | "node_modules/commander": { | |
|
277 | "version": "2.20.3", | |
|
278 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", | |
|
279 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", | |
|
280 | "dev": true | |
|
281 | }, | |
|
282 | "node_modules/concat-map": { | |
|
283 | "version": "0.0.1", | |
|
284 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", | |
|
285 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", | |
|
286 | "dev": true | |
|
287 | }, | |
|
288 | "node_modules/cross-spawn": { | |
|
289 | "version": "7.0.3", | |
|
290 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", | |
|
291 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", | |
|
292 | "dev": true, | |
|
293 | "dependencies": { | |
|
294 | "path-key": "^3.1.0", | |
|
295 | "shebang-command": "^2.0.0", | |
|
296 | "which": "^2.0.1" | |
|
297 | }, | |
|
298 | "engines": { | |
|
299 | "node": ">= 8" | |
|
300 | } | |
|
301 | }, | |
|
302 | "node_modules/debug": { | |
|
303 | "version": "4.3.2", | |
|
304 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", | |
|
305 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", | |
|
306 | "dev": true, | |
|
307 | "dependencies": { | |
|
308 | "ms": "2.1.2" | |
|
309 | }, | |
|
310 | "engines": { | |
|
311 | "node": ">=6.0" | |
|
312 | }, | |
|
313 | "peerDependenciesMeta": { | |
|
314 | "supports-color": { | |
|
315 | "optional": true | |
|
316 | } | |
|
317 | } | |
|
318 | }, | |
|
319 | "node_modules/deep-is": { | |
|
320 | "version": "0.1.3", | |
|
321 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", | |
|
322 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", | |
|
323 | "dev": true | |
|
324 | }, | |
|
325 | "node_modules/diff": { | |
|
326 | "version": "4.0.2", | |
|
327 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", | |
|
328 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", | |
|
329 | "dev": true, | |
|
330 | "engines": { | |
|
331 | "node": ">=0.3.1" | |
|
332 | } | |
|
333 | }, | |
|
334 | "node_modules/doctrine": { | |
|
335 | "version": "3.0.0", | |
|
336 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", | |
|
337 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", | |
|
338 | "dev": true, | |
|
339 | "dependencies": { | |
|
340 | "esutils": "^2.0.2" | |
|
341 | }, | |
|
342 | "engines": { | |
|
343 | "node": ">=6.0.0" | |
|
344 | } | |
|
345 | }, | |
|
346 | "node_modules/emoji-regex": { | |
|
347 | "version": "7.0.3", | |
|
348 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", | |
|
349 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", | |
|
350 | "dev": true | |
|
351 | }, | |
|
352 | "node_modules/enquirer": { | |
|
353 | "version": "2.3.6", | |
|
354 | "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", | |
|
355 | "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", | |
|
356 | "dev": true, | |
|
357 | "dependencies": { | |
|
358 | "ansi-colors": "^4.1.1" | |
|
359 | }, | |
|
360 | "engines": { | |
|
361 | "node": ">=8.6" | |
|
362 | } | |
|
363 | }, | |
|
364 | "node_modules/escape-string-regexp": { | |
|
365 | "version": "1.0.5", | |
|
366 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", | |
|
367 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", | |
|
368 | "dev": true, | |
|
369 | "engines": { | |
|
370 | "node": ">=0.8.0" | |
|
371 | } | |
|
372 | }, | |
|
373 | "node_modules/eslint": { | |
|
374 | "version": "7.7.0", | |
|
375 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz", | |
|
376 | "integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==", | |
|
377 | "dev": true, | |
|
378 | "dependencies": { | |
|
379 | "@babel/code-frame": "^7.0.0", | |
|
380 | "ajv": "^6.10.0", | |
|
381 | "chalk": "^4.0.0", | |
|
382 | "cross-spawn": "^7.0.2", | |
|
383 | "debug": "^4.0.1", | |
|
384 | "doctrine": "^3.0.0", | |
|
385 | "enquirer": "^2.3.5", | |
|
386 | "eslint-scope": "^5.1.0", | |
|
387 | "eslint-utils": "^2.1.0", | |
|
388 | "eslint-visitor-keys": "^1.3.0", | |
|
389 | "espree": "^7.2.0", | |
|
390 | "esquery": "^1.2.0", | |
|
391 | "esutils": "^2.0.2", | |
|
392 | "file-entry-cache": "^5.0.1", | |
|
393 | "functional-red-black-tree": "^1.0.1", | |
|
394 | "glob-parent": "^5.0.0", | |
|
395 | "globals": "^12.1.0", | |
|
396 | "ignore": "^4.0.6", | |
|
397 | "import-fresh": "^3.0.0", | |
|
398 | "imurmurhash": "^0.1.4", | |
|
399 | "is-glob": "^4.0.0", | |
|
400 | "js-yaml": "^3.13.1", | |
|
401 | "json-stable-stringify-without-jsonify": "^1.0.1", | |
|
402 | "levn": "^0.4.1", | |
|
403 | "lodash": "^4.17.19", | |
|
404 | "minimatch": "^3.0.4", | |
|
405 | "natural-compare": "^1.4.0", | |
|
406 | "optionator": "^0.9.1", | |
|
407 | "progress": "^2.0.0", | |
|
408 | "regexpp": "^3.1.0", | |
|
409 | "semver": "^7.2.1", | |
|
410 | "strip-ansi": "^6.0.0", | |
|
411 | "strip-json-comments": "^3.1.0", | |
|
412 | "table": "^5.2.3", | |
|
413 | "text-table": "^0.2.0", | |
|
414 | "v8-compile-cache": "^2.0.3" | |
|
415 | }, | |
|
416 | "bin": { | |
|
417 | "eslint": "bin/eslint.js" | |
|
418 | }, | |
|
419 | "engines": { | |
|
420 | "node": "^10.12.0 || >=12.0.0" | |
|
421 | }, | |
|
422 | "funding": { | |
|
423 | "url": "https://opencollective.com/eslint" | |
|
424 | } | |
|
425 | }, | |
|
426 | "node_modules/eslint-scope": { | |
|
427 | "version": "5.1.1", | |
|
428 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", | |
|
429 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", | |
|
430 | "dev": true, | |
|
431 | "dependencies": { | |
|
432 | "esrecurse": "^4.3.0", | |
|
433 | "estraverse": "^4.1.1" | |
|
434 | }, | |
|
435 | "engines": { | |
|
436 | "node": ">=8.0.0" | |
|
437 | } | |
|
438 | }, | |
|
439 | "node_modules/eslint-utils": { | |
|
440 | "version": "2.1.0", | |
|
441 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", | |
|
442 | "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", | |
|
443 | "dev": true, | |
|
444 | "dependencies": { | |
|
445 | "eslint-visitor-keys": "^1.1.0" | |
|
446 | }, | |
|
447 | "engines": { | |
|
448 | "node": ">=6" | |
|
449 | }, | |
|
450 | "funding": { | |
|
451 | "url": "https://github.com/sponsors/mysticatea" | |
|
452 | } | |
|
453 | }, | |
|
454 | "node_modules/eslint-visitor-keys": { | |
|
455 | "version": "1.3.0", | |
|
456 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", | |
|
457 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", | |
|
458 | "dev": true, | |
|
459 | "engines": { | |
|
460 | "node": ">=4" | |
|
461 | } | |
|
462 | }, | |
|
463 | "node_modules/espree": { | |
|
464 | "version": "7.3.1", | |
|
465 | "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", | |
|
466 | "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", | |
|
467 | "dev": true, | |
|
468 | "dependencies": { | |
|
469 | "acorn": "^7.4.0", | |
|
470 | "acorn-jsx": "^5.3.1", | |
|
471 | "eslint-visitor-keys": "^1.3.0" | |
|
472 | }, | |
|
473 | "engines": { | |
|
474 | "node": "^10.12.0 || >=12.0.0" | |
|
475 | } | |
|
476 | }, | |
|
477 | "node_modules/esprima": { | |
|
478 | "version": "4.0.1", | |
|
479 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", | |
|
480 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", | |
|
481 | "dev": true, | |
|
482 | "bin": { | |
|
483 | "esparse": "bin/esparse.js", | |
|
484 | "esvalidate": "bin/esvalidate.js" | |
|
485 | }, | |
|
486 | "engines": { | |
|
487 | "node": ">=4" | |
|
488 | } | |
|
489 | }, | |
|
490 | "node_modules/esquery": { | |
|
491 | "version": "1.4.0", | |
|
492 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", | |
|
493 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", | |
|
494 | "dev": true, | |
|
495 | "dependencies": { | |
|
496 | "estraverse": "^5.1.0" | |
|
497 | }, | |
|
498 | "engines": { | |
|
499 | "node": ">=0.10" | |
|
500 | } | |
|
501 | }, | |
|
502 | "node_modules/esquery/node_modules/estraverse": { | |
|
503 | "version": "5.2.0", | |
|
504 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", | |
|
505 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", | |
|
506 | "dev": true, | |
|
507 | "engines": { | |
|
508 | "node": ">=4.0" | |
|
509 | } | |
|
510 | }, | |
|
511 | "node_modules/esrecurse": { | |
|
512 | "version": "4.3.0", | |
|
513 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", | |
|
514 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", | |
|
515 | "dev": true, | |
|
516 | "dependencies": { | |
|
517 | "estraverse": "^5.2.0" | |
|
518 | }, | |
|
519 | "engines": { | |
|
520 | "node": ">=4.0" | |
|
521 | } | |
|
522 | }, | |
|
523 | "node_modules/esrecurse/node_modules/estraverse": { | |
|
524 | "version": "5.2.0", | |
|
525 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", | |
|
526 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", | |
|
527 | "dev": true, | |
|
528 | "engines": { | |
|
529 | "node": ">=4.0" | |
|
530 | } | |
|
531 | }, | |
|
532 | "node_modules/estraverse": { | |
|
533 | "version": "4.3.0", | |
|
534 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", | |
|
535 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", | |
|
536 | "dev": true, | |
|
537 | "engines": { | |
|
538 | "node": ">=4.0" | |
|
539 | } | |
|
540 | }, | |
|
541 | "node_modules/esutils": { | |
|
542 | "version": "2.0.3", | |
|
543 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", | |
|
544 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", | |
|
545 | "dev": true, | |
|
546 | "engines": { | |
|
547 | "node": ">=0.10.0" | |
|
548 | } | |
|
549 | }, | |
|
550 | "node_modules/fast-deep-equal": { | |
|
551 | "version": "3.1.3", | |
|
552 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", | |
|
553 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", | |
|
554 | "dev": true | |
|
555 | }, | |
|
556 | "node_modules/fast-json-stable-stringify": { | |
|
557 | "version": "2.1.0", | |
|
558 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", | |
|
559 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", | |
|
560 | "dev": true | |
|
561 | }, | |
|
562 | "node_modules/fast-levenshtein": { | |
|
563 | "version": "2.0.6", | |
|
564 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", | |
|
565 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", | |
|
566 | "dev": true | |
|
567 | }, | |
|
568 | "node_modules/file-entry-cache": { | |
|
569 | "version": "5.0.1", | |
|
570 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", | |
|
571 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", | |
|
572 | "dev": true, | |
|
573 | "dependencies": { | |
|
574 | "flat-cache": "^2.0.1" | |
|
575 | }, | |
|
576 | "engines": { | |
|
577 | "node": ">=4" | |
|
578 | } | |
|
579 | }, | |
|
580 | "node_modules/flat-cache": { | |
|
581 | "version": "2.0.1", | |
|
582 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", | |
|
583 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", | |
|
584 | "dev": true, | |
|
585 | "dependencies": { | |
|
586 | "flatted": "^2.0.0", | |
|
587 | "rimraf": "2.6.3", | |
|
588 | "write": "1.0.3" | |
|
589 | }, | |
|
590 | "engines": { | |
|
591 | "node": ">=4" | |
|
592 | } | |
|
593 | }, | |
|
594 | "node_modules/flatted": { | |
|
595 | "version": "2.0.2", | |
|
596 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", | |
|
597 | "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", | |
|
598 | "dev": true | |
|
599 | }, | |
|
600 | "node_modules/fs.realpath": { | |
|
601 | "version": "1.0.0", | |
|
602 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", | |
|
603 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", | |
|
604 | "dev": true | |
|
605 | }, | |
|
606 | "node_modules/function-bind": { | |
|
607 | "version": "1.1.1", | |
|
608 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | |
|
609 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", | |
|
610 | "dev": true | |
|
611 | }, | |
|
612 | "node_modules/functional-red-black-tree": { | |
|
613 | "version": "1.0.1", | |
|
614 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", | |
|
615 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", | |
|
616 | "dev": true | |
|
617 | }, | |
|
618 | "node_modules/glob": { | |
|
619 | "version": "7.1.7", | |
|
620 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", | |
|
621 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", | |
|
622 | "dev": true, | |
|
623 | "dependencies": { | |
|
624 | "fs.realpath": "^1.0.0", | |
|
625 | "inflight": "^1.0.4", | |
|
626 | "inherits": "2", | |
|
627 | "minimatch": "^3.0.4", | |
|
628 | "once": "^1.3.0", | |
|
629 | "path-is-absolute": "^1.0.0" | |
|
630 | }, | |
|
631 | "engines": { | |
|
632 | "node": "*" | |
|
633 | }, | |
|
634 | "funding": { | |
|
635 | "url": "https://github.com/sponsors/isaacs" | |
|
636 | } | |
|
637 | }, | |
|
638 | "node_modules/glob-parent": { | |
|
639 | "version": "5.1.2", | |
|
640 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", | |
|
641 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", | |
|
642 | "dev": true, | |
|
643 | "dependencies": { | |
|
644 | "is-glob": "^4.0.1" | |
|
645 | }, | |
|
646 | "engines": { | |
|
647 | "node": ">= 6" | |
|
648 | } | |
|
649 | }, | |
|
650 | "node_modules/globals": { | |
|
651 | "version": "12.4.0", | |
|
652 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", | |
|
653 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", | |
|
654 | "dev": true, | |
|
655 | "dependencies": { | |
|
656 | "type-fest": "^0.8.1" | |
|
657 | }, | |
|
658 | "engines": { | |
|
659 | "node": ">=8" | |
|
660 | }, | |
|
661 | "funding": { | |
|
662 | "url": "https://github.com/sponsors/sindresorhus" | |
|
663 | } | |
|
664 | }, | |
|
665 | "node_modules/has": { | |
|
666 | "version": "1.0.3", | |
|
667 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", | |
|
668 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", | |
|
669 | "dev": true, | |
|
670 | "dependencies": { | |
|
671 | "function-bind": "^1.1.1" | |
|
672 | }, | |
|
673 | "engines": { | |
|
674 | "node": ">= 0.4.0" | |
|
675 | } | |
|
676 | }, | |
|
677 | "node_modules/has-flag": { | |
|
678 | "version": "4.0.0", | |
|
679 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | |
|
680 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", | |
|
681 | "dev": true, | |
|
682 | "engines": { | |
|
683 | "node": ">=8" | |
|
684 | } | |
|
685 | }, | |
|
686 | "node_modules/ignore": { | |
|
687 | "version": "4.0.6", | |
|
688 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", | |
|
689 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", | |
|
690 | "dev": true, | |
|
691 | "engines": { | |
|
692 | "node": ">= 4" | |
|
693 | } | |
|
694 | }, | |
|
695 | "node_modules/import-fresh": { | |
|
696 | "version": "3.3.0", | |
|
697 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", | |
|
698 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", | |
|
699 | "dev": true, | |
|
700 | "dependencies": { | |
|
701 | "parent-module": "^1.0.0", | |
|
702 | "resolve-from": "^4.0.0" | |
|
703 | }, | |
|
704 | "engines": { | |
|
705 | "node": ">=6" | |
|
706 | }, | |
|
707 | "funding": { | |
|
708 | "url": "https://github.com/sponsors/sindresorhus" | |
|
709 | } | |
|
710 | }, | |
|
711 | "node_modules/imurmurhash": { | |
|
712 | "version": "0.1.4", | |
|
713 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", | |
|
714 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", | |
|
715 | "dev": true, | |
|
716 | "engines": { | |
|
717 | "node": ">=0.8.19" | |
|
718 | } | |
|
719 | }, | |
|
720 | "node_modules/inflight": { | |
|
721 | "version": "1.0.6", | |
|
722 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", | |
|
723 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", | |
|
724 | "dev": true, | |
|
725 | "dependencies": { | |
|
726 | "once": "^1.3.0", | |
|
727 | "wrappy": "1" | |
|
728 | } | |
|
729 | }, | |
|
730 | "node_modules/inherits": { | |
|
731 | "version": "2.0.4", | |
|
732 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", | |
|
733 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", | |
|
734 | "dev": true | |
|
735 | }, | |
|
736 | "node_modules/is-core-module": { | |
|
737 | "version": "2.6.0", | |
|
738 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", | |
|
739 | "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", | |
|
740 | "dev": true, | |
|
741 | "dependencies": { | |
|
742 | "has": "^1.0.3" | |
|
743 | }, | |
|
744 | "funding": { | |
|
745 | "url": "https://github.com/sponsors/ljharb" | |
|
746 | } | |
|
747 | }, | |
|
748 | "node_modules/is-extglob": { | |
|
749 | "version": "2.1.1", | |
|
750 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", | |
|
751 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", | |
|
752 | "dev": true, | |
|
753 | "engines": { | |
|
754 | "node": ">=0.10.0" | |
|
755 | } | |
|
756 | }, | |
|
757 | "node_modules/is-fullwidth-code-point": { | |
|
758 | "version": "2.0.0", | |
|
759 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", | |
|
760 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", | |
|
761 | "dev": true, | |
|
762 | "engines": { | |
|
763 | "node": ">=4" | |
|
764 | } | |
|
765 | }, | |
|
766 | "node_modules/is-glob": { | |
|
767 | "version": "4.0.1", | |
|
768 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", | |
|
769 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", | |
|
770 | "dev": true, | |
|
771 | "dependencies": { | |
|
772 | "is-extglob": "^2.1.1" | |
|
773 | }, | |
|
774 | "engines": { | |
|
775 | "node": ">=0.10.0" | |
|
776 | } | |
|
777 | }, | |
|
778 | "node_modules/isexe": { | |
|
779 | "version": "2.0.0", | |
|
780 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", | |
|
781 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", | |
|
782 | "dev": true | |
|
783 | }, | |
|
784 | "node_modules/js-tokens": { | |
|
785 | "version": "4.0.0", | |
|
786 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", | |
|
787 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", | |
|
788 | "dev": true | |
|
789 | }, | |
|
790 | "node_modules/js-yaml": { | |
|
791 | "version": "3.14.1", | |
|
792 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", | |
|
793 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", | |
|
794 | "dev": true, | |
|
795 | "dependencies": { | |
|
796 | "argparse": "^1.0.7", | |
|
797 | "esprima": "^4.0.0" | |
|
798 | }, | |
|
799 | "bin": { | |
|
800 | "js-yaml": "bin/js-yaml.js" | |
|
801 | } | |
|
802 | }, | |
|
803 | "node_modules/json-schema-traverse": { | |
|
804 | "version": "0.4.1", | |
|
805 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", | |
|
806 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", | |
|
807 | "dev": true | |
|
808 | }, | |
|
809 | "node_modules/json-stable-stringify-without-jsonify": { | |
|
810 | "version": "1.0.1", | |
|
811 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", | |
|
812 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", | |
|
813 | "dev": true | |
|
814 | }, | |
|
815 | "node_modules/levn": { | |
|
816 | "version": "0.4.1", | |
|
817 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", | |
|
818 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", | |
|
819 | "dev": true, | |
|
820 | "dependencies": { | |
|
821 | "prelude-ls": "^1.2.1", | |
|
822 | "type-check": "~0.4.0" | |
|
823 | }, | |
|
824 | "engines": { | |
|
825 | "node": ">= 0.8.0" | |
|
826 | } | |
|
827 | }, | |
|
828 | "node_modules/lodash": { | |
|
829 | "version": "4.17.21", | |
|
830 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", | |
|
831 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", | |
|
832 | "dev": true | |
|
833 | }, | |
|
834 | "node_modules/lru-cache": { | |
|
835 | "version": "6.0.0", | |
|
836 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", | |
|
837 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", | |
|
838 | "dev": true, | |
|
839 | "dependencies": { | |
|
840 | "yallist": "^4.0.0" | |
|
841 | }, | |
|
842 | "engines": { | |
|
843 | "node": ">=10" | |
|
844 | } | |
|
845 | }, | |
|
846 | "node_modules/minimatch": { | |
|
847 | "version": "3.0.4", | |
|
848 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", | |
|
849 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", | |
|
850 | "dev": true, | |
|
851 | "dependencies": { | |
|
852 | "brace-expansion": "^1.1.7" | |
|
853 | }, | |
|
854 | "engines": { | |
|
855 | "node": "*" | |
|
856 | } | |
|
857 | }, | |
|
858 | "node_modules/minimist": { | |
|
859 | "version": "1.2.5", | |
|
860 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | |
|
861 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | |
|
862 | "dev": true | |
|
863 | }, | |
|
864 | "node_modules/mkdirp": { | |
|
865 | "version": "0.5.5", | |
|
866 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", | |
|
867 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", | |
|
868 | "dev": true, | |
|
869 | "dependencies": { | |
|
870 | "minimist": "^1.2.5" | |
|
871 | }, | |
|
872 | "bin": { | |
|
873 | "mkdirp": "bin/cmd.js" | |
|
874 | } | |
|
875 | }, | |
|
876 | "node_modules/ms": { | |
|
877 | "version": "2.1.2", | |
|
878 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | |
|
879 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", | |
|
880 | "dev": true | |
|
881 | }, | |
|
882 | "node_modules/natural-compare": { | |
|
883 | "version": "1.4.0", | |
|
884 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", | |
|
885 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", | |
|
886 | "dev": true | |
|
887 | }, | |
|
888 | "node_modules/once": { | |
|
889 | "version": "1.4.0", | |
|
890 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", | |
|
891 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", | |
|
892 | "dev": true, | |
|
893 | "dependencies": { | |
|
894 | "wrappy": "1" | |
|
895 | } | |
|
896 | }, | |
|
897 | "node_modules/optionator": { | |
|
898 | "version": "0.9.1", | |
|
899 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", | |
|
900 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", | |
|
901 | "dev": true, | |
|
902 | "dependencies": { | |
|
903 | "deep-is": "^0.1.3", | |
|
904 | "fast-levenshtein": "^2.0.6", | |
|
905 | "levn": "^0.4.1", | |
|
906 | "prelude-ls": "^1.2.1", | |
|
907 | "type-check": "^0.4.0", | |
|
908 | "word-wrap": "^1.2.3" | |
|
909 | }, | |
|
910 | "engines": { | |
|
911 | "node": ">= 0.8.0" | |
|
912 | } | |
|
913 | }, | |
|
914 | "node_modules/parent-module": { | |
|
915 | "version": "1.0.1", | |
|
916 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", | |
|
917 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", | |
|
918 | "dev": true, | |
|
919 | "dependencies": { | |
|
920 | "callsites": "^3.0.0" | |
|
921 | }, | |
|
922 | "engines": { | |
|
923 | "node": ">=6" | |
|
924 | } | |
|
925 | }, | |
|
926 | "node_modules/path-is-absolute": { | |
|
927 | "version": "1.0.1", | |
|
928 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", | |
|
929 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", | |
|
930 | "dev": true, | |
|
931 | "engines": { | |
|
932 | "node": ">=0.10.0" | |
|
933 | } | |
|
934 | }, | |
|
935 | "node_modules/path-key": { | |
|
936 | "version": "3.1.1", | |
|
937 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", | |
|
938 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", | |
|
939 | "dev": true, | |
|
940 | "engines": { | |
|
941 | "node": ">=8" | |
|
942 | } | |
|
943 | }, | |
|
944 | "node_modules/path-parse": { | |
|
945 | "version": "1.0.7", | |
|
946 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", | |
|
947 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", | |
|
948 | "dev": true | |
|
949 | }, | |
|
950 | "node_modules/prelude-ls": { | |
|
951 | "version": "1.2.1", | |
|
952 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", | |
|
953 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", | |
|
954 | "dev": true, | |
|
955 | "engines": { | |
|
956 | "node": ">= 0.8.0" | |
|
957 | } | |
|
958 | }, | |
|
959 | "node_modules/progress": { | |
|
960 | "version": "2.0.3", | |
|
961 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", | |
|
962 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", | |
|
963 | "dev": true, | |
|
964 | "engines": { | |
|
965 | "node": ">=0.4.0" | |
|
966 | } | |
|
967 | }, | |
|
968 | "node_modules/punycode": { | |
|
969 | "version": "2.1.1", | |
|
970 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | |
|
971 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", | |
|
972 | "dev": true, | |
|
973 | "engines": { | |
|
974 | "node": ">=6" | |
|
975 | } | |
|
976 | }, | |
|
977 | "node_modules/regexpp": { | |
|
978 | "version": "3.2.0", | |
|
979 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", | |
|
980 | "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", | |
|
981 | "dev": true, | |
|
982 | "engines": { | |
|
983 | "node": ">=8" | |
|
984 | }, | |
|
985 | "funding": { | |
|
986 | "url": "https://github.com/sponsors/mysticatea" | |
|
987 | } | |
|
988 | }, | |
|
989 | "node_modules/resolve": { | |
|
990 | "version": "1.20.0", | |
|
991 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", | |
|
992 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", | |
|
993 | "dev": true, | |
|
994 | "dependencies": { | |
|
995 | "is-core-module": "^2.2.0", | |
|
996 | "path-parse": "^1.0.6" | |
|
997 | }, | |
|
998 | "funding": { | |
|
999 | "url": "https://github.com/sponsors/ljharb" | |
|
1000 | } | |
|
1001 | }, | |
|
1002 | "node_modules/resolve-from": { | |
|
1003 | "version": "4.0.0", | |
|
1004 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", | |
|
1005 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", | |
|
1006 | "dev": true, | |
|
1007 | "engines": { | |
|
1008 | "node": ">=4" | |
|
1009 | } | |
|
1010 | }, | |
|
1011 | "node_modules/rimraf": { | |
|
1012 | "version": "2.6.3", | |
|
1013 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", | |
|
1014 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", | |
|
1015 | "dev": true, | |
|
1016 | "dependencies": { | |
|
1017 | "glob": "^7.1.3" | |
|
1018 | }, | |
|
1019 | "bin": { | |
|
1020 | "rimraf": "bin.js" | |
|
1021 | } | |
|
1022 | }, | |
|
1023 | "node_modules/semver": { | |
|
1024 | "version": "7.3.5", | |
|
1025 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", | |
|
1026 | "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", | |
|
1027 | "dev": true, | |
|
1028 | "dependencies": { | |
|
1029 | "lru-cache": "^6.0.0" | |
|
1030 | }, | |
|
1031 | "bin": { | |
|
1032 | "semver": "bin/semver.js" | |
|
1033 | }, | |
|
1034 | "engines": { | |
|
1035 | "node": ">=10" | |
|
1036 | } | |
|
1037 | }, | |
|
1038 | "node_modules/shebang-command": { | |
|
1039 | "version": "2.0.0", | |
|
1040 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", | |
|
1041 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", | |
|
1042 | "dev": true, | |
|
1043 | "dependencies": { | |
|
1044 | "shebang-regex": "^3.0.0" | |
|
1045 | }, | |
|
1046 | "engines": { | |
|
1047 | "node": ">=8" | |
|
1048 | } | |
|
1049 | }, | |
|
1050 | "node_modules/shebang-regex": { | |
|
1051 | "version": "3.0.0", | |
|
1052 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", | |
|
1053 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", | |
|
1054 | "dev": true, | |
|
1055 | "engines": { | |
|
1056 | "node": ">=8" | |
|
1057 | } | |
|
1058 | }, | |
|
1059 | "node_modules/slice-ansi": { | |
|
1060 | "version": "2.1.0", | |
|
1061 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", | |
|
1062 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", | |
|
1063 | "dev": true, | |
|
1064 | "dependencies": { | |
|
1065 | "ansi-styles": "^3.2.0", | |
|
1066 | "astral-regex": "^1.0.0", | |
|
1067 | "is-fullwidth-code-point": "^2.0.0" | |
|
1068 | }, | |
|
1069 | "engines": { | |
|
1070 | "node": ">=6" | |
|
1071 | } | |
|
1072 | }, | |
|
1073 | "node_modules/slice-ansi/node_modules/ansi-styles": { | |
|
1074 | "version": "3.2.1", | |
|
1075 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | |
|
1076 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | |
|
1077 | "dev": true, | |
|
1078 | "dependencies": { | |
|
1079 | "color-convert": "^1.9.0" | |
|
1080 | }, | |
|
1081 | "engines": { | |
|
1082 | "node": ">=4" | |
|
1083 | } | |
|
1084 | }, | |
|
1085 | "node_modules/slice-ansi/node_modules/color-convert": { | |
|
1086 | "version": "1.9.3", | |
|
1087 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | |
|
1088 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | |
|
1089 | "dev": true, | |
|
1090 | "dependencies": { | |
|
1091 | "color-name": "1.1.3" | |
|
1092 | } | |
|
1093 | }, | |
|
1094 | "node_modules/slice-ansi/node_modules/color-name": { | |
|
1095 | "version": "1.1.3", | |
|
1096 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | |
|
1097 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | |
|
1098 | "dev": true | |
|
1099 | }, | |
|
1100 | "node_modules/sprintf-js": { | |
|
1101 | "version": "1.0.3", | |
|
1102 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", | |
|
1103 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", | |
|
1104 | "dev": true | |
|
1105 | }, | |
|
1106 | "node_modules/string-width": { | |
|
1107 | "version": "3.1.0", | |
|
1108 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", | |
|
1109 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", | |
|
1110 | "dev": true, | |
|
1111 | "dependencies": { | |
|
1112 | "emoji-regex": "^7.0.1", | |
|
1113 | "is-fullwidth-code-point": "^2.0.0", | |
|
1114 | "strip-ansi": "^5.1.0" | |
|
1115 | }, | |
|
1116 | "engines": { | |
|
1117 | "node": ">=6" | |
|
1118 | } | |
|
1119 | }, | |
|
1120 | "node_modules/string-width/node_modules/ansi-regex": { | |
|
1121 | "version": "4.1.0", | |
|
1122 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", | |
|
1123 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", | |
|
1124 | "dev": true, | |
|
1125 | "engines": { | |
|
1126 | "node": ">=6" | |
|
1127 | } | |
|
1128 | }, | |
|
1129 | "node_modules/string-width/node_modules/strip-ansi": { | |
|
1130 | "version": "5.2.0", | |
|
1131 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", | |
|
1132 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", | |
|
1133 | "dev": true, | |
|
1134 | "dependencies": { | |
|
1135 | "ansi-regex": "^4.1.0" | |
|
1136 | }, | |
|
1137 | "engines": { | |
|
1138 | "node": ">=6" | |
|
1139 | } | |
|
1140 | }, | |
|
1141 | "node_modules/strip-ansi": { | |
|
1142 | "version": "6.0.0", | |
|
1143 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", | |
|
1144 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", | |
|
1145 | "dev": true, | |
|
1146 | "dependencies": { | |
|
1147 | "ansi-regex": "^5.0.0" | |
|
1148 | }, | |
|
1149 | "engines": { | |
|
1150 | "node": ">=8" | |
|
1151 | } | |
|
1152 | }, | |
|
1153 | "node_modules/strip-json-comments": { | |
|
1154 | "version": "3.1.1", | |
|
1155 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", | |
|
1156 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", | |
|
1157 | "dev": true, | |
|
1158 | "engines": { | |
|
1159 | "node": ">=8" | |
|
1160 | }, | |
|
1161 | "funding": { | |
|
1162 | "url": "https://github.com/sponsors/sindresorhus" | |
|
1163 | } | |
|
1164 | }, | |
|
1165 | "node_modules/supports-color": { | |
|
1166 | "version": "7.2.0", | |
|
1167 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", | |
|
1168 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", | |
|
1169 | "dev": true, | |
|
1170 | "dependencies": { | |
|
1171 | "has-flag": "^4.0.0" | |
|
1172 | }, | |
|
1173 | "engines": { | |
|
1174 | "node": ">=8" | |
|
1175 | } | |
|
1176 | }, | |
|
1177 | "node_modules/table": { | |
|
1178 | "version": "5.4.6", | |
|
1179 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", | |
|
1180 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", | |
|
1181 | "dev": true, | |
|
1182 | "dependencies": { | |
|
1183 | "ajv": "^6.10.2", | |
|
1184 | "lodash": "^4.17.14", | |
|
1185 | "slice-ansi": "^2.1.0", | |
|
1186 | "string-width": "^3.0.0" | |
|
1187 | }, | |
|
1188 | "engines": { | |
|
1189 | "node": ">=6.0.0" | |
|
1190 | } | |
|
1191 | }, | |
|
1192 | "node_modules/text-table": { | |
|
1193 | "version": "0.2.0", | |
|
1194 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", | |
|
1195 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", | |
|
1196 | "dev": true | |
|
1197 | }, | |
|
1198 | "node_modules/tslib": { | |
|
1199 | "version": "1.14.1", | |
|
1200 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", | |
|
1201 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", | |
|
1202 | "dev": true | |
|
1203 | }, | |
|
1204 | "node_modules/tslint": { | |
|
1205 | "version": "6.1.3", | |
|
1206 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", | |
|
1207 | "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", | |
|
1208 | "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", | |
|
1209 | "dev": true, | |
|
1210 | "dependencies": { | |
|
1211 | "@babel/code-frame": "^7.0.0", | |
|
1212 | "builtin-modules": "^1.1.1", | |
|
1213 | "chalk": "^2.3.0", | |
|
1214 | "commander": "^2.12.1", | |
|
1215 | "diff": "^4.0.1", | |
|
1216 | "glob": "^7.1.1", | |
|
1217 | "js-yaml": "^3.13.1", | |
|
1218 | "minimatch": "^3.0.4", | |
|
1219 | "mkdirp": "^0.5.3", | |
|
1220 | "resolve": "^1.3.2", | |
|
1221 | "semver": "^5.3.0", | |
|
1222 | "tslib": "^1.13.0", | |
|
1223 | "tsutils": "^2.29.0" | |
|
1224 | }, | |
|
1225 | "bin": { | |
|
1226 | "tslint": "bin/tslint" | |
|
1227 | }, | |
|
1228 | "engines": { | |
|
1229 | "node": ">=4.8.0" | |
|
1230 | }, | |
|
1231 | "peerDependencies": { | |
|
1232 | "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" | |
|
1233 | } | |
|
1234 | }, | |
|
1235 | "node_modules/tslint/node_modules/ansi-styles": { | |
|
1236 | "version": "3.2.1", | |
|
1237 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | |
|
1238 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | |
|
1239 | "dev": true, | |
|
1240 | "dependencies": { | |
|
1241 | "color-convert": "^1.9.0" | |
|
1242 | }, | |
|
1243 | "engines": { | |
|
1244 | "node": ">=4" | |
|
1245 | } | |
|
1246 | }, | |
|
1247 | "node_modules/tslint/node_modules/chalk": { | |
|
1248 | "version": "2.4.2", | |
|
1249 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", | |
|
1250 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", | |
|
1251 | "dev": true, | |
|
1252 | "dependencies": { | |
|
1253 | "ansi-styles": "^3.2.1", | |
|
1254 | "escape-string-regexp": "^1.0.5", | |
|
1255 | "supports-color": "^5.3.0" | |
|
1256 | }, | |
|
1257 | "engines": { | |
|
1258 | "node": ">=4" | |
|
1259 | } | |
|
1260 | }, | |
|
1261 | "node_modules/tslint/node_modules/color-convert": { | |
|
1262 | "version": "1.9.3", | |
|
1263 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | |
|
1264 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | |
|
1265 | "dev": true, | |
|
1266 | "dependencies": { | |
|
1267 | "color-name": "1.1.3" | |
|
1268 | } | |
|
1269 | }, | |
|
1270 | "node_modules/tslint/node_modules/color-name": { | |
|
1271 | "version": "1.1.3", | |
|
1272 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | |
|
1273 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | |
|
1274 | "dev": true | |
|
1275 | }, | |
|
1276 | "node_modules/tslint/node_modules/has-flag": { | |
|
1277 | "version": "3.0.0", | |
|
1278 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | |
|
1279 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", | |
|
1280 | "dev": true, | |
|
1281 | "engines": { | |
|
1282 | "node": ">=4" | |
|
1283 | } | |
|
1284 | }, | |
|
1285 | "node_modules/tslint/node_modules/semver": { | |
|
1286 | "version": "5.7.1", | |
|
1287 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", | |
|
1288 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", | |
|
1289 | "dev": true, | |
|
1290 | "bin": { | |
|
1291 | "semver": "bin/semver" | |
|
1292 | } | |
|
1293 | }, | |
|
1294 | "node_modules/tslint/node_modules/supports-color": { | |
|
1295 | "version": "5.5.0", | |
|
1296 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | |
|
1297 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", | |
|
1298 | "dev": true, | |
|
1299 | "dependencies": { | |
|
1300 | "has-flag": "^3.0.0" | |
|
1301 | }, | |
|
1302 | "engines": { | |
|
1303 | "node": ">=4" | |
|
1304 | } | |
|
1305 | }, | |
|
1306 | "node_modules/tsutils": { | |
|
1307 | "version": "2.29.0", | |
|
1308 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", | |
|
1309 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", | |
|
1310 | "dev": true, | |
|
1311 | "dependencies": { | |
|
1312 | "tslib": "^1.8.1" | |
|
1313 | }, | |
|
1314 | "peerDependencies": { | |
|
1315 | "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" | |
|
1316 | } | |
|
1317 | }, | |
|
1318 | "node_modules/type-check": { | |
|
1319 | "version": "0.4.0", | |
|
1320 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", | |
|
1321 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", | |
|
1322 | "dev": true, | |
|
1323 | "dependencies": { | |
|
1324 | "prelude-ls": "^1.2.1" | |
|
1325 | }, | |
|
1326 | "engines": { | |
|
1327 | "node": ">= 0.8.0" | |
|
1328 | } | |
|
1329 | }, | |
|
1330 | "node_modules/type-fest": { | |
|
1331 | "version": "0.8.1", | |
|
1332 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", | |
|
1333 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", | |
|
1334 | "dev": true, | |
|
1335 | "engines": { | |
|
1336 | "node": ">=8" | |
|
1337 | } | |
|
1338 | }, | |
|
1339 | "node_modules/typescript": { | |
|
1340 | "version": "4.4.2", | |
|
1341 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", | |
|
1342 | "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", | |
|
1343 | "dev": true, | |
|
1344 | "bin": { | |
|
1345 | "tsc": "bin/tsc", | |
|
1346 | "tsserver": "bin/tsserver" | |
|
1347 | }, | |
|
1348 | "engines": { | |
|
1349 | "node": ">=4.2.0" | |
|
1350 | } | |
|
1351 | }, | |
|
1352 | "node_modules/uri-js": { | |
|
1353 | "version": "4.4.1", | |
|
1354 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", | |
|
1355 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", | |
|
1356 | "dev": true, | |
|
1357 | "dependencies": { | |
|
1358 | "punycode": "^2.1.0" | |
|
1359 | } | |
|
1360 | }, | |
|
1361 | "node_modules/v8-compile-cache": { | |
|
1362 | "version": "2.3.0", | |
|
1363 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", | |
|
1364 | "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", | |
|
1365 | "dev": true | |
|
1366 | }, | |
|
1367 | "node_modules/which": { | |
|
1368 | "version": "2.0.2", | |
|
1369 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", | |
|
1370 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", | |
|
1371 | "dev": true, | |
|
1372 | "dependencies": { | |
|
1373 | "isexe": "^2.0.0" | |
|
1374 | }, | |
|
1375 | "bin": { | |
|
1376 | "node-which": "bin/node-which" | |
|
1377 | }, | |
|
1378 | "engines": { | |
|
1379 | "node": ">= 8" | |
|
1380 | } | |
|
1381 | }, | |
|
1382 | "node_modules/word-wrap": { | |
|
1383 | "version": "1.2.3", | |
|
1384 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", | |
|
1385 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", | |
|
1386 | "dev": true, | |
|
1387 | "engines": { | |
|
1388 | "node": ">=0.10.0" | |
|
1389 | } | |
|
1390 | }, | |
|
1391 | "node_modules/wrappy": { | |
|
1392 | "version": "1.0.2", | |
|
1393 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", | |
|
1394 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", | |
|
1395 | "dev": true | |
|
1396 | }, | |
|
1397 | "node_modules/write": { | |
|
1398 | "version": "1.0.3", | |
|
1399 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", | |
|
1400 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", | |
|
1401 | "dev": true, | |
|
1402 | "dependencies": { | |
|
1403 | "mkdirp": "^0.5.1" | |
|
1404 | }, | |
|
1405 | "engines": { | |
|
1406 | "node": ">=4" | |
|
1407 | } | |
|
1408 | }, | |
|
1409 | "node_modules/yallist": { | |
|
1410 | "version": "4.0.0", | |
|
1411 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", | |
|
1412 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", | |
|
1413 | "dev": true | |
|
1414 | } | |
|
1415 | }, | |
|
1416 | "dependencies": { | |
|
1417 | "@babel/code-frame": { | |
|
1418 | "version": "7.14.5", | |
|
1419 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", | |
|
1420 | "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", | |
|
1421 | "dev": true, | |
|
1422 | "requires": { | |
|
1423 | "@babel/highlight": "^7.14.5" | |
|
1424 | } | |
|
1425 | }, | |
|
1426 | "@babel/helper-validator-identifier": { | |
|
1427 | "version": "7.14.9", | |
|
1428 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", | |
|
1429 | "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", | |
|
1430 | "dev": true | |
|
1431 | }, | |
|
1432 | "@babel/highlight": { | |
|
1433 | "version": "7.14.5", | |
|
1434 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", | |
|
1435 | "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", | |
|
1436 | "dev": true, | |
|
1437 | "requires": { | |
|
1438 | "@babel/helper-validator-identifier": "^7.14.5", | |
|
1439 | "chalk": "^2.0.0", | |
|
1440 | "js-tokens": "^4.0.0" | |
|
1441 | }, | |
|
1442 | "dependencies": { | |
|
1443 | "ansi-styles": { | |
|
1444 | "version": "3.2.1", | |
|
1445 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | |
|
1446 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | |
|
1447 | "dev": true, | |
|
1448 | "requires": { | |
|
1449 | "color-convert": "^1.9.0" | |
|
1450 | } | |
|
1451 | }, | |
|
1452 | "chalk": { | |
|
1453 | "version": "2.4.2", | |
|
1454 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", | |
|
1455 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", | |
|
1456 | "dev": true, | |
|
1457 | "requires": { | |
|
1458 | "ansi-styles": "^3.2.1", | |
|
1459 | "escape-string-regexp": "^1.0.5", | |
|
1460 | "supports-color": "^5.3.0" | |
|
1461 | } | |
|
1462 | }, | |
|
1463 | "color-convert": { | |
|
1464 | "version": "1.9.3", | |
|
1465 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | |
|
1466 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | |
|
1467 | "dev": true, | |
|
1468 | "requires": { | |
|
1469 | "color-name": "1.1.3" | |
|
1470 | } | |
|
1471 | }, | |
|
1472 | "color-name": { | |
|
1473 | "version": "1.1.3", | |
|
1474 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | |
|
1475 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | |
|
1476 | "dev": true | |
|
1477 | }, | |
|
1478 | "has-flag": { | |
|
1479 | "version": "3.0.0", | |
|
1480 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | |
|
1481 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", | |
|
1482 | "dev": true | |
|
1483 | }, | |
|
1484 | "supports-color": { | |
|
1485 | "version": "5.5.0", | |
|
1486 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | |
|
1487 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", | |
|
1488 | "dev": true, | |
|
1489 | "requires": { | |
|
1490 | "has-flag": "^3.0.0" | |
|
1491 | } | |
|
1492 | } | |
|
1493 | } | |
|
1494 | }, | |
|
1495 | "@types/requirejs": { | |
|
1496 | "version": "2.1.33", | |
|
1497 | "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.33.tgz", | |
|
1498 | "integrity": "sha512-1ZUCLJY3BztlR+HZWpoOkUt/n0YES/TuiBsW5dnk6OXUJSjbYfRJyiSf1yyyWMNWeX1RR7mTso2piU/dP1hgsw==", | |
|
1499 | "dev": true | |
|
1500 | }, | |
|
1501 | "acorn": { | |
|
1502 | "version": "7.4.1", | |
|
1503 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", | |
|
1504 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", | |
|
1505 | "dev": true | |
|
1506 | }, | |
|
1507 | "acorn-jsx": { | |
|
1508 | "version": "5.3.2", | |
|
1509 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", | |
|
1510 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", | |
|
1511 | "dev": true, | |
|
1512 | "requires": {} | |
|
1513 | }, | |
|
1514 | "ajv": { | |
|
1515 | "version": "6.12.6", | |
|
1516 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", | |
|
1517 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", | |
|
1518 | "dev": true, | |
|
1519 | "requires": { | |
|
1520 | "fast-deep-equal": "^3.1.1", | |
|
1521 | "fast-json-stable-stringify": "^2.0.0", | |
|
1522 | "json-schema-traverse": "^0.4.1", | |
|
1523 | "uri-js": "^4.2.2" | |
|
1524 | } | |
|
1525 | }, | |
|
1526 | "ansi-colors": { | |
|
1527 | "version": "4.1.1", | |
|
1528 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", | |
|
1529 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", | |
|
1530 | "dev": true | |
|
1531 | }, | |
|
1532 | "ansi-regex": { | |
|
1533 | "version": "5.0.0", | |
|
1534 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", | |
|
1535 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", | |
|
1536 | "dev": true | |
|
1537 | }, | |
|
1538 | "ansi-styles": { | |
|
1539 | "version": "4.3.0", | |
|
1540 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", | |
|
1541 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", | |
|
1542 | "dev": true, | |
|
1543 | "requires": { | |
|
1544 | "color-convert": "^2.0.1" | |
|
1545 | } | |
|
1546 | }, | |
|
1547 | "argparse": { | |
|
1548 | "version": "1.0.10", | |
|
1549 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", | |
|
1550 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", | |
|
1551 | "dev": true, | |
|
1552 | "requires": { | |
|
1553 | "sprintf-js": "~1.0.2" | |
|
1554 | } | |
|
1555 | }, | |
|
1556 | "astral-regex": { | |
|
1557 | "version": "1.0.0", | |
|
1558 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", | |
|
1559 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", | |
|
1560 | "dev": true | |
|
1561 | }, | |
|
1562 | "balanced-match": { | |
|
1563 | "version": "1.0.2", | |
|
1564 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", | |
|
1565 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", | |
|
1566 | "dev": true | |
|
1567 | }, | |
|
1568 | "brace-expansion": { | |
|
1569 | "version": "1.1.11", | |
|
1570 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | |
|
1571 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | |
|
1572 | "dev": true, | |
|
1573 | "requires": { | |
|
1574 | "balanced-match": "^1.0.0", | |
|
1575 | "concat-map": "0.0.1" | |
|
1576 | } | |
|
1577 | }, | |
|
1578 | "builtin-modules": { | |
|
1579 | "version": "1.1.1", | |
|
1580 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", | |
|
1581 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", | |
|
1582 | "dev": true | |
|
1583 | }, | |
|
1584 | "callsites": { | |
|
1585 | "version": "3.1.0", | |
|
1586 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", | |
|
1587 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", | |
|
1588 | "dev": true | |
|
1589 | }, | |
|
1590 | "chalk": { | |
|
1591 | "version": "4.1.2", | |
|
1592 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", | |
|
1593 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", | |
|
1594 | "dev": true, | |
|
1595 | "requires": { | |
|
1596 | "ansi-styles": "^4.1.0", | |
|
1597 | "supports-color": "^7.1.0" | |
|
1598 | } | |
|
1599 | }, | |
|
1600 | "color-convert": { | |
|
1601 | "version": "2.0.1", | |
|
1602 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", | |
|
1603 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", | |
|
1604 | "dev": true, | |
|
1605 | "requires": { | |
|
1606 | "color-name": "~1.1.4" | |
|
1607 | } | |
|
1608 | }, | |
|
1609 | "color-name": { | |
|
1610 | "version": "1.1.4", | |
|
1611 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", | |
|
1612 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", | |
|
1613 | "dev": true | |
|
1614 | }, | |
|
1615 | "commander": { | |
|
1616 | "version": "2.20.3", | |
|
1617 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", | |
|
1618 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", | |
|
1619 | "dev": true | |
|
1620 | }, | |
|
1621 | "concat-map": { | |
|
1622 | "version": "0.0.1", | |
|
1623 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", | |
|
1624 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", | |
|
1625 | "dev": true | |
|
1626 | }, | |
|
1627 | "cross-spawn": { | |
|
1628 | "version": "7.0.3", | |
|
1629 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", | |
|
1630 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", | |
|
1631 | "dev": true, | |
|
1632 | "requires": { | |
|
1633 | "path-key": "^3.1.0", | |
|
1634 | "shebang-command": "^2.0.0", | |
|
1635 | "which": "^2.0.1" | |
|
1636 | } | |
|
1637 | }, | |
|
1638 | "debug": { | |
|
1639 | "version": "4.3.2", | |
|
1640 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", | |
|
1641 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", | |
|
1642 | "dev": true, | |
|
1643 | "requires": { | |
|
1644 | "ms": "2.1.2" | |
|
1645 | } | |
|
1646 | }, | |
|
1647 | "deep-is": { | |
|
1648 | "version": "0.1.3", | |
|
1649 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", | |
|
1650 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", | |
|
1651 | "dev": true | |
|
1652 | }, | |
|
1653 | "diff": { | |
|
1654 | "version": "4.0.2", | |
|
1655 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", | |
|
1656 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", | |
|
1657 | "dev": true | |
|
1658 | }, | |
|
1659 | "doctrine": { | |
|
1660 | "version": "3.0.0", | |
|
1661 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", | |
|
1662 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", | |
|
1663 | "dev": true, | |
|
1664 | "requires": { | |
|
1665 | "esutils": "^2.0.2" | |
|
1666 | } | |
|
1667 | }, | |
|
1668 | "emoji-regex": { | |
|
1669 | "version": "7.0.3", | |
|
1670 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", | |
|
1671 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", | |
|
1672 | "dev": true | |
|
1673 | }, | |
|
1674 | "enquirer": { | |
|
1675 | "version": "2.3.6", | |
|
1676 | "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", | |
|
1677 | "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", | |
|
1678 | "dev": true, | |
|
1679 | "requires": { | |
|
1680 | "ansi-colors": "^4.1.1" | |
|
1681 | } | |
|
1682 | }, | |
|
1683 | "escape-string-regexp": { | |
|
1684 | "version": "1.0.5", | |
|
1685 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", | |
|
1686 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", | |
|
1687 | "dev": true | |
|
1688 | }, | |
|
1689 | "eslint": { | |
|
1690 | "version": "7.7.0", | |
|
1691 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz", | |
|
1692 | "integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==", | |
|
1693 | "dev": true, | |
|
1694 | "requires": { | |
|
1695 | "@babel/code-frame": "^7.0.0", | |
|
1696 | "ajv": "^6.10.0", | |
|
1697 | "chalk": "^4.0.0", | |
|
1698 | "cross-spawn": "^7.0.2", | |
|
1699 | "debug": "^4.0.1", | |
|
1700 | "doctrine": "^3.0.0", | |
|
1701 | "enquirer": "^2.3.5", | |
|
1702 | "eslint-scope": "^5.1.0", | |
|
1703 | "eslint-utils": "^2.1.0", | |
|
1704 | "eslint-visitor-keys": "^1.3.0", | |
|
1705 | "espree": "^7.2.0", | |
|
1706 | "esquery": "^1.2.0", | |
|
1707 | "esutils": "^2.0.2", | |
|
1708 | "file-entry-cache": "^5.0.1", | |
|
1709 | "functional-red-black-tree": "^1.0.1", | |
|
1710 | "glob-parent": "^5.0.0", | |
|
1711 | "globals": "^12.1.0", | |
|
1712 | "ignore": "^4.0.6", | |
|
1713 | "import-fresh": "^3.0.0", | |
|
1714 | "imurmurhash": "^0.1.4", | |
|
1715 | "is-glob": "^4.0.0", | |
|
1716 | "js-yaml": "^3.13.1", | |
|
1717 | "json-stable-stringify-without-jsonify": "^1.0.1", | |
|
1718 | "levn": "^0.4.1", | |
|
1719 | "lodash": "^4.17.19", | |
|
1720 | "minimatch": "^3.0.4", | |
|
1721 | "natural-compare": "^1.4.0", | |
|
1722 | "optionator": "^0.9.1", | |
|
1723 | "progress": "^2.0.0", | |
|
1724 | "regexpp": "^3.1.0", | |
|
1725 | "semver": "^7.2.1", | |
|
1726 | "strip-ansi": "^6.0.0", | |
|
1727 | "strip-json-comments": "^3.1.0", | |
|
1728 | "table": "^5.2.3", | |
|
1729 | "text-table": "^0.2.0", | |
|
1730 | "v8-compile-cache": "^2.0.3" | |
|
1731 | } | |
|
1732 | }, | |
|
1733 | "eslint-scope": { | |
|
1734 | "version": "5.1.1", | |
|
1735 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", | |
|
1736 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", | |
|
1737 | "dev": true, | |
|
1738 | "requires": { | |
|
1739 | "esrecurse": "^4.3.0", | |
|
1740 | "estraverse": "^4.1.1" | |
|
1741 | } | |
|
1742 | }, | |
|
1743 | "eslint-utils": { | |
|
1744 | "version": "2.1.0", | |
|
1745 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", | |
|
1746 | "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", | |
|
1747 | "dev": true, | |
|
1748 | "requires": { | |
|
1749 | "eslint-visitor-keys": "^1.1.0" | |
|
1750 | } | |
|
1751 | }, | |
|
1752 | "eslint-visitor-keys": { | |
|
1753 | "version": "1.3.0", | |
|
1754 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", | |
|
1755 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", | |
|
1756 | "dev": true | |
|
1757 | }, | |
|
1758 | "espree": { | |
|
1759 | "version": "7.3.1", | |
|
1760 | "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", | |
|
1761 | "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", | |
|
1762 | "dev": true, | |
|
1763 | "requires": { | |
|
1764 | "acorn": "^7.4.0", | |
|
1765 | "acorn-jsx": "^5.3.1", | |
|
1766 | "eslint-visitor-keys": "^1.3.0" | |
|
1767 | } | |
|
1768 | }, | |
|
1769 | "esprima": { | |
|
1770 | "version": "4.0.1", | |
|
1771 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", | |
|
1772 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", | |
|
1773 | "dev": true | |
|
1774 | }, | |
|
1775 | "esquery": { | |
|
1776 | "version": "1.4.0", | |
|
1777 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", | |
|
1778 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", | |
|
1779 | "dev": true, | |
|
1780 | "requires": { | |
|
1781 | "estraverse": "^5.1.0" | |
|
1782 | }, | |
|
1783 | "dependencies": { | |
|
1784 | "estraverse": { | |
|
1785 | "version": "5.2.0", | |
|
1786 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", | |
|
1787 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", | |
|
1788 | "dev": true | |
|
1789 | } | |
|
1790 | } | |
|
1791 | }, | |
|
1792 | "esrecurse": { | |
|
1793 | "version": "4.3.0", | |
|
1794 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", | |
|
1795 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", | |
|
1796 | "dev": true, | |
|
1797 | "requires": { | |
|
1798 | "estraverse": "^5.2.0" | |
|
1799 | }, | |
|
1800 | "dependencies": { | |
|
1801 | "estraverse": { | |
|
1802 | "version": "5.2.0", | |
|
1803 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", | |
|
1804 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", | |
|
1805 | "dev": true | |
|
1806 | } | |
|
1807 | } | |
|
1808 | }, | |
|
1809 | "estraverse": { | |
|
1810 | "version": "4.3.0", | |
|
1811 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", | |
|
1812 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", | |
|
1813 | "dev": true | |
|
1814 | }, | |
|
1815 | "esutils": { | |
|
1816 | "version": "2.0.3", | |
|
1817 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", | |
|
1818 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", | |
|
1819 | "dev": true | |
|
1820 | }, | |
|
1821 | "fast-deep-equal": { | |
|
1822 | "version": "3.1.3", | |
|
1823 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", | |
|
1824 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", | |
|
1825 | "dev": true | |
|
1826 | }, | |
|
1827 | "fast-json-stable-stringify": { | |
|
1828 | "version": "2.1.0", | |
|
1829 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", | |
|
1830 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", | |
|
1831 | "dev": true | |
|
1832 | }, | |
|
1833 | "fast-levenshtein": { | |
|
1834 | "version": "2.0.6", | |
|
1835 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", | |
|
1836 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", | |
|
1837 | "dev": true | |
|
1838 | }, | |
|
1839 | "file-entry-cache": { | |
|
1840 | "version": "5.0.1", | |
|
1841 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", | |
|
1842 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", | |
|
1843 | "dev": true, | |
|
1844 | "requires": { | |
|
1845 | "flat-cache": "^2.0.1" | |
|
1846 | } | |
|
1847 | }, | |
|
1848 | "flat-cache": { | |
|
1849 | "version": "2.0.1", | |
|
1850 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", | |
|
1851 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", | |
|
1852 | "dev": true, | |
|
1853 | "requires": { | |
|
1854 | "flatted": "^2.0.0", | |
|
1855 | "rimraf": "2.6.3", | |
|
1856 | "write": "1.0.3" | |
|
1857 | } | |
|
1858 | }, | |
|
1859 | "flatted": { | |
|
1860 | "version": "2.0.2", | |
|
1861 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", | |
|
1862 | "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", | |
|
1863 | "dev": true | |
|
1864 | }, | |
|
1865 | "fs.realpath": { | |
|
1866 | "version": "1.0.0", | |
|
1867 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", | |
|
1868 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", | |
|
1869 | "dev": true | |
|
1870 | }, | |
|
1871 | "function-bind": { | |
|
1872 | "version": "1.1.1", | |
|
1873 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | |
|
1874 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", | |
|
1875 | "dev": true | |
|
1876 | }, | |
|
1877 | "functional-red-black-tree": { | |
|
1878 | "version": "1.0.1", | |
|
1879 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", | |
|
1880 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", | |
|
1881 | "dev": true | |
|
1882 | }, | |
|
1883 | "glob": { | |
|
1884 | "version": "7.1.7", | |
|
1885 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", | |
|
1886 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", | |
|
1887 | "dev": true, | |
|
1888 | "requires": { | |
|
1889 | "fs.realpath": "^1.0.0", | |
|
1890 | "inflight": "^1.0.4", | |
|
1891 | "inherits": "2", | |
|
1892 | "minimatch": "^3.0.4", | |
|
1893 | "once": "^1.3.0", | |
|
1894 | "path-is-absolute": "^1.0.0" | |
|
1895 | } | |
|
1896 | }, | |
|
1897 | "glob-parent": { | |
|
1898 | "version": "5.1.2", | |
|
1899 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", | |
|
1900 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", | |
|
1901 | "dev": true, | |
|
1902 | "requires": { | |
|
1903 | "is-glob": "^4.0.1" | |
|
1904 | } | |
|
1905 | }, | |
|
1906 | "globals": { | |
|
1907 | "version": "12.4.0", | |
|
1908 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", | |
|
1909 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", | |
|
1910 | "dev": true, | |
|
1911 | "requires": { | |
|
1912 | "type-fest": "^0.8.1" | |
|
1913 | } | |
|
1914 | }, | |
|
1915 | "has": { | |
|
1916 | "version": "1.0.3", | |
|
1917 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", | |
|
1918 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", | |
|
1919 | "dev": true, | |
|
1920 | "requires": { | |
|
1921 | "function-bind": "^1.1.1" | |
|
1922 | } | |
|
1923 | }, | |
|
1924 | "has-flag": { | |
|
1925 | "version": "4.0.0", | |
|
1926 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | |
|
1927 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", | |
|
1928 | "dev": true | |
|
1929 | }, | |
|
1930 | "ignore": { | |
|
1931 | "version": "4.0.6", | |
|
1932 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", | |
|
1933 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", | |
|
1934 | "dev": true | |
|
1935 | }, | |
|
1936 | "import-fresh": { | |
|
1937 | "version": "3.3.0", | |
|
1938 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", | |
|
1939 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", | |
|
1940 | "dev": true, | |
|
1941 | "requires": { | |
|
1942 | "parent-module": "^1.0.0", | |
|
1943 | "resolve-from": "^4.0.0" | |
|
1944 | } | |
|
1945 | }, | |
|
1946 | "imurmurhash": { | |
|
1947 | "version": "0.1.4", | |
|
1948 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", | |
|
1949 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", | |
|
1950 | "dev": true | |
|
1951 | }, | |
|
1952 | "inflight": { | |
|
1953 | "version": "1.0.6", | |
|
1954 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", | |
|
1955 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", | |
|
1956 | "dev": true, | |
|
1957 | "requires": { | |
|
1958 | "once": "^1.3.0", | |
|
1959 | "wrappy": "1" | |
|
1960 | } | |
|
1961 | }, | |
|
1962 | "inherits": { | |
|
1963 | "version": "2.0.4", | |
|
1964 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", | |
|
1965 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", | |
|
1966 | "dev": true | |
|
1967 | }, | |
|
1968 | "is-core-module": { | |
|
1969 | "version": "2.6.0", | |
|
1970 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", | |
|
1971 | "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", | |
|
1972 | "dev": true, | |
|
1973 | "requires": { | |
|
1974 | "has": "^1.0.3" | |
|
1975 | } | |
|
1976 | }, | |
|
1977 | "is-extglob": { | |
|
1978 | "version": "2.1.1", | |
|
1979 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", | |
|
1980 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", | |
|
1981 | "dev": true | |
|
1982 | }, | |
|
1983 | "is-fullwidth-code-point": { | |
|
1984 | "version": "2.0.0", | |
|
1985 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", | |
|
1986 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", | |
|
1987 | "dev": true | |
|
1988 | }, | |
|
1989 | "is-glob": { | |
|
1990 | "version": "4.0.1", | |
|
1991 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", | |
|
1992 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", | |
|
1993 | "dev": true, | |
|
1994 | "requires": { | |
|
1995 | "is-extglob": "^2.1.1" | |
|
1996 | } | |
|
1997 | }, | |
|
1998 | "isexe": { | |
|
1999 | "version": "2.0.0", | |
|
2000 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", | |
|
2001 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", | |
|
2002 | "dev": true | |
|
2003 | }, | |
|
2004 | "js-tokens": { | |
|
2005 | "version": "4.0.0", | |
|
2006 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", | |
|
2007 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", | |
|
2008 | "dev": true | |
|
2009 | }, | |
|
2010 | "js-yaml": { | |
|
2011 | "version": "3.14.1", | |
|
2012 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", | |
|
2013 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", | |
|
2014 | "dev": true, | |
|
2015 | "requires": { | |
|
2016 | "argparse": "^1.0.7", | |
|
2017 | "esprima": "^4.0.0" | |
|
2018 | } | |
|
2019 | }, | |
|
2020 | "json-schema-traverse": { | |
|
2021 | "version": "0.4.1", | |
|
2022 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", | |
|
2023 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", | |
|
2024 | "dev": true | |
|
2025 | }, | |
|
2026 | "json-stable-stringify-without-jsonify": { | |
|
2027 | "version": "1.0.1", | |
|
2028 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", | |
|
2029 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", | |
|
2030 | "dev": true | |
|
2031 | }, | |
|
2032 | "levn": { | |
|
2033 | "version": "0.4.1", | |
|
2034 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", | |
|
2035 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", | |
|
2036 | "dev": true, | |
|
2037 | "requires": { | |
|
2038 | "prelude-ls": "^1.2.1", | |
|
2039 | "type-check": "~0.4.0" | |
|
2040 | } | |
|
2041 | }, | |
|
2042 | "lodash": { | |
|
2043 | "version": "4.17.21", | |
|
2044 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", | |
|
2045 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", | |
|
2046 | "dev": true | |
|
2047 | }, | |
|
2048 | "lru-cache": { | |
|
2049 | "version": "6.0.0", | |
|
2050 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", | |
|
2051 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", | |
|
2052 | "dev": true, | |
|
2053 | "requires": { | |
|
2054 | "yallist": "^4.0.0" | |
|
2055 | } | |
|
2056 | }, | |
|
2057 | "minimatch": { | |
|
2058 | "version": "3.0.4", | |
|
2059 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", | |
|
2060 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", | |
|
2061 | "dev": true, | |
|
2062 | "requires": { | |
|
2063 | "brace-expansion": "^1.1.7" | |
|
2064 | } | |
|
2065 | }, | |
|
2066 | "minimist": { | |
|
2067 | "version": "1.2.5", | |
|
2068 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | |
|
2069 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | |
|
2070 | "dev": true | |
|
2071 | }, | |
|
2072 | "mkdirp": { | |
|
2073 | "version": "0.5.5", | |
|
2074 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", | |
|
2075 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", | |
|
2076 | "dev": true, | |
|
2077 | "requires": { | |
|
2078 | "minimist": "^1.2.5" | |
|
2079 | } | |
|
2080 | }, | |
|
2081 | "ms": { | |
|
2082 | "version": "2.1.2", | |
|
2083 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | |
|
2084 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", | |
|
2085 | "dev": true | |
|
2086 | }, | |
|
2087 | "natural-compare": { | |
|
2088 | "version": "1.4.0", | |
|
2089 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", | |
|
2090 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", | |
|
2091 | "dev": true | |
|
2092 | }, | |
|
2093 | "once": { | |
|
2094 | "version": "1.4.0", | |
|
2095 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", | |
|
2096 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", | |
|
2097 | "dev": true, | |
|
2098 | "requires": { | |
|
2099 | "wrappy": "1" | |
|
2100 | } | |
|
2101 | }, | |
|
2102 | "optionator": { | |
|
2103 | "version": "0.9.1", | |
|
2104 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", | |
|
2105 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", | |
|
2106 | "dev": true, | |
|
2107 | "requires": { | |
|
2108 | "deep-is": "^0.1.3", | |
|
2109 | "fast-levenshtein": "^2.0.6", | |
|
2110 | "levn": "^0.4.1", | |
|
2111 | "prelude-ls": "^1.2.1", | |
|
2112 | "type-check": "^0.4.0", | |
|
2113 | "word-wrap": "^1.2.3" | |
|
2114 | } | |
|
2115 | }, | |
|
2116 | "parent-module": { | |
|
2117 | "version": "1.0.1", | |
|
2118 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", | |
|
2119 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", | |
|
2120 | "dev": true, | |
|
2121 | "requires": { | |
|
2122 | "callsites": "^3.0.0" | |
|
2123 | } | |
|
2124 | }, | |
|
2125 | "path-is-absolute": { | |
|
2126 | "version": "1.0.1", | |
|
2127 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", | |
|
2128 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", | |
|
2129 | "dev": true | |
|
2130 | }, | |
|
2131 | "path-key": { | |
|
2132 | "version": "3.1.1", | |
|
2133 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", | |
|
2134 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", | |
|
2135 | "dev": true | |
|
2136 | }, | |
|
2137 | "path-parse": { | |
|
2138 | "version": "1.0.7", | |
|
2139 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", | |
|
2140 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", | |
|
2141 | "dev": true | |
|
2142 | }, | |
|
2143 | "prelude-ls": { | |
|
2144 | "version": "1.2.1", | |
|
2145 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", | |
|
2146 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", | |
|
2147 | "dev": true | |
|
2148 | }, | |
|
2149 | "progress": { | |
|
2150 | "version": "2.0.3", | |
|
2151 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", | |
|
2152 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", | |
|
2153 | "dev": true | |
|
2154 | }, | |
|
2155 | "punycode": { | |
|
2156 | "version": "2.1.1", | |
|
2157 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | |
|
2158 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", | |
|
2159 | "dev": true | |
|
2160 | }, | |
|
2161 | "regexpp": { | |
|
2162 | "version": "3.2.0", | |
|
2163 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", | |
|
2164 | "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", | |
|
2165 | "dev": true | |
|
2166 | }, | |
|
2167 | "resolve": { | |
|
2168 | "version": "1.20.0", | |
|
2169 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", | |
|
2170 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", | |
|
2171 | "dev": true, | |
|
2172 | "requires": { | |
|
2173 | "is-core-module": "^2.2.0", | |
|
2174 | "path-parse": "^1.0.6" | |
|
2175 | } | |
|
2176 | }, | |
|
2177 | "resolve-from": { | |
|
2178 | "version": "4.0.0", | |
|
2179 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", | |
|
2180 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", | |
|
2181 | "dev": true | |
|
2182 | }, | |
|
2183 | "rimraf": { | |
|
2184 | "version": "2.6.3", | |
|
2185 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", | |
|
2186 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", | |
|
2187 | "dev": true, | |
|
2188 | "requires": { | |
|
2189 | "glob": "^7.1.3" | |
|
2190 | } | |
|
2191 | }, | |
|
2192 | "semver": { | |
|
2193 | "version": "7.3.5", | |
|
2194 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", | |
|
2195 | "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", | |
|
2196 | "dev": true, | |
|
2197 | "requires": { | |
|
2198 | "lru-cache": "^6.0.0" | |
|
2199 | } | |
|
2200 | }, | |
|
2201 | "shebang-command": { | |
|
2202 | "version": "2.0.0", | |
|
2203 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", | |
|
2204 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", | |
|
2205 | "dev": true, | |
|
2206 | "requires": { | |
|
2207 | "shebang-regex": "^3.0.0" | |
|
2208 | } | |
|
2209 | }, | |
|
2210 | "shebang-regex": { | |
|
2211 | "version": "3.0.0", | |
|
2212 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", | |
|
2213 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", | |
|
2214 | "dev": true | |
|
2215 | }, | |
|
2216 | "slice-ansi": { | |
|
2217 | "version": "2.1.0", | |
|
2218 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", | |
|
2219 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", | |
|
2220 | "dev": true, | |
|
2221 | "requires": { | |
|
2222 | "ansi-styles": "^3.2.0", | |
|
2223 | "astral-regex": "^1.0.0", | |
|
2224 | "is-fullwidth-code-point": "^2.0.0" | |
|
2225 | }, | |
|
2226 | "dependencies": { | |
|
2227 | "ansi-styles": { | |
|
2228 | "version": "3.2.1", | |
|
2229 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | |
|
2230 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | |
|
2231 | "dev": true, | |
|
2232 | "requires": { | |
|
2233 | "color-convert": "^1.9.0" | |
|
2234 | } | |
|
2235 | }, | |
|
2236 | "color-convert": { | |
|
2237 | "version": "1.9.3", | |
|
2238 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | |
|
2239 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | |
|
2240 | "dev": true, | |
|
2241 | "requires": { | |
|
2242 | "color-name": "1.1.3" | |
|
2243 | } | |
|
2244 | }, | |
|
2245 | "color-name": { | |
|
2246 | "version": "1.1.3", | |
|
2247 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | |
|
2248 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | |
|
2249 | "dev": true | |
|
2250 | } | |
|
2251 | } | |
|
2252 | }, | |
|
2253 | "sprintf-js": { | |
|
2254 | "version": "1.0.3", | |
|
2255 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", | |
|
2256 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", | |
|
2257 | "dev": true | |
|
2258 | }, | |
|
2259 | "string-width": { | |
|
2260 | "version": "3.1.0", | |
|
2261 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", | |
|
2262 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", | |
|
2263 | "dev": true, | |
|
2264 | "requires": { | |
|
2265 | "emoji-regex": "^7.0.1", | |
|
2266 | "is-fullwidth-code-point": "^2.0.0", | |
|
2267 | "strip-ansi": "^5.1.0" | |
|
2268 | }, | |
|
2269 | "dependencies": { | |
|
2270 | "ansi-regex": { | |
|
2271 | "version": "4.1.0", | |
|
2272 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", | |
|
2273 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", | |
|
2274 | "dev": true | |
|
2275 | }, | |
|
2276 | "strip-ansi": { | |
|
2277 | "version": "5.2.0", | |
|
2278 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", | |
|
2279 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", | |
|
2280 | "dev": true, | |
|
2281 | "requires": { | |
|
2282 | "ansi-regex": "^4.1.0" | |
|
2283 | } | |
|
2284 | } | |
|
2285 | } | |
|
2286 | }, | |
|
2287 | "strip-ansi": { | |
|
2288 | "version": "6.0.0", | |
|
2289 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", | |
|
2290 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", | |
|
2291 | "dev": true, | |
|
2292 | "requires": { | |
|
2293 | "ansi-regex": "^5.0.0" | |
|
2294 | } | |
|
2295 | }, | |
|
2296 | "strip-json-comments": { | |
|
2297 | "version": "3.1.1", | |
|
2298 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", | |
|
2299 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", | |
|
2300 | "dev": true | |
|
2301 | }, | |
|
2302 | "supports-color": { | |
|
2303 | "version": "7.2.0", | |
|
2304 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", | |
|
2305 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", | |
|
2306 | "dev": true, | |
|
2307 | "requires": { | |
|
2308 | "has-flag": "^4.0.0" | |
|
2309 | } | |
|
2310 | }, | |
|
2311 | "table": { | |
|
2312 | "version": "5.4.6", | |
|
2313 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", | |
|
2314 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", | |
|
2315 | "dev": true, | |
|
2316 | "requires": { | |
|
2317 | "ajv": "^6.10.2", | |
|
2318 | "lodash": "^4.17.14", | |
|
2319 | "slice-ansi": "^2.1.0", | |
|
2320 | "string-width": "^3.0.0" | |
|
2321 | } | |
|
2322 | }, | |
|
2323 | "text-table": { | |
|
2324 | "version": "0.2.0", | |
|
2325 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", | |
|
2326 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", | |
|
2327 | "dev": true | |
|
2328 | }, | |
|
2329 | "tslib": { | |
|
2330 | "version": "1.14.1", | |
|
2331 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", | |
|
2332 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", | |
|
2333 | "dev": true | |
|
2334 | }, | |
|
2335 | "tslint": { | |
|
2336 | "version": "6.1.3", | |
|
2337 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", | |
|
2338 | "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", | |
|
2339 | "dev": true, | |
|
2340 | "requires": { | |
|
2341 | "@babel/code-frame": "^7.0.0", | |
|
2342 | "builtin-modules": "^1.1.1", | |
|
2343 | "chalk": "^2.3.0", | |
|
2344 | "commander": "^2.12.1", | |
|
2345 | "diff": "^4.0.1", | |
|
2346 | "glob": "^7.1.1", | |
|
2347 | "js-yaml": "^3.13.1", | |
|
2348 | "minimatch": "^3.0.4", | |
|
2349 | "mkdirp": "^0.5.3", | |
|
2350 | "resolve": "^1.3.2", | |
|
2351 | "semver": "^5.3.0", | |
|
2352 | "tslib": "^1.13.0", | |
|
2353 | "tsutils": "^2.29.0" | |
|
2354 | }, | |
|
2355 | "dependencies": { | |
|
2356 | "ansi-styles": { | |
|
2357 | "version": "3.2.1", | |
|
2358 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | |
|
2359 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | |
|
2360 | "dev": true, | |
|
2361 | "requires": { | |
|
2362 | "color-convert": "^1.9.0" | |
|
2363 | } | |
|
2364 | }, | |
|
2365 | "chalk": { | |
|
2366 | "version": "2.4.2", | |
|
2367 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", | |
|
2368 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", | |
|
2369 | "dev": true, | |
|
2370 | "requires": { | |
|
2371 | "ansi-styles": "^3.2.1", | |
|
2372 | "escape-string-regexp": "^1.0.5", | |
|
2373 | "supports-color": "^5.3.0" | |
|
2374 | } | |
|
2375 | }, | |
|
2376 | "color-convert": { | |
|
2377 | "version": "1.9.3", | |
|
2378 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | |
|
2379 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | |
|
2380 | "dev": true, | |
|
2381 | "requires": { | |
|
2382 | "color-name": "1.1.3" | |
|
2383 | } | |
|
2384 | }, | |
|
2385 | "color-name": { | |
|
2386 | "version": "1.1.3", | |
|
2387 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | |
|
2388 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | |
|
2389 | "dev": true | |
|
2390 | }, | |
|
2391 | "has-flag": { | |
|
2392 | "version": "3.0.0", | |
|
2393 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | |
|
2394 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", | |
|
2395 | "dev": true | |
|
2396 | }, | |
|
2397 | "semver": { | |
|
2398 | "version": "5.7.1", | |
|
2399 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", | |
|
2400 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", | |
|
2401 | "dev": true | |
|
2402 | }, | |
|
2403 | "supports-color": { | |
|
2404 | "version": "5.5.0", | |
|
2405 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | |
|
2406 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", | |
|
2407 | "dev": true, | |
|
2408 | "requires": { | |
|
2409 | "has-flag": "^3.0.0" | |
|
2410 | } | |
|
2411 | } | |
|
2412 | } | |
|
2413 | }, | |
|
2414 | "tsutils": { | |
|
2415 | "version": "2.29.0", | |
|
2416 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", | |
|
2417 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", | |
|
2418 | "dev": true, | |
|
2419 | "requires": { | |
|
2420 | "tslib": "^1.8.1" | |
|
2421 | } | |
|
2422 | }, | |
|
2423 | "type-check": { | |
|
2424 | "version": "0.4.0", | |
|
2425 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", | |
|
2426 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", | |
|
2427 | "dev": true, | |
|
2428 | "requires": { | |
|
2429 | "prelude-ls": "^1.2.1" | |
|
2430 | } | |
|
2431 | }, | |
|
2432 | "type-fest": { | |
|
2433 | "version": "0.8.1", | |
|
2434 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", | |
|
2435 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", | |
|
2436 | "dev": true | |
|
2437 | }, | |
|
2438 | "typescript": { | |
|
2439 | "version": "4.4.2", | |
|
2440 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", | |
|
2441 | "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", | |
|
2442 | "dev": true | |
|
2443 | }, | |
|
2444 | "uri-js": { | |
|
2445 | "version": "4.4.1", | |
|
2446 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", | |
|
2447 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", | |
|
2448 | "dev": true, | |
|
2449 | "requires": { | |
|
2450 | "punycode": "^2.1.0" | |
|
2451 | } | |
|
2452 | }, | |
|
2453 | "v8-compile-cache": { | |
|
2454 | "version": "2.3.0", | |
|
2455 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", | |
|
2456 | "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", | |
|
2457 | "dev": true | |
|
2458 | }, | |
|
2459 | "which": { | |
|
2460 | "version": "2.0.2", | |
|
2461 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", | |
|
2462 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", | |
|
2463 | "dev": true, | |
|
2464 | "requires": { | |
|
2465 | "isexe": "^2.0.0" | |
|
2466 | } | |
|
2467 | }, | |
|
2468 | "word-wrap": { | |
|
2469 | "version": "1.2.3", | |
|
2470 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", | |
|
2471 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", | |
|
2472 | "dev": true | |
|
2473 | }, | |
|
2474 | "wrappy": { | |
|
2475 | "version": "1.0.2", | |
|
2476 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", | |
|
2477 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", | |
|
2478 | "dev": true | |
|
2479 | }, | |
|
2480 | "write": { | |
|
2481 | "version": "1.0.3", | |
|
2482 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", | |
|
2483 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", | |
|
2484 | "dev": true, | |
|
2485 | "requires": { | |
|
2486 | "mkdirp": "^0.5.1" | |
|
2487 | } | |
|
2488 | }, | |
|
2489 | "yallist": { | |
|
2490 | "version": "4.0.0", | |
|
2491 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", | |
|
2492 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", | |
|
2493 | "dev": true | |
|
2494 | } | |
|
2495 | } | |
|
2496 | } |
@@ -0,0 +1,29 | |||
|
1 | { | |
|
2 | "version": "0.0.1", | |
|
3 | "description": "Improved version of the original dojo-typings", | |
|
4 | "author": "Implab team", | |
|
5 | "keywords": [ | |
|
6 | "dojo", | |
|
7 | "dojo-typings" | |
|
8 | ], | |
|
9 | "repository": { | |
|
10 | "type": "mercurial", | |
|
11 | "url": "https://code.implab.org/implab/implabjs-dojo-typings" | |
|
12 | }, | |
|
13 | "license": "MIT", | |
|
14 | "licenses": [ | |
|
15 | { | |
|
16 | "type": "MIT", | |
|
17 | "url": "http://www.opensource.org/licenses/MIT" | |
|
18 | } | |
|
19 | ], | |
|
20 | "publishConfig": { | |
|
21 | "access": "public" | |
|
22 | }, | |
|
23 | "devDependencies": { | |
|
24 | "@types/requirejs": "latest", | |
|
25 | "eslint": "7.7.0", | |
|
26 | "tslint": "6.1.3", | |
|
27 | "typescript": "^4.4.2" | |
|
28 | } | |
|
29 | } No newline at end of file |
@@ -0,0 +1,16 | |||
|
1 | { | |
|
2 | "extends": "../tsconfig", | |
|
3 | "compilerOptions": { | |
|
4 | "baseUrl": ".", | |
|
5 | "rootDir": "ts", | |
|
6 | "types": [ | |
|
7 | "requirejs" | |
|
8 | ], | |
|
9 | "module": "amd" | |
|
10 | }, | |
|
11 | "include": [ | |
|
12 | "typings/**/*.d.ts", | |
|
13 | "ts/**/*.ts", | |
|
14 | "ts/**/*.tsx" | |
|
15 | ] | |
|
16 | } No newline at end of file |
@@ -0,0 +1,242 | |||
|
1 | declare namespace dijit { | |
|
2 | namespace _base { | |
|
3 | ||
|
4 | /* dijit/_base/focus */ | |
|
5 | ||
|
6 | type Bookmark = { isCollapsed: boolean, mark?: Range }; | |
|
7 | type FocusNode = Element | null; | |
|
8 | type RemoveHandle = { remove(): void }; | |
|
9 | ||
|
10 | /** | |
|
11 | * Deprecated module to monitor currently focused node and stack of currently focused widgets. | |
|
12 | * | |
|
13 | * New code should access dijit/focus directly. | |
|
14 | */ | |
|
15 | interface Focus { | |
|
16 | /** | |
|
17 | * Currently focused item on screen | |
|
18 | */ | |
|
19 | _curFocus: FocusNode; | |
|
20 | ||
|
21 | /** | |
|
22 | * Previously focused item on screen | |
|
23 | */ | |
|
24 | _prevFocus: FocusNode; | |
|
25 | ||
|
26 | /** | |
|
27 | * Returns true if there is no text selected | |
|
28 | */ | |
|
29 | isCollapsed(): boolean; | |
|
30 | ||
|
31 | /** | |
|
32 | * Retrieves a bookmark that can be used with moveToBookmark to return to the same range | |
|
33 | */ | |
|
34 | getBookmark(): Bookmark; | |
|
35 | ||
|
36 | /** | |
|
37 | * Moves current selection to a bookmark | |
|
38 | */ | |
|
39 | moveToBookmark(bookmark: Bookmark): void; | |
|
40 | ||
|
41 | /** | |
|
42 | * Called as getFocus(), this returns an Object showing the current focus and selected text. | |
|
43 | * | |
|
44 | * Called as getFocus(widget), where widget is a (widget representing) a button that was just pressed, it returns where focus was before that button was pressed. (Pressing the button may have either shifted focus to the button, or removed focus altogether.) In this case the selected text is not returned, since it can't be accurately determined. | |
|
45 | */ | |
|
46 | getFocus(menu: dijit._WidgetBase, openedForWindow?: Window): { | |
|
47 | node: FocusNode; | |
|
48 | bookmark: any; | |
|
49 | openedForWindow?: Window | |
|
50 | }; | |
|
51 | ||
|
52 | /** | |
|
53 | * List of currently active widgets (focused widget and it's ancestors) | |
|
54 | */ | |
|
55 | _activeStack: dijit._WidgetBase[]; | |
|
56 | ||
|
57 | /** | |
|
58 | * Registers listeners on the specified iframe so that any click or focus event on that iframe (or anything in it) is reported as a focus/click event on the `<iframe>` itself. | |
|
59 | * | |
|
60 | * Currently only used by editor. | |
|
61 | */ | |
|
62 | registerIframe(iframe: HTMLIFrameElement): RemoveHandle; | |
|
63 | ||
|
64 | /** | |
|
65 | * Unregisters listeners on the specified iframe created by registerIframe. | |
|
66 | * After calling be sure to delete or null out the handle itself. | |
|
67 | */ | |
|
68 | unregisterIframe(handle?: RemoveHandle): void; | |
|
69 | ||
|
70 | /** | |
|
71 | * Registers listeners on the specified window (either the main window or an iframe's window) to detect when the user has clicked somewhere or focused somewhere. | |
|
72 | * | |
|
73 | * Users should call registerIframe() instead of this method. | |
|
74 | */ | |
|
75 | registerWin(targetWindow: Window, effectiveNode: Element): RemoveHandle; | |
|
76 | ||
|
77 | /** | |
|
78 | * Unregisters listeners on the specified window (either the main window or an iframe's window) according to handle returned from registerWin(). | |
|
79 | * After calling be sure to delete or null out the handle itself. | |
|
80 | */ | |
|
81 | unregisterWin(handle?: RemoveHandle): void; | |
|
82 | } | |
|
83 | ||
|
84 | /* dijit/_base/manager */ | |
|
85 | ||
|
86 | /** | |
|
87 | * Deprecated. Shim to methods on registry, plus a few other declarations. | |
|
88 | * | |
|
89 | * New code should access dijit/registry directly when possible. | |
|
90 | */ | |
|
91 | interface Manager { | |
|
92 | // copied from dijit.Registry | |
|
93 | byId(id: string | _WidgetBase): _WidgetBase; | |
|
94 | getUniqueId(widgetType: string): string; | |
|
95 | findWidgets(root: Node, skipNode?: Node): _WidgetBase[]; | |
|
96 | byNode(node: Node): _WidgetBase; | |
|
97 | getEnclosingWidgets(node: Node): _WidgetBase; | |
|
98 | ||
|
99 | defaultDuration: number; | |
|
100 | } | |
|
101 | ||
|
102 | /* dijit/_base/place */ | |
|
103 | ||
|
104 | type placeOnScreenAround = (node: Element, aroundNode: Element, aroundCorners: Object | any[], layoutNode?: dijit.LayoutNodeFunction) => void; | |
|
105 | ||
|
106 | /** | |
|
107 | * Deprecated back compatibility module, new code should use dijit/place directly instead of using this module. | |
|
108 | */ | |
|
109 | interface Place { | |
|
110 | /** | |
|
111 | * Deprecated method to return the dimensions and scroll position of the viewable area of a browser window. | |
|
112 | * | |
|
113 | * New code should use windowUtils.getBox() | |
|
114 | */ | |
|
115 | getViewport(): dojo.DomGeometryBox; | |
|
116 | ||
|
117 | placeOnScreen(node: Element, pos?: dijit.PlacePosition, corners?: dijit.PlaceCorner[], padding?: dijit.PlacePosition, layoutNode?: dijit.LayoutNodeFunction): PlaceLocation; | |
|
118 | ||
|
119 | /** | |
|
120 | * Like dijit.placeOnScreenAroundNode(), except it accepts an arbitrary object for the "around" argument and finds a proper processor to place a node. | |
|
121 | * | |
|
122 | * Deprecated, new code should use dijit/place.around() instead. | |
|
123 | */ | |
|
124 | placeOnScreenAroundElement: placeOnScreenAround; | |
|
125 | ||
|
126 | /** | |
|
127 | * Position node adjacent or kitty-corner to aroundNode such that it's fully visible in viewport. | |
|
128 | * | |
|
129 | * Deprecated, new code should use dijit/place.around() instead. | |
|
130 | */ | |
|
131 | placeOnScreenAroundNode: placeOnScreenAround; | |
|
132 | ||
|
133 | /** | |
|
134 | * Like dijit.placeOnScreenAroundNode(), except that the "around" parameter is an arbitrary rectangle on the screen (x, y, width, height) instead of a dom node. | |
|
135 | * | |
|
136 | * Deprecated, new code should use dijit/place.around() instead. | |
|
137 | */ | |
|
138 | placeOnScreenAroundRectangle: placeOnScreenAround; | |
|
139 | ||
|
140 | /** | |
|
141 | * Deprecated method, unneeded when using dijit/place directly. | |
|
142 | * | |
|
143 | * Transforms the passed array of preferred positions into a format suitable for passing as the aroundCorners argument to dijit/place.placeOnScreenAroundElement. | |
|
144 | */ | |
|
145 | getPopupAroundAlignment(position: string[], leftToRight?: boolean): { [s: string]: dijit.PlaceCorner }; | |
|
146 | } | |
|
147 | ||
|
148 | /* dijit/_base/popup */ | |
|
149 | ||
|
150 | /** | |
|
151 | * Deprecated. Old module for popups, new code should use dijit/popup directly. | |
|
152 | */ | |
|
153 | interface Popup extends dijit.PopupManager { } | |
|
154 | ||
|
155 | /* dijit/_base/scroll */ | |
|
156 | ||
|
157 | /** | |
|
158 | * Back compatibility module, new code should use windowUtils directly instead of using this module. | |
|
159 | */ | |
|
160 | interface Scroll { } | |
|
161 | ||
|
162 | /* dijit/_base/sniff */ | |
|
163 | ||
|
164 | /** | |
|
165 | * Deprecated, back compatibility module, new code should require dojo/uacss directly instead of this module. | |
|
166 | */ | |
|
167 | interface Sniff { } | |
|
168 | ||
|
169 | /* dijit/_base/typematic */ | |
|
170 | ||
|
171 | /** | |
|
172 | * Deprecated, for back-compat, just loads top level module | |
|
173 | */ | |
|
174 | interface Typematic { } | |
|
175 | ||
|
176 | /* dijit/_base/wai */ | |
|
177 | ||
|
178 | /** | |
|
179 | * Deprecated methods for setting/getting wai roles and states. | |
|
180 | * New code should call setAttribute()/getAttribute() directly. | |
|
181 | * | |
|
182 | * Also loads hccss to apply dj_a11y class to root node if machine is in high-contrast mode. | |
|
183 | */ | |
|
184 | interface Wai { | |
|
185 | /** | |
|
186 | * Determines if an element has a particular role. | |
|
187 | */ | |
|
188 | hasWaiRole(elem: Element, role: string): boolean; | |
|
189 | ||
|
190 | /** | |
|
191 | * Gets the role for an element (which should be a wai role). | |
|
192 | */ | |
|
193 | getWaiRole(elem: Element): string; | |
|
194 | ||
|
195 | /** | |
|
196 | * Sets the role on an element. | |
|
197 | */ | |
|
198 | setWaiRole(elem: Element, role: string): void; | |
|
199 | ||
|
200 | /** | |
|
201 | * Removes the specified role from an element. | |
|
202 | * Removes role attribute if no specific role provided (for backwards compat.) | |
|
203 | */ | |
|
204 | removeWaiRole(elem: Element, role: string): void; | |
|
205 | ||
|
206 | /** | |
|
207 | * Determines if an element has a given state. | |
|
208 | * | |
|
209 | * Checks for an attribute called "aria-"+state. | |
|
210 | */ | |
|
211 | hasWaiState(elem: Element, state: string): boolean; | |
|
212 | ||
|
213 | /** | |
|
214 | * Gets the value of a state on an element. | |
|
215 | * | |
|
216 | * Checks for an attribute called "aria-"+state. | |
|
217 | */ | |
|
218 | getWaiState(elem: Element, state: string): string; | |
|
219 | ||
|
220 | /** | |
|
221 | * Sets a state on an element. | |
|
222 | * | |
|
223 | * Sets an attribute called "aria-"+state. | |
|
224 | */ | |
|
225 | setWaiState(elem: Element, state: string, value: string): void; | |
|
226 | ||
|
227 | /** | |
|
228 | * Removes a state from an element. | |
|
229 | * | |
|
230 | * Sets an attribute called "aria-"+state. | |
|
231 | */ | |
|
232 | removeWaiState(elem: Element, state: string): void; | |
|
233 | } | |
|
234 | ||
|
235 | /* dijit/_base/window */ | |
|
236 | ||
|
237 | /** | |
|
238 | * Back compatibility module, new code should use windowUtils directly instead of using this module. | |
|
239 | */ | |
|
240 | interface Window { } | |
|
241 | } | |
|
242 | } |
This diff has been collapsed as it changes many lines, (2303 lines changed) Show them Hide them | |||
@@ -0,0 +1,2303 | |||
|
1 | /// <reference path="../dojo/index.d.ts" /> | |
|
2 | /// <reference path="form.d.ts" /> | |
|
3 | /// <reference path="layout.d.ts" /> | |
|
4 | ||
|
5 | declare namespace dijit { | |
|
6 | /* Global Dijit Interface */ | |
|
7 | interface Dijit { } | |
|
8 | ||
|
9 | /* dijit/_AttachMixin */ | |
|
10 | ||
|
11 | /* tslint:disable:class-name */ | |
|
12 | ||
|
13 | interface _WidgetBase { | |
|
14 | dojoAttachEvent: string; | |
|
15 | dojoAttachPoint: string; | |
|
16 | } | |
|
17 | ||
|
18 | interface _AttachMixin { | |
|
19 | /** | |
|
20 | * List of widget attribute names associated with data-dojo-attach-point=... in the template, ex: ["containerNode", "labelNode"] | |
|
21 | */ | |
|
22 | _attachPoints: string[]; | |
|
23 | ||
|
24 | /** | |
|
25 | * List of connections associated with data-dojo-attach-event=... in the template | |
|
26 | */ | |
|
27 | _attachEvents: dojo.Handle[]; | |
|
28 | ||
|
29 | /** | |
|
30 | * Object to which attach points and events will be scoped. Defaults to 'this'. | |
|
31 | */ | |
|
32 | attachScope: any; | |
|
33 | ||
|
34 | /** | |
|
35 | * Search descendants of this.containerNode for data-dojo-attach-point and data-dojo-attach-event. | |
|
36 | * | |
|
37 | * Should generally be left false (the default value) both for performance and to avoid failures when this.containerNode holds other _AttachMixin instances with their own attach points and events. | |
|
38 | */ | |
|
39 | searchContainerNode: boolean; | |
|
40 | ||
|
41 | /** | |
|
42 | * Attach to DOM nodes marked with special attributes. | |
|
43 | */ | |
|
44 | buildRendering(): void; | |
|
45 | ||
|
46 | /** | |
|
47 | * hook for _WidgetsInTemplateMixin | |
|
48 | */ | |
|
49 | _beforeFillContent(): void; | |
|
50 | ||
|
51 | /** | |
|
52 | * Iterate through the dom nodes and attach functions and nodes accordingly. | |
|
53 | * | |
|
54 | * Map widget properties and functions to the handlers specified in the dom node and it's descendants. This function iterates over all nodes and looks for these properties: | |
|
55 | * - dojoAttachPoint/data-dojo-attach-point | |
|
56 | * - dojoAttachEvent/data-dojo-attach-event | |
|
57 | */ | |
|
58 | _attachTemplateNodes(rootNode: Element | Node): void; | |
|
59 | ||
|
60 | /** | |
|
61 | * Process data-dojo-attach-point and data-dojo-attach-event for given node or widget. | |
|
62 | * | |
|
63 | * Returns true if caller should process baseNode's children too. | |
|
64 | */ | |
|
65 | _processTemplateNode<T extends (Element | Node | _WidgetBase)>( | |
|
66 | baseNode: T, | |
|
67 | getAttrFunc: (baseNode: T, attr: string) => string, | |
|
68 | attachFunc: (node: T, type: string, func?: Function) => dojo.Handle | |
|
69 | ): boolean; | |
|
70 | ||
|
71 | /** | |
|
72 | * Roughly corresponding to dojo/on, this is the default function for processing a data-dojo-attach-event. Meant to attach to DOMNodes, not to widgets. | |
|
73 | */ | |
|
74 | _attach(node: Element | Node, type: string, func?: Function): dojo.Handle; | |
|
75 | ||
|
76 | /** | |
|
77 | * Detach and clean up the attachments made in _attachtempalteNodes. | |
|
78 | */ | |
|
79 | _detachTemplateNodes(): void; | |
|
80 | ||
|
81 | destroyRendering(preserveDom?: boolean): void; | |
|
82 | } | |
|
83 | ||
|
84 | interface _AttachMixinConstructor extends dojo._base.DeclareConstructor<_AttachMixin> { } | |
|
85 | ||
|
86 | /* dijit/_BidiMixin */ | |
|
87 | ||
|
88 | interface _WidgetBase { | |
|
89 | ||
|
90 | /** | |
|
91 | * Gets the right direction of text. | |
|
92 | */ | |
|
93 | getTextDir(text: string): string; | |
|
94 | ||
|
95 | /** | |
|
96 | * Set element.dir according to this.textDir, assuming this.textDir has a value. | |
|
97 | */ | |
|
98 | applyTextDir(element: HTMLElement, text?: string): void; | |
|
99 | ||
|
100 | /** | |
|
101 | * Wraps by UCC (Unicode control characters) option's text according to this.textDir | |
|
102 | */ | |
|
103 | enforceTextDirWithUcc(option: HTMLOptionElement, text: string): string; | |
|
104 | ||
|
105 | /** | |
|
106 | * Restores the text of origObj, if needed, after enforceTextDirWithUcc, e.g. set("textDir", textDir). | |
|
107 | */ | |
|
108 | restoreOriginalText(origObj: HTMLOptionElement): HTMLOptionElement; | |
|
109 | } | |
|
110 | ||
|
111 | /* dijit/_ConfirmDialogMixin */ | |
|
112 | ||
|
113 | interface _ConfirmDialogMixin extends _WidgetsInTemplateMixin { | |
|
114 | /** | |
|
115 | * HTML snippet for action bar, overrides _DialogMixin.actionBarTemplate | |
|
116 | */ | |
|
117 | actionBarTemplate: string; | |
|
118 | ||
|
119 | /** | |
|
120 | * Label of OK button. | |
|
121 | */ | |
|
122 | buttonOk: string; | |
|
123 | ||
|
124 | /** | |
|
125 | * Label of cancel button. | |
|
126 | */ | |
|
127 | buttonCancel: string; | |
|
128 | } | |
|
129 | ||
|
130 | /* dijit/_Contained */ | |
|
131 | ||
|
132 | interface _Contained { | |
|
133 | /** | |
|
134 | * Returns the previous child of the parent or null if this is the | |
|
135 | * first child of the parent. | |
|
136 | */ | |
|
137 | getPreviousSibling<T extends _WidgetBase>(): T; | |
|
138 | ||
|
139 | /** | |
|
140 | * Returns the next child of the parent or null if this is the last | |
|
141 | * child of the parent. | |
|
142 | */ | |
|
143 | getNextSibling<T extends _WidgetBase>(): T; | |
|
144 | ||
|
145 | /** | |
|
146 | * Returns the index of this widget within its container parent. | |
|
147 | * It returns -1 if the parent does not exist or if the parent is | |
|
148 | * not a dijit/_Container. | |
|
149 | */ | |
|
150 | getIndexInParent(): number; | |
|
151 | } | |
|
152 | ||
|
153 | interface _ContainedConstructor extends dojo._base.DeclareConstructor<_Contained> { } | |
|
154 | ||
|
155 | /* dijit/_Container */ | |
|
156 | ||
|
157 | interface _Container { | |
|
158 | buildRendering(): void; | |
|
159 | ||
|
160 | /** | |
|
161 | * Makes the given widget a child of this widget. | |
|
162 | */ | |
|
163 | addChild<T extends _WidgetBase>(widget: T, insertIndex?: number): void; | |
|
164 | ||
|
165 | /** | |
|
166 | * Removes the passed widget instance from this widget but does | |
|
167 | * not destroy it. You can also pass in an integer indicating | |
|
168 | * the index within the container to remove (ie, removeChild(5) removes the sixth widget) | |
|
169 | */ | |
|
170 | removeChild<T extends _WidgetBase>(widget: T): void; | |
|
171 | removeChild<T extends number>(widget: number): void; | |
|
172 | ||
|
173 | /** | |
|
174 | * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. | |
|
175 | */ | |
|
176 | hasChildren(): boolean; | |
|
177 | ||
|
178 | /** | |
|
179 | * Gets the index of the child in this container or -1 if not found | |
|
180 | */ | |
|
181 | getIndexOfChild<T extends _WidgetBase>(widget: T): number; | |
|
182 | } | |
|
183 | ||
|
184 | interface _ContainerConstructor extends dojo._base.DeclareConstructor<_Container> { } | |
|
185 | ||
|
186 | /* dijit/_CssStateMixin */ | |
|
187 | ||
|
188 | interface CSSStateNodes { | |
|
189 | [node: string]: string; | |
|
190 | } | |
|
191 | ||
|
192 | interface _CssStateMixin { | |
|
193 | /** | |
|
194 | * True if cursor is over this widget | |
|
195 | */ | |
|
196 | hovering: boolean; | |
|
197 | ||
|
198 | /** | |
|
199 | * True if mouse was pressed while over this widget, and hasn't been released yet | |
|
200 | */ | |
|
201 | active: boolean; | |
|
202 | } | |
|
203 | ||
|
204 | interface _CssStateMixinConstructor extends dojo._base.DeclareConstructor<_CssStateMixin> { } | |
|
205 | ||
|
206 | /* dijit/_DialogMixin */ | |
|
207 | ||
|
208 | interface _DialogMixin { | |
|
209 | /** | |
|
210 | * HTML snippet to show the action bar (gray bar with OK/cancel buttons). | |
|
211 | * Blank by default, but used by ConfirmDialog/ConfirmTooltipDialog subclasses. | |
|
212 | */ | |
|
213 | actionBarTemplate: string; | |
|
214 | ||
|
215 | /** | |
|
216 | * Callback when the user hits the submit button. | |
|
217 | * Override this method to handle Dialog execution. | |
|
218 | */ | |
|
219 | execute(formContents?: any): void; | |
|
220 | ||
|
221 | /** | |
|
222 | * Called when user has pressed the Dialog's cancel button, to notify container. | |
|
223 | */ | |
|
224 | onCancel(): void; | |
|
225 | ||
|
226 | /** | |
|
227 | * Called when user has pressed the dialog's OK button, to notify container. | |
|
228 | */ | |
|
229 | onExecute(): void; | |
|
230 | } | |
|
231 | ||
|
232 | /* dijit/_FocusMixin */ | |
|
233 | interface _FocusMixin { } | |
|
234 | ||
|
235 | interface _WidgetBase { | |
|
236 | /** | |
|
237 | * Called when the widget becomes "active" because | |
|
238 | * it or a widget inside of it either has focus, or has recently | |
|
239 | * been clicked. | |
|
240 | */ | |
|
241 | onFocus(): void; | |
|
242 | ||
|
243 | /** | |
|
244 | * Called when the widget stops being "active" because | |
|
245 | * focus moved to something outside of it, or the user | |
|
246 | * clicked somewhere outside of it, or the widget was | |
|
247 | * hidden. | |
|
248 | */ | |
|
249 | onBlur(): void; | |
|
250 | } | |
|
251 | ||
|
252 | /* dijit/_HasDropDown */ | |
|
253 | ||
|
254 | interface _HasDropDown<T extends _WidgetBase> extends _FocusMixin { | |
|
255 | /** | |
|
256 | * The button/icon/node to click to display the drop down. | |
|
257 | * Can be set via a data-dojo-attach-point assignment. | |
|
258 | * If missing, then either focusNode or domNode (if focusNode is also missing) will be used. | |
|
259 | */ | |
|
260 | _buttonNode: HTMLElement; | |
|
261 | ||
|
262 | /** | |
|
263 | * Will set CSS class dijitUpArrow, dijitDownArrow, dijitRightArrow etc. on this node depending | |
|
264 | * on where the drop down is set to be positioned. | |
|
265 | * Can be set via a data-dojo-attach-point assignment. | |
|
266 | * If missing, then _buttonNode will be used. | |
|
267 | */ | |
|
268 | _arrowWrapperNode: HTMLElement; | |
|
269 | ||
|
270 | /** | |
|
271 | * The node to set the aria-expanded class on. | |
|
272 | * Also sets popupActive class but that will be removed in 2.0. | |
|
273 | * Can be set via a data-dojo-attach-point assignment. | |
|
274 | * If missing, then focusNode or _buttonNode (if focusNode is missing) will be used. | |
|
275 | */ | |
|
276 | _popupStateNode: HTMLElement; | |
|
277 | ||
|
278 | /** | |
|
279 | * The node to display the popup around. | |
|
280 | * Can be set via a data-dojo-attach-point assignment. | |
|
281 | * If missing, then domNode will be used. | |
|
282 | */ | |
|
283 | _aroundNode: HTMLElement; | |
|
284 | ||
|
285 | /** | |
|
286 | * The widget to display as a popup. This widget *must* be | |
|
287 | * defined before the startup function is called. | |
|
288 | */ | |
|
289 | dropDown: T; | |
|
290 | ||
|
291 | /** | |
|
292 | * Set to true to make the drop down at least as wide as this | |
|
293 | * widget. Set to false if the drop down should just be its | |
|
294 | * default width. | |
|
295 | */ | |
|
296 | autoWidth: boolean; | |
|
297 | ||
|
298 | /** | |
|
299 | * Set to true to make the drop down exactly as wide as this | |
|
300 | * widget. Overrides autoWidth. | |
|
301 | */ | |
|
302 | forceWidth: boolean; | |
|
303 | ||
|
304 | /** | |
|
305 | * The max height for our dropdown. | |
|
306 | * Any dropdown taller than this will have scrollbars. | |
|
307 | * Set to 0 for no max height, or -1 to limit height to available space in viewport | |
|
308 | */ | |
|
309 | maxHeight: number; | |
|
310 | ||
|
311 | /** | |
|
312 | * This variable controls the position of the drop down. | |
|
313 | * It's an array of strings | |
|
314 | */ | |
|
315 | dropDownPosition: string[]; | |
|
316 | /* TODO remove for TS 1.8 */ | |
|
317 | /* dropDownPosition: ('before' | 'after' | 'above' | 'below')[]; */ | |
|
318 | ||
|
319 | /** | |
|
320 | * When set to false, the click events will not be stopped, in | |
|
321 | * case you want to use them in your subclass | |
|
322 | */ | |
|
323 | _stopClickEvents: boolean; | |
|
324 | ||
|
325 | /** | |
|
326 | * Callback when the user mousedown/touchstart on the arrow icon. | |
|
327 | */ | |
|
328 | _onDropDownMouseDown(e: MouseEvent): void; | |
|
329 | ||
|
330 | /** | |
|
331 | * Callback on mouseup/touchend after mousedown/touchstart on the arrow icon. | |
|
332 | * Note that this function is called regardless of what node the event occurred on (but only after | |
|
333 | * a mousedown/touchstart on the arrow). | |
|
334 | */ | |
|
335 | _onDropDownMouseUp(e?: MouseEvent): void; | |
|
336 | ||
|
337 | /** | |
|
338 | * The drop down was already opened on mousedown/keydown; just need to stop the event | |
|
339 | */ | |
|
340 | _onDropDownClick(e: MouseEvent): void; | |
|
341 | ||
|
342 | buildRendering(): void; | |
|
343 | postCreate(): void; | |
|
344 | destroy(preserveDom?: boolean): void; | |
|
345 | ||
|
346 | /** | |
|
347 | * Returns true if the dropdown exists and it's data is loaded. This can | |
|
348 | * be overridden in order to force a call to loadDropDown(). | |
|
349 | */ | |
|
350 | isLoaded(): boolean; | |
|
351 | ||
|
352 | /** | |
|
353 | * Creates the drop down if it doesn't exist, loads the data | |
|
354 | * if there's an href and it hasn't been loaded yet, and then calls | |
|
355 | * the given callback. | |
|
356 | */ | |
|
357 | loadDropDown(loadCallback: () => void): void; | |
|
358 | ||
|
359 | /** | |
|
360 | * Creates the drop down if it doesn't exist, loads the data | |
|
361 | * if there's an href and it hasn't been loaded yet, and | |
|
362 | * then opens the drop down. This is basically a callback when the | |
|
363 | * user presses the down arrow button to open the drop down. | |
|
364 | */ | |
|
365 | loadAndOpenDropDown(): dojo.Deferred<T>; | |
|
366 | ||
|
367 | /** | |
|
368 | * Callback when the user presses the down arrow button or presses | |
|
369 | * the down arrow key to open/close the drop down. | |
|
370 | * Toggle the drop-down widget; if it is up, close it, if not, open it | |
|
371 | */ | |
|
372 | toggleDropDown(): void; | |
|
373 | ||
|
374 | /** | |
|
375 | * Opens the dropdown for this widget. To be called only when this.dropDown | |
|
376 | * has been created and is ready to display (ie, it's data is loaded). | |
|
377 | */ | |
|
378 | openDropDown(): PlaceLocation; | |
|
379 | ||
|
380 | /** | |
|
381 | * Closes the drop down on this widget | |
|
382 | */ | |
|
383 | closeDropDown(focus?: boolean): void; | |
|
384 | } | |
|
385 | ||
|
386 | /* dijit/_OnDijitClickMixin */ | |
|
387 | ||
|
388 | interface _OnDijitClickMixin { | |
|
389 | /** | |
|
390 | * override _WidgetBase.connect() to make this.connect(node, "ondijitclick", ...) work | |
|
391 | */ | |
|
392 | connect(obj: any, event: string | dojo.ExtensionEvent, method: string | dojo.EventListener): dojo.WatchHandle; | |
|
393 | } | |
|
394 | ||
|
395 | interface _OnDijitClickMixinConstructor { | |
|
396 | /** | |
|
397 | * Deprecated. New code should access the dijit/a11yclick event directly, ex: | |
|
398 | * | this.own(on(node, a11yclick, function(){ ... })); | |
|
399 | * | |
|
400 | * Mixing in this class will make _WidgetBase.connect(node, "ondijitclick", ...) work. | |
|
401 | * It also used to be necessary to make templates with ondijitclick work, but now you can just require | |
|
402 | * dijit/a11yclick. | |
|
403 | */ | |
|
404 | new (): _OnDijitClickMixin; | |
|
405 | a11yclick: A11yClick; | |
|
406 | } | |
|
407 | ||
|
408 | /* dijit/_TemplatedMixin */ | |
|
409 | ||
|
410 | interface _TemplatedMixin extends _AttachMixin { | |
|
411 | ||
|
412 | /** | |
|
413 | * A string that represents the widget template. | |
|
414 | * Use in conjunction with dojo.cache() to load from a file. | |
|
415 | */ | |
|
416 | templateString: string; | |
|
417 | ||
|
418 | /** | |
|
419 | * Path to template (HTML file) for this widget relative to dojo.baseUrl. | |
|
420 | * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead | |
|
421 | */ | |
|
422 | templatePath: string; | |
|
423 | ||
|
424 | /** | |
|
425 | * Set _AttachMixin.searchContainerNode to true for back-compat for widgets that have data-dojo-attach-point's | |
|
426 | * and events inside this.containerNode. Remove for 2.0. | |
|
427 | */ | |
|
428 | searchContainerNode: boolean; | |
|
429 | ||
|
430 | /** | |
|
431 | * Construct the UI for this widget from a template, setting this.domNode. | |
|
432 | */ | |
|
433 | buildRendering(): void; | |
|
434 | } | |
|
435 | ||
|
436 | interface _TemplatedMixinConstructor extends _WidgetBaseConstructor<_TemplatedMixin> { | |
|
437 | /** | |
|
438 | * Static method to get a template based on the templatePath or | |
|
439 | * templateString key | |
|
440 | */ | |
|
441 | getCachedTemplate(templateString: string, alwaysUseString: string, doc?: Document): string | HTMLElement; | |
|
442 | } | |
|
443 | ||
|
444 | /* dijit/_Widget */ | |
|
445 | interface _Widget extends _WidgetBase, _OnDijitClickMixin, _FocusMixin { | |
|
446 | /** | |
|
447 | * Connect to this function to receive notifications of mouse click events. | |
|
448 | */ | |
|
449 | onClick(event: MouseEvent): void; | |
|
450 | ||
|
451 | /** | |
|
452 | * Connect to this function to receive notifications of mouse double click events. | |
|
453 | */ | |
|
454 | onDblClick(event: MouseEvent): void; | |
|
455 | ||
|
456 | /** | |
|
457 | * Connect to this function to receive notifications of keys being pressed down. | |
|
458 | */ | |
|
459 | onKeyDown(event: KeyboardEvent): void; | |
|
460 | ||
|
461 | /** | |
|
462 | * Connect to this function to receive notifications of printable keys being typed. | |
|
463 | */ | |
|
464 | onKeyPress(event: KeyboardEvent): void; | |
|
465 | ||
|
466 | /** | |
|
467 | * Connect to this function to receive notifications of keys being released. | |
|
468 | */ | |
|
469 | onKeyUp(event: KeyboardEvent): void; | |
|
470 | ||
|
471 | /** | |
|
472 | * Connect to this function to receive notifications of when the mouse button is pressed down. | |
|
473 | */ | |
|
474 | onMouseDown(event: MouseEvent): void; | |
|
475 | ||
|
476 | /** | |
|
477 | * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. | |
|
478 | */ | |
|
479 | onMouseMove(event: MouseEvent): void; | |
|
480 | ||
|
481 | /** | |
|
482 | * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. | |
|
483 | */ | |
|
484 | onMouseOut(event: MouseEvent): void; | |
|
485 | ||
|
486 | /** | |
|
487 | * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. | |
|
488 | */ | |
|
489 | onMouseOver(event: MouseEvent): void; | |
|
490 | ||
|
491 | /** | |
|
492 | * Connect to this function to receive notifications of when the mouse moves off of this widget. | |
|
493 | */ | |
|
494 | onMouseLeave(event: MouseEvent): void; | |
|
495 | ||
|
496 | /** | |
|
497 | * Connect to this function to receive notifications of when the mouse moves onto this widget. | |
|
498 | */ | |
|
499 | onMouseEnter(event: MouseEvent): void; | |
|
500 | ||
|
501 | /** | |
|
502 | * Connect to this function to receive notifications of when the mouse button is released. | |
|
503 | */ | |
|
504 | onMouseUp(event: MouseEvent): void; | |
|
505 | ||
|
506 | postCreate(): void; | |
|
507 | ||
|
508 | /** | |
|
509 | * Deprecated. Use set() instead. | |
|
510 | */ | |
|
511 | setAttribute(attr: string, value: any): void; | |
|
512 | ||
|
513 | /** | |
|
514 | * This method is deprecated, use get() or set() directly. | |
|
515 | */ | |
|
516 | attr(name: string | { [attr: string]: any }, value?: any): any; | |
|
517 | ||
|
518 | /** | |
|
519 | * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. | |
|
520 | */ | |
|
521 | getDescendants(): _Widget[]; | |
|
522 | ||
|
523 | /** | |
|
524 | * Called when this widget becomes the selected pane in a | |
|
525 | * `dijit/layout/TabContainer`, `dijit/layout/StackContainer`, | |
|
526 | * `dijit/layout/AccordionContainer`, etc. | |
|
527 | * | |
|
528 | * Also called to indicate display of a `dijit.Dialog`, `dijit.TooltipDialog`, or `dijit.TitlePane`. | |
|
529 | */ | |
|
530 | onShow(): void; | |
|
531 | ||
|
532 | /** | |
|
533 | * Called when another widget becomes the selected pane in a | |
|
534 | * `dijit/layout/TabContainer`, `dijit/layout/StackContainer`, | |
|
535 | * `dijit/layout/AccordionContainer`, etc. | |
|
536 | * | |
|
537 | * Also called to indicate hide of a `dijit.Dialog`, `dijit.TooltipDialog`, or `dijit.TitlePane`. | |
|
538 | */ | |
|
539 | onHide(): void; | |
|
540 | ||
|
541 | /** | |
|
542 | * Called when this widget is being displayed as a popup (ex: a Calendar popped | |
|
543 | * up from a DateTextBox), and it is hidden. | |
|
544 | * This is called from the dijit.popup code, and should not be called directly. | |
|
545 | * | |
|
546 | * Also used as a parameter for children of `dijit/layout/StackContainer` or subclasses. | |
|
547 | * Callback if a user tries to close the child. Child will be closed if this function returns true. | |
|
548 | */ | |
|
549 | onClose(): boolean; | |
|
550 | } | |
|
551 | ||
|
552 | /* dijit/_WidgetBase */ | |
|
553 | interface _WidgetBase<Attrs = any> extends dojo.Stateful<Attrs>, Destroyable { | |
|
554 | ||
|
555 | /** | |
|
556 | * A unique, opaque ID string that can be assigned by users or by the | |
|
557 | * system. If the developer passes an ID which is known not to be | |
|
558 | * unique, the specified ID is ignored and the system-generated ID is | |
|
559 | * used instead. | |
|
560 | */ | |
|
561 | id: string; | |
|
562 | ||
|
563 | /** | |
|
564 | * Rarely used. Overrides the default Dojo locale used to render this widget, | |
|
565 | * as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute. | |
|
566 | * Value must be among the list of locales specified during by the Dojo bootstrap, | |
|
567 | * formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us). | |
|
568 | */ | |
|
569 | lang: string; | |
|
570 | ||
|
571 | /** | |
|
572 | * Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir) | |
|
573 | * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's | |
|
574 | * default direction. | |
|
575 | */ | |
|
576 | dir: string; | |
|
577 | ||
|
578 | /** | |
|
579 | * HTML class attribute | |
|
580 | */ | |
|
581 | class: string; | |
|
582 | ||
|
583 | /** | |
|
584 | * HTML style attributes as cssText string or name/value hash | |
|
585 | */ | |
|
586 | style: string; | |
|
587 | ||
|
588 | /** | |
|
589 | * HTML title attribute. | |
|
590 | * | |
|
591 | * For form widgets this specifies a tooltip to display when hovering over | |
|
592 | * the widget (just like the native HTML title attribute). | |
|
593 | * | |
|
594 | * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, | |
|
595 | * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's | |
|
596 | * interpreted as HTML. | |
|
597 | */ | |
|
598 | title: string; | |
|
599 | ||
|
600 | /** | |
|
601 | * When this widget's title attribute is used to for a tab label, accordion pane title, etc., | |
|
602 | * this specifies the tooltip to appear when the mouse is hovered over that text. | |
|
603 | */ | |
|
604 | tooltip: string; | |
|
605 | ||
|
606 | /** | |
|
607 | * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate | |
|
608 | * widget state. | |
|
609 | */ | |
|
610 | baseClass: string; | |
|
611 | ||
|
612 | /** | |
|
613 | * pointer to original DOM node | |
|
614 | */ | |
|
615 | srcNodeRef: HTMLElement; | |
|
616 | ||
|
617 | /** | |
|
618 | * This is our visible representation of the widget! Other DOM | |
|
619 | * Nodes may by assigned to other properties, usually through the | |
|
620 | * template system's data-dojo-attach-point syntax, but the domNode | |
|
621 | * property is the canonical "top level" node in widget UI. | |
|
622 | */ | |
|
623 | domNode: HTMLElement; | |
|
624 | ||
|
625 | /** | |
|
626 | * Designates where children of the source DOM node will be placed. | |
|
627 | * "Children" in this case refers to both DOM nodes and widgets. | |
|
628 | */ | |
|
629 | containerNode: HTMLElement; | |
|
630 | ||
|
631 | /** | |
|
632 | * The document this widget belongs to. If not specified to constructor, will default to | |
|
633 | * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global | |
|
634 | */ | |
|
635 | ownerDocument: HTMLElement; | |
|
636 | ||
|
637 | /** | |
|
638 | * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute | |
|
639 | * for each XXX attribute to be mapped to the DOM. | |
|
640 | */ | |
|
641 | attributeMap: { [attribute: string]: any }; | |
|
642 | ||
|
643 | /** | |
|
644 | * Bi-directional support, the main variable which is responsible for the direction of the text. | |
|
645 | * The text direction can be different than the GUI direction by using this parameter in creation | |
|
646 | * of a widget. | |
|
647 | */ | |
|
648 | textDir: string; | |
|
649 | ||
|
650 | /** | |
|
651 | * Kicks off widget instantiation. See create() for details. | |
|
652 | */ | |
|
653 | postscript(params?: any, srcNodeRef?: HTMLElement): void; | |
|
654 | ||
|
655 | /** | |
|
656 | * Kick off the life-cycle of a widget | |
|
657 | */ | |
|
658 | create(params?: any, srcNodeRef?: HTMLElement): void; | |
|
659 | ||
|
660 | /** | |
|
661 | * Called after the parameters to the widget have been read-in, | |
|
662 | * but before the widget template is instantiated. Especially | |
|
663 | * useful to set properties that are referenced in the widget | |
|
664 | * template. | |
|
665 | */ | |
|
666 | postMixInProperties(): void; | |
|
667 | ||
|
668 | /** | |
|
669 | * Construct the UI for this widget, setting this.domNode. | |
|
670 | * Most widgets will mixin `dijit._TemplatedMixin`, which implements this method. | |
|
671 | */ | |
|
672 | buildRendering(): void; | |
|
673 | ||
|
674 | /** | |
|
675 | * Processing after the DOM fragment is created | |
|
676 | */ | |
|
677 | postCreate(): void; | |
|
678 | ||
|
679 | /** | |
|
680 | * Processing after the DOM fragment is added to the document | |
|
681 | */ | |
|
682 | startup(): void; | |
|
683 | ||
|
684 | /** | |
|
685 | * Destroy this widget and its descendants | |
|
686 | */ | |
|
687 | destroyRecursive(preserveDom?: boolean): void; | |
|
688 | ||
|
689 | /** | |
|
690 | * Destroys the DOM nodes associated with this widget. | |
|
691 | */ | |
|
692 | destroyRendering(preserveDom?: boolean): void; | |
|
693 | ||
|
694 | /** | |
|
695 | * Recursively destroy the children of this widget and their | |
|
696 | * descendants. | |
|
697 | */ | |
|
698 | destroyDescendants(preserveDom?: boolean): void; | |
|
699 | ||
|
700 | /** | |
|
701 | * Deprecated. Override destroy() instead to implement custom widget tear-down | |
|
702 | * behavior. | |
|
703 | */ | |
|
704 | uninitialize(): boolean; | |
|
705 | ||
|
706 | /** | |
|
707 | * Used by widgets to signal that a synthetic event occurred, ex: | |
|
708 | * | myWidget.emit("attrmodified-selectedChildWidget", {}). | |
|
709 | */ | |
|
710 | emit(type: string, eventObj?: any, callbackArgs?: any[]): any; | |
|
711 | ||
|
712 | /** | |
|
713 | * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). | |
|
714 | */ | |
|
715 | on(type: string | dojo.ExtensionEvent, func: dojo.EventListener | Function): dojo.WatchHandle; | |
|
716 | ||
|
717 | /** | |
|
718 | * Returns a string that represents the widget. | |
|
719 | */ | |
|
720 | toString(): string; | |
|
721 | ||
|
722 | /** | |
|
723 | * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent | |
|
724 | * is this widget. Note that it does not return all descendants, but rather just direct children. | |
|
725 | */ | |
|
726 | getChildren<T extends _WidgetBase>(): T[]; | |
|
727 | ||
|
728 | /** | |
|
729 | * Returns the parent widget of this widget. | |
|
730 | */ | |
|
731 | getParent<T extends _WidgetBase>(): T; | |
|
732 | ||
|
733 | /** | |
|
734 | * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. | |
|
735 | */ | |
|
736 | connect(obj: any, event: string | dojo.ExtensionEvent, method: string | dojo.EventListener): dojo.WatchHandle; | |
|
737 | ||
|
738 | /** | |
|
739 | * Deprecated, will be removed in 2.0, use handle.remove() instead. | |
|
740 | */ | |
|
741 | disconnect(handle: dojo.WatchHandle): void; | |
|
742 | ||
|
743 | /** | |
|
744 | * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. | |
|
745 | */ | |
|
746 | subscribe(t: string, method: dojo.EventListener): dojo.WatchHandle; | |
|
747 | ||
|
748 | /** | |
|
749 | * Deprecated, will be removed in 2.0, use handle.remove() instead. | |
|
750 | */ | |
|
751 | unsubscribe(handle: dojo.WatchHandle): void; | |
|
752 | ||
|
753 | /** | |
|
754 | * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) | |
|
755 | */ | |
|
756 | isLeftToRight(): boolean; | |
|
757 | ||
|
758 | /** | |
|
759 | * Return true if this widget can currently be focused | |
|
760 | * and false if not | |
|
761 | */ | |
|
762 | isFocusable(): boolean; | |
|
763 | ||
|
764 | /** | |
|
765 | * Place this widget somewhere in the DOM based | |
|
766 | * on standard domConstruct.place() conventions. | |
|
767 | */ | |
|
768 | placeAt<T extends _WidgetBase>(reference: dojo.NodeFragmentOrString | T, position?: string | number): this; | |
|
769 | ||
|
770 | /** | |
|
771 | * Wrapper to setTimeout to avoid deferred functions executing | |
|
772 | * after the originating widget has been destroyed. | |
|
773 | * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). | |
|
774 | */ | |
|
775 | defer(fcn: Function, delay?: number): dojo.Handle; | |
|
776 | } | |
|
777 | ||
|
778 | interface _WidgetBaseConstructor<W> extends Pick<dojo._base.DeclareConstructor<W>, Exclude<keyof dojo._base.DeclareConstructor<W>, 'new'>> { | |
|
779 | new (params?: Partial<W> & ThisType<W>, srcNodeRef?: dojo.NodeOrString): W & dojo._base.DeclareCreatedObject; | |
|
780 | } | |
|
781 | ||
|
782 | /* dijit/_WidgetsInTemplateMixin */ | |
|
783 | ||
|
784 | interface _WidgetsInTemplateMixin { | |
|
785 | /** | |
|
786 | * Used to provide a context require to dojo/parser in order to be | |
|
787 | * able to use relative MIDs (e.g. `./Widget`) in the widget's template. | |
|
788 | */ | |
|
789 | contextRequire: Function; | |
|
790 | ||
|
791 | startup(): void; | |
|
792 | } | |
|
793 | ||
|
794 | interface _WidgetsInTemplateMixinConstructor extends dojo._base.DeclareConstructor<_WidgetsInTemplateMixin> { | |
|
795 | new (params: Object, srcNodeRef: dojo.NodeOrString): _WidgetsInTemplateMixin; | |
|
796 | } | |
|
797 | ||
|
798 | /* dijit/a11yclick */ | |
|
799 | ||
|
800 | interface A11yClick { | |
|
801 | ||
|
802 | /** | |
|
803 | * Custom press, release, and click synthetic events | |
|
804 | * which trigger on a left mouse click, touch, or space/enter keyup. | |
|
805 | */ | |
|
806 | (node: HTMLElement, listener: Function): dojo.Handle; | |
|
807 | ||
|
808 | /** | |
|
809 | * Mousedown (left button), touchstart, or keydown (space or enter) corresponding to logical click operation. | |
|
810 | */ | |
|
811 | press: dojo.ExtensionEvent; | |
|
812 | ||
|
813 | /** | |
|
814 | * Mouseup (left button), touchend, or keyup (space or enter) corresponding to logical click operation. | |
|
815 | */ | |
|
816 | release: dojo.ExtensionEvent; | |
|
817 | ||
|
818 | /** | |
|
819 | * Mouse cursor or a finger is dragged over the given node. | |
|
820 | */ | |
|
821 | move: dojo.ExtensionEvent; | |
|
822 | } | |
|
823 | ||
|
824 | /* dijit/Calendar */ | |
|
825 | ||
|
826 | interface _MonthDropDownButton extends form.DropDownButton<_MonthDropDown> { | |
|
827 | onMonthSelect(): void; | |
|
828 | postCreate(): void; | |
|
829 | ||
|
830 | set(name: 'month', value: number): this; | |
|
831 | set(name: string, value: any): this; | |
|
832 | set(values: Object): this; | |
|
833 | } | |
|
834 | ||
|
835 | interface _MonthDropDownButtonConstructor extends _WidgetBaseConstructor<_MonthDropDownButton> { } | |
|
836 | ||
|
837 | interface _MonthDropDown extends _Widget, _TemplatedMixin, _CssStateMixin { | |
|
838 | months: string[]; | |
|
839 | baseClass: string; | |
|
840 | templateString: string; | |
|
841 | ||
|
842 | /** | |
|
843 | * Callback when month is selected from drop down | |
|
844 | */ | |
|
845 | onChange(month: number): void; | |
|
846 | ||
|
847 | set(name: 'months', value: string[]): this; | |
|
848 | set(name: string, value: any): this; | |
|
849 | set(values: Object): this; | |
|
850 | } | |
|
851 | ||
|
852 | interface _MonthDropDownConstructor extends _WidgetBaseConstructor<_MonthDropDown> { } | |
|
853 | ||
|
854 | interface Calendar extends CalendarLite, _Widget, _CssStateMixin { | |
|
855 | ||
|
856 | baseClass: string; | |
|
857 | ||
|
858 | /** | |
|
859 | * Set node classes for various mouse events, see dijit._CssStateMixin for more details | |
|
860 | */ | |
|
861 | cssStateNodes: CSSStateNodes; | |
|
862 | ||
|
863 | /** | |
|
864 | * Creates the drop down button that displays the current month and lets user pick a new one | |
|
865 | */ | |
|
866 | _createMonthWidget(): _MonthDropDownButton; | |
|
867 | ||
|
868 | postCreate(): void; | |
|
869 | ||
|
870 | /** | |
|
871 | * Handler for when user selects a month from the drop down list | |
|
872 | */ | |
|
873 | _onMonthSelect(newMonth: number): void; | |
|
874 | ||
|
875 | /** | |
|
876 | * Handler for mouse over events on days, sets hovered style | |
|
877 | */ | |
|
878 | _onDayMouseOver(evt: MouseEvent): void; | |
|
879 | ||
|
880 | /** | |
|
881 | * Handler for mouse out events on days, clears hovered style | |
|
882 | */ | |
|
883 | _onDayMouseOut(evt: MouseEvent): void; | |
|
884 | _onDayMouseDown(evt: MouseEvent): void; | |
|
885 | _onDayMouseUp(evt: MouseEvent): void; | |
|
886 | ||
|
887 | /** | |
|
888 | * Provides keyboard navigation of calendar. | |
|
889 | */ | |
|
890 | handleKey(evt: KeyboardEvent): void; | |
|
891 | ||
|
892 | /** | |
|
893 | * For handling keydown events on a stand alone calendar | |
|
894 | */ | |
|
895 | _onKeyDown(evt: KeyboardEvent): void; | |
|
896 | ||
|
897 | /** | |
|
898 | * Deprecated. Notification that a date cell was selected. It may be the same as the previous value. | |
|
899 | */ | |
|
900 | onValueSelected(date: Date): void; | |
|
901 | ||
|
902 | onChange(date: Date): void; | |
|
903 | ||
|
904 | /** | |
|
905 | * May be overridden to return CSS classes to associate with the date entry for the given dateObject | |
|
906 | * for example to indicate a holiday in specified locale. | |
|
907 | */ | |
|
908 | getClassForDate(dateObject: Date, locale?: string): string; | |
|
909 | ||
|
910 | get(name: 'value'): Date; | |
|
911 | get(name: string): any; | |
|
912 | ||
|
913 | set(name: 'value', value: number | Date): this; | |
|
914 | set(name: string, value: any): this; | |
|
915 | set(values: Object): this; | |
|
916 | } | |
|
917 | ||
|
918 | interface CalendarConstructor extends _WidgetBaseConstructor<Calendar> { | |
|
919 | _MonthWidget: _MonthWidgetConstructor; | |
|
920 | _MonthDropDown: _MonthDropDownButtonConstructor; | |
|
921 | _MonthDropDownButton: _MonthDropDownButtonConstructor; | |
|
922 | } | |
|
923 | ||
|
924 | /* dijit/CalendarLite */ | |
|
925 | ||
|
926 | interface _MonthWidget extends _WidgetBase { | |
|
927 | set(name: 'month', value: Date): this; | |
|
928 | set(name: string, value: any): this; | |
|
929 | set(values: Object): this; | |
|
930 | } | |
|
931 | ||
|
932 | interface _MonthWidgetConstructor extends _WidgetBaseConstructor<_MonthWidget> { } | |
|
933 | ||
|
934 | interface CalendarLite extends _WidgetBase, _TemplatedMixin { | |
|
935 | /** | |
|
936 | * Template for main calendar | |
|
937 | */ | |
|
938 | templateString: string; | |
|
939 | ||
|
940 | /** | |
|
941 | * Template for cell for a day of the week (ex: M) | |
|
942 | */ | |
|
943 | dowTemplateString: string; | |
|
944 | ||
|
945 | dateTemplateString: string; | |
|
946 | weekTemplateString: string; | |
|
947 | ||
|
948 | /** | |
|
949 | * The currently selected Date, initially set to invalid date to indicate no selection. | |
|
950 | */ | |
|
951 | value: Date; | |
|
952 | ||
|
953 | /** | |
|
954 | * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines | |
|
955 | * at dojo/date and dojo/date/locale. | |
|
956 | */ | |
|
957 | datePackage: string; | |
|
958 | ||
|
959 | /** | |
|
960 | * How to represent the days of the week in the calendar header. See locale | |
|
961 | */ | |
|
962 | dayWidth: string; | |
|
963 | ||
|
964 | /** | |
|
965 | * Order fields are traversed when user hits the tab key | |
|
966 | */ | |
|
967 | tabIndex: string; | |
|
968 | ||
|
969 | /** | |
|
970 | * (Optional) The first day of week override. By default the first day of week is determined | |
|
971 | * for the current locale (extracted from the CLDR). | |
|
972 | * Special value -1 (default value), means use locale dependent value. | |
|
973 | */ | |
|
974 | dayOffset: number; | |
|
975 | ||
|
976 | /** | |
|
977 | * Date object containing the currently focused date, or the date which would be focused | |
|
978 | * if the calendar itself was focused. Also indicates which year and month to display, | |
|
979 | * i.e. the current "page" the calendar is on. | |
|
980 | */ | |
|
981 | currentFocus: Date; | |
|
982 | ||
|
983 | /** | |
|
984 | * Put the summary to the node with role=grid | |
|
985 | */ | |
|
986 | _setSummaryAttr: string; | |
|
987 | ||
|
988 | baseClass: string; | |
|
989 | ||
|
990 | /** | |
|
991 | * Runs various tests on the value, checking that it's a valid date, rather | |
|
992 | * than blank or NaN. | |
|
993 | */ | |
|
994 | _isValidDate(value: Date): boolean; | |
|
995 | ||
|
996 | /** | |
|
997 | * Convert Number into Date, or copy Date object. Then, round to nearest day, | |
|
998 | * setting to 1am to avoid issues when DST shift occurs at midnight, see #8521, #9366) | |
|
999 | */ | |
|
1000 | _patchDate(value: number | Date): Date; | |
|
1001 | ||
|
1002 | /** | |
|
1003 | * This just sets the content of node to the specified text. | |
|
1004 | * Can't do "node.innerHTML=text" because of an IE bug w/tables, see #3434. | |
|
1005 | */ | |
|
1006 | _setText(node: HTMLElement, text?: string): void; | |
|
1007 | ||
|
1008 | /** | |
|
1009 | * Fills in the calendar grid with each day (1-31). | |
|
1010 | * Call this on creation, when moving to a new month. | |
|
1011 | */ | |
|
1012 | _populateGrid(): void; | |
|
1013 | ||
|
1014 | /** | |
|
1015 | * Fill in localized month, and prev/current/next years | |
|
1016 | */ | |
|
1017 | _populateControls(): void; | |
|
1018 | ||
|
1019 | /** | |
|
1020 | * Sets calendar's value to today's date | |
|
1021 | */ | |
|
1022 | goToToday(): void; | |
|
1023 | ||
|
1024 | /** | |
|
1025 | * Creates the drop down button that displays the current month and lets user pick a new one | |
|
1026 | */ | |
|
1027 | _createMonthWidget(): void; | |
|
1028 | ||
|
1029 | buildRendering(): void; | |
|
1030 | postCreate(): void; | |
|
1031 | ||
|
1032 | /** | |
|
1033 | * Set up connects for increment/decrement of months/years | |
|
1034 | */ | |
|
1035 | _connectControls(): void; | |
|
1036 | ||
|
1037 | /** | |
|
1038 | * If the calendar currently has focus, then focuses specified date, | |
|
1039 | * changing the currently displayed month/year if necessary. | |
|
1040 | * If the calendar doesn't have focus, updates currently | |
|
1041 | * displayed month/year, and sets the cell that will get focus | |
|
1042 | * when Calendar is focused. | |
|
1043 | */ | |
|
1044 | _setCurrentFocusAttr(date: Date, forceFocus?: boolean): void; | |
|
1045 | ||
|
1046 | /** | |
|
1047 | * Focus the calendar by focusing one of the calendar cells | |
|
1048 | */ | |
|
1049 | focus(): void; | |
|
1050 | ||
|
1051 | /** | |
|
1052 | * Handler for day clicks, selects the date if appropriate | |
|
1053 | */ | |
|
1054 | _onDayClick(evt: MouseEvent): void; | |
|
1055 | ||
|
1056 | /** | |
|
1057 | * Returns the cell corresponding to the date, or null if the date is not within the currently | |
|
1058 | * displayed month. | |
|
1059 | */ | |
|
1060 | _getNodeByDate(value: Date): HTMLElement; | |
|
1061 | ||
|
1062 | /** | |
|
1063 | * Marks the specified cells as selected, and clears cells previously marked as selected. | |
|
1064 | * For CalendarLite at most one cell is selected at any point, but this allows an array | |
|
1065 | * for easy subclassing. | |
|
1066 | */ | |
|
1067 | _markSelectedDates(dates: Date[]): void; | |
|
1068 | ||
|
1069 | /** | |
|
1070 | * Called only when the selected date has changed | |
|
1071 | */ | |
|
1072 | onChange(date: Date): void; | |
|
1073 | ||
|
1074 | /** | |
|
1075 | * May be overridden to disable certain dates in the calendar e.g. `isDisabledDate=dojo.date.locale.isWeekend` | |
|
1076 | */ | |
|
1077 | isDisabledDate(dateObject: Date, locale?: string): boolean; | |
|
1078 | ||
|
1079 | /** | |
|
1080 | * May be overridden to return CSS classes to associate with the date entry for the given dateObject, | |
|
1081 | * for example to indicate a holiday in specified locale. | |
|
1082 | */ | |
|
1083 | getClassForDate(dateObject: Date, locale?: string): string; | |
|
1084 | ||
|
1085 | get(name: 'value'): Date; | |
|
1086 | get(name: string): any; | |
|
1087 | ||
|
1088 | set(name: 'value', value: number | Date): this; | |
|
1089 | set(name: string, value: any): this; | |
|
1090 | set(values: Object): this; | |
|
1091 | } | |
|
1092 | ||
|
1093 | interface CalendarLiteConstructor extends _WidgetBaseConstructor<CalendarLite> { | |
|
1094 | _MonthWidget: _MonthWidgetConstructor; | |
|
1095 | } | |
|
1096 | ||
|
1097 | /* dijit/Destroyable */ | |
|
1098 | ||
|
1099 | interface Destroyable { | |
|
1100 | _destroyed?: true; | |
|
1101 | ||
|
1102 | /** | |
|
1103 | * Destroy this class, releasing any resources registered via own(). | |
|
1104 | */ | |
|
1105 | destroy(preserveDom?: boolean): void; | |
|
1106 | ||
|
1107 | /** | |
|
1108 | * Track specified handles and remove/destroy them when this instance is destroyed, unless they were | |
|
1109 | * already removed/destroyed manually. | |
|
1110 | */ | |
|
1111 | own(...args: any[]): any[]; | |
|
1112 | } | |
|
1113 | ||
|
1114 | /** | |
|
1115 | * Mixin to track handles and release them when instance is destroyed. | |
|
1116 | */ | |
|
1117 | interface DestroyableConstructor extends dojo._base.DeclareConstructor<Destroyable> { } | |
|
1118 | ||
|
1119 | /** dijit/_KeyNavMixin */ | |
|
1120 | ||
|
1121 | /** | |
|
1122 | * A mixin to allow arrow key and letter key navigation of child or descendant widgets. | |
|
1123 | * It can be used by dijit/_Container based widgets with a flat list of children, or more complex widgets like dijit/Tree. | |
|
1124 | * | |
|
1125 | * To use this mixin, the subclass must: | |
|
1126 | * | |
|
1127 | * - Implement _getNext(), _getFirst(), _getLast(), _onLeftArrow(), _onRightArrow() _onDownArrow(), _onUpArrow() methods to handle home/end/left/right/up/down keystrokes. Next and previous in this context refer to a linear ordering of the descendants used by letter key search. | |
|
1128 | * - Set all descendants' initial tabIndex to "-1"; both initial descendants and any descendants added later, by for example addChild() | |
|
1129 | * - Define childSelector to a function or string that identifies focusable descendant widgets | |
|
1130 | * | |
|
1131 | * Also, child widgets must implement a focus() method. | |
|
1132 | */ | |
|
1133 | interface _KeyNavMixin extends _FocusMixin { | |
|
1134 | /** | |
|
1135 | * Tab index of the container; same as HTML tabIndex attribute. | |
|
1136 | * Note then when user tabs into the container, focus is immediately moved to the first item in the container. | |
|
1137 | */ | |
|
1138 | tabIndex: string; | |
|
1139 | ||
|
1140 | /** | |
|
1141 | * Selector (passed to on.selector()) used to identify what to treat as a child widget. Used to monitor focus events and set this.focusedChild. Must be set by implementing class. If this is a string (ex: "> *") then the implementing class must require dojo/query. | |
|
1142 | */ | |
|
1143 | childSelector: string | Function | null; | |
|
1144 | ||
|
1145 | /** | |
|
1146 | * Called on left arrow key, or right arrow key if widget is in RTL mode. | |
|
1147 | * Should go back to the previous child in horizontal container widgets like Toolbar. | |
|
1148 | */ | |
|
1149 | _onLeftArrow(evt?: KeyboardEvent): void; | |
|
1150 | ||
|
1151 | /** | |
|
1152 | * Called on right arrow key, or left arrow key if widget is in RTL mode. | |
|
1153 | * Should go to the next child in horizontal container widgets like Toolbar. | |
|
1154 | */ | |
|
1155 | _onRightArrow(evt?: KeyboardEvent): void; | |
|
1156 | ||
|
1157 | /** | |
|
1158 | * Called on up arrow key. Should go to the previous child in vertical container widgets like Menu. | |
|
1159 | */ | |
|
1160 | _onUpArrow(evt?: KeyboardEvent): void; | |
|
1161 | ||
|
1162 | /** | |
|
1163 | * Called on down arrow key. Should go to the next child in vertical container widgets like Menu. | |
|
1164 | */ | |
|
1165 | _onDownArrow(evt?: KeyboardEvent): void; | |
|
1166 | ||
|
1167 | /** | |
|
1168 | * Default focus() implementation: focus the first child. | |
|
1169 | */ | |
|
1170 | focus(): void; | |
|
1171 | ||
|
1172 | /** | |
|
1173 | * Returns first child that can be focused. | |
|
1174 | */ | |
|
1175 | _getFirstFocusableChild(): _WidgetBase; | |
|
1176 | ||
|
1177 | /** | |
|
1178 | * Returns last child that can be focused. | |
|
1179 | */ | |
|
1180 | _getLastFocusableChild(): _WidgetBase; | |
|
1181 | ||
|
1182 | /** | |
|
1183 | * Focus the first focusable child in the container. | |
|
1184 | */ | |
|
1185 | focusFirstChild(): void; | |
|
1186 | ||
|
1187 | /** | |
|
1188 | * Focus the last focusable child in the container. | |
|
1189 | */ | |
|
1190 | focusLastChild(): void; | |
|
1191 | ||
|
1192 | /** | |
|
1193 | * Focus specified child widget. | |
|
1194 | * | |
|
1195 | * @param widget Reference to container's child widget | |
|
1196 | * @param last If true and if widget has multiple focusable nodes, focus the last one instead of the first one | |
|
1197 | */ | |
|
1198 | focusChild(widget: _WidgetBase, last?: boolean): void; | |
|
1199 | ||
|
1200 | /** | |
|
1201 | * Handler for when the container itself gets focus. | |
|
1202 | * | |
|
1203 | * Initially the container itself has a tabIndex, but when it gets focus, switch focus to first child. | |
|
1204 | */ | |
|
1205 | _onContainerFocus(evt: Event): void; | |
|
1206 | ||
|
1207 | /** | |
|
1208 | * Called when a child widget gets focus, either by user clicking it, or programatically by arrow key handling code. | |
|
1209 | * | |
|
1210 | * It marks that the current node is the selected one, and the previously selected node no longer is. | |
|
1211 | */ | |
|
1212 | _onChildFocus(child?: _WidgetBase): void; | |
|
1213 | ||
|
1214 | _searchString: string; | |
|
1215 | ||
|
1216 | multiCharSearchDuration: number; | |
|
1217 | ||
|
1218 | /** | |
|
1219 | * When a key is pressed that matches a child item, this method is called so that a widget can take appropriate action is necessary. | |
|
1220 | */ | |
|
1221 | onKeyboardSearch(tem: _WidgetBase, evt: Event, searchString: string, numMatches: number): void; | |
|
1222 | ||
|
1223 | /** | |
|
1224 | * Compares the searchString to the widget's text label, returning: | |
|
1225 | * | |
|
1226 | * * -1: a high priority match and stop searching | |
|
1227 | * * 0: not a match | |
|
1228 | * * 1: a match but keep looking for a higher priority match | |
|
1229 | */ | |
|
1230 | _keyboardSearchCompare(item: _WidgetBase, searchString: string): -1 | 0 | 1; | |
|
1231 | ||
|
1232 | /** | |
|
1233 | * When a key is pressed, if it's an arrow key etc. then it's handled here. | |
|
1234 | */ | |
|
1235 | _onContainerKeydown(evt: Event): void; | |
|
1236 | ||
|
1237 | /** | |
|
1238 | * When a printable key is pressed, it's handled here, searching by letter. | |
|
1239 | */ | |
|
1240 | _onContainerKeypress(evt: Event): void; | |
|
1241 | ||
|
1242 | /** | |
|
1243 | * Perform a search of the widget's options based on the user's keyboard activity | |
|
1244 | * | |
|
1245 | * Called on keypress (and sometimes keydown), searches through this widget's children looking for items that match the user's typed search string. Multiple characters typed within 1 sec of each other are combined for multicharacter searching. | |
|
1246 | */ | |
|
1247 | _keyboardSearch(evt: Event, keyChar: string): void; | |
|
1248 | ||
|
1249 | /** | |
|
1250 | * Called when focus leaves a child widget to go to a sibling widget. | |
|
1251 | */ | |
|
1252 | _onChildBlur(widget: _WidgetBase): void; | |
|
1253 | ||
|
1254 | /** | |
|
1255 | * Returns the next or previous focusable descendant, compared to "child". | |
|
1256 | * Implements and extends _KeyNavMixin._getNextFocusableChild() for a _Container. | |
|
1257 | */ | |
|
1258 | _getNextFocusableChild(child: _WidgetBase, dir: 1 | -1): _WidgetBase | null; | |
|
1259 | ||
|
1260 | /** | |
|
1261 | * Returns the first child. | |
|
1262 | */ | |
|
1263 | _getFirst(): _WidgetBase | null; | |
|
1264 | ||
|
1265 | /** | |
|
1266 | * Returns the last descendant. | |
|
1267 | */ | |
|
1268 | _getLast(): _WidgetBase | null; | |
|
1269 | ||
|
1270 | /** | |
|
1271 | * Returns the next descendant, compared to "child". | |
|
1272 | */ | |
|
1273 | _getNext(child: _WidgetBase, dir: 1 | -1): _WidgetBase | null; | |
|
1274 | } | |
|
1275 | ||
|
1276 | interface _KeyNavMixinConstructor extends dojo._base.DeclareConstructor<_KeyNavMixin> { } | |
|
1277 | ||
|
1278 | /* dijit/_KeyNavContainer */ | |
|
1279 | ||
|
1280 | /** | |
|
1281 | * A _Container with keyboard navigation of its children. | |
|
1282 | * | |
|
1283 | * Provides normalized keyboard and focusing code for Container widgets. | |
|
1284 | * To use this mixin, call connectKeyNavHandlers() in postCreate(). | |
|
1285 | * Also, child widgets must implement a focus() method. | |
|
1286 | */ | |
|
1287 | interface _KeyNavContainer extends _FocusMixin, _KeyNavMixin, _Container { | |
|
1288 | /** | |
|
1289 | * Deprecated. You can call this in postCreate() to attach the keyboard handlers to the container, but the preferred method is to override _onLeftArrow() and _onRightArrow(), or _onUpArrow() and _onDownArrow(), to call focusPrev() and focusNext(). | |
|
1290 | * | |
|
1291 | * @param prevKeyCodes Key codes for navigating to the previous child. | |
|
1292 | * @param nextKeyCodes Key codes for navigating to the next child. | |
|
1293 | */ | |
|
1294 | connectKeyNavHandlers(prevKeyCodes: number[], nextKeyCodes: number[]): void; | |
|
1295 | ||
|
1296 | /** | |
|
1297 | * @deprecated | |
|
1298 | */ | |
|
1299 | startupKeyNavChildren(): void; | |
|
1300 | ||
|
1301 | /** | |
|
1302 | * Setup for each child widget. | |
|
1303 | * | |
|
1304 | * Sets tabIndex=-1 on each child, so that the tab key will leave the container rather than visiting each child. | |
|
1305 | * | |
|
1306 | * Note: if you add children by a different method than addChild(), then need to call this manually or at least make sure the child's tabIndex is -1. | |
|
1307 | * | |
|
1308 | * Note: see also _LayoutWidget.setupChild(), which is also called for each child widget. | |
|
1309 | */ | |
|
1310 | _startupChild(widget: _WidgetBase): void; | |
|
1311 | ||
|
1312 | /** | |
|
1313 | * Returns the first child. | |
|
1314 | */ | |
|
1315 | _getFirst(): _Widget | null; | |
|
1316 | ||
|
1317 | /** | |
|
1318 | * Returns the last descendant. | |
|
1319 | */ | |
|
1320 | _getLast(): _Widget | null; | |
|
1321 | ||
|
1322 | /** | |
|
1323 | * Focus the next widget | |
|
1324 | */ | |
|
1325 | focusNext(): void; | |
|
1326 | ||
|
1327 | /** | |
|
1328 | * Focus the last focusable node in the previous widget | |
|
1329 | * | |
|
1330 | * (ex: go to the ComboButton icon section rather than button section) | |
|
1331 | */ | |
|
1332 | focusPrev(): void; | |
|
1333 | ||
|
1334 | /** | |
|
1335 | * Implement _KeyNavMixin.childSelector, to identify focusable child nodes. | |
|
1336 | * | |
|
1337 | * If we allowed a dojo/query dependency from this module this could more simply be a string "> *" instead of this function. | |
|
1338 | */ | |
|
1339 | childSelector(node: Element | Node): boolean | void | any; | |
|
1340 | } | |
|
1341 | ||
|
1342 | interface _KeyNavContainerConstructor extends dojo._base.DeclareConstructor<_KeyNavContainer> { } | |
|
1343 | ||
|
1344 | /* dijit/_MenuBase */ | |
|
1345 | ||
|
1346 | /** | |
|
1347 | * Abstract base class for Menu and MenuBar. | |
|
1348 | * Subclass should implement _onUpArrow(), _onDownArrow(), _onLeftArrow(), and _onRightArrow(). | |
|
1349 | */ | |
|
1350 | interface _MenuBase extends _Widget, _TemplatedMixin, _KeyNavContainer, _CssStateMixin { | |
|
1351 | selected: MenuItem | null; | |
|
1352 | ||
|
1353 | _setSelectedAttr(item?: MenuItem | null): void; | |
|
1354 | ||
|
1355 | /** | |
|
1356 | * This Menu has been clicked (mouse or via space/arrow key) or opened as a submenu, so mere mouseover will open submenus. Focusing a menu via TAB does NOT automatically make it active since TAB is a navigation operation and not a selection one. | |
|
1357 | * | |
|
1358 | * For Windows apps, pressing the ALT key focuses the menubar menus (similar to TAB navigation) but the menu is not active (ie no dropdown) until an item is clicked. | |
|
1359 | */ | |
|
1360 | activated: boolean; | |
|
1361 | ||
|
1362 | _setActivatedAttr(val: boolean): void; | |
|
1363 | ||
|
1364 | /** | |
|
1365 | * pointer to menu that displayed me | |
|
1366 | */ | |
|
1367 | parentMenu: _Widget | null; | |
|
1368 | ||
|
1369 | /** | |
|
1370 | * After a menu has been activated (by clicking on it etc.), number of milliseconds before hovering (without clicking) another MenuItem causes that MenuItem's popup to automatically open. | |
|
1371 | */ | |
|
1372 | popupDelay: number; | |
|
1373 | ||
|
1374 | /** | |
|
1375 | * For a passive (unclicked) Menu, number of milliseconds before hovering (without clicking) will cause the popup to open. Default is Infinity, meaning you need to click the menu to open it. | |
|
1376 | */ | |
|
1377 | passivePopupDelay: number; | |
|
1378 | ||
|
1379 | /** | |
|
1380 | * A toggle to control whether or not a Menu gets focused when opened as a drop down from a MenuBar or DropDownButton/ComboButton. Note though that it always get focused when opened via the keyboard. | |
|
1381 | */ | |
|
1382 | autoFocus: boolean; | |
|
1383 | ||
|
1384 | /** | |
|
1385 | * Selector (passed to on.selector()) used to identify MenuItem child widgets, but exclude inert children like MenuSeparator. If subclass overrides to a string (ex: "> *"), the subclass must require dojo/query. | |
|
1386 | */ | |
|
1387 | childSelector(node: Element | Node): boolean | void | Function; | |
|
1388 | ||
|
1389 | /** | |
|
1390 | * Attach point for notification about when a menu item has been executed. This is an internal mechanism used for Menus to signal to their parent to close them, because they are about to execute the onClick handler. In general developers should not attach to or override this method. | |
|
1391 | */ | |
|
1392 | onExecute(): void; | |
|
1393 | ||
|
1394 | /** | |
|
1395 | * Attach point for notification about when the user cancels the current menu | |
|
1396 | * This is an internal mechanism used for Menus to signal to their parent to close them. In general developers should not attach to or override this method. | |
|
1397 | */ | |
|
1398 | onCancel(): void; | |
|
1399 | ||
|
1400 | /** | |
|
1401 | * This handles the right arrow key (left arrow key on RTL systems), which will either open a submenu, or move to the next item in the ancestor MenuBar | |
|
1402 | */ | |
|
1403 | _moveToPopup(evt: Event): void; | |
|
1404 | ||
|
1405 | /** | |
|
1406 | * This handler is called when the mouse moves over the popup. | |
|
1407 | */ | |
|
1408 | _onPopupHover(evt?: MouseEvent): void; | |
|
1409 | ||
|
1410 | /** | |
|
1411 | * Called when cursor is over a MenuItem. | |
|
1412 | */ | |
|
1413 | onItemHover(item: MenuItem): void; | |
|
1414 | ||
|
1415 | /** | |
|
1416 | * Called when a child MenuItem becomes deselected. Setup timer to close its popup. | |
|
1417 | */ | |
|
1418 | _onChildDeselect(item: MenuItem): void; | |
|
1419 | ||
|
1420 | /** | |
|
1421 | * Callback fires when mouse exits a MenuItem | |
|
1422 | */ | |
|
1423 | onItemUnhover(item: MenuItem): void; | |
|
1424 | ||
|
1425 | /** | |
|
1426 | * Cancels the popup timer because the user has stop hovering on the MenuItem, etc. | |
|
1427 | */ | |
|
1428 | _stopPopupTimer(): void; | |
|
1429 | ||
|
1430 | /** | |
|
1431 | * Cancels the pending-close timer because the close has been preempted | |
|
1432 | */ | |
|
1433 | _stopPendingCloseTimer(): void; | |
|
1434 | ||
|
1435 | /** | |
|
1436 | * Returns the top menu in this chain of Menus | |
|
1437 | */ | |
|
1438 | _getTopMenu(): void; | |
|
1439 | ||
|
1440 | /** | |
|
1441 | * Handle clicks on an item. | |
|
1442 | */ | |
|
1443 | onItemClick(item: _WidgetBase, evt: Event): void; | |
|
1444 | ||
|
1445 | /** | |
|
1446 | * Open the popup to the side of/underneath the current menu item, and optionally focus first item | |
|
1447 | */ | |
|
1448 | _openItemPopup(fromItem: MenuItem, focus: boolean): void; | |
|
1449 | ||
|
1450 | /** | |
|
1451 | * Callback when this menu is opened. | |
|
1452 | * This is called by the popup manager as notification that the menu was opened. | |
|
1453 | */ | |
|
1454 | onOpen(evt?: Event): void; | |
|
1455 | ||
|
1456 | /** | |
|
1457 | * Callback when this menu is closed. | |
|
1458 | * This is called by the popup manager as notification that the menu was closed. | |
|
1459 | */ | |
|
1460 | onClose(): boolean; | |
|
1461 | ||
|
1462 | /** | |
|
1463 | * Called when submenu is clicked or focus is lost. Close hierarchy of menus. | |
|
1464 | */ | |
|
1465 | _closeChild(): void; | |
|
1466 | /** | |
|
1467 | * Called when child of this Menu gets focus from: | |
|
1468 | * | |
|
1469 | * 1. clicking it | |
|
1470 | * 2. tabbing into it | |
|
1471 | * 3. being opened by a parent menu. | |
|
1472 | * | |
|
1473 | * This is not called just from mouse hover. | |
|
1474 | */ | |
|
1475 | _onItemFocus(item: MenuItem): void; | |
|
1476 | ||
|
1477 | /** | |
|
1478 | * Called when focus is moved away from this Menu and it's submenus. | |
|
1479 | */ | |
|
1480 | _onBlur(): void; | |
|
1481 | ||
|
1482 | /** | |
|
1483 | * Called when the user is done with this menu. Closes hierarchy of menus. | |
|
1484 | */ | |
|
1485 | _cleanUp(clearSelectedItem?: boolean): void; | |
|
1486 | } | |
|
1487 | ||
|
1488 | interface _MenuBaseConstructor extends _WidgetBaseConstructor<_MenuBase> { } | |
|
1489 | ||
|
1490 | /* dijit/Dialog */ | |
|
1491 | ||
|
1492 | interface _DialogBase extends _TemplatedMixin, form._FormMixin, _DialogMixin, _CssStateMixin { | |
|
1493 | templateString: string; | |
|
1494 | baseClass: string; | |
|
1495 | cssStateNodes: CSSStateNodes; | |
|
1496 | ||
|
1497 | /** | |
|
1498 | * True if Dialog is currently displayed on screen. | |
|
1499 | */ | |
|
1500 | open: boolean; | |
|
1501 | ||
|
1502 | /** | |
|
1503 | * The time in milliseconds it takes the dialog to fade in and out | |
|
1504 | */ | |
|
1505 | duration: number; | |
|
1506 | ||
|
1507 | /** | |
|
1508 | * A Toggle to modify the default focus behavior of a Dialog, which | |
|
1509 | * is to re-focus the element which had focus before being opened. | |
|
1510 | * False will disable refocusing. Default: true | |
|
1511 | */ | |
|
1512 | refocus: boolean; | |
|
1513 | ||
|
1514 | /** | |
|
1515 | * A Toggle to modify the default focus behavior of a Dialog, which | |
|
1516 | * is to focus on the first dialog element after opening the dialog. | |
|
1517 | * False will disable autofocusing. Default: true | |
|
1518 | */ | |
|
1519 | autofocus: boolean; | |
|
1520 | ||
|
1521 | /** | |
|
1522 | * Toggles the movable aspect of the Dialog. If true, Dialog | |
|
1523 | * can be dragged by it's title. If false it will remain centered | |
|
1524 | * in the viewport. | |
|
1525 | */ | |
|
1526 | draggable: boolean; | |
|
1527 | ||
|
1528 | /** | |
|
1529 | * Maximum size to allow the dialog to expand to, relative to viewport size | |
|
1530 | */ | |
|
1531 | maxRatio: number; | |
|
1532 | ||
|
1533 | /** | |
|
1534 | * Dialog show [x] icon to close itself, and ESC key will close the dialog. | |
|
1535 | */ | |
|
1536 | closable: boolean; | |
|
1537 | postMixInProperties(): void; | |
|
1538 | postCreate(): void; | |
|
1539 | ||
|
1540 | /** | |
|
1541 | * Called when data has been loaded from an href. | |
|
1542 | * Unlike most other callbacks, this function can be connected to (via `dojo.connect`) | |
|
1543 | * but should *not* be overridden. | |
|
1544 | */ | |
|
1545 | onLoad(data?: any): void; | |
|
1546 | ||
|
1547 | focus(): void; | |
|
1548 | ||
|
1549 | /* Not entirely sure of the resolution type of these promises */ | |
|
1550 | ||
|
1551 | /** | |
|
1552 | * Display the dialog | |
|
1553 | */ | |
|
1554 | show(): dojo.promise.Promise<any>; | |
|
1555 | ||
|
1556 | /** | |
|
1557 | * Hide the dialog | |
|
1558 | */ | |
|
1559 | hide(): dojo.promise.Promise<any>; | |
|
1560 | ||
|
1561 | /** | |
|
1562 | * Called with no argument when viewport scrolled or viewport size changed. Adjusts Dialog as | |
|
1563 | * necessary to keep it visible. | |
|
1564 | * | |
|
1565 | * Can also be called with an argument (by dojox/layout/ResizeHandle etc.) to explicitly set the | |
|
1566 | * size of the dialog. | |
|
1567 | */ | |
|
1568 | resize(dim?: dojo.DomGeometryWidthHeight): void; | |
|
1569 | ||
|
1570 | destroy(preserveDom?: boolean): void; | |
|
1571 | } | |
|
1572 | ||
|
1573 | interface _DialogBaseConstructor extends _WidgetBaseConstructor<_DialogBase> { } | |
|
1574 | ||
|
1575 | interface Dialog extends layout.ContentPane, _DialogBase { | |
|
1576 | /* overrides conflicting methods */ | |
|
1577 | resize(dim?: dojo.DomGeometryWidthHeight): void; | |
|
1578 | } | |
|
1579 | ||
|
1580 | interface DialogLevelManager { | |
|
1581 | _beginZIndex: number; | |
|
1582 | ||
|
1583 | /** | |
|
1584 | * Call right before fade-in animation for new dialog. | |
|
1585 | * | |
|
1586 | * Saves current focus, displays/adjusts underlay for new dialog, | |
|
1587 | * and sets the z-index of the dialog itself. | |
|
1588 | * | |
|
1589 | * New dialog will be displayed on top of all currently displayed dialogs. | |
|
1590 | * Caller is responsible for setting focus in new dialog after the fade-in | |
|
1591 | * animation completes. | |
|
1592 | */ | |
|
1593 | show(dialog: _WidgetBase, underlayAttrs: Object): void; | |
|
1594 | ||
|
1595 | /** | |
|
1596 | * Called when the specified dialog is hidden/destroyed, after the fade-out | |
|
1597 | * animation ends, in order to reset page focus, fix the underlay, etc. | |
|
1598 | * If the specified dialog isn't open then does nothing. | |
|
1599 | * | |
|
1600 | * Caller is responsible for either setting display:none on the dialog domNode, | |
|
1601 | * or calling dijit/popup.hide(), or removing it from the page DOM. | |
|
1602 | */ | |
|
1603 | hide(dialog: _WidgetBase): void; | |
|
1604 | ||
|
1605 | /** | |
|
1606 | * Returns true if specified Dialog is the top in the task | |
|
1607 | */ | |
|
1608 | isTop(dialog: _WidgetBase): boolean; | |
|
1609 | } | |
|
1610 | ||
|
1611 | interface DialogConstructor extends _WidgetBaseConstructor<Dialog> { | |
|
1612 | /** | |
|
1613 | * for monkey patching and dojox/widget/DialogSimple | |
|
1614 | */ | |
|
1615 | _DialogBase: _DialogBaseConstructor; | |
|
1616 | _DialogLevelManager: DialogLevelManager; | |
|
1617 | _dialogStack: { | |
|
1618 | dialog: _WidgetBase, | |
|
1619 | focus: any, | |
|
1620 | underlayAttrs: any | |
|
1621 | }[]; | |
|
1622 | } | |
|
1623 | ||
|
1624 | /* dijit/ConfirmDialog */ | |
|
1625 | ||
|
1626 | interface ConfirmDialog extends _ConfirmDialogMixin { } | |
|
1627 | ||
|
1628 | interface ConfirmDialogConstructor extends DialogConstructor { } | |
|
1629 | ||
|
1630 | /* dijit/DropDownMenu */ | |
|
1631 | ||
|
1632 | /** | |
|
1633 | * A menu, without features for context menu (Meaning, drop down menu) | |
|
1634 | */ | |
|
1635 | interface DropDownMenu extends _MenuBase { } | |
|
1636 | ||
|
1637 | interface DropDownMenuConstructor extends _WidgetBaseConstructor<DropDownMenu> { } | |
|
1638 | ||
|
1639 | /* dijit/Fieldset */ | |
|
1640 | ||
|
1641 | /** | |
|
1642 | * An accessible fieldset that can be expanded or collapsed via | |
|
1643 | * its legend. Fieldset extends `dijit.TitlePane`. | |
|
1644 | */ | |
|
1645 | interface Fieldset extends TitlePane { | |
|
1646 | open: boolean; | |
|
1647 | } | |
|
1648 | ||
|
1649 | interface FieldsetConstructor extends _WidgetBaseConstructor<Fieldset> { } | |
|
1650 | ||
|
1651 | /* dijit/Menu */ | |
|
1652 | ||
|
1653 | /** | |
|
1654 | * A context menu you can assign to multiple elements | |
|
1655 | */ | |
|
1656 | interface Menu extends dijit.DropDownMenu { | |
|
1657 | /** | |
|
1658 | * Array of dom node ids of nodes to attach to. | |
|
1659 | * Fill this with nodeIds upon widget creation and it becomes context menu for those nodes. | |
|
1660 | */ | |
|
1661 | targetNodeIds: string[]; | |
|
1662 | ||
|
1663 | /** | |
|
1664 | * CSS expression to apply this Menu to descendants of targetNodeIds, rather than to | |
|
1665 | * the nodes specified by targetNodeIds themselves. Useful for applying a Menu to | |
|
1666 | * a range of rows in a table, tree, etc. | |
|
1667 | * | |
|
1668 | * The application must require() an appropriate level of dojo/query to handle the selector. | |
|
1669 | */ | |
|
1670 | selector: string; | |
|
1671 | ||
|
1672 | /** | |
|
1673 | * If true, right clicking anywhere on the window will cause this context menu to open. | |
|
1674 | * If false, must specify targetNodeIds. | |
|
1675 | */ | |
|
1676 | contextMenuForWindow: boolean; | |
|
1677 | ||
|
1678 | /** | |
|
1679 | * If true, menu will open on left click instead of right click, similar to a file menu. | |
|
1680 | */ | |
|
1681 | leftClickToOpen: boolean; | |
|
1682 | ||
|
1683 | /** | |
|
1684 | * When this menu closes, re-focus the element which had focus before it was opened. | |
|
1685 | */ | |
|
1686 | refocus: boolean; | |
|
1687 | ||
|
1688 | /** | |
|
1689 | * Attach menu to given node | |
|
1690 | */ | |
|
1691 | bindDomNode(node: string | Node): void; | |
|
1692 | ||
|
1693 | /** | |
|
1694 | * Detach menu from given node | |
|
1695 | */ | |
|
1696 | unBindDomNode(nodeName: string | Node): void; | |
|
1697 | } | |
|
1698 | ||
|
1699 | interface MenuConstructor extends _WidgetBaseConstructor<Menu> { } | |
|
1700 | ||
|
1701 | /* dijit/MenuBar */ | |
|
1702 | interface MenuBar extends _MenuBase { | |
|
1703 | baseClass: 'dijitMenuBar'; | |
|
1704 | popupDelay: number; | |
|
1705 | _isMenuBar: true; | |
|
1706 | _orient: string[]; | |
|
1707 | _moveToPopup(evt: Event): void; | |
|
1708 | focusChild(item: _WidgetBase): void; | |
|
1709 | _onChildDeselect(item: _WidgetBase): void; | |
|
1710 | _onLeftArrow(): void; | |
|
1711 | _onRightArrow(): void; | |
|
1712 | _onDownArrow(): void; | |
|
1713 | _onUpArrow(): void; | |
|
1714 | onItemClick(item: _WidgetBase, evt: Event): void; | |
|
1715 | } | |
|
1716 | ||
|
1717 | interface MenuBarConstructor extends _WidgetBaseConstructor<MenuBar> { } | |
|
1718 | ||
|
1719 | /* dijit/MenuBarItem */ | |
|
1720 | interface MenuBarItem extends MenuItem { } | |
|
1721 | ||
|
1722 | interface MenuBarItemConstructor extends _WidgetBaseConstructor<MenuBarItem> { } | |
|
1723 | ||
|
1724 | /* dijit/MenuItem */ | |
|
1725 | interface MenuItem extends _Widget, _TemplatedMixin, _Contained, _CssStateMixin { | |
|
1726 | /** | |
|
1727 | * Text for the accelerator (shortcut) key combination, a control, alt, etc. modified keystroke meant to execute the menu item regardless of where the focus is on the page. | |
|
1728 | * | |
|
1729 | * Note that although Menu can display accelerator keys, there is no infrastructure to actually catch and execute those accelerators. | |
|
1730 | */ | |
|
1731 | accelKey: string; | |
|
1732 | ||
|
1733 | /** | |
|
1734 | * If true, the menu item is disabled. | |
|
1735 | * If false, the menu item is enabled. | |
|
1736 | */ | |
|
1737 | disabled: boolean; | |
|
1738 | ||
|
1739 | /** Menu text as HTML */ | |
|
1740 | label: string; | |
|
1741 | ||
|
1742 | /** | |
|
1743 | * Class to apply to DOMNode to make it display an icon. | |
|
1744 | */ | |
|
1745 | iconClass: string; | |
|
1746 | ||
|
1747 | /** | |
|
1748 | * Hook for attr('accelKey', ...) to work. | |
|
1749 | * Set accelKey on this menu item. | |
|
1750 | */ | |
|
1751 | _setAccelKeyAttr(value: string): void; | |
|
1752 | ||
|
1753 | /** | |
|
1754 | * Hook for attr('disabled', ...) to work. | |
|
1755 | * Enable or disable this menu item. | |
|
1756 | */ | |
|
1757 | _setDisabledAttr(value: boolean): void; | |
|
1758 | ||
|
1759 | _setLabelAttr(val: string): void; | |
|
1760 | _setIconClassAttr(val: string): void; | |
|
1761 | ||
|
1762 | _fillContent(source: Element): void; | |
|
1763 | ||
|
1764 | /** | |
|
1765 | * Indicate that this node is the currently selected one | |
|
1766 | */ | |
|
1767 | _setSelected(selected: boolean): void; | |
|
1768 | ||
|
1769 | focus(): void; | |
|
1770 | ||
|
1771 | /** | |
|
1772 | * Deprecated. | |
|
1773 | * Use set('disabled', bool) instead. | |
|
1774 | */ | |
|
1775 | setDisabled(disabled: boolean): void; | |
|
1776 | ||
|
1777 | /** | |
|
1778 | * Deprecated. | |
|
1779 | * Use set('label', ...) instead. | |
|
1780 | */ | |
|
1781 | setLabel(content: string): void; | |
|
1782 | } | |
|
1783 | ||
|
1784 | interface MenuItemConstructor extends _WidgetBaseConstructor<MenuItem> { } | |
|
1785 | ||
|
1786 | /* dijit/MenuSeparator */ | |
|
1787 | interface MenuSeparator extends _WidgetBase, _TemplatedMixin, _Contained { } | |
|
1788 | ||
|
1789 | interface MenuSeparatorConstructor extends _WidgetBaseConstructor<MenuSeparator> { } | |
|
1790 | ||
|
1791 | /* dijit/place */ | |
|
1792 | ||
|
1793 | interface PlacePosition { | |
|
1794 | x: number; | |
|
1795 | y: number; | |
|
1796 | } | |
|
1797 | ||
|
1798 | interface PlaceWidthHeight { | |
|
1799 | w: number; | |
|
1800 | h: number; | |
|
1801 | } | |
|
1802 | ||
|
1803 | interface PlaceRectangle extends PlacePosition, PlaceWidthHeight { } | |
|
1804 | ||
|
1805 | type PlaceCorner = 'BL' | 'TR' | 'BR' | 'TL'; | |
|
1806 | ||
|
1807 | type PlacePositions = 'before' | 'after' | 'before-centered' | 'after-centered' | 'above-centered' | 'above' | 'above-alt' | 'below-centered' | 'below' | 'below-alt'; | |
|
1808 | ||
|
1809 | interface PlaceChoice { | |
|
1810 | corner: PlaceCorner; | |
|
1811 | pos: PlacePosition; | |
|
1812 | aroundCorner?: PlaceCorner; | |
|
1813 | } | |
|
1814 | ||
|
1815 | interface PlaceLocation extends PlaceRectangle { | |
|
1816 | corner: PlaceCorner; | |
|
1817 | aroundCorner: PlaceCorner; | |
|
1818 | overflow: number; | |
|
1819 | spaceAvailable: PlaceWidthHeight; | |
|
1820 | } | |
|
1821 | ||
|
1822 | interface LayoutNodeFunction { | |
|
1823 | (node: HTMLElement, aroundCorner: string, corner: string, spaceAvailable: PlaceWidthHeight, aroundNodeCoords: PlaceWidthHeight): number; | |
|
1824 | } | |
|
1825 | ||
|
1826 | interface Place { | |
|
1827 | /** | |
|
1828 | * Positions node kitty-corner to the rectangle centered at (pos.x, pos.y) with width and height of | |
|
1829 | * padding.x * 2 and padding.y * 2, or zero if padding not specified. Picks first corner in corners[] | |
|
1830 | * where node is fully visible, or the corner where it's most visible. | |
|
1831 | * | |
|
1832 | * Node is assumed to be absolutely or relatively positioned. | |
|
1833 | */ | |
|
1834 | at(node: Element, pos?: PlacePosition, corners?: PlaceCorner[], padding?: PlacePosition, layoutNode?: LayoutNodeFunction): PlaceLocation; | |
|
1835 | ||
|
1836 | /** | |
|
1837 | * Position node adjacent or kitty-corner to anchor | |
|
1838 | * such that it's fully visible in viewport. | |
|
1839 | */ | |
|
1840 | around(node: Element, anchor: Element | PlaceRectangle, positions: PlacePositions[], leftToRight?: boolean, layoutNode?: LayoutNodeFunction): PlaceLocation; | |
|
1841 | } | |
|
1842 | ||
|
1843 | /* dijit/popup */ | |
|
1844 | ||
|
1845 | interface PopupOpenArgs { | |
|
1846 | /** | |
|
1847 | * widget to display | |
|
1848 | */ | |
|
1849 | popup?: _WidgetBase; | |
|
1850 | ||
|
1851 | /** | |
|
1852 | * the button etc. that is displaying this popup | |
|
1853 | */ | |
|
1854 | parent?: _WidgetBase; | |
|
1855 | ||
|
1856 | /** | |
|
1857 | * DOM node (typically a button); place popup relative to this node. (Specify this *or* "x" and "y" parameters.) | |
|
1858 | */ | |
|
1859 | around?: HTMLElement; | |
|
1860 | ||
|
1861 | /** | |
|
1862 | * Absolute horizontal position (in pixels) to place node at. (Specify this *or* "around" parameter.) | |
|
1863 | */ | |
|
1864 | x?: number; | |
|
1865 | ||
|
1866 | /** | |
|
1867 | * Absolute vertical position (in pixels) to place node at. (Specify this *or* "around" parameter.) | |
|
1868 | */ | |
|
1869 | y?: number; | |
|
1870 | ||
|
1871 | /** | |
|
1872 | * When the around parameter is specified, orient should be a list of positions to try | |
|
1873 | */ | |
|
1874 | orient?: string | string[] | { BL?: string; TR?: string; TL?: string; BR?: string; }; | |
|
1875 | ||
|
1876 | /** | |
|
1877 | * callback when user has canceled the popup by: | |
|
1878 | * | |
|
1879 | * 1. hitting ESC or | |
|
1880 | * 2. by using the popup widget's proprietary cancel mechanism (like a cancel button in a dialog); | |
|
1881 | * i.e. whenever popupWidget.onCancel() is called, args.onCancel is called | |
|
1882 | */ | |
|
1883 | onCancel?: () => void; | |
|
1884 | ||
|
1885 | /** | |
|
1886 | * callback whenever this popup is closed | |
|
1887 | */ | |
|
1888 | onClose?: () => void; | |
|
1889 | ||
|
1890 | /** | |
|
1891 | * callback when user "executed" on the popup/sub-popup by selecting a menu choice, etc. (top menu only) | |
|
1892 | */ | |
|
1893 | onExecute?: () => void; | |
|
1894 | ||
|
1895 | /** | |
|
1896 | * adding a buffer around the opening position. This is only useful when around is not set. | |
|
1897 | */ | |
|
1898 | padding?: PlacePosition; | |
|
1899 | ||
|
1900 | /** | |
|
1901 | * The max height for the popup. Any popup taller than this will have scrollbars. | |
|
1902 | * Set to Infinity for no max height. Default is to limit height to available space in viewport, | |
|
1903 | * above or below the aroundNode or specified x/y position. | |
|
1904 | */ | |
|
1905 | maxHeight?: number; | |
|
1906 | } | |
|
1907 | ||
|
1908 | interface PopupManager { | |
|
1909 | /** | |
|
1910 | * Stack of currently popped up widgets. | |
|
1911 | * (someone opened _stack[0], and then it opened _stack[1], etc.) | |
|
1912 | */ | |
|
1913 | _stack: _WidgetBase[]; | |
|
1914 | ||
|
1915 | /** | |
|
1916 | * Z-index of the first popup. (If first popup opens other | |
|
1917 | * popups they get a higher z-index.) | |
|
1918 | */ | |
|
1919 | _beginZIndex: number; | |
|
1920 | ||
|
1921 | _idGen: number; | |
|
1922 | ||
|
1923 | /** | |
|
1924 | * If screen has been scrolled, reposition all the popups in the stack. | |
|
1925 | * Then set timer to check again later. | |
|
1926 | */ | |
|
1927 | _repositionAll(): void; | |
|
1928 | ||
|
1929 | /** | |
|
1930 | * Initialization for widgets that will be used as popups. | |
|
1931 | * Puts widget inside a wrapper DIV (if not already in one), | |
|
1932 | * and returns pointer to that wrapper DIV. | |
|
1933 | */ | |
|
1934 | _createWrapper(widget: _WidgetBase): HTMLDivElement; | |
|
1935 | ||
|
1936 | /** | |
|
1937 | * Moves the popup widget off-screen. | |
|
1938 | * Do not use this method to hide popups when not in use, because | |
|
1939 | * that will create an accessibility issue: the offscreen popup is | |
|
1940 | * still in the tabbing order. | |
|
1941 | */ | |
|
1942 | moveOffScreen(widget: _WidgetBase): HTMLDivElement; | |
|
1943 | ||
|
1944 | /** | |
|
1945 | * Hide this popup widget (until it is ready to be shown). | |
|
1946 | * Initialization for widgets that will be used as popups | |
|
1947 | * | |
|
1948 | * Also puts widget inside a wrapper DIV (if not already in one) | |
|
1949 | * | |
|
1950 | * If popup widget needs to layout it should | |
|
1951 | * do so when it is made visible, and popup._onShow() is called. | |
|
1952 | */ | |
|
1953 | hide(widget: _WidgetBase): void; | |
|
1954 | ||
|
1955 | /** | |
|
1956 | * Compute the closest ancestor popup that's *not* a child of another popup. | |
|
1957 | * Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button. | |
|
1958 | */ | |
|
1959 | getTopPopup(): _WidgetBase; | |
|
1960 | ||
|
1961 | /** | |
|
1962 | * Popup the widget at the specified position | |
|
1963 | */ | |
|
1964 | open(args: PopupOpenArgs): PlaceLocation; | |
|
1965 | ||
|
1966 | /** | |
|
1967 | * Close specified popup and any popups that it parented. | |
|
1968 | * If no popup is specified, closes all popups. | |
|
1969 | */ | |
|
1970 | close(popup?: _WidgetBase): void; | |
|
1971 | } | |
|
1972 | ||
|
1973 | /* dijit/PopupMenuBarItem */ | |
|
1974 | ||
|
1975 | interface PopupMenuBarItem extends PopupMenuItem { } | |
|
1976 | ||
|
1977 | interface PopupMenuBarItemConstructor extends _WidgetBaseConstructor<PopupMenuBarItem> { } | |
|
1978 | ||
|
1979 | /** dijit/PopupMenuItem */ | |
|
1980 | ||
|
1981 | /** | |
|
1982 | * An item in a Menu that spawn a drop down (usually a drop down menu) | |
|
1983 | */ | |
|
1984 | interface PopupMenuItem extends MenuItem { | |
|
1985 | /** | |
|
1986 | * When Menu is declared in markup, this code gets the menu label and the popup widget from the srcNodeRef. | |
|
1987 | * | |
|
1988 | * srcNodeRef.innerHTML contains both the menu item text and a popup widget | |
|
1989 | * The first part holds the menu item text and the second part is the popup | |
|
1990 | */ | |
|
1991 | _fillContent(source: Element): void; | |
|
1992 | ||
|
1993 | /** | |
|
1994 | * Open the popup to the side of/underneath this MenuItem, and optionally focus first item | |
|
1995 | */ | |
|
1996 | _openPopup(params: { around?: Element; popup?: Function }, focus?: boolean): void; | |
|
1997 | ||
|
1998 | _closePopup(): void; | |
|
1999 | } | |
|
2000 | ||
|
2001 | interface PopupMenuItemConstructor extends _WidgetBaseConstructor<PopupMenuItem> { } | |
|
2002 | ||
|
2003 | /* dijit/registry */ | |
|
2004 | ||
|
2005 | interface Registry { | |
|
2006 | /** | |
|
2007 | * Number of registered widgets | |
|
2008 | */ | |
|
2009 | length: number; | |
|
2010 | ||
|
2011 | /** | |
|
2012 | * Add a widget to the registry. If a duplicate ID is detected, a error is thrown. | |
|
2013 | */ | |
|
2014 | add(widget: _WidgetBase): void; | |
|
2015 | ||
|
2016 | /** | |
|
2017 | * Remove a widget from the registry. Does not destroy the widget; simply | |
|
2018 | * removes the reference. | |
|
2019 | */ | |
|
2020 | remove(id: string): void; | |
|
2021 | ||
|
2022 | /** | |
|
2023 | * Find a widget by it's id. | |
|
2024 | * If passed a widget then just returns the widget. | |
|
2025 | */ | |
|
2026 | byId(id: string | _WidgetBase): _WidgetBase; | |
|
2027 | ||
|
2028 | /** | |
|
2029 | * Returns the widget corresponding to the given DOMNode | |
|
2030 | */ | |
|
2031 | byNode(node: Element | Node): _WidgetBase; | |
|
2032 | ||
|
2033 | /** | |
|
2034 | * Convert registry into a true Array | |
|
2035 | */ | |
|
2036 | toArray(): _WidgetBase[]; | |
|
2037 | ||
|
2038 | /** | |
|
2039 | * Generates a unique id for a given widgetType | |
|
2040 | */ | |
|
2041 | getUniqueId(widgetType: string): string; | |
|
2042 | ||
|
2043 | /** | |
|
2044 | * Search subtree under root returning widgets found. | |
|
2045 | * Doesn't search for nested widgets (ie, widgets inside other widgets). | |
|
2046 | */ | |
|
2047 | findWidgets(root: Node, skipNode?: Node): _WidgetBase[]; | |
|
2048 | ||
|
2049 | /** | |
|
2050 | * Returns the widget whose DOM tree contains the specified DOMNode, or null if | |
|
2051 | * the node is not contained within the DOM tree of any widget | |
|
2052 | */ | |
|
2053 | getEnclosingWidget(node: Element | Node): _WidgetBase; | |
|
2054 | } | |
|
2055 | ||
|
2056 | /* dijit/TitlePane */ | |
|
2057 | ||
|
2058 | interface TitlePane extends dijit.layout.ContentPane, _TemplatedMixin, _CssStateMixin { | |
|
2059 | /** | |
|
2060 | * Whether pane can be opened or closed by clicking the title bar. | |
|
2061 | */ | |
|
2062 | toggleable: boolean; | |
|
2063 | ||
|
2064 | /** | |
|
2065 | * Tabindex setting for the title (so users can tab to the title then use space/enter to open/close the title pane) | |
|
2066 | */ | |
|
2067 | tabIndex: string; | |
|
2068 | ||
|
2069 | /** | |
|
2070 | * Time in milliseconds to fade in/fade out | |
|
2071 | */ | |
|
2072 | duration: number; | |
|
2073 | ||
|
2074 | /** | |
|
2075 | * Don't change this parameter from the default value. | |
|
2076 | * | |
|
2077 | * This ContentPane parameter doesn't make sense for TitlePane, since TitlePane is never a child of a layout container, nor should TitlePane try to control the size of an inner widget. | |
|
2078 | */ | |
|
2079 | doLayout: boolean; | |
|
2080 | ||
|
2081 | /** | |
|
2082 | * Switches between opened and closed state | |
|
2083 | */ | |
|
2084 | toggle(): void; | |
|
2085 | ||
|
2086 | /** | |
|
2087 | * Set the open/close css state for the TitlePane | |
|
2088 | */ | |
|
2089 | _setCss(): void; | |
|
2090 | ||
|
2091 | /** | |
|
2092 | * Handler for when user hits a key | |
|
2093 | */ | |
|
2094 | _onTitleKey(e: Event): void; | |
|
2095 | ||
|
2096 | /** | |
|
2097 | * Handler when user clicks the title bar | |
|
2098 | */ | |
|
2099 | _onTitleClick(): void; | |
|
2100 | ||
|
2101 | /** | |
|
2102 | * Deprecated. Use set('title', ...) instead. | |
|
2103 | */ | |
|
2104 | setTitle(): void; | |
|
2105 | } | |
|
2106 | ||
|
2107 | interface TitlePaneConstructor extends _WidgetBaseConstructor<TitlePane> { } | |
|
2108 | ||
|
2109 | /* dijit/Toolbar */ | |
|
2110 | ||
|
2111 | interface Toolbar extends dijit._Widget, dijit._TemplatedMixin, dijit._KeyNavContainer { } | |
|
2112 | ||
|
2113 | interface ToolbarConstructor extends _WidgetBaseConstructor<Toolbar> { } | |
|
2114 | ||
|
2115 | /* dijit/ToolbarSeparator */ | |
|
2116 | ||
|
2117 | interface ToolbarSeparator extends dijit._Widget, dijit._TemplatedMixin { } | |
|
2118 | ||
|
2119 | interface ToolbarSeparatorConstructor extends _WidgetBaseConstructor<ToolbarSeparator> { } | |
|
2120 | ||
|
2121 | /* dijit/Tooltip */ | |
|
2122 | ||
|
2123 | interface Tooltip extends _Widget { | |
|
2124 | /** | |
|
2125 | * HTML to display in the tooltip. | |
|
2126 | * Specified as innerHTML when creating the widget from markup. | |
|
2127 | */ | |
|
2128 | label: string; | |
|
2129 | ||
|
2130 | /** | |
|
2131 | * Number of milliseconds to wait after hovering over/focusing on the object, before | |
|
2132 | * the tooltip is displayed. | |
|
2133 | */ | |
|
2134 | showDelay: number; | |
|
2135 | ||
|
2136 | /** | |
|
2137 | * Number of milliseconds to wait after unhovering the object, before | |
|
2138 | * the tooltip is hidden. Note that blurring an object hides the tooltip immediately. | |
|
2139 | */ | |
|
2140 | hideDelay: number; | |
|
2141 | ||
|
2142 | /** | |
|
2143 | * Id of domNode(s) to attach the tooltip to. | |
|
2144 | * When user hovers over specified dom node(s), the tooltip will appear. | |
|
2145 | */ | |
|
2146 | connectId: dojo.NodeOrString | dojo.NodeOrString[]; | |
|
2147 | ||
|
2148 | /** | |
|
2149 | * See description of `dijit/Tooltip.defaultPosition` for details on position parameter. | |
|
2150 | */ | |
|
2151 | position: string; | |
|
2152 | ||
|
2153 | /** | |
|
2154 | * CSS expression to apply this Tooltip to descendants of connectIds, rather than to | |
|
2155 | * the nodes specified by connectIds themselves. Useful for applying a Tooltip to | |
|
2156 | * a range of rows in a table, tree, etc. Use in conjunction with getContent() parameter. | |
|
2157 | * Ex: connectId: myTable, selector: "tr", getContent: function(node){ return ...; } | |
|
2158 | * | |
|
2159 | * The application must require() an appropriate level of dojo/query to handle the selector. | |
|
2160 | */ | |
|
2161 | selector: string; | |
|
2162 | ||
|
2163 | /** | |
|
2164 | * Attach tooltip to specified node if it's not already connected | |
|
2165 | */ | |
|
2166 | addTarget(node: dojo.NodeOrString): void; | |
|
2167 | ||
|
2168 | /** | |
|
2169 | * Detach tooltip from specified node | |
|
2170 | */ | |
|
2171 | removeTarget(node: dojo.NodeOrString): void; | |
|
2172 | ||
|
2173 | /** | |
|
2174 | * User overridable function that return the text to display in the tooltip. | |
|
2175 | */ | |
|
2176 | getContent(node: Node): Node; | |
|
2177 | ||
|
2178 | /** | |
|
2179 | * Display the tooltip; usually not called directly. | |
|
2180 | */ | |
|
2181 | open(target: Node): void; | |
|
2182 | ||
|
2183 | /** | |
|
2184 | * Hide the tooltip or cancel timer for show of tooltip | |
|
2185 | */ | |
|
2186 | close(): void; | |
|
2187 | ||
|
2188 | /** | |
|
2189 | * Called when the tooltip is shown | |
|
2190 | */ | |
|
2191 | onShow(): void; | |
|
2192 | ||
|
2193 | /** | |
|
2194 | * Called when the tooltip is hidden | |
|
2195 | */ | |
|
2196 | onHide(): void; | |
|
2197 | } | |
|
2198 | ||
|
2199 | interface TooltipConstructor extends _WidgetBaseConstructor<Tooltip> { | |
|
2200 | /** | |
|
2201 | * This variable controls the position of tooltips, if the position is not specified to | |
|
2202 | * the Tooltip widget or *TextBox widget itself. It's an array of strings with the values | |
|
2203 | * possible for `dijit/place.around()`. The recommended values are: | |
|
2204 | * | |
|
2205 | * - before-centered: centers tooltip to the left of the anchor node/widget, or to the right | |
|
2206 | * in the case of RTL scripts like Hebrew and Arabic | |
|
2207 | * - after-centered: centers tooltip to the right of the anchor node/widget, or to the left | |
|
2208 | * in the case of RTL scripts like Hebrew and Arabic | |
|
2209 | * - above-centered: tooltip is centered above anchor node | |
|
2210 | * - below-centered: tooltip is centered above anchor node | |
|
2211 | * | |
|
2212 | * The list is positions is tried, in order, until a position is found where the tooltip fits | |
|
2213 | * within the viewport. | |
|
2214 | * | |
|
2215 | * Be careful setting this parameter. A value of "above-centered" may work fine until the user scrolls | |
|
2216 | * the screen so that there's no room above the target node. Nodes with drop downs, like | |
|
2217 | * DropDownButton or FilteringSelect, are especially problematic, in that you need to be sure | |
|
2218 | * that the drop down and tooltip don't overlap, even when the viewport is scrolled so that there | |
|
2219 | * is only room below (or above) the target node, but not both. | |
|
2220 | */ | |
|
2221 | defaultPosition: [string]; | |
|
2222 | ||
|
2223 | /** | |
|
2224 | * Static method to display tooltip w/specified contents in specified position. | |
|
2225 | * See description of dijit/Tooltip.defaultPosition for details on position parameter. | |
|
2226 | * If position is not specified then dijit/Tooltip.defaultPosition is used. | |
|
2227 | */ | |
|
2228 | show(innerHTML: string, aroundNode: PlaceRectangle, position?: [string], rtl?: boolean, textDir?: string, onMouseEnter?: Function, onMouseLeave?: Function): void; | |
|
2229 | ||
|
2230 | /** | |
|
2231 | * Hide the tooltip | |
|
2232 | */ | |
|
2233 | hide(aroundNode: PlaceRectangle): void; | |
|
2234 | } | |
|
2235 | ||
|
2236 | /* dijit/TooltipDialog */ | |
|
2237 | ||
|
2238 | interface TooltipDialog extends layout.ContentPane, _TemplatedMixin, form._FormMixin, _DialogMixin { | |
|
2239 | /** | |
|
2240 | * Description of tooltip dialog (required for a11y) | |
|
2241 | */ | |
|
2242 | title: string; | |
|
2243 | ||
|
2244 | /** | |
|
2245 | * Don't change this parameter from the default value. | |
|
2246 | * This ContentPane parameter doesn't make sense for TooltipDialog, since TooltipDialog | |
|
2247 | * is never a child of a layout container, nor can you specify the size of | |
|
2248 | * TooltipDialog in order to control the size of an inner widget. | |
|
2249 | */ | |
|
2250 | doLayout: boolean; | |
|
2251 | ||
|
2252 | /** | |
|
2253 | * A Toggle to modify the default focus behavior of a Dialog, which | |
|
2254 | * is to focus on the first dialog element after opening the dialog. | |
|
2255 | * False will disable autofocusing. Default: true. | |
|
2256 | */ | |
|
2257 | autofocus: boolean; | |
|
2258 | ||
|
2259 | /** | |
|
2260 | * The pointer to the first focusable node in the dialog. | |
|
2261 | */ | |
|
2262 | _firstFocusItem: any; | |
|
2263 | ||
|
2264 | /** | |
|
2265 | * The pointer to which node has focus prior to our dialog. | |
|
2266 | */ | |
|
2267 | _lastFocusItem: any; | |
|
2268 | ||
|
2269 | /** | |
|
2270 | * Configure widget to be displayed in given position relative to the button. | |
|
2271 | * | |
|
2272 | * This is called from the dijit.popup code, and should not be called directly. | |
|
2273 | */ | |
|
2274 | orient(node: Node | HTMLElement, aroundCorner: PlaceCorner, tooltipCorner: PlaceCorner): void; | |
|
2275 | ||
|
2276 | /** | |
|
2277 | * Focus on first field | |
|
2278 | */ | |
|
2279 | focus(): void; | |
|
2280 | ||
|
2281 | /** | |
|
2282 | * Called when dialog is displayed. | |
|
2283 | * | |
|
2284 | * This is called from the dijit.popup code, and should not be called directly. | |
|
2285 | */ | |
|
2286 | onOpen(pos: { | |
|
2287 | aroundCorner: PlaceCorner | |
|
2288 | aroundNodePos: PlacePosition | |
|
2289 | corner: PlaceCorner | |
|
2290 | x: number | |
|
2291 | y: number | |
|
2292 | }): void; | |
|
2293 | ||
|
2294 | /** | |
|
2295 | * Handler for keydown events | |
|
2296 | * | |
|
2297 | * Keep keyboard focus in dialog; close dialog on escape key | |
|
2298 | */ | |
|
2299 | _onKey(evt: KeyboardEvent): void; | |
|
2300 | } | |
|
2301 | ||
|
2302 | interface TooltipDialogConstructor extends _WidgetBaseConstructor<TooltipDialog> { } | |
|
2303 | } |
This diff has been collapsed as it changes many lines, (1889 lines changed) Show them Hide them | |||
@@ -0,0 +1,1889 | |||
|
1 | declare namespace dijit { | |
|
2 | ||
|
3 | namespace form { | |
|
4 | ||
|
5 | /* implied */ | |
|
6 | ||
|
7 | interface Constraints { | |
|
8 | [prop: string]: any; | |
|
9 | } | |
|
10 | ||
|
11 | interface ConstrainedValueFunction<V, C extends Constraints, T> { | |
|
12 | /** | |
|
13 | * Returns a value that has been constrained by the constraints | |
|
14 | * @param value The value to constrain | |
|
15 | * @param constraints The constraints to use | |
|
16 | * @returns The constrained value | |
|
17 | */ | |
|
18 | (value: V, constraints: C): T; | |
|
19 | } | |
|
20 | ||
|
21 | interface ConstrainedValidFunction<C extends Constraints> { | |
|
22 | /** | |
|
23 | * Returns true if the value is valid based on the constraints, otherwise | |
|
24 | * returns false. | |
|
25 | * @param value The value to check | |
|
26 | * @param constraints The constraints to use | |
|
27 | * @returns true if valid, otherwise false | |
|
28 | */ | |
|
29 | (value: any, constraints: C): boolean; | |
|
30 | } | |
|
31 | ||
|
32 | interface ConstraintsToRegExpString<C extends Constraints> { | |
|
33 | /** | |
|
34 | * Takes a set of constraints and returns a RegExpString that can be used | |
|
35 | * to match values against | |
|
36 | * @param constraints The constraints to use | |
|
37 | * @returns The RegExpString that represents the constraints | |
|
38 | */ | |
|
39 | (constraints: C): string; | |
|
40 | } | |
|
41 | ||
|
42 | interface SerializationFunction { | |
|
43 | (val: any, options?: Object): string; | |
|
44 | } | |
|
45 | ||
|
46 | /* dijit/form/_AutoCompleterMixin */ | |
|
47 | ||
|
48 | /* tslint:disable:class-name */ | |
|
49 | interface _AutoCompleterMixin<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions> extends _SearchMixin<T, Q, O> { | |
|
50 | /** | |
|
51 | * This is the item returned by the dojo/store/api/Store implementation that | |
|
52 | * provides the data for this ComboBox, it's the currently selected item. | |
|
53 | */ | |
|
54 | item: T; | |
|
55 | ||
|
56 | /** | |
|
57 | * If user types in a partial string, and then tab out of the `<input>` box, | |
|
58 | * automatically copy the first entry displayed in the drop down list to | |
|
59 | * the `<input>` field | |
|
60 | */ | |
|
61 | autoComplete: boolean; | |
|
62 | ||
|
63 | /** | |
|
64 | * One of: "first", "all" or "none". | |
|
65 | */ | |
|
66 | highlightMatch: string; | |
|
67 | /* TODO: Uncomment for TS 1.8 and remove above */ | |
|
68 | /* highlightMatch: 'fisrt' | 'all' | 'none'; */ | |
|
69 | ||
|
70 | /** | |
|
71 | * The entries in the drop down list come from this attribute in the | |
|
72 | * dojo.data items. | |
|
73 | * If not specified, the searchAttr attribute is used instead. | |
|
74 | */ | |
|
75 | labelAttr: string; | |
|
76 | ||
|
77 | /** | |
|
78 | * Specifies how to interpret the labelAttr in the data store items. | |
|
79 | * Can be "html" or "text". | |
|
80 | */ | |
|
81 | labelType: string; | |
|
82 | ||
|
83 | /** | |
|
84 | * Flags to _HasDropDown to limit height of drop down to make it fit in viewport | |
|
85 | */ | |
|
86 | maxHeight: number; | |
|
87 | ||
|
88 | /** | |
|
89 | * For backwards compatibility let onClick events propagate, even clicks on the down arrow button | |
|
90 | */ | |
|
91 | _stopClickEvents: boolean; | |
|
92 | ||
|
93 | _getCaretPos(element: HTMLElement): number; | |
|
94 | _setCaretPos(element: HTMLElement, location: number): void; | |
|
95 | ||
|
96 | /** | |
|
97 | * Overrides _HasDropDown.loadDropDown(). | |
|
98 | */ | |
|
99 | loadDropDown(loadCallback: () => void): void; | |
|
100 | ||
|
101 | /** | |
|
102 | * signal to _HasDropDown that it needs to call loadDropDown() to load the | |
|
103 | * drop down asynchronously before displaying it | |
|
104 | */ | |
|
105 | isLoaded(): boolean; | |
|
106 | ||
|
107 | /** | |
|
108 | * Overrides _HasDropDown.closeDropDown(). Closes the drop down (assuming that it's open). | |
|
109 | * This method is the callback when the user types ESC or clicking | |
|
110 | * the button icon while the drop down is open. It's also called by other code. | |
|
111 | */ | |
|
112 | closeDropDown(focus?: boolean): void; | |
|
113 | ||
|
114 | postMixInProperties(): void; | |
|
115 | postCreate(): void; | |
|
116 | ||
|
117 | /** | |
|
118 | * Highlights the string entered by the user in the menu. By default this | |
|
119 | * highlights the first occurrence found. Override this method | |
|
120 | * to implement your custom highlighting. | |
|
121 | */ | |
|
122 | doHighlight(label: string, find: string): string; | |
|
123 | reset(): void; | |
|
124 | labelFunc(item: T, store: dojo.store.api.Store<T, Q, O>): string; | |
|
125 | ||
|
126 | set(name: 'value', value: string): this; | |
|
127 | set(name: 'item', value: T): this; | |
|
128 | set(name: 'disabled', value: boolean): this; | |
|
129 | set(name: string, value: any): this; | |
|
130 | set(values: Object): this; | |
|
131 | } | |
|
132 | ||
|
133 | /* dijit/form/_ButtonMixin */ | |
|
134 | ||
|
135 | interface _ButtonMixin { | |
|
136 | /** | |
|
137 | * A mixin to add a thin standard API wrapper to a normal HTML button | |
|
138 | */ | |
|
139 | label: string; | |
|
140 | ||
|
141 | /** | |
|
142 | * Type of button (submit, reset, button, checkbox, radio) | |
|
143 | */ | |
|
144 | type: string; | |
|
145 | postCreate(): void; | |
|
146 | ||
|
147 | /** | |
|
148 | * Callback for when button is clicked. | |
|
149 | * If type="submit", return true to perform submit, or false to cancel it. | |
|
150 | */ | |
|
151 | onClick(e: MouseEvent): boolean | void; | |
|
152 | onSetLabel(e: Event): void; | |
|
153 | } | |
|
154 | ||
|
155 | /* dijit/form/_CheckBoxMixin */ | |
|
156 | ||
|
157 | interface _CheckBoxMixin { | |
|
158 | /** | |
|
159 | * type attribute on `<input>` node. | |
|
160 | * Overrides `dijit/form/Button.type`. Users should not change this value. | |
|
161 | */ | |
|
162 | type: string; | |
|
163 | ||
|
164 | /** | |
|
165 | * As an initialization parameter, equivalent to value field on normal checkbox | |
|
166 | * (if checked, the value is passed as the value when form is submitted). | |
|
167 | */ | |
|
168 | value: string; | |
|
169 | ||
|
170 | /** | |
|
171 | * Should this widget respond to user input? | |
|
172 | * In markup, this is specified as "readOnly". | |
|
173 | * Similar to disabled except readOnly form values are submitted. | |
|
174 | */ | |
|
175 | readOnly: boolean; | |
|
176 | ||
|
177 | reset: () => void; | |
|
178 | } | |
|
179 | ||
|
180 | /* dijit/form/_ComboBoxMenu */ | |
|
181 | ||
|
182 | interface _ComboBoxMenu<T> extends _WidgetBase, _TemplatedMixin, _ListMouseMixin, _ComboBoxMenuMixin<T> { | |
|
183 | templateString: string; | |
|
184 | baseClass: string; | |
|
185 | ||
|
186 | /** | |
|
187 | * Add hover CSS | |
|
188 | */ | |
|
189 | onHover(node: HTMLElement): void; | |
|
190 | ||
|
191 | /** | |
|
192 | * Remove hover CSS | |
|
193 | */ | |
|
194 | onUnhover(node: HTMLElement): void; | |
|
195 | ||
|
196 | /** | |
|
197 | * Add selected CSS | |
|
198 | */ | |
|
199 | onSelect(node: HTMLElement): void; | |
|
200 | ||
|
201 | /** | |
|
202 | * Remove selected CSS | |
|
203 | */ | |
|
204 | onDeselect(node: HTMLElement): void; | |
|
205 | ||
|
206 | /** | |
|
207 | * Handles page-up and page-down keypresses | |
|
208 | */ | |
|
209 | _page(up?: boolean): void; | |
|
210 | ||
|
211 | /** | |
|
212 | * Handle keystroke event forwarded from ComboBox, returning false if it's | |
|
213 | * a keystroke I recognize and process, true otherwise. | |
|
214 | */ | |
|
215 | handleKey(evt: KeyboardEvent): boolean; | |
|
216 | ||
|
217 | set(name: string, value: any): this; | |
|
218 | set(values: Object): this; | |
|
219 | } | |
|
220 | ||
|
221 | interface _ComboBoxMenuConstructor extends _WidgetBaseConstructor<_ComboBoxMenu<any>> { | |
|
222 | new <T>(params: Object, srcNodeRef: dojo.NodeOrString): _ComboBoxMenu<T>; | |
|
223 | } | |
|
224 | ||
|
225 | /* dijit/form/_ComboBoxMenuMixin */ | |
|
226 | ||
|
227 | interface _ComboBoxMenuMixin<T> { | |
|
228 | /** | |
|
229 | * Holds "next" and "previous" text for paging buttons on drop down | |
|
230 | */ | |
|
231 | _messages: { next: string; previous: string; }; | |
|
232 | ||
|
233 | onClick(node: HTMLElement): void; | |
|
234 | ||
|
235 | /** | |
|
236 | * Notifies ComboBox/FilteringSelect that user selected an option. | |
|
237 | */ | |
|
238 | onChange(direction: number): void; | |
|
239 | ||
|
240 | /** | |
|
241 | * Notifies ComboBox/FilteringSelect that user clicked to advance to next/previous page. | |
|
242 | */ | |
|
243 | onPage(direction: number): void; | |
|
244 | ||
|
245 | /** | |
|
246 | * Callback from dijit.popup code to this widget, notifying it that it closed | |
|
247 | */ | |
|
248 | onClose(): void; | |
|
249 | ||
|
250 | /** | |
|
251 | * Fills in the items in the drop down list | |
|
252 | */ | |
|
253 | createOptions(results: T[], options: dojo.store.api.QueryOptions, labelFunc: (item: T) => { html: boolean; label: string; }): void; | |
|
254 | ||
|
255 | /** | |
|
256 | * Clears the entries in the drop down list, but of course keeps the previous and next buttons. | |
|
257 | */ | |
|
258 | clearResultList(): void; | |
|
259 | ||
|
260 | /** | |
|
261 | * Highlight the first real item in the list (not Previous Choices). | |
|
262 | */ | |
|
263 | highlightFirstOption(): void; | |
|
264 | ||
|
265 | /** | |
|
266 | * Highlight the last real item in the list (not More Choices). | |
|
267 | */ | |
|
268 | highlightLastOption(): void; | |
|
269 | ||
|
270 | selectFirstNode(): void; | |
|
271 | selectLastNode(): void; | |
|
272 | getHighlightedOption(): HTMLElement; | |
|
273 | ||
|
274 | set(name: 'value', value: Object): this; | |
|
275 | set(name: string, value: any): this; | |
|
276 | set(values: Object): this; | |
|
277 | } | |
|
278 | ||
|
279 | /* dijit/form/_DateTimeTextBox */ | |
|
280 | ||
|
281 | interface DateTimeConstraints extends Constraints, dojo.date.DateLocaleFormatOptions { } | |
|
282 | ||
|
283 | interface _DateTimeTextBox<T extends _WidgetBase> extends RangeBoundTextBox, _HasDropDown<T> { | |
|
284 | templateString: string; | |
|
285 | ||
|
286 | /** | |
|
287 | * Set this textbox to display a down arrow button, to open the drop down list. | |
|
288 | */ | |
|
289 | hasDownArrow: boolean; | |
|
290 | cssStateNodes: CSSStateNodes; | |
|
291 | ||
|
292 | /** | |
|
293 | * Despite the name, this parameter specifies both constraints on the input | |
|
294 | * (including starting/ending dates/times allowed) as well as | |
|
295 | * formatting options like whether the date is displayed in long (ex: December 25, 2005) | |
|
296 | * or short (ex: 12/25/2005) format. See `dijit/form/_DateTimeTextBox.__Constraints` for details. | |
|
297 | */ | |
|
298 | constraints: DateTimeConstraints; | |
|
299 | ||
|
300 | /** | |
|
301 | * The constraints without the min/max properties. Used by the compare() method | |
|
302 | */ | |
|
303 | _unboundedConstraints: DateTimeConstraints; | |
|
304 | ||
|
305 | pattern: (options?: dojo.date.DateLocaleFormatOptions | RangeBoundTextBoxConstraints) => string; | |
|
306 | ||
|
307 | /** | |
|
308 | * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines | |
|
309 | * at dojo/date and dojo/date/locale. | |
|
310 | */ | |
|
311 | datePackage: string; | |
|
312 | ||
|
313 | postMixInProperties(): void; | |
|
314 | compare(val1: Date, val2: Date): number; | |
|
315 | autoWidth: boolean; | |
|
316 | ||
|
317 | /** | |
|
318 | * Formats the value as a Date, according to specified locale (second argument) | |
|
319 | */ | |
|
320 | format: ConstrainedValueFunction<Date, DateTimeConstraints, string>; | |
|
321 | ||
|
322 | /** | |
|
323 | * Parses as string as a Date, according to constraints | |
|
324 | */ | |
|
325 | parse: ConstrainedValueFunction<string, DateTimeConstraints, Date>; | |
|
326 | ||
|
327 | serialize(val: any, options?: dojo.date.StampFormatOptions): string; | |
|
328 | ||
|
329 | /** | |
|
330 | * The default value to focus in the popupClass widget when the textbox value is empty. | |
|
331 | */ | |
|
332 | dropDownDefaultValue: Date; | |
|
333 | ||
|
334 | /** | |
|
335 | * The value of this widget as a JavaScript Date object. Use get("value") / set("value", val) to manipulate. | |
|
336 | * When passed to the parser in markup, must be specified according to `dojo/date/stamp.fromISOString()` | |
|
337 | */ | |
|
338 | value: Date; | |
|
339 | ||
|
340 | _blankValue: string; | |
|
341 | ||
|
342 | /** | |
|
343 | * Name of the popup widget class used to select a date/time. | |
|
344 | * Subclasses should specify this. | |
|
345 | */ | |
|
346 | popupClass: string | _WidgetBaseConstructor<T>; | |
|
347 | ||
|
348 | /** | |
|
349 | * Specifies constraints.selector passed to dojo.date functions, should be either | |
|
350 | * "date" or "time". | |
|
351 | * Subclass must specify this. | |
|
352 | */ | |
|
353 | _selector: string; | |
|
354 | /* TODO: uncomment for TS 1.8 */ | |
|
355 | /* _selector: 'data' | 'time'; */ | |
|
356 | ||
|
357 | buildRendering(): void; | |
|
358 | ||
|
359 | /** | |
|
360 | * Runs various tests on the value, checking for invalid conditions | |
|
361 | */ | |
|
362 | _isInvalidDate(value: Date): boolean; | |
|
363 | ||
|
364 | get(name: 'displayedValue'): string; | |
|
365 | get(name: string): any; | |
|
366 | ||
|
367 | set(name: 'displayedValue', value: string): this; | |
|
368 | set(name: 'dropDownDefaultValue', value: Date): this; | |
|
369 | set(name: 'value', value: Date | string): this; | |
|
370 | set(name: 'constraints', value: DateTimeConstraints): this; | |
|
371 | set(name: string, value: any): this; | |
|
372 | set(values: Object): this; | |
|
373 | } | |
|
374 | ||
|
375 | interface _DateTimeTextBoxConstructor<T extends _WidgetBase> extends _WidgetBaseConstructor<_DateTimeTextBox<T>> { } | |
|
376 | ||
|
377 | /* dijit/form/_ExpandingTextAreaMixin */ | |
|
378 | ||
|
379 | interface _ExpandingTextAreaMixin { | |
|
380 | postCreate(): void; | |
|
381 | startup(): void; | |
|
382 | resize(): void; | |
|
383 | } | |
|
384 | ||
|
385 | /* dijit/form/_FormMixin */ | |
|
386 | ||
|
387 | interface OnValidStateChange { | |
|
388 | (isValid?: boolean): void; | |
|
389 | } | |
|
390 | ||
|
391 | interface _FormMixin { | |
|
392 | ||
|
393 | /** | |
|
394 | * Will be "Error" if one or more of the child widgets has an invalid value, | |
|
395 | * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", | |
|
396 | * which indicates that the form is ready to be submitted. | |
|
397 | */ | |
|
398 | state: '' | 'Error' | 'Incomplete'; | |
|
399 | ||
|
400 | /** | |
|
401 | * Returns all form widget descendants, searching through non-form child widgets like BorderContainer | |
|
402 | */ | |
|
403 | _getDescendantFormWidgets(children?: _WidgetBase[]): _FormWidget[]; | |
|
404 | ||
|
405 | reset(): void; | |
|
406 | ||
|
407 | /** | |
|
408 | * returns if the form is valid - same as isValid - but | |
|
409 | * provides a few additional (ui-specific) features: | |
|
410 | * | |
|
411 | * 1. it will highlight any sub-widgets that are not valid | |
|
412 | * 2. it will call focus() on the first invalid sub-widget | |
|
413 | */ | |
|
414 | validate(): boolean; | |
|
415 | ||
|
416 | setValues(val: any): _FormMixin; | |
|
417 | getValues(): any; | |
|
418 | ||
|
419 | /** | |
|
420 | * Returns true if all of the widgets are valid. | |
|
421 | * Deprecated, will be removed in 2.0. Use get("state") instead. | |
|
422 | */ | |
|
423 | isValid(): boolean; | |
|
424 | ||
|
425 | /** | |
|
426 | * Stub function to connect to if you want to do something | |
|
427 | * (like disable/enable a submit button) when the valid | |
|
428 | * state changes on the form as a whole. | |
|
429 | * | |
|
430 | * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. | |
|
431 | */ | |
|
432 | onValidStateChange: OnValidStateChange; | |
|
433 | ||
|
434 | /** | |
|
435 | * Compute what this.state should be based on state of children | |
|
436 | */ | |
|
437 | _getState(): '' | 'Error' | 'Incomplete'; | |
|
438 | ||
|
439 | /** | |
|
440 | * Deprecated method. Applications no longer need to call this. Remove for 2.0. | |
|
441 | */ | |
|
442 | disconnectChildren(): void; | |
|
443 | ||
|
444 | /** | |
|
445 | * You can call this function directly, ex. in the event that you | |
|
446 | * programmatically add a widget to the form *after* the form has been | |
|
447 | * initialized. | |
|
448 | */ | |
|
449 | connectChildren(inStartup?: boolean): void; | |
|
450 | ||
|
451 | /** | |
|
452 | * Called when child's value or disabled state changes | |
|
453 | */ | |
|
454 | _onChildChange(attr?: string): void; | |
|
455 | ||
|
456 | startup(): void; | |
|
457 | destroy(preserveDom?: boolean): void; | |
|
458 | } | |
|
459 | ||
|
460 | interface _FormMixinConstructor extends dojo._base.DeclareConstructor<_FormMixin> { } | |
|
461 | ||
|
462 | /* dijit/form/_FormSelectWidget */ | |
|
463 | ||
|
464 | interface SelectOption { | |
|
465 | value?: string; | |
|
466 | label: string; | |
|
467 | selected?: boolean; | |
|
468 | disabled?: boolean; | |
|
469 | } | |
|
470 | ||
|
471 | interface _FormSelectWidget<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions> extends _FormValueWidget { | |
|
472 | /** | |
|
473 | * Whether or not we are multi-valued | |
|
474 | */ | |
|
475 | multiple: boolean; | |
|
476 | ||
|
477 | /** | |
|
478 | * The set of options for our select item. Roughly corresponds to | |
|
479 | * the html `<option>` tag. | |
|
480 | */ | |
|
481 | options: SelectOption[]; | |
|
482 | ||
|
483 | /** | |
|
484 | * A store to use for getting our list of options - rather than reading them | |
|
485 | * from the `<option>` html tags. Should support getIdentity(). | |
|
486 | * For back-compat store can also be a dojo/data/api/Identity. | |
|
487 | */ | |
|
488 | store: dojo.store.api.Store<T, Q, O>; | |
|
489 | ||
|
490 | /** | |
|
491 | * A query to use when fetching items from our store | |
|
492 | */ | |
|
493 | query: Q; | |
|
494 | ||
|
495 | /** | |
|
496 | * Query options to use when fetching from the store | |
|
497 | */ | |
|
498 | queryOptions: O; | |
|
499 | ||
|
500 | /** | |
|
501 | * The entries in the drop down list come from this attribute in the dojo.store items. | |
|
502 | * If ``store`` is set, labelAttr must be set too, unless store is an old-style | |
|
503 | * dojo.data store rather than a new dojo/store. | |
|
504 | */ | |
|
505 | labelAttr: string; | |
|
506 | ||
|
507 | /** | |
|
508 | * A callback to do with an onFetch - but before any items are actually | |
|
509 | * iterated over (i.e. to filter even further what you want to add) | |
|
510 | */ | |
|
511 | onFetch: (items: T[]) => void; | |
|
512 | ||
|
513 | /** | |
|
514 | * Flag to sort the options returned from a store by the label of | |
|
515 | * the store. | |
|
516 | */ | |
|
517 | sortByLabel: boolean; | |
|
518 | ||
|
519 | /** | |
|
520 | * By default loadChildren is called when the items are fetched from the | |
|
521 | * store. This property allows delaying loadChildren (and the creation | |
|
522 | * of the options/menuitems) until the user clicks the button to open the | |
|
523 | * dropdown. | |
|
524 | */ | |
|
525 | loadChildrenOnOpen: boolean; | |
|
526 | ||
|
527 | /** | |
|
528 | * This is the `dojo.Deferred` returned by setStore(). | |
|
529 | * Calling onLoadDeferred.then() registers your | |
|
530 | * callback to be called only once, when the prior setStore completes. | |
|
531 | */ | |
|
532 | onLoadDeferred: dojo.Deferred<void>; | |
|
533 | ||
|
534 | /** | |
|
535 | * Returns a given option (or options). | |
|
536 | */ | |
|
537 | getOptions(valueOrIdx: string): SelectOption; | |
|
538 | getOptions(valueOrIdx: number): SelectOption; | |
|
539 | getOptions(valueOrIdx: SelectOption): SelectOption; | |
|
540 | getOptions(valueOrIdx: (string | number | SelectOption)[]): SelectOption[]; | |
|
541 | getOptions(): SelectOption[]; | |
|
542 | ||
|
543 | /** | |
|
544 | * Adds an option or options to the end of the select. If value | |
|
545 | * of the option is empty or missing, a separator is created instead. | |
|
546 | * Passing in an array of options will yield slightly better performance | |
|
547 | * since the children are only loaded once. | |
|
548 | */ | |
|
549 | addOption(option: SelectOption | SelectOption[]): void; | |
|
550 | ||
|
551 | /** | |
|
552 | * Removes the given option or options. You can remove by string | |
|
553 | * (in which case the value is removed), number (in which case the | |
|
554 | * index in the options array is removed), or select option (in | |
|
555 | * which case, the select option with a matching value is removed). | |
|
556 | * You can also pass in an array of those values for a slightly | |
|
557 | * better performance since the children are only loaded once. | |
|
558 | * For numeric option values, specify {value: number} as the argument. | |
|
559 | */ | |
|
560 | removeOption(option: string | number | SelectOption | (string | number | SelectOption)[]): void; | |
|
561 | ||
|
562 | /** | |
|
563 | * Updates the values of the given option. The option to update | |
|
564 | * is matched based on the value of the entered option. Passing | |
|
565 | * in an array of new options will yield better performance since | |
|
566 | * the children will only be loaded once. | |
|
567 | */ | |
|
568 | updateOption(newOption: SelectOption | SelectOption[]): void; | |
|
569 | ||
|
570 | /** | |
|
571 | * Deprecated! | |
|
572 | */ | |
|
573 | setStore(store: dojo.store.api.Store<T, Q, O>, selectedValue?: T, fetchArgs?: { | |
|
574 | query: Q; | |
|
575 | queryOptions: O; | |
|
576 | onFetch: (items: T[], fetchArgs?: any) => void; | |
|
577 | }): dojo.store.api.Store<T, Q, O>; | |
|
578 | ||
|
579 | /** | |
|
580 | * Sets the store you would like to use with this select widget. | |
|
581 | * The selected value is the value of the new store to set. This | |
|
582 | * function returns the original store, in case you want to reuse | |
|
583 | * it or something. | |
|
584 | */ | |
|
585 | _deprecatedSetStore(store: dojo.store.api.Store<T, Q, O>, selectedValue?: T, fetchArgs?: { | |
|
586 | query: Q; | |
|
587 | queryOptions: O; | |
|
588 | onFetch: (items: T[], fetchArgs?: any) => void; | |
|
589 | }): dojo.store.api.Store<T, Q, O>; | |
|
590 | ||
|
591 | /** | |
|
592 | * Loads the children represented by this widget's options. | |
|
593 | * reset the menu to make it populatable on the next click | |
|
594 | */ | |
|
595 | _loadChildren(): void; | |
|
596 | ||
|
597 | /** | |
|
598 | * Sets the "selected" class on the item for styling purposes | |
|
599 | */ | |
|
600 | _updateSelection(): void; | |
|
601 | ||
|
602 | /** | |
|
603 | * Returns the value of the widget by reading the options for | |
|
604 | * the selected flag | |
|
605 | */ | |
|
606 | _getValueFromOpts(): string; | |
|
607 | ||
|
608 | buildRendering(): void; | |
|
609 | ||
|
610 | /** | |
|
611 | * Loads our options and sets up our dropdown correctly. We | |
|
612 | * don't want any content, so we don't call any inherit chain | |
|
613 | * function. | |
|
614 | */ | |
|
615 | _fillContent(): void; | |
|
616 | ||
|
617 | /** | |
|
618 | * sets up our event handling that we need for functioning | |
|
619 | * as a select | |
|
620 | */ | |
|
621 | postCreate(): void; | |
|
622 | ||
|
623 | startup(): void; | |
|
624 | ||
|
625 | /** | |
|
626 | * Clean up our connections | |
|
627 | */ | |
|
628 | destroy(preserveDom?: boolean): void; | |
|
629 | ||
|
630 | /** | |
|
631 | * User-overridable function which, for the given option, adds an | |
|
632 | * item to the select. If the option doesn't have a value, then a | |
|
633 | * separator is added in that place. Make sure to store the option | |
|
634 | * in the created option widget. | |
|
635 | */ | |
|
636 | _addOptionItem(option: SelectOption): void; | |
|
637 | ||
|
638 | /** | |
|
639 | * User-overridable function which, for the given option, removes | |
|
640 | * its item from the select. | |
|
641 | */ | |
|
642 | _removeOptionItem(option: SelectOption): void; | |
|
643 | ||
|
644 | /** | |
|
645 | * Overridable function which will set the display for the | |
|
646 | * widget. newDisplay is either a string (in the case of | |
|
647 | * single selects) or array of strings (in the case of multi-selects) | |
|
648 | */ | |
|
649 | _setDisplay(newDisplay: string | string[]): void; | |
|
650 | ||
|
651 | /** | |
|
652 | * Overridable function to return the children that this widget contains. | |
|
653 | */ | |
|
654 | _getChildren(): any[]; | |
|
655 | ||
|
656 | /** | |
|
657 | * hooks into this.attr to provide a mechanism for getting the | |
|
658 | * option items for the current value of the widget. | |
|
659 | */ | |
|
660 | _getSelectedOptionsAttr(): SelectOption[]; | |
|
661 | ||
|
662 | /** | |
|
663 | * a function that will "fake" loading children, if needed, and | |
|
664 | * if we have set to not load children until the widget opens. | |
|
665 | */ | |
|
666 | _pseudoLoadChildren(items: T[]): void; | |
|
667 | ||
|
668 | /** | |
|
669 | * a function that can be connected to in order to receive a | |
|
670 | * notification that the store has finished loading and all options | |
|
671 | * from that store are available | |
|
672 | */ | |
|
673 | onSetStore(): void; | |
|
674 | } | |
|
675 | ||
|
676 | /* dijit/form/_FormValueMixin */ | |
|
677 | ||
|
678 | interface _FormValueMixin extends _FormWidgetMixin { | |
|
679 | ||
|
680 | /** | |
|
681 | * Should this widget respond to user input? | |
|
682 | * In markup, this is specified as "readOnly". | |
|
683 | * Similar to disabled except readOnly form values are submitted. | |
|
684 | */ | |
|
685 | readOnly: boolean; | |
|
686 | ||
|
687 | postCreate(): void; | |
|
688 | ||
|
689 | /** | |
|
690 | * Restore the value to the last value passed to onChange | |
|
691 | */ | |
|
692 | undo(): void; | |
|
693 | ||
|
694 | /** | |
|
695 | * Reset the widget's value to what it was at initialization time | |
|
696 | */ | |
|
697 | reset(): void; | |
|
698 | ||
|
699 | _hasBeenBlurred?: boolean; | |
|
700 | } | |
|
701 | ||
|
702 | /* dijit/form/_FormValueWidget */ | |
|
703 | ||
|
704 | interface _FormValueWidget extends _FormWidget, _FormValueMixin { | |
|
705 | /** | |
|
706 | * Work around table sizing bugs on IE7 by forcing redraw | |
|
707 | */ | |
|
708 | _layoutHackIE7(): void; | |
|
709 | ||
|
710 | set(name: string, value: any): this; | |
|
711 | set(values: Object): this; | |
|
712 | } | |
|
713 | ||
|
714 | interface _FormValueWidgetConstructor extends _WidgetBaseConstructor<_FormValueWidget> { } | |
|
715 | ||
|
716 | /* dijit/form/_FormWidget */ | |
|
717 | ||
|
718 | interface _FormWidget extends _Widget, _TemplatedMixin, _CssStateMixin, _FormWidgetMixin { | |
|
719 | setDisabled(disabled: boolean): void; | |
|
720 | setValue(value: string): void; | |
|
721 | postMixInProperties(): void; | |
|
722 | ||
|
723 | set(name: 'value', value: string): this; | |
|
724 | set(name: string, value: any): this; | |
|
725 | set(values: Object): this; | |
|
726 | } | |
|
727 | ||
|
728 | interface _FormWidgetConstructor extends _WidgetBaseConstructor<_FormWidget> { } | |
|
729 | ||
|
730 | /* dijit/form/_FormWidgetMixin */ | |
|
731 | ||
|
732 | interface _FormWidgetMixin { | |
|
733 | /** | |
|
734 | * Name used when submitting form; same as "name" attribute or plain HTML elements | |
|
735 | */ | |
|
736 | name: string; | |
|
737 | ||
|
738 | /** | |
|
739 | * Corresponds to the native HTML `<input>` element's attribute. | |
|
740 | */ | |
|
741 | alt: string; | |
|
742 | ||
|
743 | /** | |
|
744 | * Corresponds to the native HTML `<input>` element's attribute. | |
|
745 | */ | |
|
746 | value: any; | |
|
747 | ||
|
748 | /** | |
|
749 | * Corresponds to the native HTML `<input>` element's attribute. | |
|
750 | */ | |
|
751 | type: string; | |
|
752 | ||
|
753 | /** | |
|
754 | * Apply aria-label in markup to the widget's focusNode | |
|
755 | */ | |
|
756 | 'aria-label': string; | |
|
757 | ||
|
758 | /** | |
|
759 | * Order fields are traversed when user hits the tab key | |
|
760 | */ | |
|
761 | tabIndex: number; | |
|
762 | ||
|
763 | /** | |
|
764 | * Should this widget respond to user input? | |
|
765 | * In markup, this is specified as "disabled='disabled'", or just "disabled". | |
|
766 | */ | |
|
767 | disabled: boolean; | |
|
768 | ||
|
769 | /** | |
|
770 | * Fires onChange for each value change or only on demand | |
|
771 | */ | |
|
772 | intermediateChanges: boolean; | |
|
773 | ||
|
774 | /** | |
|
775 | * On focus, should this widget scroll into view? | |
|
776 | */ | |
|
777 | scrollOnFocus: boolean; | |
|
778 | ||
|
779 | /** | |
|
780 | * Tells if this widget is focusable or not. Used internally by dijit. | |
|
781 | */ | |
|
782 | isFocusable(): boolean; | |
|
783 | ||
|
784 | /** | |
|
785 | * Put focus on this widget | |
|
786 | */ | |
|
787 | focus(): void; | |
|
788 | ||
|
789 | /** | |
|
790 | * Compare 2 values (as returned by get('value') for this widget). | |
|
791 | */ | |
|
792 | compare(val1: any, val2: any): number; | |
|
793 | ||
|
794 | /** | |
|
795 | * Callback when this widget's value is changed. | |
|
796 | */ | |
|
797 | onChange(value: string): void; | |
|
798 | ||
|
799 | /** | |
|
800 | * Overrides _Widget.create() | |
|
801 | */ | |
|
802 | create(params?: any, srcNodeRef?: HTMLElement): void; | |
|
803 | ||
|
804 | destroy(preserveDom?: boolean): void; | |
|
805 | ||
|
806 | set(name: 'disabled', value: boolean): this; | |
|
807 | set(name: string, value: any): this; | |
|
808 | set(values: Object): this; | |
|
809 | } | |
|
810 | ||
|
811 | /* dijit/form/_ListBase */ | |
|
812 | ||
|
813 | interface _ListBase { | |
|
814 | /** | |
|
815 | * currently selected node | |
|
816 | */ | |
|
817 | selected: HTMLElement; | |
|
818 | ||
|
819 | /** | |
|
820 | * Select the first displayed item in the list. | |
|
821 | */ | |
|
822 | selectFirstNode(): void; | |
|
823 | ||
|
824 | /** | |
|
825 | * Select the last displayed item in the list | |
|
826 | */ | |
|
827 | selectLastNode(): void; | |
|
828 | ||
|
829 | /** | |
|
830 | * Select the item just below the current selection. | |
|
831 | * If nothing selected, select first node. | |
|
832 | */ | |
|
833 | selectNextNode(): void; | |
|
834 | ||
|
835 | /** | |
|
836 | * Select the item just above the current selection. | |
|
837 | * If nothing selected, select last node (if | |
|
838 | * you select Previous and try to keep scrolling up the list). | |
|
839 | */ | |
|
840 | selectPreviousNode(): void; | |
|
841 | ||
|
842 | set(name: 'selected', value: HTMLElement): this; | |
|
843 | set(name: string, value: any): this; | |
|
844 | set(values: Object): this; | |
|
845 | } | |
|
846 | ||
|
847 | /* dijit/form/_ListMouseMixin */ | |
|
848 | ||
|
849 | interface _ListMouseMixin extends _ListBase { | |
|
850 | postCreate(): void; | |
|
851 | } | |
|
852 | ||
|
853 | /* dijit/form/_RadioButtonMixin */ | |
|
854 | ||
|
855 | interface _RadioButtonMixin { | |
|
856 | /** | |
|
857 | * type attribute on `<input>` node. | |
|
858 | * Users should not change this value. | |
|
859 | */ | |
|
860 | type: string; | |
|
861 | } | |
|
862 | ||
|
863 | /* dijit/form/_SearchMixin */ | |
|
864 | ||
|
865 | interface _SearchMixin<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions> { | |
|
866 | /** | |
|
867 | * Argument to data provider. | |
|
868 | * Specifies maximum number of search results to return per query | |
|
869 | */ | |
|
870 | pageSize: number; | |
|
871 | ||
|
872 | /** | |
|
873 | * Reference to data provider object used by this ComboBox. | |
|
874 | * The store must accept an object hash of properties for its query. See `query` and `queryExpr` for details. | |
|
875 | */ | |
|
876 | store: dojo.store.api.Store<T, Q, O>; | |
|
877 | ||
|
878 | /** | |
|
879 | * Mixin to the store's fetch. | |
|
880 | * For example, to set the sort order of the ComboBox menu, pass: | |
|
881 | * { sort: [{attribute:"name",descending: true}] } | |
|
882 | * To override the default queryOptions so that deep=false, do: | |
|
883 | * { queryOptions: {ignoreCase: true, deep: false} } | |
|
884 | */ | |
|
885 | fetchProperties: { [property: string]: any }; | |
|
886 | ||
|
887 | /** | |
|
888 | * A query that can be passed to `store` to initially filter the items. | |
|
889 | * ComboBox overwrites any reference to the `searchAttr` and sets it to the `queryExpr` with the user's input substituted. | |
|
890 | */ | |
|
891 | query: Q; | |
|
892 | ||
|
893 | /** | |
|
894 | * Alternate to specifying a store. Id of a dijit/form/DataList widget. | |
|
895 | */ | |
|
896 | list: string; | |
|
897 | ||
|
898 | /** | |
|
899 | * Delay in milliseconds between when user types something and we start | |
|
900 | * searching based on that value | |
|
901 | */ | |
|
902 | searchDelay: number; | |
|
903 | ||
|
904 | /** | |
|
905 | * Search for items in the data store where this attribute (in the item) | |
|
906 | * matches what the user typed | |
|
907 | */ | |
|
908 | searchAttr: string; | |
|
909 | ||
|
910 | /** | |
|
911 | * This specifies what query is sent to the data store, | |
|
912 | * based on what the user has typed. Changing this expression will modify | |
|
913 | * whether the results are only exact matches, a "starting with" match, | |
|
914 | * etc. | |
|
915 | * `${0}` will be substituted for the user text. | |
|
916 | * `*` is used for wildcards. | |
|
917 | * `${0}*` means "starts with", `*${0}*` means "contains", `${0}` means "is" | |
|
918 | */ | |
|
919 | queryExpr: string; | |
|
920 | ||
|
921 | /** | |
|
922 | * Set true if the query should ignore case when matching possible items | |
|
923 | */ | |
|
924 | ignoreCase: boolean; | |
|
925 | ||
|
926 | /** | |
|
927 | * Helper function to convert a simple pattern to a regular expression for matching. | |
|
928 | */ | |
|
929 | _patternToRegExp(pattern: string): RegExp; | |
|
930 | ||
|
931 | _abortQuery(): void; | |
|
932 | ||
|
933 | /** | |
|
934 | * Handles input (keyboard/paste) events | |
|
935 | */ | |
|
936 | _processInput(e: KeyboardEvent): void; | |
|
937 | ||
|
938 | /** | |
|
939 | * Callback when a search completes. | |
|
940 | */ | |
|
941 | onSearch(results: T[], query: Q, options: O): void; | |
|
942 | ||
|
943 | _startSearchFromInput(): void; | |
|
944 | ||
|
945 | /** | |
|
946 | * Starts a search for elements matching text (text=="" means to return all items | |
|
947 | * and calls onSearch(...) when the search completes, to display the results. | |
|
948 | */ | |
|
949 | _startSearch(text: string): void; | |
|
950 | ||
|
951 | postMixInProperties(): void; | |
|
952 | ||
|
953 | set(name: 'list', value: string): this; | |
|
954 | set(name: string, value: any): this; | |
|
955 | set(values: Object): this; | |
|
956 | } | |
|
957 | ||
|
958 | /* dijit/form/_Spinner */ | |
|
959 | ||
|
960 | interface AdjustFunction { | |
|
961 | (val: any, delta: number): any; | |
|
962 | } | |
|
963 | ||
|
964 | interface _Spinner extends RangeBoundTextBox { | |
|
965 | /** | |
|
966 | * Number of milliseconds before a held arrow key or up/down button becomes typematic | |
|
967 | */ | |
|
968 | defaultTimeout: number; | |
|
969 | ||
|
970 | /** | |
|
971 | * minimum number of milliseconds that typematic event fires when held key or button is held | |
|
972 | */ | |
|
973 | minimumTimeout: number; | |
|
974 | ||
|
975 | /** | |
|
976 | * Fraction of time used to change the typematic timer between events. | |
|
977 | * 1.0 means that each typematic event fires at defaultTimeout intervals. | |
|
978 | * Less than 1.0 means that each typematic event fires at an increasing faster rate. | |
|
979 | */ | |
|
980 | timeoutChangeRate: number; | |
|
981 | ||
|
982 | /** | |
|
983 | * Adjust the value by this much when spinning using the arrow keys/buttons | |
|
984 | */ | |
|
985 | smallDelta: number; | |
|
986 | ||
|
987 | /** | |
|
988 | * Adjust the value by this much when spinning using the PgUp/Dn keys | |
|
989 | */ | |
|
990 | largeDelta: number; | |
|
991 | ||
|
992 | templateString: string; | |
|
993 | baseClass: string; | |
|
994 | cssStateNodes: CSSStateNodes; | |
|
995 | ||
|
996 | /** | |
|
997 | * Overridable function used to adjust a primitive value(Number/Date/...) by the delta amount specified. | |
|
998 | * The val is adjusted in a way that makes sense to the object type. | |
|
999 | */ | |
|
1000 | adjust: AdjustFunction; | |
|
1001 | ||
|
1002 | postCreate(): void; | |
|
1003 | } | |
|
1004 | ||
|
1005 | interface _SpinnerConstrctor extends _WidgetBaseConstructor<_Spinner> { } | |
|
1006 | ||
|
1007 | /* dijit/form/_TextBoxMixin */ | |
|
1008 | ||
|
1009 | interface _TextBoxMixin<C extends Constraints> { | |
|
1010 | /** | |
|
1011 | * Removes leading and trailing whitespace if true. Default is false. | |
|
1012 | */ | |
|
1013 | trim: boolean; | |
|
1014 | ||
|
1015 | /** | |
|
1016 | * Converts all characters to uppercase if true. Default is false. | |
|
1017 | */ | |
|
1018 | uppercase: boolean; | |
|
1019 | ||
|
1020 | /** | |
|
1021 | * Converts all characters to lowercase if true. Default is false. | |
|
1022 | */ | |
|
1023 | lowercase: boolean; | |
|
1024 | ||
|
1025 | /** | |
|
1026 | * Converts the first character of each word to uppercase if true. | |
|
1027 | */ | |
|
1028 | propercase: boolean; | |
|
1029 | ||
|
1030 | /** | |
|
1031 | * HTML INPUT tag maxLength declaration. | |
|
1032 | */ | |
|
1033 | maxLength: string; | |
|
1034 | ||
|
1035 | /** | |
|
1036 | * If true, all text will be selected when focused with mouse | |
|
1037 | */ | |
|
1038 | selectOnClick: boolean; | |
|
1039 | ||
|
1040 | /** | |
|
1041 | * Defines a hint to help users fill out the input field (as defined in HTML 5). | |
|
1042 | * This should only contain plain text (no html markup). | |
|
1043 | */ | |
|
1044 | placeHolder: string; | |
|
1045 | ||
|
1046 | /** | |
|
1047 | * For subclasses like ComboBox where the displayed value | |
|
1048 | * (ex: Kentucky) and the serialized value (ex: KY) are different, | |
|
1049 | * this represents the displayed value. | |
|
1050 | * | |
|
1051 | * Setting 'displayedValue' through set('displayedValue', ...) | |
|
1052 | * updates 'value', and vice-versa. Otherwise 'value' is updated | |
|
1053 | * from 'displayedValue' periodically, like onBlur etc. | |
|
1054 | */ | |
|
1055 | displayedValue: string; | |
|
1056 | ||
|
1057 | /** | |
|
1058 | * Replaceable function to convert a value to a properly formatted string. | |
|
1059 | */ | |
|
1060 | format: ConstrainedValueFunction<any, C, any>; | |
|
1061 | ||
|
1062 | /** | |
|
1063 | * Replaceable function to convert a formatted string to a value | |
|
1064 | */ | |
|
1065 | parse: ConstrainedValueFunction<any, C, any>; | |
|
1066 | ||
|
1067 | /** | |
|
1068 | * Connect to this function to receive notifications of various user data-input events. | |
|
1069 | * Return false to cancel the event and prevent it from being processed. | |
|
1070 | * Note that although for historical reasons this method is called `onInput()`, it doesn't | |
|
1071 | * correspond to the standard DOM "input" event, because it occurs before the input has been processed. | |
|
1072 | */ | |
|
1073 | onInput(e: InputEvent): void; | |
|
1074 | ||
|
1075 | postCreate(): void; | |
|
1076 | ||
|
1077 | /** | |
|
1078 | * if the textbox is blank, what value should be reported | |
|
1079 | */ | |
|
1080 | _blankValue: string; | |
|
1081 | ||
|
1082 | /** | |
|
1083 | * Auto-corrections (such as trimming) that are applied to textbox | |
|
1084 | * value on blur or form submit. | |
|
1085 | */ | |
|
1086 | filter<T>(val: T): T; | |
|
1087 | filter<T extends number>(value: T): T; | |
|
1088 | ||
|
1089 | _setBlurValue(): void; | |
|
1090 | ||
|
1091 | reset(): void; | |
|
1092 | } | |
|
1093 | ||
|
1094 | /* dijit/form/_ToggleButtonMixin */ | |
|
1095 | ||
|
1096 | interface _ToggleButtonMixin { | |
|
1097 | /** | |
|
1098 | * Corresponds to the native HTML `<input>` element's attribute. | |
|
1099 | * In markup, specified as "checked='checked'" or just "checked". | |
|
1100 | * True if the button is depressed, or the checkbox is checked, | |
|
1101 | * or the radio button is selected, etc. | |
|
1102 | */ | |
|
1103 | checked: boolean; | |
|
1104 | ||
|
1105 | postCreate(): void; | |
|
1106 | ||
|
1107 | /** | |
|
1108 | * Reset the widget's value to what it was at initialization time | |
|
1109 | */ | |
|
1110 | reset(): void; | |
|
1111 | ||
|
1112 | _hasBeenBlurred?: boolean; | |
|
1113 | } | |
|
1114 | ||
|
1115 | /* dijit/form/Button */ | |
|
1116 | ||
|
1117 | interface Button extends _FormWidget, _ButtonMixin { | |
|
1118 | /** | |
|
1119 | * Set this to true to hide the label text and display only the icon. | |
|
1120 | * (If showLabel=false then iconClass must be specified.) | |
|
1121 | * Especially useful for toolbars. | |
|
1122 | * If showLabel=true, the label will become the title (a.k.a. tooltip/hint) | |
|
1123 | */ | |
|
1124 | showLabel: boolean; | |
|
1125 | ||
|
1126 | /** | |
|
1127 | * Class to apply to DOMNode in button to make it display an icon | |
|
1128 | */ | |
|
1129 | iconClass: string; | |
|
1130 | ||
|
1131 | baseClass: string; | |
|
1132 | templateString: string; | |
|
1133 | postCreate(): void; | |
|
1134 | setLabel(content: string): void; | |
|
1135 | onLabelSet(e: Event): void; | |
|
1136 | ||
|
1137 | onClick(e: MouseEvent): boolean | void; | |
|
1138 | ||
|
1139 | set(name: 'showLabel', value: boolean): this; | |
|
1140 | set(name: 'value', value: string): this; | |
|
1141 | set(name: 'name', value: string): this; | |
|
1142 | set(name: 'label', value: string): this; | |
|
1143 | set(name: string, value: any): this; | |
|
1144 | set(values: Object): this; | |
|
1145 | } | |
|
1146 | ||
|
1147 | interface ButtonConstructor extends _WidgetBaseConstructor<Button> { } | |
|
1148 | ||
|
1149 | /* dijit/form/CheckBox */ | |
|
1150 | ||
|
1151 | interface CheckBox extends ToggleButton, _CheckBoxMixin { | |
|
1152 | templateString: string; | |
|
1153 | baseClass: string; | |
|
1154 | postMixInProperties(): void; | |
|
1155 | value: string; | |
|
1156 | ||
|
1157 | set(name: 'value', value: string | boolean): this; | |
|
1158 | set(name: string, value: any): this; | |
|
1159 | set(values: Object): this; | |
|
1160 | } | |
|
1161 | ||
|
1162 | interface CheckBoxConstructor extends _WidgetBaseConstructor<CheckBox> { } | |
|
1163 | ||
|
1164 | /* dijit/form/ComboBox */ | |
|
1165 | ||
|
1166 | interface ComboBox<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions, C extends Constraints> extends ValidationTextBox<C>, ComboBoxMixin<T, Q, O> { | |
|
1167 | set(name: string, value: any): this; | |
|
1168 | set(values: Object): this; | |
|
1169 | } | |
|
1170 | ||
|
1171 | interface ComboBoxConstructor extends _WidgetBaseConstructor<ComboBox<any, any, any, any>> { | |
|
1172 | new <T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions, C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): ComboBox<T, Q, O, C>; | |
|
1173 | } | |
|
1174 | ||
|
1175 | /* dijit/form/ComboBoxMixin */ | |
|
1176 | ||
|
1177 | interface ComboBoxMixin<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions> extends _HasDropDown<_ComboBoxMenu<T>>, _AutoCompleterMixin<T, Q, O> { | |
|
1178 | ||
|
1179 | /** | |
|
1180 | * Dropdown widget class used to select a date/time. | |
|
1181 | * Subclasses should specify this. | |
|
1182 | */ | |
|
1183 | dropDownClass: _ComboBoxMenu<T>; | |
|
1184 | ||
|
1185 | /** | |
|
1186 | * Set this textbox to have a down arrow button, to display the drop down list. | |
|
1187 | * Defaults to true. | |
|
1188 | */ | |
|
1189 | hasDownArrow: boolean; | |
|
1190 | ||
|
1191 | templateString: string; | |
|
1192 | baseClass: string; | |
|
1193 | ||
|
1194 | /** | |
|
1195 | * Reference to data provider object used by this ComboBox. | |
|
1196 | * | |
|
1197 | * Should be dojo/store/api/Store, but dojo/data/api/Read supported | |
|
1198 | * for backwards compatibility. | |
|
1199 | */ | |
|
1200 | store: dojo.store.api.Store<T, Q, O>; | |
|
1201 | ||
|
1202 | cssStateNodes: CSSStateNodes; | |
|
1203 | postMixInProperties(): void; | |
|
1204 | buildRendering(): void; | |
|
1205 | } | |
|
1206 | ||
|
1207 | interface ComboBoxMixinConstructor<T, U extends dojo.store.api.BaseQueryType, V> extends _WidgetBaseConstructor<ComboBoxMixin<T, U, V>> { } | |
|
1208 | ||
|
1209 | /* dijit/form/CurrencyTextBox */ | |
|
1210 | ||
|
1211 | interface CurrencyTextBoxConstraints extends NumberTextBoxConstraints, dojo.CurrencyFormatOptions, dojo.CurrencyParseOptions { | |
|
1212 | } | |
|
1213 | ||
|
1214 | interface CurrencyTextBox extends NumberTextBox { | |
|
1215 | /** | |
|
1216 | * the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD" | |
|
1217 | */ | |
|
1218 | currency: string; | |
|
1219 | ||
|
1220 | /** | |
|
1221 | * Despite the name, this parameter specifies both constraints on the input | |
|
1222 | * (including minimum/maximum allowed values) as well as | |
|
1223 | * formatting options. See `dijit/form/CurrencyTextBox.__Constraints` for details. | |
|
1224 | */ | |
|
1225 | constraints: CurrencyTextBoxConstraints; | |
|
1226 | ||
|
1227 | baseClass: string; | |
|
1228 | ||
|
1229 | _formatter: (value: number, options?: dojo.CurrencyFormatOptions) => string; | |
|
1230 | _parser: (expression: string, options?: dojo.CurrencyParseOptions) => number; | |
|
1231 | _regExpGenerator: (options?: dojo.NumberRegexpOptions) => string; | |
|
1232 | ||
|
1233 | /** | |
|
1234 | * Parses string value as a Currency, according to the constraints object | |
|
1235 | */ | |
|
1236 | parse(value: string, constraints: CurrencyTextBoxConstraints): string; | |
|
1237 | } | |
|
1238 | ||
|
1239 | interface CurrencyTextBoxConstructor extends _WidgetBaseConstructor<CurrencyTextBox> { } | |
|
1240 | ||
|
1241 | /* dijit/form/DataList */ | |
|
1242 | ||
|
1243 | interface DataList<T extends Object> extends dojo.store.Memory<T> { | |
|
1244 | /** | |
|
1245 | * Get the option marked as selected, like `<option selected>`. | |
|
1246 | * Not part of dojo.data API. | |
|
1247 | */ | |
|
1248 | fetchSelectedItem(): T; | |
|
1249 | } | |
|
1250 | ||
|
1251 | interface DataListConstructor { | |
|
1252 | new <T extends Object>(params: Object, srcNodeRef: dojo.NodeOrString): DataList<T>; | |
|
1253 | } | |
|
1254 | ||
|
1255 | /* dijit/form/DateTextBox */ | |
|
1256 | ||
|
1257 | interface DateTextBox extends _DateTimeTextBox<Calendar> { | |
|
1258 | baseClass: string; | |
|
1259 | popupClass: CalendarConstructor; | |
|
1260 | _selector: string; | |
|
1261 | maxHeight: number; | |
|
1262 | ||
|
1263 | /** | |
|
1264 | * The value of this widget as a JavaScript Date object, with only year/month/day specified.` | |
|
1265 | */ | |
|
1266 | value: Date; | |
|
1267 | } | |
|
1268 | ||
|
1269 | interface DateTextBoxConstructor extends _WidgetBaseConstructor<DateTextBox> { } | |
|
1270 | ||
|
1271 | /* dijit/form/DropDownButton */ | |
|
1272 | ||
|
1273 | interface DropDownButton<T extends _WidgetBase> extends Button, _Container, _HasDropDown<T> { | |
|
1274 | baseClass: string; | |
|
1275 | templateString: string; | |
|
1276 | ||
|
1277 | /** | |
|
1278 | * Overrides _TemplatedMixin#_fillContent(). | |
|
1279 | * My inner HTML possibly contains both the button label and/or a drop down widget, like | |
|
1280 | * <DropDownButton> <span>push me</span> <Menu> ... </Menu> </DropDownButton> | |
|
1281 | */ | |
|
1282 | _fillContent(): void; | |
|
1283 | startup(): void; | |
|
1284 | ||
|
1285 | /** | |
|
1286 | * Returns whether or not we are loaded - if our dropdown has an href, | |
|
1287 | * then we want to check that. | |
|
1288 | */ | |
|
1289 | isLoaded(): boolean; | |
|
1290 | ||
|
1291 | /** | |
|
1292 | * Default implementation assumes that drop down already exists, | |
|
1293 | * but hasn't loaded it's data (ex: ContentPane w/href). | |
|
1294 | * App must override if the drop down is lazy-created. | |
|
1295 | */ | |
|
1296 | loadDropDown(callback: () => void): void; | |
|
1297 | ||
|
1298 | /** | |
|
1299 | * Overridden so that focus is handled by the _HasDropDown mixin, not by | |
|
1300 | * the _FormWidget mixin. | |
|
1301 | */ | |
|
1302 | isFocusable(): boolean; | |
|
1303 | } | |
|
1304 | ||
|
1305 | interface DropDownButtonConstructor extends _WidgetBaseConstructor<DropDownButton<any>> { | |
|
1306 | new <T extends _WidgetBase>(params: Object, srcNodeRef: dojo.NodeOrString): DropDownButton<T>; | |
|
1307 | } | |
|
1308 | ||
|
1309 | /* dijit/form/FilteringSelect */ | |
|
1310 | ||
|
1311 | interface FilteringSelect<C extends Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions> extends MappedTextBox<C>, ComboBoxMixin<T, Q, O> { | |
|
1312 | /** | |
|
1313 | * True (default) if user is required to enter a value into this field. | |
|
1314 | */ | |
|
1315 | required: boolean; | |
|
1316 | ||
|
1317 | _lastDisplayedValue: string; | |
|
1318 | _isValidSubset(): boolean; | |
|
1319 | isValid(): boolean; | |
|
1320 | _refreshState(): void; | |
|
1321 | ||
|
1322 | /** | |
|
1323 | * Callback from dojo.store after lookup of user entered value finishes | |
|
1324 | */ | |
|
1325 | _callbackSetLabel(result: T[], query: Q, options: O, priorityChange?: boolean): void; | |
|
1326 | ||
|
1327 | _openResultList(results: T[], query: Q, options: O): void; | |
|
1328 | undo(): void; | |
|
1329 | ||
|
1330 | set(name: 'displayedValue', value: string): this; | |
|
1331 | set(name: 'item', value: T): this; | |
|
1332 | set(name: string, value: any): this; | |
|
1333 | set(values: Object): this; | |
|
1334 | } | |
|
1335 | ||
|
1336 | interface FilteringSelectConstructor extends _WidgetBaseConstructor<FilteringSelect<any, any, any, any>> { | |
|
1337 | new <C extends Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions>(params: Object, srcNodeRef: dojo.NodeOrString): FilteringSelect<C, T, Q, O>; | |
|
1338 | } | |
|
1339 | ||
|
1340 | /* dijit/form/Form */ | |
|
1341 | ||
|
1342 | interface Form extends _Widget, _TemplatedMixin, _FormMixin, layout._ContentPaneResizeMixin { | |
|
1343 | name?: string; | |
|
1344 | action?: string; | |
|
1345 | method?: string; | |
|
1346 | encType?: string; | |
|
1347 | 'accept-charset'?: string; | |
|
1348 | accept?: string; | |
|
1349 | target?: string; | |
|
1350 | templateString: string; | |
|
1351 | ||
|
1352 | /** | |
|
1353 | * Deprecated: use submit() | |
|
1354 | */ | |
|
1355 | execute(formContents: Object): void; | |
|
1356 | ||
|
1357 | /** | |
|
1358 | * Deprecated: use onSubmit() | |
|
1359 | */ | |
|
1360 | onExecute(): void; | |
|
1361 | ||
|
1362 | /** | |
|
1363 | * restores all widget values back to their init values, | |
|
1364 | * calls onReset() which can cancel the reset by returning false | |
|
1365 | */ | |
|
1366 | reset(e?: Event): void; | |
|
1367 | ||
|
1368 | /** | |
|
1369 | * Callback when user resets the form. This method is intended | |
|
1370 | * to be over-ridden. When the `reset` method is called | |
|
1371 | * programmatically, the return value from `onReset` is used | |
|
1372 | * to compute whether or not resetting should proceed | |
|
1373 | */ | |
|
1374 | onReset(e?: Event): boolean; | |
|
1375 | ||
|
1376 | /** | |
|
1377 | * Callback when user submits the form. | |
|
1378 | */ | |
|
1379 | onSubmit(e?: Event): boolean; | |
|
1380 | ||
|
1381 | /** | |
|
1382 | * programmatically submit form if and only if the `onSubmit` returns true | |
|
1383 | */ | |
|
1384 | submit(): void; | |
|
1385 | } | |
|
1386 | ||
|
1387 | interface FormConstructor extends _WidgetBaseConstructor<Form> { } | |
|
1388 | ||
|
1389 | /* dijit/form/HorizontalRule */ | |
|
1390 | ||
|
1391 | /** | |
|
1392 | * Hash marks for `dijit/form/HorizontalSlider` | |
|
1393 | */ | |
|
1394 | interface HorizontalRule extends _Widget, _TemplatedMixin { | |
|
1395 | /** | |
|
1396 | * Number of hash marks to generate | |
|
1397 | */ | |
|
1398 | count: number; | |
|
1399 | ||
|
1400 | /** | |
|
1401 | * For HorizontalSlider, this is either "topDecoration" or "bottomDecoration", and indicates whether this rule goes above or below the slider. | |
|
1402 | */ | |
|
1403 | container: string; | |
|
1404 | ||
|
1405 | /** | |
|
1406 | * CSS style to apply to individual hash marks | |
|
1407 | */ | |
|
1408 | ruleStyle: string; | |
|
1409 | ||
|
1410 | _positionPrefix: string; | |
|
1411 | _positionSuffix: string; | |
|
1412 | _suffix: string; | |
|
1413 | ||
|
1414 | _genHTML(pos: number): string; | |
|
1415 | ||
|
1416 | /** | |
|
1417 | * VerticalRule will override this... | |
|
1418 | */ | |
|
1419 | _isHorizontal: boolean; | |
|
1420 | } | |
|
1421 | ||
|
1422 | interface HorizontalRuleConstructor extends _WidgetBaseConstructor<HorizontalRule> { } | |
|
1423 | ||
|
1424 | /* dijit/form/HorizontalRuleLabels */ | |
|
1425 | ||
|
1426 | /** | |
|
1427 | * Labels for `dijit/form/HorizontalSlider` | |
|
1428 | */ | |
|
1429 | interface HorizontalRuleLabels extends HorizontalRule { | |
|
1430 | /** | |
|
1431 | * CSS style to apply to individual text labels | |
|
1432 | */ | |
|
1433 | labelStyle: string; | |
|
1434 | ||
|
1435 | /** | |
|
1436 | * Array of text labels to render - evenly spaced from left-to-right or bottom-to-top. | |
|
1437 | * Alternately, minimum and maximum can be specified, to get numeric labels. | |
|
1438 | */ | |
|
1439 | labels: string[]; | |
|
1440 | ||
|
1441 | /** | |
|
1442 | * Number of generated numeric labels that should be rendered as '' on the ends when labels[] are not specified | |
|
1443 | */ | |
|
1444 | numericMargin: number; | |
|
1445 | ||
|
1446 | /** | |
|
1447 | * Leftmost label value for generated numeric labels when labels[] are not specified | |
|
1448 | */ | |
|
1449 | minimum: number; | |
|
1450 | ||
|
1451 | /** | |
|
1452 | * Rightmost label value for generated numeric labels when labels[] are not specified | |
|
1453 | */ | |
|
1454 | maximum: number; | |
|
1455 | ||
|
1456 | /** | |
|
1457 | * pattern, places, lang, et al (see dojo.number) for generated numeric labels when labels[] are not specified | |
|
1458 | */ | |
|
1459 | constraints: { pattern: string }; | |
|
1460 | ||
|
1461 | /** | |
|
1462 | * Returns the value to be used in HTML for the label as part of the left: attribute | |
|
1463 | */ | |
|
1464 | _calcPosition(pos: number): number; | |
|
1465 | ||
|
1466 | _genHTML(pos: number, ndx?: number): string; | |
|
1467 | ||
|
1468 | /** | |
|
1469 | * extension point for bidi code | |
|
1470 | */ | |
|
1471 | _genDirectionHTML(label: string): string; | |
|
1472 | ||
|
1473 | /** | |
|
1474 | * Overridable function to return array of labels to use for this slider. | |
|
1475 | * Can specify a getLabels() method instead of a labels[] array, or min/max attributes. | |
|
1476 | */ | |
|
1477 | getLabels(): string[]; | |
|
1478 | } | |
|
1479 | ||
|
1480 | interface HorizontalRuleLabelsConstructor extends _WidgetBaseConstructor<HorizontalRuleLabels> { } | |
|
1481 | ||
|
1482 | /* dijit/form/HorizontalSlider */ | |
|
1483 | ||
|
1484 | interface _SliderMover extends dojo.dnd.Mover { } | |
|
1485 | ||
|
1486 | /** | |
|
1487 | * A form widget that allows one to select a value with a horizontally draggable handle | |
|
1488 | */ | |
|
1489 | interface HorizontalSlider extends _FormValueWidget, _Container { | |
|
1490 | /** | |
|
1491 | * Show increment/decrement buttons at the ends of the slider? | |
|
1492 | */ | |
|
1493 | showButtons: boolean; | |
|
1494 | ||
|
1495 | /** | |
|
1496 | * The minimum value the slider can be set to. | |
|
1497 | */ | |
|
1498 | minimum: number; | |
|
1499 | ||
|
1500 | /** | |
|
1501 | * The maximum value the slider can be set to. | |
|
1502 | */ | |
|
1503 | maximum: number; | |
|
1504 | ||
|
1505 | /** | |
|
1506 | * If specified, indicates that the slider handle has only 'discreteValues' possible positions, and that after dragging the handle, it will snap to the nearest possible position. | |
|
1507 | * Thus, the slider has only 'discreteValues' possible values. | |
|
1508 | * | |
|
1509 | * For example, if minimum=10, maxiumum=30, and discreteValues=3, then the slider handle has three possible positions, representing values 10, 20, or 30. | |
|
1510 | * | |
|
1511 | * If discreteValues is not specified or if it's value is higher than the number of pixels in the slider bar, then the slider handle can be moved freely, and the slider's value will be computed/reported based on pixel position (in this case it will likely be fractional, such as 123.456789). | |
|
1512 | */ | |
|
1513 | discreteValues: number; | |
|
1514 | ||
|
1515 | /** | |
|
1516 | * If discreteValues is also specified, this indicates the amount of clicks (ie, snap positions) that the slider handle is moved via pageup/pagedown keys. | |
|
1517 | * If discreteValues is not specified, it indicates the number of pixels. | |
|
1518 | */ | |
|
1519 | pageIncrement: number; | |
|
1520 | ||
|
1521 | /** | |
|
1522 | * If clicking the slider bar changes the value or not | |
|
1523 | */ | |
|
1524 | clickSelect: boolean; | |
|
1525 | ||
|
1526 | /** | |
|
1527 | * The time in ms to take to animate the slider handle from 0% to 100%, when clicking the slider bar to make the handle move. | |
|
1528 | */ | |
|
1529 | slideDuration: number; | |
|
1530 | ||
|
1531 | _mousePixelCoord: string; | |
|
1532 | _pixelCount: string; | |
|
1533 | _startingPixelCoord: string; | |
|
1534 | _handleOffsetCoord: string; | |
|
1535 | _progressPixelSize: string; | |
|
1536 | ||
|
1537 | _onKeyUp(e: Event): void; | |
|
1538 | _onKeyDown(e: Event): void; | |
|
1539 | _onHandleClick(e: Event): void; | |
|
1540 | ||
|
1541 | /** | |
|
1542 | * Returns true if direction is from right to left | |
|
1543 | */ | |
|
1544 | _isReversed(): boolean; | |
|
1545 | ||
|
1546 | _onBarClick(e: Event): void; | |
|
1547 | ||
|
1548 | _setPixelValue(pixelValue: number, maxPixels: number, priorityChange?: boolean): void; | |
|
1549 | ||
|
1550 | _setValueAttr(value: number, priorityChange?: boolean): void; | |
|
1551 | ||
|
1552 | _bumpValue(signedChange: number, priorityChange: boolean): void; | |
|
1553 | ||
|
1554 | _onClkBumper(val: any): void; | |
|
1555 | _onClkIncBumper(): void; | |
|
1556 | _onClkDecBumper(): void; | |
|
1557 | ||
|
1558 | decrement(e: Event): void; | |
|
1559 | increment(e: Event): void; | |
|
1560 | ||
|
1561 | _mouseWheeled(evt: Event): void; | |
|
1562 | ||
|
1563 | _typematicCallback(count: number, button: Element, e: Event): void; | |
|
1564 | } | |
|
1565 | ||
|
1566 | interface HorizontalSliderConstructor extends _WidgetBaseConstructor<HorizontalSlider> { | |
|
1567 | /** | |
|
1568 | * for monkey patching | |
|
1569 | */ | |
|
1570 | _Mover: _SliderMover; | |
|
1571 | } | |
|
1572 | ||
|
1573 | /* dijit/form/MappedTextBox */ | |
|
1574 | ||
|
1575 | interface MappedTextBox<C extends Constraints> extends ValidationTextBox<C> { | |
|
1576 | postMixInProperties(): void; | |
|
1577 | serialize: SerializationFunction; | |
|
1578 | toString(): string; | |
|
1579 | validate(isFocused?: boolean): boolean; | |
|
1580 | buildRendering(): void; | |
|
1581 | reset(): void; | |
|
1582 | } | |
|
1583 | ||
|
1584 | interface MappedTextBoxConstructor extends _WidgetBaseConstructor<MappedTextBox<Constraints>> { | |
|
1585 | new <C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): MappedTextBox<C>; | |
|
1586 | } | |
|
1587 | ||
|
1588 | /* dijit/form/NumberSpinner */ | |
|
1589 | ||
|
1590 | interface NumberSpinner extends _Spinner, NumberTextBoxMixin { | |
|
1591 | constraints: NumberTextBoxConstraints; | |
|
1592 | baseClass: string; | |
|
1593 | adjust(val: any, delta: number): any; | |
|
1594 | ||
|
1595 | /* overrides */ | |
|
1596 | pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>; | |
|
1597 | parse(value: string, constraints: NumberTextBoxConstraints): string; | |
|
1598 | format(value: number, constraints: NumberTextBoxConstraints): string; | |
|
1599 | filter(value: number): number; | |
|
1600 | value: number; | |
|
1601 | } | |
|
1602 | ||
|
1603 | interface NumberSpinnerConstructor extends _WidgetBaseConstructor<NumberSpinner> { } | |
|
1604 | ||
|
1605 | /* dijit/form/NumberTextBox */ | |
|
1606 | ||
|
1607 | interface NumberTextBoxConstraints extends RangeBoundTextBoxConstraints, dojo.NumberFormatOptions, dojo.NumberParseOptions { } | |
|
1608 | ||
|
1609 | interface NumberTextBoxMixin { | |
|
1610 | pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>; | |
|
1611 | constraints: NumberTextBoxConstraints; | |
|
1612 | value: number; | |
|
1613 | editOptions: { pattern: string }; | |
|
1614 | _formatter: (value: number, options?: dojo.NumberFormatOptions) => string; | |
|
1615 | _regExpGenerator: (options?: dojo.NumberRegexpOptions) => string; | |
|
1616 | _decimalInfo: (constraints: Constraints) => { sep: string; places: number; }; | |
|
1617 | postMixInProperties(): void; | |
|
1618 | format(value: number, constraints: NumberTextBoxConstraints): string; | |
|
1619 | _parser: (expression: string, options?: dojo.NumberParseOptions) => number; | |
|
1620 | parse(value: string, constraints: dojo.NumberParseOptions): string; | |
|
1621 | filter(value: number): number; | |
|
1622 | serialize: SerializationFunction; | |
|
1623 | isValid(isFocused: boolean): boolean; | |
|
1624 | } | |
|
1625 | ||
|
1626 | interface NumberTextBoxMixinConstructor extends _WidgetBaseConstructor<NumberTextBoxMixin> { } | |
|
1627 | ||
|
1628 | interface NumberTextBox extends RangeBoundTextBox, NumberTextBoxMixin { | |
|
1629 | constraints: NumberTextBoxConstraints; | |
|
1630 | pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>; | |
|
1631 | parse(value: string, constraints: dojo.NumberParseOptions): string; | |
|
1632 | format(value: number, constraints: dojo.NumberFormatOptions): string; | |
|
1633 | value: number; | |
|
1634 | filter(value: number): number; | |
|
1635 | } | |
|
1636 | ||
|
1637 | interface NumberTextBoxConstructor extends _WidgetBaseConstructor<NumberTextBox> { | |
|
1638 | Mixin: NumberTextBoxMixinConstructor; | |
|
1639 | } | |
|
1640 | ||
|
1641 | /* dijit/form/RadioButton */ | |
|
1642 | ||
|
1643 | interface RadioButton extends CheckBox, _RadioButtonMixin { | |
|
1644 | baseClass: string; | |
|
1645 | } | |
|
1646 | ||
|
1647 | interface RadioButtonConstructor extends _WidgetBaseConstructor<RadioButton> { } | |
|
1648 | ||
|
1649 | /* dijit/form/RangeBoundTextBox */ | |
|
1650 | ||
|
1651 | interface RangeBoundTextBoxConstraints extends Constraints { | |
|
1652 | min?: number; | |
|
1653 | max?: number; | |
|
1654 | } | |
|
1655 | ||
|
1656 | interface RangeBoundTextBox extends MappedTextBox<RangeBoundTextBoxConstraints> { | |
|
1657 | /** | |
|
1658 | * The message to display if value is out-of-range | |
|
1659 | */ | |
|
1660 | rangeMessage: string; | |
|
1661 | ||
|
1662 | /** | |
|
1663 | * Overridable function used to validate the range of the numeric input value. | |
|
1664 | */ | |
|
1665 | rangeCheck(primative: number, constraints: RangeBoundTextBoxConstraints): boolean; | |
|
1666 | ||
|
1667 | /** | |
|
1668 | * Tests if the value is in the min/max range specified in constraints | |
|
1669 | */ | |
|
1670 | isInRange(isFocused: boolean): boolean; | |
|
1671 | ||
|
1672 | /** | |
|
1673 | * Returns true if the value is out of range and will remain | |
|
1674 | * out of range even if the user types more characters | |
|
1675 | */ | |
|
1676 | _isDefinitelyOutOfRange(): boolean; | |
|
1677 | ||
|
1678 | isValid(isFocused: boolean): boolean; | |
|
1679 | getErrorMessage(isFocused: boolean): string; | |
|
1680 | postMixInProperties(): void; | |
|
1681 | } | |
|
1682 | ||
|
1683 | interface RangeBoundTextBoxConstructor extends _WidgetBaseConstructor<RangeBoundTextBox> { } | |
|
1684 | ||
|
1685 | /* dijit/form/Select */ | |
|
1686 | ||
|
1687 | interface Select<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions, U extends dijit._WidgetBase> extends _FormSelectWidget<T, Q, O>, _HasDropDown<U>, _KeyNavMixin { | |
|
1688 | baseClass: string; | |
|
1689 | ||
|
1690 | /** | |
|
1691 | * What to display in an "empty" drop down. | |
|
1692 | */ | |
|
1693 | emptyLabel: string; | |
|
1694 | ||
|
1695 | /** | |
|
1696 | * Specifies how to interpret the labelAttr in the data store items. | |
|
1697 | */ | |
|
1698 | labelType: string; | |
|
1699 | ||
|
1700 | /** | |
|
1701 | * Currently displayed error/prompt message | |
|
1702 | */ | |
|
1703 | message: string; | |
|
1704 | ||
|
1705 | /** | |
|
1706 | * Can be true or false, default is false. | |
|
1707 | */ | |
|
1708 | required: boolean; | |
|
1709 | ||
|
1710 | /** | |
|
1711 | * "Incomplete" if this select is required but unset (i.e. blank value), "" otherwise | |
|
1712 | */ | |
|
1713 | state: string; | |
|
1714 | ||
|
1715 | /** | |
|
1716 | * Order fields are traversed when user hits the tab key | |
|
1717 | */ | |
|
1718 | tabIndex: any; | |
|
1719 | templateString: any; | |
|
1720 | ||
|
1721 | /** | |
|
1722 | * See the description of dijit/Tooltip.defaultPosition for details on this parameter. | |
|
1723 | */ | |
|
1724 | tooltipPosition: any; | |
|
1725 | ||
|
1726 | childSelector(node: Element | Node): boolean; | |
|
1727 | destroy(preserveDom: boolean): void; | |
|
1728 | focus(): void; | |
|
1729 | ||
|
1730 | /** | |
|
1731 | * Sets the value to the given option, used during search by letter. | |
|
1732 | * @param widget Reference to option's widget | |
|
1733 | */ | |
|
1734 | focusChild(widget: dijit._WidgetBase): void; | |
|
1735 | isLoaded(): boolean; | |
|
1736 | ||
|
1737 | /** | |
|
1738 | * Whether or not this is a valid value. | |
|
1739 | * @param isFocused | |
|
1740 | */ | |
|
1741 | isValid(isFocused: boolean): boolean; | |
|
1742 | ||
|
1743 | /** | |
|
1744 | * populates the menu | |
|
1745 | * @param loadCallback | |
|
1746 | */ | |
|
1747 | loadDropDown(loadCallback: () => any): void; | |
|
1748 | postCreate(): void; | |
|
1749 | ||
|
1750 | /** | |
|
1751 | * set the missing message | |
|
1752 | */ | |
|
1753 | postMixInProperties(): void; | |
|
1754 | ||
|
1755 | /** | |
|
1756 | * Overridden so that the state will be cleared. | |
|
1757 | */ | |
|
1758 | reset(): void; | |
|
1759 | startup(): void; | |
|
1760 | ||
|
1761 | /** | |
|
1762 | * Called by oninit, onblur, and onkeypress, and whenever required/disabled state changes | |
|
1763 | * @param isFocused | |
|
1764 | */ | |
|
1765 | validate(isFocused: boolean): boolean; | |
|
1766 | ||
|
1767 | /** | |
|
1768 | * When a key is pressed that matches a child item, | |
|
1769 | * this method is called so that a widget can take | |
|
1770 | * appropriate action is necessary. | |
|
1771 | * @param item | |
|
1772 | * @param evt | |
|
1773 | * @param searchString | |
|
1774 | * @param numMatches | |
|
1775 | */ | |
|
1776 | onKeyboardSearch(item: dijit._WidgetBase, evt: Event, searchString: string, numMatches: number): void; | |
|
1777 | } | |
|
1778 | ||
|
1779 | interface SelectConstructor extends _WidgetBaseConstructor<Select<any, any, any, any>> { } | |
|
1780 | ||
|
1781 | /* dijit/form/SimpleTextarea */ | |
|
1782 | ||
|
1783 | interface SimpleTextarea extends TextBox { | |
|
1784 | baseClass: string; | |
|
1785 | rows: string; | |
|
1786 | cols: string; | |
|
1787 | templateString: string; | |
|
1788 | postMixInProperties(): void; | |
|
1789 | buildRendering(): void; | |
|
1790 | filter(value: string): string; | |
|
1791 | } | |
|
1792 | ||
|
1793 | interface SimpleTextareaConstructor extends _WidgetBaseConstructor<SimpleTextarea> { | |
|
1794 | new (params: Object, srcNodeRef: dojo.NodeOrString): SimpleTextarea; | |
|
1795 | } | |
|
1796 | ||
|
1797 | /* dijit/form/Textarea */ | |
|
1798 | ||
|
1799 | interface Textarea extends SimpleTextarea, _ExpandingTextAreaMixin { | |
|
1800 | baseClass: string; | |
|
1801 | cols: string; | |
|
1802 | buildRendering(): void; | |
|
1803 | } | |
|
1804 | ||
|
1805 | interface TextareaConstructor extends _WidgetBaseConstructor<Textarea> { } | |
|
1806 | ||
|
1807 | /* dijit/form/TextBox */ | |
|
1808 | ||
|
1809 | interface TextBox extends _FormValueWidget, _TextBoxMixin<Constraints> { | |
|
1810 | set(name: 'displayedValue', value: string): this; | |
|
1811 | set(name: 'disabled', value: boolean): this; | |
|
1812 | set(name: 'value', value: string): this; | |
|
1813 | set(name: string, value: any): this; | |
|
1814 | set(values: Object): this; | |
|
1815 | ||
|
1816 | get(name: 'displayedValue'): string; | |
|
1817 | get(name: 'value'): string; | |
|
1818 | get(name: string): any; | |
|
1819 | } | |
|
1820 | ||
|
1821 | interface TextBoxConstructor extends _WidgetBaseConstructor<TextBox> { } | |
|
1822 | ||
|
1823 | /* dijit/form/ToggleButton */ | |
|
1824 | ||
|
1825 | interface ToggleButton extends Button, _ToggleButtonMixin { | |
|
1826 | baseClass: string; | |
|
1827 | ||
|
1828 | setChecked(checked: boolean): void; | |
|
1829 | ||
|
1830 | set(name: 'checked', value: boolean): this; | |
|
1831 | set(name: string, value: any): this; | |
|
1832 | set(values: Object): this; | |
|
1833 | } | |
|
1834 | ||
|
1835 | interface ToggleButtonConstructor extends _WidgetBaseConstructor<ToggleButton> { } | |
|
1836 | ||
|
1837 | /* dijit/form/ValidationTextBox */ | |
|
1838 | ||
|
1839 | interface IsValidFunction { | |
|
1840 | (isFocused?: boolean): boolean; | |
|
1841 | } | |
|
1842 | ||
|
1843 | interface ValidationTextBox<C extends Constraints> extends TextBox { | |
|
1844 | templateString: string; | |
|
1845 | required: boolean; | |
|
1846 | promptMessage: string; | |
|
1847 | invalidMessage: string; | |
|
1848 | missingMessage: string; | |
|
1849 | message: string; | |
|
1850 | constraints: C; | |
|
1851 | pattern: string | ConstraintsToRegExpString<C>; | |
|
1852 | regExp: string; | |
|
1853 | regExpGen(constraints: C): void; | |
|
1854 | state: string; | |
|
1855 | tooltipPosition: string[]; | |
|
1856 | validator: ConstrainedValidFunction<C>; | |
|
1857 | isValid: IsValidFunction; | |
|
1858 | getErrorMessage(isFocused: boolean): string; | |
|
1859 | getPromptMessage(isFocused: boolean): string; | |
|
1860 | validate(isFocused: boolean): boolean; | |
|
1861 | displayMessage(message: string): void; | |
|
1862 | ||
|
1863 | startup(): void; | |
|
1864 | postMixInProperties(): void; | |
|
1865 | ||
|
1866 | reset(): void; | |
|
1867 | ||
|
1868 | destroy(preserveDom?: boolean): void; | |
|
1869 | ||
|
1870 | set(name: 'constraints', value: Constraints): this; | |
|
1871 | set(name: 'disabled', value: boolean): this; | |
|
1872 | set(name: 'message', value: string): this; | |
|
1873 | set(name: 'pattern', value: string | ConstraintsToRegExpString<C>): this; | |
|
1874 | set(name: 'regExp', value: string): this; | |
|
1875 | set(name: 'regExpGen', value: Constraints): this; | |
|
1876 | set(name: 'required', value: boolean): this; | |
|
1877 | set(name: 'value', value: string): this; | |
|
1878 | set(name: string, value: any): this; | |
|
1879 | set(values: Object): this; | |
|
1880 | ||
|
1881 | get(name: 'pattern'): string | ConstraintsToRegExpString<C>; | |
|
1882 | get(name: string): any; | |
|
1883 | } | |
|
1884 | ||
|
1885 | interface ValidationTextBoxConstructor extends _WidgetBaseConstructor<ValidationTextBox<Constraints>> { | |
|
1886 | new <C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): ValidationTextBox<C>; | |
|
1887 | } | |
|
1888 | } | |
|
1889 | } |
@@ -0,0 +1,5 | |||
|
1 | /// <reference path="../dojo/index.d.ts" /> | |
|
2 | /// <reference path="dijit.d.ts" /> | |
|
3 | /// <reference path="_base.d.ts" /> | |
|
4 | /// <reference path="form.d.ts" /> | |
|
5 | /// <reference path="layout.d.ts" /> |
This diff has been collapsed as it changes many lines, (670 lines changed) Show them Hide them | |||
@@ -0,0 +1,670 | |||
|
1 | declare namespace dijit { | |
|
2 | ||
|
3 | namespace layout { | |
|
4 | ||
|
5 | /* dijit/_LayoutWidget */ | |
|
6 | ||
|
7 | /* tslint:disable:class-name */ | |
|
8 | interface _LayoutWidget extends _Widget, _Container, _Contained { | |
|
9 | ||
|
10 | /** | |
|
11 | * Base class for a _Container widget which is responsible for laying | |
|
12 | * out its children. Widgets which mixin this code must define layout() | |
|
13 | * to manage placement and sizing of the children. | |
|
14 | */ | |
|
15 | baseClass: string; | |
|
16 | /** | |
|
17 | * Indicates that this widget is going to call resize() on its | |
|
18 | * children widgets, setting their size, when they become visible. | |
|
19 | */ | |
|
20 | isLayoutContainer: boolean; | |
|
21 | ||
|
22 | /** | |
|
23 | * Call this to resize a widget, or after its size has changed. | |
|
24 | * | |
|
25 | * ####Change size mode: | |
|
26 | * | |
|
27 | * When changeSize is specified, changes the marginBox of this widget | |
|
28 | * and forces it to re-layout its contents accordingly. | |
|
29 | * changeSize may specify height, width, or both. | |
|
30 | * | |
|
31 | * If resultSize is specified it indicates the size the widget will | |
|
32 | * become after changeSize has been applied. | |
|
33 | * | |
|
34 | * ####Notification mode: | |
|
35 | * | |
|
36 | * When changeSize is null, indicates that the caller has already changed | |
|
37 | * the size of the widget, or perhaps it changed because the browser | |
|
38 | * window was resized. Tells widget to re-layout its contents accordingly. | |
|
39 | * | |
|
40 | * If resultSize is also specified it indicates the size the widget has | |
|
41 | * become. | |
|
42 | * | |
|
43 | * In either mode, this method also: | |
|
44 | * | |
|
45 | * 1. Sets this._borderBox and this._contentBox to the new size of | |
|
46 | * the widget. Queries the current domNode size if necessary. | |
|
47 | * 2. Calls layout() to resize contents (and maybe adjust child widgets). | |
|
48 | */ | |
|
49 | resize(changeSize?: dojo.DomGeometryBox, resultSize?: dojo.DomGeometryWidthHeight): void; | |
|
50 | ||
|
51 | /** | |
|
52 | * Widgets override this method to size and position their contents/children. | |
|
53 | * When this is called, this._contentBox is guaranteed to be set (see resize()). | |
|
54 | * | |
|
55 | * This is called after startup(), and also when the widget's size has been | |
|
56 | * changed. | |
|
57 | */ | |
|
58 | layout(): void; | |
|
59 | } | |
|
60 | ||
|
61 | interface _LayoutWidgetConstructor extends _WidgetBaseConstructor<_LayoutWidget> { } | |
|
62 | ||
|
63 | /* dijit/layout/_TabContainerBase */ | |
|
64 | ||
|
65 | interface _TabContainerBase extends StackContainer, _TemplatedMixin { | |
|
66 | /** | |
|
67 | * Defines where tabs go relative to tab content. | |
|
68 | * "top", "bottom", "left-h", "right-h" | |
|
69 | */ | |
|
70 | tabPosition: string; | |
|
71 | // tabPosition: 'top' | 'bottom' | 'left-h' | 'right-h'; | |
|
72 | ||
|
73 | /** | |
|
74 | * Defines whether the tablist gets an extra class for layouting, putting a border/shading | |
|
75 | * around the set of tabs. Not supported by claro theme. | |
|
76 | */ | |
|
77 | tabStrip: boolean; | |
|
78 | ||
|
79 | /** | |
|
80 | * If true, use styling for a TabContainer nested inside another TabContainer. | |
|
81 | * For tundra etc., makes tabs look like links, and hides the outer | |
|
82 | * border since the outer TabContainer already has a border. | |
|
83 | */ | |
|
84 | nested: boolean; | |
|
85 | } | |
|
86 | ||
|
87 | /* dijit/layout/LayoutContainer */ | |
|
88 | ||
|
89 | interface LayoutContainer extends _LayoutWidget { | |
|
90 | /** | |
|
91 | * Which design is used for the layout: | |
|
92 | * | |
|
93 | * - "headline" (default) where the top and bottom extend the full width of the container | |
|
94 | * - "sidebar" where the left and right sides extend from top to bottom. | |
|
95 | * | |
|
96 | * However, a `layoutPriority` setting on child panes overrides the `design` attribute on the parent. | |
|
97 | * In other words, if the top and bottom sections have a lower `layoutPriority` than the left and right | |
|
98 | * panes, the top and bottom panes will extend the entire width of the box. | |
|
99 | */ | |
|
100 | design: string; | |
|
101 | // design: 'headline' | 'sidebar'; | |
|
102 | ||
|
103 | addChild<T extends _WidgetBase>(child: T, insertIndex?: number): void; | |
|
104 | removeChild<T extends _WidgetBase>(child: T): void; | |
|
105 | } | |
|
106 | ||
|
107 | interface LayoutContainerConstructor extends _WidgetBaseConstructor<LayoutContainer> { } | |
|
108 | ||
|
109 | /* dijit/layout/AccordionContainer */ | |
|
110 | ||
|
111 | interface _AccordionButton extends _WidgetBase, _TemplatedMixin, _CssStateMixin { | |
|
112 | /** | |
|
113 | * Title of the pane. | |
|
114 | */ | |
|
115 | label: string; | |
|
116 | ||
|
117 | /** | |
|
118 | * Tooltip that appears on hover. | |
|
119 | */ | |
|
120 | title: string; | |
|
121 | ||
|
122 | /** | |
|
123 | * CSS class for icon to left of label. | |
|
124 | */ | |
|
125 | iconClassAttr: string; | |
|
126 | ||
|
127 | /** | |
|
128 | * Returns the height of the title dom node. | |
|
129 | */ | |
|
130 | getTitleHeight(): number; | |
|
131 | } | |
|
132 | ||
|
133 | interface _AccordionButtonConstructor extends _WidgetBaseConstructor<_AccordionButton> { } | |
|
134 | ||
|
135 | interface AccordionContainer extends StackContainer { | |
|
136 | /** | |
|
137 | * Amount of time (in ms) it takes to slide panes. | |
|
138 | */ | |
|
139 | duration: number; | |
|
140 | ||
|
141 | /** | |
|
142 | * The name of the widget used to display the title of each pane. | |
|
143 | */ | |
|
144 | buttonWidget: _AccordionButtonConstructor; | |
|
145 | } | |
|
146 | ||
|
147 | interface AccordionContainerConstructor extends _WidgetBaseConstructor<AccordionContainer> { } | |
|
148 | ||
|
149 | /* dijit/layout/AccordionPane */ | |
|
150 | ||
|
151 | interface AccordionPane extends ContentPane { | |
|
152 | /** | |
|
153 | * Called when this pane is selected. | |
|
154 | */ | |
|
155 | onSelected(): void; | |
|
156 | } | |
|
157 | ||
|
158 | interface AccordionPaneConstructor extends _WidgetBaseConstructor<AccordionPane> { } | |
|
159 | ||
|
160 | /* dijit/layout/BorderContainer */ | |
|
161 | ||
|
162 | interface BorderContainer extends LayoutContainer { | |
|
163 | /** | |
|
164 | * Give each pane a border and margin. | |
|
165 | * Margin determined by domNode.paddingLeft. | |
|
166 | * When false, only resizable panes have a gutter (i.e. draggable splitter) for resizing. | |
|
167 | */ | |
|
168 | gutters: boolean; | |
|
169 | ||
|
170 | /** | |
|
171 | * Specifies whether splitters resize as you drag (true) or only upon mouseup (false) | |
|
172 | */ | |
|
173 | liveSplitters: boolean; | |
|
174 | ||
|
175 | /** | |
|
176 | * Save splitter positions in a cookie. | |
|
177 | */ | |
|
178 | persist: boolean; | |
|
179 | ||
|
180 | /** | |
|
181 | * Returns the widget responsible for rendering the splitter associated with region.with | |
|
182 | */ | |
|
183 | getSplitter(region: string): any; | |
|
184 | ||
|
185 | destroyRecursive(): void; | |
|
186 | } | |
|
187 | ||
|
188 | interface BorderContainerConstructor extends _WidgetBaseConstructor<BorderContainer> { } | |
|
189 | ||
|
190 | /* dijit/ContentPane */ | |
|
191 | ||
|
192 | interface ContentPane extends _Widget, _Container, _ContentPaneResizeMixin { | |
|
193 | ||
|
194 | /** | |
|
195 | * The href of the content that displays now | |
|
196 | * Set this at construction if you want to load data externally when th | |
|
197 | * pane is shown. (Set preload=true to load it immediately. | |
|
198 | * Changing href after creation doesn't have any effect; Use set('href', ...); | |
|
199 | */ | |
|
200 | href: string; | |
|
201 | ||
|
202 | /** | |
|
203 | * The innerHTML of the ContentPane | |
|
204 | * Note that the initialization parameter / argument to set("content", ... | |
|
205 | * can be a String, DomNode, Nodelist, or _Widget. | |
|
206 | */ | |
|
207 | content: dojo.ContentSetterContent | dijit._Widget; | |
|
208 | ||
|
209 | /** | |
|
210 | * Extract visible content from inside of `<body> .... </body>` | |
|
211 | * I.e., strip `<html>` and `<head>` (and it's contents) from the href | |
|
212 | */ | |
|
213 | extractContent: boolean; | |
|
214 | ||
|
215 | /** | |
|
216 | * Parse content and create the widgets, if any. | |
|
217 | */ | |
|
218 | parseOnLoad: boolean; | |
|
219 | ||
|
220 | /** | |
|
221 | * Flag passed to parser. Root for attribute names to search for. If scopeName is dojo | |
|
222 | * will search for data-dojo-type (or dojoType). For backwards compatibilit | |
|
223 | * reasons defaults to dojo._scopeName (which is "dojo" except whe | |
|
224 | * multi-version support is used, when it will be something like dojo16, dojo20, etc.) | |
|
225 | */ | |
|
226 | parserScope: string; | |
|
227 | ||
|
228 | /** | |
|
229 | * Prevent caching of data from href's by appending a timestamp to the href. | |
|
230 | */ | |
|
231 | preventCache: boolean; | |
|
232 | ||
|
233 | /** | |
|
234 | * Force load of data on initialization even if pane is hidden. | |
|
235 | */ | |
|
236 | preload: boolean; | |
|
237 | ||
|
238 | /** | |
|
239 | * Refresh (re-download) content when pane goes from hidden to shown | |
|
240 | */ | |
|
241 | refreshOnShow: boolean; | |
|
242 | ||
|
243 | /** | |
|
244 | * Message that shows while downloading | |
|
245 | */ | |
|
246 | loadingMessage: string; | |
|
247 | ||
|
248 | /** | |
|
249 | * Message that shows if an error occurs | |
|
250 | */ | |
|
251 | errorMessage: string; | |
|
252 | ||
|
253 | /** | |
|
254 | * True if the ContentPane has data in it, either specifie | |
|
255 | * during initialization (via href or inline content), or se | |
|
256 | * via set('content', ...) / set('href', ... | |
|
257 | * False if it doesn't have any content, or if ContentPane i | |
|
258 | * still in the process of downloading href. | |
|
259 | */ | |
|
260 | isLoaded: boolean; | |
|
261 | ||
|
262 | baseClass: string; | |
|
263 | ||
|
264 | /** | |
|
265 | * Function that should grab the content specified via href. | |
|
266 | */ | |
|
267 | ioMethod<T>(url: string, options?: dojo.request.XhrBaseOptions): dojo.request.Promise<T>; | |
|
268 | ||
|
269 | /** | |
|
270 | * Parameters to pass to xhrGet() request, for example: | |
|
271 | * | <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="href: './bar', ioArgs: {timeout: 500}"> | |
|
272 | */ | |
|
273 | ioArgs: { [arg: string]: string | number }; | |
|
274 | ||
|
275 | /** | |
|
276 | * This is the `dojo.Deferred` returned by set('href', ...) and refresh() | |
|
277 | * Calling onLoadDeferred.then() registers you | |
|
278 | * callback to be called only once, when the prior set('href', ...) call o | |
|
279 | * the initial href parameter to the constructor finishes loading | |
|
280 | * This is different than an onLoad() handler which gets called any time any hre | |
|
281 | * or content is loaded. | |
|
282 | */ | |
|
283 | onLoadDeferred: dojo.Deferred<any>; | |
|
284 | ||
|
285 | /** | |
|
286 | * Flag to parser that I'll parse my contents, so it shouldn't. | |
|
287 | */ | |
|
288 | stopParser: boolean; | |
|
289 | ||
|
290 | /** | |
|
291 | * Flag from the parser that this ContentPane is inside a templat | |
|
292 | * so the contents are pre-parsed. | |
|
293 | */ | |
|
294 | template: boolean; | |
|
295 | ||
|
296 | markupFactory<T>(params: any, node: HTMLElement, ctor: dojo.GenericConstructor<T>): T; | |
|
297 | postMixInProperties(): void; | |
|
298 | buildRendering(): void; | |
|
299 | ||
|
300 | /** | |
|
301 | * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects | |
|
302 | */ | |
|
303 | startup(): void; | |
|
304 | ||
|
305 | /** | |
|
306 | * Deprecated. Use set('href', ...) instead. | |
|
307 | */ | |
|
308 | setHref(href: string | URL): ContentPane; | |
|
309 | ||
|
310 | /** | |
|
311 | * Deprecated. Use set('content', ...) instead. | |
|
312 | */ | |
|
313 | setContent(data: dojo.ContentSetterContent): ContentPane; | |
|
314 | ||
|
315 | /** | |
|
316 | * Cancels an in-flight download of content | |
|
317 | */ | |
|
318 | cancel(): void; | |
|
319 | ||
|
320 | /** | |
|
321 | * [Re]download contents of href and display | |
|
322 | */ | |
|
323 | refresh(): dojo.Deferred<any>; | |
|
324 | ||
|
325 | /** | |
|
326 | * Destroy all the widgets inside the ContentPane and empty containerNode | |
|
327 | */ | |
|
328 | destroyDescendants(preserveDom?: boolean): void; | |
|
329 | ||
|
330 | /** | |
|
331 | * Event hook, is called after everything is loaded and widgetified | |
|
332 | */ | |
|
333 | onLoad(data?: any): void; | |
|
334 | ||
|
335 | /** | |
|
336 | * Event hook, is called before old content is cleared | |
|
337 | */ | |
|
338 | onUnload(): void; | |
|
339 | ||
|
340 | /** | |
|
341 | * Called before download starts. | |
|
342 | */ | |
|
343 | onDownloadStart(): string; | |
|
344 | ||
|
345 | /** | |
|
346 | * Called on DOM faults, require faults etc. in content. | |
|
347 | * In order to display an error message in the pane, return | |
|
348 | * the error message from this method, as an HTML string. | |
|
349 | * By default (if this method is not overriden), it returns | |
|
350 | * nothing, so the error message is just printed to the console. | |
|
351 | */ | |
|
352 | onContentError(error: Error): void; | |
|
353 | ||
|
354 | /** | |
|
355 | * Called when download error occurs. | |
|
356 | * In order to display an error message in the pane, return | |
|
357 | * the error message from this method, as an HTML string. | |
|
358 | * Default behavior (if this method is not overriden) is to display | |
|
359 | * the error message inside the pane. | |
|
360 | */ | |
|
361 | onDownloadError(error: Error): void; | |
|
362 | ||
|
363 | /** | |
|
364 | * Called when download is finished. | |
|
365 | */ | |
|
366 | onDownloadEnd(): void; | |
|
367 | } | |
|
368 | ||
|
369 | interface ContentPaneConstructor extends _WidgetBaseConstructor<ContentPane> { } | |
|
370 | ||
|
371 | /* dijit/layout/_ContentPaneResizeMixin */ | |
|
372 | ||
|
373 | /* tslint:disable:class-name */ | |
|
374 | interface _ContentPaneResizeMixin { | |
|
375 | ||
|
376 | /** | |
|
377 | * - false - don't adjust size of children | |
|
378 | * - true - if there is a single visible child widget, set it's size to however big the ContentPane is | |
|
379 | */ | |
|
380 | doLayout: boolean; | |
|
381 | ||
|
382 | /** | |
|
383 | * Indicates that this widget will call resize() on it's child widgets | |
|
384 | * when they become visible. | |
|
385 | */ | |
|
386 | isLayoutContainer: boolean; | |
|
387 | ||
|
388 | /** | |
|
389 | * See `dijit/layout/_LayoutWidget.startup()` for description. | |
|
390 | * Although ContentPane doesn't extend _LayoutWidget, it does implement | |
|
391 | * the same API. | |
|
392 | */ | |
|
393 | startup(): void; | |
|
394 | ||
|
395 | /** | |
|
396 | * See `dijit/layout/_LayoutWidget.resize()` for description. | |
|
397 | * Although ContentPane doesn't extend _LayoutWidget, it does implement | |
|
398 | * the same API. | |
|
399 | */ | |
|
400 | resize(changeSize?: dojo.DomGeometryBox, resultSize?: dojo.DomGeometryWidthHeight): void; | |
|
401 | } | |
|
402 | ||
|
403 | interface _ContentPaneResizeMixinConstructor extends _WidgetBaseConstructor<_ContentPaneResizeMixin> { } | |
|
404 | ||
|
405 | /* dijit/layout/LinkPane */ | |
|
406 | ||
|
407 | interface LinkPane extends ContentPane, _TemplatedMixin { | |
|
408 | /** | |
|
409 | * A ContentPane with an href where (when declared in markup) the | |
|
410 | * title is specified as innerHTML rather than as a title attribute. | |
|
411 | */ | |
|
412 | } | |
|
413 | ||
|
414 | interface LinkPaneConstructor extends _WidgetBaseConstructor<LinkPane> { } | |
|
415 | ||
|
416 | /* dijit/layout/ScrollingTabController */ | |
|
417 | ||
|
418 | interface ScrollingTabController extends TabController, _WidgetsInTemplateMixin { | |
|
419 | /** | |
|
420 | * True if a menu should be used to select tabs when they are too | |
|
421 | * wide to fit the TabContainer, false otherwise. | |
|
422 | */ | |
|
423 | useMenu: boolean; | |
|
424 | ||
|
425 | /** | |
|
426 | * True if a slider should be used to select tabs when they are too | |
|
427 | * wide to fit the TabContainer, false otherwise. | |
|
428 | */ | |
|
429 | useSlider: boolean; | |
|
430 | ||
|
431 | /** | |
|
432 | * The css class to apply to the tab strip, if it is visible. | |
|
433 | */ | |
|
434 | tabStripClass: string; | |
|
435 | ||
|
436 | /** | |
|
437 | * Creates an Animation object that smoothly scrolls the tab list | |
|
438 | * either to a fixed horizontal pixel value, or to the selected tab. | |
|
439 | */ | |
|
440 | createSmoothScroll(pixels?: number): dojo._base.Animation; | |
|
441 | ||
|
442 | /** | |
|
443 | * Scrolls the menu to the right. | |
|
444 | */ | |
|
445 | doSlideRight(e: MouseEvent): void; | |
|
446 | ||
|
447 | /** | |
|
448 | * Scrolls the menu to the left. | |
|
449 | */ | |
|
450 | doSlideLeft(e: MouseEvent): void; | |
|
451 | ||
|
452 | /** | |
|
453 | * Scrolls the tab list to the left or right by 75% of the widget | |
|
454 | * width. | |
|
455 | */ | |
|
456 | doSlide(direction: number, node: HTMLElement): void; | |
|
457 | } | |
|
458 | ||
|
459 | interface ScrollingTabControllerConstructor extends _WidgetBaseConstructor<ScrollingTabController> { } | |
|
460 | ||
|
461 | /* dijit/layout/StackContainer */ | |
|
462 | ||
|
463 | interface StackContainer extends _LayoutWidget { | |
|
464 | /** | |
|
465 | * If true, change the size of my currently displayed child to match my size. | |
|
466 | */ | |
|
467 | doLayout: boolean; | |
|
468 | ||
|
469 | /** | |
|
470 | * Remembers the selected child across sessions. | |
|
471 | */ | |
|
472 | persist: boolean; | |
|
473 | ||
|
474 | /** | |
|
475 | * References the currently selected child widget, if any. | |
|
476 | * Adjust selected child with selectChild() method. | |
|
477 | */ | |
|
478 | selectedChildWidget: _Widget; | |
|
479 | ||
|
480 | selectChild<T extends _WidgetBase>(page: T | string, animate: boolean): dojo.promise.Promise<any>; | |
|
481 | ||
|
482 | forward(): dojo.promise.Promise<any>; | |
|
483 | ||
|
484 | back(): dojo.promise.Promise<any>; | |
|
485 | ||
|
486 | closeChild<T extends _WidgetBase>(page: T): void; | |
|
487 | ||
|
488 | /** | |
|
489 | * Destroy all the widgets inside the StackContainer and empty containerNode | |
|
490 | */ | |
|
491 | destroyDescendants(preserveDom?: boolean): void; | |
|
492 | } | |
|
493 | ||
|
494 | interface StackContainerConstructor extends _WidgetBaseConstructor<StackContainer> { } | |
|
495 | ||
|
496 | interface StackContainerChildWidget extends _WidgetBase { | |
|
497 | /** | |
|
498 | * Specifies that this widget should be the initially displayed pane. | |
|
499 | * Note: to change the selected child use `dijit/layout/StackContainer.selectChild` | |
|
500 | */ | |
|
501 | selected: boolean; | |
|
502 | ||
|
503 | /** | |
|
504 | * Specifies that the button to select this pane should be disabled. | |
|
505 | * Doesn't affect programmatic selection of the pane, nor does it deselect the pane if it is currently selected. | |
|
506 | */ | |
|
507 | disabled: boolean; | |
|
508 | ||
|
509 | /** | |
|
510 | * True if user can close (destroy) this child, such as (for example) clicking the X on the tab. | |
|
511 | */ | |
|
512 | closable: boolean; | |
|
513 | ||
|
514 | /** | |
|
515 | * CSS class specifying icon to use in label associated with this pane. | |
|
516 | */ | |
|
517 | iconClass: string; | |
|
518 | ||
|
519 | /** | |
|
520 | * When true, display title of this widget as tab label etc., rather than just using | |
|
521 | * icon specified in iconClass. | |
|
522 | */ | |
|
523 | showTitle: boolean; | |
|
524 | } | |
|
525 | ||
|
526 | /* dijit/layout/StackController */ | |
|
527 | ||
|
528 | interface _StackButton extends dijit.form.ToggleButton { | |
|
529 | /** | |
|
530 | * When true, display close button for this tab. | |
|
531 | */ | |
|
532 | closeButton: boolean; | |
|
533 | } | |
|
534 | ||
|
535 | interface _StackButtonConstructor extends _WidgetBaseConstructor<_StackButton> { } | |
|
536 | ||
|
537 | interface StackControllerBase extends _Widget, _TemplatedMixin, _Container { | |
|
538 | ||
|
539 | /** | |
|
540 | * The id of the page container I point to. | |
|
541 | */ | |
|
542 | containerId: string; | |
|
543 | ||
|
544 | /** | |
|
545 | * CSS class of [x] close icon used by event delegation code to tell when | |
|
546 | * the close button was clicked. | |
|
547 | */ | |
|
548 | buttonWidgetCloseClass: string; | |
|
549 | ||
|
550 | /** | |
|
551 | * Returns the button corresponding to the pane with the given id. | |
|
552 | */ | |
|
553 | pane2button<T extends _WidgetBase>(id: string): T; | |
|
554 | ||
|
555 | /** | |
|
556 | * Called after the StackContainer has finished initializing. | |
|
557 | */ | |
|
558 | onStartup(info: Object): void; | |
|
559 | ||
|
560 | /** | |
|
561 | * Called whenever a page is added to the container. Create button | |
|
562 | * corresponding to the page. | |
|
563 | */ | |
|
564 | onAddChild<T extends _WidgetBase>(page: T, insertIndex?: number): void; | |
|
565 | ||
|
566 | /** | |
|
567 | * Called whenever a page is removed from the container. Remove the | |
|
568 | * button corresponding to the page. | |
|
569 | */ | |
|
570 | onRemoveChild<T extends _WidgetBase>(page: T): void; | |
|
571 | ||
|
572 | /** | |
|
573 | * Called when a page has been selected in the StackContainer, either | |
|
574 | * by me or by another StackController. | |
|
575 | */ | |
|
576 | onSelectChild<T extends _WidgetBase>(page: T): void; | |
|
577 | ||
|
578 | /** | |
|
579 | * Called whenever one of my child buttons is pressed in an attempt to | |
|
580 | * select a page. | |
|
581 | */ | |
|
582 | onButtonClick<T extends _WidgetBase>(page: T): void; | |
|
583 | ||
|
584 | /** | |
|
585 | * Called whenever one of my child buttons [X] is pressed in an attempt | |
|
586 | * to close a page. | |
|
587 | */ | |
|
588 | onCloseButtonClick<T extends _WidgetBase>(page: T): void; | |
|
589 | ||
|
590 | /** | |
|
591 | * Helper for onkeydown to find next/previous button. | |
|
592 | */ | |
|
593 | adjacent(forward: boolean): _WidgetBase; | |
|
594 | ||
|
595 | /** | |
|
596 | * Handle keystrokes on the page list, for advancing to next/previous | |
|
597 | * button and closing the page in the page is closable. | |
|
598 | */ | |
|
599 | onkeydown(e: Event, fromContainer?: boolean): void; | |
|
600 | ||
|
601 | /** | |
|
602 | * Called when there was a keydown on the container. | |
|
603 | */ | |
|
604 | onContainerKeyDown(info: Object): void; | |
|
605 | } | |
|
606 | ||
|
607 | interface StackController extends StackControllerBase { | |
|
608 | /** | |
|
609 | * The button widget to create to correspond to each page. | |
|
610 | */ | |
|
611 | buttonWidget: _StackButtonConstructor; | |
|
612 | } | |
|
613 | ||
|
614 | interface StackControllerConstructor extends _WidgetBaseConstructor<StackController> { } | |
|
615 | ||
|
616 | /* dijit/layout/TabContainer */ | |
|
617 | ||
|
618 | interface TabContainer extends _TabContainerBase { | |
|
619 | ||
|
620 | /** | |
|
621 | * True if a menu should be used to select tabs when they are too | |
|
622 | * wide to fit the TabContainer, false otherwise. | |
|
623 | */ | |
|
624 | useMenu: boolean; | |
|
625 | ||
|
626 | /** | |
|
627 | * True if a slider should be used to select tabs when they are too | |
|
628 | * wide to fit the TabContainer, false otherwise. | |
|
629 | */ | |
|
630 | useSlider: boolean; | |
|
631 | ||
|
632 | /** | |
|
633 | * An optional parameter to override the widget used to display the tab labels. | |
|
634 | */ | |
|
635 | controllerWidget: string; | |
|
636 | } | |
|
637 | ||
|
638 | interface TabContainerConstructor extends _WidgetBaseConstructor<TabContainer> { } | |
|
639 | ||
|
640 | /* dijit/layout/TabController */ | |
|
641 | ||
|
642 | interface _TabButton extends _StackButton { } | |
|
643 | ||
|
644 | interface _TabButtonConstructor extends _WidgetBaseConstructor<_TabButton> { } | |
|
645 | ||
|
646 | interface TabController extends StackControllerBase { | |
|
647 | /** | |
|
648 | * Defines where tabs go relative to the content. | |
|
649 | * "top", "bottom", "left-h", "right-h" | |
|
650 | */ | |
|
651 | tabPosition: string; | |
|
652 | // tabPosition: 'top' | 'bottom' | 'left-h' | 'right-h'; | |
|
653 | ||
|
654 | /** | |
|
655 | * The tab widget to create to correspond to each page. | |
|
656 | */ | |
|
657 | buttonWidget: _TabButtonConstructor; | |
|
658 | ||
|
659 | /** | |
|
660 | * Class of [x] close icon, used by event delegation code to tell | |
|
661 | * when close button was clicked. | |
|
662 | */ | |
|
663 | buttonWidgetCloseClass: string; | |
|
664 | } | |
|
665 | ||
|
666 | interface TabControllerConstructor extends _WidgetBaseConstructor<TabController> { | |
|
667 | TabButton: _TabButton; | |
|
668 | } | |
|
669 | } | |
|
670 | } |
@@ -0,0 +1,481 | |||
|
1 | /// <reference path="index.d.ts" /> | |
|
2 | ||
|
3 | declare module 'dijit/_Widget' { | |
|
4 | type _Widget = dijit._Widget; | |
|
5 | const _Widget: dijit._WidgetBaseConstructor<_Widget>; | |
|
6 | export = _Widget; | |
|
7 | } | |
|
8 | ||
|
9 | declare module 'dijit/_WidgetBase' { | |
|
10 | type _WidgetBase = dijit._WidgetBase; | |
|
11 | const _WidgetBase: dijit._WidgetBaseConstructor<_WidgetBase>; | |
|
12 | export = _WidgetBase; | |
|
13 | } | |
|
14 | ||
|
15 | declare module 'dijit/_AttachMixin' { | |
|
16 | type _AttachMixin = dijit._AttachMixin; | |
|
17 | const _AttachMixin: dijit._AttachMixinConstructor; | |
|
18 | export = _AttachMixin; | |
|
19 | } | |
|
20 | ||
|
21 | declare module 'dijit/_CssStateMixin' { | |
|
22 | type _CssStateMixin = dijit._CssStateMixin; | |
|
23 | const _CssStateMixin: dijit._CssStateMixinConstructor; | |
|
24 | export = _CssStateMixin; | |
|
25 | } | |
|
26 | ||
|
27 | declare module 'dijit/_Contained' { | |
|
28 | type _Contained = dijit._Contained; | |
|
29 | const _Contained: dijit._ContainedConstructor; | |
|
30 | export = _Contained; | |
|
31 | } | |
|
32 | ||
|
33 | declare module 'dijit/_Container' { | |
|
34 | type _Container = dijit._Container; | |
|
35 | const _Container: dijit._ContainerConstructor; | |
|
36 | export = _Container; | |
|
37 | } | |
|
38 | ||
|
39 | declare module 'dijit/_KeyNavContainer' { | |
|
40 | type _KeyNavContainer = dijit._KeyNavContainer; | |
|
41 | const _KeyNavContainer: dijit._KeyNavContainerConstructor; | |
|
42 | export = _KeyNavContainer; | |
|
43 | } | |
|
44 | ||
|
45 | declare module 'dijit/_KeyNavMixin' { | |
|
46 | type _KeyNavMixin = dijit._KeyNavMixin; | |
|
47 | const _KeyNavMixin: dijit._KeyNavMixinConstructor; | |
|
48 | export = _KeyNavMixin; | |
|
49 | } | |
|
50 | ||
|
51 | declare module 'dijit/_MenuBase' { | |
|
52 | type _MenuBase = dijit._MenuBase; | |
|
53 | const _MenuBase: dijit._MenuBaseConstructor; | |
|
54 | export = _MenuBase; | |
|
55 | } | |
|
56 | ||
|
57 | declare module 'dijit/_TemplatedMixin' { | |
|
58 | type _TemplatedMixin = dijit._TemplatedMixin; | |
|
59 | const _TemplatedMixin: dijit._TemplatedMixinConstructor; | |
|
60 | export = _TemplatedMixin; | |
|
61 | } | |
|
62 | ||
|
63 | declare module 'dijit/_WidgetsInTemplateMixin' { | |
|
64 | type _WidgetsInTemplateMixin = dijit._WidgetsInTemplateMixin; | |
|
65 | const _WidgetsInTemplateMixin: dijit._WidgetsInTemplateMixinConstructor; | |
|
66 | export = _WidgetsInTemplateMixin; | |
|
67 | } | |
|
68 | ||
|
69 | declare module 'dijit/ConfirmDialog' { | |
|
70 | type ConfirmDialog = dijit.ConfirmDialog; | |
|
71 | const ConfirmDialog: dijit.ConfirmDialogConstructor; | |
|
72 | export = ConfirmDialog; | |
|
73 | } | |
|
74 | ||
|
75 | declare module 'dijit/Calendar' { | |
|
76 | type Calendar = dijit.Calendar; | |
|
77 | const Calendar: dijit.CalendarConstructor; | |
|
78 | export = Calendar; | |
|
79 | } | |
|
80 | ||
|
81 | declare module 'dijit/CalendarLite' { | |
|
82 | type CalendarLite = dijit.CalendarLite; | |
|
83 | const CalendarLite: dijit.CalendarLiteConstructor; | |
|
84 | export = CalendarLite; | |
|
85 | } | |
|
86 | ||
|
87 | declare module 'dijit/Destroyable' { | |
|
88 | type Destroyable = dijit.Destroyable; | |
|
89 | const Destroyable: dijit.DestroyableConstructor; | |
|
90 | export = Destroyable; | |
|
91 | } | |
|
92 | ||
|
93 | declare module 'dijit/Dialog' { | |
|
94 | type Dialog = dijit.Dialog; | |
|
95 | const Dialog: dijit.DialogConstructor; | |
|
96 | export = Dialog; | |
|
97 | } | |
|
98 | ||
|
99 | declare module 'dijit/DropDownMenu' { | |
|
100 | type DropDownMenu = dijit.DropDownMenu; | |
|
101 | const DropDownMenu: dijit.DropDownMenuConstructor; | |
|
102 | export = DropDownMenu; | |
|
103 | } | |
|
104 | ||
|
105 | declare module 'dijit/Fieldset' { | |
|
106 | type Fieldset = dijit.Fieldset; | |
|
107 | const Fieldset: dijit.FieldsetConstructor; | |
|
108 | export = Fieldset; | |
|
109 | } | |
|
110 | ||
|
111 | declare module 'dijit/Menu' { | |
|
112 | type Menu = dijit.Menu; | |
|
113 | const Menu: dijit.MenuConstructor; | |
|
114 | export = Menu; | |
|
115 | } | |
|
116 | ||
|
117 | declare module 'dijit/MenuBar' { | |
|
118 | type MenuBar = dijit.MenuBar; | |
|
119 | const MenuBar: dijit.MenuBarConstructor; | |
|
120 | export = MenuBar; | |
|
121 | } | |
|
122 | ||
|
123 | declare module 'dijit/MenuBarItem' { | |
|
124 | type MenuBarItem = dijit.MenuBarItem; | |
|
125 | const MenuBarItem: dijit.MenuBarItemConstructor; | |
|
126 | export = MenuBarItem; | |
|
127 | } | |
|
128 | ||
|
129 | declare module 'dijit/MenuItem' { | |
|
130 | type MenuItem = dijit.MenuItem; | |
|
131 | const MenuItem: dijit.MenuItemConstructor; | |
|
132 | export = MenuItem; | |
|
133 | } | |
|
134 | ||
|
135 | declare module 'dijit/MenuSeparator' { | |
|
136 | type MenuSeparator = dijit.MenuSeparator; | |
|
137 | const MenuSeparator: dijit.MenuSeparatorConstructor; | |
|
138 | export = MenuSeparator; | |
|
139 | } | |
|
140 | ||
|
141 | declare module 'dijit/place' { | |
|
142 | const place: dijit.Place; | |
|
143 | export = place; | |
|
144 | } | |
|
145 | ||
|
146 | declare module 'dijit/popup' { | |
|
147 | const popup: dijit.PopupManager; | |
|
148 | export = popup; | |
|
149 | } | |
|
150 | ||
|
151 | declare module 'dijit/PopupMenuBarItem' { | |
|
152 | type PopupMenuBarItem = dijit.PopupMenuBarItem; | |
|
153 | const PopupMenuBarItem: dijit.PopupMenuBarItemConstructor; | |
|
154 | export = PopupMenuBarItem; | |
|
155 | } | |
|
156 | ||
|
157 | declare module 'dijit/PopupMenuItem' { | |
|
158 | type PopupMenuItem = dijit.PopupMenuItem; | |
|
159 | const PopupMenuItem: dijit.PopupMenuItemConstructor; | |
|
160 | export = PopupMenuItem; | |
|
161 | } | |
|
162 | ||
|
163 | declare module 'dijit/registry' { | |
|
164 | const registry: dijit.Registry; | |
|
165 | export = registry; | |
|
166 | } | |
|
167 | ||
|
168 | declare module 'dijit/TitlePane' { | |
|
169 | type TitlePane = dijit.TitlePane; | |
|
170 | const TitlePane: dijit.TitlePaneConstructor; | |
|
171 | export = TitlePane; | |
|
172 | } | |
|
173 | ||
|
174 | declare module 'dijit/Toolbar' { | |
|
175 | type Toolbar = dijit.Toolbar; | |
|
176 | const Toolbar: dijit.ToolbarConstructor; | |
|
177 | export = Toolbar; | |
|
178 | } | |
|
179 | ||
|
180 | declare module 'dijit/ToolbarSeparator' { | |
|
181 | type ToolbarSeparator = dijit.ToolbarSeparator; | |
|
182 | const ToolbarSeparator: dijit.ToolbarSeparatorConstructor; | |
|
183 | export = ToolbarSeparator; | |
|
184 | } | |
|
185 | ||
|
186 | declare module 'dijit/Tooltip' { | |
|
187 | type Tooltip = dijit.Tooltip; | |
|
188 | const Tooltip: dijit.TooltipConstructor; | |
|
189 | export = Tooltip; | |
|
190 | } | |
|
191 | ||
|
192 | declare module 'dijit/TooltipDialog' { | |
|
193 | type TooltipDialog = dijit.TooltipDialog; | |
|
194 | const TooltipDialog: dijit.TooltipDialogConstructor; | |
|
195 | export = TooltipDialog; | |
|
196 | } | |
|
197 | ||
|
198 | declare module 'dijit/_base/focus' { | |
|
199 | const focus: dijit._base.Focus; | |
|
200 | export = focus; | |
|
201 | } | |
|
202 | ||
|
203 | declare module 'dijit/_base/manager' { | |
|
204 | const manager: dijit._base.Manager; | |
|
205 | export = manager; | |
|
206 | } | |
|
207 | ||
|
208 | declare module 'dijit/_base/place' { | |
|
209 | const place: dijit._base.Place; | |
|
210 | export = place; | |
|
211 | } | |
|
212 | ||
|
213 | declare module 'dijit/_base/popup' { | |
|
214 | const popup: dijit._base.Popup; | |
|
215 | export = popup; | |
|
216 | } | |
|
217 | ||
|
218 | declare module 'dijit/_base/scroll' { | |
|
219 | const scroll: dijit._base.Scroll; | |
|
220 | export = scroll; | |
|
221 | } | |
|
222 | ||
|
223 | declare module 'dijit/_base/sniff' { | |
|
224 | const sniff: dijit._base.Sniff; | |
|
225 | export = sniff; | |
|
226 | } | |
|
227 | ||
|
228 | declare module 'dijit/_base/typematic' { | |
|
229 | const typematic: dijit._base.Typematic; | |
|
230 | export = typematic; | |
|
231 | } | |
|
232 | ||
|
233 | declare module 'dijit/_base/wai' { | |
|
234 | const wai: dijit._base.Wai; | |
|
235 | export = wai; | |
|
236 | } | |
|
237 | ||
|
238 | declare module 'dijit/_base/window' { | |
|
239 | const window: dijit._base.Window; | |
|
240 | export = window; | |
|
241 | } | |
|
242 | ||
|
243 | declare module 'dijit/form/_FormMixin' { | |
|
244 | type _FormMixin = dijit.form._FormMixin; | |
|
245 | const _FormMixin: dijit.form._FormMixinConstructor; | |
|
246 | export = _FormMixin; | |
|
247 | } | |
|
248 | ||
|
249 | declare module 'dijit/form/_FormValueWidget' { | |
|
250 | type _FormValueWidget = dijit.form._FormValueWidget; | |
|
251 | const _FormValueWidget: dijit.form._FormValueWidgetConstructor; | |
|
252 | export = _FormValueWidget; | |
|
253 | } | |
|
254 | ||
|
255 | declare module 'dijit/form/_FormWidget' { | |
|
256 | type _FormWidget = dijit.form._FormWidget; | |
|
257 | const _FormWidget: dijit.form._FormWidgetConstructor; | |
|
258 | export = _FormWidget; | |
|
259 | } | |
|
260 | ||
|
261 | declare module 'dijit/form/Button' { | |
|
262 | type Button = dijit.form.Button; | |
|
263 | const Button: dijit.form.ButtonConstructor; | |
|
264 | export = Button; | |
|
265 | } | |
|
266 | ||
|
267 | declare module 'dijit/form/CheckBox' { | |
|
268 | type CheckBox = dijit.form.CheckBox; | |
|
269 | const CheckBox: dijit.form.CheckBoxConstructor; | |
|
270 | export = CheckBox; | |
|
271 | } | |
|
272 | ||
|
273 | declare module 'dijit/form/ComboBox' { | |
|
274 | type ComboBox = dijit.form.TextBox; | |
|
275 | const ComboBox: dijit.form.ComboBoxConstructor; | |
|
276 | export = ComboBox; | |
|
277 | } | |
|
278 | ||
|
279 | declare module 'dijit/form/ComboBoxMixin' { | |
|
280 | type ComboBoxMixin<T, U extends dojo.store.api.BaseQueryType, V> = dijit.form.ComboBoxMixin<T, U, V>; | |
|
281 | const ComboBoxMixin: dijit.form.ComboBoxConstructor; | |
|
282 | export = ComboBoxMixin; | |
|
283 | } | |
|
284 | ||
|
285 | declare module 'dijit/form/CurrencyTextBox' { | |
|
286 | type CurrencyTextBox = dijit.form.CurrencyTextBox; | |
|
287 | const CurrencyTextBox: dijit.form.CurrencyTextBoxConstructor; | |
|
288 | export = CurrencyTextBox; | |
|
289 | } | |
|
290 | ||
|
291 | declare module 'dijit/form/DataList' { | |
|
292 | type DataList<T> = dijit.form.DataList<T>; | |
|
293 | const DataList: dijit.form.DataListConstructor; | |
|
294 | export = DataList; | |
|
295 | } | |
|
296 | ||
|
297 | declare module 'dijit/form/DateTextBox' { | |
|
298 | type DateTextBox = dijit.form.DateTextBox; | |
|
299 | const DateTextBox: dijit.form.DateTextBoxConstructor; | |
|
300 | export = DateTextBox; | |
|
301 | } | |
|
302 | ||
|
303 | declare module 'dijit/form/DropDownButton' { | |
|
304 | type DropDownButton<T extends dijit._WidgetBase> = dijit.form.DropDownButton<T>; | |
|
305 | const DropDownButton: dijit.form.DropDownButtonConstructor; | |
|
306 | export = DropDownButton; | |
|
307 | } | |
|
308 | ||
|
309 | declare module 'dijit/form/FilteringSelect' { | |
|
310 | type FilteringSelect<C extends dijit.form.Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions> = dijit.form.FilteringSelect<C, T, Q, O>; | |
|
311 | const FilteringSelect: dijit.form.FilteringSelectConstructor; | |
|
312 | export = FilteringSelect; | |
|
313 | } | |
|
314 | ||
|
315 | declare module 'dijit/form/Form' { | |
|
316 | type Form = dijit.form.Form; | |
|
317 | const Form: dijit.form.FormConstructor; | |
|
318 | export = Form; | |
|
319 | } | |
|
320 | ||
|
321 | declare module 'dijit/form/HorizontalRule' { | |
|
322 | type HorizontalRule = dijit.form.HorizontalRule; | |
|
323 | const HorizontalRule: dijit.form.HorizontalRuleConstructor; | |
|
324 | export = HorizontalRule; | |
|
325 | } | |
|
326 | ||
|
327 | declare module 'dijit/form/HorizontalRuleLabels' { | |
|
328 | type HorizontalRuleLabels = dijit.form.HorizontalRuleLabels; | |
|
329 | const HorizontalRuleLabels: dijit.form.HorizontalRuleLabelsConstructor; | |
|
330 | export = HorizontalRuleLabels; | |
|
331 | } | |
|
332 | ||
|
333 | declare module 'dijit/form/HorizontalSlider' { | |
|
334 | type HorizontalSlider = dijit.form.HorizontalSlider; | |
|
335 | const HorizontalSlider: dijit.form.HorizontalSliderConstructor; | |
|
336 | export = HorizontalSlider; | |
|
337 | } | |
|
338 | ||
|
339 | declare module 'dijit/form/MappedTextBox' { | |
|
340 | type MappedTextBox<C extends dijit.form.Constraints> = dijit.form.MappedTextBox<C>; | |
|
341 | const MappedTextBox: dijit.form.MappedTextBoxConstructor; | |
|
342 | export = MappedTextBox; | |
|
343 | } | |
|
344 | ||
|
345 | declare module 'dijit/form/NumberSpinner' { | |
|
346 | type NumberSpinner = dijit.form.NumberSpinner; | |
|
347 | const NumberSpinner: dijit.form.NumberSpinnerConstructor; | |
|
348 | export = NumberSpinner; | |
|
349 | } | |
|
350 | ||
|
351 | declare module 'dijit/form/NumberTextBox' { | |
|
352 | type NumberTextBox = dijit.form.NumberTextBox; | |
|
353 | const NumberTextBox: dijit.form.NumberTextBoxConstructor; | |
|
354 | export = NumberTextBox; | |
|
355 | } | |
|
356 | ||
|
357 | declare module 'dijit/form/RadioButton' { | |
|
358 | type RadioButton = dijit.form.RadioButton; | |
|
359 | const RadioButton: dijit.form.RadioButtonConstructor; | |
|
360 | export = RadioButton; | |
|
361 | } | |
|
362 | ||
|
363 | declare module 'dijit/form/RangeBoundTextBox' { | |
|
364 | type RangeBoundTextBox = dijit.form.RangeBoundTextBox; | |
|
365 | const RangeBoundTextBox: dijit.form.RangeBoundTextBoxConstructor; | |
|
366 | export = RangeBoundTextBox; | |
|
367 | } | |
|
368 | ||
|
369 | declare module 'dijit/form/Select' { | |
|
370 | type Select<T, Q extends dojo.store.api.BaseQueryType, O, U extends dijit._WidgetBase> = dijit.form.Select<T, Q, O, U>; | |
|
371 | const Select: dijit.form.SelectConstructor; | |
|
372 | export = Select; | |
|
373 | } | |
|
374 | ||
|
375 | declare module 'dijit/form/SimpleTextarea' { | |
|
376 | type SimpleTextarea = dijit.form.SimpleTextarea; | |
|
377 | const SimpleTextarea: dijit.form.SimpleTextareaConstructor; | |
|
378 | export = SimpleTextarea; | |
|
379 | } | |
|
380 | ||
|
381 | declare module 'dijit/form/Textarea' { | |
|
382 | type Textarea = dijit.form.Textarea; | |
|
383 | const Textarea: dijit.form.TextareaConstructor; | |
|
384 | export = Textarea; | |
|
385 | } | |
|
386 | ||
|
387 | declare module 'dijit/form/TextBox' { | |
|
388 | type TextBox = dijit.form.TextBox; | |
|
389 | const TextBox: dijit.form.TextBoxConstructor; | |
|
390 | export = TextBox; | |
|
391 | } | |
|
392 | ||
|
393 | declare module 'dijit/form/ToggleButton' { | |
|
394 | type ToggleButton = dijit.form.ToggleButton; | |
|
395 | const ToggleButton: dijit.form.ToggleButtonConstructor; | |
|
396 | export = ToggleButton; | |
|
397 | } | |
|
398 | ||
|
399 | declare module 'dijit/form/ValidationTextBox' { | |
|
400 | type ValidationTextBox<C extends dijit.form.Constraints> = dijit.form.ValidationTextBox<C>; | |
|
401 | const ValidationTextBox: dijit.form.ValidationTextBoxConstructor; | |
|
402 | export = ValidationTextBox; | |
|
403 | } | |
|
404 | ||
|
405 | declare module 'dijit/layout/_LayoutWidget' { | |
|
406 | type _LayoutWidget = dijit.layout._LayoutWidget; | |
|
407 | const _LayoutWidget: dijit.layout._LayoutWidgetConstructor; | |
|
408 | export = _LayoutWidget; | |
|
409 | } | |
|
410 | ||
|
411 | declare module 'dijit/layout/AccordionContainer' { | |
|
412 | type AccordionContainer = dijit.layout.AccordionContainer; | |
|
413 | const AccordionContainer: dijit.layout.AccordionContainerConstructor; | |
|
414 | export = AccordionContainer; | |
|
415 | } | |
|
416 | ||
|
417 | declare module 'dijit/layout/AccordionPane' { | |
|
418 | type AccordionPane = dijit.layout.AccordionPane; | |
|
419 | const AccordionPane: dijit.layout.AccordionPaneConstructor; | |
|
420 | export = AccordionPane; | |
|
421 | } | |
|
422 | ||
|
423 | declare module 'dijit/layout/ContentPane' { | |
|
424 | type ContentPane = dijit.layout.ContentPane; | |
|
425 | const ContentPane: dijit.layout.ContentPaneConstructor; | |
|
426 | export = ContentPane; | |
|
427 | } | |
|
428 | ||
|
429 | declare module 'dijit/layout/_ContentPaneResizeMixin' { | |
|
430 | type _ContentPaneResizeMixin = dijit.layout._ContentPaneResizeMixin; | |
|
431 | const _ContentPaneResizeMixin: dijit.layout._ContentPaneResizeMixinConstructor; | |
|
432 | export = _ContentPaneResizeMixin; | |
|
433 | } | |
|
434 | ||
|
435 | declare module 'dijit/layout/BorderContainer' { | |
|
436 | type BorderContainer = dijit.layout.BorderContainer; | |
|
437 | const BorderContainer: dijit.layout.BorderContainerConstructor; | |
|
438 | export = BorderContainer; | |
|
439 | } | |
|
440 | ||
|
441 | declare module 'dijit/layout/LayoutContainer' { | |
|
442 | type LayoutContainer = dijit.layout.LayoutContainer; | |
|
443 | const LayoutContainer: dijit.layout.LayoutContainerConstructor; | |
|
444 | export = LayoutContainer; | |
|
445 | } | |
|
446 | ||
|
447 | declare module 'dijit/layout/LinkPane' { | |
|
448 | type LinkPane = dijit.layout.LinkPane; | |
|
449 | const LinkPane: dijit.layout.LinkPaneConstructor; | |
|
450 | export = LinkPane; | |
|
451 | } | |
|
452 | ||
|
453 | declare module 'dijit/layout/ScrollingTabController' { | |
|
454 | type ScrollingTabController = dijit.layout.ScrollingTabController; | |
|
455 | const ScrollingTabController: dijit.layout.ScrollingTabControllerConstructor; | |
|
456 | export = ScrollingTabController; | |
|
457 | } | |
|
458 | ||
|
459 | declare module 'dijit/layout/StackContainer' { | |
|
460 | type StackContainer = dijit.layout.StackContainer; | |
|
461 | const StackContainer: dijit.layout.StackContainerConstructor; | |
|
462 | export = StackContainer; | |
|
463 | } | |
|
464 | ||
|
465 | declare module 'dijit/layout/StackController' { | |
|
466 | type StackController = dijit.layout.StackController; | |
|
467 | const StackController: dijit.layout.StackControllerConstructor; | |
|
468 | export = StackController; | |
|
469 | } | |
|
470 | ||
|
471 | declare module 'dijit/layout/TabContainer' { | |
|
472 | type TabContainer = dijit.layout.TabContainer; | |
|
473 | const TabContainer: dijit.layout.TabContainerConstructor; | |
|
474 | export = TabContainer; | |
|
475 | } | |
|
476 | ||
|
477 | declare module 'dijit/layout/TabController' { | |
|
478 | type TabController = dijit.layout.TabController; | |
|
479 | const TabController: dijit.layout.TabControllerConstructor; | |
|
480 | export = TabController; | |
|
481 | } |
@@ -0,0 +1,41 | |||
|
1 | declare namespace doh { | |
|
2 | /* TODO: This is a very rough job of typing, there maybe little value in typing D.O.H */ | |
|
3 | interface Robot { | |
|
4 | _robotLoaded: boolean; | |
|
5 | _robotInitialized: boolean; | |
|
6 | _spaceReceived: boolean; | |
|
7 | _primePump: boolean; | |
|
8 | _killApplet: boolean; | |
|
9 | killRobot(): void; | |
|
10 | _runsemaphore: { | |
|
11 | lock: string[]; | |
|
12 | unlock(): string; | |
|
13 | }; | |
|
14 | startRobot(): boolean; | |
|
15 | _loaded: any; | |
|
16 | _initRobot(r: this): void; | |
|
17 | _started: any; | |
|
18 | _run(frame: HTMLFrameElement): void; | |
|
19 | _initKeyboard(): void; | |
|
20 | _onKeyboard(): void; | |
|
21 | _initWheel(): void; | |
|
22 | _setDocumentBounds(docScreenX: number, docScreenY: number): void; | |
|
23 | _notified(keystring: string): void; | |
|
24 | _appletDead: boolean; | |
|
25 | _assertRobot(): void; | |
|
26 | _mouseMove(x: number, y: number, absolute: boolean, duration?: number): void; | |
|
27 | sequence(f: Function, delay?: number, duration?: number): void; | |
|
28 | typeKeys(chars: string | number, delay?: number, duration?: number): void; | |
|
29 | keyPress(charOrCode: number, delay?: number, modifiers?: Object, asynchronous?: boolean): void; | |
|
30 | keyDown(charOrCode: number, delay?: number): void; | |
|
31 | keyUp(charOrCode: number, delay?: number): void; | |
|
32 | mouseClick(buttons: Object, delay?: number): void; | |
|
33 | mousePress(buttons: Object, delay?: number): void; | |
|
34 | mouseMoveTo(point: Object, delay?: number, duration?: number, absolute?: boolean): void; | |
|
35 | mouseMove(x: number, y: number, delay?: number, duration?: number, absolute?: boolean): void; | |
|
36 | mouseRelease(buttons: Object, delay?: number): void; | |
|
37 | mouseWheelSize: number; | |
|
38 | mouseWheel(wheelAmt: number, delay?: number, duration?: number): void; | |
|
39 | setClipboard(data: string, format?: string): void; | |
|
40 | } | |
|
41 | } |
@@ -0,0 +1,1 | |||
|
1 | /// <reference path="doh.d.ts" /> |
@@ -0,0 +1,6 | |||
|
1 | /// <reference path="index.d.ts" /> | |
|
2 | ||
|
3 | declare module 'doh/robot' { | |
|
4 | const robot: doh.Robot; | |
|
5 | export = robot; | |
|
6 | } |
@@ -0,0 +1,32 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | ||
|
3 | declare namespace dojo { | |
|
4 | interface NodeList<T extends Node> { | |
|
5 | ||
|
6 | /** | |
|
7 | * An alias to the private dataCache for NodeList-data. NEVER USE THIS! | |
|
8 | * This private is only exposed for the benefit of unit testing, and is | |
|
9 | * removed during the build process. | |
|
10 | */ | |
|
11 | _nodeDataCache: { [id: string]: { [key: string]: any } }; | |
|
12 | ||
|
13 | /** | |
|
14 | * super expensive: GC all data in the data for nodes that no longer exist in the dom. | |
|
15 | */ | |
|
16 | _gcNodeData(): void; | |
|
17 | ||
|
18 | /** | |
|
19 | * stash or get some arbitrary data on/from these nodes. | |
|
20 | */ | |
|
21 | data(): any[]; | |
|
22 | data(key: string): any[]; | |
|
23 | data(key: Object): this; | |
|
24 | data(key: string, value: any): this; | |
|
25 | } | |
|
26 | } | |
|
27 | ||
|
28 | declare module 'dojo/NodeList-data' { | |
|
29 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
30 | const NodeList: dojo.NodeListConstructor; | |
|
31 | export = NodeList; | |
|
32 | } |
@@ -0,0 +1,147 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | ||
|
3 | declare namespace dojo { | |
|
4 | interface NormalizeObject { | |
|
5 | [prop: string]: any; | |
|
6 | parse?: boolean; | |
|
7 | template?: string; | |
|
8 | templateFunc?: Function; | |
|
9 | } | |
|
10 | ||
|
11 | interface NodeList<T extends Node> { | |
|
12 | /** | |
|
13 | * normalizes data to an array of items to insert. | |
|
14 | */ | |
|
15 | _normalize(content: string | number | Node | ArrayLike<Node> | NormalizeObject, refNode?: Node): any[]; | |
|
16 | ||
|
17 | /** | |
|
18 | * private utility to clone a node. Not very interesting in the vanilla | |
|
19 | * dojo/NodeList case, but delegates could do interesting things like | |
|
20 | * clone event handlers if that is derivable from the node. | |
|
21 | */ | |
|
22 | _cloneNode<T extends Node>(node: T): T; | |
|
23 | ||
|
24 | /** | |
|
25 | * private utility to handle placing an array of nodes relative to another node. | |
|
26 | */ | |
|
27 | _place(ary: ArrayLike<Node>, refNode: Node, position: string, useClone?: boolean): void; | |
|
28 | ||
|
29 | /** | |
|
30 | * Returns border-box objects (x/y/w/h) of all elements in a node list | |
|
31 | * as an Array (*not* a NodeList). Acts like `dojo/dom-geometry-position`, though | |
|
32 | * assumes the node passed is each node in this list. | |
|
33 | */ | |
|
34 | position(): DomGeometryXYBox[]; | |
|
35 | ||
|
36 | /** | |
|
37 | * gets or sets the DOM attribute for every element in the | |
|
38 | * NodeList. See also `dojo/dom-attr` | |
|
39 | */ | |
|
40 | attr(property: string): any[]; | |
|
41 | attr(property: Object): this; | |
|
42 | attr(property: string, value: any): this; | |
|
43 | ||
|
44 | /** | |
|
45 | * gets or sets the CSS property for every element in the NodeList | |
|
46 | */ | |
|
47 | style(property: string): (string | number)[]; | |
|
48 | style(property: Object): this; | |
|
49 | style(property: string, value: string): this; | |
|
50 | ||
|
51 | /** | |
|
52 | * adds the specified class to every node in the list | |
|
53 | */ | |
|
54 | addClass(className: string | string[]): this; | |
|
55 | ||
|
56 | /** | |
|
57 | * removes the specified class from every node in the list | |
|
58 | */ | |
|
59 | removeClass(className: string | string[]): this; | |
|
60 | ||
|
61 | /** | |
|
62 | * Adds a class to node if not present, or removes if present. | |
|
63 | * Pass a boolean condition if you want to explicitly add or remove. | |
|
64 | */ | |
|
65 | toggleClass(className: string | string[], condition?: boolean): this; | |
|
66 | ||
|
67 | /** | |
|
68 | * Replaces one or more classes on a node if not present. | |
|
69 | * Operates more quickly than calling `removeClass()` and `addClass()` | |
|
70 | */ | |
|
71 | replaceClass(addClassStr: string | string[], removeClassStr?: string | string[]): this; | |
|
72 | ||
|
73 | /** | |
|
74 | * clears all content from each node in the list. Effectively | |
|
75 | * equivalent to removing all child nodes from every item in | |
|
76 | * the list. | |
|
77 | */ | |
|
78 | empty(): this; | |
|
79 | ||
|
80 | /** | |
|
81 | * Removes an attribute from each node in the list. | |
|
82 | */ | |
|
83 | removeAttr(name: string): this; | |
|
84 | ||
|
85 | /** | |
|
86 | * Returns margin-box size of nodes | |
|
87 | */ | |
|
88 | marginBox(): DomGeometryBox[]; | |
|
89 | ||
|
90 | /** | |
|
91 | * destroys every item in the list. | |
|
92 | */ | |
|
93 | destroy(): void; | |
|
94 | ||
|
95 | /** | |
|
96 | * places elements of this node list relative to the first element matched | |
|
97 | * by queryOrNode. Returns the original NodeList. See: `dojo/dom-construct.place` | |
|
98 | */ | |
|
99 | place(queryOrNode: NodeOrString, position?: string /* PosString */ | number): this; | |
|
100 | ||
|
101 | /** | |
|
102 | * removes elements in this list that match the filter | |
|
103 | * from their parents and returns them as a new NodeList. | |
|
104 | */ | |
|
105 | orphan(filter?: string | NodeListFilterCallback<T>): this; | |
|
106 | ||
|
107 | /** | |
|
108 | * places any/all elements in queryOrListOrNode at a | |
|
109 | * position relative to the first element in this list. | |
|
110 | * Returns a dojo/NodeList of the adopted elements. | |
|
111 | */ | |
|
112 | adopt<Q extends Node>(queryOrListOrNode: string | Node | NodeList<Node>, position?: string /* PosString */ | number): NodeList<Q>; | |
|
113 | ||
|
114 | /** | |
|
115 | * Returns a new list whose members match the passed query, | |
|
116 | * assuming elements of the current NodeList as the root for | |
|
117 | * each search. | |
|
118 | */ | |
|
119 | query<Q extends Node>(queryStr: string): NodeList<Q>; | |
|
120 | ||
|
121 | /** | |
|
122 | * "masks" the built-in javascript filter() method (supported | |
|
123 | * in Dojo via `dojo.filter`) to support passing a simple | |
|
124 | * string filter in addition to supporting filtering function | |
|
125 | * objects. | |
|
126 | */ | |
|
127 | filter(filter: string | NodeListFilterCallback<T>): this; | |
|
128 | ||
|
129 | /** | |
|
130 | * creates node clones of each element of this list | |
|
131 | * and returns a new list containing the clones | |
|
132 | */ | |
|
133 | clone(): this; | |
|
134 | ||
|
135 | /** | |
|
136 | * add a node, NodeList or some HTML as a string to every item in the | |
|
137 | * list. Returns the original list. | |
|
138 | */ | |
|
139 | addContent(content: string | number | Node | ArrayLike<Node> | NormalizeObject, position?: string /* PosString */ | number): this; | |
|
140 | } | |
|
141 | } | |
|
142 | ||
|
143 | declare module 'dojo/NodeList-dom' { | |
|
144 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
145 | const NodeList: dojo.NodeListConstructor; | |
|
146 | export = NodeList; | |
|
147 | } |
@@ -0,0 +1,58 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | /// <reference path="_base.d.ts" /> | |
|
3 | /// <reference path="fx.d.ts" /> | |
|
4 | ||
|
5 | declare namespace dojo { | |
|
6 | ||
|
7 | interface NodeListAnimationArgs extends _base.AnimationArguments { | |
|
8 | auto?: boolean; | |
|
9 | } | |
|
10 | ||
|
11 | interface NodeList<T extends Node> { | |
|
12 | _anim(obj: any, method: string, args?: NodeListAnimationArgs): _base.Animation | this; | |
|
13 | ||
|
14 | /** | |
|
15 | * wipe in all elements of this NodeList via `dojo/fx.wipeIn()` | |
|
16 | */ | |
|
17 | wipeIn(args: NodeListAnimationArgs): _base.Animation | this; | |
|
18 | ||
|
19 | /** | |
|
20 | * wipe out all elements of this NodeList via `dojo/fx.wipeOut()` | |
|
21 | */ | |
|
22 | wipeOut(args: NodeListAnimationArgs): _base.Animation | this; | |
|
23 | ||
|
24 | /** | |
|
25 | * slide all elements of the node list to the specified place via `dojo/fx.slideTo()` | |
|
26 | */ | |
|
27 | slideTo(args: NodeListAnimationArgs): _base.Animation | this; | |
|
28 | ||
|
29 | /** | |
|
30 | * fade in all elements of this NodeList via `dojo.fadeIn` | |
|
31 | */ | |
|
32 | fadeIn(args: NodeListAnimationArgs): _base.Animation | this; | |
|
33 | ||
|
34 | /** | |
|
35 | * fade out all elements of this NodeList via `dojo.fadeOut` | |
|
36 | */ | |
|
37 | fadeOut(args: NodeListAnimationArgs): _base.Animation | this; | |
|
38 | ||
|
39 | /** | |
|
40 | * Animate all elements of this NodeList across the properties specified. | |
|
41 | * syntax identical to `dojo.animateProperty` | |
|
42 | */ | |
|
43 | animateProperty(args: NodeListAnimationArgs): _base.Animation | this; | |
|
44 | ||
|
45 | /** | |
|
46 | * Animate one or more CSS properties for all nodes in this list. | |
|
47 | * The returned animation object will already be playing when it | |
|
48 | * is returned. See the docs for `dojo.anim` for full details. | |
|
49 | */ | |
|
50 | anim(properties: _base.AnimationArgumentsProperties, duration?: number, easing?: (n?: number) => number, onEnd?: Function, delay?: number): _base.Animation; | |
|
51 | } | |
|
52 | } | |
|
53 | ||
|
54 | declare module 'dojo/NodeList-fx' { | |
|
55 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
56 | const NodeList: dojo.NodeListConstructor; | |
|
57 | export = NodeList; | |
|
58 | } |
@@ -0,0 +1,16 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | ||
|
3 | declare namespace dojo { | |
|
4 | interface NodeList<T extends Node> { | |
|
5 | /** | |
|
6 | * see `dojo/html.set()`. Set the content of all elements of this NodeList | |
|
7 | */ | |
|
8 | html(cont?: ContentSetterContent, params?: ContentSetterParams): this; | |
|
9 | } | |
|
10 | } | |
|
11 | ||
|
12 | declare module 'dojo/NodeList-html' { | |
|
13 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
14 | const NodeList: dojo.NodeListConstructor; | |
|
15 | export = NodeList; | |
|
16 | } |
@@ -0,0 +1,135 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | /// <reference path="NodeList-dom.d.ts" /> | |
|
3 | ||
|
4 | declare namespace dojo { | |
|
5 | interface NodeList<T extends Node> { | |
|
6 | ||
|
7 | /** | |
|
8 | * private method for inserting queried nodes into all nodes in this NodeList | |
|
9 | * at different positions. Differs from NodeList.place because it will clone | |
|
10 | * the nodes in this NodeList if the query matches more than one element. | |
|
11 | */ | |
|
12 | _placeMultiple(query: string | Node | ArrayLike<Node>, position?: string /* PosString */ | number): this; | |
|
13 | ||
|
14 | /** | |
|
15 | * allows setting the innerHTML of each node in the NodeList, | |
|
16 | * if there is a value passed in, otherwise, reads the innerHTML value of the first node. | |
|
17 | */ | |
|
18 | innerHTML(): string; | |
|
19 | innerHTML(value: ContentSetterContent): this; | |
|
20 | ||
|
21 | /* if dojo/NodeList-html isn't loaded, this module creates an alias to innerHTML as html. | |
|
22 | This is stupid and confusing, but likely for backwards compatability, but going to ommit | |
|
23 | it from the typings, but can be commented out, just to confuse someone */ | |
|
24 | /* | |
|
25 | html(): string; | |
|
26 | html(value: ContentSetterContent): this; | |
|
27 | */ | |
|
28 | ||
|
29 | /** | |
|
30 | * Allows setting the text value of each node in the NodeList, | |
|
31 | * if there is a value passed in. Otherwise, returns the text value for all the | |
|
32 | * nodes in the NodeList in one string. | |
|
33 | */ | |
|
34 | text(): string; | |
|
35 | text(value: string): this; | |
|
36 | ||
|
37 | /** | |
|
38 | * If a value is passed, allows setting the value property of form elements in this | |
|
39 | * NodeList, or properly selecting/checking the right value for radio/checkbox/select | |
|
40 | * elements. If no value is passed, the value of the first node in this NodeList | |
|
41 | * is returned. | |
|
42 | */ | |
|
43 | val(): string | string[]; | |
|
44 | val(value: string | string[]): this; | |
|
45 | ||
|
46 | /** | |
|
47 | * appends the content to every node in the NodeList. | |
|
48 | */ | |
|
49 | append(content: ContentSetterContent): this; | |
|
50 | ||
|
51 | /** | |
|
52 | * appends nodes in this NodeList to the nodes matched by | |
|
53 | * the query passed to appendTo. | |
|
54 | */ | |
|
55 | appendTo(query: string): this; | |
|
56 | ||
|
57 | /** | |
|
58 | * prepends the content to every node in the NodeList. | |
|
59 | */ | |
|
60 | prepend(content: ContentSetterContent): this; | |
|
61 | ||
|
62 | /** | |
|
63 | * prepends nodes in this NodeList to the nodes matched by | |
|
64 | * the query passed to prependTo. | |
|
65 | */ | |
|
66 | prependTo(query: string): this; | |
|
67 | ||
|
68 | /** | |
|
69 | * Places the content after every node in the NodeList. | |
|
70 | */ | |
|
71 | after(content: ContentSetterContent): this; | |
|
72 | ||
|
73 | /** | |
|
74 | * The nodes in this NodeList will be placed after the nodes | |
|
75 | * matched by the query passed to insertAfter. | |
|
76 | */ | |
|
77 | insertAfter(query: string): this; | |
|
78 | ||
|
79 | /** | |
|
80 | * Places the content before every node in the NodeList. | |
|
81 | */ | |
|
82 | before(content: ContentSetterContent): this; | |
|
83 | ||
|
84 | /** | |
|
85 | * The nodes in this NodeList will be placed after the nodes | |
|
86 | * matched by the query passed to insertAfter. | |
|
87 | */ | |
|
88 | insertBefore(query: string): this; | |
|
89 | ||
|
90 | /** | |
|
91 | * alias for dojo/NodeList's orphan method. Removes elements | |
|
92 | * in this list that match the simple filter from their parents | |
|
93 | * and returns them as a new NodeList. | |
|
94 | */ | |
|
95 | remove(filter?: string | NodeListFilterCallback<T>): this; | |
|
96 | ||
|
97 | /** | |
|
98 | * Wrap each node in the NodeList with html passed to wrap. | |
|
99 | */ | |
|
100 | wrap(html: NodeOrString): this; | |
|
101 | ||
|
102 | /** | |
|
103 | * Insert html where the first node in this NodeList lives, then place all | |
|
104 | * nodes in this NodeList as the child of the html. | |
|
105 | */ | |
|
106 | wrapAll(html: NodeOrString): this; | |
|
107 | ||
|
108 | /** | |
|
109 | * For each node in the NodeList, wrap all its children with the passed in html. | |
|
110 | */ | |
|
111 | wrapInner(html: NodeOrString): this; | |
|
112 | ||
|
113 | /** | |
|
114 | * Replaces each node in ths NodeList with the content passed to replaceWith. | |
|
115 | */ | |
|
116 | replaceWith<T extends Node>(content: ContentSetterContent): NodeList<T>; | |
|
117 | ||
|
118 | /** | |
|
119 | * replaces nodes matched by the query passed to replaceAll with the nodes | |
|
120 | * in this NodeList. | |
|
121 | */ | |
|
122 | replaceAll(query: string): this; | |
|
123 | ||
|
124 | /** | |
|
125 | * Clones all the nodes in this NodeList and returns them as a new NodeList. | |
|
126 | */ | |
|
127 | clone(): this; | |
|
128 | } | |
|
129 | } | |
|
130 | ||
|
131 | declare module 'dojo/NodeList-manipulate' { | |
|
132 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
133 | const NodeList: dojo.NodeListConstructor; | |
|
134 | export = NodeList; | |
|
135 | } |
@@ -0,0 +1,118 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | ||
|
3 | declare namespace dojo { | |
|
4 | interface NodeList<T extends Node> { | |
|
5 | /** | |
|
6 | * builds a new array of possibly differing size based on the input list. | |
|
7 | * Since the returned array is likely of different size than the input array, | |
|
8 | * the array's map function cannot be used. | |
|
9 | */ | |
|
10 | _buildArrayFromCallback<U>(callback: (node: T, ary: U[]) => U[]): U[]; | |
|
11 | ||
|
12 | /** | |
|
13 | * given a list of nodes, make sure only unique | |
|
14 | * elements are returned as our NodeList object. | |
|
15 | * Does not call _stash(). | |
|
16 | */ | |
|
17 | _getUniqueAsNodeList(nodes: ArrayLike<T>): this; | |
|
18 | ||
|
19 | /** | |
|
20 | * gets unique element nodes, filters them further | |
|
21 | * with an optional query and then calls _stash to track parent NodeList. | |
|
22 | */ | |
|
23 | _getUniqueNodeListWithParent(nodes: ArrayLike<T>, query?: string): this; | |
|
24 | ||
|
25 | /** | |
|
26 | * cycles over all the nodes and calls a callback | |
|
27 | * to collect nodes for a possible inclusion in a result. | |
|
28 | * The callback will get two args: callback(node, ary), | |
|
29 | * where ary is the array being used to collect the nodes. | |
|
30 | */ | |
|
31 | _getRelatedUniqueNodes<U extends Node>(query: string, callback: (node: T, ary: U[]) => U[]): NodeList<U>; | |
|
32 | ||
|
33 | /** | |
|
34 | * Returns all immediate child elements for nodes in this dojo/NodeList. | |
|
35 | * Optionally takes a query to filter the child elements. | |
|
36 | */ | |
|
37 | children<U extends Node>(query?: string): NodeList<T>; | |
|
38 | ||
|
39 | /** | |
|
40 | * Returns closest parent that matches query, including current node in this | |
|
41 | * dojo/NodeList if it matches the query. | |
|
42 | */ | |
|
43 | closest<U extends Node>(query: string, root?: NodeOrString): NodeList<U>; | |
|
44 | ||
|
45 | /** | |
|
46 | * Returns immediate parent elements for nodes in this dojo/NodeList. | |
|
47 | * Optionally takes a query to filter the parent elements. | |
|
48 | */ | |
|
49 | parent<U extends Node>(query?: string): NodeList<U>; | |
|
50 | ||
|
51 | /** | |
|
52 | * Returns all parent elements for nodes in this dojo/NodeList. | |
|
53 | * Optionally takes a query to filter the child elements. | |
|
54 | */ | |
|
55 | parents<U extends Node>(query?: string): NodeList<U>; | |
|
56 | ||
|
57 | /** | |
|
58 | * Returns all sibling elements for nodes in this dojo/NodeList. | |
|
59 | * Optionally takes a query to filter the sibling elements. | |
|
60 | */ | |
|
61 | siblings<U extends Node>(query?: string): NodeList<U>; | |
|
62 | ||
|
63 | /** | |
|
64 | * Returns the next element for nodes in this dojo/NodeList. | |
|
65 | * Optionally takes a query to filter the next elements. | |
|
66 | */ | |
|
67 | next<U extends Node>(query?: string): NodeList<U>; | |
|
68 | ||
|
69 | /** | |
|
70 | * Returns all sibling elements that come after the nodes in this dojo/NodeList. | |
|
71 | * Optionally takes a query to filter the sibling elements. | |
|
72 | */ | |
|
73 | nextAll<U extends Node>(query?: string): NodeList<U>; | |
|
74 | ||
|
75 | /** | |
|
76 | * Returns the previous element for nodes in this dojo/NodeList. | |
|
77 | * Optionally takes a query to filter the previous elements. | |
|
78 | */ | |
|
79 | prev<U extends Node>(query?: string): NodeList<U>; | |
|
80 | ||
|
81 | /** | |
|
82 | * Returns all sibling elements that come before the nodes in this dojo/NodeList. | |
|
83 | * Optionally takes a query to filter the sibling elements. | |
|
84 | */ | |
|
85 | prevAll<U extends Node>(query?: string): NodeList<U>; | |
|
86 | ||
|
87 | /** | |
|
88 | * Adds the nodes from the previous dojo/NodeList to the current dojo/NodeList. | |
|
89 | */ | |
|
90 | andSelf(): this; | |
|
91 | ||
|
92 | /** | |
|
93 | * Returns the first node in this dojo/NodeList as a dojo/NodeList. | |
|
94 | */ | |
|
95 | first(): this; | |
|
96 | ||
|
97 | /** | |
|
98 | * Returns the last node in this dojo/NodeList as a dojo/NodeList. | |
|
99 | */ | |
|
100 | last(): this; | |
|
101 | ||
|
102 | /** | |
|
103 | * Returns the even nodes in this dojo/NodeList as a dojo/NodeList. | |
|
104 | */ | |
|
105 | even(): this; | |
|
106 | ||
|
107 | /** | |
|
108 | * Returns the odd nodes in this dojo/NodeList as a dojo/NodeList. | |
|
109 | */ | |
|
110 | odd(): this; | |
|
111 | } | |
|
112 | } | |
|
113 | ||
|
114 | declare module 'dojo/NodeList-traverse' { | |
|
115 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
116 | const NodeList: dojo.NodeListConstructor; | |
|
117 | export = NodeList; | |
|
118 | } |
@@ -0,0 +1,42 | |||
|
1 | interface OpenAjaxLibrary { | |
|
2 | prefix: string; | |
|
3 | namespaceURI: string; | |
|
4 | version: string; | |
|
5 | extraData: any; | |
|
6 | } | |
|
7 | ||
|
8 | interface OpenAjaxHub { | |
|
9 | implementer: string; | |
|
10 | implVersion: string; | |
|
11 | specVersion: string; | |
|
12 | implExtraData: { [prop: string]: any }; | |
|
13 | libraries: { [name: string]: OpenAjaxLibrary }; | |
|
14 | registerLibrary(prefix: string, nsURL: string, extra: any): void; | |
|
15 | unregisterLibrary(prefix: string): void; | |
|
16 | ||
|
17 | _subscriptions: { c: Object; s: any[]; }; | |
|
18 | _cleanup: any[]; | |
|
19 | _subIndex: number; | |
|
20 | _pubDepth: number; | |
|
21 | ||
|
22 | subscribe(name: string, callback: (name: string, msg: any, d: any) => void, scope?: Object, subscriberData?: any, filter?: (name: string, msg: any, d: any) => boolean): string; | |
|
23 | publish(name: string, message: any): void; | |
|
24 | unsubscribe(sub: string): void; | |
|
25 | ||
|
26 | _subscribe(tree: { c: Object; s: any[]; }, path: string[], index: number, sub: Object): void; | |
|
27 | _publish(tree: { c: Object; s: any[]; }, path: string[], index: number, name: string, msg: any): void; | |
|
28 | _unsubscribe(tree: { c: Object; s: any[]; }, path: string[], index: number, sid: number): void; | |
|
29 | ||
|
30 | /** | |
|
31 | * The following function is provided for automatic testing purposes. | |
|
32 | * It is not expected to be deployed in run-time OpenAjax Hub implementations. | |
|
33 | */ | |
|
34 | reinit(): void; | |
|
35 | } | |
|
36 | ||
|
37 | interface OpenAjax { | |
|
38 | new (): OpenAjax; | |
|
39 | hub: OpenAjaxHub; | |
|
40 | } | |
|
41 | ||
|
42 | declare var OpenAjax: OpenAjax; |
This diff has been collapsed as it changes many lines, (2052 lines changed) Show them Hide them | |||
@@ -0,0 +1,2052 | |||
|
1 | declare namespace dijit { | |
|
2 | interface Dijit { | |
|
3 | ||
|
4 | } | |
|
5 | } | |
|
6 | ||
|
7 | declare namespace dojox { | |
|
8 | interface DojoX{ | |
|
9 | ||
|
10 | } | |
|
11 | } | |
|
12 | declare namespace dojo { | |
|
13 | namespace _base { | |
|
14 | ||
|
15 | /* dojo/_base/array */ | |
|
16 | interface Array { | |
|
17 | /** | |
|
18 | * Determines whether or not every item in arr satisfies the condition implemented by callback. | |
|
19 | * @param {T[] | string} arr the array to iterate on. If a string, operates on individual characters. | |
|
20 | * @param {Function | string} callback a function is invoked with three arguments: item, index, and | |
|
21 | * array and returns true if the condition is met. | |
|
22 | * @param {object} thisObj may be used to scope the call to callback | |
|
23 | */ | |
|
24 | every<T>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; | |
|
25 | ||
|
26 | /** | |
|
27 | * Determines whether or not any item in arr satisfies the condition implemented by callback. | |
|
28 | */ | |
|
29 | some<T>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; | |
|
30 | ||
|
31 | /** | |
|
32 | * locates the last index of the provided value in the passed array. If the value is not found, -1 | |
|
33 | * is returned. | |
|
34 | * @param {boolean} findLast Makes indexOf() work like lastIndexOf(). Used internally; not meant | |
|
35 | * for external usage. | |
|
36 | */ | |
|
37 | indexOf<T>(arr: T[], value: T, fromIndex?: number, findLast?: boolean): number; | |
|
38 | ||
|
39 | /** | |
|
40 | * locates the first index of the provided value in the passed array. If the value is not found, | |
|
41 | * -1 is returned. | |
|
42 | */ | |
|
43 | lastIndexOf<T>(arr: T[], value: T, fromIndex?: number): number; | |
|
44 | ||
|
45 | /** | |
|
46 | * locates the last index of the provided value in the passed array. If the value is not found, | |
|
47 | * -1 is returned. | |
|
48 | */ | |
|
49 | forEach<T>(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => void), thisObj?: Object): void; | |
|
50 | ||
|
51 | /** | |
|
52 | * for every item in arr, callback is invoked. Return values are ignored. If you want to break | |
|
53 | * out of the loop, consider using array.every() or array.some(). | |
|
54 | */ | |
|
55 | map<T, U>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => U), thisObj?: Object, Ctr?: dojo.GenericConstructor<U[]>): U[]; | |
|
56 | ||
|
57 | /** | |
|
58 | * Returns a new Array with those items from arr that match the condition implemented by | |
|
59 | * callback. | |
|
60 | */ | |
|
61 | filter<T>(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): T[]; | |
|
62 | ||
|
63 | clearCache(): void; | |
|
64 | } | |
|
65 | ||
|
66 | /* dojo/_base/Color */ | |
|
67 | type ColorValue = [number, number, number]; | |
|
68 | type ColorValueAlpha = [number, number, number, number]; | |
|
69 | ||
|
70 | interface ColorObject { | |
|
71 | r: number; | |
|
72 | g: number; | |
|
73 | b: number; | |
|
74 | a?: number; | |
|
75 | } | |
|
76 | ||
|
77 | interface ColorNamed { | |
|
78 | 'black': ColorValue; | |
|
79 | 'silver': ColorValue; | |
|
80 | 'gray': ColorValue; | |
|
81 | 'white': ColorValue; | |
|
82 | 'maroon': ColorValue; | |
|
83 | 'red': ColorValue; | |
|
84 | 'purple': ColorValue; | |
|
85 | 'fuchsia': ColorValue; | |
|
86 | 'green': ColorValue; | |
|
87 | 'lime': ColorValue; | |
|
88 | 'olive': ColorValue; | |
|
89 | 'yellow': ColorValue; | |
|
90 | 'navy': ColorValue; | |
|
91 | 'blue': ColorValue; | |
|
92 | 'teal': ColorValue; | |
|
93 | 'aqua': ColorValue; | |
|
94 | 'transparent': [number, number, number, number]; | |
|
95 | } | |
|
96 | ||
|
97 | interface Color { | |
|
98 | r: number; | |
|
99 | g: number; | |
|
100 | b: number; | |
|
101 | a: number; | |
|
102 | _set(r: number, g: number, b: number, a: number): void; | |
|
103 | ||
|
104 | /** Takes a named string, hex string, array of rgb or rgba values, | |
|
105 | * an object with r, g, b, and a properties, or another `Color` object | |
|
106 | * and sets this color instance to that value. | |
|
107 | */ | |
|
108 | setColor(color: ColorValue | ColorValueAlpha | ColorObject | string): Color; | |
|
109 | ||
|
110 | /** | |
|
111 | * Ensures the object has correct attributes | |
|
112 | */ | |
|
113 | sanitize(): Color; | |
|
114 | ||
|
115 | /** | |
|
116 | * Returns 3 component array of rgb values | |
|
117 | */ | |
|
118 | toRgb(): ColorValue; | |
|
119 | ||
|
120 | /** | |
|
121 | * Returns a 4 component array of rgba values from the color represented by | |
|
122 | * this object. | |
|
123 | */ | |
|
124 | toRgba(): ColorValueAlpha; | |
|
125 | ||
|
126 | /** | |
|
127 | * Returns a CSS color string in hexadecimal representation | |
|
128 | */ | |
|
129 | toHex(): string; | |
|
130 | ||
|
131 | /** | |
|
132 | * Returns a css color string in rgb(a) representation | |
|
133 | */ | |
|
134 | toCss(includeAlpha?: boolean): string; | |
|
135 | ||
|
136 | /** | |
|
137 | * Returns a visual representation of the color | |
|
138 | */ | |
|
139 | toString(): string; | |
|
140 | } | |
|
141 | ||
|
142 | interface ColorConstructor { | |
|
143 | new (color: ColorValue | ColorValueAlpha | ColorObject | string): Color; | |
|
144 | prototype: Color; | |
|
145 | ||
|
146 | /** | |
|
147 | * Dictionary list of all CSS named colors, by name. Values are 3-item arrays with corresponding RG and B values. | |
|
148 | */ | |
|
149 | named: ColorNamed; | |
|
150 | ||
|
151 | /** | |
|
152 | * Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, | |
|
153 | * can reuse a previously allocated Color object for the result | |
|
154 | */ | |
|
155 | blendColors(start: Color, end: Color, weight: number, obj?: Color): Color; | |
|
156 | ||
|
157 | /** | |
|
158 | * Returns a `Color` instance from a string of the form | |
|
159 | * "rgb(...)" or "rgba(...)". Optionally accepts a `Color` | |
|
160 | * object to update with the parsed value and return instead of | |
|
161 | * creating a new object. | |
|
162 | */ | |
|
163 | fromRgb(color: string, obj?: Color): Color; | |
|
164 | ||
|
165 | /** | |
|
166 | * Converts a hex string with a '#' prefix to a color object. | |
|
167 | * Supports 12-bit #rgb shorthand. Optionally accepts a | |
|
168 | * `Color` object to update with the parsed value. | |
|
169 | */ | |
|
170 | fromHex(color: string, obj?: Color): Color; | |
|
171 | ||
|
172 | /** | |
|
173 | * Builds a `Color` from a 3 or 4 element array, mapping each | |
|
174 | * element in sequence to the rgb(a) values of the color. | |
|
175 | */ | |
|
176 | fromArray(color: ColorValue | ColorValueAlpha, obj?: Color): Color; | |
|
177 | ||
|
178 | /** | |
|
179 | * Parses `str` for a color value. Accepts hex, rgb, and rgba | |
|
180 | * style color values. | |
|
181 | */ | |
|
182 | fromString(str: string, obj?: Color): Color; | |
|
183 | } | |
|
184 | ||
|
185 | /* dojo/colors */ | |
|
186 | ||
|
187 | interface ColorNamed { | |
|
188 | 'aliceblue': ColorValue; | |
|
189 | 'antiquewhite': ColorValue; | |
|
190 | 'aquamarine': ColorValue; | |
|
191 | 'azure': ColorValue; | |
|
192 | 'beige': ColorValue; | |
|
193 | 'bisque': ColorValue; | |
|
194 | 'blanchedalmond': ColorValue; | |
|
195 | 'blueviolet': ColorValue; | |
|
196 | 'brown': ColorValue; | |
|
197 | 'burlywood': ColorValue; | |
|
198 | 'cadetblue': ColorValue; | |
|
199 | 'chartreuse': ColorValue; | |
|
200 | 'chocolate': ColorValue; | |
|
201 | 'coral': ColorValue; | |
|
202 | 'cornflowerblue': ColorValue; | |
|
203 | 'cornsilk': ColorValue; | |
|
204 | 'crimson': ColorValue; | |
|
205 | 'cyan': ColorValue; | |
|
206 | 'darkblue': ColorValue; | |
|
207 | 'darkcyan': ColorValue; | |
|
208 | 'darkgoldenrod': ColorValue; | |
|
209 | 'darkgray': ColorValue; | |
|
210 | 'darkgreen': ColorValue; | |
|
211 | 'darkgrey': ColorValue; | |
|
212 | 'darkkhaki': ColorValue; | |
|
213 | 'darkmagenta': ColorValue; | |
|
214 | 'darkolivegreen': ColorValue; | |
|
215 | 'darkorange': ColorValue; | |
|
216 | 'darkorchid': ColorValue; | |
|
217 | 'darkred': ColorValue; | |
|
218 | 'darksalmon': ColorValue; | |
|
219 | 'darkseagreen': ColorValue; | |
|
220 | 'darkslateblue': ColorValue; | |
|
221 | 'darkslategray': ColorValue; | |
|
222 | 'darkslategrey': ColorValue; | |
|
223 | 'darkturquoise': ColorValue; | |
|
224 | 'darkviolet': ColorValue; | |
|
225 | 'deeppink': ColorValue; | |
|
226 | 'deepskyblue': ColorValue; | |
|
227 | 'dimgray': ColorValue; | |
|
228 | 'dimgrey': ColorValue; | |
|
229 | 'dodgerblue': ColorValue; | |
|
230 | 'firebrick': ColorValue; | |
|
231 | 'floralwhite': ColorValue; | |
|
232 | 'forestgreen': ColorValue; | |
|
233 | 'gainsboro': ColorValue; | |
|
234 | 'ghostwhite': ColorValue; | |
|
235 | 'gold': ColorValue; | |
|
236 | 'goldenrod': ColorValue; | |
|
237 | 'greenyellow': ColorValue; | |
|
238 | 'grey': ColorValue; | |
|
239 | 'honeydew': ColorValue; | |
|
240 | 'hotpink': ColorValue; | |
|
241 | 'indianred': ColorValue; | |
|
242 | 'indigo': ColorValue; | |
|
243 | 'ivory': ColorValue; | |
|
244 | 'khaki': ColorValue; | |
|
245 | 'lavender': ColorValue; | |
|
246 | 'lavenderblush': ColorValue; | |
|
247 | 'lawngreen': ColorValue; | |
|
248 | 'lemonchiffon': ColorValue; | |
|
249 | 'lightblue': ColorValue; | |
|
250 | 'lightcoral': ColorValue; | |
|
251 | 'lightcyan': ColorValue; | |
|
252 | 'lightgoldenrodyellow': ColorValue; | |
|
253 | 'lightgray': ColorValue; | |
|
254 | 'lightgreen': ColorValue; | |
|
255 | 'lightgrey': ColorValue; | |
|
256 | 'lightpink': ColorValue; | |
|
257 | 'lightsalmon': ColorValue; | |
|
258 | 'lightseagreen': ColorValue; | |
|
259 | 'lightskyblue': ColorValue; | |
|
260 | 'lightslategray': ColorValue; | |
|
261 | 'lightslategrey': ColorValue; | |
|
262 | 'lightsteelblue': ColorValue; | |
|
263 | 'lightyellow': ColorValue; | |
|
264 | 'limegreen': ColorValue; | |
|
265 | 'linen': ColorValue; | |
|
266 | 'magenta': ColorValue; | |
|
267 | 'mediumaquamarine': ColorValue; | |
|
268 | 'mediumblue': ColorValue; | |
|
269 | 'mediumorchid': ColorValue; | |
|
270 | 'mediumpurple': ColorValue; | |
|
271 | 'mediumseagreen': ColorValue; | |
|
272 | 'mediumslateblue': ColorValue; | |
|
273 | 'mediumspringgreen': ColorValue; | |
|
274 | 'mediumturquoise': ColorValue; | |
|
275 | 'mediumvioletred': ColorValue; | |
|
276 | 'midnightblue': ColorValue; | |
|
277 | 'mintcream': ColorValue; | |
|
278 | 'mistyrose': ColorValue; | |
|
279 | 'moccasin': ColorValue; | |
|
280 | 'navajowhite': ColorValue; | |
|
281 | 'oldlace': ColorValue; | |
|
282 | 'olivedrab': ColorValue; | |
|
283 | 'orange': ColorValue; | |
|
284 | 'orangered': ColorValue; | |
|
285 | 'orchid': ColorValue; | |
|
286 | 'palegoldenrod': ColorValue; | |
|
287 | 'palegreen': ColorValue; | |
|
288 | 'paleturquoise': ColorValue; | |
|
289 | 'palevioletred': ColorValue; | |
|
290 | 'papayawhip': ColorValue; | |
|
291 | 'peachpuff': ColorValue; | |
|
292 | 'peru': ColorValue; | |
|
293 | 'pink': ColorValue; | |
|
294 | 'plum': ColorValue; | |
|
295 | 'powderblue': ColorValue; | |
|
296 | 'rosybrown': ColorValue; | |
|
297 | 'royalblue': ColorValue; | |
|
298 | 'saddlebrown': ColorValue; | |
|
299 | 'salmon': ColorValue; | |
|
300 | 'sandybrown': ColorValue; | |
|
301 | 'seagreen': ColorValue; | |
|
302 | 'seashell': ColorValue; | |
|
303 | 'sienna': ColorValue; | |
|
304 | 'skyblue': ColorValue; | |
|
305 | 'slateblue': ColorValue; | |
|
306 | 'slategray': ColorValue; | |
|
307 | 'slategrey': ColorValue; | |
|
308 | 'snow': ColorValue; | |
|
309 | 'springgreen': ColorValue; | |
|
310 | 'steelblue': ColorValue; | |
|
311 | 'tan': ColorValue; | |
|
312 | 'thistle': ColorValue; | |
|
313 | 'tomato': ColorValue; | |
|
314 | 'turquoise': ColorValue; | |
|
315 | 'violet': ColorValue; | |
|
316 | 'wheat': ColorValue; | |
|
317 | 'whitesmoke': ColorValue; | |
|
318 | 'yellowgreen': ColorValue; | |
|
319 | } | |
|
320 | ||
|
321 | interface ColorConstructor { | |
|
322 | /** | |
|
323 | * creates a greyscale color with an optional alpha | |
|
324 | */ | |
|
325 | makeGrey(g: number, a?: number): Color; | |
|
326 | } | |
|
327 | ||
|
328 | /* dojo/_base/config */ | |
|
329 | interface Config { | |
|
330 | /** Defaults to `false`. If set to `true`, ensures that Dojo provides | |
|
331 | * extended debugging feedback via Firebug. If Firebug is not available | |
|
332 | * on your platform, setting `isDebug` to `true` will force Dojo to | |
|
333 | * pull in (and display) the version of Firebug Lite which is | |
|
334 | * integrated into the Dojo distribution, thereby always providing a | |
|
335 | * debugging/logging console when `isDebug` is enabled. Note that | |
|
336 | * Firebug's `console.*` methods are ALWAYS defined by Dojo. If | |
|
337 | * `isDebug` is false and you are on a platform without Firebug, these | |
|
338 | * methods will be defined as no-ops. | |
|
339 | */ | |
|
340 | isDebug: boolean; | |
|
341 | ||
|
342 | /** | |
|
343 | * The locale to assume for loading localized resources in this page, | |
|
344 | * specified according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt). | |
|
345 | * Must be specified entirely in lowercase, e.g. `en-us` and `zh-cn`. | |
|
346 | * See the documentation for `dojo.i18n` and `dojo.requireLocalization` | |
|
347 | * for details on loading localized resources. If no locale is specified, | |
|
348 | * Dojo assumes the locale of the user agent, according to `navigator.userLanguage` | |
|
349 | * or `navigator.language` properties. | |
|
350 | */ | |
|
351 | locale: string; | |
|
352 | ||
|
353 | /** | |
|
354 | * No default value. Specifies additional locales whose | |
|
355 | * resources should also be loaded alongside the default locale when | |
|
356 | * calls to `dojo.requireLocalization()` are processed. | |
|
357 | */ | |
|
358 | extraLocale: string[]; | |
|
359 | ||
|
360 | /** | |
|
361 | * The directory in which `dojo.js` is located. Under normal | |
|
362 | * conditions, Dojo auto-detects the correct location from which it | |
|
363 | * was loaded. You may need to manually configure `baseUrl` in cases | |
|
364 | * where you have renamed `dojo.js` or in which `<base>` tags confuse | |
|
365 | * some browsers (e.g. IE 6). The variable `dojo.baseUrl` is assigned | |
|
366 | * either the value of `djConfig.baseUrl` if one is provided or the | |
|
367 | * auto-detected root if not. Other modules are located relative to | |
|
368 | * this path. The path should end in a slash. | |
|
369 | */ | |
|
370 | baseUrl: string; | |
|
371 | ||
|
372 | /** | |
|
373 | * A map of module names to paths relative to `dojo.baseUrl`. The | |
|
374 | * key/value pairs correspond directly to the arguments which | |
|
375 | * `dojo.registerModulePath` accepts. Specifying | |
|
376 | * `djConfig.modulePaths = { "foo": "../../bar" }` is the equivalent | |
|
377 | * of calling `dojo.registerModulePath("foo", "../../bar");`. Multiple | |
|
378 | * modules may be configured via `djConfig.modulePaths`. | |
|
379 | */ | |
|
380 | modulePaths: { [mid: string]: string }; | |
|
381 | ||
|
382 | /** | |
|
383 | * Adds a callback via dojo/ready. Useful when Dojo is added after | |
|
384 | * the page loads and djConfig.afterOnLoad is true. Supports the same | |
|
385 | * arguments as dojo/ready. When using a function reference, use | |
|
386 | * `djConfig.addOnLoad = function(){};`. For object with function name use | |
|
387 | * `djConfig.addOnLoad = [myObject, "functionName"];` and for object with | |
|
388 | * function reference use | |
|
389 | * `djConfig.addOnLoad = [myObject, function(){}];` | |
|
390 | */ | |
|
391 | addOnLoad: () => void | [any, string]; | |
|
392 | ||
|
393 | /** | |
|
394 | * Run the parser after the page is loaded | |
|
395 | */ | |
|
396 | parseOnLoad: boolean; | |
|
397 | ||
|
398 | /** | |
|
399 | * An array of module names to be loaded immediately after dojo.js has been included | |
|
400 | * in a page. | |
|
401 | */ | |
|
402 | require: string[]; | |
|
403 | ||
|
404 | /** | |
|
405 | * Default duration, in milliseconds, for wipe and fade animations within dijits. | |
|
406 | * Assigned to dijit.defaultDuration. | |
|
407 | */ | |
|
408 | defaultDuration: number; | |
|
409 | ||
|
410 | /** | |
|
411 | * Used by some modules to configure an empty iframe. Used by dojo/io/iframe and | |
|
412 | * dojo/back, and dijit/popup support in IE where an iframe is needed to make sure native | |
|
413 | * controls do not bleed through the popups. Normally this configuration variable | |
|
414 | * does not need to be set, except when using cross-domain/CDN Dojo builds. | |
|
415 | * Save dojo/resources/blank.html to your domain and set `djConfig.dojoBlankHtmlUrl` | |
|
416 | * to the path on your domain your copy of blank.html. | |
|
417 | */ | |
|
418 | dojoBlankHtmlUrl: string; | |
|
419 | ||
|
420 | /** | |
|
421 | * Set this to true to enable publishing of topics for the different phases of | |
|
422 | * IO operations. Publishing is done via dojo/topic.publish(). See dojo/main.__IoPublish for a list | |
|
423 | * of topics that are published. | |
|
424 | */ | |
|
425 | ioPublish: boolean; | |
|
426 | ||
|
427 | /** | |
|
428 | * If set to a value that evaluates to true such as a string or array and | |
|
429 | * isDebug is true and Firebug is not available or running, then it bypasses | |
|
430 | * the creation of Firebug Lite allowing you to define your own console object. | |
|
431 | */ | |
|
432 | useCustomLogger: any; | |
|
433 | ||
|
434 | /** | |
|
435 | * Array containing the r, g, b components used as transparent color in dojo.Color; | |
|
436 | * if undefined, ColorValue (white) will be used. | |
|
437 | */ | |
|
438 | transparentColor: ColorValue | ColorValueAlpha; | |
|
439 | ||
|
440 | /** | |
|
441 | * Defines dependencies to be used before the loader has been loaded. | |
|
442 | * When provided, they cause the loader to execute require(deps, callback) | |
|
443 | * once it has finished loading. Should be used with callback. | |
|
444 | */ | |
|
445 | deps: () => string[] | string[]; | |
|
446 | ||
|
447 | /** | |
|
448 | * Defines the cached has API variables | |
|
449 | */ | |
|
450 | hasCache: dojo.HasCache; | |
|
451 | ||
|
452 | /** | |
|
453 | * Defines a callback to be used when dependencies are defined before | |
|
454 | * the loader has been loaded. When provided, they cause the loader to | |
|
455 | * execute require(deps, callback) once it has finished loading. | |
|
456 | */ | |
|
457 | callback: (...args: any[]) => void; | |
|
458 | ||
|
459 | /** | |
|
460 | * Whether deferred instrumentation should be loaded or included | |
|
461 | * in builds. | |
|
462 | */ | |
|
463 | deferredInstrumentation: boolean; | |
|
464 | ||
|
465 | /** | |
|
466 | * Whether the deferred instrumentation should be used. | |
|
467 | * | |
|
468 | * * `"report-rejections"`: report each rejection as it occurs. | |
|
469 | * * `true` or `1` or `"report-unhandled-rejections"`: wait 1 second | |
|
470 | * in an attempt to detect unhandled rejections. | |
|
471 | */ | |
|
472 | useDeferredInstrumentation: string | boolean | number; | |
|
473 | } | |
|
474 | ||
|
475 | /* dojo/_base/connect */ | |
|
476 | ||
|
477 | interface Connect { | |
|
478 | /** | |
|
479 | * TODO: Type this better | |
|
480 | */ | |
|
481 | _keypress(object: any, listener: EventListener): Handle; | |
|
482 | ||
|
483 | /** | |
|
484 | * `dojo.connect` is a deprecated event handling and delegation method in | |
|
485 | * Dojo. It allows one function to "listen in" on the execution of | |
|
486 | * any other, triggering the second whenever the first is called. Many | |
|
487 | * listeners may be attached to a function, and source functions may | |
|
488 | * be either regular function calls or DOM events. | |
|
489 | */ | |
|
490 | connect(obj: any, event: string, context: any, method: EventListener | string, dontFix?: boolean): Handle; | |
|
491 | connect(event: string, context: any, method: EventListener | string, dontFix?: boolean): Handle; | |
|
492 | ||
|
493 | /** | |
|
494 | * Remove a link created by dojo.connect. | |
|
495 | */ | |
|
496 | disconnect(handle: Handle): void; | |
|
497 | ||
|
498 | /** | |
|
499 | * Attach a listener to a named topic. The listener function is invoked whenever the | |
|
500 | * named topic is published (see: dojo.publish). | |
|
501 | * Returns a handle which is needed to unsubscribe this listener. | |
|
502 | */ | |
|
503 | subscribe(topic: string, context: any, method: EventListener): Handle; | |
|
504 | ||
|
505 | /** | |
|
506 | * Invoke all listener method subscribed to topic. | |
|
507 | */ | |
|
508 | publish(topic: string, args: any[]): boolean; | |
|
509 | ||
|
510 | /** | |
|
511 | * Ensure that every time obj.event() is called, a message is published | |
|
512 | * on the topic. Returns a handle which can be passed to | |
|
513 | * dojo.disconnect() to disable subsequent automatic publication on | |
|
514 | * the topic. | |
|
515 | */ | |
|
516 | connectPublisher(topic: string, obj: any, method: string): Handle; | |
|
517 | connectPublisher(topic: string, method: EventListener): Handle; | |
|
518 | ||
|
519 | /** | |
|
520 | * Checks an event for the copy key (meta on Mac, and ctrl anywhere else) | |
|
521 | */ | |
|
522 | isCopyKey(e: Event): boolean; | |
|
523 | } | |
|
524 | ||
|
525 | /* dojo/_base/declare */ | |
|
526 | ||
|
527 | /** | |
|
528 | * dojo/_base/declare() returns a constructor `C`. `new C()` returns an Object with the following | |
|
529 | * methods, in addition to the methods and properties specified via the arguments passed to declare(). | |
|
530 | */ | |
|
531 | interface DeclareCreatedObject { | |
|
532 | declaredClass: string; | |
|
533 | ||
|
534 | /** | |
|
535 | * Calls a super method. | |
|
536 | * | |
|
537 | * This method is used inside method of classes produced with | |
|
538 | * declare() to call a super method (next in the chain). It is | |
|
539 | * used for manually controlled chaining. Consider using the regular | |
|
540 | * chaining, because it is faster. Use "this.inherited()" only in | |
|
541 | * complex cases. | |
|
542 | * | |
|
543 | * This method cannot me called from automatically chained | |
|
544 | * constructors including the case of a special (legacy) | |
|
545 | * constructor chaining. It cannot be called from chained methods. | |
|
546 | * | |
|
547 | * If "this.inherited()" cannot find the next-in-chain method, it | |
|
548 | * does nothing and returns "undefined". The last method in chain | |
|
549 | * can be a default method implemented in Object, which will be | |
|
550 | * called last. | |
|
551 | * | |
|
552 | * If "name" is specified, it is assumed that the method that | |
|
553 | * received "args" is the parent method for this call. It is looked | |
|
554 | * up in the chain list and if it is found the next-in-chain method | |
|
555 | * is called. If it is not found, the first-in-chain method is | |
|
556 | * called. | |
|
557 | * | |
|
558 | * If "name" is not specified, it will be derived from the calling | |
|
559 | * method (using a methoid property "nom"). | |
|
560 | */ | |
|
561 | inherited<U>(args: IArguments, newArgs?: any[]): U; | |
|
562 | inherited(args: IArguments, newArgs?: true): Function | void; | |
|
563 | inherited<U>(name: string, args: IArguments, newArgs?: any[]): U; | |
|
564 | inherited(name: string, args: IArguments, newArgs?: true): Function | void; | |
|
565 | ||
|
566 | /** | |
|
567 | * Returns a super method. | |
|
568 | * | |
|
569 | * This method is a convenience method for "this.inherited()". | |
|
570 | * It uses the same algorithm but instead of executing a super | |
|
571 | * method, it returns it, or "undefined" if not found. | |
|
572 | */ | |
|
573 | getInherited(args: IArguments): Function | void; | |
|
574 | getInherited(name: string, args: IArguments): Function | void; | |
|
575 | ||
|
576 | /** | |
|
577 | * Checks the inheritance chain to see if it is inherited from this class. | |
|
578 | * | |
|
579 | * This method is used with instances of classes produced with | |
|
580 | * declare() to determine of they support a certain interface or | |
|
581 | * not. It models "instanceof" operator. | |
|
582 | */ | |
|
583 | isInstanceOf(cls: any): boolean; | |
|
584 | } | |
|
585 | ||
|
586 | interface DeclareConstructor<T> { | |
|
587 | new (...args: any[]): T & DeclareCreatedObject; | |
|
588 | prototype: T; | |
|
589 | ||
|
590 | /** | |
|
591 | * Adds all properties and methods of source to constructor's | |
|
592 | * prototype, making them available to all instances created with | |
|
593 | * constructor. This method is specific to constructors created with | |
|
594 | * declare(). | |
|
595 | * | |
|
596 | * Adds source properties to the constructor's prototype. It can | |
|
597 | * override existing properties. | |
|
598 | * | |
|
599 | * This method is similar to dojo.extend function, but it is specific | |
|
600 | * to constructors produced by declare(). It is implemented | |
|
601 | * using dojo.safeMixin, and it skips a constructor property, | |
|
602 | * and properly decorates copied functions. | |
|
603 | */ | |
|
604 | extend<U>(source: U): DeclareConstructor<T & U>; | |
|
605 | ||
|
606 | /** | |
|
607 | * Create a subclass of the declared class from a list of base classes. | |
|
608 | * | |
|
609 | * Create a constructor using a compact notation for inheritance and | |
|
610 | * prototype extension. | |
|
611 | * | |
|
612 | * Mixin ancestors provide a type of multiple inheritance. | |
|
613 | * Prototypes of mixin ancestors are copied to the new class: | |
|
614 | * changes to mixin prototypes will not affect classes to which | |
|
615 | * they have been mixed in. | |
|
616 | */ | |
|
617 | createSubclass<U, V, X>(mixins: [DeclareConstructor<U>, DeclareConstructor<V>], props: X & ThisType<T & U & V & X>): DeclareConstructor<T & U & V & X>; | |
|
618 | createSubclass<U, V>(mixins: [DeclareConstructor<U>], props: V & ThisType<T & U & V>): DeclareConstructor<T & U & V>; | |
|
619 | createSubclass<U, V>(mixins: DeclareConstructor<U>, props: V & ThisType<T & U & V>): DeclareConstructor<T & U & V>; | |
|
620 | createSubclass<U>(mixins: [DeclareConstructor<U>]): DeclareConstructor<T & U>; | |
|
621 | createSubclass<U>(mixins: DeclareConstructor<U>): DeclareConstructor<T & U>; | |
|
622 | createSubclass<U>(mixins: any, props: U & ThisType<T & U>): DeclareConstructor<T & U>; | |
|
623 | } | |
|
624 | ||
|
625 | /** | |
|
626 | * Create a feature-rich constructor from compact notation. | |
|
627 | */ | |
|
628 | interface Declare { | |
|
629 | <A, B, C, D>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>, DeclareConstructor<D>]): DeclareConstructor<A & B & C & D>; | |
|
630 | <A, B, C>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>]): DeclareConstructor<A & B & C>; | |
|
631 | <A, B>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>]): DeclareConstructor<A & B>; | |
|
632 | <A>(superClass: DeclareConstructor<A> | [DeclareConstructor<A>]): DeclareConstructor<A>; | |
|
633 | ||
|
634 | <A, B, C, D, E>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>, DeclareConstructor<D>], props: E & ThisType<DeclareCreatedObject & A & B & C & D & E>): DeclareConstructor<A & B & C & D & E>; | |
|
635 | <A, B, C, D>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>], props: D & ThisType<DeclareCreatedObject & A & B & C & D>): DeclareConstructor<A & B & C & D>; | |
|
636 | <A, B, C>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>], props: C & ThisType<DeclareCreatedObject & A & B & C>): DeclareConstructor<A & B & C>; | |
|
637 | <A, B>(superClass: DeclareConstructor<A> | [DeclareConstructor<A>], props: B & ThisType<DeclareCreatedObject & A & B>): DeclareConstructor<A & B>; | |
|
638 | ||
|
639 | <A, B, C, D>(className: string, superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>, DeclareConstructor<D>]): DeclareConstructor<A & B & C & D>; | |
|
640 | <A, B, C>(className: string, superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>]): DeclareConstructor<A & B & C>; | |
|
641 | <A, B>(className: string, superClass: [DeclareConstructor<A>, DeclareConstructor<B>]): DeclareConstructor<A & B>; | |
|
642 | <A>(className: string, superClass: DeclareConstructor<A> | [DeclareConstructor<A>]): DeclareConstructor<A>; | |
|
643 | ||
|
644 | <A, B, C, D, E>(className: string, superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>, DeclareConstructor<D>], props: E & ThisType<DeclareCreatedObject & A & B & C & D & E>): DeclareConstructor<A & B & C & D & E>; | |
|
645 | <A, B, C, D>(className: string, superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>], props: D & ThisType<DeclareCreatedObject & A & B & C & D>): DeclareConstructor<A & B & C & D>; | |
|
646 | <A, B, C>(className: string, superClass: [DeclareConstructor<A>, DeclareConstructor<B>], props: C & ThisType<DeclareCreatedObject & A & B & C>): DeclareConstructor<A & B & C>; | |
|
647 | <A, B>(className: string, superClass: DeclareConstructor<A> | [DeclareConstructor<A>], props: B & ThisType<DeclareCreatedObject & A & B>): DeclareConstructor<A & B>; | |
|
648 | ||
|
649 | <A>(className: string, superClass: any, props: A & ThisType<DeclareCreatedObject & A>): DeclareConstructor<A>; | |
|
650 | (className: string, superClass: any): DeclareConstructor<any>; | |
|
651 | <A>(superClass: any, props: A & ThisType<DeclareCreatedObject & A>): DeclareConstructor<A>; | |
|
652 | (superClass: any): DeclareConstructor<any>; | |
|
653 | ||
|
654 | /** | |
|
655 | * Mix in properties skipping a constructor and decorating functions | |
|
656 | * like it is done by declare(). | |
|
657 | */ | |
|
658 | safeMixin<A, B>(target: A, source: B): A & B; | |
|
659 | } | |
|
660 | ||
|
661 | /* dojo/_base/Deferred */ | |
|
662 | ||
|
663 | interface Deferred<T> { | |
|
664 | ||
|
665 | promise: promise.Promise<T>; | |
|
666 | ||
|
667 | /** | |
|
668 | * Checks whether the deferred has been resolved. | |
|
669 | */ | |
|
670 | isResolved(): boolean; | |
|
671 | ||
|
672 | /** | |
|
673 | * Checks whether the deferred has been rejected. | |
|
674 | */ | |
|
675 | isRejected(): boolean; | |
|
676 | ||
|
677 | /** | |
|
678 | * Checks whether the deferred has been resolved or rejected. | |
|
679 | */ | |
|
680 | isFulfilled(): boolean; | |
|
681 | ||
|
682 | /** | |
|
683 | * Checks whether the deferred has been canceled. | |
|
684 | */ | |
|
685 | isCanceled(): boolean; | |
|
686 | ||
|
687 | /** | |
|
688 | * Emit a progress update on the deferred. | |
|
689 | */ | |
|
690 | progress(update: any, strict?: boolean): promise.Promise<T>; | |
|
691 | ||
|
692 | /** | |
|
693 | * Resolve the deferred. | |
|
694 | */ | |
|
695 | resolve(value?: T, strict?: boolean): promise.Promise<T>; | |
|
696 | ||
|
697 | /** | |
|
698 | * Reject the deferred. | |
|
699 | */ | |
|
700 | reject(error?: any, strict?: boolean): promise.Promise<T>; | |
|
701 | ||
|
702 | /** | |
|
703 | * The results of the Defereed | |
|
704 | */ | |
|
705 | results: [T, any]; | |
|
706 | ||
|
707 | /** | |
|
708 | * Adds callback and error callback for this deferred instance. | |
|
709 | */ | |
|
710 | addCallbacks<U>(callback?: promise.PromiseCallback<T, U>, errback?: promise.PromiseErrback<U>): Deferred<U>; | |
|
711 | ||
|
712 | /** | |
|
713 | * Add new callbacks to the deferred. | |
|
714 | */ | |
|
715 | then<U>(callback?: promise.PromiseCallback<T, U>, errback?: promise.PromiseErrback<U>, progback?: promise.PromiseProgback): promise.Promise<U>; | |
|
716 | ||
|
717 | /** | |
|
718 | * Cancels the asynchronous operation | |
|
719 | */ | |
|
720 | cancel(): void; | |
|
721 | ||
|
722 | /** | |
|
723 | * Adds successful callback for this deferred instance. | |
|
724 | */ | |
|
725 | addCallback<U>(callback: promise.PromiseCallback<T, U>): Deferred<U>; | |
|
726 | ||
|
727 | /** | |
|
728 | * Adds error callback for this deferred instance. | |
|
729 | */ | |
|
730 | addErrback<U>(errback: promise.PromiseErrback<U>): Deferred<U>; | |
|
731 | ||
|
732 | /** | |
|
733 | * Add handler as both successful callback and error callback for this deferred instance. | |
|
734 | */ | |
|
735 | addBoth<U>(callback?: promise.PromiseErrback<U>): Deferred<U>; | |
|
736 | ||
|
737 | fired: number; | |
|
738 | } | |
|
739 | ||
|
740 | interface DeferredConstructor { | |
|
741 | /** | |
|
742 | * Deprecated. This module defines the legacy dojo/_base/Deferred API. | |
|
743 | * New code should use dojo/Deferred instead. | |
|
744 | */ | |
|
745 | new <T>(canceller?: (reason: any) => void): Deferred<T>; | |
|
746 | ||
|
747 | prototype: Deferred<any>; | |
|
748 | ||
|
749 | /** | |
|
750 | * Transparently applies callbacks to values and/or promises. | |
|
751 | */ | |
|
752 | when<T>(valueOrPromise: any): dojo.Deferred<T>; | |
|
753 | when<T, U>(valueOrPromise: any, callback?: promise.PromiseCallback<T, U>, errback?: promise.PromiseErrback<U>, progback?: promise.PromiseProgback): dojo.Deferred<U>; | |
|
754 | } | |
|
755 | ||
|
756 | /* dojo/_base/event */ | |
|
757 | ||
|
758 | /** | |
|
759 | * This module defines dojo DOM event API. Usually you should use dojo/on, and evt.stopPropagation() + | |
|
760 | * evt.preventDefault(), rather than this module. | |
|
761 | */ | |
|
762 | interface EventModule { | |
|
763 | /** | |
|
764 | * normalizes properties on the event object including event | |
|
765 | * bubbling methods, keystroke normalization, and x/y positions | |
|
766 | */ | |
|
767 | fix(evt: Event, sender: Element): Event; | |
|
768 | ||
|
769 | /** | |
|
770 | * prevents propagation and clobbers the default action of the | |
|
771 | * passed event | |
|
772 | */ | |
|
773 | stop(evt: Event): void; | |
|
774 | } | |
|
775 | ||
|
776 | /* dojo/_base/fx */ | |
|
777 | ||
|
778 | interface Line { | |
|
779 | /** | |
|
780 | * Returns the point on the line | |
|
781 | * @param {number} n a floating point number greater than 0 and less than 1 | |
|
782 | */ | |
|
783 | getValue(n: number): number; | |
|
784 | } | |
|
785 | ||
|
786 | /** | |
|
787 | * Object used to generate values from a start value to an end value | |
|
788 | */ | |
|
789 | interface LineConstructor { | |
|
790 | new (start: number, end: number): Line; | |
|
791 | } | |
|
792 | ||
|
793 | interface EasingFunction { | |
|
794 | (n?: number): number; | |
|
795 | } | |
|
796 | ||
|
797 | interface Animation extends Evented { | |
|
798 | /** | |
|
799 | * The time in milliseconds the animation will take to run | |
|
800 | */ | |
|
801 | duration: number; | |
|
802 | ||
|
803 | /** | |
|
804 | * A two element array of start and end values, or a `_Line` instance to be | |
|
805 | * used in the Animation. | |
|
806 | */ | |
|
807 | curve: Line | [number, number]; | |
|
808 | ||
|
809 | /** | |
|
810 | * A Function to adjust the acceleration (or deceleration) of the progress | |
|
811 | * across a _Line | |
|
812 | */ | |
|
813 | easing?: EasingFunction; | |
|
814 | ||
|
815 | /** | |
|
816 | * The number of times to loop the animation | |
|
817 | */ | |
|
818 | repeat: number; | |
|
819 | ||
|
820 | /** | |
|
821 | * the time in milliseconds to wait before advancing to next frame | |
|
822 | * (used as a fps timer: 1000/rate = fps) | |
|
823 | */ | |
|
824 | rate: number; | |
|
825 | ||
|
826 | /** | |
|
827 | * The time in milliseconds to wait before starting animation after it | |
|
828 | * has been .play()'ed | |
|
829 | */ | |
|
830 | delay?: number; | |
|
831 | ||
|
832 | /** | |
|
833 | * Synthetic event fired before a Animation begins playing (synchronous) | |
|
834 | */ | |
|
835 | beforeBegin?: Event; | |
|
836 | ||
|
837 | /** | |
|
838 | * Synthetic event fired as a Animation begins playing (useful?) | |
|
839 | */ | |
|
840 | onBegin?: Event; | |
|
841 | ||
|
842 | /** | |
|
843 | * Synthetic event fired at each interval of the Animation | |
|
844 | */ | |
|
845 | onAnimate?: Event; | |
|
846 | ||
|
847 | /** | |
|
848 | * Synthetic event fired after the final frame of the Animation | |
|
849 | */ | |
|
850 | onEnd?: Event; | |
|
851 | ||
|
852 | /** | |
|
853 | * Synthetic event fired any time the Animation is play()'ed | |
|
854 | */ | |
|
855 | onPlay?: Event; | |
|
856 | ||
|
857 | /** | |
|
858 | * Synthetic event fired when the Animation is paused | |
|
859 | */ | |
|
860 | onPause?: Event; | |
|
861 | ||
|
862 | /** | |
|
863 | * Synthetic event fires when the Animation is stopped | |
|
864 | */ | |
|
865 | onStop?: Event; | |
|
866 | ||
|
867 | _precent: number; | |
|
868 | _startRepeatCount: number; | |
|
869 | _getStep(): number; | |
|
870 | ||
|
871 | /** | |
|
872 | * Convenience function. Fire event "evt" and pass it the | |
|
873 | * arguments specified in "args". | |
|
874 | */ | |
|
875 | _fire(evt: Event, args?: any[]): this; | |
|
876 | ||
|
877 | /** | |
|
878 | * Start the animation. | |
|
879 | */ | |
|
880 | play(delay?: number, gotoStart?: boolean): this; | |
|
881 | ||
|
882 | _play(gotoStart?: boolean): this; | |
|
883 | ||
|
884 | /** | |
|
885 | * Pauses a running animation. | |
|
886 | */ | |
|
887 | pause(): this; | |
|
888 | ||
|
889 | /** | |
|
890 | * Sets the progress of the animation. | |
|
891 | */ | |
|
892 | gotoPercent(precent: number, andPlay?: boolean): this; | |
|
893 | ||
|
894 | /** | |
|
895 | * Stops a running animation. | |
|
896 | */ | |
|
897 | stop(gotoEnd?: boolean): Animation; | |
|
898 | ||
|
899 | /** | |
|
900 | * cleanup the animation | |
|
901 | */ | |
|
902 | destroy(): void; | |
|
903 | ||
|
904 | /** | |
|
905 | * Returns a string token representation of the status of | |
|
906 | * the animation, one of: "paused", "playing", "stopped" | |
|
907 | */ | |
|
908 | status(): string; | |
|
909 | ||
|
910 | _cycle(): Animation; | |
|
911 | _clearTimer(): void; | |
|
912 | _startTimer(): void; | |
|
913 | _stopTimer(): void; | |
|
914 | } | |
|
915 | ||
|
916 | /** | |
|
917 | * A generic animation class that fires callbacks into its handlers | |
|
918 | * object at various states. | |
|
919 | */ | |
|
920 | interface AnimationConstructor { | |
|
921 | new (args: any): Animation; | |
|
922 | prototype: Animation; | |
|
923 | } | |
|
924 | ||
|
925 | interface AnimationCallback { | |
|
926 | (node: HTMLElement): void; | |
|
927 | } | |
|
928 | ||
|
929 | interface FadeArguments { | |
|
930 | node: HTMLElement | string; | |
|
931 | duration?: number; | |
|
932 | easing?: EasingFunction; | |
|
933 | ||
|
934 | start?: Function; | |
|
935 | end?: Function; | |
|
936 | } | |
|
937 | ||
|
938 | interface AnimationArgumentsProperties { | |
|
939 | [name: string]: any; | |
|
940 | } | |
|
941 | ||
|
942 | interface AnimationArguments extends FadeArguments { | |
|
943 | properties?: AnimationArgumentsProperties; | |
|
944 | onEnd?: AnimationCallback; | |
|
945 | } | |
|
946 | ||
|
947 | interface Fx { | |
|
948 | _Line: LineConstructor; | |
|
949 | ||
|
950 | Animation: AnimationConstructor; | |
|
951 | ||
|
952 | _fade(args: any): Animation; | |
|
953 | ||
|
954 | /** | |
|
955 | * Returns an animation that will fade node defined in 'args' from | |
|
956 | * its current opacity to fully opaque. | |
|
957 | */ | |
|
958 | fadeIn(args: FadeArguments): Animation; | |
|
959 | ||
|
960 | /** | |
|
961 | * Returns an animation that will fade node defined in 'args' | |
|
962 | * from its current opacity to fully transparent. | |
|
963 | */ | |
|
964 | fadeOut(args: FadeArguments): Animation; | |
|
965 | ||
|
966 | _defaultEasing(n?: number): number; | |
|
967 | ||
|
968 | /** | |
|
969 | * Returns an animation that will transition the properties of | |
|
970 | * node defined in `args` depending how they are defined in | |
|
971 | * `args.properties` | |
|
972 | */ | |
|
973 | animateProperty(args: AnimationArguments): Animation; | |
|
974 | ||
|
975 | /** | |
|
976 | * A simpler interface to `animateProperty()`, also returns | |
|
977 | * an instance of `Animation` but begins the animation | |
|
978 | * immediately, unlike nearly every other Dojo animation API. | |
|
979 | */ | |
|
980 | anim( | |
|
981 | node: HTMLElement | string, | |
|
982 | properties: { [name: string]: any }, | |
|
983 | duration?: number, | |
|
984 | easing?: Function, | |
|
985 | onEnd?: AnimationCallback, | |
|
986 | delay?: number): Animation; | |
|
987 | } | |
|
988 | ||
|
989 | /* dojo/_base/html */ | |
|
990 | ||
|
991 | interface CoordBox extends DomGeometryBox, Point { } | |
|
992 | ||
|
993 | interface Dojo { | |
|
994 | /** | |
|
995 | * Returns DOM node with matching `id` attribute or falsy value (ex: null or undefined) | |
|
996 | * if not found. Internally if `id` is not a string then `id` returned. | |
|
997 | */ | |
|
998 | byId(id: string, doc?: Document): Element; | |
|
999 | ||
|
1000 | /** | |
|
1001 | * Returns true if node is a descendant of ancestor | |
|
1002 | */ | |
|
1003 | isDescendant(node: NodeOrString, ancestor: NodeOrString): boolean; | |
|
1004 | ||
|
1005 | /** | |
|
1006 | * Enable or disable selection on a node | |
|
1007 | */ | |
|
1008 | setSelectable(node: ElementOrString, selectable?: boolean): void; | |
|
1009 | ||
|
1010 | /** | |
|
1011 | * Returns true if the requested attribute is specified on the | |
|
1012 | * given element, and false otherwise. | |
|
1013 | */ | |
|
1014 | hasAttr(node: NodeOrString, name: string): boolean; | |
|
1015 | ||
|
1016 | /** | |
|
1017 | * Gets an attribute on an HTML element. | |
|
1018 | * Because sometimes this uses node.getAttribute, it should be a string, | |
|
1019 | * but it can also get any other attribute on a node, therefore it is unsafe | |
|
1020 | * to type just a string. | |
|
1021 | */ | |
|
1022 | getAttr(node: ElementOrString, name: string): any; | |
|
1023 | ||
|
1024 | /** | |
|
1025 | * Sets an attribute on an HTML element. | |
|
1026 | */ | |
|
1027 | setAttr(node: ElementOrString, name: string, value: any): Element; | |
|
1028 | setAttr(node: ElementOrString, map: Object): Element; | |
|
1029 | ||
|
1030 | /** | |
|
1031 | * Removes an attribute from an HTML element. | |
|
1032 | */ | |
|
1033 | removeAttr(node: NodeOrString, name: string): void; | |
|
1034 | ||
|
1035 | /** | |
|
1036 | * Returns an effective value of a property or an attribute. | |
|
1037 | */ | |
|
1038 | getNodeProp(node: NodeOrString, name: string): any; | |
|
1039 | ||
|
1040 | /** | |
|
1041 | * Gets or sets an attribute on an HTML element. | |
|
1042 | */ | |
|
1043 | attr(node: NodeOrString, name: string): any; | |
|
1044 | attr(node: NodeOrString, map: Object): Element; | |
|
1045 | attr(node: NodeOrString, name: string, value: any): Element; | |
|
1046 | ||
|
1047 | /** | |
|
1048 | * Returns whether or not the specified classes are a portion of the | |
|
1049 | * class list currently applied to the node. | |
|
1050 | */ | |
|
1051 | containsClass(node: NodeOrString, classStr: string): boolean; | |
|
1052 | ||
|
1053 | /** | |
|
1054 | * Adds the specified classes to the end of the class list on the | |
|
1055 | * passed node. Will not re-apply duplicate classes. | |
|
1056 | */ | |
|
1057 | addClass(node: NodeOrString, classStr: string | string[]): void; | |
|
1058 | ||
|
1059 | /** | |
|
1060 | * Removes the specified classes from node. No `contains()` | |
|
1061 | * check is required. | |
|
1062 | */ | |
|
1063 | removeClass(node: NodeOrString, classStr?: string | string[]): void; | |
|
1064 | ||
|
1065 | /** | |
|
1066 | * Replaces one or more classes on a node if not present. | |
|
1067 | * Operates more quickly than calling dojo.removeClass and dojo.addClass | |
|
1068 | */ | |
|
1069 | replaceClass(node: NodeOrString, addClassStr: string | string[], removeClassStr?: string | string[]): void; | |
|
1070 | ||
|
1071 | /** | |
|
1072 | * Adds a class to node if not present, or removes if present. | |
|
1073 | * Pass a boolean condition if you want to explicitly add or remove. | |
|
1074 | * Returns the condition that was specified directly or indirectly. | |
|
1075 | */ | |
|
1076 | toggleClass(node: NodeOrString, classStr: string | string[], condition?: boolean): boolean; | |
|
1077 | ||
|
1078 | /** | |
|
1079 | * instantiates an HTML fragment returning the corresponding DOM. | |
|
1080 | */ | |
|
1081 | toDom(frag: string, doc?: Document): DocumentFragment | Node; | |
|
1082 | ||
|
1083 | _toDom(frag: string, doc?: Document): DocumentFragment | Node; | |
|
1084 | ||
|
1085 | /** | |
|
1086 | * Attempt to insert node into the DOM, choosing from various positioning options. | |
|
1087 | * Returns the first argument resolved to a DOM node. | |
|
1088 | */ | |
|
1089 | place(node: NodeFragmentOrString, refNode: NodeOrString, position?: string /* PosString */ | number): HTMLElement; | |
|
1090 | ||
|
1091 | /** | |
|
1092 | * Create an element, allowing for optional attribute decoration | |
|
1093 | * and placement. | |
|
1094 | */ | |
|
1095 | create(tag: NodeOrString, attrs?: GenericObject, refNode?: NodeOrString, pos?: string /* PosString */ | number): HTMLElement; | |
|
1096 | ||
|
1097 | /** | |
|
1098 | * safely removes all children of the node. | |
|
1099 | */ | |
|
1100 | empty(node: NodeOrString): void; | |
|
1101 | ||
|
1102 | /** | |
|
1103 | * Removes a node from its parent, clobbering it and all of its | |
|
1104 | * children. | |
|
1105 | */ | |
|
1106 | destroy(node: NodeOrString): void; | |
|
1107 | ||
|
1108 | _destroyElement(node: NodeOrString): void; | |
|
1109 | ||
|
1110 | /** | |
|
1111 | * Returns object with special values specifically useful for node | |
|
1112 | * fitting. | |
|
1113 | */ | |
|
1114 | getPadExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1115 | ||
|
1116 | _getPadExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1117 | ||
|
1118 | /** | |
|
1119 | * returns an object with properties useful for noting the border | |
|
1120 | * dimensions. | |
|
1121 | */ | |
|
1122 | getBorderExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1123 | ||
|
1124 | _getBorderExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1125 | ||
|
1126 | /** | |
|
1127 | * Returns object with properties useful for box fitting with | |
|
1128 | * regards to padding. | |
|
1129 | */ | |
|
1130 | getPadBorderExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1131 | ||
|
1132 | _getPadBorderExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1133 | ||
|
1134 | /** | |
|
1135 | * returns object with properties useful for box fitting with | |
|
1136 | * regards to box margins (i.e., the outer-box). | |
|
1137 | * - l/t = marginLeft, marginTop, respectively | |
|
1138 | * - w = total width, margin inclusive | |
|
1139 | * - h = total height, margin inclusive | |
|
1140 | * The w/h are used for calculating boxes. | |
|
1141 | * Normally application code will not need to invoke this | |
|
1142 | * directly, and will use the ...box... functions instead. | |
|
1143 | */ | |
|
1144 | getMarginExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1145 | ||
|
1146 | _getMarginExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
1147 | ||
|
1148 | /** | |
|
1149 | * returns an object that encodes the width, height, left and top | |
|
1150 | * positions of the node's margin box. | |
|
1151 | */ | |
|
1152 | getMarginBox(node: Element, computedStyle?: DomComputedStyle): DomGeometryBox; | |
|
1153 | ||
|
1154 | _getMarginBox(node: Element, computedStyle?: DomComputedStyle): DomGeometryBox; | |
|
1155 | ||
|
1156 | /** | |
|
1157 | * Returns an object that encodes the width, height, left and top | |
|
1158 | * positions of the node's content box, irrespective of the | |
|
1159 | * current box model. | |
|
1160 | */ | |
|
1161 | getContentBox(node: Element, computedStyle?: DomComputedStyle): DomGeometryBox; | |
|
1162 | ||
|
1163 | _getContentBox(node: Element, computedStyle?: DomComputedStyle): DomGeometryBox; | |
|
1164 | ||
|
1165 | /** | |
|
1166 | * Sets the size of the node's contents, irrespective of margins, | |
|
1167 | * padding, or borders. | |
|
1168 | */ | |
|
1169 | setContentSize(node: Element, box: DomGeometryWidthHeight, computedStyle?: DomComputedStyle): void; | |
|
1170 | ||
|
1171 | /** | |
|
1172 | * sets the size of the node's margin box and placement | |
|
1173 | * (left/top), irrespective of box model. Think of it as a | |
|
1174 | * passthrough to setBox that handles box-model vagaries for | |
|
1175 | * you. | |
|
1176 | */ | |
|
1177 | setMarginBox(node: Element, box: DomGeometryBox, computedStyle?: DomComputedStyle): void; | |
|
1178 | ||
|
1179 | /** | |
|
1180 | * Returns true if the current language is left-to-right, and false otherwise. | |
|
1181 | */ | |
|
1182 | isBodyLtr(doc?: Document): boolean; | |
|
1183 | ||
|
1184 | _isBodyLtr(doc?: Document): boolean; | |
|
1185 | ||
|
1186 | /** | |
|
1187 | * Returns an object with {node, x, y} with corresponding offsets. | |
|
1188 | */ | |
|
1189 | docScroll(doc?: Document): Point; | |
|
1190 | ||
|
1191 | _docScroll(doc?: Document): Point; | |
|
1192 | ||
|
1193 | /** | |
|
1194 | * Deprecated method previously used for IE6-IE7. Now, just returns `{x:0, y:0}`. | |
|
1195 | */ | |
|
1196 | getIeDocumentElementOffset(doc: Document): Point; | |
|
1197 | ||
|
1198 | _getIeDocumentElementOffset(doc: Document): Point; | |
|
1199 | ||
|
1200 | /** | |
|
1201 | * In RTL direction, scrollLeft should be a negative value, but IE | |
|
1202 | * returns a positive one. All codes using documentElement.scrollLeft | |
|
1203 | * must call this function to fix this error, otherwise the position | |
|
1204 | * will offset to right when there is a horizontal scrollbar. | |
|
1205 | */ | |
|
1206 | fixIeBiDiScrollLeft(scrollLeft: number, doc?: Document): number; | |
|
1207 | ||
|
1208 | _fixIeBiDiScrollLeft(scrollLeft: number, doc?: Document): number; | |
|
1209 | ||
|
1210 | /** | |
|
1211 | * Gets the position and size of the passed element relative to | |
|
1212 | * the viewport (if includeScroll==false), or relative to the | |
|
1213 | * document root (if includeScroll==true). | |
|
1214 | */ | |
|
1215 | position(node: Element, includeScroll?: boolean): DomGeometryXYBox; | |
|
1216 | ||
|
1217 | /** | |
|
1218 | * returns an object that encodes the width and height of | |
|
1219 | * the node's margin box | |
|
1220 | */ | |
|
1221 | getMarginSize(node: Element, computedStyle?: DomComputedStyle): DomGeometryWidthHeight; | |
|
1222 | ||
|
1223 | _getMarginSize(node: Element, computedStyle?: DomComputedStyle): DomGeometryWidthHeight; | |
|
1224 | ||
|
1225 | /** | |
|
1226 | * Getter/setter for the margin-box of node. | |
|
1227 | */ | |
|
1228 | marginBox(node: Element): DomGeometryBox; | |
|
1229 | marginBox(node: Element, box: DomGeometryBox): void; | |
|
1230 | ||
|
1231 | /** | |
|
1232 | * Getter/setter for the content-box of node. | |
|
1233 | */ | |
|
1234 | contentBox(node: Element): DomGeometryBox; | |
|
1235 | contentBox(node: Element, box: DomGeometryWidthHeight): void; | |
|
1236 | ||
|
1237 | /** | |
|
1238 | * Deprecated: Use position() for border-box x/y/w/h | |
|
1239 | * or marginBox() for margin-box w/h/l/t. | |
|
1240 | */ | |
|
1241 | coords(node: NodeOrString, includeScroll?: boolean): CoordBox; | |
|
1242 | ||
|
1243 | /** | |
|
1244 | * Gets a property on an HTML element. | |
|
1245 | */ | |
|
1246 | getProp(node: ElementOrString, name: string): any; | |
|
1247 | ||
|
1248 | /** | |
|
1249 | * Sets a property on an HTML element. | |
|
1250 | */ | |
|
1251 | setProp(node: ElementOrString, name: string | Object, value?: any): Element; | |
|
1252 | ||
|
1253 | /** | |
|
1254 | * Gets or sets a property on an HTML element. | |
|
1255 | */ | |
|
1256 | prop(node: ElementOrString, name: string): string; | |
|
1257 | prop(node: ElementOrString, name: Object): Element; | |
|
1258 | prop(node: ElementOrString, name: string, value: any): Element; | |
|
1259 | ||
|
1260 | /** | |
|
1261 | * Returns a "computed style" object. | |
|
1262 | */ | |
|
1263 | getComputedStyle(node: Node): DomComputedStyle; | |
|
1264 | ||
|
1265 | /** | |
|
1266 | * Accesses styles on a node. | |
|
1267 | */ | |
|
1268 | getStyle(node: ElementOrString): DomComputedStyle; | |
|
1269 | getStyle(node: ElementOrString, name: string): string | number; | |
|
1270 | ||
|
1271 | /** | |
|
1272 | * Sets styles on a node. | |
|
1273 | */ | |
|
1274 | setStyle(node: ElementOrString, name: string | DomComputedStyle, value?: string): DomComputedStyle; | |
|
1275 | ||
|
1276 | /** | |
|
1277 | * converts style value to pixels on IE or return a numeric value. | |
|
1278 | */ | |
|
1279 | toPixelValue(element: Element, value: string): number; | |
|
1280 | ||
|
1281 | __toPixelValue(element: Element, value: string): number; | |
|
1282 | ||
|
1283 | /** | |
|
1284 | * Accesses styles on a node. If 2 arguments are | |
|
1285 | * passed, acts as a getter. If 3 arguments are passed, acts | |
|
1286 | * as a setter. | |
|
1287 | */ | |
|
1288 | style(node: ElementOrString): DomComputedStyle; | |
|
1289 | style(node: ElementOrString, name: string): string | number; | |
|
1290 | style(node: ElementOrString, name: DomComputedStyle): DomComputedStyle; | |
|
1291 | style(node: ElementOrString, name: string, value: string): DomComputedStyle; | |
|
1292 | } | |
|
1293 | ||
|
1294 | /* dojo/_base/json */ | |
|
1295 | ||
|
1296 | interface Dojo { | |
|
1297 | /** | |
|
1298 | * Parses a JavaScript expression and returns a JavaScript value. | |
|
1299 | */ | |
|
1300 | fromJson(js: string): any; | |
|
1301 | ||
|
1302 | _escapeString(value: any, replacer?: (key: string, value: any) => any | any[], space?: string | number): string; | |
|
1303 | ||
|
1304 | toJsonIndentStr: string; | |
|
1305 | ||
|
1306 | toJson(it: any, prettyPrint?: boolean): string; | |
|
1307 | } | |
|
1308 | ||
|
1309 | /* dojo/_base/kernel */ | |
|
1310 | ||
|
1311 | interface Dojo { | |
|
1312 | config: Config; | |
|
1313 | global: any; | |
|
1314 | dijit: dijit.Dijit; | |
|
1315 | dojox: dojox.DojoX; | |
|
1316 | ||
|
1317 | /** | |
|
1318 | * a map from a name used in a legacy module to the (global variable name, object addressed by that name) | |
|
1319 | * always map dojo, dijit, and dojox | |
|
1320 | */ | |
|
1321 | scopeMap: { | |
|
1322 | [scope: string]: [string, any]; | |
|
1323 | dojo: [string, Dojo]; | |
|
1324 | dijit: [string, dijit.Dijit]; | |
|
1325 | dojox: [string, dojox.DojoX]; | |
|
1326 | }; | |
|
1327 | ||
|
1328 | baseUrl: string; | |
|
1329 | isAsync: boolean; | |
|
1330 | locale: string; | |
|
1331 | version: { | |
|
1332 | major: number; | |
|
1333 | minor: number; | |
|
1334 | patch: number; | |
|
1335 | flag: string; | |
|
1336 | revision: number; | |
|
1337 | toString(): string; | |
|
1338 | }; | |
|
1339 | ||
|
1340 | /** | |
|
1341 | * A legacy method created for use exclusively by internal Dojo methods. Do not use this method | |
|
1342 | * directly unless you understand its possibly-different implications on the platforms your are targeting. | |
|
1343 | */ | |
|
1344 | eval(scriptText: string): any; | |
|
1345 | ||
|
1346 | exit(exitcode?: number): void; | |
|
1347 | ||
|
1348 | /** | |
|
1349 | * Log a debug message to indicate that a behavior has been | |
|
1350 | * deprecated. | |
|
1351 | */ | |
|
1352 | deprecated(behaviour: string, extra?: string, removal?: string): void; | |
|
1353 | ||
|
1354 | /** | |
|
1355 | * Marks code as experimental. | |
|
1356 | */ | |
|
1357 | experimental(moduleName: string, extra?: string): void; | |
|
1358 | ||
|
1359 | /** | |
|
1360 | * Returns a URL relative to a module. | |
|
1361 | */ | |
|
1362 | moduleUrl(module: string, url?: string): any; | |
|
1363 | ||
|
1364 | /** | |
|
1365 | * for backward compatibility with layers built with 1.6 tooling | |
|
1366 | */ | |
|
1367 | _hasResource: any; | |
|
1368 | } | |
|
1369 | ||
|
1370 | /* dojo/_base/lang */ | |
|
1371 | ||
|
1372 | interface ReplaceCallback { | |
|
1373 | (match: string, name: string, offset: number, tmpl: string): string; | |
|
1374 | } | |
|
1375 | ||
|
1376 | interface Lang { | |
|
1377 | /** | |
|
1378 | * Lists property names that must be explicitly processed during for-in iteration | |
|
1379 | * in environments that have has("bug-for-in-skips-shadowed") true. | |
|
1380 | */ | |
|
1381 | _extraNames: string[]; | |
|
1382 | ||
|
1383 | /** | |
|
1384 | * Copies/adds all properties of one or more sources to dest; returns dest. | |
|
1385 | */ | |
|
1386 | _mixin<T, U>(dest: T, source: U, copyFunc?: (s: any) => any): T & U; | |
|
1387 | ||
|
1388 | /** | |
|
1389 | * Copies/adds all properties of one or more sources to dest; returns dest. | |
|
1390 | */ | |
|
1391 | mixin<T, U>(dest: T, sources: U): T & U; | |
|
1392 | mixin<T, U, V>(dest: T, source1: U, source2: V): T & U & V; | |
|
1393 | mixin<T, U, V, W>(dest: T, source1: U, source2: V, source3: W): T & U & V & W; | |
|
1394 | mixin<T, U, V, W, X>(dest: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X; | |
|
1395 | mixin<T, U, V, W, X, Y>(dest: T, source1: U, source2: V, source3: W, source4: X, source5: Y): T & U & V & W & X & Y; | |
|
1396 | mixin<T, U, V, W, X, Y, Z>(dest: T, source1: U, source2: V, source3: W, source4: X, source5: Y, source6: Z): T & U & V & W & X & Y & Z; | |
|
1397 | mixin<T, U>(dest: T, ...sources: U[]): T & U; | |
|
1398 | ||
|
1399 | /** | |
|
1400 | * Set a property from a dot-separated string, such as "A.B.C" | |
|
1401 | */ | |
|
1402 | setObject(name: string, value: any, context?: any): any; | |
|
1403 | ||
|
1404 | /** | |
|
1405 | * Get a property from a dot-separated string, such as "A.B.C" | |
|
1406 | */ | |
|
1407 | getObject<T>(name: string, create?: boolean, context?: any): T; | |
|
1408 | ||
|
1409 | /** | |
|
1410 | * determine if an object supports a given method | |
|
1411 | */ | |
|
1412 | exists(name: string, obj?: any): boolean; | |
|
1413 | ||
|
1414 | /** | |
|
1415 | * Return true if it is a String | |
|
1416 | */ | |
|
1417 | isString(it: any): it is string; | |
|
1418 | ||
|
1419 | /** | |
|
1420 | * Return true if it is an Array. | |
|
1421 | */ | |
|
1422 | isArray(it: any): it is any[]; | |
|
1423 | ||
|
1424 | /** | |
|
1425 | * Return true if it is a Function | |
|
1426 | */ | |
|
1427 | isFunction(it: any): it is Function; | |
|
1428 | ||
|
1429 | /** | |
|
1430 | * Returns true if it is a JavaScript object (or an Array, a Function | |
|
1431 | * or null) | |
|
1432 | */ | |
|
1433 | isObject(it: any): it is { [id: string]: any; }; | |
|
1434 | ||
|
1435 | /** | |
|
1436 | * similar to isArray() but more permissive | |
|
1437 | */ | |
|
1438 | isArrayLike(it: any): boolean; | |
|
1439 | ||
|
1440 | /** | |
|
1441 | * Returns true if it is a built-in function or some other kind of | |
|
1442 | * oddball that *should* report as a function but doesn't | |
|
1443 | */ | |
|
1444 | isAlien(it: any): boolean; | |
|
1445 | ||
|
1446 | /** | |
|
1447 | * Adds all properties and methods of props to constructor's | |
|
1448 | * prototype, making them available to all instances created with | |
|
1449 | * constructor. | |
|
1450 | */ | |
|
1451 | extend<T, U>(ctor: GenericConstructor<T>, props: U): GenericConstructor<T & U>; | |
|
1452 | ||
|
1453 | _hitchArgs<T extends Function>(scope: any, method: T): T; | |
|
1454 | ||
|
1455 | /** | |
|
1456 | * Returns a function that will only ever execute in the given scope. | |
|
1457 | * This allows for easy use of object member functions | |
|
1458 | * in callbacks and other places in which the "this" keyword may | |
|
1459 | * otherwise not reference the expected scope. | |
|
1460 | * Any number of default positional arguments may be passed as parameters | |
|
1461 | * beyond "method". | |
|
1462 | * Each of these values will be used to "placehold" (similar to curry) | |
|
1463 | * for the hitched function. | |
|
1464 | */ | |
|
1465 | hitch(method: string): Function; | |
|
1466 | hitch<T extends Function>(method: T): T; | |
|
1467 | hitch<T extends Function>(scope: any, method: T): T; | |
|
1468 | hitch<T extends Function>(scope: any, method: string | Function, ...args: any[]): T; | |
|
1469 | ||
|
1470 | /** | |
|
1471 | * Returns a new object which "looks" to obj for properties which it | |
|
1472 | * does not have a value for. Optionally takes a bag of properties to | |
|
1473 | * seed the returned object with initially. | |
|
1474 | */ | |
|
1475 | delegate<T, U>(obj: T, props?: U): T & U; | |
|
1476 | ||
|
1477 | /** | |
|
1478 | * Converts an array-like object (i.e. arguments, DOMCollection) to an | |
|
1479 | * array. Returns a new Array with the elements of obj. | |
|
1480 | */ | |
|
1481 | _toArray(obj: any, offset?: number, startWith?: any[]): any[]; | |
|
1482 | ||
|
1483 | /** | |
|
1484 | * similar to hitch() except that the scope object is left to be | |
|
1485 | * whatever the execution context eventually becomes. | |
|
1486 | */ | |
|
1487 | partial<U extends Function>(method: Function | string, ...args: any[]): U; | |
|
1488 | ||
|
1489 | /** | |
|
1490 | * Clones objects (including DOM nodes) and all children. | |
|
1491 | * Warning: do not clone cyclic structures. | |
|
1492 | */ | |
|
1493 | clone<T>(src: T): T; | |
|
1494 | ||
|
1495 | /** | |
|
1496 | * Trims whitespace from both sides of the string | |
|
1497 | */ | |
|
1498 | trim(str: string): string; | |
|
1499 | ||
|
1500 | /** | |
|
1501 | * Performs parameterized substitutions on a string. Throws an | |
|
1502 | * exception if any parameter is unmatched. | |
|
1503 | */ | |
|
1504 | replace(tmpl: string, map: GenericObject | ReplaceCallback, pattern?: RegExp): string; | |
|
1505 | } | |
|
1506 | ||
|
1507 | /* dojo/_base/loader */ | |
|
1508 | ||
|
1509 | interface Loader { | |
|
1510 | extractLegacyApiApplications(text: string, noCommentText?: string): any; | |
|
1511 | require(mid: string, require: any, loaded: (...modules: any[]) => void): void; | |
|
1512 | loadInit(mid: string, require: any, loaded: (...modules: any[]) => void): void; | |
|
1513 | } | |
|
1514 | ||
|
1515 | /* TODO: dojo/_base/NodeList only extends query.NodeList */ | |
|
1516 | ||
|
1517 | /* dojo/_base/query aliases dojo/query */ | |
|
1518 | ||
|
1519 | /* dojo/_base/sniff */ | |
|
1520 | interface Dojo { | |
|
1521 | /** | |
|
1522 | * True if the client is a web-browser | |
|
1523 | */ | |
|
1524 | isBrowser: boolean; | |
|
1525 | ||
|
1526 | /** | |
|
1527 | * Version as a Number if client is FireFox. undefined otherwise. Corresponds to | |
|
1528 | * major detected FireFox version (1.5, 2, 3, etc.) | |
|
1529 | */ | |
|
1530 | isFF: number; | |
|
1531 | ||
|
1532 | /** | |
|
1533 | * Version as a Number if client is MSIE(PC). undefined otherwise. Corresponds to | |
|
1534 | * major detected IE version (6, 7, 8, etc.) | |
|
1535 | */ | |
|
1536 | isIE: number; | |
|
1537 | ||
|
1538 | /** | |
|
1539 | * Version as a Number if client is a KHTML browser. undefined otherwise. Corresponds to major | |
|
1540 | * detected version. | |
|
1541 | */ | |
|
1542 | isKhtml: number; | |
|
1543 | ||
|
1544 | /** | |
|
1545 | * Version as a Number if client is a WebKit-derived browser (Konqueror, | |
|
1546 | * Safari, Chrome, etc.). undefined otherwise. | |
|
1547 | */ | |
|
1548 | isWebKit: number; | |
|
1549 | ||
|
1550 | /** | |
|
1551 | * Version as a Number if client is a Mozilla-based browser (Firefox, | |
|
1552 | * SeaMonkey). undefined otherwise. Corresponds to major detected version. | |
|
1553 | */ | |
|
1554 | isMozilla: number; | |
|
1555 | ||
|
1556 | /** | |
|
1557 | * Version as a Number if client is a Mozilla-based browser (Firefox, | |
|
1558 | * SeaMonkey). undefined otherwise. Corresponds to major detected version. | |
|
1559 | */ | |
|
1560 | isMoz: number; | |
|
1561 | ||
|
1562 | /** | |
|
1563 | * Version as a Number if client is Opera. undefined otherwise. Corresponds to | |
|
1564 | * major detected version. | |
|
1565 | */ | |
|
1566 | isOpera: number; | |
|
1567 | ||
|
1568 | /** | |
|
1569 | * Version as a Number if client is Safari or iPhone. undefined otherwise. | |
|
1570 | */ | |
|
1571 | isSafari: number; | |
|
1572 | ||
|
1573 | /** | |
|
1574 | * Version as a Number if client is Chrome browser. undefined otherwise. | |
|
1575 | */ | |
|
1576 | isChrome: number; | |
|
1577 | ||
|
1578 | /** | |
|
1579 | * True if the client runs on Mac | |
|
1580 | */ | |
|
1581 | isMac: number; | |
|
1582 | ||
|
1583 | /** | |
|
1584 | * Version as a Number if client is iPhone, iPod, or iPad. undefined otherwise. | |
|
1585 | */ | |
|
1586 | isIos: number; | |
|
1587 | ||
|
1588 | /** | |
|
1589 | * Version as a Number if client is android browser. undefined otherwise. | |
|
1590 | */ | |
|
1591 | isAndroid: number; | |
|
1592 | ||
|
1593 | /** | |
|
1594 | * True if client is Wii | |
|
1595 | */ | |
|
1596 | isWii: boolean; | |
|
1597 | ||
|
1598 | /** | |
|
1599 | * Page is in quirks mode. | |
|
1600 | */ | |
|
1601 | isQuirks: boolean; | |
|
1602 | ||
|
1603 | /** | |
|
1604 | * True if client is Adobe Air | |
|
1605 | */ | |
|
1606 | isAir: boolean; | |
|
1607 | } | |
|
1608 | ||
|
1609 | /* dojo/_base/unload */ | |
|
1610 | ||
|
1611 | interface Unload { | |
|
1612 | /** | |
|
1613 | * Registers a function to be triggered when window.onunload fires. | |
|
1614 | * Deprecated, use on(window, "unload", lang.hitch(obj, functionName)) instead. | |
|
1615 | */ | |
|
1616 | addOnWindowUnload(obj: GenericObject | Function, functionName?: string | Function): void; | |
|
1617 | ||
|
1618 | /** | |
|
1619 | * Registers a function to be triggered when the page unloads. | |
|
1620 | * Deprecated, use on(window, "beforeunload", lang.hitch(obj, functionName)) | |
|
1621 | */ | |
|
1622 | addOnUnload(obj: GenericObject | Function, functionName?: string | Function): void; | |
|
1623 | } | |
|
1624 | ||
|
1625 | /* dojo/_base/url */ | |
|
1626 | ||
|
1627 | interface Url { | |
|
1628 | uri: string; | |
|
1629 | scheme: string; | |
|
1630 | authority: string; | |
|
1631 | path: string; | |
|
1632 | query: string; | |
|
1633 | fragment: string; | |
|
1634 | user?: string; | |
|
1635 | password?: string; | |
|
1636 | host?: string; | |
|
1637 | port?: string; | |
|
1638 | toString(): string; | |
|
1639 | } | |
|
1640 | ||
|
1641 | interface UrlConstructor { | |
|
1642 | new (...args: any[]): Url; | |
|
1643 | prototype: Url; | |
|
1644 | } | |
|
1645 | ||
|
1646 | /* dojo/_base/window */ | |
|
1647 | ||
|
1648 | interface Window { | |
|
1649 | /** | |
|
1650 | * Alias for the current window. 'global' can be modified | |
|
1651 | * for temporary context shifting. See also withGlobal(). | |
|
1652 | */ | |
|
1653 | global: any; | |
|
1654 | ||
|
1655 | /** | |
|
1656 | * Alias for the current document. 'doc' can be modified | |
|
1657 | * for temporary context shifting. See also withDoc(). | |
|
1658 | */ | |
|
1659 | doc: Document; | |
|
1660 | ||
|
1661 | /** | |
|
1662 | * Return the body element of the specified document or of dojo/_base/window::doc. | |
|
1663 | */ | |
|
1664 | body(doc?: Document): HTMLBodyElement; | |
|
1665 | ||
|
1666 | /** | |
|
1667 | * changes the behavior of many core Dojo functions that deal with | |
|
1668 | * namespace and DOM lookup, changing them to work in a new global | |
|
1669 | * context (e.g., an iframe). The varibles dojo.global and dojo.doc | |
|
1670 | * are modified as a result of calling this function and the result of | |
|
1671 | * `dojo.body()` likewise differs. | |
|
1672 | */ | |
|
1673 | setContext(globalObject: GenericObject, globalDocument: Document): void; | |
|
1674 | ||
|
1675 | /** | |
|
1676 | * Invoke callback with globalObject as dojo.global and | |
|
1677 | * globalObject.document as dojo.doc. | |
|
1678 | */ | |
|
1679 | withGlobal<T>(globalObject: GenericObject, callback: GenericFunction<T>, thisObject?: Object, cbArguments?: any[]): T; | |
|
1680 | ||
|
1681 | /** | |
|
1682 | * Invoke callback with documentObject as dojo/_base/window::doc. | |
|
1683 | */ | |
|
1684 | withDoc<T>(documentObject: Document, callback: GenericFunction<T>, thisObject?: Object, cbArguments?: any[]): T; | |
|
1685 | } | |
|
1686 | ||
|
1687 | /* dojo/_base/xhr */ | |
|
1688 | ||
|
1689 | interface IoArgs { | |
|
1690 | /** | |
|
1691 | * URL to server endpoint. | |
|
1692 | */ | |
|
1693 | url: string; | |
|
1694 | ||
|
1695 | /** | |
|
1696 | * Contains properties with string values. These | |
|
1697 | * properties will be serialized as name1=value2 and | |
|
1698 | * passed in the request. | |
|
1699 | */ | |
|
1700 | content?: GenericObject; | |
|
1701 | ||
|
1702 | /** | |
|
1703 | * Milliseconds to wait for the response. If this time | |
|
1704 | * passes, the then error callbacks are called. | |
|
1705 | */ | |
|
1706 | timeout?: number; | |
|
1707 | ||
|
1708 | /** | |
|
1709 | * DOM node for a form. Used to extract the form values | |
|
1710 | * and send to the server. | |
|
1711 | */ | |
|
1712 | form?: HTMLFormElement; | |
|
1713 | ||
|
1714 | /** | |
|
1715 | * Default is false. If true, then a | |
|
1716 | * "dojo.preventCache" parameter is sent in the requesa | |
|
1717 | * with a value that changes with each requesa | |
|
1718 | * (timestamp). Useful only with GET-type requests. | |
|
1719 | */ | |
|
1720 | preventCache?: boolean; | |
|
1721 | ||
|
1722 | /** | |
|
1723 | * Acceptable values depend on the type of IO | |
|
1724 | * transport (see specific IO calls for more information). | |
|
1725 | */ | |
|
1726 | handleAs?: string; | |
|
1727 | ||
|
1728 | /** | |
|
1729 | * Sets the raw body for an HTTP request. If this is used, then the content | |
|
1730 | * property is ignored. This is mostly useful for HTTP methods that have | |
|
1731 | * a body to their requests, like PUT or POST. This property can be used instead | |
|
1732 | * of postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively. | |
|
1733 | */ | |
|
1734 | rawBody?: string; | |
|
1735 | ||
|
1736 | /** | |
|
1737 | * Set this explicitly to false to prevent publishing of topics related to | |
|
1738 | * IO operations. Otherwise, if djConfig.ioPublish is set to true, topics | |
|
1739 | * will be published via dojo/topic.publish() for different phases of an IO operation. | |
|
1740 | * See dojo/main.__IoPublish for a list of topics that are published. | |
|
1741 | */ | |
|
1742 | ioPublish?: boolean; | |
|
1743 | ||
|
1744 | /** | |
|
1745 | * This function will be | |
|
1746 | * called on a successful HTTP response code. | |
|
1747 | */ | |
|
1748 | load?: (response: any, ioArgs: IoCallbackArgs) => void; | |
|
1749 | ||
|
1750 | /** | |
|
1751 | * This function will | |
|
1752 | * be called when the request fails due to a network or server error, the url | |
|
1753 | * is invalid, etc. It will also be called if the load or handle callback throws an | |
|
1754 | * exception, unless djConfig.debugAtAllCosts is true. This allows deployed applications | |
|
1755 | * to continue to run even when a logic error happens in the callback, while making | |
|
1756 | * it easier to troubleshoot while in debug mode. | |
|
1757 | */ | |
|
1758 | error?: (response: any, ioArgs: IoCallbackArgs) => void; | |
|
1759 | ||
|
1760 | /** | |
|
1761 | * This function will | |
|
1762 | * be called at the end of every request, whether or not an error occurs. | |
|
1763 | */ | |
|
1764 | handle?: (loadOrError: string, response: any, ioArgs: IoCallbackArgs) => void; | |
|
1765 | } | |
|
1766 | ||
|
1767 | interface IoCallbackArgs { | |
|
1768 | /** | |
|
1769 | * the original object argument to the IO call. | |
|
1770 | */ | |
|
1771 | args: GenericObject; | |
|
1772 | ||
|
1773 | /** | |
|
1774 | * For XMLHttpRequest calls only, the | |
|
1775 | * XMLHttpRequest object that was used for the | |
|
1776 | * request. | |
|
1777 | */ | |
|
1778 | xhr: XMLHttpRequest; | |
|
1779 | ||
|
1780 | /** | |
|
1781 | * The final URL used for the call. Many times it | |
|
1782 | * will be different than the original args.url | |
|
1783 | * value. | |
|
1784 | */ | |
|
1785 | url: string; | |
|
1786 | ||
|
1787 | /** | |
|
1788 | * For non-GET requests, the | |
|
1789 | * name1=value1&name2=value2 parameters sent up in | |
|
1790 | * the request. | |
|
1791 | */ | |
|
1792 | query: string; | |
|
1793 | ||
|
1794 | /** | |
|
1795 | * The final indicator on how the response will be | |
|
1796 | * handled. | |
|
1797 | */ | |
|
1798 | handleAs: string; | |
|
1799 | ||
|
1800 | /** | |
|
1801 | * For dojo/io/script calls only, the internal | |
|
1802 | * script ID used for the request. | |
|
1803 | */ | |
|
1804 | id?: string; | |
|
1805 | ||
|
1806 | /** | |
|
1807 | * For dojo/io/script calls only, indicates | |
|
1808 | * whether the script tag that represents the | |
|
1809 | * request can be deleted after callbacks have | |
|
1810 | * been called. Used internally to know when | |
|
1811 | * cleanup can happen on JSONP-type requests. | |
|
1812 | */ | |
|
1813 | canDelete?: boolean; | |
|
1814 | ||
|
1815 | /** | |
|
1816 | * For dojo/io/script calls only: holds the JSON | |
|
1817 | * response for JSONP-type requests. Used | |
|
1818 | * internally to hold on to the JSON responses. | |
|
1819 | * You should not need to access it directly -- | |
|
1820 | * the same object should be passed to the success | |
|
1821 | * callbacks directly. | |
|
1822 | */ | |
|
1823 | json?: GenericObject; | |
|
1824 | } | |
|
1825 | ||
|
1826 | interface XhrArgs extends IoArgs { | |
|
1827 | /** | |
|
1828 | * Acceptable values are: text (default), json, json-comment-optional, | |
|
1829 | * json-comment-filtered, javascript, xml. See `dojo/_base/xhr.contentHandlers` | |
|
1830 | */ | |
|
1831 | handleAs?: string; | |
|
1832 | ||
|
1833 | /** | |
|
1834 | * false is default. Indicates whether the request should | |
|
1835 | * be a synchronous (blocking) request. | |
|
1836 | */ | |
|
1837 | sync?: boolean; | |
|
1838 | ||
|
1839 | /** | |
|
1840 | * Additional HTTP headers to send in the request. | |
|
1841 | */ | |
|
1842 | headers?: GenericObject; | |
|
1843 | ||
|
1844 | /** | |
|
1845 | * false is default. Indicates whether a request should be | |
|
1846 | * allowed to fail (and therefore no console error message in | |
|
1847 | * the event of a failure) | |
|
1848 | */ | |
|
1849 | failOk?: boolean; | |
|
1850 | ||
|
1851 | /** | |
|
1852 | * "application/x-www-form-urlencoded" is default. Set to false to | |
|
1853 | * prevent a Content-Type header from being sent, or to a string | |
|
1854 | * to send a different Content-Type. | |
|
1855 | */ | |
|
1856 | contentType?: boolean | string; | |
|
1857 | } | |
|
1858 | ||
|
1859 | interface ContentHandlers { | |
|
1860 | [type: string]: (xhr: { responseText?: string, responseXML?: string }) => any; | |
|
1861 | 'text': (xhr: { responseText: string }) => string; | |
|
1862 | 'json': (xhr: { responseText: string }) => GenericObject; | |
|
1863 | 'json-comment-filtered': (xhr: { responseText: string }) => GenericObject; | |
|
1864 | 'javascript': (xhr: { responseText: string }) => any; | |
|
1865 | 'xml': (xhr: { responseXML: string }) => Document; | |
|
1866 | 'json-comment-optional': (xhr: { responseText: string }) => GenericObject; | |
|
1867 | } | |
|
1868 | ||
|
1869 | interface Xhr { | |
|
1870 | (method: string, args: XhrArgs, hasBody?: boolean): Deferred<any>; | |
|
1871 | ||
|
1872 | /** | |
|
1873 | * does the work of portably generating a new XMLHTTPRequest object. | |
|
1874 | */ | |
|
1875 | _xhrObj(): XMLHttpRequest | ActiveXObject; | |
|
1876 | ||
|
1877 | /** | |
|
1878 | * Serialize a form field to a JavaScript object. | |
|
1879 | */ | |
|
1880 | fieldToObject(inputNode: HTMLElement | string): GenericObject; | |
|
1881 | ||
|
1882 | /** | |
|
1883 | * Serialize a form node to a JavaScript object. | |
|
1884 | */ | |
|
1885 | formToObject(fromNode: HTMLFormElement | string): GenericObject; | |
|
1886 | ||
|
1887 | /** | |
|
1888 | * takes a name/value mapping object and returns a string representing | |
|
1889 | * a URL-encoded version of that object. | |
|
1890 | */ | |
|
1891 | objectToQuery(map: GenericObject): string; | |
|
1892 | ||
|
1893 | /** | |
|
1894 | * Returns a URL-encoded string representing the form passed as either a | |
|
1895 | * node or string ID identifying the form to serialize | |
|
1896 | */ | |
|
1897 | formToQuery(fromNode: HTMLFormElement | string): string; | |
|
1898 | ||
|
1899 | /** | |
|
1900 | * Create a serialized JSON string from a form node or string | |
|
1901 | * ID identifying the form to serialize | |
|
1902 | */ | |
|
1903 | formToJson(formNode: HTMLFormElement | string): string; | |
|
1904 | ||
|
1905 | /** | |
|
1906 | * Create an object representing a de-serialized query section of a | |
|
1907 | * URL. Query keys with multiple values are returned in an array. | |
|
1908 | */ | |
|
1909 | queryToObject(str: string): GenericObject; | |
|
1910 | ||
|
1911 | /** | |
|
1912 | * A map of available XHR transport handle types. Name matches the | |
|
1913 | * `handleAs` attribute passed to XHR calls. | |
|
1914 | */ | |
|
1915 | contentHandlers: ContentHandlers; | |
|
1916 | ||
|
1917 | _ioCancelAll(): void; | |
|
1918 | ||
|
1919 | /** | |
|
1920 | * If dojo.publish is available, publish topics | |
|
1921 | * about the start of a request queue and/or the | |
|
1922 | * the beginning of request. | |
|
1923 | * | |
|
1924 | * Used by IO transports. An IO transport should | |
|
1925 | * call this method before making the network connection. | |
|
1926 | */ | |
|
1927 | _ioNotifyStart<T>(dfd: dojo.request.Promise<T>): void; | |
|
1928 | ||
|
1929 | /** | |
|
1930 | * Watches the io request represented by dfd to see if it completes. | |
|
1931 | */ | |
|
1932 | _ioWatch<T>(dfd: dojo.request.Promise<T>, validCheck: Function, ioCheck: Function, resHandle: Function): void; | |
|
1933 | ||
|
1934 | /** | |
|
1935 | * Adds query params discovered by the io deferred construction to the URL. | |
|
1936 | * Only use this for operations which are fundamentally GET-type operations. | |
|
1937 | */ | |
|
1938 | _ioAddQueryToUrl(ioArgs: IoCallbackArgs): void; | |
|
1939 | ||
|
1940 | /** | |
|
1941 | * sets up the Deferred and ioArgs property on the Deferred so it | |
|
1942 | * can be used in an io call. | |
|
1943 | */ | |
|
1944 | _ioSetArgs(args: IoArgs, canceller: Function, okHandler: Function, errHandler: Function): dojo.Deferred<any>; | |
|
1945 | ||
|
1946 | _isDocumentOk(x: Document): boolean; | |
|
1947 | ||
|
1948 | _getText(url: string): string; | |
|
1949 | ||
|
1950 | /** | |
|
1951 | * Send an HTTP GET request using the default transport for the current platform. | |
|
1952 | */ | |
|
1953 | get<T>(options: XhrArgs): dojo.request.Promise<T>; | |
|
1954 | ||
|
1955 | /** | |
|
1956 | * Send an HTTP POST request using the default transport for the current platform. | |
|
1957 | */ | |
|
1958 | post<T>(options: XhrArgs): dojo.request.Promise<T>; | |
|
1959 | ||
|
1960 | /** | |
|
1961 | * Send an HTTP PUT request using the default transport for the current platform. | |
|
1962 | */ | |
|
1963 | put<T>(options: XhrArgs): dojo.request.Promise<T>; | |
|
1964 | ||
|
1965 | /** | |
|
1966 | * Send an HTTP DELETE request using the default transport for the current platform. | |
|
1967 | */ | |
|
1968 | del<T>(options: XhrArgs): dojo.request.Promise<T>; | |
|
1969 | } | |
|
1970 | } | |
|
1971 | ||
|
1972 | /* dojo/_base/NodeList */ | |
|
1973 | ||
|
1974 | interface NodeList<T extends Node> { | |
|
1975 | /** | |
|
1976 | * Attach event handlers to every item of the NodeList. Uses dojo.connect() | |
|
1977 | * so event properties are normalized. | |
|
1978 | */ | |
|
1979 | connect(method: string, objOrFunc: EventListener | string): this; | |
|
1980 | connect(method: string, objOrFunc: Object, funcName: string): this; | |
|
1981 | ||
|
1982 | /** | |
|
1983 | * Deprecated: Use position() for border-box x/y/w/h | |
|
1984 | * or marginBox() for margin-box w/h/l/t. | |
|
1985 | * Returns the box objects of all elements in a node list as | |
|
1986 | * an Array (*not* a NodeList). Acts like `domGeom.coords`, though assumes | |
|
1987 | * the node passed is each node in this list. | |
|
1988 | */ | |
|
1989 | coords(node: NodeOrString, includeScroll?: boolean): _base.CoordBox[]; | |
|
1990 | ||
|
1991 | onblur(method: string, objOrFunc: EventListener | string): this; | |
|
1992 | onblur(method: string, objOrFunc: Object, funcName: string): this; | |
|
1993 | ||
|
1994 | onfocus(method: string, objOrFunc: EventListener | string): this; | |
|
1995 | onfocus(method: string, objOrFunc: Object, funcName: string): this; | |
|
1996 | ||
|
1997 | onchange(method: string, objOrFunc: EventListener | string): this; | |
|
1998 | onchange(method: string, objOrFunc: Object, funcName: string): this; | |
|
1999 | ||
|
2000 | onclick(method: string, objOrFunc: EventListener | string): this; | |
|
2001 | onclick(method: string, objOrFunc: Object, funcName: string): this; | |
|
2002 | ||
|
2003 | onerror(method: string, objOrFunc: EventListener | string): this; | |
|
2004 | onerror(method: string, objOrFunc: Object, funcName: string): this; | |
|
2005 | ||
|
2006 | onkeydown(method: string, objOrFunc: EventListener | string): this; | |
|
2007 | onkeydown(method: string, objOrFunc: Object, funcName: string): this; | |
|
2008 | ||
|
2009 | onkeypress(method: string, objOrFunc: EventListener | string): this; | |
|
2010 | onkeypress(method: string, objOrFunc: Object, funcName: string): this; | |
|
2011 | ||
|
2012 | onkeyup(method: string, objOrFunc: EventListener | string): this; | |
|
2013 | onkeyup(method: string, objOrFunc: Object, funcName: string): this; | |
|
2014 | ||
|
2015 | onload(method: string, objOrFunc: EventListener | string): this; | |
|
2016 | onload(method: string, objOrFunc: Object, funcName: string): this; | |
|
2017 | ||
|
2018 | ondown(method: string, objOrFunc: EventListener | string): this; | |
|
2019 | ondown(method: string, objOrFunc: Object, funcName: string): this; | |
|
2020 | ||
|
2021 | onmouseenter(method: string, objOrFunc: EventListener | string): this; | |
|
2022 | onmouseenter(method: string, objOrFunc: Object, funcName: string): this; | |
|
2023 | ||
|
2024 | onmouseleave(method: string, objOrFunc: EventListener | string): this; | |
|
2025 | onmouseleave(method: string, objOrFunc: Object, funcName: string): this; | |
|
2026 | ||
|
2027 | onmousemove(method: string, objOrFunc: EventListener | string): this; | |
|
2028 | onmousemove(method: string, objOrFunc: Object, funcName: string): this; | |
|
2029 | ||
|
2030 | onmouseout(method: string, objOrFunc: EventListener | string): this; | |
|
2031 | onmouseout(method: string, objOrFunc: Object, funcName: string): this; | |
|
2032 | ||
|
2033 | onmouseover(method: string, objOrFunc: EventListener | string): this; | |
|
2034 | onmouseover(method: string, objOrFunc: Object, funcName: string): this; | |
|
2035 | ||
|
2036 | onmouseup(method: string, objOrFunc: EventListener | string): this; | |
|
2037 | onmouseup(method: string, objOrFunc: Object, funcName: string): this; | |
|
2038 | ||
|
2039 | onsubmit(method: string, objOrFunc: EventListener | string): this; | |
|
2040 | onsubmit(method: string, objOrFunc: Object, funcName: string): this; | |
|
2041 | } | |
|
2042 | ||
|
2043 | interface NodeListConstructor { | |
|
2044 | events: string[]; | |
|
2045 | } | |
|
2046 | ||
|
2047 | namespace _base { | |
|
2048 | interface Dojo { | |
|
2049 | NodeList: NodeListConstructor; | |
|
2050 | } | |
|
2051 | } | |
|
2052 | } |
@@ -0,0 +1,29 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace cldr { | |
|
3 | interface Monetary { | |
|
4 | /** | |
|
5 | * A mapping of currency code to currency-specific formatting information. Returns a unique object with properties: places, round. | |
|
6 | * code: | |
|
7 | * an [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code | |
|
8 | * | |
|
9 | * from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/currencyData/fractions | |
|
10 | */ | |
|
11 | getData(code: string): { places: number, round: number }; | |
|
12 | } | |
|
13 | ||
|
14 | interface Supplemental { | |
|
15 | ||
|
16 | /** | |
|
17 | * Returns a zero-based index for first day of the week | |
|
18 | */ | |
|
19 | getFirstDayOfWeek(locale?: string): number; | |
|
20 | ||
|
21 | _region(locale?: string): string; | |
|
22 | ||
|
23 | /** | |
|
24 | * Returns a hash containing the start and end days of the weekend | |
|
25 | */ | |
|
26 | getWeekend(locale?: string): { start: number, end: number }; | |
|
27 | } | |
|
28 | } | |
|
29 | } |
This diff has been collapsed as it changes many lines, (934 lines changed) Show them Hide them | |||
@@ -0,0 +1,934 | |||
|
1 | declare namespace dojo { | |
|
2 | ||
|
3 | namespace data { | |
|
4 | ||
|
5 | namespace api { | |
|
6 | ||
|
7 | /* dojo/data/api/Identity */ | |
|
8 | ||
|
9 | interface Features { | |
|
10 | 'dojo.data.api.Identity'?: boolean; | |
|
11 | } | |
|
12 | ||
|
13 | interface FetchByIdentityArgs<T extends Item> { | |
|
14 | identity?: string | Object; | |
|
15 | onItem?: (item: T) => void; | |
|
16 | onError?: (err: Error) => void; | |
|
17 | scope?: Object; | |
|
18 | } | |
|
19 | ||
|
20 | interface Identity<T extends Item> { | |
|
21 | /** | |
|
22 | * See dojo/data/api/Read.getFeatures() | |
|
23 | */ | |
|
24 | getFeatures(): Features; | |
|
25 | ||
|
26 | /** | |
|
27 | * Returns a unique identifier for an item. The return value will be | |
|
28 | * either a string or something that has a toString() method (such as, | |
|
29 | * for example, a dojox/uuid object). | |
|
30 | */ | |
|
31 | getIdentity(item: T): Object | string | number; | |
|
32 | ||
|
33 | /** | |
|
34 | * Returns an array of attribute names that are used to generate the identity. | |
|
35 | * For most stores, this is a single attribute, but for some complex stores | |
|
36 | * such as RDB backed stores that use compound (multi-attribute) identifiers | |
|
37 | * it can be more than one. If the identity is not composed of attributes | |
|
38 | * on the item, it will return null. This function is intended to identify | |
|
39 | * the attributes that comprise the identity so that so that during a render | |
|
40 | * of all attributes, the UI can hide the the identity information if it | |
|
41 | * chooses. | |
|
42 | */ | |
|
43 | getIdentity(item: T): string[]; | |
|
44 | ||
|
45 | /** | |
|
46 | * Given the identity of an item, this method returns the item that has | |
|
47 | * that identity through the onItem callback. Conforming implementations | |
|
48 | * should return null if there is no item with the given identity. | |
|
49 | * Implementations of fetchItemByIdentity() may sometimes return an item | |
|
50 | * from a local cache and may sometimes fetch an item from a remote server, | |
|
51 | */ | |
|
52 | fetchItemByIdentity(keywordArgs: FetchByIdentityArgs<T>): T; | |
|
53 | } | |
|
54 | ||
|
55 | interface IdentityConstructor { | |
|
56 | new <T extends Item>(): Identity<T>; | |
|
57 | prototype: Identity<any>; | |
|
58 | } | |
|
59 | ||
|
60 | /* dojo/data/api/Item */ | |
|
61 | ||
|
62 | /** | |
|
63 | * An item in a dojo/data store | |
|
64 | * Class for documentation purposes only. An item can take any form, so no | |
|
65 | * properties or methods are defined here. | |
|
66 | */ | |
|
67 | interface Item { | |
|
68 | [property: string]: any; | |
|
69 | } | |
|
70 | ||
|
71 | interface ItemConstructor { | |
|
72 | new (): Item; | |
|
73 | prototype: Item; | |
|
74 | } | |
|
75 | ||
|
76 | /* dojo/data/api/Notification */ | |
|
77 | ||
|
78 | interface ParentInfo<T> { | |
|
79 | item: T; | |
|
80 | attribute: string; | |
|
81 | oldValue: any; | |
|
82 | } | |
|
83 | ||
|
84 | interface Features { | |
|
85 | 'dojo.data.api.Notification': boolean; | |
|
86 | } | |
|
87 | ||
|
88 | interface Notification<T extends Item> { | |
|
89 | /** | |
|
90 | * See dojo/data/api/Read.getFeatures() | |
|
91 | */ | |
|
92 | getFeatures(): Features; | |
|
93 | ||
|
94 | /** | |
|
95 | * This function is called any time an item is modified via setValue, setValues, unsetAttribute, etc. | |
|
96 | */ | |
|
97 | onSet(item: T, attribute: string, oldValue: any, newValue: any): void; | |
|
98 | ||
|
99 | /** | |
|
100 | * This function is called any time a new item is created in the store. | |
|
101 | * It is called immediately after the store newItem processing has completed. | |
|
102 | */ | |
|
103 | onNew(item: T, parentInfo?: ParentInfo<T>): void; | |
|
104 | ||
|
105 | /** | |
|
106 | * This function is called any time an item is deleted from the store. | |
|
107 | * It is called immediately after the store deleteItem processing has completed. | |
|
108 | */ | |
|
109 | onDelete(deletedItem: T): void; | |
|
110 | } | |
|
111 | ||
|
112 | interface NotificationConstructor { | |
|
113 | new <T extends Item>(): Notification<T>; | |
|
114 | prototype: Notification<Item>; | |
|
115 | } | |
|
116 | ||
|
117 | /* dojo/data/api/Read */ | |
|
118 | ||
|
119 | interface Features { | |
|
120 | 'dojo.data.api.Read'?: boolean; | |
|
121 | } | |
|
122 | ||
|
123 | interface LoadItemArgs<T extends Item> { | |
|
124 | item?: T; | |
|
125 | onItem?: (item: T) => void; | |
|
126 | onError?: (err: Error) => void; | |
|
127 | scope?: Object; | |
|
128 | } | |
|
129 | ||
|
130 | interface SortArg { | |
|
131 | attribute: string; | |
|
132 | descending?: boolean; | |
|
133 | } | |
|
134 | ||
|
135 | interface FetchArgs<T extends Item> { | |
|
136 | query?: Object | string; | |
|
137 | queryOptions?: Object; | |
|
138 | onBegin?: (size: number, request: Request) => void; | |
|
139 | onItem?: (item: T, request: Request) => void; | |
|
140 | onComplete?: (items: T[], request: Request) => void; | |
|
141 | onError?: (errorData: Error, request: Request) => void; | |
|
142 | scope?: Object; | |
|
143 | start?: number; | |
|
144 | count?: number; | |
|
145 | sort?: SortArg[]; | |
|
146 | } | |
|
147 | ||
|
148 | interface Read<T extends Item> { | |
|
149 | ||
|
150 | /** | |
|
151 | * Returns a single attribute value. | |
|
152 | * Returns defaultValue if and only if *item* does not have a value for *attribute*. | |
|
153 | * Returns null if and only if null was explicitly set as the attribute value. | |
|
154 | * Returns undefined if and only if the item does not have a value for the | |
|
155 | * given attribute (which is the same as saying the item does not have the attribute). | |
|
156 | */ | |
|
157 | getValue<U>(item: T, attribute: string, defaultValue?: U): U; | |
|
158 | ||
|
159 | /** | |
|
160 | * This getValues() method works just like the getValue() method, but getValues() | |
|
161 | * always returns an array rather than a single attribute value. The array | |
|
162 | * may be empty, may contain a single attribute value, or may contain | |
|
163 | * many attribute values. | |
|
164 | * If the item does not have a value for the given attribute, then getValues() | |
|
165 | * will return an empty array: []. (So, if store.hasAttribute(item, attribute) | |
|
166 | * has a return of false, then store.getValues(item, attribute) will return [].) | |
|
167 | */ | |
|
168 | getValues<U>(item: T, attribute: string): U[]; | |
|
169 | ||
|
170 | /** | |
|
171 | * Returns an array with all the attributes that this item has. This | |
|
172 | * method will always return an array; if the item has no attributes | |
|
173 | * at all, getAttributes() will return an empty array: []. | |
|
174 | */ | |
|
175 | getAttributes(item: T): string[]; | |
|
176 | ||
|
177 | /** | |
|
178 | * Returns true if the given *item* has a value for the given *attribute*. | |
|
179 | */ | |
|
180 | hasAttribute(item: T, attribute: string): boolean; | |
|
181 | ||
|
182 | /** | |
|
183 | * Returns true if the given *value* is one of the values that getValues() | |
|
184 | * would return. | |
|
185 | */ | |
|
186 | containsValue(item: T, attribute: string, value: any): boolean; | |
|
187 | ||
|
188 | /** | |
|
189 | * Returns true if *something* is an item and came from the store instance. | |
|
190 | * Returns false if *something* is a literal, an item from another store instance, | |
|
191 | * or is any object other than an item. | |
|
192 | */ | |
|
193 | isItem(something: any): something is T; | |
|
194 | ||
|
195 | /** | |
|
196 | * Returns false if isItem(something) is false. Returns false if | |
|
197 | * if isItem(something) is true but the the item is not yet loaded | |
|
198 | * in local memory (for example, if the item has not yet been read | |
|
199 | * from the server). | |
|
200 | */ | |
|
201 | isItemLoaded(something: any): boolean; | |
|
202 | ||
|
203 | /** | |
|
204 | * Given an item, this method loads the item so that a subsequent call | |
|
205 | * to store.isItemLoaded(item) will return true. If a call to | |
|
206 | * isItemLoaded() returns true before loadItem() is even called, | |
|
207 | * then loadItem() need not do any work at all and will not even invoke | |
|
208 | * the callback handlers. So, before invoking this method, check that | |
|
209 | * the item has not already been loaded. | |
|
210 | */ | |
|
211 | loadItem(keywordArgs: LoadItemArgs<T>): T; | |
|
212 | ||
|
213 | /** | |
|
214 | * Given a query and set of defined options, such as a start and count of items to return, | |
|
215 | * this method executes the query and makes the results available as data items. | |
|
216 | * The format and expectations of stores is that they operate in a generally asynchronous | |
|
217 | * manner, therefore callbacks are always used to return items located by the fetch parameters. | |
|
218 | */ | |
|
219 | fetch(keywordArgs: FetchArgs<T>): Request; | |
|
220 | ||
|
221 | /** | |
|
222 | * The getFeatures() method returns an simple keyword values object | |
|
223 | * that specifies what interface features the datastore implements. | |
|
224 | * A simple CsvStore may be read-only, and the only feature it | |
|
225 | * implements will be the 'dojo/data/api/Read' interface, so the | |
|
226 | * getFeatures() method will return an object like this one: | |
|
227 | * {'dojo.data.api.Read': true}. | |
|
228 | * A more sophisticated datastore might implement a variety of | |
|
229 | * interface features, like 'dojo.data.api.Read', 'dojo/data/api/Write', | |
|
230 | * 'dojo.data.api.Identity', and 'dojo/data/api/Attribution'. | |
|
231 | */ | |
|
232 | getFeatures(): Features; | |
|
233 | ||
|
234 | /** | |
|
235 | * The close() method is intended for instructing the store to 'close' out | |
|
236 | * any information associated with a particular request. | |
|
237 | */ | |
|
238 | close(request?: Request): void; | |
|
239 | ||
|
240 | /** | |
|
241 | * Method to inspect the item and return a user-readable 'label' for the item | |
|
242 | * that provides a general/adequate description of what the item is. | |
|
243 | */ | |
|
244 | getLabel(item: T): string; | |
|
245 | ||
|
246 | /** | |
|
247 | * Method to inspect the item and return an array of what attributes of the item were used | |
|
248 | * to generate its label, if any. | |
|
249 | */ | |
|
250 | getLabelAttributes(item: T): string[]; | |
|
251 | } | |
|
252 | ||
|
253 | interface ReadConstructor { | |
|
254 | new <T extends Item>(): Read<T>; | |
|
255 | prototype: Read<Item>; | |
|
256 | } | |
|
257 | ||
|
258 | /* dojo/data/api/Request */ | |
|
259 | ||
|
260 | interface Request { | |
|
261 | /** | |
|
262 | * This class defines out the semantics of what a 'Request' object looks like | |
|
263 | * when returned from a fetch() method. In general, a request object is | |
|
264 | * nothing more than the original keywordArgs from fetch with an abort function | |
|
265 | * attached to it to allow users to abort a particular request if they so choose. | |
|
266 | * No other functions are required on a general Request object return. That does not | |
|
267 | * inhibit other store implementations from adding extensions to it, of course. | |
|
268 | * This is an abstract API that data provider implementations conform to. | |
|
269 | * This file defines methods signatures and intentionally leaves all the | |
|
270 | * methods unimplemented. | |
|
271 | * For more details on fetch, see dojo/data/api/Read.fetch(). | |
|
272 | */ | |
|
273 | abort(): void; | |
|
274 | } | |
|
275 | ||
|
276 | interface RequestConstructor { | |
|
277 | new (): Request; | |
|
278 | prototype: Request; | |
|
279 | } | |
|
280 | ||
|
281 | /* dojo/data/api/Write */ | |
|
282 | ||
|
283 | interface Features { | |
|
284 | 'dojo.data.api.Write': boolean; | |
|
285 | } | |
|
286 | ||
|
287 | interface SaveKeywordArgs { | |
|
288 | onComplete?: () => void; | |
|
289 | onError?: (error: Error) => void; | |
|
290 | scope?: Object; | |
|
291 | } | |
|
292 | ||
|
293 | interface Write<T extends Item> { | |
|
294 | ||
|
295 | /** | |
|
296 | * See dojo/data/api/Read.getFeatures() | |
|
297 | */ | |
|
298 | getFeatures(): Features; | |
|
299 | ||
|
300 | /** | |
|
301 | * Returns a newly created item. Sets the attributes of the new | |
|
302 | * item based on the *keywordArgs* provided. In general, the attribute | |
|
303 | * names in the keywords become the attributes in the new item and as for | |
|
304 | * the attribute values in keywordArgs, they become the values of the attributes | |
|
305 | * in the new item. In addition, for stores that support hierarchical item | |
|
306 | * creation, an optional second parameter is accepted that defines what item is the parent | |
|
307 | * of the new item and what attribute of that item should the new item be assigned to. | |
|
308 | * In general, this will assume that the attribute targeted is multi-valued and a new item | |
|
309 | * is appended onto the list of values for that attribute. | |
|
310 | */ | |
|
311 | newItem(keywordArgs: T, parentInfo?: ParentInfo<T>): T; | |
|
312 | ||
|
313 | /** | |
|
314 | * Deletes an item from the store. | |
|
315 | */ | |
|
316 | deleteItem(item: T): boolean; | |
|
317 | ||
|
318 | /** | |
|
319 | * Sets the value of an attribute on an item. | |
|
320 | * Replaces any previous value or values. | |
|
321 | */ | |
|
322 | setValue(item: T, attribute: string, value: any): boolean; | |
|
323 | ||
|
324 | /** | |
|
325 | * Adds each value in the *values* array as a value of the given | |
|
326 | * attribute on the given item. | |
|
327 | * Replaces any previous value or values. | |
|
328 | * Calling store.setValues(x, y, []) (with *values* as an empty array) has | |
|
329 | * the same effect as calling store.unsetAttribute(x, y). | |
|
330 | */ | |
|
331 | setValues(item: T, attribute: string, values: any[]): boolean; | |
|
332 | ||
|
333 | /** | |
|
334 | * Deletes all the values of an attribute on an item. | |
|
335 | */ | |
|
336 | unsetAttribute(item: T, attribute: string): boolean; | |
|
337 | ||
|
338 | /** | |
|
339 | * Saves to the server all the changes that have been made locally. | |
|
340 | * The save operation may take some time and is generally performed | |
|
341 | * in an asynchronous fashion. The outcome of the save action is | |
|
342 | * is passed into the set of supported callbacks for the save. | |
|
343 | */ | |
|
344 | save(keywordArgs: SaveKeywordArgs): void; | |
|
345 | ||
|
346 | /** | |
|
347 | * Discards any unsaved changes. | |
|
348 | */ | |
|
349 | revert(): boolean; | |
|
350 | ||
|
351 | /** | |
|
352 | * Given an item, isDirty() returns true if the item has been modified | |
|
353 | * since the last save(). If isDirty() is called with no *item* argument, | |
|
354 | * then this function returns true if any item has been modified since | |
|
355 | * the last save(). | |
|
356 | */ | |
|
357 | isDirty(item?: T): boolean; | |
|
358 | } | |
|
359 | ||
|
360 | interface WriteConstructor { | |
|
361 | new <T>(): Write<T>; | |
|
362 | prototype: Write<any>; | |
|
363 | } | |
|
364 | } | |
|
365 | ||
|
366 | namespace util { | |
|
367 | ||
|
368 | /* dojo/data/util/filter */ | |
|
369 | ||
|
370 | interface Filter { | |
|
371 | /** | |
|
372 | * Helper function to convert a simple pattern to a regular expression for matching. | |
|
373 | */ | |
|
374 | patternToRegExp(pattern: string, ignoreCase?: boolean): RegExp; | |
|
375 | } | |
|
376 | ||
|
377 | /* dojo/data/util/simpleFetch */ | |
|
378 | ||
|
379 | interface SimpleFetch { | |
|
380 | ||
|
381 | /** | |
|
382 | * The error handler when there is an error fetching items. This function should not be called | |
|
383 | * directly and is used by simpleFetch.fetch(). | |
|
384 | */ | |
|
385 | errorHandler(errorData: Error, requestObject: api.Request): void; | |
|
386 | ||
|
387 | /** | |
|
388 | * The handler when items are successfully fetched. This function should not be called directly | |
|
389 | * and is used by simpleFetch.fetch(). | |
|
390 | */ | |
|
391 | fetchHandler<T extends api.Item>(items: T[], requestObject: api.Request): void; | |
|
392 | ||
|
393 | /** | |
|
394 | * The simpleFetch mixin is designed to serve as a set of function(s) that can | |
|
395 | * be mixed into other datastore implementations to accelerate their development. | |
|
396 | */ | |
|
397 | fetch(request?: api.Request): api.Request; | |
|
398 | } | |
|
399 | ||
|
400 | /* dojo/data/util/sorter */ | |
|
401 | ||
|
402 | interface SortFunction<T> { | |
|
403 | (a: T, b: T): number; | |
|
404 | } | |
|
405 | ||
|
406 | interface Sorter { | |
|
407 | ||
|
408 | /** | |
|
409 | * Basic comparison function that compares if an item is greater or less than another item | |
|
410 | */ | |
|
411 | basicComparator: SortFunction<any>; | |
|
412 | ||
|
413 | /** | |
|
414 | * Helper function to generate the sorting function based off the list of sort attributes. | |
|
415 | */ | |
|
416 | createSortFunction<T>(attributes: api.SortArg[], store: api.Read<T>): SortFunction<T>; | |
|
417 | } | |
|
418 | } | |
|
419 | ||
|
420 | /* dojo/data/ItemFileReadStore */ | |
|
421 | ||
|
422 | interface ItemFileReadStoreData<T extends api.Item> { | |
|
423 | items: T[]; | |
|
424 | identifier?: string; | |
|
425 | } | |
|
426 | ||
|
427 | interface ItemConstructor<V, T> { | |
|
428 | new (value: V): T; | |
|
429 | prototype: T; | |
|
430 | } | |
|
431 | ||
|
432 | interface ItemConstructorObject<V, T> { | |
|
433 | type: GenericConstructor<T>; | |
|
434 | deserialize: (value: V) => T; | |
|
435 | } | |
|
436 | ||
|
437 | interface ItemFileReadStoreTypeMap { | |
|
438 | [type: string]: ItemConstructor<any, any> | ItemConstructorObject<any, any>; | |
|
439 | } | |
|
440 | ||
|
441 | interface ItemFileReadStoreArgs<T extends api.Item> { | |
|
442 | url?: string; | |
|
443 | data?: ItemFileReadStoreData<T>; | |
|
444 | typeMap?: ItemFileReadStoreTypeMap; | |
|
445 | } | |
|
446 | ||
|
447 | interface FindCallback<T extends api.Item> { | |
|
448 | (items: T[], requestArgs: api.Request): void; | |
|
449 | } | |
|
450 | ||
|
451 | interface ItemFileReadStore<T extends api.Item> extends Evented, util.SimpleFetch { | |
|
452 | ||
|
453 | /** | |
|
454 | * Parameter to allow users to specify if a close call should force a reload or not. | |
|
455 | * By default, it retains the old behavior of not clearing if close is called. But | |
|
456 | * if set true, the store will be reset to default state. Note that by doing this, | |
|
457 | * all item handles will become invalid and a new fetch must be issued. | |
|
458 | */ | |
|
459 | clearOnClose: boolean; | |
|
460 | ||
|
461 | /** | |
|
462 | * Parameter to allow specifying if preventCache should be passed to the xhrGet call or not when loading data from a url. | |
|
463 | * Note this does not mean the store calls the server on each fetch, only that the data load has preventCache set as an option. | |
|
464 | * Added for tracker: #6072 | |
|
465 | */ | |
|
466 | urlPreventCache: boolean; | |
|
467 | ||
|
468 | /** | |
|
469 | * Parameter for specifying that it is OK for the xhrGet call to fail silently. | |
|
470 | */ | |
|
471 | failOk: boolean; | |
|
472 | ||
|
473 | /** | |
|
474 | * Parameter to indicate to process data from the url as hierarchical | |
|
475 | * (data items can contain other data items in js form). Default is true | |
|
476 | * for backwards compatibility. False means only root items are processed | |
|
477 | * as items, all child objects outside of type-mapped objects and those in | |
|
478 | * specific reference format, are left straight JS data objects. | |
|
479 | */ | |
|
480 | hierarchical: boolean; | |
|
481 | ||
|
482 | /** | |
|
483 | * This function tests whether the item passed in is indeed an item in the store. | |
|
484 | */ | |
|
485 | _assertIsItem(item: any): void; | |
|
486 | ||
|
487 | /** | |
|
488 | * This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. | |
|
489 | */ | |
|
490 | _assertIsAttribute(attribute: string): void; | |
|
491 | ||
|
492 | /** | |
|
493 | * See dojo/data/api/Read.getValue() | |
|
494 | */ | |
|
495 | getValue<V>(item: T, attribute: string, value?: V): V; | |
|
496 | ||
|
497 | /** | |
|
498 | * See dojo/data/api/Read.getValues() | |
|
499 | */ | |
|
500 | getValues<V>(item: T, attribute: string): V[]; | |
|
501 | ||
|
502 | /** | |
|
503 | * See dojo/data/api/Read.getAttributes() | |
|
504 | */ | |
|
505 | getAttributes(item: T): string[]; | |
|
506 | ||
|
507 | /** | |
|
508 | * See dojo/data/api/Read.hasAttribute() | |
|
509 | */ | |
|
510 | hasAttribute(item: T, attribute: string): boolean; | |
|
511 | ||
|
512 | /** | |
|
513 | * See dojo/data/api/Read.containsValue() | |
|
514 | */ | |
|
515 | containsValue(item: T, attribute: string, value: any): boolean; | |
|
516 | ||
|
517 | /** | |
|
518 | * Internal function for looking at the values contained by the item. | |
|
519 | */ | |
|
520 | _containsValue(item: T, attribute: string, value: any, regexp?: RegExp): boolean; | |
|
521 | ||
|
522 | /** | |
|
523 | * See dojo/data/api/Read.isItem() | |
|
524 | */ | |
|
525 | isItem(something: any): something is T; | |
|
526 | ||
|
527 | /** | |
|
528 | * See dojo/data/api/Read.isItemLoaded() | |
|
529 | */ | |
|
530 | isItemLoaded(something: any): boolean; | |
|
531 | ||
|
532 | /** | |
|
533 | * See dojo/data/api/Read.loadItem() | |
|
534 | */ | |
|
535 | loadItem(keywordArgs: api.LoadItemArgs<T>): void; | |
|
536 | ||
|
537 | /** | |
|
538 | * See dojo/data/api/Read.getFeatures() | |
|
539 | */ | |
|
540 | getFeatures(): api.Features; | |
|
541 | ||
|
542 | /** | |
|
543 | * See dojo/data/api/Read.getLabel() | |
|
544 | */ | |
|
545 | getLabel(item: T): string; | |
|
546 | ||
|
547 | /** | |
|
548 | * See dojo/data/api/Read.getLabelAttributes() | |
|
549 | */ | |
|
550 | getLabelAttributes(item: T): string[]; | |
|
551 | ||
|
552 | /** | |
|
553 | * This method handles the basic filtering needs for ItemFile* based stores. | |
|
554 | */ | |
|
555 | filter(requestArgs: api.Request, arrayOfItems: T[], findCallback: FindCallback<T>): void; | |
|
556 | ||
|
557 | /** | |
|
558 | * See dojo/data/util.simpleFetch.fetch() | |
|
559 | */ | |
|
560 | _fetchItems(keywordArgs: api.FetchArgs<T>, findeCallback: FindCallback<T>): void; | |
|
561 | ||
|
562 | /** | |
|
563 | * Internal function to execute delayed request in the store. | |
|
564 | */ | |
|
565 | _handleQueuedFetches(): void; | |
|
566 | ||
|
567 | /** | |
|
568 | * Internal function to determine which list of items to search over. | |
|
569 | */ | |
|
570 | _getItemsArray(queryOptions?: { deep?: boolean }): T[]; | |
|
571 | ||
|
572 | /** | |
|
573 | * See dojo/data/api/Read.close() | |
|
574 | */ | |
|
575 | close(request?: api.Request): void; | |
|
576 | ||
|
577 | /** | |
|
578 | * Function to parse the loaded data into item format and build the internal items array. | |
|
579 | */ | |
|
580 | _getItemsFromLoadedData(dataObject: Object): void; | |
|
581 | ||
|
582 | /** | |
|
583 | * Method to add an reference map entry for an item and attribute. | |
|
584 | */ | |
|
585 | _addReferenceToMap(refItem: T, parentItem: T, attribute: string): void; | |
|
586 | ||
|
587 | /** | |
|
588 | * See dojo/data/api/Identity.getIdentity() | |
|
589 | */ | |
|
590 | getIdentity(item: T): Object | string | number; | |
|
591 | ||
|
592 | /** | |
|
593 | * See dojo/data/api/Identity.fetchItemByIdentity() | |
|
594 | */ | |
|
595 | fetchItemByIdentity(keywordArgs: api.FetchByIdentityArgs<T>): T; | |
|
596 | ||
|
597 | /** | |
|
598 | * Internal function to look an item up by its identity map. | |
|
599 | */ | |
|
600 | _getItemByIdentity(identity: Object): T; | |
|
601 | ||
|
602 | /** | |
|
603 | * See dojo/data/api/Identity.getIdentityAttributes() | |
|
604 | */ | |
|
605 | getIdentityAttributes(item: T): string[]; | |
|
606 | ||
|
607 | /** | |
|
608 | * Internal function to force a load of the store if it hasn't occurred yet. This is required | |
|
609 | * for specific functions to work properly. | |
|
610 | */ | |
|
611 | _forceLoad(): void; | |
|
612 | } | |
|
613 | ||
|
614 | interface ItemFileReadStoreConstructor { | |
|
615 | new <T extends api.Item>(keywordParameters: ItemFileReadStoreArgs<T>): ItemFileReadStore<T>; | |
|
616 | prototype: ItemFileReadStore<api.Item>; | |
|
617 | } | |
|
618 | ||
|
619 | /* dojo/data/ItemFileWriteStore */ | |
|
620 | ||
|
621 | interface ItemFileWriteStore<T extends api.Item> extends ItemFileReadStore<T> { | |
|
622 | referenceIntegrity: boolean; | |
|
623 | ||
|
624 | _assert(condition: boolean): void; | |
|
625 | ||
|
626 | _getIdentifierAttribute(): boolean; | |
|
627 | ||
|
628 | /** | |
|
629 | * See dojo/data/api/Write.newItem() | |
|
630 | */ | |
|
631 | newItem(keywordArgs: T, parentInfo?: api.ParentInfo<T>): T; | |
|
632 | ||
|
633 | _removeArrayElement(array: any[], element: any): boolean; | |
|
634 | ||
|
635 | /** | |
|
636 | * See dojo/data/api/Write.deleteItem() | |
|
637 | */ | |
|
638 | deleteItem(item: T): boolean; | |
|
639 | ||
|
640 | /** | |
|
641 | * See dojo/data/api/Write.set() | |
|
642 | */ | |
|
643 | setValue(item: T, attribute: string, value: any): boolean; | |
|
644 | ||
|
645 | /** | |
|
646 | * See dojo/data/api/Write.setValues() | |
|
647 | */ | |
|
648 | setValues(item: T, attribute: string, values: any[]): boolean; | |
|
649 | ||
|
650 | /** | |
|
651 | * See dojo/data/api/Write.unsetAttribute() | |
|
652 | */ | |
|
653 | unsetAttribute(item: T, attribute: string): boolean; | |
|
654 | ||
|
655 | _setValueOrValues(item: T, attribute: any, newValueOrValues: any, callOnSet?: boolean): boolean; | |
|
656 | ||
|
657 | /** | |
|
658 | * Method to remove an reference map entry for an item and attribute. | |
|
659 | */ | |
|
660 | _removeReferenceFromMap(refItem: T, parentItem: T, attribute: string): void; | |
|
661 | ||
|
662 | /** | |
|
663 | * Function to dump the reverse reference map of all items in the store for debug purposes. | |
|
664 | */ | |
|
665 | _dumpReferenceMap(): void; | |
|
666 | ||
|
667 | _getValueOrValues(item: T, attribute: string): any; | |
|
668 | ||
|
669 | _flatten(value: any): any; | |
|
670 | ||
|
671 | /** | |
|
672 | * Generate a string that can be saved to a file. | |
|
673 | * The result should look similar to: | |
|
674 | * http://trac.dojotoolkit.org/browser/dojo/trunk/tests/data/countries.json | |
|
675 | */ | |
|
676 | _getNewFileContentString(): string; | |
|
677 | ||
|
678 | /** | |
|
679 | * Function to determine if an array or object has no properties or values. | |
|
680 | */ | |
|
681 | _isEmpty(something: any): boolean; | |
|
682 | ||
|
683 | /** | |
|
684 | * See dojo/data/api/Write.save() | |
|
685 | */ | |
|
686 | save(keywordArgs: api.SaveKeywordArgs): void; | |
|
687 | ||
|
688 | /** | |
|
689 | * See dojo/data/api/Write.revert() | |
|
690 | */ | |
|
691 | revert(): boolean; | |
|
692 | ||
|
693 | /** | |
|
694 | * See dojo/data/api/Write.isDirty() | |
|
695 | */ | |
|
696 | isDirty(item: T): boolean; | |
|
697 | ||
|
698 | /** | |
|
699 | * See dojo/data/api/Notification.onSet() | |
|
700 | */ | |
|
701 | onSet(item: T, attribute: string, oldValue: any, newValue: any): void; | |
|
702 | ||
|
703 | /** | |
|
704 | * See dojo/data/api/Notification.onNew() | |
|
705 | */ | |
|
706 | onNew(item: T, parentInfo?: api.ParentInfo<T>): void; | |
|
707 | ||
|
708 | /** | |
|
709 | * See dojo/data/api/Notification.onDelete() | |
|
710 | */ | |
|
711 | onDelete(deletedItem: T): void; | |
|
712 | } | |
|
713 | ||
|
714 | interface ItemFileWriteStoreConstructor { | |
|
715 | new <T extends api.Item>(keywordParameters: ItemFileReadStoreArgs<T>): ItemFileWriteStore<T>; | |
|
716 | prototype: ItemFileWriteStore<api.Item>; | |
|
717 | } | |
|
718 | ||
|
719 | /* dojo/data/ObjectStore */ | |
|
720 | ||
|
721 | /* TODO: Replace with Store API when Typed */ | |
|
722 | interface Store { } | |
|
723 | ||
|
724 | interface ObjectStoreOptions { | |
|
725 | objectStore?: Store; | |
|
726 | labelAttribute?: string; | |
|
727 | labelProperty?: string; | |
|
728 | } | |
|
729 | ||
|
730 | interface ObjectStoreSaveArgs { | |
|
731 | /** | |
|
732 | * This will cause the save to commit the dirty data for all | |
|
733 | * ObjectStores as a single transaction. | |
|
734 | */ | |
|
735 | global?: boolean; | |
|
736 | ||
|
737 | /** | |
|
738 | * This will cause the changes to be reverted if there is an | |
|
739 | * error on the save. By default a revert is executed unless | |
|
740 | * a value of false is provide for this parameter. | |
|
741 | */ | |
|
742 | revertOnError?: boolean; | |
|
743 | ||
|
744 | /** | |
|
745 | * Called when an error occurs in the commit | |
|
746 | */ | |
|
747 | onError(e: Error): void; | |
|
748 | ||
|
749 | /** | |
|
750 | * Called when an the save/commit is completed | |
|
751 | */ | |
|
752 | onComplete(actions: any[]): void; | |
|
753 | ||
|
754 | scope?: Object; | |
|
755 | } | |
|
756 | ||
|
757 | interface ObjectStore<T extends api.Item> extends Evented { | |
|
758 | objectStore: Store; | |
|
759 | labelProperty: string; | |
|
760 | ||
|
761 | /** | |
|
762 | * Gets the value of an item's 'property' | |
|
763 | */ | |
|
764 | getValue(item: T, property: string, defaultValue?: any): any; | |
|
765 | ||
|
766 | /** | |
|
767 | * Gets the value of an item's 'property' and returns | |
|
768 | * it. If this value is an array it is just returned, | |
|
769 | * if not, the value is added to an array and that is returned. | |
|
770 | */ | |
|
771 | getValues(item: T, property: string): any[]; | |
|
772 | ||
|
773 | /** | |
|
774 | * Gets the available attributes of an item's 'property' and returns | |
|
775 | * it as an array. | |
|
776 | */ | |
|
777 | getAttributes(item: T): string[]; | |
|
778 | ||
|
779 | /** | |
|
780 | * Checks to see if item has attribute | |
|
781 | */ | |
|
782 | hasAttribute(item: T, attribute: string): boolean; | |
|
783 | ||
|
784 | /** | |
|
785 | * Checks to see if 'item' has 'value' at 'attribute' | |
|
786 | */ | |
|
787 | containsValue(item: T, attribute: string, value: any): boolean; | |
|
788 | ||
|
789 | /** | |
|
790 | * Checks to see if the argument is an item | |
|
791 | */ | |
|
792 | isItem(item: any): item is T; | |
|
793 | ||
|
794 | /** | |
|
795 | * Checks to see if the item is loaded. | |
|
796 | */ | |
|
797 | isItemLoaded(item: any): boolean; | |
|
798 | ||
|
799 | /** | |
|
800 | * Loads an item and calls the callback handler. Note, that this will call the callback | |
|
801 | * handler even if the item is loaded. Consequently, you can use loadItem to ensure | |
|
802 | * that an item is loaded is situations when the item may or may not be loaded yet. | |
|
803 | * If you access a value directly through property access, you can use this to load | |
|
804 | * a lazy value as well (doesn't need to be an item). | |
|
805 | */ | |
|
806 | loadItem(keywordArgs: api.LoadItemArgs<T>): T; | |
|
807 | ||
|
808 | /** | |
|
809 | * See dojo/data/api/Read.close() | |
|
810 | */ | |
|
811 | close(request?: api.Request): void; | |
|
812 | ||
|
813 | /** | |
|
814 | * See dojo/data/api/Read.fetch() | |
|
815 | */ | |
|
816 | fetch(keywordArgs: api.FetchArgs<T>): api.Request; | |
|
817 | ||
|
818 | /** | |
|
819 | * return the store feature set | |
|
820 | */ | |
|
821 | getFeatures(): api.Features; | |
|
822 | ||
|
823 | /** | |
|
824 | * See dojo/data/api/Read.getLabel() | |
|
825 | */ | |
|
826 | getLabel(item: T): string; | |
|
827 | ||
|
828 | /** | |
|
829 | * See dojo/data/api/Read.getLabelAttributes() | |
|
830 | */ | |
|
831 | getLabelAttributes(item: T): string[]; | |
|
832 | ||
|
833 | /** | |
|
834 | * returns the identity of the given item | |
|
835 | * See dojo/data/api/Read.getIdentity() | |
|
836 | */ | |
|
837 | getIdentity(item: T): Object | string | number; | |
|
838 | ||
|
839 | /** | |
|
840 | * returns the attributes which are used to make up the | |
|
841 | * identity of an item. Basically returns this.objectStore.idProperty | |
|
842 | * See dojo/data/api/Read.getIdentityAttributes() | |
|
843 | */ | |
|
844 | getIdentityAttributes(item: T): string[]; | |
|
845 | ||
|
846 | /** | |
|
847 | * fetch an item by its identity, by looking in our index of what we have loaded | |
|
848 | */ | |
|
849 | fetchItemByIdentity(keywordArgs: api.FetchByIdentityArgs<T>): T; | |
|
850 | ||
|
851 | /** | |
|
852 | * adds a new item to the store at the specified point. | |
|
853 | * Takes two parameters, data, and options. | |
|
854 | */ | |
|
855 | newItem(keywordArgs: T, parentInfo?: api.ParentInfo<T>): T; | |
|
856 | ||
|
857 | /** | |
|
858 | * deletes item and any references to that item from the store. | |
|
859 | */ | |
|
860 | deleteItem(item: T): void; | |
|
861 | ||
|
862 | /** | |
|
863 | * sets 'attribute' on 'item' to 'value' | |
|
864 | * See dojo/data/api/Write.setValue() | |
|
865 | */ | |
|
866 | setValue(item: T, attribute: string, value: any): boolean; | |
|
867 | ||
|
868 | /** | |
|
869 | * sets 'attribute' on 'item' to 'value' value | |
|
870 | * must be an array. | |
|
871 | * See dojo/data/api/Write.setValues() | |
|
872 | */ | |
|
873 | setValues(item: T, attribute: string, values: any[]): boolean; | |
|
874 | ||
|
875 | /** | |
|
876 | * unsets 'attribute' on 'item' | |
|
877 | * See dojo/data/api/Write.unsetAttribute() | |
|
878 | */ | |
|
879 | unsetAttribute(item: T, attribute: string): boolean; | |
|
880 | ||
|
881 | /** | |
|
882 | * adds an object to the list of dirty objects. This object | |
|
883 | * contains a reference to the object itself as well as a | |
|
884 | * cloned and trimmed version of old object for use with | |
|
885 | * revert. | |
|
886 | */ | |
|
887 | changing(object: T, _deleting: boolean): void; | |
|
888 | ||
|
889 | /** | |
|
890 | * Saves the dirty data using object store provider. See dojo/data/api/Write for API. | |
|
891 | */ | |
|
892 | save(kwArgs: ObjectStoreSaveArgs): void; | |
|
893 | ||
|
894 | /** | |
|
895 | * returns any modified data to its original state prior to a save(); | |
|
896 | */ | |
|
897 | revert(): void; | |
|
898 | ||
|
899 | /** | |
|
900 | * returns true if the item is marked as dirty or true if there are any dirty items | |
|
901 | */ | |
|
902 | isDirty(item: T): boolean; | |
|
903 | ||
|
904 | /** | |
|
905 | * See dojo/data/api/Notification.onSet() | |
|
906 | */ | |
|
907 | onSet(item: T, attribute: string, oldValue: any, newValue: any): void; | |
|
908 | ||
|
909 | /** | |
|
910 | * See dojo/data/api/Notification.onNew() | |
|
911 | */ | |
|
912 | onNew(item: T, parentInfo?: api.ParentInfo<T>): void; | |
|
913 | ||
|
914 | /** | |
|
915 | * See dojo/data/api/Notification.onDelete() | |
|
916 | */ | |
|
917 | onDelete(deletedItem: T): void; | |
|
918 | ||
|
919 | /** | |
|
920 | * Called when a fetch occurs | |
|
921 | */ | |
|
922 | onFetch(results: any): void; | |
|
923 | } | |
|
924 | ||
|
925 | /** | |
|
926 | * A Dojo Data implementation that wraps Dojo object stores for backwards | |
|
927 | * compatibility. | |
|
928 | */ | |
|
929 | interface ObjectStoreConstructor { | |
|
930 | new <T extends api.Item>(options: ObjectStoreOptions): ObjectStore<T>; | |
|
931 | prototype: ObjectStore<api.Item>; | |
|
932 | } | |
|
933 | } | |
|
934 | } |
@@ -0,0 +1,186 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace date { | |
|
3 | ||
|
4 | /* dojo/date */ | |
|
5 | ||
|
6 | /* TODO: Activate for TS 1.8+ */ | |
|
7 | /* type DatePortion = 'date' | 'time' | 'datetime'; */ | |
|
8 | /* type DateInterval = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond' | 'quarter' | 'week' | 'weekday'; */ | |
|
9 | ||
|
10 | interface DateBase { | |
|
11 | /** | |
|
12 | * Returns the number of days in the month used by dateObject | |
|
13 | */ | |
|
14 | getDaysInMonth(dateObject: Date): number; | |
|
15 | ||
|
16 | /** | |
|
17 | * Determines if the year of the dateObject is a leap year | |
|
18 | */ | |
|
19 | isLeapYear(dateObject: Date): boolean; | |
|
20 | ||
|
21 | /** | |
|
22 | * Get the user's time zone as provided by the browser | |
|
23 | */ | |
|
24 | getTimezoneName(dateObject: Date): string; | |
|
25 | ||
|
26 | /** | |
|
27 | * Compare two date objects by date, time, or both. | |
|
28 | * | |
|
29 | */ | |
|
30 | compare(date1: Date, date2: Date, portion?: string /* DatePortion */): number; | |
|
31 | ||
|
32 | /** | |
|
33 | * Add to a Date in intervals of different size, from milliseconds to years | |
|
34 | */ | |
|
35 | add(date: Date, interval: string /* DateInterval */, amount: number): Date; | |
|
36 | ||
|
37 | /** | |
|
38 | * Get the difference in a specific unit of time (e.g., number of | |
|
39 | * months, weeks, days, etc.) between two dates, rounded to the | |
|
40 | * nearest integer. | |
|
41 | */ | |
|
42 | difference(date1: Date, date2?: Date, interval?: string /* DateInterval */): number; | |
|
43 | } | |
|
44 | ||
|
45 | /* dojo/date/locale */ | |
|
46 | ||
|
47 | /* TODO: Activate for TS 1.8+ */ | |
|
48 | /* type DateLocaleFormatSelector = 'time' | 'date'; */ | |
|
49 | /* type DateLocaleFormatLength = 'long' | 'short' | 'medium' | 'full'; */ | |
|
50 | ||
|
51 | interface DateLocaleFormatOptions { | |
|
52 | ||
|
53 | /** | |
|
54 | * choice of 'time','date' (default: date and time) | |
|
55 | */ | |
|
56 | selector?: string; /* DateLocaleFormatSelector */ | |
|
57 | ||
|
58 | /** | |
|
59 | * choice of long, short, medium or full (plus any custom additions). Defaults to 'short' | |
|
60 | */ | |
|
61 | formatLength?: string; /* DateLocaleFormatLength */ | |
|
62 | ||
|
63 | /** | |
|
64 | * override pattern with this string | |
|
65 | */ | |
|
66 | datePattern?: string; | |
|
67 | ||
|
68 | /** | |
|
69 | * override strings for am in times | |
|
70 | */ | |
|
71 | timePattern?: string; | |
|
72 | ||
|
73 | /** | |
|
74 | * override strings for pm in times | |
|
75 | */ | |
|
76 | am?: string; | |
|
77 | ||
|
78 | /** | |
|
79 | * override strings for pm in times | |
|
80 | */ | |
|
81 | pm?: string; | |
|
82 | ||
|
83 | /** | |
|
84 | * override the locale used to determine formatting rules | |
|
85 | */ | |
|
86 | locale?: string; | |
|
87 | ||
|
88 | /** | |
|
89 | * (format only) use 4 digit years whenever 2 digit years are called for | |
|
90 | */ | |
|
91 | fullYear?: boolean; | |
|
92 | ||
|
93 | /** | |
|
94 | * (parse only) strict parsing, off by default | |
|
95 | */ | |
|
96 | strict?: boolean; | |
|
97 | } | |
|
98 | ||
|
99 | interface DateLocale { | |
|
100 | ||
|
101 | /** | |
|
102 | * Returns the zone (or offset) for the given date and options. This | |
|
103 | * is broken out into a separate function so that it can be overridden | |
|
104 | * by timezone-aware code. | |
|
105 | */ | |
|
106 | _getZone(dateObject: Date, getName: boolean, options?: DateLocaleFormatOptions): string | number; | |
|
107 | ||
|
108 | /** | |
|
109 | * Format a Date object as a String, using locale-specific settings. | |
|
110 | */ | |
|
111 | format(dateObject: Date, options?: DateLocaleFormatOptions): string; | |
|
112 | ||
|
113 | /** | |
|
114 | * Builds the regular needed to parse a localized date | |
|
115 | */ | |
|
116 | regexp(options?: DateLocaleFormatOptions): string; | |
|
117 | ||
|
118 | _parseInfo(options?: DateLocaleFormatOptions): { regexp: string, tokens: string[], bundle: any }; | |
|
119 | ||
|
120 | /** | |
|
121 | * Convert a properly formatted string to a primitive Date object, | |
|
122 | * using locale-specific settings. | |
|
123 | */ | |
|
124 | parse(value: string, options?: DateLocaleFormatOptions): Date; | |
|
125 | ||
|
126 | /** | |
|
127 | * Add a reference to a bundle containing localized custom formats to be | |
|
128 | * used by date/time formatting and parsing routines. | |
|
129 | */ | |
|
130 | addCustomFormats(packageName: string, bundleName: string): void; | |
|
131 | ||
|
132 | _getGregorianBundle(locale: string): GenericObject; | |
|
133 | ||
|
134 | /* TODO: string literal types used here */ | |
|
135 | /** | |
|
136 | * Used to get localized strings from dojo.cldr for day or month names. | |
|
137 | */ | |
|
138 | getNames(item: string, type: string, context?: string, locale?: string): string[]; | |
|
139 | ||
|
140 | /** | |
|
141 | * Determines if the date falls on a weekend, according to local custom. | |
|
142 | */ | |
|
143 | isWeekend(dateObject: Date, locale?: string): boolean; | |
|
144 | ||
|
145 | /** | |
|
146 | * gets the day of the year as represented by dateObject | |
|
147 | */ | |
|
148 | _getDayOfYear(dateObject: Date): number; | |
|
149 | ||
|
150 | _getWeekOfYear(dateObject: Date, firstDayOfWeek?: number): number; | |
|
151 | } | |
|
152 | ||
|
153 | /* dojo/date/stamp */ | |
|
154 | ||
|
155 | interface StampFormatOptions { | |
|
156 | ||
|
157 | /** | |
|
158 | * "date" or "time" for partial formatting of the Date object. | |
|
159 | * Both date and time will be formatted by default. | |
|
160 | */ | |
|
161 | selector?: string /* DateLocaleFormatSelector */; | |
|
162 | ||
|
163 | /** | |
|
164 | * if true, UTC/GMT is used for a timezone | |
|
165 | */ | |
|
166 | zulu?: boolean; | |
|
167 | ||
|
168 | /** | |
|
169 | * if true, output milliseconds | |
|
170 | */ | |
|
171 | milliseconds?: boolean; | |
|
172 | } | |
|
173 | ||
|
174 | interface Stamp { | |
|
175 | /** | |
|
176 | * Returns a Date object given a string formatted according to a subset of the ISO-8601 standard. | |
|
177 | */ | |
|
178 | fromISOString(formattedString: string, defaultTime?: number): Date; | |
|
179 | ||
|
180 | /** | |
|
181 | * Format a Date object as a string according a subset of the ISO-8601 standard | |
|
182 | */ | |
|
183 | toISOString(dateObject: Date, options?: StampFormatOptions): string; | |
|
184 | } | |
|
185 | } | |
|
186 | } |
This diff has been collapsed as it changes many lines, (825 lines changed) Show them Hide them | |||
@@ -0,0 +1,825 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace dnd { | |
|
3 | ||
|
4 | /* implied types */ | |
|
5 | ||
|
6 | interface DndLocation { | |
|
7 | t: number; | |
|
8 | l: number; | |
|
9 | } | |
|
10 | ||
|
11 | /* dojo/dnd/autoscroll */ | |
|
12 | ||
|
13 | interface AutoScroll { | |
|
14 | getViewport(doc?: Document): DomGeometryBox; | |
|
15 | V_TRIGGER_AUTOSCROLL: number; | |
|
16 | H_TRIGGER_AUTOSCROLL: number; | |
|
17 | V_AUTOSCROLL_VALUE: number; | |
|
18 | H_AUTOSCROLL_VALUE: number; | |
|
19 | ||
|
20 | /** | |
|
21 | * Called at the start of a drag. | |
|
22 | */ | |
|
23 | autoScrollStart(d: Document): void; | |
|
24 | ||
|
25 | /** | |
|
26 | * a handler for mousemove and touchmove events, which scrolls the window, if | |
|
27 | * necessary | |
|
28 | */ | |
|
29 | autoScroll(e: Event): void; | |
|
30 | ||
|
31 | _validNodes: { div: number; p: number; td: number; }; | |
|
32 | _validOverflow: { auto: number; scroll: number; }; | |
|
33 | ||
|
34 | /** | |
|
35 | * a handler for mousemove and touchmove events, which scrolls the first available | |
|
36 | * Dom element, it falls back to exports.autoScroll() | |
|
37 | */ | |
|
38 | autoScrollNodes(e: Event): void; | |
|
39 | } | |
|
40 | ||
|
41 | /* dojo/dnd/AutoSource */ | |
|
42 | ||
|
43 | interface AutoSource extends Source { } | |
|
44 | ||
|
45 | interface AutoSourceConstructor { | |
|
46 | new (node: NodeOrString, params?: SourceArgs): AutoSource; | |
|
47 | prototype: AutoSource; | |
|
48 | } | |
|
49 | ||
|
50 | /* dojo/dnd/Avatar */ | |
|
51 | ||
|
52 | interface Avatar { | |
|
53 | ||
|
54 | /** | |
|
55 | * constructor function; | |
|
56 | * it is separate so it can be (dynamically) overwritten in case of need | |
|
57 | */ | |
|
58 | construct(): void; | |
|
59 | ||
|
60 | /** | |
|
61 | * destructor for the avatar; called to remove all references so it can be garbage-collected | |
|
62 | */ | |
|
63 | destroy(): void; | |
|
64 | ||
|
65 | /** | |
|
66 | * updates the avatar to reflect the current DnD state | |
|
67 | */ | |
|
68 | update(): void; | |
|
69 | ||
|
70 | /** | |
|
71 | * generates a proper text to reflect copying or moving of items | |
|
72 | */ | |
|
73 | _generateText(): string; | |
|
74 | ||
|
75 | } | |
|
76 | ||
|
77 | interface AvatarConstructor { | |
|
78 | new (manager: Manager): Avatar; | |
|
79 | prototype: Avatar; | |
|
80 | } | |
|
81 | ||
|
82 | /* dojo/dnd/common */ | |
|
83 | ||
|
84 | interface Common { | |
|
85 | ||
|
86 | getCopyKeyState(evt: Event): boolean; | |
|
87 | ||
|
88 | _uniqueId: number; | |
|
89 | ||
|
90 | /** | |
|
91 | * returns a unique string for use with any DOM element | |
|
92 | */ | |
|
93 | getUniqueId(): number; | |
|
94 | ||
|
95 | _empty: { }; | |
|
96 | ||
|
97 | /** | |
|
98 | * returns true if user clicked on a form element | |
|
99 | */ | |
|
100 | isFormElement(e: Event): boolean; | |
|
101 | } | |
|
102 | ||
|
103 | /* dojo/dnd/Container */ | |
|
104 | ||
|
105 | interface ContainerItem<T extends GenericObject> { | |
|
106 | type?: string[]; | |
|
107 | data?: T; | |
|
108 | } | |
|
109 | ||
|
110 | interface ContainerArgs { | |
|
111 | ||
|
112 | /** | |
|
113 | * a creator function, which takes a data item, and returns an object like that: | |
|
114 | * {node: newNode, data: usedData, type: arrayOfStrings} | |
|
115 | */ | |
|
116 | creator<T>(data?: ContainerItem<T>): { node: Element; data: T; type: string[]; }; | |
|
117 | ||
|
118 | /** | |
|
119 | * don't start the drag operation, if clicked on form elements | |
|
120 | */ | |
|
121 | skipForm: boolean; | |
|
122 | ||
|
123 | /** | |
|
124 | * node or node's id to use as the parent node for dropped items | |
|
125 | * (must be underneath the 'node' parameter in the DOM) | |
|
126 | */ | |
|
127 | dropParent: NodeOrString; | |
|
128 | ||
|
129 | /** | |
|
130 | * skip startup(), which collects children, for deferred initialization | |
|
131 | * (this is used in the markup mode) | |
|
132 | */ | |
|
133 | _skipStartup: boolean; | |
|
134 | } | |
|
135 | ||
|
136 | interface Container extends Evented { | |
|
137 | ||
|
138 | /** | |
|
139 | * Indicates whether to allow dnd item nodes to be nested within other elements. | |
|
140 | * By default this is false, indicating that only direct children of the container can | |
|
141 | * be draggable dnd item nodes | |
|
142 | */ | |
|
143 | skipForm: boolean; | |
|
144 | ||
|
145 | /** | |
|
146 | * Indicates whether to allow dnd item nodes to be nested within other elements. | |
|
147 | * By default this is false, indicating that only direct children of the container can | |
|
148 | * be draggable dnd item nodes | |
|
149 | */ | |
|
150 | allowNested: boolean; | |
|
151 | ||
|
152 | /** | |
|
153 | * The DOM node the mouse is currently hovered over | |
|
154 | */ | |
|
155 | current: HTMLElement; | |
|
156 | ||
|
157 | /** | |
|
158 | * Map from an item's id (which is also the DOMNode's id) to | |
|
159 | * the dojo/dnd/Container.Item itself. | |
|
160 | */ | |
|
161 | map: { [name: string]: ContainerItem<any> }; | |
|
162 | ||
|
163 | /** | |
|
164 | * creator function, dummy at the moment | |
|
165 | */ | |
|
166 | creator<T>(data?: ContainerItem<T>): { node: Element; data: T; type: string[]; }; | |
|
167 | ||
|
168 | /** | |
|
169 | * returns a data item by its key (id) | |
|
170 | */ | |
|
171 | getItem<T>(key: string): ContainerItem<T>; | |
|
172 | ||
|
173 | /** | |
|
174 | * associates a data item with its key (id) | |
|
175 | */ | |
|
176 | setITem<T>(key: string, data: ContainerItem<T>): void; | |
|
177 | ||
|
178 | /** | |
|
179 | * removes a data item from the map by its key (id) | |
|
180 | */ | |
|
181 | delItem(key: string): void; | |
|
182 | ||
|
183 | /** | |
|
184 | * iterates over a data map skipping members that | |
|
185 | * are present in the empty object (IE and/or 3rd-party libraries). | |
|
186 | */ | |
|
187 | forInItems<T, U>(f: (i: ContainerItem<T>, idx?: number, container?: Container) => void, o?: U): U; | |
|
188 | ||
|
189 | /** | |
|
190 | * removes all data items from the map | |
|
191 | */ | |
|
192 | clearItems(): void; | |
|
193 | ||
|
194 | /** | |
|
195 | * returns a list (an array) of all valid child nodes | |
|
196 | */ | |
|
197 | getAllNodes(): NodeList<Node>; | |
|
198 | ||
|
199 | /** | |
|
200 | * sync up the node list with the data map | |
|
201 | */ | |
|
202 | sync(): this; | |
|
203 | ||
|
204 | /** | |
|
205 | * inserts an array of new nodes before/after an anchor node | |
|
206 | */ | |
|
207 | insertNodes(data: ContainerItem<any>[], before?: boolean, anchor?: Element): this; | |
|
208 | ||
|
209 | /** | |
|
210 | * prepares this object to be garbage-collected | |
|
211 | */ | |
|
212 | destroy(): void; | |
|
213 | ||
|
214 | markupFactory<T>(params: ContainerArgs, node: Element, Ctor: GenericConstructor<T>): T; | |
|
215 | ||
|
216 | /** | |
|
217 | * collects valid child items and populate the map | |
|
218 | */ | |
|
219 | startup(): void; | |
|
220 | ||
|
221 | /** | |
|
222 | * event processor for onmouseover or touch, to mark that element as the current element | |
|
223 | */ | |
|
224 | onMouseOver(e: Event): void; | |
|
225 | ||
|
226 | /** | |
|
227 | * event processor for onmouseout | |
|
228 | */ | |
|
229 | onMouseOut(e: Event): void; | |
|
230 | ||
|
231 | /** | |
|
232 | * event processor for onselectevent and ondragevent | |
|
233 | */ | |
|
234 | onSelectStart(e: Event): void; | |
|
235 | ||
|
236 | /** | |
|
237 | * this function is called once, when mouse is over our container | |
|
238 | */ | |
|
239 | onOverEvent(e: Event): void; | |
|
240 | ||
|
241 | /** | |
|
242 | * this function is called once, when mouse is out of our container | |
|
243 | */ | |
|
244 | onOutEvent(e: Event): void; | |
|
245 | ||
|
246 | /** | |
|
247 | * changes a named state to new state value | |
|
248 | */ | |
|
249 | _changeState(type: string, newState: string): void; | |
|
250 | ||
|
251 | /** | |
|
252 | * adds a class with prefix "dojoDndItem" | |
|
253 | */ | |
|
254 | _addItemClass(node: Element, type: string): void; | |
|
255 | ||
|
256 | /** | |
|
257 | * removes a class with prefix "dojoDndItem" | |
|
258 | */ | |
|
259 | _removeItemClass(node: Element, type: string): void; | |
|
260 | ||
|
261 | /** | |
|
262 | * gets a child, which is under the mouse at the moment, or null | |
|
263 | */ | |
|
264 | _getChildByEvent(e: Event): void; | |
|
265 | ||
|
266 | /** | |
|
267 | * adds all necessary data to the output of the user-supplied creator function | |
|
268 | */ | |
|
269 | _normalizedCreator<T>(item: ContainerItem<T>, hint: string): this; | |
|
270 | } | |
|
271 | ||
|
272 | interface ContainerConstructor { | |
|
273 | /** | |
|
274 | * a constructor of the Container | |
|
275 | */ | |
|
276 | new (node: NodeOrString, params?: ContainerArgs): Container; | |
|
277 | prototype: Container; | |
|
278 | } | |
|
279 | ||
|
280 | interface Common { | |
|
281 | ||
|
282 | /** | |
|
283 | * returns a function, which creates an element of given tag | |
|
284 | * (SPAN by default) and sets its innerHTML to given text | |
|
285 | */ | |
|
286 | _createNode(tag: string): (text: string) => HTMLElement; | |
|
287 | ||
|
288 | /** | |
|
289 | * creates a TR/TD structure with given text as an innerHTML of TD | |
|
290 | */ | |
|
291 | _createTrTd(text: string): HTMLTableRowElement; | |
|
292 | ||
|
293 | /** | |
|
294 | * creates a SPAN element with given text as its innerHTML | |
|
295 | */ | |
|
296 | _createSpan(text: string): HTMLSpanElement; | |
|
297 | ||
|
298 | /** | |
|
299 | * a dictionary that maps container tag names to child tag names | |
|
300 | */ | |
|
301 | _defaultCreatorNodes: { ul: string, ol: string, div: string, p: string }; | |
|
302 | ||
|
303 | /** | |
|
304 | * takes a parent node, and returns an appropriate creator function | |
|
305 | */ | |
|
306 | _defaultCreator<T>(node: HTMLElement): { node: HTMLElement; data: T; type: string }; | |
|
307 | } | |
|
308 | ||
|
309 | /* dojo/dnd/Manager */ | |
|
310 | ||
|
311 | interface Manager extends Evented { | |
|
312 | OFFSET_X: number; | |
|
313 | OFFSET_Y: number; | |
|
314 | ||
|
315 | overSource(source: Source): void; | |
|
316 | outSource(source: Source): void; | |
|
317 | startDrag(source: Source, nodes: HTMLElement[], copy?: boolean): void; | |
|
318 | canDrop(flag: boolean): void; | |
|
319 | stopDrag(): void; | |
|
320 | makeAvatar(): Avatar; | |
|
321 | updateAvatar(): void; | |
|
322 | onMouseMove(e: MouseEvent): void; | |
|
323 | onMouseUp(e: MouseEvent): void; | |
|
324 | onKeyDown(e: KeyboardEvent): void; | |
|
325 | onKeyUp(e: KeyboardEvent): void; | |
|
326 | _setCopyStatus(copy?: boolean): void; | |
|
327 | } | |
|
328 | ||
|
329 | interface ManagerConstructor { | |
|
330 | /** | |
|
331 | * the manager of DnD operations (usually a singleton) | |
|
332 | */ | |
|
333 | new (): Manager; | |
|
334 | prototype: Manager; | |
|
335 | ||
|
336 | /** | |
|
337 | * Returns the current DnD manager. Creates one if it is not created yet. | |
|
338 | */ | |
|
339 | manager(): Manager; | |
|
340 | } | |
|
341 | ||
|
342 | interface Common { | |
|
343 | _manager: Manager; | |
|
344 | } | |
|
345 | ||
|
346 | /* dojo/dnd/move */ | |
|
347 | ||
|
348 | interface Move { | |
|
349 | constrainedMoveable: ConstrainedMoveableConstructor; | |
|
350 | boxConstrainedMoveable: BoxConstrainedMoveableConstructor; | |
|
351 | parentConstrainedMoveable: ParentConstrainedMoveableConstructor; | |
|
352 | } | |
|
353 | ||
|
354 | interface ConstrainedMoveableArgs extends MoveableArgs { | |
|
355 | /** | |
|
356 | * Calculates a constraint box. | |
|
357 | * It is called in a context of the moveable object. | |
|
358 | */ | |
|
359 | constraints?: () => DomGeometryBox; | |
|
360 | ||
|
361 | /** | |
|
362 | * restrict move within boundaries. | |
|
363 | */ | |
|
364 | within?: boolean; | |
|
365 | } | |
|
366 | ||
|
367 | interface ConstrainedMoveable extends Moveable { | |
|
368 | /** | |
|
369 | * Calculates a constraint box. | |
|
370 | * It is called in a context of the moveable object. | |
|
371 | */ | |
|
372 | constraints: () => DomGeometryBox; | |
|
373 | ||
|
374 | /** | |
|
375 | * restrict move within boundaries. | |
|
376 | */ | |
|
377 | within: boolean; | |
|
378 | } | |
|
379 | ||
|
380 | interface ConstrainedMoveableConstructor { | |
|
381 | /** | |
|
382 | * an object that makes a node moveable | |
|
383 | */ | |
|
384 | new (node: NodeOrString, params?: ConstrainedMoveableArgs): ConstrainedMoveable; | |
|
385 | } | |
|
386 | ||
|
387 | interface BoxConstrainedMoveableArgs extends ConstrainedMoveableArgs { | |
|
388 | /** | |
|
389 | * a constraint box | |
|
390 | */ | |
|
391 | box?: DomGeometryBox; | |
|
392 | } | |
|
393 | ||
|
394 | interface BoxConstrainedMoveable extends ConstrainedMoveable { | |
|
395 | /** | |
|
396 | * a constraint box | |
|
397 | */ | |
|
398 | box: DomGeometryBox; | |
|
399 | } | |
|
400 | ||
|
401 | interface BoxConstrainedMoveableConstructor { | |
|
402 | /** | |
|
403 | * an object, which makes a node moveable | |
|
404 | */ | |
|
405 | new (node: NodeOrString, params?: BoxConstrainedMoveableArgs): BoxConstrainedMoveable; | |
|
406 | } | |
|
407 | ||
|
408 | type ConstraintArea = 'border' | 'content' | 'margin' | 'padding'; | |
|
409 | ||
|
410 | interface ParentConstrainedMoveableArgs extends ConstrainedMoveableArgs { | |
|
411 | /** | |
|
412 | * A parent's area to restrict the move. | |
|
413 | * Can be "margin", "border", "padding", or "content". | |
|
414 | */ | |
|
415 | area?: ConstraintArea; | |
|
416 | } | |
|
417 | ||
|
418 | interface ParentConstrainedMoveable extends ConstrainedMoveable { | |
|
419 | /** | |
|
420 | * A parent's area to restrict the move. | |
|
421 | * Can be "margin", "border", "padding", or "content". | |
|
422 | */ | |
|
423 | area: ConstraintArea; | |
|
424 | } | |
|
425 | ||
|
426 | interface ParentConstrainedMoveableConstructor { | |
|
427 | /** | |
|
428 | * an object, which makes a node moveable | |
|
429 | */ | |
|
430 | new (node: NodeOrString, params?: ParentConstrainedMoveableArgs): ParentConstrainedMoveable; | |
|
431 | } | |
|
432 | ||
|
433 | /* dojo/dnd/Moveable */ | |
|
434 | ||
|
435 | interface MoveableArgs { | |
|
436 | /** | |
|
437 | * A node (or node's id), which is used as a mouse handle. | |
|
438 | * If omitted, the node itself is used as a handle. | |
|
439 | */ | |
|
440 | handle?: NodeOrString; | |
|
441 | ||
|
442 | /** | |
|
443 | * delay move by this number of pixels | |
|
444 | */ | |
|
445 | delay?: number; | |
|
446 | ||
|
447 | /** | |
|
448 | * skip move of form elements | |
|
449 | */ | |
|
450 | skip?: boolean; | |
|
451 | ||
|
452 | /** | |
|
453 | * a constructor of custom Mover | |
|
454 | */ | |
|
455 | mover?: MoverConstructor; | |
|
456 | } | |
|
457 | ||
|
458 | interface Moveable { | |
|
459 | /** | |
|
460 | * markup methods | |
|
461 | */ | |
|
462 | markupFactory<T>(params: MoveableArgs, node: HTMLElement, Ctor: GenericConstructor<T>): T; | |
|
463 | ||
|
464 | /** | |
|
465 | * stops watching for possible move, deletes all references, so the object can be garbage-collected | |
|
466 | */ | |
|
467 | destroy(): void; | |
|
468 | ||
|
469 | /** | |
|
470 | * event processor for onmousedown/ontouchstart, creates a Mover for the node | |
|
471 | */ | |
|
472 | onMouseDown(e: MouseEvent): void; | |
|
473 | ||
|
474 | /** | |
|
475 | * event processor for onmousemove/ontouchmove, used only for delayed drags | |
|
476 | */ | |
|
477 | onMouseMove(e: MouseEvent): void; | |
|
478 | ||
|
479 | /** | |
|
480 | * event processor for onmouseup, used only for delayed drags | |
|
481 | */ | |
|
482 | onMouseUp(e: MouseEvent): void; | |
|
483 | ||
|
484 | /** | |
|
485 | * called when the drag is detected; | |
|
486 | * responsible for creation of the mover | |
|
487 | */ | |
|
488 | onDragDetected(e: Event): void; | |
|
489 | ||
|
490 | /** | |
|
491 | * called before every move operation | |
|
492 | */ | |
|
493 | onMoveStart(mover: Mover): void; | |
|
494 | ||
|
495 | /** | |
|
496 | * called after every move operation | |
|
497 | */ | |
|
498 | onMoveStop(mover: Mover): void; | |
|
499 | ||
|
500 | /** | |
|
501 | * called during the very first move notification; | |
|
502 | * can be used to initialize coordinates, can be overwritten. | |
|
503 | */ | |
|
504 | onFirstMove(mover: Mover, e: Event): void; | |
|
505 | ||
|
506 | /** | |
|
507 | * called during every move notification; | |
|
508 | * should actually move the node; can be overwritten. | |
|
509 | */ | |
|
510 | onMove(mover: Mover, leftTop: DndLocation, e?: Event): void; | |
|
511 | ||
|
512 | /** | |
|
513 | * called before every incremental move; can be overwritten. | |
|
514 | */ | |
|
515 | onMoving(mover: Mover, leftTop: DndLocation): void; | |
|
516 | ||
|
517 | /** | |
|
518 | * called after every incremental move; can be overwritten. | |
|
519 | */ | |
|
520 | onMoved(mover: Mover, leftTop: DndLocation): void; | |
|
521 | } | |
|
522 | ||
|
523 | interface MoveableConstructor { | |
|
524 | new (node: NodeOrString, params?: MoveableArgs): Moveable; | |
|
525 | prototype: Moveable; | |
|
526 | } | |
|
527 | ||
|
528 | /* dojo/dnd/Mover */ | |
|
529 | ||
|
530 | interface MoverHost extends GenericObject { | |
|
531 | onMoveStart(mover: Mover): void; | |
|
532 | onMoveStop(mover: Mover): void; | |
|
533 | } | |
|
534 | ||
|
535 | interface Mover extends Evented { | |
|
536 | /** | |
|
537 | * event processor for onmousemove/ontouchmove | |
|
538 | */ | |
|
539 | onMouseMove(e: MouseEvent): void; | |
|
540 | ||
|
541 | onMouseUp(e: MouseEvent): void; | |
|
542 | ||
|
543 | /** | |
|
544 | * makes the node absolute; it is meant to be called only once. | |
|
545 | * relative and absolutely positioned nodes are assumed to use pixel units | |
|
546 | */ | |
|
547 | onFirstMove(e: Event): void; | |
|
548 | ||
|
549 | /** | |
|
550 | * stops the move, deletes all references, so the object can be garbage-collected | |
|
551 | */ | |
|
552 | destroy(): void; | |
|
553 | } | |
|
554 | ||
|
555 | interface MoverConstructor { | |
|
556 | /** | |
|
557 | * an object which makes a node follow the mouse, or touch-drag on touch devices. | |
|
558 | * Used as a default mover, and as a base class for custom movers. | |
|
559 | */ | |
|
560 | new (node: HTMLElement, e: MouseEvent, host: MoverHost): Mover; | |
|
561 | prototype: Mover; | |
|
562 | } | |
|
563 | ||
|
564 | /* dojo/dnd/Selector */ | |
|
565 | ||
|
566 | interface Selector extends Container { | |
|
567 | ||
|
568 | /** | |
|
569 | * The set of id's that are currently selected, such that this.selection[id] == 1 | |
|
570 | * if the node w/that id is selected. Can iterate over selected node's id's like: | |
|
571 | * for(var id in this.selection) | |
|
572 | */ | |
|
573 | selection: { [id: string]: number }; | |
|
574 | ||
|
575 | /** | |
|
576 | * is singular property | |
|
577 | */ | |
|
578 | singular: boolean; | |
|
579 | ||
|
580 | /** | |
|
581 | * returns a list (an array) of selected nodes | |
|
582 | */ | |
|
583 | getSelectedNodes(): NodeList<Node>; | |
|
584 | ||
|
585 | /** | |
|
586 | * unselects all items | |
|
587 | */ | |
|
588 | selectNone(): this; | |
|
589 | ||
|
590 | /** | |
|
591 | * selects all items | |
|
592 | */ | |
|
593 | selectAll(): this; | |
|
594 | ||
|
595 | /** | |
|
596 | * deletes all selected items | |
|
597 | */ | |
|
598 | deleteSelectedNodes(): this; | |
|
599 | ||
|
600 | /** | |
|
601 | * iterates over selected items; | |
|
602 | * see `dojo/dnd/Container.forInItems()` for details | |
|
603 | */ | |
|
604 | forInSelectedItems<T>(f: (i: ContainerItem<T>, idx?: number, container?: Container) => void, o?: GenericObject): void; | |
|
605 | ||
|
606 | /** | |
|
607 | * event processor for onmousemove | |
|
608 | */ | |
|
609 | onMouseMove(e: Event): void; | |
|
610 | ||
|
611 | /** | |
|
612 | * this function is called once, when mouse is over our container | |
|
613 | */ | |
|
614 | onOverEvent(): void; | |
|
615 | ||
|
616 | /** | |
|
617 | * this function is called once, when mouse is out of our container | |
|
618 | */ | |
|
619 | onOutEvent(): void; | |
|
620 | ||
|
621 | /** | |
|
622 | * unselects all items | |
|
623 | */ | |
|
624 | _removeSelection(): this; | |
|
625 | ||
|
626 | _removeAnchor(): this; | |
|
627 | } | |
|
628 | ||
|
629 | interface SelectorConstructor { | |
|
630 | /** | |
|
631 | * constructor of the Selector | |
|
632 | */ | |
|
633 | new (node: NodeOrString, params?: ContainerArgs): Selector; | |
|
634 | prototype: Selector; | |
|
635 | } | |
|
636 | ||
|
637 | /* dojo/dnd/Source */ | |
|
638 | ||
|
639 | /** | |
|
640 | * a dict of parameters for DnD Source configuration. Note that any | |
|
641 | * property on Source elements may be configured, but this is the | |
|
642 | * short-list | |
|
643 | */ | |
|
644 | interface SourceArgs { | |
|
645 | [arg: string]: any; | |
|
646 | ||
|
647 | /** | |
|
648 | * can be used as a DnD source. Defaults to true. | |
|
649 | */ | |
|
650 | isSource?: boolean; | |
|
651 | ||
|
652 | /** | |
|
653 | * list of accepted types (text strings) for a target; defaults to | |
|
654 | * ["text"] | |
|
655 | */ | |
|
656 | accept?: string[]; | |
|
657 | ||
|
658 | /** | |
|
659 | * if true refreshes the node list on every operation; false by default | |
|
660 | */ | |
|
661 | autoSync?: boolean; | |
|
662 | ||
|
663 | /** | |
|
664 | * copy items, if true, use a state of Ctrl key otherwisto | |
|
665 | * see selfCopy and selfAccept for more details | |
|
666 | */ | |
|
667 | copyOnly?: boolean; | |
|
668 | ||
|
669 | /** | |
|
670 | * the move delay in pixels before detecting a drag; 0 by default | |
|
671 | */ | |
|
672 | delay?: number; | |
|
673 | ||
|
674 | /** | |
|
675 | * a horizontal container, if true, vertical otherwise or when omitted | |
|
676 | */ | |
|
677 | horizontal?: boolean; | |
|
678 | ||
|
679 | /** | |
|
680 | * copy items by default when dropping on itself, | |
|
681 | * false by default, works only if copyOnly is true | |
|
682 | */ | |
|
683 | selfCopy?: boolean; | |
|
684 | ||
|
685 | /** | |
|
686 | * accept its own items when copyOnly is true, | |
|
687 | * true by default, works only if copyOnly is true | |
|
688 | */ | |
|
689 | selfAccept?: boolean; | |
|
690 | ||
|
691 | /** | |
|
692 | * allows dragging only by handles, false by default | |
|
693 | */ | |
|
694 | withHandles?: boolean; | |
|
695 | ||
|
696 | /** | |
|
697 | * generate text node for drag and drop, true by default | |
|
698 | */ | |
|
699 | generateText?: boolean; | |
|
700 | } | |
|
701 | ||
|
702 | interface Source extends Selector { | |
|
703 | ||
|
704 | /** | |
|
705 | * checks if the target can accept nodes from this source | |
|
706 | */ | |
|
707 | checkAcceptance(source: Container, nodes: HTMLElement[]): boolean; | |
|
708 | ||
|
709 | /** | |
|
710 | * Returns true if we need to copy items, false to move. | |
|
711 | * It is separated to be overwritten dynamically, if needed. | |
|
712 | */ | |
|
713 | copyState(keyPressed: boolean, self?: boolean): boolean; | |
|
714 | ||
|
715 | /** | |
|
716 | * topic event processor for /dnd/source/over, called when detected a current source | |
|
717 | */ | |
|
718 | onDndSourceOver(source: Container): void; | |
|
719 | ||
|
720 | /** | |
|
721 | * topic event processor for /dnd/start, called to initiate the DnD operation | |
|
722 | */ | |
|
723 | onDndStart(source: Container, nodes: HTMLElement[], copy?: boolean): void; | |
|
724 | ||
|
725 | /** | |
|
726 | * topic event processor for /dnd/drop, called to finish the DnD operation | |
|
727 | */ | |
|
728 | onDndDrop(source: Container, nodes: HTMLElement[], copy: boolean, target: Container): void; | |
|
729 | ||
|
730 | /** | |
|
731 | * topic event processor for /dnd/cancel, called to cancel the DnD operation | |
|
732 | */ | |
|
733 | onDndCancel(): void; | |
|
734 | ||
|
735 | /** | |
|
736 | * called only on the current target, when drop is performed | |
|
737 | */ | |
|
738 | onDrop(source: Container, nodes: HTMLElement[], copy?: boolean): void; | |
|
739 | ||
|
740 | /** | |
|
741 | * called only on the current target, when drop is performed | |
|
742 | * from an external source | |
|
743 | */ | |
|
744 | onDropExternal(source: Container, nodes: HTMLElement[], copy?: boolean): void; | |
|
745 | ||
|
746 | /** | |
|
747 | * called only on the current target, when drop is performed | |
|
748 | * from the same target/source | |
|
749 | */ | |
|
750 | onDropInternal(nodes: HTMLElement[], copy?: boolean): void; | |
|
751 | ||
|
752 | /** | |
|
753 | * called during the active DnD operation, when items | |
|
754 | * are dragged over this target, and it is not disabled | |
|
755 | */ | |
|
756 | onDraggingOver(): void; | |
|
757 | ||
|
758 | /** | |
|
759 | * called during the active DnD operation, when items | |
|
760 | * are dragged away from this target, and it is not disabled | |
|
761 | */ | |
|
762 | onDraggingOut(): void; | |
|
763 | ||
|
764 | /** | |
|
765 | * this function is called once, when mouse is over our container | |
|
766 | */ | |
|
767 | onOverEvent(): void; | |
|
768 | ||
|
769 | /** | |
|
770 | * this function is called once, when mouse is out of our container | |
|
771 | */ | |
|
772 | onOutEvent(): void; | |
|
773 | ||
|
774 | /** | |
|
775 | * assigns a class to the current target anchor based on "before" status | |
|
776 | */ | |
|
777 | _markTargetAnchor(before?: boolean): void; | |
|
778 | ||
|
779 | /** | |
|
780 | * removes a class of the current target anchor based on "before" status | |
|
781 | */ | |
|
782 | _unmarkTargetAnchor(): void; | |
|
783 | ||
|
784 | /** | |
|
785 | * changes source's state based on "copy" status | |
|
786 | */ | |
|
787 | _markDndStatus(copy?: boolean): void; | |
|
788 | ||
|
789 | /** | |
|
790 | * checks if user clicked on "approved" items | |
|
791 | */ | |
|
792 | _legalMouseDown(e?: Event): boolean; | |
|
793 | } | |
|
794 | ||
|
795 | interface SourceConstructor { | |
|
796 | new (node: NodeOrString, params?: SourceArgs): Source; | |
|
797 | prototype: Source; | |
|
798 | } | |
|
799 | ||
|
800 | /* dojo/dnd/Target */ | |
|
801 | ||
|
802 | interface Target extends Source { } | |
|
803 | ||
|
804 | interface TargetConstructor { | |
|
805 | new (node: HTMLElement, params: SourceArgs): Target; | |
|
806 | prototype: Target; | |
|
807 | } | |
|
808 | ||
|
809 | /* dojo/dnd/TimedMoveable */ | |
|
810 | ||
|
811 | interface TimedMoveableArgs extends MoveableArgs { | |
|
812 | timeout?: number; | |
|
813 | } | |
|
814 | ||
|
815 | interface TimedMoveable extends Moveable { | |
|
816 | onMoveStop(mover: Mover): void; | |
|
817 | onMove(mover: Mover, leftTop: DndLocation): void; | |
|
818 | } | |
|
819 | ||
|
820 | interface TimedMoveableConstructor { | |
|
821 | new (node: HTMLElement, params?: TimedMoveableArgs): TimedMoveable; | |
|
822 | prototype: TimedMoveable; | |
|
823 | } | |
|
824 | } | |
|
825 | } |
This diff has been collapsed as it changes many lines, (2101 lines changed) Show them Hide them | |||
@@ -0,0 +1,2101 | |||
|
1 | /// <reference path="index.d.ts" /> | |
|
2 | /// <reference path="../doh/doh.d.ts" /> | |
|
3 | ||
|
4 | declare namespace dojo { | |
|
5 | /* general implied types */ | |
|
6 | ||
|
7 | type NodeOrString = Node | string; | |
|
8 | type ElementOrString = Element | string; | |
|
9 | type NodeFragmentOrString = NodeOrString | DocumentFragment; | |
|
10 | ||
|
11 | interface GenericConstructor<T> { | |
|
12 | new (...args: any[]): T; | |
|
13 | prototype: T; | |
|
14 | } | |
|
15 | ||
|
16 | interface GenericObject { | |
|
17 | [id: string]: any; | |
|
18 | } | |
|
19 | ||
|
20 | interface GenericFunction<T> { | |
|
21 | (...args: any[]): T; | |
|
22 | } | |
|
23 | ||
|
24 | interface Handle { | |
|
25 | remove(): void; | |
|
26 | } | |
|
27 | ||
|
28 | interface EventListener { | |
|
29 | (evt: any): void; | |
|
30 | } | |
|
31 | ||
|
32 | interface BuildProfile { | |
|
33 | resourceTags: { [tag: string]: (filename: string, mid?: string) => boolean; }; | |
|
34 | } | |
|
35 | ||
|
36 | interface Package { | |
|
37 | location?: string; | |
|
38 | main?: string; | |
|
39 | name?: string; | |
|
40 | } | |
|
41 | ||
|
42 | export interface ModuleMap extends ModuleMapItem { | |
|
43 | [ sourceMid: string ]: ModuleMapReplacement; | |
|
44 | } | |
|
45 | ||
|
46 | export interface ModuleMapItem { | |
|
47 | [ mid: string ]: /* ModuleMapReplacement | ModuleMap */ any; | |
|
48 | } | |
|
49 | ||
|
50 | export interface ModuleMapReplacement extends ModuleMapItem { | |
|
51 | [ findMid: string ]: /* replaceMid */ string; | |
|
52 | } | |
|
53 | ||
|
54 | /* dojo/AdapterRegistry */ | |
|
55 | ||
|
56 | interface AdapterRegistry { | |
|
57 | /** | |
|
58 | * register a check function to determine if the wrap function or | |
|
59 | * object gets selected | |
|
60 | */ | |
|
61 | register(name: string, check: (...args: any[]) => boolean, wrap: Function, directReturn?: boolean, override?: boolean): void; | |
|
62 | ||
|
63 | /** | |
|
64 | * Find an adapter for the given arguments. If no suitable adapter | |
|
65 | * is found, throws an exception. match() accepts any number of | |
|
66 | * arguments, all of which are passed to all matching functions | |
|
67 | * from the registered pairs. | |
|
68 | */ | |
|
69 | match(...args: any[]): any; | |
|
70 | ||
|
71 | /** | |
|
72 | * Remove a named adapter from the registry | |
|
73 | */ | |
|
74 | unregister(name: string): boolean; | |
|
75 | } | |
|
76 | ||
|
77 | interface AdapterRegistryConstructor { | |
|
78 | new (returnWrappers?: boolean): AdapterRegistry; | |
|
79 | prototype: AdapterRegistry; | |
|
80 | } | |
|
81 | ||
|
82 | /* dojo/aspect */ | |
|
83 | ||
|
84 | interface AfterAdvice<T> { | |
|
85 | (result: T, ...args: any[]): T; | |
|
86 | } | |
|
87 | ||
|
88 | interface AroundAdvice<T> { | |
|
89 | (origFn: GenericFunction<T>): (...args: any[]) => T; | |
|
90 | } | |
|
91 | ||
|
92 | interface BeforeAdvice { | |
|
93 | (...args: any[]): any[] | void; | |
|
94 | } | |
|
95 | ||
|
96 | interface Aspect { | |
|
97 | /** | |
|
98 | * The "before" export of the aspect module is a function that can be used to attach | |
|
99 | * "before" advice to a method. This function will be executed before the original attach | |
|
100 | * is executed. This function will be called with the arguments used to call the mattach | |
|
101 | * This function may optionally return an array as the new arguments to use tattach | |
|
102 | * the original method (or the previous, next-to-execute before advice, if one exattach | |
|
103 | * If the before method doesn't return anything (returns undefined) the original argattach | |
|
104 | * will be presattach | |
|
105 | * If there are multiple "before" advisors, they are executed in the reverse order they were registered. | |
|
106 | */ | |
|
107 | before<T>(target: GenericObject, methodName: string, advice: BeforeAdvice | Function): Handle; | |
|
108 | ||
|
109 | /** | |
|
110 | * The "around" export of the aspect module is a function that can be used to attach | |
|
111 | * "around" advice to a method. The advisor function is immediately executeattach | |
|
112 | * the around() is called, is passed a single argument that is a function that attach | |
|
113 | * called to continue execution of the original method (or the next around advattach | |
|
114 | * The advisor function should return a function, and this function will be called whattach | |
|
115 | * the method is called. It will be called with the arguments used to call the mattach | |
|
116 | * Whatever this function returns will be returned as the result of the method call (unless after advise changes it). | |
|
117 | */ | |
|
118 | around<T>(target: GenericObject, methodName: string, advice: AroundAdvice<T> | Function): Handle; | |
|
119 | ||
|
120 | /** | |
|
121 | * The "after" export of the aspect module is a function that can be used to attach | |
|
122 | * "after" advice to a method. This function will be executed after the original method | |
|
123 | * is executed. By default the function will be called with a single argument, the return | |
|
124 | * value of the original method, or the the return value of the last executed advice (if a previous one exists). | |
|
125 | * The fourth (optional) argument can be set to true to so the function receives the original | |
|
126 | * arguments (from when the original method was called) rather than the return value. | |
|
127 | * If there are multiple "after" advisors, they are executed in the order they were registered. | |
|
128 | */ | |
|
129 | after<T>(target: GenericObject, methodName: string, advice: AfterAdvice<T> | Function, receiveArguments?: boolean): Handle; | |
|
130 | } | |
|
131 | ||
|
132 | /* dojo/back */ | |
|
133 | ||
|
134 | interface BackArgs { | |
|
135 | back?: GenericFunction<void>; | |
|
136 | forward?: GenericFunction<void>; | |
|
137 | changeUrl?: boolean | string; | |
|
138 | } | |
|
139 | ||
|
140 | interface Back { | |
|
141 | getHash(): string; | |
|
142 | setHash(h: string): void; | |
|
143 | ||
|
144 | /** | |
|
145 | * private method. Do not call this directly. | |
|
146 | */ | |
|
147 | goBack(): void; | |
|
148 | ||
|
149 | /** | |
|
150 | * private method. Do not call this directly. | |
|
151 | */ | |
|
152 | goForward(): void; | |
|
153 | ||
|
154 | /** | |
|
155 | * Initializes the undo stack. This must be called from a <script> | |
|
156 | * block that lives inside the `<body>` tag to prevent bugs on IE. | |
|
157 | * Only call this method before the page's DOM is finished loading. Otherwise | |
|
158 | * it will not work. Be careful with xdomain loading or djConfig.debugAtAllCosts scenarios, | |
|
159 | * in order for this method to work, dojo/back will need to be part of a build layer. | |
|
160 | */ | |
|
161 | init(): void; | |
|
162 | ||
|
163 | /** | |
|
164 | * Sets the state object and back callback for the very first page | |
|
165 | * that is loaded. | |
|
166 | * It is recommended that you call this method as part of an event | |
|
167 | * listener that is registered via dojo/ready. | |
|
168 | */ | |
|
169 | setInitialState(args: BackArgs): void; | |
|
170 | ||
|
171 | /** | |
|
172 | * adds a state object (args) to the history list. | |
|
173 | */ | |
|
174 | addToHistory(args: BackArgs): void; | |
|
175 | ||
|
176 | /** | |
|
177 | * private method. Do not call this directly. | |
|
178 | */ | |
|
179 | _iframeLoaded(evt: Event, ifrLoc: Location): void; | |
|
180 | } | |
|
181 | ||
|
182 | /* dojo/behavior */ | |
|
183 | ||
|
184 | interface Behavior { | |
|
185 | _behaviors: { [selector: string]: any }; | |
|
186 | ||
|
187 | /** | |
|
188 | * Add the specified behavior to the list of behaviors, ignoring existing | |
|
189 | * matches. | |
|
190 | */ | |
|
191 | add(behaviorObject: { [selector: string]: any }): void; | |
|
192 | ||
|
193 | /** | |
|
194 | * Applies all currently registered behaviors to the document. | |
|
195 | */ | |
|
196 | apply(): void; | |
|
197 | } | |
|
198 | ||
|
199 | /* dojo/cookie */ | |
|
200 | ||
|
201 | interface CookieProps { | |
|
202 | expires?: Date | string | number; | |
|
203 | path?: string; | |
|
204 | domain?: string; | |
|
205 | secure?: boolean; | |
|
206 | } | |
|
207 | ||
|
208 | interface Cookie { | |
|
209 | /* Get or set a cookie. */ | |
|
210 | (name: string, value?: string, props?: CookieProps): string; | |
|
211 | ||
|
212 | /** | |
|
213 | * Use to determine if the current browser supports cookies or not. | |
|
214 | */ | |
|
215 | isSupported(): boolean; | |
|
216 | } | |
|
217 | ||
|
218 | /* dojo/currency */ | |
|
219 | ||
|
220 | interface CurrencyFormatOptions extends NumberFormatOptions { | |
|
221 | ||
|
222 | /** | |
|
223 | * Should not be set. Value is assumed to be "currency". | |
|
224 | */ | |
|
225 | type?: string; | |
|
226 | ||
|
227 | /** | |
|
228 | * localized currency symbol. The default will be looked up in table of supported currencies in `dojo.cldr` | |
|
229 | * A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found. | |
|
230 | */ | |
|
231 | symbol?: string; | |
|
232 | ||
|
233 | /** | |
|
234 | * an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD". | |
|
235 | * For use with dojo.currency only. | |
|
236 | */ | |
|
237 | currency?: string; | |
|
238 | ||
|
239 | /** | |
|
240 | * number of decimal places to show. Default is defined based on which currency is used. | |
|
241 | */ | |
|
242 | places?: number; | |
|
243 | } | |
|
244 | ||
|
245 | interface CurrencyParseOptions extends NumberParseOptions { | |
|
246 | ||
|
247 | /** | |
|
248 | * Should not be set. Value is assumed to be "currency". | |
|
249 | */ | |
|
250 | type?: string; | |
|
251 | ||
|
252 | /** | |
|
253 | * localized currency symbol. The default will be looked up in table of supported currencies in `dojo.cldr` | |
|
254 | * A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found. | |
|
255 | */ | |
|
256 | symbol?: string; | |
|
257 | ||
|
258 | /** | |
|
259 | * an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD". | |
|
260 | * For use with dojo.currency only. | |
|
261 | */ | |
|
262 | currency?: string; | |
|
263 | ||
|
264 | /** | |
|
265 | * number of decimal places to show. Default is defined based on which currency is used. | |
|
266 | */ | |
|
267 | places?: number; | |
|
268 | ||
|
269 | /** | |
|
270 | * Whether to include the fractional portion, where the number of decimal places are implied by the currency | |
|
271 | * or explicit 'places' parameter. The value [true,false] makes the fractional portion optional. | |
|
272 | * By default for currencies, it the fractional portion is optional. | |
|
273 | */ | |
|
274 | fractional?: boolean | [boolean, boolean]; | |
|
275 | } | |
|
276 | ||
|
277 | interface Currency { | |
|
278 | _mixInDefaults(options: NumberFormatOptions): CurrencyFormatOptions; | |
|
279 | ||
|
280 | /** | |
|
281 | * Format a Number as a currency, using locale-specific settings | |
|
282 | */ | |
|
283 | format(value: number, options?: CurrencyFormatOptions): string; | |
|
284 | ||
|
285 | /** | |
|
286 | * Builds the regular needed to parse a currency value | |
|
287 | */ | |
|
288 | regexp(options?: NumberRegexpOptions): string; | |
|
289 | ||
|
290 | /** | |
|
291 | * Convert a properly formatted currency string to a primitive Number, | |
|
292 | * using locale-specific settings. | |
|
293 | */ | |
|
294 | parse(expression: string, options?: CurrencyParseOptions): number; | |
|
295 | } | |
|
296 | ||
|
297 | /* dojo/debounce */ | |
|
298 | ||
|
299 | interface Debounce { | |
|
300 | /** | |
|
301 | * Create a function that will only execute after `wait` milliseconds | |
|
302 | */ | |
|
303 | <T extends Function>(cb: T, wait: number): T; | |
|
304 | <T extends Function>(cb: Function, wait: number, ...args: any[]): T; | |
|
305 | } | |
|
306 | ||
|
307 | /* dojo/Deferred */ | |
|
308 | ||
|
309 | interface Deferred<T> { | |
|
310 | ||
|
311 | /** | |
|
312 | * The public promise object that clients can add callbacks to. | |
|
313 | */ | |
|
314 | promise: promise.Promise<T>; | |
|
315 | ||
|
316 | /** | |
|
317 | * Checks whether the deferred has been resolved. | |
|
318 | */ | |
|
319 | isResolved(): boolean; | |
|
320 | ||
|
321 | /** | |
|
322 | * Checks whether the deferred has been rejected. | |
|
323 | */ | |
|
324 | isRejected(): boolean; | |
|
325 | ||
|
326 | /** | |
|
327 | * Checks whether the deferred has been resolved or rejected. | |
|
328 | */ | |
|
329 | isFulfilled(): boolean; | |
|
330 | ||
|
331 | /** | |
|
332 | * Checks whether the deferred has been canceled. | |
|
333 | */ | |
|
334 | isCanceled(): boolean; | |
|
335 | ||
|
336 | /** | |
|
337 | * Emit a progress update on the deferred. | |
|
338 | */ | |
|
339 | progress(update: any, strict?: boolean): promise.Promise<T>; | |
|
340 | ||
|
341 | /** | |
|
342 | * Resolve the deferred. | |
|
343 | */ | |
|
344 | resolve(value?: T, strict?: boolean): promise.Promise<T>; | |
|
345 | ||
|
346 | /** | |
|
347 | * Reject the deferred. | |
|
348 | */ | |
|
349 | reject(error?: any, strict?: boolean): promise.Promise<T>; | |
|
350 | ||
|
351 | /** | |
|
352 | * Add new callbacks to the deferred. | |
|
353 | */ | |
|
354 | then<U>(callback?: promise.PromiseCallback<T, U>, errback?: promise.PromiseErrback<U>, progback?: promise.PromiseProgback): promise.Promise<U>; | |
|
355 | ||
|
356 | /** | |
|
357 | * Inform the deferred it may cancel its asynchronous operation. | |
|
358 | */ | |
|
359 | cancel(reason?: any, strict?: boolean): any; | |
|
360 | ||
|
361 | /** | |
|
362 | * Returns `[object Deferred]`. | |
|
363 | */ | |
|
364 | toString(): string; | |
|
365 | } | |
|
366 | ||
|
367 | interface DeferredConstructor { | |
|
368 | /** | |
|
369 | * Creates a new deferred. This API is preferred over | |
|
370 | * `dojo/_base/Deferred`. | |
|
371 | */ | |
|
372 | new <T>(canceller?: (reason: any) => void): Deferred<T>; | |
|
373 | prototype: Deferred<any>; | |
|
374 | } | |
|
375 | ||
|
376 | /* dojo/DeferredList */ | |
|
377 | ||
|
378 | interface DeferredList<T> extends Deferred<T[]> { | |
|
379 | /** | |
|
380 | * Gathers the results of the deferreds for packaging | |
|
381 | * as the parameters to the Deferred Lists' callback | |
|
382 | */ | |
|
383 | gatherResults<T>(deferredList: DeferredList<any>): DeferredList<T>; | |
|
384 | } | |
|
385 | ||
|
386 | interface DeferredListConstructor { | |
|
387 | /** | |
|
388 | * Deprecated, use dojo/promise/all instead. | |
|
389 | * Provides event handling for a group of Deferred objects. | |
|
390 | */ | |
|
391 | new <T>(list: T[], fireOnOneCallback?: boolean, fireOnOneErrback?: boolean, consumeErrors?: boolean, canceller?: (reason: any) => void): DeferredList<T>; | |
|
392 | prototype: DeferredList<any>; | |
|
393 | } | |
|
394 | ||
|
395 | /* dojo/dojo */ | |
|
396 | ||
|
397 | interface RequireTrace { | |
|
398 | (group: string, args: any[]): void; | |
|
399 | on: boolean | number; | |
|
400 | group: GenericObject; | |
|
401 | set(group: string | GenericObject, value: any): void; | |
|
402 | } | |
|
403 | ||
|
404 | interface Require { | |
|
405 | (config: GenericObject, dependencies: string[], callback?: GenericFunction<void>): Require; | |
|
406 | (dependencies: string[], callback: GenericFunction<void>): Require; | |
|
407 | async: number| boolean; | |
|
408 | has: dojo.Has; | |
|
409 | isXdurl(url: string): boolean; | |
|
410 | initSyncLoader(dojoRequirePlugin: any, checkDojoRequirePlugin: any, transformToAmd: any): GenericObject; | |
|
411 | getXhr(): XMLHttpRequest | ActiveXObject; | |
|
412 | getText(url: string, async?: boolean, onLoad?: (responseText: string, async?: boolean) => void): string; | |
|
413 | eval(text: string, hint?: string): any; | |
|
414 | signal(type: string, args: any[]): void; | |
|
415 | on(type: string, listener: (...args: any[]) => void): Handle; | |
|
416 | map: { [id: string]: any }; | |
|
417 | waitms?: number; | |
|
418 | legacyMode: boolean; | |
|
419 | rawConfig: dojo._base.Config; | |
|
420 | baseUrl: string; | |
|
421 | combo?: { | |
|
422 | add: () => void; | |
|
423 | done(callback: (mids: string[], url?: string) => void, req: Require): void; | |
|
424 | plugins?: GenericObject; | |
|
425 | }; | |
|
426 | idle(): boolean; | |
|
427 | toAbsMid(mid: string, referenceModule?: string): string; | |
|
428 | toUrl(name: string, referenceModule?: string): string; | |
|
429 | undef(moduleId: string, referenceModule?: string): void; | |
|
430 | pageLoaded: number | boolean; | |
|
431 | injectUrl(url: string, callback?: () => void, owner?: HTMLScriptElement): HTMLScriptElement; | |
|
432 | log(...args: any[]): void; | |
|
433 | trace: RequireTrace; | |
|
434 | boot?: [string[], Function] | number; | |
|
435 | } | |
|
436 | ||
|
437 | interface Define { | |
|
438 | (mid: string, dependencies?: string[], factory?: any): void; | |
|
439 | (dependencies: string[], factory?: any): void; | |
|
440 | amd: string; | |
|
441 | } | |
|
442 | ||
|
443 | /* dojo/dom */ | |
|
444 | ||
|
445 | interface Dom { | |
|
446 | /** | |
|
447 | * Returns DOM node with matching `id` attribute or falsy value (ex: null or undefined) | |
|
448 | * if not found. Internally if `id` is not a string then `id` returned. | |
|
449 | */ | |
|
450 | byId<E extends Element>(id: string | E, doc?: Document): E; | |
|
451 | ||
|
452 | /** | |
|
453 | * Returns true if node is a descendant of ancestor | |
|
454 | */ | |
|
455 | isDescendant(node: NodeOrString, ancestor: NodeOrString): boolean; | |
|
456 | ||
|
457 | /** | |
|
458 | * Enable or disable selection on a node | |
|
459 | */ | |
|
460 | setSelectable(node: ElementOrString, selectable?: boolean): void; | |
|
461 | } | |
|
462 | ||
|
463 | /* dojo/dom-attr */ | |
|
464 | ||
|
465 | interface DomAttr { | |
|
466 | /** | |
|
467 | * Returns true if the requested attribute is specified on the | |
|
468 | * given element, and false otherwise. | |
|
469 | */ | |
|
470 | has(node: NodeOrString, name: string): boolean; | |
|
471 | ||
|
472 | /** | |
|
473 | * Gets an attribute on an HTML element. | |
|
474 | * Because sometimes this uses node.getAttribute, it should be a string, | |
|
475 | * but it can also get any other attribute on a node, therefore it is unsafe | |
|
476 | * to type just a string. | |
|
477 | */ | |
|
478 | get(node: ElementOrString, name: string): any; | |
|
479 | ||
|
480 | /** | |
|
481 | * Sets an attribute on an HTML element. | |
|
482 | */ | |
|
483 | set(node: ElementOrString, name: string, value: any): Element; | |
|
484 | set(node: ElementOrString, map: GenericObject): Element; | |
|
485 | ||
|
486 | /** | |
|
487 | * Removes an attribute from an HTML element. | |
|
488 | */ | |
|
489 | remove(node: NodeOrString, name: string): void; | |
|
490 | ||
|
491 | /** | |
|
492 | * Returns an effective value of a property or an attribute. | |
|
493 | */ | |
|
494 | getNodeProp(node: NodeOrString, name: string): any; | |
|
495 | } | |
|
496 | ||
|
497 | /* dojo/dom-class */ | |
|
498 | ||
|
499 | interface DomClass { | |
|
500 | ||
|
501 | /** | |
|
502 | * Returns whether or not the specified classes are a portion of the | |
|
503 | * class list currently applied to the node. | |
|
504 | */ | |
|
505 | contains(node: NodeOrString, classStr: string): boolean; | |
|
506 | ||
|
507 | /** | |
|
508 | * Adds the specified classes to the end of the class list on the | |
|
509 | * passed node. Will not re-apply duplicate classes. | |
|
510 | */ | |
|
511 | add(node: NodeOrString, classStr: string | string[]): void; | |
|
512 | ||
|
513 | /** | |
|
514 | * Removes the specified classes from node. No `contains()` | |
|
515 | * check is required. | |
|
516 | */ | |
|
517 | remove(node: NodeOrString, classStr?: string | string[]): void; | |
|
518 | ||
|
519 | /** | |
|
520 | * Replaces one or more classes on a node if not present. | |
|
521 | * Operates more quickly than calling dojo.removeClass and dojo.addClass | |
|
522 | */ | |
|
523 | replace(node: NodeOrString, addClassStr: string | string[], removeClassStr?: string | string[]): void; | |
|
524 | ||
|
525 | /** | |
|
526 | * Adds a class to node if not present, or removes if present. | |
|
527 | * Pass a boolean condition if you want to explicitly add or remove. | |
|
528 | * Returns the condition that was specified directly or indirectly. | |
|
529 | */ | |
|
530 | toggle(node: NodeOrString, classStr: string | string[], condition?: boolean): boolean; | |
|
531 | } | |
|
532 | ||
|
533 | /* dojo/dom-construct */ | |
|
534 | ||
|
535 | /* TODO implement for TS 1.8 */ | |
|
536 | /* type PosString = 'first' | 'after' | 'before' | 'last' | 'replace' | 'only'; */ | |
|
537 | ||
|
538 | interface DomConstruct { | |
|
539 | ||
|
540 | /** | |
|
541 | * instantiates an HTML fragment returning the corresponding DOM. | |
|
542 | */ | |
|
543 | toDom(frag: string, doc?: Document): DocumentFragment | Node; | |
|
544 | ||
|
545 | /** | |
|
546 | * Attempt to insert node into the DOM, choosing from various positioning options. | |
|
547 | * Returns the first argument resolved to a DOM node. | |
|
548 | */ | |
|
549 | place(node: NodeFragmentOrString, refNode: NodeOrString, position?: string /* PosString */ | number): HTMLElement; | |
|
550 | ||
|
551 | /** | |
|
552 | * Create an element, allowing for optional attribute decoration | |
|
553 | * and placement. | |
|
554 | */ | |
|
555 | create(tag: NodeOrString, attrs?: GenericObject, refNode?: NodeOrString, pos?: string /* PosString */ | number): HTMLElement; | |
|
556 | ||
|
557 | /** | |
|
558 | * safely removes all children of the node. | |
|
559 | */ | |
|
560 | empty(node: NodeOrString): void; | |
|
561 | ||
|
562 | /** | |
|
563 | * Removes a node from its parent, clobbering it and all of its | |
|
564 | * children. | |
|
565 | */ | |
|
566 | destroy(node: NodeOrString): void; | |
|
567 | } | |
|
568 | ||
|
569 | /* dojo/dom-form */ | |
|
570 | ||
|
571 | interface DomForm { | |
|
572 | /** | |
|
573 | * Serialize a form field to a JavaScript object. | |
|
574 | */ | |
|
575 | fieldToObject(inputNode: NodeOrString): GenericObject; | |
|
576 | ||
|
577 | /** | |
|
578 | * Serialize a form node to a JavaScript object. | |
|
579 | */ | |
|
580 | toObject(fromNode: HTMLFormElement | string): GenericObject; | |
|
581 | ||
|
582 | /** | |
|
583 | * Returns a URL-encoded string representing the form passed as either a | |
|
584 | * node or string ID identifying the form to serialize | |
|
585 | */ | |
|
586 | toQuery(fromNode: HTMLFormElement | string): string; | |
|
587 | ||
|
588 | /** | |
|
589 | * Create a serialized JSON string from a form node or string | |
|
590 | * ID identifying the form to serialize | |
|
591 | */ | |
|
592 | toJson(formNode: HTMLFormElement | string, prettyPrint?: boolean): string; | |
|
593 | } | |
|
594 | ||
|
595 | /* dojo/dom-geometry */ | |
|
596 | ||
|
597 | interface DomGeometryWidthHeight { | |
|
598 | w?: number; | |
|
599 | h?: number; | |
|
600 | } | |
|
601 | ||
|
602 | interface DomGeometryBox extends DomGeometryWidthHeight { | |
|
603 | l?: number; | |
|
604 | t?: number; | |
|
605 | } | |
|
606 | ||
|
607 | interface DomGeometryBoxExtents extends DomGeometryBox { | |
|
608 | r?: number; | |
|
609 | b?: number; | |
|
610 | } | |
|
611 | ||
|
612 | interface Point { | |
|
613 | x: number; | |
|
614 | y: number; | |
|
615 | } | |
|
616 | ||
|
617 | interface DomGeometryXYBox extends DomGeometryWidthHeight, Point { | |
|
618 | } | |
|
619 | ||
|
620 | interface DomGeometry { | |
|
621 | boxModel: string; /* TODO: string literal 'border-box' | 'content-box' */ | |
|
622 | ||
|
623 | /** | |
|
624 | * Returns object with special values specifically useful for node | |
|
625 | * fitting. | |
|
626 | */ | |
|
627 | getPadExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
628 | ||
|
629 | /** | |
|
630 | * returns an object with properties useful for noting the border | |
|
631 | * dimensions. | |
|
632 | */ | |
|
633 | getBorderExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
634 | ||
|
635 | /** | |
|
636 | * Returns object with properties useful for box fitting with | |
|
637 | * regards to padding. | |
|
638 | */ | |
|
639 | getPadBorderExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
640 | ||
|
641 | /** | |
|
642 | * returns object with properties useful for box fitting with | |
|
643 | * regards to box margins (i.e., the outer-box). | |
|
644 | * - l/t = marginLeft, marginTop, respectively | |
|
645 | * - w = total width, margin inclusive | |
|
646 | * - h = total height, margin inclusive | |
|
647 | * The w/h are used for calculating boxes. | |
|
648 | * Normally application code will not need to invoke this | |
|
649 | * directly, and will use the ...box... functions instead. | |
|
650 | */ | |
|
651 | getMarginExtents(node: Element, computedStyle?: DomComputedStyle): DomGeometryBoxExtents; | |
|
652 | ||
|
653 | /** | |
|
654 | * returns an object that encodes the width, height, left and top | |
|
655 | * positions of the node's margin box. | |
|
656 | */ | |
|
657 | getMarginBox(node: Element, computedStyle?: DomComputedStyle): DomGeometryBox; | |
|
658 | ||
|
659 | /** | |
|
660 | * Returns an object that encodes the width, height, left and top | |
|
661 | * positions of the node's content box, irrespective of the | |
|
662 | * current box model. | |
|
663 | */ | |
|
664 | getContentBox(node: Element, computedStyle?: DomComputedStyle): DomGeometryBox; | |
|
665 | ||
|
666 | /** | |
|
667 | * Sets the size of the node's contents, irrespective of margins, | |
|
668 | * padding, or borders. | |
|
669 | */ | |
|
670 | setContentSize(node: Element, box: DomGeometryWidthHeight, computedStyle?: DomComputedStyle): void; | |
|
671 | ||
|
672 | /** | |
|
673 | * sets the size of the node's margin box and placement | |
|
674 | * (left/top), irrespective of box model. Think of it as a | |
|
675 | * passthrough to setBox that handles box-model vagaries for | |
|
676 | * you. | |
|
677 | */ | |
|
678 | setMarginBox(node: Element, box: DomGeometryBox, computedStyle?: DomComputedStyle): void; | |
|
679 | ||
|
680 | /** | |
|
681 | * Returns true if the current language is left-to-right, and false otherwise. | |
|
682 | */ | |
|
683 | isBodyLtr(doc?: Document): boolean; | |
|
684 | ||
|
685 | /** | |
|
686 | * Returns an object with {node, x, y} with corresponding offsets. | |
|
687 | */ | |
|
688 | docScroll(doc?: Document): Point; | |
|
689 | ||
|
690 | /** | |
|
691 | * Deprecated method previously used for IE6-IE7. Now, just returns `{x:0, y:0}`. | |
|
692 | */ | |
|
693 | getIeDocumentElementOffset(doc: Document): Point; | |
|
694 | ||
|
695 | /** | |
|
696 | * In RTL direction, scrollLeft should be a negative value, but IE | |
|
697 | * returns a positive one. All codes using documentElement.scrollLeft | |
|
698 | * must call this function to fix this error, otherwise the position | |
|
699 | * will offset to right when there is a horizontal scrollbar. | |
|
700 | */ | |
|
701 | fixIeBiDiScrollLeft(scrollLeft: number, doc?: Document): number; | |
|
702 | ||
|
703 | /** | |
|
704 | * Gets the position and size of the passed element relative to | |
|
705 | * the viewport (if includeScroll==false), or relative to the | |
|
706 | * document root (if includeScroll==true). | |
|
707 | */ | |
|
708 | position(node: Element, includeScroll?: boolean): DomGeometryXYBox; | |
|
709 | ||
|
710 | /** | |
|
711 | * returns an object that encodes the width and height of | |
|
712 | * the node's margin box | |
|
713 | */ | |
|
714 | getMarginSize(node: Element, computedStyle?: DomComputedStyle): DomGeometryWidthHeight; | |
|
715 | ||
|
716 | /** | |
|
717 | * Normalizes the geometry of a DOM event, normalizing the pageX, pageY, | |
|
718 | * offsetX, offsetY, layerX, and layerX properties | |
|
719 | */ | |
|
720 | normalizeEvent(event: Event): void; | |
|
721 | } | |
|
722 | ||
|
723 | /* dojo/dom-prop */ | |
|
724 | ||
|
725 | interface DomProp { | |
|
726 | /** | |
|
727 | * Gets a property on an HTML element. | |
|
728 | */ | |
|
729 | get(node: ElementOrString, name: string): any; | |
|
730 | ||
|
731 | /** | |
|
732 | * Sets a property on an HTML element. | |
|
733 | */ | |
|
734 | set(node: ElementOrString, name: string | GenericObject, value?: any): Element; | |
|
735 | } | |
|
736 | ||
|
737 | /* dojo/dom-style */ | |
|
738 | ||
|
739 | // TODO move over the most common properties from CSSStyleDeclaration | |
|
740 | interface DomComputedStyle { | |
|
741 | position?: string; | |
|
742 | width?: string; | |
|
743 | height?: string; | |
|
744 | [id: string]: any; | |
|
745 | } | |
|
746 | ||
|
747 | interface DomStyle { | |
|
748 | /** | |
|
749 | * Returns a "computed style" object. | |
|
750 | */ | |
|
751 | getComputedStyle(node: Node): DomComputedStyle; | |
|
752 | ||
|
753 | /** | |
|
754 | * Accesses styles on a node. | |
|
755 | */ | |
|
756 | get(node: ElementOrString): DomComputedStyle; | |
|
757 | get(node: ElementOrString, name: string): string | number; | |
|
758 | ||
|
759 | /** | |
|
760 | * Sets styles on a node. | |
|
761 | */ | |
|
762 | set(node: ElementOrString, name: DomComputedStyle): DomComputedStyle; | |
|
763 | set(node: ElementOrString, name: string, value: string | number): DomComputedStyle; | |
|
764 | ||
|
765 | /** | |
|
766 | * converts style value to pixels on IE or return a numeric value. | |
|
767 | */ | |
|
768 | toPixelValue(element: Element, value: string): number; | |
|
769 | } | |
|
770 | ||
|
771 | /* dojo/domReady */ | |
|
772 | ||
|
773 | interface DomReady { | |
|
774 | /** | |
|
775 | * Plugin to delay require()/define() callback from firing until the DOM has finished | |
|
776 | */ | |
|
777 | (callback: Function): void; | |
|
778 | ||
|
779 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
780 | _Q: Function[]; | |
|
781 | _onEmpty(): void; | |
|
782 | } | |
|
783 | ||
|
784 | /* dojo/Evented */ | |
|
785 | ||
|
786 | interface Evented { | |
|
787 | on(type: string | ExtensionEvent, listener: EventListener | Function): Handle; | |
|
788 | emit(type: string | ExtensionEvent, ...events: any[]): boolean; | |
|
789 | } | |
|
790 | ||
|
791 | interface EventedConstructor extends _base.DeclareConstructor<Evented> { | |
|
792 | new (params?: Object): Evented; | |
|
793 | } | |
|
794 | ||
|
795 | /* dojo/fx */ | |
|
796 | ||
|
797 | /* dojo/fx augments the dojo/_base/fx, therefore it is typed in fx.d.ts and not referenced from | |
|
798 | index.d.ts or module.d.ts and is self contained typings for dojo/fx and dojo/fx/* */ | |
|
799 | ||
|
800 | /* dojo/gears */ | |
|
801 | ||
|
802 | /* This is long-ago deprecated by Google, so just doing a minimal typing */ | |
|
803 | ||
|
804 | interface Gears { | |
|
805 | _gearsObject(): any; | |
|
806 | available: boolean; | |
|
807 | } | |
|
808 | ||
|
809 | /* dojo/has */ | |
|
810 | ||
|
811 | interface HasCache { | |
|
812 | [feature: string]: any; | |
|
813 | } | |
|
814 | ||
|
815 | interface HasTestFunction { | |
|
816 | /* TypeScript has no way of referring to the global scope see Microsoft/TypeScript#983 */ | |
|
817 | (global?: any, doc?: Document, element?: Element): any; | |
|
818 | } | |
|
819 | ||
|
820 | interface Has { | |
|
821 | /** | |
|
822 | * Return the current value of the named feature. | |
|
823 | * @param {string | number} name The name (if a string) or identifier (if an integer) of the feature to test. | |
|
824 | */ | |
|
825 | (name: string | number): any; | |
|
826 | (name: 'host-browser'): boolean; | |
|
827 | (name: 'host-node'): any; | |
|
828 | (name: 'host-rhino'): boolean; | |
|
829 | (name: 'dom'): boolean; | |
|
830 | (name: 'dojo-dom-ready-api'): 1; | |
|
831 | (name: 'dojo-sniff'): 1; | |
|
832 | // if host-browser is true | |
|
833 | (name: 'dom-addeventlistener'): void | boolean; | |
|
834 | (name: 'touch'): void | boolean; | |
|
835 | (name: 'touch-events'): void | boolean; | |
|
836 | (name: 'pointer-events'): void | boolean; | |
|
837 | (name: 'MSPointer'): void | boolean; | |
|
838 | (name: 'device-width'): void | number; | |
|
839 | (name: 'dom-attributes-explicit'): void | boolean; | |
|
840 | (name: 'dom-attributes-specified-flag'): void | boolean; | |
|
841 | // dojo/_base/browser | |
|
842 | (name: 'config-selectorEngine'): string; | |
|
843 | ||
|
844 | cache: HasCache; | |
|
845 | ||
|
846 | /** | |
|
847 | * Register a new feature test for some named feature. | |
|
848 | */ | |
|
849 | add(name: string | number, test: HasTestFunction, now?: boolean, force?: boolean): any; | |
|
850 | add<T extends (Object | string | number | boolean | null | void)>(name: string | number, test: T, now?: boolean, force?: boolean): any; | |
|
851 | ||
|
852 | /** | |
|
853 | * Deletes the contents of the element passed to test functions. | |
|
854 | */ | |
|
855 | clearElement(element: HTMLElement): HTMLElement; | |
|
856 | ||
|
857 | /** | |
|
858 | * Resolves id into a module id based on possibly-nested tenary expression that branches on has feature test value(s). | |
|
859 | */ | |
|
860 | normalize(id: string, toAbsMid: Function): string; /* TODO: Align with loader api */ | |
|
861 | ||
|
862 | /** | |
|
863 | * Conditional loading of AMD modules based on a has feature test value. | |
|
864 | */ | |
|
865 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
866 | } | |
|
867 | ||
|
868 | /* dojo/hash */ | |
|
869 | ||
|
870 | interface Hash { | |
|
871 | (hash?: string, replace?: boolean): string; | |
|
872 | } | |
|
873 | ||
|
874 | /* dojo/hccss */ | |
|
875 | ||
|
876 | /* this only does has.add and re-exports the has interface */ | |
|
877 | interface Has { | |
|
878 | (name: 'highcontrast'): void | boolean; | |
|
879 | } | |
|
880 | ||
|
881 | /* dojo/html */ | |
|
882 | ||
|
883 | type ContentSetterContent = string | Node | ArrayLike<Node>; | |
|
884 | ||
|
885 | interface ContentSetterParams { | |
|
886 | node?: NodeOrString; | |
|
887 | content?: ContentSetterContent; | |
|
888 | id?: string; | |
|
889 | cleanContent?: boolean; | |
|
890 | extractContent?: boolean; | |
|
891 | parseContent?: boolean; | |
|
892 | parserScope?: boolean; | |
|
893 | startup?: boolean; | |
|
894 | onBegin?: Function; | |
|
895 | onEnd?: Function; | |
|
896 | tearDown?: Function; | |
|
897 | onContentError?: Function; | |
|
898 | onExecError?: Function; | |
|
899 | } | |
|
900 | ||
|
901 | interface ContentSetter { | |
|
902 | ||
|
903 | /** | |
|
904 | * An node which will be the parent element that we set content into | |
|
905 | */ | |
|
906 | node: NodeOrString; | |
|
907 | ||
|
908 | /** | |
|
909 | * The content to be placed in the node. Can be an HTML string, a node reference, or a enumerable list of nodes | |
|
910 | */ | |
|
911 | content: ContentSetterContent; | |
|
912 | ||
|
913 | /** | |
|
914 | * Usually only used internally, and auto-generated with each instance | |
|
915 | */ | |
|
916 | id: string; | |
|
917 | ||
|
918 | /** | |
|
919 | * Should the content be treated as a full html document, | |
|
920 | * and the real content stripped of <html>, <body> wrapper before injection | |
|
921 | */ | |
|
922 | cleanContent: boolean; | |
|
923 | ||
|
924 | /** | |
|
925 | * Should the content be treated as a full html document, | |
|
926 | * and the real content stripped of `<html> <body>` wrapper before injection | |
|
927 | */ | |
|
928 | extractContent: boolean; | |
|
929 | ||
|
930 | /** | |
|
931 | * Should the node by passed to the parser after the new content is set | |
|
932 | */ | |
|
933 | parseContent: boolean; | |
|
934 | ||
|
935 | /** | |
|
936 | * Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, | |
|
937 | * will search for data-dojo-type (or dojoType). For backwards compatibility | |
|
938 | * reasons defaults to dojo._scopeName (which is "dojo" except when | |
|
939 | * multi-version support is used, when it will be something like dojo16, dojo20, etc.) | |
|
940 | */ | |
|
941 | parserScope: string; | |
|
942 | ||
|
943 | /** | |
|
944 | * Start the child widgets after parsing them. Only obeyed if parseContent is true. | |
|
945 | */ | |
|
946 | startup: boolean; | |
|
947 | ||
|
948 | /** | |
|
949 | * front-end to the set-content sequence | |
|
950 | */ | |
|
951 | set(cont?: ContentSetterContent, params?: ContentSetterParams): promise.Promise<Node> | Node; | |
|
952 | ||
|
953 | /** | |
|
954 | * sets the content on the node | |
|
955 | */ | |
|
956 | setContent(): void; | |
|
957 | ||
|
958 | /** | |
|
959 | * cleanly empty out existing content | |
|
960 | */ | |
|
961 | empty(): void; | |
|
962 | ||
|
963 | /** | |
|
964 | * Called after instantiation, but before set(); | |
|
965 | * It allows modification of any of the object properties - | |
|
966 | * including the node and content provided - before the set operation actually takes place | |
|
967 | */ | |
|
968 | onBegin(): Node; | |
|
969 | ||
|
970 | /** | |
|
971 | * Called after set(), when the new content has been pushed into the node | |
|
972 | * It provides an opportunity for post-processing before handing back the node to the caller | |
|
973 | * This default implementation checks a parseContent flag to optionally run the dojo parser over the new content | |
|
974 | */ | |
|
975 | onEnd(): Node; | |
|
976 | ||
|
977 | /** | |
|
978 | * manually reset the Setter instance if its being re-used for example for another set() | |
|
979 | */ | |
|
980 | tearDown(): void; | |
|
981 | ||
|
982 | onContentError(): string; | |
|
983 | onExecError(): string; | |
|
984 | _mixin(params: ContentSetterParams): void; | |
|
985 | parseDeferred: Deferred<any[]>; | |
|
986 | ||
|
987 | /** | |
|
988 | * runs the dojo parser over the node contents, storing any results in this.parseResults | |
|
989 | */ | |
|
990 | _parse(): void; | |
|
991 | ||
|
992 | /** | |
|
993 | * shows user the string that is returned by on[type]Error | |
|
994 | * override/implement on[type]Error and return your own string to customize | |
|
995 | */ | |
|
996 | _onError(type: string, err: Error, consoleText?: string): void; | |
|
997 | } | |
|
998 | ||
|
999 | interface ContentSetterConstructor extends _base.DeclareConstructor<ContentSetter> { | |
|
1000 | new (params?: ContentSetterParams, node?: NodeOrString): ContentSetter; | |
|
1001 | } | |
|
1002 | ||
|
1003 | interface Html { | |
|
1004 | /** | |
|
1005 | * removes !DOCTYPE and title elements from the html string. | |
|
1006 | * | |
|
1007 | * khtml is picky about dom faults, you can't attach a style or `<title>` node as child of body | |
|
1008 | * must go into head, so we need to cut out those tags | |
|
1009 | */ | |
|
1010 | _secureForInnerHtml(cont: string): string; | |
|
1011 | ||
|
1012 | /** | |
|
1013 | * Deprecated, should use dojo/dom-constuct.empty() directly, remove in 2.0. | |
|
1014 | */ | |
|
1015 | _emptyNode(node: NodeOrString): void; | |
|
1016 | ||
|
1017 | /** | |
|
1018 | * inserts the given content into the given node | |
|
1019 | */ | |
|
1020 | _setNodeContent<T extends Node>(node: Node, cont: string | Node | ArrayLike<T>): Node; | |
|
1021 | ||
|
1022 | _ContentSetter: ContentSetterConstructor; | |
|
1023 | ||
|
1024 | /** | |
|
1025 | * inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") | |
|
1026 | * may be a better choice for simple HTML insertion. | |
|
1027 | */ | |
|
1028 | set(node: Node, cont?: ContentSetterContent, params?: ContentSetterParams): promise.Promise<Node> | Node; | |
|
1029 | } | |
|
1030 | ||
|
1031 | /* dojo/i18n */ | |
|
1032 | ||
|
1033 | interface I18n { | |
|
1034 | getLocalization(moduleName: string, bundleName: string, locale?: string): any; | |
|
1035 | ||
|
1036 | dynamic: boolean; | |
|
1037 | ||
|
1038 | /** | |
|
1039 | * Resolves id into a module id based on possibly-nested tenary expression that branches on has feature test value(s). | |
|
1040 | */ | |
|
1041 | normalize(id: string, toAbsMid: Function): string; /* TODO: Align with loader api */ | |
|
1042 | ||
|
1043 | normalizeLocale(locale?: string): string; | |
|
1044 | ||
|
1045 | /** | |
|
1046 | * Conditional loading of AMD modules based on a has feature test value. | |
|
1047 | */ | |
|
1048 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
1049 | ||
|
1050 | cache: { [bundle: string]: any }; | |
|
1051 | ||
|
1052 | getL10nName(moduleName: string, bundleName: string, locale?: string): string; | |
|
1053 | } | |
|
1054 | ||
|
1055 | /* dojo/io-query */ | |
|
1056 | ||
|
1057 | interface IoQuery { | |
|
1058 | /** | |
|
1059 | * takes a name/value mapping object and returns a string representing | |
|
1060 | * a URL-encoded version of that object. | |
|
1061 | */ | |
|
1062 | objectToQuery(map: GenericObject): string; | |
|
1063 | ||
|
1064 | /** | |
|
1065 | * Create an object representing a de-serialized query section of a | |
|
1066 | * URL. Query keys with multiple values are returned in an array. | |
|
1067 | */ | |
|
1068 | queryToObject(str: string): GenericObject; | |
|
1069 | } | |
|
1070 | ||
|
1071 | /* dojo/json */ | |
|
1072 | ||
|
1073 | interface Json { | |
|
1074 | ||
|
1075 | /** | |
|
1076 | * Parses a [JSON](http://json.org) string to return a JavaScript object. | |
|
1077 | */ | |
|
1078 | parse(str: string, strict?: boolean): any; | |
|
1079 | ||
|
1080 | /** | |
|
1081 | * Returns a [JSON](http://json.org) serialization of an object. | |
|
1082 | */ | |
|
1083 | stringify(value: any, replacer?: (key: string, value: any) => any| any[], space?: string | number): string; | |
|
1084 | } | |
|
1085 | ||
|
1086 | /* dojo/keys */ | |
|
1087 | ||
|
1088 | interface Keys { | |
|
1089 | BACKSPACE: number; | |
|
1090 | TAB: number; | |
|
1091 | CLEAR: number; | |
|
1092 | ENTER: number; | |
|
1093 | SHIFT: number; | |
|
1094 | CTRL: number; | |
|
1095 | ALT: number; | |
|
1096 | META: number; | |
|
1097 | PAUSE: number; | |
|
1098 | CAPS_LOCK: number; | |
|
1099 | ESCAPE: number; | |
|
1100 | SPACE: number; | |
|
1101 | PAGE_UP: number; | |
|
1102 | PAGE_DOWN: number; | |
|
1103 | END: number; | |
|
1104 | HOME: number; | |
|
1105 | LEFT_ARROW: number; | |
|
1106 | UP_ARROW: number; | |
|
1107 | RIGHT_ARROW: number; | |
|
1108 | DOWN_ARROW: number; | |
|
1109 | INSERT: number; | |
|
1110 | DELETE: number; | |
|
1111 | HELP: number; | |
|
1112 | LEFT_WINDOW: number; | |
|
1113 | RIGHT_WINDOW: number; | |
|
1114 | SELECT: number; | |
|
1115 | NUMPAD_0: number; | |
|
1116 | NUMPAD_1: number; | |
|
1117 | NUMPAD_2: number; | |
|
1118 | NUMPAD_3: number; | |
|
1119 | NUMPAD_4: number; | |
|
1120 | NUMPAD_5: number; | |
|
1121 | NUMPAD_6: number; | |
|
1122 | NUMPAD_7: number; | |
|
1123 | NUMPAD_8: number; | |
|
1124 | NUMPAD_9: number; | |
|
1125 | NUMPAD_MULTIPLY: number; | |
|
1126 | NUMPAD_PLUS: number; | |
|
1127 | NUMPAD_ENTER: number; | |
|
1128 | NUMPAD_MINUS: number; | |
|
1129 | NUMPAD_PERIOD: number; | |
|
1130 | NUMPAD_DIVIDE: number; | |
|
1131 | F1: number; | |
|
1132 | F2: number; | |
|
1133 | F3: number; | |
|
1134 | F4: number; | |
|
1135 | F5: number; | |
|
1136 | F6: number; | |
|
1137 | F7: number; | |
|
1138 | F8: number; | |
|
1139 | F9: number; | |
|
1140 | F10: number; | |
|
1141 | F11: number; | |
|
1142 | F12: number; | |
|
1143 | F13: number; | |
|
1144 | F14: number; | |
|
1145 | F15: number; | |
|
1146 | NUM_LOCK: number; | |
|
1147 | SCROLL_LOCK: number; | |
|
1148 | UP_DPAD: number; | |
|
1149 | DOWN_DPAD: number; | |
|
1150 | LEFT_DPAD: number; | |
|
1151 | RIGHT_DPAD: number; | |
|
1152 | copyKey: number; | |
|
1153 | } | |
|
1154 | ||
|
1155 | /* dojo/loadInit */ | |
|
1156 | ||
|
1157 | interface LoadInit { | |
|
1158 | dynamic: number; | |
|
1159 | ||
|
1160 | /** | |
|
1161 | * Resolves id into a module id based on possibly-nested tenary expression that branches on has feature test value(s). | |
|
1162 | */ | |
|
1163 | normalize(id: string, toAbsMid: Function): string; /* TODO: Align with loader api */ | |
|
1164 | ||
|
1165 | /** | |
|
1166 | * Conditional loading of AMD modules based on a has feature test value. | |
|
1167 | */ | |
|
1168 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
1169 | } | |
|
1170 | ||
|
1171 | /* dojo/mouse */ | |
|
1172 | ||
|
1173 | interface Mouse { | |
|
1174 | _eventHandler(type: string, selectHandler?: (evt: MouseEvent, listener: EventListener) => void): MouseEvent; | |
|
1175 | ||
|
1176 | /** | |
|
1177 | * This is an extension event for the mouseenter that IE provides, emulating the | |
|
1178 | * behavior on other browsers. | |
|
1179 | */ | |
|
1180 | enter: MouseEvent; | |
|
1181 | ||
|
1182 | /** | |
|
1183 | * This is an extension event for the mouseleave that IE provides, emulating the | |
|
1184 | * behavior on other browsers. | |
|
1185 | */ | |
|
1186 | leave: MouseEvent; | |
|
1187 | ||
|
1188 | /** | |
|
1189 | * This is an extension event for the mousewheel that non-Mozilla browsers provide, | |
|
1190 | * emulating the behavior on Mozilla based browsers. | |
|
1191 | */ | |
|
1192 | wheel: string | ExtensionEvent; | |
|
1193 | ||
|
1194 | /** | |
|
1195 | * Test an event object (from a mousedown event) to see if the left button was pressed. | |
|
1196 | */ | |
|
1197 | isLeft(e: MouseEvent): boolean; | |
|
1198 | ||
|
1199 | /** | |
|
1200 | * Test an event object (from a mousedown event) to see if the middle button was pressed. | |
|
1201 | */ | |
|
1202 | isMiddle(e: MouseEvent): boolean; | |
|
1203 | ||
|
1204 | /** | |
|
1205 | * Test an event object (from a mousedown event) to see if the right button was pressed. | |
|
1206 | */ | |
|
1207 | isRight(e: MouseEvent): boolean; | |
|
1208 | } | |
|
1209 | ||
|
1210 | /* dojo/node */ | |
|
1211 | ||
|
1212 | /* should only be used for re-exporting CommonJS modules */ | |
|
1213 | ||
|
1214 | /* dojo/NodeList */ | |
|
1215 | ||
|
1216 | /* Just proxies dojo/query::NodeList */ | |
|
1217 | ||
|
1218 | /* dojo/NodeList-* are included as seperate .d.ts files */ | |
|
1219 | ||
|
1220 | /* dojo/number */ | |
|
1221 | ||
|
1222 | interface NumberFormatOptions { | |
|
1223 | ||
|
1224 | /** | |
|
1225 | * override [formatting pattern](http://www.unicode.org/reports/tr35/#Number_Format_Patterns) | |
|
1226 | * with this string. Default value is based on locale. Overriding this property will defeat | |
|
1227 | * localization. Literal characters in patterns are not supported. | |
|
1228 | */ | |
|
1229 | pattern?: string; | |
|
1230 | ||
|
1231 | /** | |
|
1232 | * choose a format type based on the locale from the following: | |
|
1233 | * decimal, scientific (not yet supported), percent, currency. decimal by default. | |
|
1234 | */ | |
|
1235 | type?: string; | |
|
1236 | ||
|
1237 | /** | |
|
1238 | * fixed number of decimal places to show. This overrides any | |
|
1239 | * information in the provided pattern. | |
|
1240 | */ | |
|
1241 | places?: number; | |
|
1242 | ||
|
1243 | /** | |
|
1244 | * 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1 | |
|
1245 | * means do not round. | |
|
1246 | */ | |
|
1247 | round?: number; | |
|
1248 | ||
|
1249 | /** | |
|
1250 | * override the locale used to determine formatting rules | |
|
1251 | */ | |
|
1252 | locale?: string; | |
|
1253 | ||
|
1254 | /** | |
|
1255 | * If false, show no decimal places, overriding places and pattern settings. | |
|
1256 | */ | |
|
1257 | fractional?: boolean | [ boolean, boolean ]; | |
|
1258 | } | |
|
1259 | ||
|
1260 | interface NumberFormatAbsoluteOptions { | |
|
1261 | /** | |
|
1262 | * the decimal separator | |
|
1263 | */ | |
|
1264 | decimal?: string; | |
|
1265 | ||
|
1266 | /** | |
|
1267 | * the group separator | |
|
1268 | */ | |
|
1269 | group?: string; | |
|
1270 | ||
|
1271 | /** | |
|
1272 | * number of decimal places. the range "n,m" will format to m places. | |
|
1273 | */ | |
|
1274 | places?: number | string; | |
|
1275 | ||
|
1276 | /** | |
|
1277 | * 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1 | |
|
1278 | * means don't round. | |
|
1279 | */ | |
|
1280 | round?: number; | |
|
1281 | } | |
|
1282 | ||
|
1283 | interface NumberRegexpOptions { | |
|
1284 | ||
|
1285 | /** | |
|
1286 | * override [formatting pattern](http://www.unicode.org/reports/tr35/#Number_Format_Patterns) | |
|
1287 | * with this string. Default value is based on locale. Overriding this property will defeat | |
|
1288 | * localization. | |
|
1289 | */ | |
|
1290 | pattern?: string; | |
|
1291 | ||
|
1292 | /** | |
|
1293 | * choose a format type based on the locale from the following: | |
|
1294 | * decimal, scientific (not yet supported), percent, currency. decimal by default. | |
|
1295 | */ | |
|
1296 | type?: string; | |
|
1297 | ||
|
1298 | /** | |
|
1299 | * override the locale used to determine formatting rules | |
|
1300 | */ | |
|
1301 | locacle?: string; | |
|
1302 | ||
|
1303 | /** | |
|
1304 | * strict parsing, false by default. Strict parsing requires input as produced by the format() method. | |
|
1305 | * Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators | |
|
1306 | */ | |
|
1307 | strict?: boolean; | |
|
1308 | ||
|
1309 | /** | |
|
1310 | * number of decimal places to accept: Infinity, a positive number, or | |
|
1311 | * a range "n,m". Defined by pattern or Infinity if pattern not provided. | |
|
1312 | */ | |
|
1313 | places?: number | string; | |
|
1314 | } | |
|
1315 | ||
|
1316 | interface NumberParseOptions { | |
|
1317 | ||
|
1318 | /** | |
|
1319 | * override [formatting pattern](http://www.unicode.org/reports/tr35/#Number_Format_Patterns) | |
|
1320 | * with this string. Default value is based on locale. Overriding this property will defeat | |
|
1321 | * localization. Literal characters in patterns are not supported. | |
|
1322 | */ | |
|
1323 | pattern?: string; | |
|
1324 | ||
|
1325 | /** | |
|
1326 | * choose a format type based on the locale from the following: | |
|
1327 | * decimal, scientific (not yet supported), percent, currency. decimal by default. | |
|
1328 | */ | |
|
1329 | type?: string; | |
|
1330 | ||
|
1331 | /** | |
|
1332 | * override the locale used to determine formatting rules | |
|
1333 | */ | |
|
1334 | locale?: string; | |
|
1335 | ||
|
1336 | /** | |
|
1337 | * strict parsing, false by default. Strict parsing requires input as produced by the format() method. | |
|
1338 | * Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators | |
|
1339 | */ | |
|
1340 | strict?: boolean; | |
|
1341 | ||
|
1342 | /** | |
|
1343 | * Whether to include the fractional portion, where the number of decimal places are implied by pattern | |
|
1344 | * or explicit 'places' parameter. The value [true,false] makes the fractional portion optional. | |
|
1345 | */ | |
|
1346 | fractional?: boolean | [boolean, boolean]; | |
|
1347 | } | |
|
1348 | ||
|
1349 | interface RealNumberRegexpFlags { | |
|
1350 | ||
|
1351 | /** | |
|
1352 | * The integer number of decimal places or a range given as "n,m". If | |
|
1353 | * not given, the decimal part is optional and the number of places is | |
|
1354 | * unlimited. | |
|
1355 | */ | |
|
1356 | places?: number; | |
|
1357 | ||
|
1358 | /** | |
|
1359 | * A string for the character used as the decimal point. Default | |
|
1360 | * is ".". | |
|
1361 | */ | |
|
1362 | decimal?: string; | |
|
1363 | ||
|
1364 | /** | |
|
1365 | * Whether decimal places are used. Can be true, false, or [true, | |
|
1366 | * false]. Default is [true, false] which means optional. | |
|
1367 | */ | |
|
1368 | fractional?: boolean | [boolean, boolean]; | |
|
1369 | ||
|
1370 | /** | |
|
1371 | * Express in exponential notation. Can be true, false, or [true, | |
|
1372 | * false]. Default is [true, false], (i.e. will match if the | |
|
1373 | * exponential part is present are not). | |
|
1374 | */ | |
|
1375 | exponent?: boolean | [boolean, boolean]; | |
|
1376 | ||
|
1377 | /** | |
|
1378 | * The leading plus-or-minus sign on the exponent. Can be true, | |
|
1379 | * false, or [true, false]. Default is [true, false], (i.e. will | |
|
1380 | * match if it is signed or unsigned). flags in regexp.integer can be | |
|
1381 | * applied. | |
|
1382 | */ | |
|
1383 | eSigned?: boolean | [boolean, boolean]; | |
|
1384 | } | |
|
1385 | ||
|
1386 | interface IntegerRegexpFlags { | |
|
1387 | ||
|
1388 | /** | |
|
1389 | * The leading plus-or-minus sign. Can be true, false, or `[true,false]`. | |
|
1390 | * Default is `[true, false]`, (i.e. will match if it is signed | |
|
1391 | * or unsigned). | |
|
1392 | */ | |
|
1393 | signed?: boolean; | |
|
1394 | ||
|
1395 | /** | |
|
1396 | * The character used as the thousands separator. Default is no | |
|
1397 | * separator. For more than one symbol use an array, e.g. `[",", ""]`, | |
|
1398 | * makes ',' optional. | |
|
1399 | */ | |
|
1400 | separator?: string; | |
|
1401 | ||
|
1402 | /** | |
|
1403 | * group size between separators | |
|
1404 | */ | |
|
1405 | groupSize?: number; | |
|
1406 | ||
|
1407 | /** | |
|
1408 | * second grouping, where separators 2..n have a different interval than the first separator (for India) | |
|
1409 | */ | |
|
1410 | groupSize2?: number; | |
|
1411 | } | |
|
1412 | ||
|
1413 | interface Number { | |
|
1414 | /** | |
|
1415 | * Format a Number as a String, using locale-specific settings | |
|
1416 | */ | |
|
1417 | format(value: number, options?: NumberFormatOptions): string; | |
|
1418 | ||
|
1419 | /** | |
|
1420 | * not precise, but good enough | |
|
1421 | */ | |
|
1422 | _numberPatternRE: RegExp; | |
|
1423 | ||
|
1424 | /** | |
|
1425 | * Apply pattern to format value as a string using options. Gives no | |
|
1426 | * consideration to local customs. | |
|
1427 | */ | |
|
1428 | _applyPattern(value: number, pattern: string, options?: NumberFormatOptions): string; | |
|
1429 | ||
|
1430 | /** | |
|
1431 | * Rounds to the nearest value with the given number of decimal places, away from zero | |
|
1432 | */ | |
|
1433 | round(value: number, places?: number, increment?: number): number; | |
|
1434 | ||
|
1435 | /** | |
|
1436 | * Apply numeric pattern to absolute value using options. Gives no | |
|
1437 | * consideration to local customs. | |
|
1438 | */ | |
|
1439 | _formatAbsolute(value: number, pattern: string, options?: NumberFormatAbsoluteOptions): string; | |
|
1440 | ||
|
1441 | /** | |
|
1442 | * Builds the regular needed to parse a number | |
|
1443 | */ | |
|
1444 | regexp(options?: NumberRegexpOptions): string; | |
|
1445 | ||
|
1446 | _parseInfo(options?: any): { regexp: string, group: string, decimal: string, factor: number }; | |
|
1447 | ||
|
1448 | /** | |
|
1449 | * Convert a properly formatted string to a primitive Number, using | |
|
1450 | * locale-specific settings. | |
|
1451 | */ | |
|
1452 | parse(expression: string, options?: NumberParseOptions): number; | |
|
1453 | ||
|
1454 | /** | |
|
1455 | * Builds a regular expression to match a real number in exponential | |
|
1456 | * notation | |
|
1457 | */ | |
|
1458 | _realNumberRegexp(flags: RealNumberRegexpFlags): string; | |
|
1459 | ||
|
1460 | /** | |
|
1461 | * Builds a regular expression that matches an integer | |
|
1462 | */ | |
|
1463 | _integerRegexp(flags: IntegerRegexpFlags): string; | |
|
1464 | } | |
|
1465 | ||
|
1466 | /* dojo/on */ | |
|
1467 | ||
|
1468 | interface ExtensionEvent { | |
|
1469 | (target: Element | GenericObject, listener: EventListener): Handle; | |
|
1470 | } | |
|
1471 | ||
|
1472 | interface PauseHandle extends Handle { | |
|
1473 | pause(): void; | |
|
1474 | resume(): void; | |
|
1475 | } | |
|
1476 | ||
|
1477 | interface MatchesTarget { | |
|
1478 | matches(node: Element, selector: string, context?: any): any[]; | |
|
1479 | [id: string]: any; | |
|
1480 | } | |
|
1481 | ||
|
1482 | interface On { | |
|
1483 | /** | |
|
1484 | * A function that provides core event listening functionality. With this function | |
|
1485 | * you can provide a target, event type, and listener to be notified of | |
|
1486 | * future matching events that are fired. | |
|
1487 | */ | |
|
1488 | (target: Element | GenericObject, type: string | ExtensionEvent, listener: EventListener | Function, dontFix?: boolean): Handle; | |
|
1489 | ||
|
1490 | /** | |
|
1491 | * This function acts the same as on(), but with pausable functionality. The | |
|
1492 | * returned signal object has pause() and resume() functions. Calling the | |
|
1493 | * pause() method will cause the listener to not be called for future events. | |
|
1494 | */ | |
|
1495 | pausable(target: Element | GenericObject, type: string | ExtensionEvent, listener: EventListener | Function, dontFix?: boolean): PauseHandle; | |
|
1496 | ||
|
1497 | /** | |
|
1498 | * This function acts the same as on(), but will only call the listener once. The | |
|
1499 | * listener will be called for the first | |
|
1500 | * event that takes place and then listener will automatically be removed. | |
|
1501 | */ | |
|
1502 | once(target: Element | GenericObject, type: string | ExtensionEvent, listener: EventListener | Function, dontFix?: boolean): Handle; | |
|
1503 | ||
|
1504 | parse(target: Element | GenericObject, type: string | ExtensionEvent, listener: EventListener | Function, dontFix: boolean, matchesTarget: Element | GenericObject): Handle; | |
|
1505 | ||
|
1506 | /** | |
|
1507 | * Check if a node match the current selector within the constraint of a context | |
|
1508 | */ | |
|
1509 | matches(node: Element, selector: string, context: Element, children: boolean, matchesTarget?: MatchesTarget): Element | boolean; | |
|
1510 | ||
|
1511 | /** | |
|
1512 | * Creates a new extension event with event delegation. This is based on | |
|
1513 | * the provided event type (can be extension event) that | |
|
1514 | * only calls the listener when the CSS selector matches the target of the event. | |
|
1515 | * | |
|
1516 | * The application must require() an appropriate level of dojo/query to handle the selector. | |
|
1517 | */ | |
|
1518 | selector(selector: string, type: string | ExtensionEvent, children?: boolean): ExtensionEvent; | |
|
1519 | ||
|
1520 | /** | |
|
1521 | * Fires an event on the target object. | |
|
1522 | */ | |
|
1523 | emit(target: Element | GenericObject, type: string | ExtensionEvent, event?: any): boolean; | |
|
1524 | ||
|
1525 | /** | |
|
1526 | * normalizes properties on the event object including event | |
|
1527 | * bubbling methods, keystroke normalization, and x/y positions | |
|
1528 | */ | |
|
1529 | _fixEvent(evt: any, sender: any): any; | |
|
1530 | } | |
|
1531 | ||
|
1532 | /* dojo/parser */ | |
|
1533 | ||
|
1534 | interface ParserOptions { } | |
|
1535 | ||
|
1536 | interface ParserObjects { | |
|
1537 | ctor?: GenericConstructor<any>; | |
|
1538 | types?: string[]; | |
|
1539 | node: Node; | |
|
1540 | scripts?: HTMLScriptElement[]; | |
|
1541 | inherited?: { [prop: string]: any; }; | |
|
1542 | } | |
|
1543 | ||
|
1544 | interface InstancesArray extends Array<any>, promise.Promise<any> {} | |
|
1545 | ||
|
1546 | interface Parser { | |
|
1547 | /** | |
|
1548 | * Clear cached data. Used mainly for benchmarking. | |
|
1549 | */ | |
|
1550 | _clearCache(): void; | |
|
1551 | ||
|
1552 | /** | |
|
1553 | * Convert a `<script type="dojo/method" args="a, b, c"> ... </script>` | |
|
1554 | * into a function | |
|
1555 | */ | |
|
1556 | _functionFromScript(node: HTMLScriptElement, attrData: string): Function; | |
|
1557 | ||
|
1558 | /** | |
|
1559 | * Takes array of nodes, and turns them into class instances and | |
|
1560 | * potentially calls a startup method to allow them to connect with | |
|
1561 | * any children. | |
|
1562 | */ | |
|
1563 | instantiate(nodes: Node[], mixin?: Object, options?: ParserOptions): any[]; | |
|
1564 | ||
|
1565 | /** | |
|
1566 | * Takes array of objects representing nodes, and turns them into class instances and | |
|
1567 | * potentially calls a startup method to allow them to connect with | |
|
1568 | * any children. | |
|
1569 | */ | |
|
1570 | _instantiate(nodes: ParserObjects[], mixin?: Object, options?: ParserOptions, returnPromise?: boolean): any[] | promise.Promise<any[]>; | |
|
1571 | ||
|
1572 | /** | |
|
1573 | * Calls new ctor(params, node), where params is the hash of parameters specified on the node, | |
|
1574 | * excluding data-dojo-type and data-dojo-mixins. Does not call startup(). | |
|
1575 | */ | |
|
1576 | construct<T>( | |
|
1577 | ctor: GenericConstructor<T>, | |
|
1578 | node: Node, mixin?: Object, | |
|
1579 | options?: ParserOptions, | |
|
1580 | scripts?: HTMLScriptElement[], | |
|
1581 | inherited?: { [prop: string]: any; } | |
|
1582 | ): promise.Promise<T> | T; | |
|
1583 | ||
|
1584 | /** | |
|
1585 | * Scan a DOM tree and return an array of objects representing the DOMNodes | |
|
1586 | * that need to be turned into widgets. | |
|
1587 | */ | |
|
1588 | scan(root?: Node, options?: ParserOptions): promise.Promise<ParserObjects[]>; | |
|
1589 | ||
|
1590 | /** | |
|
1591 | * Helper for _scanAMD(). Takes a `<script type=dojo/require>bar: "acme/bar", ...</script>` node, | |
|
1592 | * calls require() to load the specified modules and (asynchronously) assign them to the specified global | |
|
1593 | * variables, and returns a Promise for when that operation completes. | |
|
1594 | * | |
|
1595 | * In the example above, it is effectively doing a require(["acme/bar", ...], function(a){ bar = a; }). | |
|
1596 | */ | |
|
1597 | _require(script: HTMLScriptElement, options: ParserOptions): promise.Promise<any>; | |
|
1598 | ||
|
1599 | /** | |
|
1600 | * Scans the DOM for any declarative requires and returns their values. | |
|
1601 | */ | |
|
1602 | _scanAmd(root?: Node, options?: ParserOptions): promise.Promise<boolean>; | |
|
1603 | ||
|
1604 | /** | |
|
1605 | * Scan the DOM for class instances, and instantiate them. | |
|
1606 | */ | |
|
1607 | parse(rootNode?: Node, options?: ParserOptions): InstancesArray; | |
|
1608 | } | |
|
1609 | ||
|
1610 | /* dojo/query */ | |
|
1611 | ||
|
1612 | interface NodeListFilterCallback<T extends Node> { | |
|
1613 | (item: T, idx: number, nodeList: this): boolean; | |
|
1614 | } | |
|
1615 | ||
|
1616 | type NodeListFilter<T extends Node> = string | NodeListFilterCallback<T>; | |
|
1617 | ||
|
1618 | interface NodeList<T extends Node> extends ArrayLike<T> { | |
|
1619 | /** | |
|
1620 | * decorate an array to make it look like a `dojo/NodeList`. | |
|
1621 | */ | |
|
1622 | _wrap<U extends Node, V extends Node>(a: U[], parent?: NodeList<V>, NodeListCtor?: NodeListConstructor): NodeList<U>; | |
|
1623 | ||
|
1624 | _NodeListCtor: NodeListConstructor; | |
|
1625 | toString(): string; | |
|
1626 | ||
|
1627 | /** | |
|
1628 | * private function to hold to a parent NodeList. end() to return the parent NodeList. | |
|
1629 | */ | |
|
1630 | _stash(parent: Node): this; | |
|
1631 | ||
|
1632 | /** | |
|
1633 | * Listen for events on the nodes in the NodeList. | |
|
1634 | */ | |
|
1635 | on(eventName: string, listener: EventListener): Handle[]; | |
|
1636 | ||
|
1637 | /** | |
|
1638 | * Ends use of the current `NodeList` by returning the previous NodeList | |
|
1639 | * that generated the current NodeList. | |
|
1640 | */ | |
|
1641 | end<U extends Node>(): NodeList<U>; | |
|
1642 | ||
|
1643 | /** | |
|
1644 | * Returns a new NodeList, maintaining this one in place | |
|
1645 | */ | |
|
1646 | slice(begin: number, end?: number): this; | |
|
1647 | ||
|
1648 | /** | |
|
1649 | * Returns a new NodeList, manipulating this NodeList based on | |
|
1650 | * the arguments passed, potentially splicing in new elements | |
|
1651 | * at an offset, optionally deleting elements | |
|
1652 | */ | |
|
1653 | splice(index: number, howmany?: number, ...items: T[]): this; | |
|
1654 | ||
|
1655 | /** | |
|
1656 | * see `dojo/_base/array.indexOf()`. The primary difference is that the acted-on | |
|
1657 | * array is implicitly this NodeList | |
|
1658 | */ | |
|
1659 | indexOf(value: T, fromIndex?: number, findLast?: boolean): number; | |
|
1660 | ||
|
1661 | /** | |
|
1662 | * see `dojo/_base/array.lastIndexOf()`. The primary difference is that the | |
|
1663 | * acted-on array is implicitly this NodeList | |
|
1664 | */ | |
|
1665 | lastIndexOf(value: T, fromIndex?: number): number; | |
|
1666 | ||
|
1667 | /** | |
|
1668 | * see `dojo/_base/array.every()` and the [Array.every | |
|
1669 | * docs](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every). | |
|
1670 | * Takes the same structure of arguments and returns as | |
|
1671 | * dojo/_base/array.every() with the caveat that the passed array is | |
|
1672 | * implicitly this NodeList | |
|
1673 | */ | |
|
1674 | every(callback: (item: T, idx: number, nodeList: this) => boolean | string, thisObj?: Object): boolean; | |
|
1675 | ||
|
1676 | /** | |
|
1677 | * Takes the same structure of arguments and returns as | |
|
1678 | * `dojo/_base/array.some()` with the caveat that the passed array as | |
|
1679 | * implicitly this NodeList. See `dojo/_base/array.some()` and Mozillaas | |
|
1680 | * [Array.soas | |
|
1681 | * documentation](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some). | |
|
1682 | */ | |
|
1683 | some(callback: (item: T, idx: number, nodeList: this) => boolean | string, thisObj?: Object): boolean; | |
|
1684 | ||
|
1685 | /** | |
|
1686 | * Returns a new NodeList comprised of items in this NodeList | |
|
1687 | * as well as items passed in as parameters | |
|
1688 | */ | |
|
1689 | concat(...items: T[]): this; | |
|
1690 | ||
|
1691 | /** | |
|
1692 | * see `dojo/_base/array.map()`. The primary difference is that the acted-on | |
|
1693 | * array is implicitly this NodeList and the return is a | |
|
1694 | * NodeList (a subclass of Array) | |
|
1695 | */ | |
|
1696 | map<U extends Node>(func: (item: T, idx: number, nodeList: this) => U, obj?: Object): NodeList<U>; | |
|
1697 | ||
|
1698 | /** | |
|
1699 | * see `dojo/_base/array.forEach()`. The primary difference is that the acted-on | |
|
1700 | * array is implicitly this NodeList. If you want the option to break out | |
|
1701 | * of the forEach loop, use every() or some() instead. | |
|
1702 | */ | |
|
1703 | forEach(callback: (item: T, idx: number, nodeList: this) => void, thisObj?: Object): this; | |
|
1704 | ||
|
1705 | /** | |
|
1706 | * "masks" the built-in javascript filter() method (supported | |
|
1707 | * in Dojo via `dojo/_base/array.filter`) to support passing a simple | |
|
1708 | * string filter in addition to supporting filtering function | |
|
1709 | * objects. | |
|
1710 | */ | |
|
1711 | filter<U extends Node>(filter: NodeListFilter<T>, thisObj?: Object): NodeList<U>; | |
|
1712 | ||
|
1713 | /** | |
|
1714 | * Create a new instance of a specified class, using the | |
|
1715 | * specified properties and each node in the NodeList as a | |
|
1716 | * srcNodeRef. | |
|
1717 | */ | |
|
1718 | instantiate(declaredClass: string | GenericConstructor<any>, properties?: Object): this; | |
|
1719 | ||
|
1720 | /** | |
|
1721 | * Returns a new NodeList comprised of items in this NodeList | |
|
1722 | * at the given index or indices. | |
|
1723 | */ | |
|
1724 | at(...indices: number[]): this; | |
|
1725 | ||
|
1726 | } | |
|
1727 | ||
|
1728 | interface NodeListConstructor { | |
|
1729 | new <T extends Node>(array: number | Array<T>): NodeList<T>; | |
|
1730 | new <T extends Node>(...args: T[]): NodeList<T>; | |
|
1731 | <T extends Node>(array: number | Array<T>): NodeList<T>; | |
|
1732 | <T extends Node>(...args: T[]): NodeList<T>; | |
|
1733 | ||
|
1734 | prototype: NodeList<any>; | |
|
1735 | ||
|
1736 | /** | |
|
1737 | * decorate an array to make it look like a `dojo/NodeList`. | |
|
1738 | */ | |
|
1739 | _wrap<U extends Node, V extends Node>(a: U[], parent?: NodeList<V>, NodeListCtor?: NodeListConstructor): NodeList<U>; | |
|
1740 | ||
|
1741 | /** | |
|
1742 | * adapts a single node function to be used in the map-type | |
|
1743 | * actions. The return is a new array of values, as via `dojo/_base/array.map` | |
|
1744 | */ | |
|
1745 | _adaptAsMap<T extends Node, U extends Node>(f: (node: T) => U, o?: Object): NodeList<U>; | |
|
1746 | ||
|
1747 | /** | |
|
1748 | * adapts a single node function to be used in the forEach-type | |
|
1749 | * actions. The initial object is returned from the specialized | |
|
1750 | * function. | |
|
1751 | */ | |
|
1752 | _adaptAsForEach<T extends Node>(f: (node: T) => void, o?: Object): this; | |
|
1753 | ||
|
1754 | /** | |
|
1755 | * adapts a single node function to be used in the filter-type actions | |
|
1756 | */ | |
|
1757 | _adaptAsFilter<T extends Node>(f: (node: T) => boolean, o?: Object): this; | |
|
1758 | ||
|
1759 | /** | |
|
1760 | * adapts a single node function to be used in the map-type | |
|
1761 | * actions, behaves like forEach() or map() depending on arguments | |
|
1762 | */ | |
|
1763 | _adaptWithCondition<T extends Node, U extends Node>(f: (node: T) => U | void, g: (...args: any[]) => boolean, o?: Object): NodeList<U> | this; | |
|
1764 | } | |
|
1765 | ||
|
1766 | interface Query { | |
|
1767 | /** | |
|
1768 | * Returns nodes which match the given CSS selector, searching the | |
|
1769 | * entire document by default but optionally taking a node to scope | |
|
1770 | * the search by. Returns an instance of NodeList. | |
|
1771 | */ | |
|
1772 | <T extends Node>(query: string, root?: NodeOrString): NodeList<T>; | |
|
1773 | ||
|
1774 | /** | |
|
1775 | * Test to see if a node matches a selector | |
|
1776 | */ | |
|
1777 | matches(node: Node, selector: string, root?: NodeOrString): boolean; | |
|
1778 | ||
|
1779 | /** | |
|
1780 | * Filters an array of nodes. Note that this does not guarantee to return a NodeList, just an array. | |
|
1781 | */ | |
|
1782 | filter<T extends Node>(nodes: NodeList<T> | T[], select: string, root?: NodeOrString): T[] | NodeList<T>; | |
|
1783 | ||
|
1784 | /** | |
|
1785 | * can be used as AMD plugin to conditionally load new query engine | |
|
1786 | */ | |
|
1787 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
1788 | } | |
|
1789 | ||
|
1790 | /* dojo/ready */ | |
|
1791 | ||
|
1792 | interface Ready { | |
|
1793 | /** | |
|
1794 | * Add a function to execute on DOM content loaded and all requested modules have arrived and been evaluated. | |
|
1795 | * In most cases, the `domReady` plug-in should suffice and this method should not be needed. | |
|
1796 | * | |
|
1797 | * When called in a non-browser environment, just checks that all requested modules have arrived and been | |
|
1798 | * evaluated. | |
|
1799 | */ | |
|
1800 | (callback: Function): void; | |
|
1801 | (context: Object, callback: Function | string): void; | |
|
1802 | (priority: number, callback: Function): void; | |
|
1803 | (priority: number, context: Object, callback: Function | string): void; | |
|
1804 | } | |
|
1805 | ||
|
1806 | /* dojo/regexp */ | |
|
1807 | ||
|
1808 | interface RegExpModule { | |
|
1809 | /** | |
|
1810 | * Adds escape sequences for special characters in regular expressions | |
|
1811 | */ | |
|
1812 | escapeString(str: string, except?: string): string; | |
|
1813 | ||
|
1814 | /** | |
|
1815 | * Builds a regular expression that groups subexpressions | |
|
1816 | */ | |
|
1817 | buildGroupRE(arr: any[] | Object, re: (item: any) => string, nonCapture?: boolean): string; | |
|
1818 | ||
|
1819 | /** | |
|
1820 | * adds group match to expression | |
|
1821 | */ | |
|
1822 | group(expression: string, nonCapture?: boolean): string; | |
|
1823 | } | |
|
1824 | ||
|
1825 | /* dojo/request */ | |
|
1826 | ||
|
1827 | /* This is contained in request.d.ts */ | |
|
1828 | ||
|
1829 | /* dojo/require */ | |
|
1830 | ||
|
1831 | interface RequirePlugin { | |
|
1832 | dynamic: number; | |
|
1833 | normalize(id: string): string; | |
|
1834 | load(mid: string, require: any, loaded: (...modules: any[]) => void): void; | |
|
1835 | } | |
|
1836 | ||
|
1837 | /* dojo/robot */ | |
|
1838 | ||
|
1839 | interface Robot extends doh.Robot { | |
|
1840 | _resolveNode(n: NodeOrString | (() => Node)): Node; | |
|
1841 | _scrollIntoView(n: Node): void; | |
|
1842 | _position(n: Node): DomGeometryBoxExtents; | |
|
1843 | _getWindowChain(n: Node): Window[]; | |
|
1844 | ||
|
1845 | /** | |
|
1846 | * Scroll the passed node into view, if it is not. | |
|
1847 | */ | |
|
1848 | scrollIntoView(node: NodeOrString | (() => Node), delay?: number): void; | |
|
1849 | ||
|
1850 | /** | |
|
1851 | * Moves the mouse over the specified node at the specified relative x,y offset. | |
|
1852 | */ | |
|
1853 | mouseMoveAt( | |
|
1854 | node: NodeOrString | (() => Node), | |
|
1855 | delay?: number, | |
|
1856 | duration?: number, | |
|
1857 | offsetX?: number, | |
|
1858 | offsetY?: number | |
|
1859 | ): void; | |
|
1860 | } | |
|
1861 | ||
|
1862 | /* dojo/robotx */ | |
|
1863 | ||
|
1864 | interface RobotX extends Robot { | |
|
1865 | /** | |
|
1866 | * Called every time a new page is loaded into the iframe, to setup variables | |
|
1867 | * Point dojo.global, dojo.publish, etc. to refer to iframe. | |
|
1868 | * Remove for 2.0? | |
|
1869 | */ | |
|
1870 | _updateDocument(): void; | |
|
1871 | ||
|
1872 | /** | |
|
1873 | * Opens the application at the specified URL for testing, redirecting dojo to point to the application | |
|
1874 | * environment instead of the test environment. | |
|
1875 | */ | |
|
1876 | initRobot(url: string): void; | |
|
1877 | ||
|
1878 | /** | |
|
1879 | * Notifies DOH that the doh.robot is about to make a page change in the application it is driving, | |
|
1880 | * returning a doh.Deferred object the user should return in their runTest function as part of a DOH test. | |
|
1881 | */ | |
|
1882 | waitForPageToLoad(submitActions: () => void): any; | |
|
1883 | } | |
|
1884 | ||
|
1885 | /* dojo/router */ | |
|
1886 | ||
|
1887 | /* Module just exports instance of dojo.router.BaseRouter */ | |
|
1888 | ||
|
1889 | /* dojo/sniff */ | |
|
1890 | ||
|
1891 | interface Has { | |
|
1892 | (name: 'air'): boolean; | |
|
1893 | (name: 'wp'): void | number; | |
|
1894 | (name: 'msapp'): void | number; | |
|
1895 | (name: 'khtml'): void | number; | |
|
1896 | (name: 'edge'): void | number; | |
|
1897 | (name: 'opr'): void | number; | |
|
1898 | (name: 'webkit'): void | number; | |
|
1899 | (name: 'chrome'): void | number; | |
|
1900 | (name: 'android'): void | number; | |
|
1901 | (name: 'safari'): void | number; | |
|
1902 | (name: 'mac'): boolean; | |
|
1903 | (name: 'quirks'): boolean; | |
|
1904 | (name: 'iphone'): void | number; | |
|
1905 | (name: 'ipod'): void | number; | |
|
1906 | (name: 'ipad'): void | number; | |
|
1907 | (name: 'ios'): void | number; | |
|
1908 | (name: 'bb'): void | number | boolean; | |
|
1909 | (name: 'trident'): void | number; | |
|
1910 | (name: 'svg'): boolean; | |
|
1911 | (name: 'opera'): void | number; | |
|
1912 | (name: 'mozilla'): void | number; | |
|
1913 | (name: 'ff'): void | number; | |
|
1914 | (name: 'ie'): void | number; | |
|
1915 | (name: 'wii'): boolean | any; | |
|
1916 | } | |
|
1917 | ||
|
1918 | /* Just rexports has after adding features */ | |
|
1919 | ||
|
1920 | /* dojo/Stateful */ | |
|
1921 | ||
|
1922 | interface WatchHandle extends Handle { | |
|
1923 | unwatch(): void; | |
|
1924 | } | |
|
1925 | ||
|
1926 | interface Stateful<T = any> { | |
|
1927 | /** | |
|
1928 | * Used across all instances a hash to cache attribute names and their getter | |
|
1929 | * and setter names. | |
|
1930 | */ | |
|
1931 | _attrPairNames: { [attr: string]: string }; | |
|
1932 | ||
|
1933 | /** | |
|
1934 | * Helper function for get() and set(). | |
|
1935 | * Caches attribute name values so we don't do the string ops every time. | |
|
1936 | */ | |
|
1937 | _getAttrNames(name: string): string; | |
|
1938 | ||
|
1939 | /** | |
|
1940 | * Automatic setting of params during construction | |
|
1941 | */ | |
|
1942 | postscript(params?: Object): void; | |
|
1943 | ||
|
1944 | /** | |
|
1945 | * Get a property on a Stateful instance. | |
|
1946 | */ | |
|
1947 | get<K extends keyof T & string>(name: K): T[K]; | |
|
1948 | ||
|
1949 | /** | |
|
1950 | * Set a property on a Stateful instance | |
|
1951 | */ | |
|
1952 | set<K extends keyof T & string>(name: K, value: T[K]): this; | |
|
1953 | set<K extends { [p in keyof T]: T[p] extends any[] ? p : never; }[keyof T & string] >(name: K, ...values: T[K]): this; | |
|
1954 | set(values: Partial<T>): this; | |
|
1955 | ||
|
1956 | /** | |
|
1957 | * Internal helper for directly changing an attribute value. | |
|
1958 | */ | |
|
1959 | _changeAttrValue(name: string, value: any): this; | |
|
1960 | ||
|
1961 | /** | |
|
1962 | * Watches a property for changes | |
|
1963 | */ | |
|
1964 | watch(callback: <K extends keyof T>(prop: K, oldValue: T[K], newValue: T[K]) => void): WatchHandle; | |
|
1965 | watch<K extends keyof T>(name: K, callback: (prop: K, oldValue: T[K], newValue: T[K]) => void): WatchHandle; | |
|
1966 | } | |
|
1967 | ||
|
1968 | interface StatefulConstructor extends _base.DeclareConstructor<Stateful> { | |
|
1969 | new <T>(params?: Partial<T>): Stateful<T>; | |
|
1970 | } | |
|
1971 | ||
|
1972 | /* dojo/string */ | |
|
1973 | ||
|
1974 | interface String { | |
|
1975 | ||
|
1976 | /** | |
|
1977 | * Efficiently escape a string for insertion into HTML (innerHTML or attributes), replacing &, <, >, ", ', and / characters. | |
|
1978 | */ | |
|
1979 | escape(str: string): string; | |
|
1980 | ||
|
1981 | /** | |
|
1982 | * Efficiently replicate a string `n` times. | |
|
1983 | */ | |
|
1984 | rep(str: string, num: number): string; | |
|
1985 | ||
|
1986 | /** | |
|
1987 | * Pad a string to guarantee that it is at least `size` length by | |
|
1988 | * filling with the character `ch` at either the start or end of the | |
|
1989 | * string. Pads at the start, by default. | |
|
1990 | */ | |
|
1991 | pad(text: string, size: number, ch?: string, end?: boolean): string; | |
|
1992 | ||
|
1993 | /** | |
|
1994 | * Performs parameterized substitutions on a string. Throws an | |
|
1995 | * exception if any parameter is unmatched. | |
|
1996 | */ | |
|
1997 | substitute(template: string, map: Object | any[], transform?: (value: any, key: string) => any, thisObject?: Object): string; | |
|
1998 | ||
|
1999 | /** | |
|
2000 | * Trims whitespace from both sides of the string | |
|
2001 | */ | |
|
2002 | trim(str: string): string; | |
|
2003 | } | |
|
2004 | ||
|
2005 | /* dojo/text */ | |
|
2006 | ||
|
2007 | /** | |
|
2008 | * A getter and setter for storing the string content associated with the | |
|
2009 | * module and url arguments. | |
|
2010 | */ | |
|
2011 | interface Cache { | |
|
2012 | (module: string | GenericObject, url: string, value?: string | { value: string, sanitize?: boolean }): string; | |
|
2013 | } | |
|
2014 | ||
|
2015 | interface Text { | |
|
2016 | /** | |
|
2017 | * the dojo/text caches it's own resources because of dojo.cache | |
|
2018 | */ | |
|
2019 | dynamic: boolean; | |
|
2020 | ||
|
2021 | normalize(id: string, toAbsMid: Function): string; /* TODO: Align with loader api */ | |
|
2022 | ||
|
2023 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
2024 | } | |
|
2025 | ||
|
2026 | /* dojo/throttle */ | |
|
2027 | ||
|
2028 | interface Throttle { | |
|
2029 | <T extends Function>(cb: T, wait: number): T; | |
|
2030 | } | |
|
2031 | ||
|
2032 | /* dojo/topic */ | |
|
2033 | ||
|
2034 | interface Topic { | |
|
2035 | /** | |
|
2036 | * Publishes a message to a topic on the pub/sub hub. All arguments after | |
|
2037 | * the first will be passed to the subscribers, so any number of arguments | |
|
2038 | * can be provided (not just event). | |
|
2039 | */ | |
|
2040 | publish(topic: string | ExtensionEvent, ...event: any[]): boolean; | |
|
2041 | ||
|
2042 | /** | |
|
2043 | * Subscribes to a topic on the pub/sub hub | |
|
2044 | */ | |
|
2045 | subscribe(topic: string | ExtensionEvent, listener: EventListener | Function): Handle; | |
|
2046 | } | |
|
2047 | ||
|
2048 | /* dojo/touch */ | |
|
2049 | ||
|
2050 | interface Touch { | |
|
2051 | press: ExtensionEvent; | |
|
2052 | move: ExtensionEvent; | |
|
2053 | release: ExtensionEvent; | |
|
2054 | cancel: ExtensionEvent; | |
|
2055 | over: ExtensionEvent; | |
|
2056 | out: ExtensionEvent; | |
|
2057 | enter: ExtensionEvent; | |
|
2058 | leave: ExtensionEvent; | |
|
2059 | } | |
|
2060 | ||
|
2061 | /* dojo/uacss */ | |
|
2062 | ||
|
2063 | /* rexports has after adding classes to dom */ | |
|
2064 | ||
|
2065 | /* dojo/when */ | |
|
2066 | ||
|
2067 | interface When { | |
|
2068 | /** | |
|
2069 | * Transparently applies callbacks to values and/or promises. | |
|
2070 | */ | |
|
2071 | <T>(value: T | dojo.promise.Promise<T>): dojo.promise.Promise<T>; | |
|
2072 | <T>(value: T | dojo.promise.Promise<T>, | |
|
2073 | callback?: dojo.promise.PromiseCallback<T, T>, | |
|
2074 | errback?: dojo.promise.PromiseErrback<T>, | |
|
2075 | progress?: dojo.promise.PromiseProgback): T | dojo.promise.Promise<T>; | |
|
2076 | <T, U>(value: T | dojo.promise.Promise<T>, | |
|
2077 | callback?: dojo.promise.PromiseCallback<T, U>, | |
|
2078 | errback?: dojo.promise.PromiseErrback<U>, | |
|
2079 | progress?: dojo.promise.PromiseProgback): U | dojo.promise.Promise<U>; | |
|
2080 | } | |
|
2081 | ||
|
2082 | /* dojo/window */ | |
|
2083 | ||
|
2084 | interface WindowModule { | |
|
2085 | ||
|
2086 | /** | |
|
2087 | * Returns the dimensions and scroll position of the viewable area of a browser window | |
|
2088 | */ | |
|
2089 | getBox(doc?: Document): DomGeometryBox; | |
|
2090 | ||
|
2091 | /** | |
|
2092 | * Get window object associated with document doc. | |
|
2093 | */ | |
|
2094 | get(doc?: Document): Window; | |
|
2095 | ||
|
2096 | /** | |
|
2097 | * Scroll the passed node into view using minimal movement, if it is not already. | |
|
2098 | */ | |
|
2099 | scrollIntoView(node: Element, pos?: DomGeometryXYBox): void; | |
|
2100 | } | |
|
2101 | } |
@@ -0,0 +1,44 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace errors { | |
|
3 | ||
|
4 | /* dojo/errors/CancelError */ | |
|
5 | ||
|
6 | interface CancelError extends Error { | |
|
7 | name: string; | |
|
8 | dojoType: string; | |
|
9 | } | |
|
10 | ||
|
11 | interface CancelErrorConstructor extends ErrorCtor<CancelError> { } | |
|
12 | ||
|
13 | /* dojo/errors/create */ | |
|
14 | ||
|
15 | interface ErrorCtor<E> { | |
|
16 | new (message?: string): E; | |
|
17 | prototype: E; | |
|
18 | } | |
|
19 | ||
|
20 | interface Create { | |
|
21 | <E extends Error, P extends Object>(name: string, ctor: GenericConstructor<any>, base: E, props: P): ErrorCtor<E & P>; | |
|
22 | <E extends Error, P extends Object>(name: string, ctor: GenericConstructor<any>, base: E): ErrorCtor<E>; | |
|
23 | <E extends Error, P extends Object>(name: string, ctor: GenericConstructor<any>): ErrorCtor<E>; | |
|
24 | <E extends Error, P extends Object>(name: string): ErrorCtor<E>; | |
|
25 | } | |
|
26 | ||
|
27 | /* dojo/errors/RequestError */ | |
|
28 | ||
|
29 | interface RequestError extends Error { | |
|
30 | response: request.Response<any>; | |
|
31 | } | |
|
32 | ||
|
33 | interface RequestErrorConstructor extends ErrorCtor<RequestError> { } | |
|
34 | ||
|
35 | /* dojo/errors/RequestTimeoutError */ | |
|
36 | ||
|
37 | interface RequestTimeoutError extends RequestError { | |
|
38 | dojoType: string; | |
|
39 | } | |
|
40 | ||
|
41 | interface RequestTimeoutErrorConstructor extends ErrorCtor<RequestTimeoutError> { } | |
|
42 | ||
|
43 | } | |
|
44 | } |
@@ -0,0 +1,201 | |||
|
1 | /// <reference path="_base.d.ts" /> | |
|
2 | ||
|
3 | /* dojo/fx */ | |
|
4 | ||
|
5 | declare namespace dojo { | |
|
6 | namespace _base { | |
|
7 | ||
|
8 | interface AnimationStartEnd { | |
|
9 | start?: number | string; | |
|
10 | end?: number | string; | |
|
11 | } | |
|
12 | ||
|
13 | interface AnimationArgumentsProperties { | |
|
14 | top?: number | AnimationStartEnd; | |
|
15 | left?: number | AnimationStartEnd; | |
|
16 | height?: number | AnimationStartEnd; | |
|
17 | } | |
|
18 | ||
|
19 | interface Fx { | |
|
20 | /** | |
|
21 | * Chain a list of `dojo/_base/fx.Animation`s to run in sequence | |
|
22 | */ | |
|
23 | chain(animations: Animation[]): Animation; | |
|
24 | chain(...animations: Animation[]): Animation; | |
|
25 | ||
|
26 | /** | |
|
27 | * Combine a list of `dojo/_base/fx.Animation`s to run in parallel | |
|
28 | */ | |
|
29 | combine(animations: Animation[]): Animation; | |
|
30 | combine(...animations: Animation[]): Animation; | |
|
31 | ||
|
32 | /** | |
|
33 | * Expand a node to it's natural height. | |
|
34 | */ | |
|
35 | wipeIn(args: AnimationArguments): Animation; | |
|
36 | ||
|
37 | /** | |
|
38 | * Shrink a node to nothing and hide it. | |
|
39 | */ | |
|
40 | wipeOut(args: AnimationArguments): Animation; | |
|
41 | ||
|
42 | /** | |
|
43 | * Slide a node to a new top/left position | |
|
44 | */ | |
|
45 | slideTo(args: AnimationArguments): Animation; | |
|
46 | } | |
|
47 | } | |
|
48 | } | |
|
49 | ||
|
50 | declare module 'dojo/fx' { | |
|
51 | const coreFx: dojo._base.Fx; | |
|
52 | export = coreFx; | |
|
53 | } | |
|
54 | ||
|
55 | /* dojo/fx/easing */ | |
|
56 | ||
|
57 | declare namespace dojo { | |
|
58 | namespace fx { | |
|
59 | interface Easing { | |
|
60 | linear(n?: number): number; | |
|
61 | quadIn(n?: number): number; | |
|
62 | quadOut(n?: number): number; | |
|
63 | quadInOut(n?: number): number; | |
|
64 | cubicIn(n?: number): number; | |
|
65 | cubicOut(n?: number): number; | |
|
66 | cubicInOut(n?: number): number; | |
|
67 | quartIn(n?: number): number; | |
|
68 | quartOut(n?: number): number; | |
|
69 | quartInOut(n?: number): number; | |
|
70 | quintIn(n?: number): number; | |
|
71 | quintOut(n?: number): number; | |
|
72 | qunitInOut(n?: number): number; | |
|
73 | sineIn(n?: number): number; | |
|
74 | sineOut(n?: number): number; | |
|
75 | sineInOut(n?: number): number; | |
|
76 | expoIn(n?: number): number; | |
|
77 | expoOut(n?: number): number; | |
|
78 | expoInOut(n?: number): number; | |
|
79 | circIn(n?: number): number; | |
|
80 | circOut(n?: number): number; | |
|
81 | circInOut(n?: number): number; | |
|
82 | ||
|
83 | /** | |
|
84 | * An easing function that starts away from the target, | |
|
85 | * and quickly accelerates towards the end value. | |
|
86 | * | |
|
87 | * Use caution when the easing will cause values to become | |
|
88 | * negative as some properties cannot be set to negative values. | |
|
89 | */ | |
|
90 | backIn(n?: number): number; | |
|
91 | ||
|
92 | /** | |
|
93 | * An easing function that pops past the range briefly, and slowly comes back. | |
|
94 | */ | |
|
95 | backOut(n?: number): number; | |
|
96 | ||
|
97 | /** | |
|
98 | * An easing function combining the effects of `backIn` and `backOut` | |
|
99 | */ | |
|
100 | backInOut(n?: number): number; | |
|
101 | ||
|
102 | /** | |
|
103 | * An easing function the elastically snaps from the start value | |
|
104 | */ | |
|
105 | elasticIn(n?: number): number; | |
|
106 | ||
|
107 | /** | |
|
108 | * An easing function that elasticly snaps around the target value, | |
|
109 | * near the end of the Animation | |
|
110 | */ | |
|
111 | elasticOut(n?: number): number; | |
|
112 | ||
|
113 | /** | |
|
114 | * An easing function that elasticly snaps around the value, near | |
|
115 | * the beginning and end of the Animation. | |
|
116 | */ | |
|
117 | elasticInOut(n?: number): number; | |
|
118 | ||
|
119 | /** | |
|
120 | * An easing function that 'bounces' near the beginning of an Animation | |
|
121 | */ | |
|
122 | bounceIn(n?: number): number; | |
|
123 | ||
|
124 | /** | |
|
125 | * An easing function that 'bounces' near the end of an Animation | |
|
126 | */ | |
|
127 | bounceOut(n?: number): number; | |
|
128 | ||
|
129 | /** | |
|
130 | * An easing function that 'bounces' at the beginning and end of the Animation | |
|
131 | */ | |
|
132 | bounceInOut(n?: number): number; | |
|
133 | } | |
|
134 | } | |
|
135 | } | |
|
136 | ||
|
137 | declare module 'dojo/fx/easing' { | |
|
138 | const easing: dojo.fx.Easing; | |
|
139 | export = easing; | |
|
140 | } | |
|
141 | ||
|
142 | /* dojo/fx/Toggler */ | |
|
143 | ||
|
144 | declare namespace dojo { | |
|
145 | namespace fx { | |
|
146 | ||
|
147 | interface TogglerArguments extends _base.AnimationArguments { } | |
|
148 | ||
|
149 | interface Toggler { | |
|
150 | _showArgs: TogglerArguments; | |
|
151 | _showAnim: _base.Animation; | |
|
152 | _hideArgs: TogglerArguments; | |
|
153 | _hideAnim: _base.Animation; | |
|
154 | _isShowing: boolean; | |
|
155 | _isHiding: boolean; | |
|
156 | ||
|
157 | /** | |
|
158 | * the node to target for the showing and hiding animations | |
|
159 | */ | |
|
160 | node: Node; | |
|
161 | ||
|
162 | /** | |
|
163 | * The function that returns the `dojo.Animation` to show the node | |
|
164 | */ | |
|
165 | showFunc: (args: _base.FadeArguments) => _base.Animation; | |
|
166 | ||
|
167 | /** | |
|
168 | * The function that returns the `dojo.Animation` to hide the node | |
|
169 | */ | |
|
170 | hideFunc: (args: _base.FadeArguments) => _base.Animation; | |
|
171 | ||
|
172 | /** | |
|
173 | * Time in milliseconds to run the show Animation | |
|
174 | */ | |
|
175 | showDuration: number; | |
|
176 | ||
|
177 | /** | |
|
178 | * Time in milliseconds to run the hide Animation | |
|
179 | */ | |
|
180 | hideDuration: number; | |
|
181 | ||
|
182 | /** | |
|
183 | * Toggle the node to showing | |
|
184 | */ | |
|
185 | show(delay?: number): _base.Animation; | |
|
186 | ||
|
187 | /** | |
|
188 | * Toggle the node to hidden | |
|
189 | */ | |
|
190 | hide(delay?: number): _base.Animation; | |
|
191 | } | |
|
192 | ||
|
193 | interface TogglerConstructor { | |
|
194 | /** | |
|
195 | * A simple `dojo.Animation` toggler API. | |
|
196 | */ | |
|
197 | new (args: TogglerArguments): Toggler; | |
|
198 | prototype: Toggler; | |
|
199 | } | |
|
200 | } | |
|
201 | } |
@@ -0,0 +1,181 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | /// <reference path="_base.d.ts" /> | |
|
3 | /// <reference path="cldr.d.ts" /> | |
|
4 | /// <reference path="data.d.ts" /> | |
|
5 | /// <reference path="date.d.ts" /> | |
|
6 | /// <reference path="dnd.d.ts" /> | |
|
7 | /// <reference path="errors.d.ts" /> | |
|
8 | /// <reference path="io.d.ts" /> | |
|
9 | /// <reference path="on.d.ts" /> | |
|
10 | /// <reference path="promise.d.ts" /> | |
|
11 | /// <reference path="request.d.ts" /> | |
|
12 | /// <reference path="router.d.ts" /> | |
|
13 | /// <reference path="rpc.d.ts" /> | |
|
14 | /// <reference path="selector.d.ts" /> | |
|
15 | /// <reference path="store.d.ts" /> | |
|
16 | ||
|
17 | /** | |
|
18 | * The base configuration interface type, which is used when the loader starts and looks | |
|
19 | * for the dojoConfig variable. | |
|
20 | */ | |
|
21 | interface DojoConfig { | |
|
22 | /** | |
|
23 | * Should the module loader support asyncronous loading, or legacy syncronous | |
|
24 | * loading. Defaults to false (legacy mode). | |
|
25 | */ | |
|
26 | async?: boolean; | |
|
27 | ||
|
28 | /** Defaults to `false`. If set to `true`, ensures that Dojo provides | |
|
29 | * extended debugging feedback via Firebug. If Firebug is not available | |
|
30 | * on your platform, setting `isDebug` to `true` will force Dojo to | |
|
31 | * pull in (and display) the version of Firebug Lite which is | |
|
32 | * integrated into the Dojo distribution, thereby always providing a | |
|
33 | * debugging/logging console when `isDebug` is enabled. Note that | |
|
34 | * Firebug's `console.*` methods are ALWAYS defined by Dojo. If | |
|
35 | * `isDebug` is false and you are on a platform without Firebug, these | |
|
36 | * methods will be defined as no-ops. | |
|
37 | */ | |
|
38 | isDebug?: boolean; | |
|
39 | ||
|
40 | /** | |
|
41 | * The locale to assume for loading localized resources in this page, | |
|
42 | * specified according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt). | |
|
43 | * Must be specified entirely in lowercase, e.g. `en-us` and `zh-cn`. | |
|
44 | * See the documentation for `dojo.i18n` and `dojo.requireLocalization` | |
|
45 | * for details on loading localized resources. If no locale is specified, | |
|
46 | * Dojo assumes the locale of the user agent, according to `navigator.userLanguage` | |
|
47 | * or `navigator.language` properties. | |
|
48 | */ | |
|
49 | locale?: string; | |
|
50 | ||
|
51 | /** | |
|
52 | * No default value. Specifies additional locales whose | |
|
53 | * resources should also be loaded alongside the default locale when | |
|
54 | * calls to `dojo.requireLocalization()` are processed. | |
|
55 | */ | |
|
56 | extraLocale?: string[]; | |
|
57 | ||
|
58 | /** | |
|
59 | * The directory in which `dojo.js` is located. Under normal | |
|
60 | * conditions, Dojo auto-detects the correct location from which it | |
|
61 | * was loaded. You may need to manually configure `baseUrl` in cases | |
|
62 | * where you have renamed `dojo.js` or in which `<base>` tags confuse | |
|
63 | * some browsers (e.g. IE 6). The variable `dojo.baseUrl` is assigned | |
|
64 | * either the value of `djConfig.baseUrl` if one is provided or the | |
|
65 | * auto-detected root if not. Other modules are located relative to | |
|
66 | * this path. The path should end in a slash. | |
|
67 | */ | |
|
68 | baseUrl?: string; | |
|
69 | ||
|
70 | /** | |
|
71 | * A map of module names to paths relative to `dojo.baseUrl`. The | |
|
72 | * key/value pairs correspond directly to the arguments which | |
|
73 | * `dojo.registerModulePath` accepts. Specifying | |
|
74 | * `djConfig.modulePaths = { "foo": "../../bar" }` is the equivalent | |
|
75 | * of calling `dojo.registerModulePath("foo", "../../bar");`. Multiple | |
|
76 | * modules may be configured via `djConfig.modulePaths`. | |
|
77 | */ | |
|
78 | modulePaths?: { [mid: string]: string }; | |
|
79 | ||
|
80 | /** | |
|
81 | * Adds a callback via dojo/ready. Useful when Dojo is added after | |
|
82 | * the page loads and djConfig.afterOnLoad is true. Supports the same | |
|
83 | * arguments as dojo/ready. When using a function reference, use | |
|
84 | * `djConfig.addOnLoad = function(){};`. For object with function name use | |
|
85 | * `djConfig.addOnLoad = [myObject, "functionName"];` and for object with | |
|
86 | * function reference use | |
|
87 | * `djConfig.addOnLoad = [myObject, function(){}];` | |
|
88 | */ | |
|
89 | addOnLoad?: () => void | [any, string]; | |
|
90 | ||
|
91 | /** | |
|
92 | * Run the parser after the page is loaded | |
|
93 | */ | |
|
94 | parseOnLoad?: boolean; | |
|
95 | ||
|
96 | /** | |
|
97 | * An array of module names to be loaded immediately after dojo.js has been included | |
|
98 | * in a page. | |
|
99 | */ | |
|
100 | require?: string[]; | |
|
101 | ||
|
102 | /** | |
|
103 | * Default duration, in milliseconds, for wipe and fade animations within dijits. | |
|
104 | * Assigned to dijit.defaultDuration. | |
|
105 | */ | |
|
106 | defaultDuration?: number; | |
|
107 | ||
|
108 | /** | |
|
109 | * Used by some modules to configure an empty iframe. Used by dojo/io/iframe and | |
|
110 | * dojo/back, and dijit/popup support in IE where an iframe is needed to make sure native | |
|
111 | * controls do not bleed through the popups. Normally this configuration variable | |
|
112 | * does not need to be set, except when using cross-domain/CDN Dojo builds. | |
|
113 | * Save dojo/resources/blank.html to your domain and set `djConfig.dojoBlankHtmlUrl` | |
|
114 | * to the path on your domain your copy of blank.html. | |
|
115 | */ | |
|
116 | dojoBlankHtmlUrl?: string; | |
|
117 | ||
|
118 | /** | |
|
119 | * Set this to true to enable publishing of topics for the different phases of | |
|
120 | * IO operations. Publishing is done via dojo/topic.publish(). See dojo/main.__IoPublish for a list | |
|
121 | * of topics that are published. | |
|
122 | */ | |
|
123 | ioPublish?: boolean; | |
|
124 | ||
|
125 | /** | |
|
126 | * If set to a value that evaluates to true such as a string or array and | |
|
127 | * isDebug is true and Firebug is not available or running, then it bypasses | |
|
128 | * the creation of Firebug Lite allowing you to define your own console object. | |
|
129 | */ | |
|
130 | useCustomLogger?: any; | |
|
131 | ||
|
132 | /** | |
|
133 | * Array containing the r, g, b components used as transparent color in dojo.Color; | |
|
134 | * if undefined, ColorValue (white) will be used. | |
|
135 | */ | |
|
136 | transparentColor?: dojo._base.ColorValue | dojo._base.ColorValueAlpha; | |
|
137 | ||
|
138 | /** | |
|
139 | * Defines dependencies to be used before the loader has been loaded. | |
|
140 | * When provided, they cause the loader to execute require(deps, callback) | |
|
141 | * once it has finished loading. Should be used with callback. | |
|
142 | */ | |
|
143 | deps?: (() => string[]) | string[]; | |
|
144 | ||
|
145 | /** | |
|
146 | * Defines the cached has API variables | |
|
147 | */ | |
|
148 | hasCache?: dojo.HasCache; | |
|
149 | ||
|
150 | /** | |
|
151 | * Defines a callback to be used when dependencies are defined before | |
|
152 | * the loader has been loaded. When provided, they cause the loader to | |
|
153 | * execute require(deps, callback) once it has finished loading. | |
|
154 | */ | |
|
155 | callback?: (...args: any[]) => void; | |
|
156 | ||
|
157 | /** | |
|
158 | * Whether deferred instrumentation should be loaded or included | |
|
159 | * in builds. | |
|
160 | */ | |
|
161 | deferredInstrumentation?: boolean; | |
|
162 | ||
|
163 | /** | |
|
164 | * Whether the deferred instrumentation should be used. | |
|
165 | * | |
|
166 | * * `"report-rejections"`: report each rejection as it occurs. | |
|
167 | * * `true` or `1` or `"report-unhandled-rejections"`: wait 1 second | |
|
168 | * in an attempt to detect unhandled rejections. | |
|
169 | */ | |
|
170 | useDeferredInstrumentation?: string | boolean | number; | |
|
171 | ||
|
172 | /** | |
|
173 | * Package configuration to pass to the AMD loader. | |
|
174 | */ | |
|
175 | packages?: dojo.Package[]; | |
|
176 | ||
|
177 | /** | |
|
178 | * A map of packages used to configure the AMD loader | |
|
179 | */ | |
|
180 | map?: dojo.ModuleMap; | |
|
181 | } |
@@ -0,0 +1,184 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace io { | |
|
3 | /* dojo/io/iframe */ | |
|
4 | ||
|
5 | interface IFrameIoArgs extends _base.IoArgs { | |
|
6 | ||
|
7 | /** | |
|
8 | * The HTTP method to use. "GET" or "POST" are the only supported | |
|
9 | * values. It will try to read the value from the form node's | |
|
10 | * method, then try this argument. If neither one exists, then it | |
|
11 | * defaults to POST. | |
|
12 | */ | |
|
13 | method?: string; | |
|
14 | ||
|
15 | /** | |
|
16 | * Specifies what format the result data should be given to the | |
|
17 | * load/handle callback. Valid values are: text, html, xml, json, | |
|
18 | * javascript. IMPORTANT: For all values EXCEPT html and xml, The | |
|
19 | * server response should be an HTML file with a textarea element. | |
|
20 | * The response data should be inside the textarea element. Using an | |
|
21 | * HTML document the only reliable, cross-browser way this | |
|
22 | * transport can know when the response has loaded. For the html | |
|
23 | * handleAs value, just return a normal HTML document. NOTE: xml | |
|
24 | * is now supported with this transport (as of 1.1+); a known issue | |
|
25 | * is if the XML document in question is malformed, Internet Explorer | |
|
26 | * will throw an uncatchable error. | |
|
27 | */ | |
|
28 | handleAs?: string; | |
|
29 | ||
|
30 | /** | |
|
31 | * If "form" is one of the other args properties, then the content | |
|
32 | * object properties become hidden form form elements. For | |
|
33 | * instance, a content object of {name1 : "value1"} is converted | |
|
34 | * to a hidden form element with a name of "name1" and a value of | |
|
35 | * "value1". If there is not a "form" property, then the content | |
|
36 | * object is converted into a name=value&name=value string, by | |
|
37 | * using xhr.objectToQuery(). | |
|
38 | */ | |
|
39 | content?: Object; | |
|
40 | } | |
|
41 | ||
|
42 | interface IFrame { | |
|
43 | ||
|
44 | /** | |
|
45 | * Creates a hidden iframe in the page. Used mostly for IO | |
|
46 | * transports. You do not need to call this to start a | |
|
47 | * dojo/io/iframe request. Just call send(). | |
|
48 | */ | |
|
49 | create(fname: string, onloadstr: string, uri: string): HTMLIFrameElement; | |
|
50 | ||
|
51 | /** | |
|
52 | * Sets the URL that is loaded in an IFrame. The replace parameter | |
|
53 | * indicates whether location.replace() should be used when | |
|
54 | * changing the location of the iframe. | |
|
55 | */ | |
|
56 | setSrc(iframe: HTMLIFrameElement, src: string, replace?: boolean): void; | |
|
57 | ||
|
58 | /** | |
|
59 | * Returns the document object associated with the iframe DOM Node argument. | |
|
60 | */ | |
|
61 | doc(iframeNode: HTMLIFrameElement): Document; | |
|
62 | ||
|
63 | /** | |
|
64 | * Function that sends the request to the server. | |
|
65 | * This transport can only process one send() request at a time, so if send() is called | |
|
66 | * multiple times, it will queue up the calls and only process one at a time. | |
|
67 | */ | |
|
68 | send<T>(args: IFrameIoArgs): _base.Deferred<T>; | |
|
69 | ||
|
70 | _iframeOnload: any; | |
|
71 | } | |
|
72 | ||
|
73 | /* dojo/io/script */ | |
|
74 | ||
|
75 | interface ScriptIoArgs extends _base.IoArgs { | |
|
76 | ||
|
77 | /** | |
|
78 | * Deprecated as of Dojo 1.4 in favor of "jsonp", but still supported for | |
|
79 | * legacy code. See notes for jsonp property. | |
|
80 | */ | |
|
81 | callbackParamName: string; | |
|
82 | ||
|
83 | /** | |
|
84 | * The URL parameter name that indicates the JSONP callback string. | |
|
85 | * For instance, when using Yahoo JSONP calls it is normally, | |
|
86 | * jsonp: "callback". For AOL JSONP calls it is normally | |
|
87 | * jsonp: "c". | |
|
88 | */ | |
|
89 | jsonp: string; | |
|
90 | ||
|
91 | /** | |
|
92 | * A string of JavaScript that when evaluated like so: | |
|
93 | * "typeof(" + checkString + ") != 'undefined'" | |
|
94 | * being true means that the script fetched has been loaded. | |
|
95 | * Do not use this if doing a JSONP type of call (use callbackParamName instead). | |
|
96 | */ | |
|
97 | checkString: string; | |
|
98 | ||
|
99 | /** | |
|
100 | * The Document object for a child iframe. If this is passed in, the script | |
|
101 | * will be attached to that document. This can be helpful in some comet long-polling | |
|
102 | * scenarios with Firefox and Opera. | |
|
103 | */ | |
|
104 | frameDoc: Document; | |
|
105 | } | |
|
106 | ||
|
107 | interface Script { | |
|
108 | ||
|
109 | /** | |
|
110 | * sends a get request using a dynamically created script tag. | |
|
111 | */ | |
|
112 | get<T>(ioArgs: ScriptIoArgs): _base.Deferred<T>; | |
|
113 | ||
|
114 | /** | |
|
115 | * creates a new `<script>` tag pointing to the specified URL and | |
|
116 | * adds it to the document. | |
|
117 | */ | |
|
118 | attach(id: string, url: string, frameDoc?: Document): HTMLScriptElement; | |
|
119 | ||
|
120 | /** | |
|
121 | * removes the script element with the given id, from the given frameDocument. | |
|
122 | * If no frameDocument is passed, the current document is used. | |
|
123 | */ | |
|
124 | remove(id: string, frameDoc?: Document, cleanup?: boolean): void; | |
|
125 | ||
|
126 | /** | |
|
127 | * sets up a Deferred object for an IO request. | |
|
128 | */ | |
|
129 | _makeScriptDeferred(args: ScriptIoArgs, cancel?: Function): _base.Deferred<any>; | |
|
130 | ||
|
131 | /** | |
|
132 | * canceller function for xhr._ioSetArgs call. | |
|
133 | */ | |
|
134 | _deferredCancel(dfd: _base.Deferred<any>): void; | |
|
135 | ||
|
136 | /** | |
|
137 | * okHandler function for xhr._ioSetArgs call. | |
|
138 | */ | |
|
139 | _deferredOk(dfd: _base.Deferred<any>): void; | |
|
140 | ||
|
141 | /** | |
|
142 | * errHandler function for xhr._ioSetArgs call. | |
|
143 | */ | |
|
144 | _deferredError(error: Error, dfd: _base.Deferred<any>): Error; | |
|
145 | ||
|
146 | _deadScripts: any[]; | |
|
147 | _counter: number; | |
|
148 | ||
|
149 | /** | |
|
150 | * sets up an entry in the deadScripts array. | |
|
151 | */ | |
|
152 | _addDeadScript(ioArgs: ScriptIoArgs): void; | |
|
153 | ||
|
154 | /** | |
|
155 | * inflight check function to see if dfd is still valid. | |
|
156 | */ | |
|
157 | _validCheck(dfd: _base.Deferred<any>): boolean; | |
|
158 | ||
|
159 | /** | |
|
160 | * inflight check function to see if IO finished. | |
|
161 | */ | |
|
162 | _ioCheck(dfd: _base.Deferred<any>): boolean; | |
|
163 | ||
|
164 | /** | |
|
165 | * inflight function to handle a completed response. | |
|
166 | */ | |
|
167 | _resHandle(dfd: _base.Deferred<any>): void; | |
|
168 | ||
|
169 | /** | |
|
170 | * A method that can be overridden by other modules | |
|
171 | * to control when the script attachment occurs. | |
|
172 | */ | |
|
173 | _canAttach(ioArgs: ScriptIoArgs): boolean; | |
|
174 | ||
|
175 | /** | |
|
176 | * generic handler for jsonp callback. A pointer to this function | |
|
177 | * is used for all jsonp callbacks. NOTE: the "this" in this | |
|
178 | * function will be the Deferred object that represents the script | |
|
179 | * request. | |
|
180 | */ | |
|
181 | _jsonpCallback(json: Object): void; | |
|
182 | } | |
|
183 | } | |
|
184 | } |
This diff has been collapsed as it changes many lines, (824 lines changed) Show them Hide them | |||
@@ -0,0 +1,824 | |||
|
1 | /// <reference path="index.d.ts" /> | |
|
2 | ||
|
3 | declare module 'dojo/_base/array' { | |
|
4 | const dojoArray: dojo._base.Array; | |
|
5 | export = dojoArray; | |
|
6 | } | |
|
7 | ||
|
8 | declare module 'dojo/_base/browser' { | |
|
9 | const ready: dojo.Ready; | |
|
10 | export = ready; | |
|
11 | } | |
|
12 | ||
|
13 | declare module 'dojo/_base/Color' { | |
|
14 | type Color = dojo._base.Color; | |
|
15 | const Color: dojo._base.ColorConstructor; | |
|
16 | export = Color; | |
|
17 | } | |
|
18 | ||
|
19 | declare module 'dojo/_base/config' { | |
|
20 | const config: dojo._base.Config; | |
|
21 | export = config; | |
|
22 | } | |
|
23 | ||
|
24 | declare module 'dojo/_base/connect' { | |
|
25 | const connect: dojo._base.Connect; | |
|
26 | export = connect; | |
|
27 | } | |
|
28 | ||
|
29 | declare module 'dojo/_base/declare' { | |
|
30 | const dojoDeclare: dojo._base.Declare; | |
|
31 | export = dojoDeclare; | |
|
32 | } | |
|
33 | ||
|
34 | declare module 'dojo/_base/Deferred' { | |
|
35 | type Deferred<T> = dojo._base.Deferred<T>; | |
|
36 | const Deferred: dojo._base.DeferredConstructor; | |
|
37 | export = Deferred; | |
|
38 | } | |
|
39 | ||
|
40 | declare module 'dojo/_base/event' { | |
|
41 | const event: dojo._base.EventModule; | |
|
42 | export = event; | |
|
43 | } | |
|
44 | ||
|
45 | declare module 'dojo/_base/fx' { | |
|
46 | const fx: dojo._base.Fx; | |
|
47 | export = fx; | |
|
48 | } | |
|
49 | ||
|
50 | declare module 'dojo/_base/html' { | |
|
51 | const dojo: dojo._base.Dojo; | |
|
52 | export = dojo; | |
|
53 | } | |
|
54 | ||
|
55 | declare module 'dojo/_base/json' { | |
|
56 | const dojo: dojo._base.Dojo; | |
|
57 | export = dojo; | |
|
58 | } | |
|
59 | ||
|
60 | declare module 'dojo/_base/kernel' { | |
|
61 | const dojo: dojo._base.Dojo; | |
|
62 | export = dojo; | |
|
63 | } | |
|
64 | ||
|
65 | declare module 'dojo/_base/lang' { | |
|
66 | const lang: dojo._base.Lang; | |
|
67 | export = lang; | |
|
68 | } | |
|
69 | ||
|
70 | declare module 'dojo/_base/loader' { | |
|
71 | const loader: dojo._base.Loader; | |
|
72 | export = loader; | |
|
73 | } | |
|
74 | ||
|
75 | declare module 'dojo/_base/NodeList' { | |
|
76 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
77 | const NodeList: dojo.NodeListConstructor; | |
|
78 | export = NodeList; | |
|
79 | } | |
|
80 | ||
|
81 | declare module 'dojo/_base/query' { | |
|
82 | const query: dojo.Query; | |
|
83 | export = query; | |
|
84 | } | |
|
85 | ||
|
86 | declare module 'dojo/_base/sniff' { | |
|
87 | const has: dojo.Has; | |
|
88 | export = has; | |
|
89 | } | |
|
90 | ||
|
91 | declare module 'dojo/_base/unload' { | |
|
92 | const unload: dojo._base.Unload; | |
|
93 | export = unload; | |
|
94 | } | |
|
95 | ||
|
96 | declare module 'dojo/_base/url' { | |
|
97 | type Url = dojo._base.Url; | |
|
98 | const Url: dojo._base.UrlConstructor; | |
|
99 | export = Url; | |
|
100 | } | |
|
101 | ||
|
102 | declare module 'dojo/_base/window' { | |
|
103 | const window: dojo._base.Window; | |
|
104 | export = window; | |
|
105 | } | |
|
106 | ||
|
107 | declare module 'dojo/_base/xhr' { | |
|
108 | const xhr: dojo._base.Xhr; | |
|
109 | export = xhr; | |
|
110 | } | |
|
111 | ||
|
112 | declare module 'dojo/AdapterRegistry' { | |
|
113 | type AdapterRegistry = dojo.AdapterRegistry; | |
|
114 | const AdapterRegistry: dojo.AdapterRegistryConstructor; | |
|
115 | export = AdapterRegistry; | |
|
116 | } | |
|
117 | ||
|
118 | declare module 'dojo/aspect' { | |
|
119 | const aspect: dojo.Aspect; | |
|
120 | export = aspect; | |
|
121 | } | |
|
122 | ||
|
123 | declare module 'dojo/back' { | |
|
124 | const back: dojo.Back; | |
|
125 | export = back; | |
|
126 | } | |
|
127 | ||
|
128 | declare module 'dojo/behavior' { | |
|
129 | const behavior: dojo.Behavior; | |
|
130 | export = behavior; | |
|
131 | } | |
|
132 | ||
|
133 | declare module 'dojo/cache' { | |
|
134 | const cache: dojo.Cache; | |
|
135 | export = cache; | |
|
136 | } | |
|
137 | ||
|
138 | declare module 'dojo/cldr/monetary' { | |
|
139 | const monetary: dojo.cldr.Monetary; | |
|
140 | export = monetary; | |
|
141 | } | |
|
142 | ||
|
143 | declare module 'dojo/cldr/supplemental' { | |
|
144 | const supplemental: dojo.cldr.Supplemental; | |
|
145 | export = supplemental; | |
|
146 | } | |
|
147 | ||
|
148 | declare module 'dojo/colors' { | |
|
149 | type Color = dojo._base.Color; | |
|
150 | const Color: dojo._base.ColorConstructor; | |
|
151 | export = Color; | |
|
152 | } | |
|
153 | ||
|
154 | declare module 'dojo/cookie' { | |
|
155 | const cookie: dojo.Cookie; | |
|
156 | export = cookie; | |
|
157 | } | |
|
158 | ||
|
159 | declare module 'dojo/currency' { | |
|
160 | const currency: dojo.Currency; | |
|
161 | export = currency; | |
|
162 | } | |
|
163 | ||
|
164 | declare module 'dojo/data/api/Identity' { | |
|
165 | type Identity<T> = dojo.data.api.Identity<T>; | |
|
166 | const Identity: dojo.data.api.IdentityConstructor; | |
|
167 | export = Identity; | |
|
168 | } | |
|
169 | ||
|
170 | declare module 'dojo/data/api/Item' { | |
|
171 | type Item = dojo.data.api.Item; | |
|
172 | const Item: dojo.data.api.ItemConstructor; | |
|
173 | export = Item; | |
|
174 | } | |
|
175 | ||
|
176 | declare module 'dojo/data/api/Notification' { | |
|
177 | type Notification<T> = dojo.data.api.Notification<T>; | |
|
178 | const Notification: dojo.data.api.NotificationConstructor; | |
|
179 | export = Notification; | |
|
180 | } | |
|
181 | ||
|
182 | declare module 'dojo/data/api/Read' { | |
|
183 | type Read<T> = dojo.data.api.Read<T>; | |
|
184 | const Read: dojo.data.api.ReadConstructor; | |
|
185 | export = Read; | |
|
186 | } | |
|
187 | ||
|
188 | declare module 'dojo/data/api/Request' { | |
|
189 | type Request = dojo.data.api.Request; | |
|
190 | const Request: dojo.data.api.RequestConstructor; | |
|
191 | export = Request; | |
|
192 | } | |
|
193 | ||
|
194 | declare module 'dojo/data/api/Write' { | |
|
195 | type Write<T> = dojo.data.api.Write<T>; | |
|
196 | const Write: dojo.data.api.WriteConstructor; | |
|
197 | export = Write; | |
|
198 | } | |
|
199 | ||
|
200 | declare module 'dojo/data/util/filter' { | |
|
201 | const filter: dojo.data.util.Filter; | |
|
202 | export = filter; | |
|
203 | } | |
|
204 | ||
|
205 | declare module 'dojo/data/util/simpleFetch' { | |
|
206 | const simpleFetch: dojo.data.util.SimpleFetch; | |
|
207 | export = simpleFetch; | |
|
208 | } | |
|
209 | ||
|
210 | declare module 'dojo/data/util/sorter' { | |
|
211 | const sorter: dojo.data.util.Sorter; | |
|
212 | export = sorter; | |
|
213 | } | |
|
214 | ||
|
215 | declare module 'dojo/data/ItemFileReadStore' { | |
|
216 | type ItemFileReadStore<T> = dojo.data.ItemFileReadStore<T>; | |
|
217 | const ItemFileReadStore: dojo.data.ItemFileReadStoreConstructor; | |
|
218 | export = ItemFileReadStore; | |
|
219 | } | |
|
220 | ||
|
221 | declare module 'dojo/data/ItemFileWriteStore' { | |
|
222 | type ItemFileWriteStore<T> = dojo.data.ItemFileWriteStore<T>; | |
|
223 | const ItemFileWriteStore: dojo.data.ItemFileWriteStoreConstructor; | |
|
224 | export = ItemFileWriteStore; | |
|
225 | } | |
|
226 | ||
|
227 | declare module 'dojo/data/ObjectStore' { | |
|
228 | type ObjectStore<T> = dojo.data.ObjectStore<T>; | |
|
229 | const ObjectStore: dojo.data.ObjectStoreConstructor; | |
|
230 | export = ObjectStore; | |
|
231 | } | |
|
232 | ||
|
233 | declare module 'dojo/date' { | |
|
234 | const date: dojo.date.DateBase; | |
|
235 | export = date; | |
|
236 | } | |
|
237 | ||
|
238 | declare module 'dojo/date/locale' { | |
|
239 | const dateLocale: dojo.date.DateLocale; | |
|
240 | export = dateLocale; | |
|
241 | } | |
|
242 | ||
|
243 | declare module 'dojo/date/stamp' { | |
|
244 | const stamp: dojo.date.Stamp; | |
|
245 | export = stamp; | |
|
246 | } | |
|
247 | ||
|
248 | declare module 'dojo/debounce' { | |
|
249 | const debounce: dojo.Debounce; | |
|
250 | export = debounce; | |
|
251 | } | |
|
252 | ||
|
253 | declare module 'dojo/Deferred' { | |
|
254 | type Deferred<T> = dojo.Deferred<T>; | |
|
255 | const Deferred: dojo.DeferredConstructor; | |
|
256 | export = Deferred; | |
|
257 | } | |
|
258 | ||
|
259 | declare module 'dojo/DeferredList' { | |
|
260 | type DeferredList<T> = dojo.DeferredList<T>; | |
|
261 | const DeferredList: dojo.DeferredListConstructor; | |
|
262 | export = DeferredList; | |
|
263 | } | |
|
264 | ||
|
265 | declare module 'dojo/dnd/autoscroll' { | |
|
266 | const autoscroll: dojo.dnd.AutoScroll; | |
|
267 | export = autoscroll; | |
|
268 | } | |
|
269 | ||
|
270 | declare module 'dojo/dnd/AutoSource' { | |
|
271 | const AutoSource: dojo.dnd.AutoSourceConstructor; | |
|
272 | export = AutoSource; | |
|
273 | } | |
|
274 | ||
|
275 | declare module 'dojo/dnd/Avatar' { | |
|
276 | type Avatar = dojo.dnd.Avatar; | |
|
277 | const Avatar: dojo.dnd.AvatarConstructor; | |
|
278 | export = Avatar; | |
|
279 | } | |
|
280 | ||
|
281 | declare module 'dojo/dnd/common' { | |
|
282 | const common: dojo.dnd.Common; | |
|
283 | export = common; | |
|
284 | } | |
|
285 | ||
|
286 | declare module 'dojo/dnd/Container' { | |
|
287 | type Container = dojo.dnd.Container; | |
|
288 | const Container: dojo.dnd.ContainerConstructor; | |
|
289 | export = Container; | |
|
290 | } | |
|
291 | ||
|
292 | declare module 'dojo/dnd/Manager' { | |
|
293 | type Manager = dojo.dnd.Manager; | |
|
294 | const Manager: dojo.dnd.ManagerConstructor; | |
|
295 | export = Manager; | |
|
296 | } | |
|
297 | ||
|
298 | declare module 'dojo/dnd/move' { | |
|
299 | const Move: dojo.dnd.Move; | |
|
300 | export = Move; | |
|
301 | } | |
|
302 | ||
|
303 | declare module 'dojo/dnd/Moveable' { | |
|
304 | type Moveable = dojo.dnd.Moveable; | |
|
305 | const Moveable: dojo.dnd.Moveable; | |
|
306 | export = Moveable; | |
|
307 | } | |
|
308 | ||
|
309 | declare module 'dojo/dnd/Mover' { | |
|
310 | type Mover = dojo.dnd.Mover; | |
|
311 | const Mover: dojo.dnd.MoverConstructor; | |
|
312 | export = Mover; | |
|
313 | } | |
|
314 | ||
|
315 | declare module 'dojo/dnd/Selector' { | |
|
316 | type Selector = dojo.dnd.Selector; | |
|
317 | const Selector: dojo.dnd.SelectorConstructor; | |
|
318 | export = Selector; | |
|
319 | } | |
|
320 | ||
|
321 | declare module 'dojo/dnd/Source' { | |
|
322 | type Source = dojo.dnd.Source; | |
|
323 | const Source: dojo.dnd.SourceConstructor; | |
|
324 | export = Source; | |
|
325 | } | |
|
326 | ||
|
327 | declare module 'dojo/dnd/Target' { | |
|
328 | type Target = dojo.dnd.Target; | |
|
329 | const Target: dojo.dnd.TargetConstructor; | |
|
330 | export = Target; | |
|
331 | } | |
|
332 | ||
|
333 | declare module 'dojo/dnd/TimedMoveable' { | |
|
334 | type TimedMoveable = dojo.dnd.TimedMoveable; | |
|
335 | const TimedMoveable: dojo.dnd.TimedMoveableConstructor; | |
|
336 | export = TimedMoveable; | |
|
337 | } | |
|
338 | ||
|
339 | declare module 'dojo/dojo' { | |
|
340 | const require: dojo.Require; | |
|
341 | export = require; | |
|
342 | } | |
|
343 | ||
|
344 | declare module 'require' { | |
|
345 | const require: dojo.Require; | |
|
346 | export = require; | |
|
347 | } | |
|
348 | ||
|
349 | declare module 'dojo/dom' { | |
|
350 | const dom: dojo.Dom; | |
|
351 | export = dom; | |
|
352 | } | |
|
353 | ||
|
354 | declare module 'dojo/dom-attr' { | |
|
355 | const domAttr: dojo.DomAttr; | |
|
356 | export = domAttr; | |
|
357 | } | |
|
358 | ||
|
359 | declare module 'dojo/dom-class' { | |
|
360 | const domClass: dojo.DomClass; | |
|
361 | export = domClass; | |
|
362 | } | |
|
363 | ||
|
364 | declare module 'dojo/dom-construct' { | |
|
365 | const domConstruct: dojo.DomConstruct; | |
|
366 | export = domConstruct; | |
|
367 | } | |
|
368 | ||
|
369 | declare module 'dojo/dom-form' { | |
|
370 | const domForm: dojo.DomForm; | |
|
371 | export = domForm; | |
|
372 | } | |
|
373 | ||
|
374 | declare module 'dojo/dom-geometry' { | |
|
375 | const domGeom: dojo.DomGeometry; | |
|
376 | export = domGeom; | |
|
377 | } | |
|
378 | ||
|
379 | declare module 'dojo/dom-prop' { | |
|
380 | const domProp: dojo.DomProp; | |
|
381 | export = domProp; | |
|
382 | } | |
|
383 | ||
|
384 | declare module 'dojo/dom-style' { | |
|
385 | const domStyle: dojo.DomStyle; | |
|
386 | export = domStyle; | |
|
387 | } | |
|
388 | ||
|
389 | declare module 'dojo/domReady' { | |
|
390 | const domReady: dojo.DomReady; | |
|
391 | export = domReady; | |
|
392 | } | |
|
393 | ||
|
394 | declare module 'dojo/domReady!' { | |
|
395 | const callback: any; | |
|
396 | export = callback; | |
|
397 | } | |
|
398 | ||
|
399 | declare module 'dojo/errors/CancelError' { | |
|
400 | type CancelError = dojo.errors.CancelError; | |
|
401 | const CancelError: dojo.errors.CancelErrorConstructor; | |
|
402 | export = CancelError; | |
|
403 | } | |
|
404 | ||
|
405 | declare module 'dojo/errors/create' { | |
|
406 | const create: dojo.errors.Create; | |
|
407 | export = create; | |
|
408 | } | |
|
409 | ||
|
410 | declare module 'dojo/errors/RequestError' { | |
|
411 | type RequestError = dojo.errors.RequestError; | |
|
412 | const RequestError: dojo.errors.RequestErrorConstructor; | |
|
413 | export = RequestError; | |
|
414 | } | |
|
415 | ||
|
416 | declare module 'dojo/errors/RequestTimeoutError' { | |
|
417 | type RequestTimeoutError = dojo.errors.RequestError; | |
|
418 | const RequestTimeoutError: dojo.errors.RequestTimeoutErrorConstructor; | |
|
419 | export = RequestTimeoutError; | |
|
420 | } | |
|
421 | ||
|
422 | declare module 'dojo/Evented' { | |
|
423 | type Evented = dojo.Evented; | |
|
424 | const Evented: dojo.EventedConstructor; | |
|
425 | export = Evented; | |
|
426 | } | |
|
427 | ||
|
428 | declare module 'dojo/gears' { | |
|
429 | const gears: dojo.Gears; | |
|
430 | export = gears; | |
|
431 | } | |
|
432 | ||
|
433 | declare module 'dojo/has' { | |
|
434 | const has: dojo.Has; | |
|
435 | export = has; | |
|
436 | } | |
|
437 | ||
|
438 | declare module 'dojo/hash' { | |
|
439 | const hash: dojo.Hash; | |
|
440 | export = hash; | |
|
441 | } | |
|
442 | ||
|
443 | declare module 'dojo/hccss' { | |
|
444 | const hccss: dojo.Has; | |
|
445 | export = hccss; | |
|
446 | } | |
|
447 | ||
|
448 | declare module 'dojo/html' { | |
|
449 | const html: dojo.Html; | |
|
450 | export = html; | |
|
451 | } | |
|
452 | ||
|
453 | declare module 'dojo/i18n' { | |
|
454 | const i18n: dojo.I18n; | |
|
455 | export = i18n; | |
|
456 | } | |
|
457 | ||
|
458 | declare module 'dojo/io/iframe' { | |
|
459 | const iframe: dojo.io.IFrame; | |
|
460 | export = iframe; | |
|
461 | } | |
|
462 | ||
|
463 | declare module 'dojo/io/script' { | |
|
464 | const script: dojo.io.Script; | |
|
465 | export = script; | |
|
466 | } | |
|
467 | ||
|
468 | declare module 'dojo/io-query' { | |
|
469 | const ioQuery: dojo.IoQuery; | |
|
470 | export = ioQuery; | |
|
471 | } | |
|
472 | ||
|
473 | declare module 'dojo/json' { | |
|
474 | const json: dojo.Json; | |
|
475 | export = json; | |
|
476 | } | |
|
477 | ||
|
478 | declare module 'dojo/keys' { | |
|
479 | const keys: dojo.Keys; | |
|
480 | export = keys; | |
|
481 | } | |
|
482 | ||
|
483 | declare module 'dojo/loadInit' { | |
|
484 | const loadInit: dojo.LoadInit; | |
|
485 | export = loadInit; | |
|
486 | } | |
|
487 | ||
|
488 | declare module 'dojo/loadInit!' { | |
|
489 | const loadInit: (mid: string, require: any, loaded: (...modules: any[]) => void) => void; | |
|
490 | export = loadInit; | |
|
491 | } | |
|
492 | ||
|
493 | declare module 'dojo/main' { | |
|
494 | const main: dojo._base.Dojo; | |
|
495 | export = main; | |
|
496 | } | |
|
497 | ||
|
498 | declare module 'dojo/mouse' { | |
|
499 | const mouse: dojo.Mouse; | |
|
500 | export = mouse; | |
|
501 | } | |
|
502 | ||
|
503 | declare module 'dojo/NodeList' { | |
|
504 | type NodeList<T extends Node> = dojo.NodeList<T>; | |
|
505 | const NodeList: dojo.NodeListConstructor; | |
|
506 | export = NodeList; | |
|
507 | } | |
|
508 | ||
|
509 | declare module 'dojo/number' { | |
|
510 | const value: dojo.Number; | |
|
511 | export = value; | |
|
512 | } | |
|
513 | ||
|
514 | declare module 'dojo/on' { | |
|
515 | const on: dojo.On; | |
|
516 | export = on; | |
|
517 | } | |
|
518 | ||
|
519 | declare module 'dojo/on/asyncEventListener' { | |
|
520 | const asyncEventListener: dojo.on.AsyncEventListener; | |
|
521 | export = asyncEventListener; | |
|
522 | } | |
|
523 | ||
|
524 | declare module 'dojo/on/debounce' { | |
|
525 | const debounce: dojo.on.Debounce; | |
|
526 | export = debounce; | |
|
527 | } | |
|
528 | ||
|
529 | declare module 'dojo/on/throttle' { | |
|
530 | const throttle: dojo.on.Throttle; | |
|
531 | export = throttle; | |
|
532 | } | |
|
533 | ||
|
534 | declare module 'dojo/parser' { | |
|
535 | const parser: dojo.Parser; | |
|
536 | export = parser; | |
|
537 | } | |
|
538 | ||
|
539 | declare module 'dojo/promise/all' { | |
|
540 | const all: dojo.promise.All; | |
|
541 | export = all; | |
|
542 | } | |
|
543 | ||
|
544 | declare module 'dojo/promise/first' { | |
|
545 | const first: dojo.promise.First; | |
|
546 | export = first; | |
|
547 | } | |
|
548 | ||
|
549 | declare module 'dojo/promise/instrumentation' { | |
|
550 | const instrumentation: dojo.promise.Instrumentation; | |
|
551 | export = instrumentation; | |
|
552 | } | |
|
553 | ||
|
554 | declare module 'dojo/promise/Promise' { | |
|
555 | type Promise<T> = dojo.promise.Promise<T>; | |
|
556 | const Promise: dojo.promise.PromiseConstructor; | |
|
557 | export = Promise; | |
|
558 | } | |
|
559 | ||
|
560 | declare module 'dojo/promise/tracer' { | |
|
561 | const tracer: dojo.promise.Tracer; | |
|
562 | export = tracer; | |
|
563 | } | |
|
564 | ||
|
565 | declare module 'dojo/query' { | |
|
566 | const query: dojo.Query; | |
|
567 | export = query; | |
|
568 | } | |
|
569 | ||
|
570 | /* modules for included selector engines */ | |
|
571 | ||
|
572 | declare module 'dojo/query!acme' { | |
|
573 | const query: dojo.Query; | |
|
574 | export = query; | |
|
575 | } | |
|
576 | ||
|
577 | declare module 'dojo/query!lite' { | |
|
578 | const query: dojo.Query; | |
|
579 | export = query; | |
|
580 | } | |
|
581 | ||
|
582 | declare module 'dojo/ready' { | |
|
583 | const ready: dojo.Ready; | |
|
584 | export = ready; | |
|
585 | } | |
|
586 | ||
|
587 | declare module 'dojo/regexp' { | |
|
588 | const regexp: dojo.RegExpModule; | |
|
589 | export = regexp; | |
|
590 | } | |
|
591 | ||
|
592 | declare module 'dojo/request' { | |
|
593 | const request: dojo.request.Request; | |
|
594 | export = request; | |
|
595 | } | |
|
596 | ||
|
597 | declare module 'dojo/request/default' { | |
|
598 | const def: dojo.request.Default; | |
|
599 | export = def; | |
|
600 | } | |
|
601 | ||
|
602 | declare module 'dojo/request/default!' { | |
|
603 | const def: dojo.request.Request; | |
|
604 | export = def; | |
|
605 | } | |
|
606 | ||
|
607 | declare module 'dojo/request/handlers' { | |
|
608 | const handlers: dojo.request.Handlers; | |
|
609 | export = handlers; | |
|
610 | } | |
|
611 | ||
|
612 | declare module 'dojo/request/iframe' { | |
|
613 | const iframe: dojo.request.IFrame; | |
|
614 | export = iframe; | |
|
615 | } | |
|
616 | ||
|
617 | declare module 'dojo/request/node' { | |
|
618 | const node: dojo.request.Node; | |
|
619 | export = node; | |
|
620 | } | |
|
621 | ||
|
622 | declare module 'dojo/request/registry' { | |
|
623 | const registry: dojo.request.Registry; | |
|
624 | export = registry; | |
|
625 | } | |
|
626 | ||
|
627 | declare module 'dojo/request/script' { | |
|
628 | const script: dojo.request.Script; | |
|
629 | export = script; | |
|
630 | } | |
|
631 | ||
|
632 | declare module 'dojo/request/util' { | |
|
633 | const util: dojo.request.Util; | |
|
634 | export = util; | |
|
635 | } | |
|
636 | ||
|
637 | declare module 'dojo/request/watch' { | |
|
638 | const watch: dojo.request.Watch; | |
|
639 | export = watch; | |
|
640 | } | |
|
641 | ||
|
642 | declare module 'dojo/request/xhr' { | |
|
643 | const xhr: dojo.request.Xhr; | |
|
644 | export = xhr; | |
|
645 | } | |
|
646 | ||
|
647 | declare module 'dojo/require' { | |
|
648 | const require: dojo.RequirePlugin; | |
|
649 | export = require; | |
|
650 | } | |
|
651 | ||
|
652 | declare module 'dojo/robot' { | |
|
653 | const robot: dojo.Robot; | |
|
654 | export = robot; | |
|
655 | } | |
|
656 | ||
|
657 | declare module 'dojo/robotx' { | |
|
658 | const robotx: dojo.RobotX; | |
|
659 | export = robotx; | |
|
660 | } | |
|
661 | ||
|
662 | declare module 'dojo/router' { | |
|
663 | const router: dojo.router.RouterBase; | |
|
664 | export = router; | |
|
665 | } | |
|
666 | ||
|
667 | declare module 'dojo/router/RouterBase' { | |
|
668 | type RouterBase = dojo.router.RouterBase; | |
|
669 | const RouterBase: dojo.router.RouterBaseConstructor; | |
|
670 | export = RouterBase; | |
|
671 | } | |
|
672 | ||
|
673 | declare module 'dojo/rpc/JsonpService' { | |
|
674 | type JsonpService<T> = dojo.rpc.JsonpService<T>; | |
|
675 | const JsonpService: dojo.rpc.JsonpServiceConstructor; | |
|
676 | export = JsonpService; | |
|
677 | } | |
|
678 | ||
|
679 | declare module 'dojo/rpc/JsonService' { | |
|
680 | type JsonService<T> = dojo.rpc.JsonService<T>; | |
|
681 | const JsonService: dojo.rpc.JsonServiceConstructor; | |
|
682 | export = JsonService; | |
|
683 | } | |
|
684 | ||
|
685 | declare module 'dojo/rpc/RpcService' { | |
|
686 | type RpcService<T> = dojo.rpc.RpcService<T>; | |
|
687 | const RpcService: dojo.rpc.RpcServiceConstructor; | |
|
688 | export = RpcService; | |
|
689 | } | |
|
690 | ||
|
691 | declare module 'dojo/selector/_loader' { | |
|
692 | const loader: dojo.selector.Loader; | |
|
693 | export = loader; | |
|
694 | } | |
|
695 | ||
|
696 | declare module 'dojo/selector/_loader!' { | |
|
697 | const lite: dojo.selector.LiteQueryEnegine; | |
|
698 | export = lite; | |
|
699 | } | |
|
700 | ||
|
701 | declare module 'dojo/selector/_loader!acme' { | |
|
702 | const acme: dojo.selector.AcmeQueryEngine; | |
|
703 | export = acme; | |
|
704 | } | |
|
705 | ||
|
706 | declare module 'dojo/selector/_loader!lite' { | |
|
707 | const lite: dojo.selector.LiteQueryEnegine; | |
|
708 | export = lite; | |
|
709 | } | |
|
710 | ||
|
711 | declare module 'dojo/selector/acme' { | |
|
712 | const acme: dojo.selector.AcmeQueryEngine; | |
|
713 | export = acme; | |
|
714 | } | |
|
715 | ||
|
716 | declare module 'dojo/selector/lite' { | |
|
717 | const lite: dojo.selector.LiteQueryEnegine; | |
|
718 | export = lite; | |
|
719 | } | |
|
720 | ||
|
721 | declare module 'dojo/sniff' { | |
|
722 | const sniff: dojo.Has; | |
|
723 | export = sniff; | |
|
724 | } | |
|
725 | ||
|
726 | declare module 'dojo/Stateful' { | |
|
727 | type Stateful<T = any> = dojo.Stateful<any>; | |
|
728 | const Stateful: dojo.StatefulConstructor; | |
|
729 | export = Stateful; | |
|
730 | } | |
|
731 | ||
|
732 | declare module 'dojo/store/api/Store' { | |
|
733 | type Store<T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions> = dojo.store.api.Store<T, Q, O>; | |
|
734 | const Store: dojo.store.api.StoreConstructor; | |
|
735 | export = Store; | |
|
736 | } | |
|
737 | ||
|
738 | declare module 'dojo/store/util/QueryResults' { | |
|
739 | const QueryResults: dojo.store.util.QueryResultsFunction; | |
|
740 | export = QueryResults; | |
|
741 | } | |
|
742 | ||
|
743 | declare module 'dojo/store/util/SimpleQueryEngine' { | |
|
744 | const SimpleQueryEngine: dojo.store.util.SimpleQueryEngine; | |
|
745 | export = SimpleQueryEngine; | |
|
746 | } | |
|
747 | ||
|
748 | declare module 'dojo/store/Cache' { | |
|
749 | const Cache: dojo.store.Cache; | |
|
750 | export = Cache; | |
|
751 | } | |
|
752 | ||
|
753 | declare module 'dojo/store/DataStore' { | |
|
754 | type DataStore<T extends Object> = dojo.store.DataStore<T>; | |
|
755 | const DataStore: dojo.store.DataStoreConstructor; | |
|
756 | export = DataStore; | |
|
757 | } | |
|
758 | ||
|
759 | declare module 'dojo/store/JsonRest' { | |
|
760 | type JsonRest<T extends object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.JsonRestQueryOptions> = dojo.store.JsonRest<T, Q, O>; | |
|
761 | const JsonRest: dojo.store.JsonRestConstructor; | |
|
762 | export = JsonRest; | |
|
763 | } | |
|
764 | ||
|
765 | declare module 'dojo/store/Memory' { | |
|
766 | type Memory<T extends Object> = dojo.store.Memory<T>; | |
|
767 | const Memory: dojo.store.MemoryConstructor; | |
|
768 | export = Memory; | |
|
769 | } | |
|
770 | ||
|
771 | declare module 'dojo/store/Observable' { | |
|
772 | const Observerable: dojo.store.Observable; | |
|
773 | export = Observerable; | |
|
774 | } | |
|
775 | ||
|
776 | declare module 'dojo/string' { | |
|
777 | const value: dojo.String; | |
|
778 | export = value; | |
|
779 | } | |
|
780 | ||
|
781 | declare module 'dojo/text' { | |
|
782 | const text: dojo.Text; | |
|
783 | export = text; | |
|
784 | } | |
|
785 | ||
|
786 | declare module 'dojo/throttle' { | |
|
787 | const throttle: dojo.Throttle; | |
|
788 | export = throttle; | |
|
789 | } | |
|
790 | ||
|
791 | declare module 'dojo/topic' { | |
|
792 | const hub: dojo.Topic; | |
|
793 | export = hub; | |
|
794 | } | |
|
795 | ||
|
796 | declare module 'dojo/touch' { | |
|
797 | const touch: dojo.Touch; | |
|
798 | export = touch; | |
|
799 | } | |
|
800 | ||
|
801 | declare module 'dojo/uacss' { | |
|
802 | const uacss: dojo.Has; | |
|
803 | export = uacss; | |
|
804 | } | |
|
805 | ||
|
806 | declare module 'dojo/when' { | |
|
807 | const when: dojo.When; | |
|
808 | export = when; | |
|
809 | } | |
|
810 | ||
|
811 | declare module 'dojo/window' { | |
|
812 | const window: dojo.WindowModule; | |
|
813 | export = window; | |
|
814 | } | |
|
815 | ||
|
816 | declare module 'dojo/i18n!*' { | |
|
817 | const value: any; | |
|
818 | export = value; | |
|
819 | } | |
|
820 | ||
|
821 | declare module 'dojo/text!*' { | |
|
822 | const content: string; | |
|
823 | export = content; | |
|
824 | } |
@@ -0,0 +1,29 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | ||
|
3 | declare namespace dojo { | |
|
4 | namespace on { | |
|
5 | /* dojo/on/asyncEventListener */ | |
|
6 | ||
|
7 | interface AsyncEventListener { | |
|
8 | /** | |
|
9 | * This sub module provide an event factory for delayed events (like debounce or throttle) | |
|
10 | */ | |
|
11 | (listener: EventListener): EventListener; | |
|
12 | } | |
|
13 | ||
|
14 | /* dojo/on/debounce */ | |
|
15 | ||
|
16 | interface Debounce { | |
|
17 | /** | |
|
18 | * event parser for custom events | |
|
19 | */ | |
|
20 | (selector: string | ExtensionEvent, delay: number): ExtensionEvent; | |
|
21 | } | |
|
22 | ||
|
23 | /* dojo/on/throttle */ | |
|
24 | ||
|
25 | interface Throttle { | |
|
26 | (selector: string | ExtensionEvent, delay: number): ExtensionEvent; | |
|
27 | } | |
|
28 | } | |
|
29 | } |
@@ -0,0 +1,128 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace promise { | |
|
3 | ||
|
4 | /* dojo/promise/all */ | |
|
5 | ||
|
6 | type PromiseObjectOrArray = { [name: string]: Promise<any> } | Promise<any>[]; | |
|
7 | type PromiseTypedObjectOrArray<T> = { [name: string]: Promise<T> } | Promise<T>[]; | |
|
8 | ||
|
9 | interface All { | |
|
10 | /** | |
|
11 | * Takes multiple promises and returns a new promise that is fulfilled | |
|
12 | * when all promises have been resolved or one has been rejected. | |
|
13 | * @param objectOrArray The promise will be fulfilled with a list of results if invoked with an | |
|
14 | * array, or an object of results when passed an object (using the same | |
|
15 | * keys). If passed neither an object or array it is resolved with an | |
|
16 | * undefined value. | |
|
17 | */ | |
|
18 | <T>(array: Thenable<T>[]): Promise<T[]>; | |
|
19 | <T>(object: { [name: string]: Thenable<T> }): Promise<{ [name: string]: T }>; | |
|
20 | (array: Thenable<any>[]): Promise<any[]>; | |
|
21 | (object: { [name: string]: Thenable<any> }): Promise<{ [name: string]: any }>; | |
|
22 | } | |
|
23 | ||
|
24 | /* dojo/promise/first */ | |
|
25 | ||
|
26 | interface First { | |
|
27 | /** | |
|
28 | * Takes multiple promises and returns a new promise that is fulfilled | |
|
29 | * when the first of these promises is fulfilled. | |
|
30 | * @param objectOrArray The promises are taken from the array or object values. If no value | |
|
31 | * is passed, the returned promise is resolved with an undefined value. | |
|
32 | */ | |
|
33 | <T>(objectOrArray?: PromiseTypedObjectOrArray<T>): Promise<T>; | |
|
34 | (objectOrArray?: PromiseObjectOrArray): Promise<any>; | |
|
35 | } | |
|
36 | ||
|
37 | /* dojo/promise/instrumentation */ | |
|
38 | ||
|
39 | interface Instrumentation { | |
|
40 | /** | |
|
41 | * Initialize instrumentation for the Deferred class. | |
|
42 | */ | |
|
43 | (Deferred: DeferredConstructor): void; | |
|
44 | } | |
|
45 | ||
|
46 | /* dojo/promise/Promise */ | |
|
47 | ||
|
48 | type Thenable<T> = PromiseLike<T>; | |
|
49 | ||
|
50 | interface PromiseCallback<T, U> { | |
|
51 | (result: T): U | Thenable<U>; | |
|
52 | } | |
|
53 | ||
|
54 | interface PromiseErrback<U> { | |
|
55 | (error: any): U | Thenable<U> | void; | |
|
56 | } | |
|
57 | ||
|
58 | interface PromiseProgback { | |
|
59 | (progress: any): void; | |
|
60 | } | |
|
61 | ||
|
62 | interface Promise<T> extends Thenable<T> { | |
|
63 | /** | |
|
64 | * Inform the deferred it may cancel its asynchronous operation. | |
|
65 | */ | |
|
66 | cancel(reason?: any, strict?: boolean): any; | |
|
67 | ||
|
68 | /** | |
|
69 | * Checks whether the promise has been resolved. | |
|
70 | */ | |
|
71 | isResolved(): boolean; | |
|
72 | ||
|
73 | /** | |
|
74 | * Checks whether the promise has been rejected. | |
|
75 | */ | |
|
76 | isRejected(): boolean; | |
|
77 | ||
|
78 | /** | |
|
79 | * Checks whether the promise has been resolved or rejected. | |
|
80 | */ | |
|
81 | isFulfilled(): boolean; | |
|
82 | ||
|
83 | /** | |
|
84 | * Checks whether the promise has been canceled. | |
|
85 | */ | |
|
86 | isCanceled(): boolean; | |
|
87 | ||
|
88 | /** | |
|
89 | * Add a callback to be invoked when the promise is resolved | |
|
90 | * or rejected. | |
|
91 | */ | |
|
92 | always<U>(callbackOrErrback: PromiseCallback<T, U> | PromiseErrback<U>): Promise<U>; | |
|
93 | ||
|
94 | /** | |
|
95 | * Add new errbacks to the promise. Follows ECMA specification naming. | |
|
96 | */ | |
|
97 | catch<U>(errback: PromiseErrback<U>): Promise<U>; | |
|
98 | ||
|
99 | /** | |
|
100 | * Add new errbacks to the promise. | |
|
101 | */ | |
|
102 | otherwise<U>(errback: PromiseErrback<U>): Promise<U>; | |
|
103 | ||
|
104 | trace(): this; | |
|
105 | traceRejected(): this; | |
|
106 | toString(): string; | |
|
107 | } | |
|
108 | ||
|
109 | interface PromiseConstructor { | |
|
110 | /** | |
|
111 | * The public interface to a deferred. | |
|
112 | */ | |
|
113 | new <T>(): Promise<T>; | |
|
114 | } | |
|
115 | ||
|
116 | /* dojo/promise/tracer */ | |
|
117 | ||
|
118 | /* TODO: Uncomment for TS 1.8 */ | |
|
119 | /* type TracerEvent = 'resolved' | 'rejected' | 'progress'; */ | |
|
120 | ||
|
121 | interface Tracer { | |
|
122 | /** | |
|
123 | * Subscribe to traces. | |
|
124 | */ | |
|
125 | on(type: string /* TracerEvent */, listener: EventListener): Handle; | |
|
126 | } | |
|
127 | } | |
|
128 | } |
@@ -0,0 +1,434 | |||
|
1 | /// <reference path="dojo.d.ts" /> | |
|
2 | /// <reference path="promise.d.ts" /> | |
|
3 | ||
|
4 | declare namespace dojo { | |
|
5 | namespace request { | |
|
6 | ||
|
7 | /* dojo/request */ | |
|
8 | ||
|
9 | interface Promise<T> extends dojo.promise.Promise<T> { | |
|
10 | response: dojo.promise.Promise<Response<T>>; | |
|
11 | } | |
|
12 | ||
|
13 | interface BaseOptions { | |
|
14 | /** | |
|
15 | * Query parameters to append to the URL. | |
|
16 | */ | |
|
17 | query?: string | { [name: string]: any }; | |
|
18 | ||
|
19 | /** | |
|
20 | * Data to transfer. This is ignored for GET and DELETE | |
|
21 | * requests. | |
|
22 | */ | |
|
23 | data?: string | { [name: string]: any }; | |
|
24 | ||
|
25 | /** | |
|
26 | * Whether to append a cache-busting parameter to the URL. | |
|
27 | */ | |
|
28 | preventCache?: boolean; | |
|
29 | ||
|
30 | /** | |
|
31 | * Milliseconds to wait for the response. If this time | |
|
32 | * passes, the then the promise is rejected. | |
|
33 | */ | |
|
34 | timeout?: number; | |
|
35 | ||
|
36 | /** | |
|
37 | * How to handle the response from the server. Default is | |
|
38 | * 'text'. Other values are 'json', 'javascript', and 'xml'. | |
|
39 | */ | |
|
40 | handleAs?: string; | |
|
41 | } | |
|
42 | ||
|
43 | interface MethodOptions { | |
|
44 | /** | |
|
45 | * The HTTP method to use to make the request. Must be | |
|
46 | * uppercase. | |
|
47 | */ | |
|
48 | method?: string; | |
|
49 | } | |
|
50 | ||
|
51 | interface RequestOptions extends BaseOptions, MethodOptions { } | |
|
52 | ||
|
53 | interface Request { | |
|
54 | /** | |
|
55 | * Send a request using the default transport for the current platform. | |
|
56 | */ | |
|
57 | <T>(url: string, options?: RequestOptions): Promise<T>; | |
|
58 | ||
|
59 | /** | |
|
60 | * Send an HTTP GET request using the default transport for the current platform. | |
|
61 | */ | |
|
62 | get<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
63 | ||
|
64 | /** | |
|
65 | * Send an HTTP POST request using the default transport for the current platform. | |
|
66 | */ | |
|
67 | post<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
68 | ||
|
69 | /** | |
|
70 | * Send an HTTP PUT request using the default transport for the current platform. | |
|
71 | */ | |
|
72 | put<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
73 | ||
|
74 | /** | |
|
75 | * Send an HTTP DELETE request using the default transport for the current platform. | |
|
76 | */ | |
|
77 | del<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
78 | } | |
|
79 | ||
|
80 | /* dojo/request/default */ | |
|
81 | ||
|
82 | interface Default { | |
|
83 | ||
|
84 | getPlatformId(): string; /* './xhr' | './node' */ /* TODO: Uncomment for TS 1.8 */ | |
|
85 | ||
|
86 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
87 | } | |
|
88 | ||
|
89 | /* dojo/request/handlers */ | |
|
90 | ||
|
91 | interface Handlers { | |
|
92 | <T>(response: Response<any>): Response<T>; | |
|
93 | register(name: string, handler: (response: Response<any>) => Response<any>): void; | |
|
94 | } | |
|
95 | ||
|
96 | /* dojo/request/iframe */ | |
|
97 | ||
|
98 | interface IFrameBaseOptions extends BaseOptions { | |
|
99 | form?: HTMLFormElement; | |
|
100 | data?: string | Object; | |
|
101 | } | |
|
102 | ||
|
103 | interface IFrameOptions extends IFrameBaseOptions, MethodOptions { } | |
|
104 | ||
|
105 | interface IFrame { | |
|
106 | <T>(url: string, options: IFrameOptions, returnDeferred: boolean): RequestDeferred<T>; | |
|
107 | <T>(url: string, options?: IFrameOptions): Promise<T>; | |
|
108 | ||
|
109 | create(name: string, onloadstr?: string, uri?: string): HTMLIFrameElement; | |
|
110 | doc(iframenode: HTMLIFrameElement): Document; | |
|
111 | setSrc(_iframe: HTMLIFrameElement, src: string, replace?: boolean): void; | |
|
112 | ||
|
113 | _iframeName: string; | |
|
114 | _notifyStart: Function; | |
|
115 | _dfdQueue: RequestDeferred<any>[]; | |
|
116 | _currentDfd: RequestDeferred<any>; | |
|
117 | _fireNextRequest(): void; | |
|
118 | ||
|
119 | /** | |
|
120 | * Send an HTTP GET request using the default transport for the current platform. | |
|
121 | */ | |
|
122 | get<T>(url: string, options?: IFrameBaseOptions): Promise<T>; | |
|
123 | ||
|
124 | /** | |
|
125 | * Send an HTTP POST request using the default transport for the current platform. | |
|
126 | */ | |
|
127 | post<T>(url: string, options?: IFrameBaseOptions): Promise<T>; | |
|
128 | } | |
|
129 | ||
|
130 | /* dojo/request/node */ | |
|
131 | ||
|
132 | interface NodeRequestBaseOptions extends BaseOptions { | |
|
133 | socketPath?: string; | |
|
134 | headers?: { [header: string]: string }; | |
|
135 | agent?: string; | |
|
136 | pfx?: any; | |
|
137 | key?: string; | |
|
138 | passphrase?: string; | |
|
139 | cert?: any; | |
|
140 | ca?: any; | |
|
141 | ciphers?: string; | |
|
142 | rejectUnauthorized?: boolean; | |
|
143 | path?: string; | |
|
144 | auth?: string; | |
|
145 | username?: string; | |
|
146 | password?: string; | |
|
147 | socketOptions?: { timeout: number, noDelay: number, keepAlive: number }; | |
|
148 | } | |
|
149 | ||
|
150 | interface NodeRequestOptions extends NodeRequestBaseOptions, MethodOptions {} | |
|
151 | ||
|
152 | interface Node { | |
|
153 | <T>(url: string, options?: NodeRequestOptions): Promise<T>; | |
|
154 | ||
|
155 | /** | |
|
156 | * Send an HTTP GET request using the default transport for the current platform. | |
|
157 | */ | |
|
158 | get<T>(url: string, options?: NodeRequestBaseOptions): Promise<T>; | |
|
159 | ||
|
160 | /** | |
|
161 | * Send an HTTP POST request using the default transport for the current platform. | |
|
162 | */ | |
|
163 | post<T>(url: string, options?: NodeRequestBaseOptions): Promise<T>; | |
|
164 | ||
|
165 | /** | |
|
166 | * Send an HTTP PUT request using the default transport for the current platform. | |
|
167 | */ | |
|
168 | put<T>(url: string, options?: NodeRequestBaseOptions): Promise<T>; | |
|
169 | ||
|
170 | /** | |
|
171 | * Send an HTTP DELETE request using the default transport for the current platform. | |
|
172 | */ | |
|
173 | del<T>(url: string, options?: NodeRequestBaseOptions): Promise<T>; | |
|
174 | } | |
|
175 | ||
|
176 | /* dojo/request/notify */ | |
|
177 | ||
|
178 | /* TODO: Type in TS 1.8 */ | |
|
179 | /* type NotifyType = 'start' | 'send' | 'load' | 'error' | 'done' | 'stop'; */ | |
|
180 | ||
|
181 | interface Notify { | |
|
182 | /** | |
|
183 | * Register a listener to be notified when an event | |
|
184 | * in dojo/request happens. | |
|
185 | */ | |
|
186 | (type: string /* NotifyType */, listener: (event: any) => void): Handle; | |
|
187 | ||
|
188 | emit(type: string, event: any, cancel: boolean): any; | |
|
189 | } | |
|
190 | ||
|
191 | /* dojo/request/registry */ | |
|
192 | ||
|
193 | interface RegistryOptions extends BaseOptions, MethodOptions { } | |
|
194 | ||
|
195 | interface RegistryFunction { | |
|
196 | (url: string, options?: RequestOptions): boolean; | |
|
197 | } | |
|
198 | ||
|
199 | interface Provider<T> { | |
|
200 | (url: string, options?: RequestOptions): Promise<T>; | |
|
201 | } | |
|
202 | ||
|
203 | type RegisterUrlType = string | RegExp | RegistryFunction; | |
|
204 | ||
|
205 | interface Registry { | |
|
206 | <T>(url: string, options?: RegistryOptions): Promise<T>; | |
|
207 | ||
|
208 | register<T>(url: RegisterUrlType, provider: Provider<T>, first?: boolean): Handle; | |
|
209 | ||
|
210 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
211 | ||
|
212 | /** | |
|
213 | * Send an HTTP GET request using the default transport for the current platform. | |
|
214 | */ | |
|
215 | get<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
216 | ||
|
217 | /** | |
|
218 | * Send an HTTP POST request using the default transport for the current platform. | |
|
219 | */ | |
|
220 | post<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
221 | ||
|
222 | /** | |
|
223 | * Send an HTTP PUT request using the default transport for the current platform. | |
|
224 | */ | |
|
225 | put<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
226 | ||
|
227 | /** | |
|
228 | * Send an HTTP DELETE request using the default transport for the current platform. | |
|
229 | */ | |
|
230 | del<T>(url: string, options?: BaseOptions): Promise<T>; | |
|
231 | } | |
|
232 | ||
|
233 | /* dojo/request/script */ | |
|
234 | ||
|
235 | interface ScriptBaseOptions extends BaseOptions { | |
|
236 | ||
|
237 | /** | |
|
238 | * The URL parameter name that indicates the JSONP callback string. | |
|
239 | * For instance, when using Yahoo JSONP calls it is normally, | |
|
240 | * jsonp: "callback". For AOL JSONP calls it is normally | |
|
241 | * jsonp: "c". | |
|
242 | */ | |
|
243 | jsonp?: string; | |
|
244 | ||
|
245 | /** | |
|
246 | * A string of JavaScript that when evaluated like so: | |
|
247 | * "typeof(" + checkString + ") != 'undefined'" | |
|
248 | * being true means that the script fetched has been loaded. | |
|
249 | * Do not use this if doing a JSONP type of call (use `jsonp` instead). | |
|
250 | */ | |
|
251 | checkString?: string; | |
|
252 | ||
|
253 | /** | |
|
254 | * The Document object of a child iframe. If this is passed in, the script | |
|
255 | * will be attached to that document. This can be helpful in some comet long-polling | |
|
256 | * scenarios with Firefox and Opera. | |
|
257 | */ | |
|
258 | frameDoc?: Document; | |
|
259 | } | |
|
260 | ||
|
261 | interface ScriptOptions extends ScriptBaseOptions, MethodOptions { } | |
|
262 | ||
|
263 | interface Script { | |
|
264 | /** | |
|
265 | * Sends a request using a script element with the given URL and options. | |
|
266 | */ | |
|
267 | <T>(url: string, options: ScriptOptions, returnDeferred: boolean): RequestDeferred<T>; | |
|
268 | <T>(url: string, options?: ScriptOptions): Promise<T>; | |
|
269 | ||
|
270 | /** | |
|
271 | * Send an HTTP GET request using XMLHttpRequest with the given URL and options. | |
|
272 | */ | |
|
273 | get<T>(url: string, options?: ScriptBaseOptions): Promise<T>; | |
|
274 | ||
|
275 | _attach(id: string, url: string, frameDoc?: Document): HTMLScriptElement; | |
|
276 | _remove(id: string, frameDoc?: Document, cleanup?: boolean): void; | |
|
277 | _callbacksProperty: string; | |
|
278 | } | |
|
279 | ||
|
280 | /* dojo/request/util */ | |
|
281 | ||
|
282 | interface Response<T> extends ParsedArgs { | |
|
283 | xhr?: XMLHttpRequest; | |
|
284 | requestOptions?: NodeRequestOptions; | |
|
285 | clientRequest?: any; | |
|
286 | hasSocket?: boolean; | |
|
287 | clientResponse?: any; | |
|
288 | status?: number; | |
|
289 | text?: string; | |
|
290 | data?: T; | |
|
291 | } | |
|
292 | ||
|
293 | interface RequestDeferred<T> extends Deferred<T> { | |
|
294 | response: Response<T>; | |
|
295 | isValid(response: Response<T>): boolean; | |
|
296 | isReady(response: Response<T>): boolean; | |
|
297 | handleResponse(response: Response<T>): Response<T>; | |
|
298 | } | |
|
299 | ||
|
300 | interface CommonMethods<O extends BaseOptions> { | |
|
301 | ||
|
302 | /** | |
|
303 | * Send an HTTP GET request using XMLHttpRequest with the given URL and options. | |
|
304 | */ | |
|
305 | get<T>(url: string, options?: O): Promise<T>; | |
|
306 | ||
|
307 | /** | |
|
308 | * Send an HTTP POST request using XMLHttpRequest with the given URL and options. | |
|
309 | */ | |
|
310 | post<T>(url: string, options?: O): Promise<T>; | |
|
311 | ||
|
312 | /** | |
|
313 | * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. | |
|
314 | */ | |
|
315 | put<T>(url: string, options?: O): Promise<T>; | |
|
316 | ||
|
317 | /** | |
|
318 | * Send an HTTP DELETE request using XMLHttpRequest with the given URL and options. | |
|
319 | */ | |
|
320 | del<T>(url: string, options?: O): Promise<T>; | |
|
321 | } | |
|
322 | ||
|
323 | interface ParsedArgs { | |
|
324 | url: string; | |
|
325 | options: RequestOptions; | |
|
326 | getHeader(headerName: string): string; | |
|
327 | } | |
|
328 | ||
|
329 | interface Util { | |
|
330 | deepCopy<T extends Object, S extends Object>(target: T, source: S): T & S; | |
|
331 | deepCreate<T extends Object, P extends Object>(source: T, properties?: P): T & P; | |
|
332 | ||
|
333 | deferred<T>( | |
|
334 | response: Response<T>, | |
|
335 | cancel: (def: Deferred<Response<T>>, response: Response<T>) => void, | |
|
336 | isValid: (response: Response<T>) => boolean, | |
|
337 | isReady: (response: Response<T>) => boolean, | |
|
338 | last?: boolean | |
|
339 | ): RequestDeferred<Response<T>>; | |
|
340 | ||
|
341 | addCommonMethods<T extends Object>(provider: T, methods: string[]): T; | |
|
342 | addCommonMethods<T extends Object>(provider: T): T & CommonMethods<BaseOptions>; | |
|
343 | ||
|
344 | parseArgs(url: string, options: BaseOptions, skipData?: boolean): ParsedArgs; | |
|
345 | ||
|
346 | checkStatus(): boolean; | |
|
347 | } | |
|
348 | ||
|
349 | /* dojo/request/watch */ | |
|
350 | ||
|
351 | interface Watch { | |
|
352 | /** | |
|
353 | * Watches the io request represented by dfd to see if it completes. | |
|
354 | */ | |
|
355 | <T>(dfd: Promise<T>): void; | |
|
356 | ||
|
357 | /** | |
|
358 | * Cancels all pending IO requests, regardless of IO type | |
|
359 | */ | |
|
360 | cancelAll(): void; | |
|
361 | } | |
|
362 | ||
|
363 | /* dojo/request/xhr */ | |
|
364 | ||
|
365 | interface XhrBaseOptions extends BaseOptions { | |
|
366 | /** | |
|
367 | * Whether to make a synchronous request or not. Default | |
|
368 | * is `false` (asynchronous). | |
|
369 | */ | |
|
370 | sync?: boolean; | |
|
371 | ||
|
372 | /** | |
|
373 | * Data to transfer. This is ignored for GET and DELETE | |
|
374 | * requests. | |
|
375 | */ | |
|
376 | data?: string | GenericObject | FormData; | |
|
377 | ||
|
378 | /** | |
|
379 | * Headers to use for the request. | |
|
380 | */ | |
|
381 | headers?: { [header: string]: string }; | |
|
382 | ||
|
383 | /** | |
|
384 | * Username to use during the request. | |
|
385 | */ | |
|
386 | user?: string; | |
|
387 | ||
|
388 | /** | |
|
389 | * Password to use during the request. | |
|
390 | */ | |
|
391 | password?: string; | |
|
392 | ||
|
393 | /** | |
|
394 | * For cross-site requests, whether to send credentials | |
|
395 | * or not. | |
|
396 | */ | |
|
397 | withCredentials?: boolean; | |
|
398 | } | |
|
399 | ||
|
400 | interface XhrOptions extends XhrBaseOptions, MethodOptions { } | |
|
401 | ||
|
402 | interface Xhr { | |
|
403 | /** | |
|
404 | * Sends a request using XMLHttpRequest with the given URL and options. | |
|
405 | */ | |
|
406 | <T>(url: string, options?: XhrOptions): Promise<T>; | |
|
407 | ||
|
408 | /** | |
|
409 | * Send an HTTP GET request using XMLHttpRequest with the given URL and options. | |
|
410 | */ | |
|
411 | get<T>(url: string, options?: XhrBaseOptions): Promise<T>; | |
|
412 | ||
|
413 | /** | |
|
414 | * Send an HTTP POST request using XMLHttpRequest with the given URL and options. | |
|
415 | */ | |
|
416 | post<T>(url: string, options?: XhrBaseOptions): Promise<T>; | |
|
417 | ||
|
418 | /** | |
|
419 | * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. | |
|
420 | */ | |
|
421 | put<T>(url: string, options?: XhrBaseOptions): Promise<T>; | |
|
422 | ||
|
423 | /** | |
|
424 | * Send an HTTP DELETE request using XMLHttpRequest with the given URL and options. | |
|
425 | */ | |
|
426 | del<T>(url: string, options?: XhrBaseOptions): Promise<T>; | |
|
427 | ||
|
428 | /** | |
|
429 | * does the work of portably generating a new XMLHTTPRequest object. | |
|
430 | */ | |
|
431 | _create(): XMLHttpRequest | ActiveXObject; | |
|
432 | } | |
|
433 | } | |
|
434 | } |
@@ -0,0 +1,72 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace router { | |
|
3 | ||
|
4 | /* dojo/router/RouterBase */ | |
|
5 | ||
|
6 | interface RouterBaseArgs { } | |
|
7 | ||
|
8 | interface RouterBaseCallback { | |
|
9 | (event: RouterBaseEvent): void; | |
|
10 | } | |
|
11 | ||
|
12 | interface RouterBaseEvent extends Event { | |
|
13 | params: string[] | any; | |
|
14 | oldPath: string; | |
|
15 | newPath: string; | |
|
16 | preventDefault(): void; | |
|
17 | stopImmediatePropagation(): void; | |
|
18 | } | |
|
19 | ||
|
20 | interface RouterBaseHandle extends Handle { | |
|
21 | register(callback: RouterBaseCallback, isBefore?: boolean): RouterBaseHandle; | |
|
22 | } | |
|
23 | ||
|
24 | interface RouterBase { | |
|
25 | _routes: any[]; | |
|
26 | _routeIndex: { [id: string]: any }; | |
|
27 | _started: boolean; | |
|
28 | _currentPath: string; | |
|
29 | idMatch: RegExp; | |
|
30 | idReplacement: string; | |
|
31 | globMatch: RegExp; | |
|
32 | globReplacement: string; | |
|
33 | ||
|
34 | /** | |
|
35 | * Registers a route to a handling callback | |
|
36 | */ | |
|
37 | register(route: string | RegExp, callback: RouterBaseCallback): RouterBaseHandle; | |
|
38 | ||
|
39 | /** | |
|
40 | * Registers a route to a handling callback, except before | |
|
41 | * any previously registered callbacks | |
|
42 | */ | |
|
43 | registerBefore(route: string | RegExp, callback: RouterBaseCallback): RouterBaseHandle; | |
|
44 | ||
|
45 | /** | |
|
46 | * A simple pass-through to make changing the hash easy, | |
|
47 | * without having to require dojo/hash directly. It also | |
|
48 | * synchronously fires off any routes that match. | |
|
49 | */ | |
|
50 | go(path: string, replace?: boolean): boolean; | |
|
51 | ||
|
52 | /** | |
|
53 | * This method must be called to activate the router. Until | |
|
54 | * startup is called, no hash changes will trigger route | |
|
55 | * callbacks. | |
|
56 | */ | |
|
57 | startup(defaultPath?: string): void; | |
|
58 | ||
|
59 | destroy(): void; | |
|
60 | ||
|
61 | _handlePathChange(newPath: string): boolean; | |
|
62 | _convertRouteToRegExp(router: string): RegExp; | |
|
63 | _getParameterNames(route: string): string[]; | |
|
64 | _indexRoutes(): void; | |
|
65 | _registerRoute(route: string | RegExp, callback: RouterBaseCallback, isBefore?: boolean): RouterBaseHandle; | |
|
66 | } | |
|
67 | ||
|
68 | interface RouterBaseConstructor { | |
|
69 | new (kwArgs: RouterBaseArgs): RouterBase; | |
|
70 | } | |
|
71 | } | |
|
72 | } |
@@ -0,0 +1,127 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace rpc { | |
|
3 | ||
|
4 | /* dojo/rpc/JsonpService */ | |
|
5 | ||
|
6 | interface JsonpService<T> extends RpcService<T> { | |
|
7 | strictArgChecks: boolean; | |
|
8 | ||
|
9 | /** | |
|
10 | * JSONP bind method. Takes remote method, parameters, | |
|
11 | * deferred, and a url, calls createRequest to make a JSON-RPC | |
|
12 | * envelope and passes that off with bind. | |
|
13 | */ | |
|
14 | bind(method: string, parameters: string[], deferredRequestHandler: dojo._base.Deferred<T>, url?: string): void; | |
|
15 | ||
|
16 | /** | |
|
17 | * create a JSONP req | |
|
18 | */ | |
|
19 | createRequest(parameters: string[]): string[]; | |
|
20 | } | |
|
21 | ||
|
22 | interface JsonpServiceConstructor { | |
|
23 | new <T>(args: string | RpcServiceArgs, requiredArgs: string[]): JsonpService<T>; | |
|
24 | } | |
|
25 | ||
|
26 | /* dojo/rpc/JsonService */ | |
|
27 | ||
|
28 | interface JsonService<T> extends RpcService<T> { | |
|
29 | bustCache: boolean; | |
|
30 | contentType: string; | |
|
31 | lastSubmissionId: number; | |
|
32 | ||
|
33 | /** | |
|
34 | * call an arbitrary remote method without requiring it to be | |
|
35 | * predefined with SMD | |
|
36 | */ | |
|
37 | callRemote<U>(method: string, params: string[]): dojo._base.Deferred<U>; | |
|
38 | ||
|
39 | /** | |
|
40 | * JSON-RPC bind method. Takes remote method, parameters, | |
|
41 | * deferred, and a url, calls createRequest to make a JSON-RPC | |
|
42 | * envelope and passes that off with bind. | |
|
43 | */ | |
|
44 | bind(method: string, parameters: string[], deferredRequestHandler: dojo._base.Deferred<T>, url: string): void; | |
|
45 | ||
|
46 | /** | |
|
47 | * create a JSON-RPC envelope for the request | |
|
48 | */ | |
|
49 | createRequest(method: string, params: string[]): string; | |
|
50 | ||
|
51 | /** | |
|
52 | * parse the result envelope and pass the results back to | |
|
53 | * the callback function | |
|
54 | */ | |
|
55 | parseResults(obj: any): T; | |
|
56 | } | |
|
57 | ||
|
58 | interface JsonServiceConstructor { | |
|
59 | new <T>(args: string | RpcServiceArgs): JsonService<T>; | |
|
60 | } | |
|
61 | ||
|
62 | /* dojo/rpc/RpcService */ | |
|
63 | ||
|
64 | interface SmdMethod { | |
|
65 | name: string; | |
|
66 | parameters?: string[]; | |
|
67 | url?: string; | |
|
68 | serviceUrl?: string; | |
|
69 | serviceURL?: string; | |
|
70 | } | |
|
71 | ||
|
72 | interface SmdObj { | |
|
73 | methods?: SmdMethod[]; | |
|
74 | serviceUrl?: string; | |
|
75 | serviceURL?: string; | |
|
76 | required?: boolean; | |
|
77 | } | |
|
78 | ||
|
79 | interface RpcServiceArgs { | |
|
80 | smdStr?: string; | |
|
81 | serviceUrl?: string; | |
|
82 | strictArgChecks?: boolean; | |
|
83 | smdObj?: SmdObj; | |
|
84 | } | |
|
85 | ||
|
86 | interface RpcService<T> { | |
|
87 | strictArgChecks: boolean; | |
|
88 | serviceUrl: string; | |
|
89 | ||
|
90 | /** | |
|
91 | * parse the results coming back from an rpc request. this | |
|
92 | * base implementation, just returns the full object | |
|
93 | * subclasses should parse and only return the actual results | |
|
94 | */ | |
|
95 | parseResults(obj: any): T; | |
|
96 | ||
|
97 | /** | |
|
98 | * create callback that calls the Deferred errback method | |
|
99 | */ | |
|
100 | errorCallback(deferredRequestHandler: dojo._base.Deferred<T>): (data: any) => void; | |
|
101 | ||
|
102 | /** | |
|
103 | * create callback that calls the Deferred's callback method | |
|
104 | */ | |
|
105 | resultCallback(deferredRequestHandler: dojo._base.Deferred<T>): (obj: any) => void; | |
|
106 | ||
|
107 | /** | |
|
108 | * generate the local bind methods for the remote object | |
|
109 | */ | |
|
110 | generateMethod(method: string, parameters: string[], url: string): dojo._base.Deferred<T>; | |
|
111 | ||
|
112 | /** | |
|
113 | * callback method for receipt of a smd object. Parse the smd | |
|
114 | * and generate functions based on the description | |
|
115 | */ | |
|
116 | processSmd(obj: SmdObj): void; | |
|
117 | } | |
|
118 | ||
|
119 | interface RpcServiceConstructor { | |
|
120 | /** | |
|
121 | * Take a string as a url to retrieve an smd or an object that is an smd or partial smd to use | |
|
122 | * as a definition for the service | |
|
123 | */ | |
|
124 | new <T>(args: string | RpcServiceArgs): RpcService<T>; | |
|
125 | } | |
|
126 | } | |
|
127 | } |
@@ -0,0 +1,26 | |||
|
1 | declare namespace dojo { | |
|
2 | namespace selector { | |
|
3 | ||
|
4 | /* dojo/selector/_loader */ | |
|
5 | interface Loader { | |
|
6 | /** | |
|
7 | * This module handles loading the appropriate selector engine for the given browser | |
|
8 | */ | |
|
9 | load(id: string, parentRequire: Function, loaded: Function): void; /* TODO: Align with loader api */ | |
|
10 | } | |
|
11 | ||
|
12 | /* dojo/selector/acme */ | |
|
13 | ||
|
14 | interface AcmeQueryEngine { | |
|
15 | <T extends Node>(query: string, root?: NodeOrString): T[]; | |
|
16 | filter<T extends Node>(nodeList: T[], filter: string, root?: NodeOrString): T[]; | |
|
17 | } | |
|
18 | ||
|
19 | /* dojo/selector/lite */ | |
|
20 | ||
|
21 | interface LiteQueryEnegine { | |
|
22 | <T extends Node>(query: string, root?: NodeOrString): T[]; | |
|
23 | match(node: Node, selector: string, root?: NodeOrString): boolean; | |
|
24 | } | |
|
25 | } | |
|
26 | } |
This diff has been collapsed as it changes many lines, (591 lines changed) Show them Hide them | |||
@@ -0,0 +1,591 | |||
|
1 | /// <reference path="promise.d.ts" /> | |
|
2 | /// <reference path="data.d.ts" /> | |
|
3 | ||
|
4 | ||
|
5 | declare namespace dojo { | |
|
6 | namespace store { | |
|
7 | namespace api { | |
|
8 | ||
|
9 | type Identity = number | string; | |
|
10 | ||
|
11 | /* dojo/store/api/Store */ | |
|
12 | ||
|
13 | interface SortInformation { | |
|
14 | ||
|
15 | /** | |
|
16 | * The name of the attribute to sort on. | |
|
17 | */ | |
|
18 | attribute: string; | |
|
19 | ||
|
20 | /** | |
|
21 | * The direction of the sort. Default is false. | |
|
22 | */ | |
|
23 | descending?: boolean; | |
|
24 | } | |
|
25 | ||
|
26 | interface QueryOptions { | |
|
27 | /** | |
|
28 | * A list of attributes to sort on, as well as direction | |
|
29 | * For example: | |
|
30 | * | [{attribute:"price", descending: true}]. | |
|
31 | * If the sort parameter is omitted, then the natural order of the store may be | |
|
32 | * applied if there is a natural order. | |
|
33 | */ | |
|
34 | sort?: SortInformation[]; | |
|
35 | ||
|
36 | /** | |
|
37 | * The first result to begin iteration on | |
|
38 | */ | |
|
39 | start?: number; | |
|
40 | ||
|
41 | /** | |
|
42 | * The number of how many results should be returned. | |
|
43 | */ | |
|
44 | count?: number; | |
|
45 | } | |
|
46 | ||
|
47 | interface QueryEngineFunction<T extends object> { | |
|
48 | (array: T[]): T[]; | |
|
49 | matches(object: T): boolean; | |
|
50 | } | |
|
51 | ||
|
52 | type BaseQueryType = string | object | ((...params: any[]) => any); | |
|
53 | ||
|
54 | interface QueryEngine<T extends object, Q extends BaseQueryType> { | |
|
55 | <O extends QueryOptions>(query: Q, options?: O): QueryEngineFunction<T>; | |
|
56 | } | |
|
57 | ||
|
58 | interface PutDirectives<T extends object> { | |
|
59 | ||
|
60 | /** | |
|
61 | * Indicates the identity of the object if a new object is created | |
|
62 | */ | |
|
63 | id?: Identity; | |
|
64 | ||
|
65 | /** | |
|
66 | * If the collection of objects in the store has a natural ordering, | |
|
67 | * this indicates that the created or updated object should be placed before the | |
|
68 | * object specified by the value of this property. A value of null indicates that the | |
|
69 | * object should be last. | |
|
70 | */ | |
|
71 | before?: T; | |
|
72 | ||
|
73 | /** | |
|
74 | * If the store is hierarchical (with single parenting) this property indicates the | |
|
75 | * new parent of the created or updated object. | |
|
76 | */ | |
|
77 | parent?: T; | |
|
78 | ||
|
79 | /** | |
|
80 | * If this is provided as a boolean it indicates that the object should or should not | |
|
81 | * overwrite an existing object. A value of true indicates that a new object | |
|
82 | * should not be created, the operation should update an existing object. A | |
|
83 | * value of false indicates that an existing object should not be updated, a new | |
|
84 | * object should be created (which is the same as an add() operation). When | |
|
85 | * this property is not provided, either an update or creation is acceptable. | |
|
86 | */ | |
|
87 | overwrite?: boolean; | |
|
88 | } | |
|
89 | ||
|
90 | interface SyncQueryResults<T extends object> extends Array<T> { | |
|
91 | total?: number; | |
|
92 | } | |
|
93 | ||
|
94 | interface AsyncQueryResults<T extends object> extends PromiseLike<Array<T>> { | |
|
95 | /** | |
|
96 | * Iterates over the query results, based on | |
|
97 | * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/objects/Array/forEach. | |
|
98 | * Note that this may executed asynchronously. The callback may be called | |
|
99 | * after this function returns. | |
|
100 | */ | |
|
101 | forEach(callback: (item: T, index: number, results: Array<T>) => void, thisObject?: object): PromiseLike<void>; | |
|
102 | ||
|
103 | /** | |
|
104 | * Filters the query results, based on | |
|
105 | * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter. | |
|
106 | * Note that this may executed asynchronously. The callback may be called | |
|
107 | * after this function returns. | |
|
108 | */ | |
|
109 | filter(callback: (item: T, index: number, results: Array<T>) => boolean, thisObject?: object): PromiseLike<Array<T>>; | |
|
110 | ||
|
111 | /** | |
|
112 | * Maps the query results, based on | |
|
113 | * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map. | |
|
114 | * Note that this may executed asynchronously. The callback may be called | |
|
115 | * after this function returns. | |
|
116 | */ | |
|
117 | map<U>(callback: (item: T, index: number, results: Array<T>) => U, thisObject?: object): PromiseLike<Array<U>>; | |
|
118 | ||
|
119 | /** Cancells the current query */ | |
|
120 | cancel(reason?: any): void; | |
|
121 | ||
|
122 | total?: PromiseLike<number>; | |
|
123 | } | |
|
124 | ||
|
125 | type QueryResults<T extends object> = SyncQueryResults<T> | AsyncQueryResults<T>; | |
|
126 | ||
|
127 | interface Transaction { | |
|
128 | /** | |
|
129 | * Commits the transaction. This may throw an error if it fails. Of if the operation | |
|
130 | * is asynchronous, it may return a promise that represents the eventual success | |
|
131 | * or failure of the commit. | |
|
132 | */ | |
|
133 | commit(): void; | |
|
134 | ||
|
135 | /** | |
|
136 | * Aborts the transaction. This may throw an error if it fails. Of if the operation | |
|
137 | * is asynchronous, it may return a promise that represents the eventual success | |
|
138 | * or failure of the abort. | |
|
139 | */ | |
|
140 | abort(): void; | |
|
141 | } | |
|
142 | ||
|
143 | interface Transacted { | |
|
144 | /** | |
|
145 | * Starts a new transaction. | |
|
146 | * Note that a store user might not call transaction() prior to using put, | |
|
147 | * delete, etc. in which case these operations effectively could be thought of | |
|
148 | * as "auto-commit" style actions. | |
|
149 | */ | |
|
150 | transaction(): Transaction; | |
|
151 | } | |
|
152 | ||
|
153 | interface MetadataProvider<T extends object> { | |
|
154 | /** | |
|
155 | * Returns any metadata about the object. This may include attribution, | |
|
156 | * cache directives, history, or version information. | |
|
157 | */ | |
|
158 | getMetadata(object: T): object; | |
|
159 | } | |
|
160 | ||
|
161 | interface IdentityProvider<T extends object> { | |
|
162 | /** | |
|
163 | * If the store has a single primary key, this indicates the property to use as the | |
|
164 | * identity property. The values of this property should be unique. | |
|
165 | */ | |
|
166 | idProperty: keyof T; | |
|
167 | ||
|
168 | /** | |
|
169 | * Returns an object's identity | |
|
170 | */ | |
|
171 | getIdentity(object: T): Identity; | |
|
172 | } | |
|
173 | ||
|
174 | interface Queryable< | |
|
175 | T extends object, | |
|
176 | Q extends BaseQueryType, | |
|
177 | O extends QueryOptions, | |
|
178 | R extends QueryResults<T> = QueryResults<T>> { | |
|
179 | ||
|
180 | /** | |
|
181 | * Queries the store for objects. This does not alter the store, but returns a | |
|
182 | * set of data from the store. | |
|
183 | */ | |
|
184 | query(query?: Q, options?: O): R; | |
|
185 | } | |
|
186 | ||
|
187 | interface SyncStore<T extends object, Q extends BaseQueryType = Partial<T> | ((item: T) => boolean) | string, O extends QueryOptions = QueryOptions> | |
|
188 | extends IdentityProvider<T>, Queryable<T, Q, O, SyncQueryResults<T>> { | |
|
189 | ||
|
190 | /** | |
|
191 | * If the store can be queried locally (on the client side in JS), this defines | |
|
192 | * the query engine to use for querying the data store. | |
|
193 | * This takes a query and query options and returns a function that can execute | |
|
194 | * the provided query on a JavaScript array. The queryEngine may be replace to | |
|
195 | * provide more sophisticated querying capabilities. For example: | |
|
196 | * | var query = store.queryEngine({foo:"bar"}, {count:10}); | |
|
197 | * | query(someArray) -> filtered array | |
|
198 | * The returned query function may have a "matches" property that can be | |
|
199 | * used to determine if an object matches the query. For example: | |
|
200 | * | query.matches({id:"some-object", foo:"bar"}) -> true | |
|
201 | * | query.matches({id:"some-object", foo:"something else"}) -> false | |
|
202 | */ | |
|
203 | queryEngine?: QueryEngine<T, Q>; | |
|
204 | ||
|
205 | /** | |
|
206 | * Retrieves an object by its identity | |
|
207 | */ | |
|
208 | get(id: Identity): T; | |
|
209 | ||
|
210 | /** | |
|
211 | * Stores an object | |
|
212 | */ | |
|
213 | put(object: T, directives?: PutDirectives<T>): any; | |
|
214 | ||
|
215 | /** | |
|
216 | * Creates an object, throws an error if the object already exists | |
|
217 | */ | |
|
218 | add(object: T, directives?: PutDirectives<T>): any; | |
|
219 | ||
|
220 | /** | |
|
221 | * Deletes an object by its identity | |
|
222 | */ | |
|
223 | remove(id: Identity): void; | |
|
224 | ||
|
225 | } | |
|
226 | ||
|
227 | interface AsyncStore<T extends object, Q extends BaseQueryType = Partial<T> | ((item: T) => boolean) | string, O extends QueryOptions = QueryOptions> | |
|
228 | extends IdentityProvider<T>, Queryable<T, Q, O, AsyncQueryResults<T>> { | |
|
229 | ||
|
230 | /** | |
|
231 | * If the store can be queried locally (on the client side in JS), this defines | |
|
232 | * the query engine to use for querying the data store. | |
|
233 | * This takes a query and query options and returns a function that can execute | |
|
234 | * the provided query on a JavaScript array. The queryEngine may be replace to | |
|
235 | * provide more sophisticated querying capabilities. For example: | |
|
236 | * | var query = store.queryEngine({foo:"bar"}, {count:10}); | |
|
237 | * | query(someArray) -> filtered array | |
|
238 | * The returned query function may have a "matches" property that can be | |
|
239 | * used to determine if an object matches the query. For example: | |
|
240 | * | query.matches({id:"some-object", foo:"bar"}) -> true | |
|
241 | * | query.matches({id:"some-object", foo:"something else"}) -> false | |
|
242 | */ | |
|
243 | queryEngine?: QueryEngine<T, Q>; | |
|
244 | ||
|
245 | /** | |
|
246 | * Retrieves an object by its identity | |
|
247 | */ | |
|
248 | get(id: Identity): promise.Promise<T>; | |
|
249 | ||
|
250 | /** | |
|
251 | * Stores an object | |
|
252 | */ | |
|
253 | put(object: T, directives?: PutDirectives<T>): promise.Promise<any>; | |
|
254 | ||
|
255 | /** | |
|
256 | * Creates an object, throws an error if the object already exists | |
|
257 | */ | |
|
258 | add(object: T, directives?: PutDirectives<T>): promise.Promise<any>; | |
|
259 | ||
|
260 | /** | |
|
261 | * Deletes an object by its identity | |
|
262 | */ | |
|
263 | remove(id: string | number): promise.Promise<void>; | |
|
264 | ||
|
265 | } | |
|
266 | ||
|
267 | interface HierarchicalStore<T extends object, O extends QueryOptions = QueryOptions, R extends QueryResults<T> = QueryResults<T>> { | |
|
268 | ||
|
269 | /** | |
|
270 | * Retrieves the children of an object. | |
|
271 | */ | |
|
272 | getChildren(parent: T, options?: O): R; | |
|
273 | } | |
|
274 | ||
|
275 | interface Store<T extends object, Q extends BaseQueryType = Partial<T> | ((item: T) => boolean) | string, O extends QueryOptions = QueryOptions> | |
|
276 | extends IdentityProvider<T>, Queryable<T, Q, O> { | |
|
277 | ||
|
278 | /** | |
|
279 | * If the store can be queried locally (on the client side in JS), this defines | |
|
280 | * the query engine to use for querying the data store. | |
|
281 | * This takes a query and query options and returns a function that can execute | |
|
282 | * the provided query on a JavaScript array. The queryEngine may be replace to | |
|
283 | * provide more sophisticated querying capabilities. For example: | |
|
284 | * | var query = store.queryEngine({foo:"bar"}, {count:10}); | |
|
285 | * | query(someArray) -> filtered array | |
|
286 | * The returned query function may have a "matches" property that can be | |
|
287 | * used to determine if an object matches the query. For example: | |
|
288 | * | query.matches({id:"some-object", foo:"bar"}) -> true | |
|
289 | * | query.matches({id:"some-object", foo:"something else"}) -> false | |
|
290 | */ | |
|
291 | queryEngine?: QueryEngine<T, Q>; | |
|
292 | ||
|
293 | /** | |
|
294 | * Retrieves an object by its identity | |
|
295 | */ | |
|
296 | get(id: Identity): T | promise.Promise<T>; | |
|
297 | ||
|
298 | /** | |
|
299 | * Stores an object | |
|
300 | */ | |
|
301 | put(object: T, directives?: PutDirectives<T>): any; | |
|
302 | ||
|
303 | /** | |
|
304 | * Creates an object, throws an error if the object already exists | |
|
305 | */ | |
|
306 | add(object: T, directives?: PutDirectives<T>): any; | |
|
307 | ||
|
308 | /** | |
|
309 | * Deletes an object by its identity | |
|
310 | */ | |
|
311 | remove(id: Identity): void | promise.Promise<void>; | |
|
312 | ||
|
313 | } | |
|
314 | ||
|
315 | interface StoreConstructor { | |
|
316 | new <T extends object, Q extends BaseQueryType, O extends QueryOptions>(): Store<T, Q, O>; | |
|
317 | } | |
|
318 | } | |
|
319 | ||
|
320 | namespace util { | |
|
321 | ||
|
322 | /* dojo/store/util/QueryResults */ | |
|
323 | ||
|
324 | interface QueryResultsFunction { | |
|
325 | /** | |
|
326 | * A function that wraps the results of a store query with additional | |
|
327 | * methods. | |
|
328 | */ | |
|
329 | <T extends object>(results: T[]): api.SyncQueryResults<T>; | |
|
330 | <T extends object>(results: PromiseLike<T[]>): api.AsyncQueryResults<T>; | |
|
331 | } | |
|
332 | ||
|
333 | /* dojo/store/util/SimpleQueryEngine */ | |
|
334 | interface SimpleQueryEngine extends api.QueryEngine<object, api.BaseQueryType> { } | |
|
335 | } | |
|
336 | ||
|
337 | /* dojo/store/Cache */ | |
|
338 | ||
|
339 | interface CacheOptions<T extends object = any> { | |
|
340 | /** | |
|
341 | * This is a function that will be called for each item in a query response to determine | |
|
342 | * if it is cacheable. If isLoaded returns true, the item will be cached, otherwise it | |
|
343 | * will not be cached. If isLoaded is not provided, all items will be cached. | |
|
344 | */ | |
|
345 | isLoaded?: (item: T) => boolean; | |
|
346 | } | |
|
347 | ||
|
348 | interface CacheMixin { | |
|
349 | /** | |
|
350 | * Remove the object with the specific id. | |
|
351 | */ | |
|
352 | remove(id: api.Identity): promise.Promise<void>; | |
|
353 | ||
|
354 | /** | |
|
355 | * Remove the object with the given id from the underlying caching store. | |
|
356 | */ | |
|
357 | evict(id: api.Identity): promise.Promise<void>; | |
|
358 | } | |
|
359 | ||
|
360 | interface Cache { | |
|
361 | /** | |
|
362 | * The Cache store wrapper takes a master store and a caching store, | |
|
363 | * caches data from the master into the caching store for faster | |
|
364 | * lookup. Normally one would use a memory store for the caching | |
|
365 | * store and a server store like JsonRest for the master store. | |
|
366 | */ | |
|
367 | <T extends object, Q extends api.BaseQueryType, O extends api.QueryOptions, S extends api.Store<T, Q, O>>(masterStore: S, cacheStore: api.Store<T, Q, O>, options?: CacheOptions): CacheMixin & S; | |
|
368 | } | |
|
369 | ||
|
370 | /* dojo/store/DataStore */ | |
|
371 | ||
|
372 | interface DataStoreOptions<T extends object> { | |
|
373 | idProperty?: keyof T; | |
|
374 | queryEngine?: api.QueryEngine<T, api.QueryOptions>; | |
|
375 | store?: data.api.Read<T> | data.api.Write<T> | data.api.Identity<T>; | |
|
376 | } | |
|
377 | ||
|
378 | interface DataStore<T extends object> extends api.Store<T, api.BaseQueryType, api.QueryOptions> { | |
|
379 | /** | |
|
380 | * The object store to convert to a data store | |
|
381 | */ | |
|
382 | store: data.api.Read<T> | data.api.Write<T> | data.api.Identity<T>; | |
|
383 | ||
|
384 | /** | |
|
385 | * Defines the query engine to use for querying the data store | |
|
386 | */ | |
|
387 | queryEngine: api.QueryEngine<T, api.BaseQueryType>; | |
|
388 | ||
|
389 | _objectConverter(callback: (item: T) => any): (item: T) => any; | |
|
390 | } | |
|
391 | ||
|
392 | interface DataStoreConstructor extends _base.DeclareConstructor<DataStore<object>> { | |
|
393 | new <T extends object>(options?: DataStoreOptions<T>): DataStore<T>; | |
|
394 | } | |
|
395 | ||
|
396 | /* dojo/store/JsonRest */ | |
|
397 | ||
|
398 | interface Headers { | |
|
399 | [header: string]: string; | |
|
400 | } | |
|
401 | ||
|
402 | interface JsonRestPutDirectives<T extends object> extends api.PutDirectives<T> { | |
|
403 | headers?: Headers; | |
|
404 | ||
|
405 | incremental?: boolean; | |
|
406 | ||
|
407 | timeout?: number | |
|
408 | } | |
|
409 | ||
|
410 | interface JsonRestQueryOptions extends api.QueryOptions { | |
|
411 | headers?: Headers; | |
|
412 | ||
|
413 | timeout?: number; | |
|
414 | } | |
|
415 | ||
|
416 | interface JsonRestOptions<T extends object> { | |
|
417 | idProperty?: keyof T; | |
|
418 | queryEngine?: api.QueryEngine<T, JsonRestQueryOptions>; | |
|
419 | headers?: Headers; | |
|
420 | target?: string; | |
|
421 | rangeParam?: string; | |
|
422 | sortParam?: string; | |
|
423 | ascendingPrefix?: string; | |
|
424 | descendingPrefix?: string; | |
|
425 | accepts?: string; | |
|
426 | } | |
|
427 | ||
|
428 | interface JsonRest< | |
|
429 | T extends object, | |
|
430 | Q extends api.BaseQueryType = (Partial<T> | string) & api.BaseQueryType, | |
|
431 | O extends JsonRestQueryOptions = JsonRestQueryOptions> | |
|
432 | extends api.AsyncStore<T, Q, O> { | |
|
433 | /** | |
|
434 | * Additional headers to pass in all requests to the server. These can be overridden | |
|
435 | * by passing additional headers to calls to the store. | |
|
436 | */ | |
|
437 | headers: Headers; | |
|
438 | ||
|
439 | /** | |
|
440 | * The target base URL to use for all requests to the server. This string will be | |
|
441 | * prepended to the id to generate the URL (relative or absolute) for requests | |
|
442 | * sent to the server | |
|
443 | */ | |
|
444 | target: string; | |
|
445 | ||
|
446 | /** | |
|
447 | * Use a query parameter for the requested range. If this is omitted, than the | |
|
448 | * Range header will be used. Independent of this, the X-Range header is always set. | |
|
449 | */ | |
|
450 | rangeParam?: string; | |
|
451 | ||
|
452 | /** | |
|
453 | * The query parameter to used for holding sort information. If this is omitted, than | |
|
454 | * the sort information is included in a functional query token to avoid colliding | |
|
455 | * with the set of name/value pairs. | |
|
456 | */ | |
|
457 | sortParam?: string; | |
|
458 | ||
|
459 | /** | |
|
460 | * The prefix to apply to sort attribute names that are ascending | |
|
461 | */ | |
|
462 | ascendingPrefix: string; | |
|
463 | ||
|
464 | /** | |
|
465 | * The prefix to apply to sort attribute names that are descending | |
|
466 | */ | |
|
467 | descendingPrefix: string; | |
|
468 | ||
|
469 | /** | |
|
470 | * If the target has no trailing '/', then append it. | |
|
471 | */ | |
|
472 | _getTarget(id: api.Identity): string; | |
|
473 | ||
|
474 | /** | |
|
475 | * Retrieves an object by its identity. This will trigger a GET request to the server using | |
|
476 | * the url `this.target + id`. | |
|
477 | */ | |
|
478 | get(id: api.Identity, options?: { headers: Headers } | Headers): promise.Promise<T>; | |
|
479 | ||
|
480 | /** | |
|
481 | * Defines the Accept header to use on HTTP requests | |
|
482 | */ | |
|
483 | accepts: string; | |
|
484 | ||
|
485 | /** | |
|
486 | * Stores an object. This will trigger a PUT request to the server | |
|
487 | * if the object has an id, otherwise it will trigger a POST request. | |
|
488 | */ | |
|
489 | put(object: T, options?: JsonRestPutDirectives<T>): promise.Promise<any>; | |
|
490 | ||
|
491 | /** | |
|
492 | * Adds an object. This will trigger a PUT request to the server | |
|
493 | * if the object has an id, otherwise it will trigger a POST request. | |
|
494 | */ | |
|
495 | add(object: T, options?: JsonRestPutDirectives<T>): promise.Promise<any>; | |
|
496 | ||
|
497 | /** | |
|
498 | * Deletes an object by its identity. This will trigger a DELETE request to the server. | |
|
499 | */ | |
|
500 | remove(id: api.Identity, options?: { headers?: Headers }): promise.Promise<void>; | |
|
501 | ||
|
502 | } | |
|
503 | ||
|
504 | interface JsonRestConstructor extends _base.DeclareConstructor<JsonRest<object, api.BaseQueryType, JsonRestQueryOptions>> { | |
|
505 | new <T extends object, Q extends api.BaseQueryType, O extends JsonRestQueryOptions>(options?: JsonRestOptions<T>): JsonRest<T, Q, O>; | |
|
506 | } | |
|
507 | ||
|
508 | /* dojo/store/Memory */ | |
|
509 | ||
|
510 | interface MemoryOptions<T extends object> { | |
|
511 | data?: T[]; | |
|
512 | idProperty?: keyof T; | |
|
513 | queryEngine?: api.QueryEngine<T, api.QueryOptions>; | |
|
514 | setData?: (data: T[]) => void; | |
|
515 | } | |
|
516 | ||
|
517 | interface Memory<T extends object> extends api.SyncStore<T> { | |
|
518 | /** | |
|
519 | * The array of all the objects in the memory store | |
|
520 | */ | |
|
521 | data: T[]; | |
|
522 | ||
|
523 | /** | |
|
524 | * An index of data indices into the data array by id | |
|
525 | */ | |
|
526 | index: { [id: string]: number }; | |
|
527 | ||
|
528 | /** | |
|
529 | * Sets the given data as the source for this store, and indexes it | |
|
530 | */ | |
|
531 | setData(data: T[]): void; | |
|
532 | } | |
|
533 | ||
|
534 | interface MemoryConstructor extends _base.DeclareConstructor<Memory<any>> { | |
|
535 | /** | |
|
536 | * This is a basic in-memory object store. It implements dojo/store/api/Store. | |
|
537 | */ | |
|
538 | new <T extends object>(options?: MemoryOptions<T>): Memory<T>; | |
|
539 | } | |
|
540 | ||
|
541 | /* dojo/store/Observable */ | |
|
542 | ||
|
543 | interface ObservableQueryResultsMixin<T extends object> { | |
|
544 | /** | |
|
545 | * Allows observation of results | |
|
546 | */ | |
|
547 | observe(listener: (object: T, previousIndex: number, newIndex: number) => void, includeUpdates?: boolean): { | |
|
548 | remove(): void; | |
|
549 | cancel(): void; | |
|
550 | }; | |
|
551 | } | |
|
552 | ||
|
553 | type ObservableQueryResults<T extends object> = ObservableQueryResultsMixin<T> & api.QueryResults<T>; | |
|
554 | ||
|
555 | interface ObservableMixin<T extends object, Q extends api.BaseQueryType, O extends api.QueryOptions, R extends api.QueryResults<T> = api.QueryResults<T> > { | |
|
556 | notify(object: T, existingId?: api.Identity): void; | |
|
557 | ||
|
558 | /** | |
|
559 | * Queries the store for objects. This does not alter the store, but returns a | |
|
560 | * set of data from the store. | |
|
561 | */ | |
|
562 | query(query: Q, options?: O): ObservableQueryResultsMixin<T> & R; | |
|
563 | } | |
|
564 | ||
|
565 | interface ResultsObserveMixin<T extends object> { | |
|
566 | /** | |
|
567 | * Allows observation of results | |
|
568 | */ | |
|
569 | observe(listener: (object: T, previousIndex: number, newIndex: number) => void, includeUpdates?: boolean): { | |
|
570 | remove(): void; | |
|
571 | cancel(): void; | |
|
572 | }; | |
|
573 | } | |
|
574 | ||
|
575 | interface Notifiable<T> { | |
|
576 | notify(object: T, existingId?: api.Identity): void; | |
|
577 | } | |
|
578 | ||
|
579 | type ResultItem<R> = R extends ArrayLike<infer I1> ? I1 : | |
|
580 | R extends PromiseLike<ArrayLike<infer I2>> ? I2 : never; | |
|
581 | ||
|
582 | type ObservableStore<S extends { query: (...params: any) => any }> = | |
|
583 | S extends { query: (...params: infer P) => api.QueryResults<infer R> } ? { | |
|
584 | [K in keyof S]: K extends "query" ? (...params: P) => ReturnType<S[K]> & ResultsObserveMixin<R> : S[K]; | |
|
585 | } & Notifiable<R> : S; | |
|
586 | ||
|
587 | interface Observable { | |
|
588 | new <S extends api.Store<any, any, any>>(store: S): ObservableStore<S>; | |
|
589 | } | |
|
590 | } | |
|
591 | } |
@@ -0,0 +1,203 | |||
|
1 | declare namespace dojox { | |
|
2 | ||
|
3 | namespace color { | |
|
4 | ||
|
5 | namespace api { | |
|
6 | interface ColorModel { | |
|
7 | /** | |
|
8 | * Optionally initialize the color model from a list of data items and using a function | |
|
9 | * that returns the value used to compute the color for a given item. | |
|
10 | */ | |
|
11 | initialize(items: any[], colorFunc: Function): void; | |
|
12 | ||
|
13 | /** | |
|
14 | * return the color for a given data value. | |
|
15 | */ | |
|
16 | getColor(value: number): dojo._base.Color; | |
|
17 | } | |
|
18 | ||
|
19 | interface ColorModelConstructor extends dojo._base.DeclareConstructor<ColorModel> { | |
|
20 | new (): ColorModel; | |
|
21 | } | |
|
22 | } | |
|
23 | ||
|
24 | /* dojox/color/_base */ | |
|
25 | ||
|
26 | interface CMYColor { | |
|
27 | c: number; | |
|
28 | m: number; | |
|
29 | y: number; | |
|
30 | } | |
|
31 | ||
|
32 | interface CMYKColor extends CMYColor { | |
|
33 | k: number; | |
|
34 | } | |
|
35 | ||
|
36 | interface HSLColor { | |
|
37 | h: number; | |
|
38 | s: number; | |
|
39 | l: number; | |
|
40 | } | |
|
41 | ||
|
42 | interface HSVColor { | |
|
43 | h: number; | |
|
44 | s: number; | |
|
45 | v: number; | |
|
46 | } | |
|
47 | ||
|
48 | interface Color { | |
|
49 | Color: dojo._base.Color; | |
|
50 | /** | |
|
51 | * Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, | |
|
52 | * can reuse a previously allocated Color object for the result | |
|
53 | */ | |
|
54 | blendColors(start: Color, end: Color, weight: number, obj?: Color): dojo._base.Color; | |
|
55 | ||
|
56 | /** | |
|
57 | * Returns a `Color` instance from a string of the form | |
|
58 | * "rgb(...)" or "rgba(...)". Optionally accepts a `Color` | |
|
59 | * object to update with the parsed value and return instead of | |
|
60 | * creating a new object. | |
|
61 | */ | |
|
62 | fromRgb(color: string, obj?: Color): dojo._base.Color; | |
|
63 | ||
|
64 | /** | |
|
65 | * Converts a hex string with a '#' prefix to a color object. | |
|
66 | * Supports 12-bit #rgb shorthand. Optionally accepts a | |
|
67 | * `Color` object to update with the parsed value. | |
|
68 | */ | |
|
69 | fromHex(color: string, obj?: Color): dojo._base.Color; | |
|
70 | ||
|
71 | /** | |
|
72 | * Builds a `Color` from a 3 or 4 element array, mapping each | |
|
73 | * element in sequence to the rgb(a) values of the color. | |
|
74 | */ | |
|
75 | fromArray(color: dojo._base.ColorValue | dojo._base.ColorValueAlpha, obj?: Color): dojo._base.Color; | |
|
76 | ||
|
77 | /** | |
|
78 | * Parses `str` for a color value. Accepts hex, rgb, and rgba | |
|
79 | * style color values. | |
|
80 | */ | |
|
81 | fromString(str: string, obj?: Color): dojo._base.Color; | |
|
82 | ||
|
83 | greyscale(g: number, a?: number): dojo._base.Color; | |
|
84 | ||
|
85 | /** Create a dojox.color.Color from a CMY defined color. | |
|
86 | * All colors should be expressed as 0-100 (percentage) | |
|
87 | */ | |
|
88 | fromCmy(color: [ number, number, number ] | CMYColor): dojo._base.Color; | |
|
89 | fromCmy(cyan: number, magenta: number, yellow: number): dojo._base.Color; | |
|
90 | ||
|
91 | /** | |
|
92 | * Create a dojox.color.Color from a CMYK defined color. | |
|
93 | * All colors should be expressed as 0-100 (percentage) | |
|
94 | */ | |
|
95 | fromCmyk(color: [ number, number, number, number ] | CMYKColor): dojo._base.Color; | |
|
96 | fromCmyk(cyan: number, magenta: number, yellow: number, black: number): dojo._base.Color; | |
|
97 | ||
|
98 | /** | |
|
99 | * Create a dojox.color.Color from an HSL defined color. | |
|
100 | * hue from 0-359 (degrees), saturation and luminosity 0-100. | |
|
101 | */ | |
|
102 | fromHsl(color: [ number, number, number ] | HSLColor): dojo._base.Color; | |
|
103 | fromHsl(hue: number, saturation: number, luminosity: number): dojo._base.Color; | |
|
104 | ||
|
105 | /** | |
|
106 | * Create a dojox.color.Color from an HSV defined color. | |
|
107 | * hue from 0-359 (degrees), saturation and value 0-100. | |
|
108 | */ | |
|
109 | fromHsv(color: [ number, number, number ] | HSVColor): dojo._base.Color; | |
|
110 | fromHsv(hue: number, saturation: number, value: number): dojo._base.Color; | |
|
111 | } | |
|
112 | ||
|
113 | /* dojox/color/Colorspace */ | |
|
114 | ||
|
115 | interface XYZColor { | |
|
116 | x: number; | |
|
117 | y: number; | |
|
118 | z: number; | |
|
119 | } | |
|
120 | ||
|
121 | interface XYColor { | |
|
122 | x: number; | |
|
123 | y: number; | |
|
124 | } | |
|
125 | ||
|
126 | type ColorMatrix = [ [ number, number, number ], [ number, number, number ], [ number, number, number ] ]; | |
|
127 | ||
|
128 | interface ColorspaceOptions { | |
|
129 | profile?: string; | |
|
130 | whitepoint?: string; | |
|
131 | observer?: string; | |
|
132 | adaptor?: string; | |
|
133 | } | |
|
134 | ||
|
135 | interface Colorspace { | |
|
136 | whitepoint(wpName: string, observer?: string): XYZColor; | |
|
137 | tempToWhitepoint(t: number): XYColor; | |
|
138 | primaries(kwArgs?: ColorspaceOptions): any; | |
|
139 | adapt(kwArgs?: ColorspaceOptions): XYZColor; | |
|
140 | matrix(to: string, primary: any): ColorMatrix; | |
|
141 | epsilon(useApprox?: boolean): number; | |
|
142 | kappa(useApprox?: boolean): number; | |
|
143 | convert(color: any, from: string, to: string, kwArgs?: ColorspaceOptions): any; | |
|
144 | } | |
|
145 | ||
|
146 | interface Color { | |
|
147 | Colorspace: Colorspace; | |
|
148 | fromXYZ(xyz: XYZColor, kwArgs?: ColorspaceOptions): dojo._base.Color; | |
|
149 | } | |
|
150 | } | |
|
151 | } | |
|
152 | ||
|
153 | declare namespace dojo { | |
|
154 | ||
|
155 | namespace _base { | |
|
156 | ||
|
157 | /* dojox/color/_base */ | |
|
158 | ||
|
159 | interface Color { | |
|
160 | /** | |
|
161 | * Convert this Color to a CMY definition. | |
|
162 | */ | |
|
163 | toCmy(): dojox.color.CMYColor; | |
|
164 | ||
|
165 | /** | |
|
166 | * Convert this Color to a CMYK definition. | |
|
167 | */ | |
|
168 | toCmyk(): dojox.color.CMYKColor; | |
|
169 | ||
|
170 | /** | |
|
171 | * Convert this Color to an HSL definition. | |
|
172 | */ | |
|
173 | toHsl(): dojox.color.HSLColor; | |
|
174 | ||
|
175 | /** | |
|
176 | * Convert this Color to an HSV definition. | |
|
177 | */ | |
|
178 | toHsv(): dojox.color.HSVColor; | |
|
179 | } | |
|
180 | ||
|
181 | /* dojox/color/Colorspace */ | |
|
182 | ||
|
183 | interface Color { | |
|
184 | toXYZ(kwArgs?: dojox.color.ColorspaceOptions): dojox.color.XYZColor; | |
|
185 | } | |
|
186 | } | |
|
187 | } | |
|
188 | ||
|
189 | declare module 'dojox/color/api/ColorModel' { | |
|
190 | type ColorModel = dojox.color.api.ColorModel; | |
|
191 | const ColorModel: dojox.color.api.ColorModelConstructor; | |
|
192 | export = ColorModel; | |
|
193 | } | |
|
194 | ||
|
195 | declare module 'dojox/color/_base' { | |
|
196 | const cx: dojox.color.Color; | |
|
197 | export = cx; | |
|
198 | } | |
|
199 | ||
|
200 | declare module 'dojox/color/Colorspace' { | |
|
201 | const Colorspace: dojox.color.Colorspace; | |
|
202 | export = Colorspace; | |
|
203 | } |
@@ -0,0 +1,297 | |||
|
1 | /// <reference path="gfx/arc.d.ts" /> | |
|
2 | /// <reference path="gfx/bezierutils.d.ts" /> | |
|
3 | /// <reference path="gfx/decompose.d.ts" /> | |
|
4 | /// <reference path="gfx/filters.d.ts" /> | |
|
5 | /// <reference path="gfx/fx.d.ts" /> | |
|
6 | /// <reference path="gfx/gradient.d.ts" /> | |
|
7 | /// <reference path="gfx/gradutils.d.ts" /> | |
|
8 | /// <reference path="gfx/matrix.d.ts" /> | |
|
9 | /// <reference path="gfx/Moveable.d.ts" /> | |
|
10 | /// <reference path="gfx/Mover.d.ts" /> | |
|
11 | /// <reference path="gfx/path.d.ts" /> | |
|
12 | /// <reference path="gfx/registry.d.ts" /> | |
|
13 | /// <reference path="gfx/shape.d.ts" /> | |
|
14 | /// <reference path="gfx/utils.d.ts" /> | |
|
15 | /// <reference path="gfx/VectorText.d.ts" /> | |
|
16 | ||
|
17 | declare namespace dojox { | |
|
18 | namespace gfx { | |
|
19 | type ColorLike = dojo._base.ColorValue | dojo._base.ColorValueAlpha | dojo._base.ColorObject | string; | |
|
20 | type CubicBezierCurve = [number, number, number, number, number, number, number, number]; | |
|
21 | type Fill = ColorLike | LinearFill | RadialFill | Pattern; | |
|
22 | type GfxElement = Group | dojox.gfx.shape.Shape | dojox.gfx.shape.Surface; | |
|
23 | type QuadraticBezierCurve = [number, number, number, number, number, number]; | |
|
24 | ||
|
25 | interface CreateSurface { | |
|
26 | (parentNode: Node, width: number | string, height: number | string): dojox.gfx.shape.Surface; | |
|
27 | } | |
|
28 | ||
|
29 | interface FixTarget { | |
|
30 | (event: Event, target: GfxElement): boolean; | |
|
31 | } | |
|
32 | ||
|
33 | interface Font extends SimpleShape { | |
|
34 | family?: string; | |
|
35 | size?: string; | |
|
36 | style?: string; // TODO: enum | |
|
37 | variant?: string; // TODO: enum | |
|
38 | weight?: string; // TODO: enum | |
|
39 | } | |
|
40 | ||
|
41 | interface GradientOffsetColor { | |
|
42 | color: string; | |
|
43 | offset: number; | |
|
44 | } | |
|
45 | ||
|
46 | interface Group extends dojox.gfx.shape.Shape, dojox.gfx.shape.Container, dojox.gfx.shape.Creator { | |
|
47 | setRawNode(node: Node): void; | |
|
48 | } | |
|
49 | ||
|
50 | interface GroupConstructor extends dojox.gfx.shape.ShapeConstructor { | |
|
51 | new(): Group; | |
|
52 | prototype: Group; | |
|
53 | } | |
|
54 | ||
|
55 | interface LinearFill { | |
|
56 | colors: string[] | dojo._base.Color[]; | |
|
57 | type: string; // TODO: enum | |
|
58 | x1: number; | |
|
59 | x2: number; | |
|
60 | y1: number; | |
|
61 | y2: number; | |
|
62 | } | |
|
63 | ||
|
64 | interface LinearGradient extends SimpleShape { | |
|
65 | angle?: number; | |
|
66 | colors?: GradientOffsetColor[]; | |
|
67 | x1: number; | |
|
68 | x2: number; | |
|
69 | y1: number; | |
|
70 | y2: number; | |
|
71 | } | |
|
72 | ||
|
73 | interface Pattern extends SimpleShape { | |
|
74 | height?: number; | |
|
75 | src: string; | |
|
76 | width?: number; | |
|
77 | x?: number; | |
|
78 | y?: number; | |
|
79 | } | |
|
80 | ||
|
81 | interface Point { | |
|
82 | x: number; | |
|
83 | y: number; | |
|
84 | } | |
|
85 | ||
|
86 | // TODO: is this type necessary? It only matches the logic in 'dojox/gfx/gradutils.getColor', | |
|
87 | // which itself is not actually called anywhere within 'dojox/gfx'. | |
|
88 | interface RadialFill { | |
|
89 | colors?: string[] | dojo._base.Color[]; | |
|
90 | cx?: number; | |
|
91 | cy?: number; | |
|
92 | r?: number; | |
|
93 | type?: string; // TODO: enum | |
|
94 | } | |
|
95 | ||
|
96 | interface RadialGradient extends SimpleShape { | |
|
97 | colors?: GradientOffsetColor[]; | |
|
98 | cx: number; | |
|
99 | cy: number; | |
|
100 | r: number; | |
|
101 | } | |
|
102 | ||
|
103 | // TODO: maybe complete this? (probably not important) | |
|
104 | // Missing methods: look in 'dojox/gfx/svg.js' | |
|
105 | // These methods are all defined in each specific renderer, but copied to the base module by | |
|
106 | // 'dojox/gfx/_base.switchTo', so the typings have been defined in this file (e.g. Group, Rect, Ellipse). | |
|
107 | interface Renderer { | |
|
108 | createSurface: CreateSurface; | |
|
109 | fixTarget: FixTarget; | |
|
110 | } | |
|
111 | ||
|
112 | interface SimpleCircle extends SimpleShape { | |
|
113 | cx: number; | |
|
114 | cy: number; | |
|
115 | r: number; | |
|
116 | } | |
|
117 | ||
|
118 | interface SimpleEllipse extends SimpleShape { | |
|
119 | cx: number; | |
|
120 | cy: number; | |
|
121 | rx: number; | |
|
122 | ry: number; | |
|
123 | } | |
|
124 | ||
|
125 | interface SimpleImage extends SimpleShape { | |
|
126 | height?: number; | |
|
127 | src: string; | |
|
128 | width?: number; | |
|
129 | x?: number; | |
|
130 | y?: number; | |
|
131 | } | |
|
132 | ||
|
133 | interface SimpleLine extends SimpleShape { | |
|
134 | x1: number; | |
|
135 | x2: number; | |
|
136 | y1: number; | |
|
137 | y2: number; | |
|
138 | } | |
|
139 | ||
|
140 | interface SimplePath extends SimpleShape { | |
|
141 | path: string; | |
|
142 | } | |
|
143 | ||
|
144 | interface SimplePolyline extends SimpleShape { | |
|
145 | points: Point[]; | |
|
146 | } | |
|
147 | ||
|
148 | interface SimpleRectangle extends SimpleShape { | |
|
149 | height: number; | |
|
150 | r?: number; | |
|
151 | width: number; | |
|
152 | x: number; | |
|
153 | y: number; | |
|
154 | } | |
|
155 | ||
|
156 | interface SimpleShape { | |
|
157 | type?: string; // TODO: enum | |
|
158 | } | |
|
159 | ||
|
160 | interface SimpleText extends SimpleShape { | |
|
161 | align?: string; // TODO: enum | |
|
162 | decoration?: string; | |
|
163 | fitting?: number; // TODO: enum | |
|
164 | height?: number; | |
|
165 | kerning: boolean; | |
|
166 | leading?: number; | |
|
167 | rotated?: boolean; | |
|
168 | text: string; | |
|
169 | width?: number; | |
|
170 | x?: number; | |
|
171 | y?: number; | |
|
172 | } | |
|
173 | ||
|
174 | interface SimpleTextPath extends SimpleShape { | |
|
175 | align?: string; | |
|
176 | decoration?: string; | |
|
177 | kerning?: boolean; | |
|
178 | rotated?: boolean; | |
|
179 | text: string; | |
|
180 | } | |
|
181 | ||
|
182 | interface Stroke extends SimpleShape { | |
|
183 | cap?: string; // TODO: enum | |
|
184 | color?: ColorLike; | |
|
185 | join?: number | string; | |
|
186 | style?: string; // TODO: enum | |
|
187 | width?: number; | |
|
188 | } | |
|
189 | ||
|
190 | interface Translation { | |
|
191 | dx: number; | |
|
192 | dy: number; | |
|
193 | } | |
|
194 | } | |
|
195 | } | |
|
196 | ||
|
197 | declare module 'dojox/gfx' { | |
|
198 | /* tslint:disable:no-unused-variable */ | |
|
199 | type Circle = dojox.gfx.shape.Circle; | |
|
200 | const Circle: dojox.gfx.shape.CircleConstructor; | |
|
201 | type ColorLike = dojox.gfx.ColorLike; | |
|
202 | type CubicBezierCurve = dojox.gfx.CubicBezierCurve; | |
|
203 | type Ellipse = dojox.gfx.shape.Ellipse; | |
|
204 | const Ellipse: dojox.gfx.shape.EllipseConstructor; | |
|
205 | type Fill = dojox.gfx.Fill; | |
|
206 | type Font = dojox.gfx.Font; | |
|
207 | type GfxElement = dojox.gfx.GfxElement; | |
|
208 | type GradientOffsetColor = dojox.gfx.GradientOffsetColor; | |
|
209 | type Group = dojox.gfx.Group; | |
|
210 | const Group: dojox.gfx.GroupConstructor; | |
|
211 | type Image = dojox.gfx.shape.Image; | |
|
212 | const Image: dojox.gfx.shape.ImageConstructor; | |
|
213 | type Line = dojox.gfx.shape.Line; | |
|
214 | const Line: dojox.gfx.shape.LineConstructor; | |
|
215 | type LinearFill = dojox.gfx.LinearFill; | |
|
216 | type LinearGradient = dojox.gfx.LinearGradient; | |
|
217 | type Path = dojox.gfx.path.Path; | |
|
218 | const Path: dojox.gfx.path.PathConstructor; | |
|
219 | type Pattern = dojox.gfx.Pattern; | |
|
220 | type Point = dojox.gfx.Point; | |
|
221 | type PolyLine = dojox.gfx.shape.PolyLine; | |
|
222 | const PolyLine: dojox.gfx.shape.PolyLineConstructor; | |
|
223 | type QuadraticBezierCurve = dojox.gfx.QuadraticBezierCurve; | |
|
224 | type RadialFill = dojox.gfx.RadialFill; | |
|
225 | type RadialGradient = dojox.gfx.RadialGradient; | |
|
226 | type Rect = dojox.gfx.shape.Rect; | |
|
227 | const Rect: dojox.gfx.shape.RectConstructor; | |
|
228 | type Renderer = dojox.gfx.Renderer; | |
|
229 | type SimpleCircle = dojox.gfx.SimpleCircle; | |
|
230 | type SimpleEllipse = dojox.gfx.SimpleEllipse; | |
|
231 | type SimpleImage = dojox.gfx.SimpleImage; | |
|
232 | type SimpleLine = dojox.gfx.SimpleLine; | |
|
233 | type SimplePath = dojox.gfx.SimplePath; | |
|
234 | type SimplePolyline = dojox.gfx.SimplePolyline; | |
|
235 | type SimpleRectangle = dojox.gfx.SimpleRectangle; | |
|
236 | type SimpleShape = dojox.gfx.SimpleShape; | |
|
237 | type SimpleText = dojox.gfx.SimpleText; | |
|
238 | type SimpleTextPath = dojox.gfx.SimpleTextPath; | |
|
239 | type Stroke = dojox.gfx.Stroke; | |
|
240 | type Surface = dojox.gfx.shape.Surface; | |
|
241 | const Surface: dojox.gfx.shape.SurfaceConstructor; | |
|
242 | type Text = dojox.gfx.shape.Text; | |
|
243 | const Text: dojox.gfx.shape.TextConstructor; | |
|
244 | type TextPath = dojox.gfx.path.TextPath; | |
|
245 | const TextPath: dojox.gfx.path.TextPathConstructor; | |
|
246 | ||
|
247 | /* tslint:disable-next-line:variable-name */ | |
|
248 | const cm_in_pt: number; | |
|
249 | const defaultCircle: dojox.gfx.SimpleCircle; | |
|
250 | const defaultEllipse: dojox.gfx.SimpleEllipse; | |
|
251 | const defaultFont: dojox.gfx.Font; | |
|
252 | const defaultImage: dojox.gfx.SimpleImage; | |
|
253 | const defaultLine: dojox.gfx.SimpleLine; | |
|
254 | const defaultLinearGradient: dojox.gfx.LinearGradient; | |
|
255 | const defaultPath: dojox.gfx.SimplePath; | |
|
256 | const defaultPattern: dojox.gfx.Pattern; | |
|
257 | const defaultPolyline: dojox.gfx.SimplePolyline; | |
|
258 | const defaultRadialGradient: dojox.gfx.RadialGradient; | |
|
259 | const defaultRect: dojox.gfx.SimpleRectangle; | |
|
260 | const defaultStroke: dojox.gfx.Stroke; | |
|
261 | const defaultText: dojox.gfx.SimpleText; | |
|
262 | const defaultTextPath: dojox.gfx.SimpleTextPath; | |
|
263 | const defaultVectorFont: dojox.gfx.VectorFont; // from dojox/gfx/VectorText | |
|
264 | const defaultVectorText: dojox.gfx.VectorText; // from dojox/gfx/VectorText | |
|
265 | /* tslint:disable-next-line:variable-name */ | |
|
266 | const mm_in_pt: number; | |
|
267 | const pathSvgRegExp: RegExp; | |
|
268 | const pathVmlRegExp: RegExp; | |
|
269 | const vectorFontFitting: { | |
|
270 | NONE: string; | |
|
271 | FLOW: string; | |
|
272 | FIT: string; | |
|
273 | }; // from dojox/gfx/VectorText | |
|
274 | ||
|
275 | const createSurface: dojox.gfx.CreateSurface; | |
|
276 | const equalSources: (a: any, b: any) => boolean; | |
|
277 | const fixTarget: dojox.gfx.FixTarget; | |
|
278 | const formatNumber: (value: number, addSpace: boolean) => string; | |
|
279 | const getDefault: (shapeType: string) => dojox.gfx.SimpleShape; | |
|
280 | const getVectorFont: (url: string) => dojox.gfx.VectorText; // from dojox/gfx/VectorText | |
|
281 | const makeFontString: (font: dojox.gfx.Font) => string; | |
|
282 | const makeParameters: (defaults: Object, options: Object) => Object; | |
|
283 | const normalizeColor: (color: dojox.gfx.ColorLike) => dojo._base.Color; | |
|
284 | const normalizedLength: (cssLengthString: string) => number; | |
|
285 | const normalizeParameters: (target: Object, source: Object) => Object; | |
|
286 | const pt2px: (points: number) => number; | |
|
287 | const px2pt: (pixels: number) => number; | |
|
288 | /* tslint:disable-next-line:variable-name */ | |
|
289 | const px_in_pt: () => number; | |
|
290 | const splitFontString: (fontString: string) => dojox.gfx.Font; | |
|
291 | const switchTo: (renderer: string | dojox.gfx.Renderer) => void; | |
|
292 | /* tslint:enable */ | |
|
293 | } | |
|
294 | ||
|
295 | declare module 'dojox/gfx/_base' { | |
|
296 | export * from 'dojox/gfx'; | |
|
297 | } |
@@ -0,0 +1,32 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | interface Moveable { | |
|
4 | destroy(): void; | |
|
5 | onFirstMove(mover: Mover): void; | |
|
6 | onMouseDown(event: MouseEvent): void; | |
|
7 | onMouseMove(event: MouseEvent): void; | |
|
8 | onMouseUp(event: MouseEvent): void; | |
|
9 | onMove(move: Mover, shift: Translation): void; | |
|
10 | onMoved(move: Mover, shift: Translation): void; | |
|
11 | onMoveStart(mover: Mover): void; | |
|
12 | onMoveStop(mover: Mover): void; | |
|
13 | onMoving(move: Mover, shift: Translation): void; | |
|
14 | } | |
|
15 | ||
|
16 | interface MoveableConstructor extends dojo._base.DeclareConstructor<Moveable> { | |
|
17 | new(shape: dojox.gfx.shape.Shape, options: MoveableOptions): Moveable; | |
|
18 | prototype: Moveable; | |
|
19 | } | |
|
20 | ||
|
21 | interface MoveableOptions { | |
|
22 | delay?: number; | |
|
23 | mover?: Mover; | |
|
24 | } | |
|
25 | } | |
|
26 | } | |
|
27 | ||
|
28 | declare module 'dojox/gfx/Moveable' { | |
|
29 | type Moveable = dojox.gfx.Moveable; | |
|
30 | const Moveable: dojox.gfx.MoveableConstructor; | |
|
31 | export = Moveable; | |
|
32 | } |
@@ -0,0 +1,20 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | interface Mover { | |
|
4 | destroy(): void; | |
|
5 | onFirstMove(): void; | |
|
6 | onMouseMove(event: MouseEvent): void; | |
|
7 | } | |
|
8 | ||
|
9 | interface MoverConstructor extends dojo._base.DeclareConstructor<Mover> { | |
|
10 | new(shape: dojox.gfx.shape.Shape, event: MouseEvent, host: Moveable): Mover; | |
|
11 | prototype: Mover; | |
|
12 | } | |
|
13 | } | |
|
14 | } | |
|
15 | ||
|
16 | declare module 'dojox/gfx/Mover' { | |
|
17 | type Mover = dojox.gfx.Mover; | |
|
18 | const Mover: dojox.gfx.MoverConstructor; | |
|
19 | export = Mover; | |
|
20 | } |
@@ -0,0 +1,49 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | interface VectorFont { | |
|
4 | family: string; | |
|
5 | size: string; | |
|
6 | type: string; | |
|
7 | } | |
|
8 | ||
|
9 | interface VectorText { | |
|
10 | align: string; | |
|
11 | decoration: string; | |
|
12 | fitting: number; // TODO enum? vectorFontFitting | |
|
13 | height: number; | |
|
14 | leading: number; | |
|
15 | text: string; | |
|
16 | type: string; | |
|
17 | width: number; | |
|
18 | x: number; | |
|
19 | y: number; | |
|
20 | ||
|
21 | draw( | |
|
22 | group: dojox.gfx.shape.Container, | |
|
23 | text: Text, | |
|
24 | font: Font, | |
|
25 | fill: Fill, | |
|
26 | stroke: Stroke | |
|
27 | ): Group; | |
|
28 | getBaseLine(scale?: number): number; | |
|
29 | getCenterLine(scale?: number): number; | |
|
30 | getLineHeight(scale?: number): number; | |
|
31 | getWidth(text: string, scale?: number): number; | |
|
32 | initialized(): boolean; | |
|
33 | load(url: string): this; | |
|
34 | onLoad(font: VectorText): void; | |
|
35 | onLoadBegin(url: string): void; | |
|
36 | } | |
|
37 | ||
|
38 | interface VectorTextConstructor extends dojo._base.DeclareConstructor<VectorText> { | |
|
39 | new(url?: string): VectorText; | |
|
40 | prototype: VectorText; | |
|
41 | } | |
|
42 | } | |
|
43 | } | |
|
44 | ||
|
45 | declare module 'dojox/gfx/VectorText' { | |
|
46 | type VectorText = dojox.gfx.VectorText; | |
|
47 | const VectorText: dojox.gfx.VectorTextConstructor; | |
|
48 | export = VectorText; | |
|
49 | } |
@@ -0,0 +1,32 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace arc { | |
|
4 | interface Arc { | |
|
5 | c1: Point; | |
|
6 | c2: Point; | |
|
7 | e: Point; | |
|
8 | s: Point; | |
|
9 | } | |
|
10 | } | |
|
11 | } | |
|
12 | } | |
|
13 | ||
|
14 | declare module 'dojox/gfx/arc' { | |
|
15 | type Arc = dojox.gfx.arc.Arc; | |
|
16 | ||
|
17 | /* tslint:disable:no-unused-variable */ | |
|
18 | const curvePI4: Arc; | |
|
19 | ||
|
20 | const arcAsBezier: ( | |
|
21 | last: dojox.gfx.Point, | |
|
22 | rx: number, | |
|
23 | ry: number, | |
|
24 | xRotG: number, | |
|
25 | large: boolean, | |
|
26 | sweep: boolean, | |
|
27 | x: number, | |
|
28 | y: number | |
|
29 | ) => dojox.gfx.QuadraticBezierCurve; | |
|
30 | const unitArcAsBezier: (radians: number) => Arc; | |
|
31 | /* tslint:enable */ | |
|
32 | } |
@@ -0,0 +1,30 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | interface BezierUtils { | |
|
4 | computeLength(points: number[]): number; | |
|
5 | distance(x1: number, y1: number, x2: number, y2: number): number; | |
|
6 | splitBezierAtT(points: dojox.gfx.CubicBezierCurve, t: number): [ | |
|
7 | dojox.gfx.CubicBezierCurve, | |
|
8 | dojox.gfx.CubicBezierCurve | |
|
9 | ]; | |
|
10 | splitBezierAtT(points: dojox.gfx.QuadraticBezierCurve, t: number): [ | |
|
11 | dojox.gfx.QuadraticBezierCurve, | |
|
12 | dojox.gfx.QuadraticBezierCurve | |
|
13 | ]; | |
|
14 | splitCBezierAtT(points: dojox.gfx.CubicBezierCurve, t: number): [ | |
|
15 | dojox.gfx.CubicBezierCurve, | |
|
16 | dojox.gfx.CubicBezierCurve | |
|
17 | ]; | |
|
18 | splitQBezierAtT(points: dojox.gfx.QuadraticBezierCurve, t: number): [ | |
|
19 | dojox.gfx.QuadraticBezierCurve, | |
|
20 | dojox.gfx.QuadraticBezierCurve | |
|
21 | ]; | |
|
22 | tAtLength(points: number[], length: number): number; | |
|
23 | } | |
|
24 | } | |
|
25 | } | |
|
26 | ||
|
27 | declare module 'dojox/gfx/bezierutils' { | |
|
28 | const bezierutils: dojox.gfx.BezierUtils; | |
|
29 | export = bezierutils; | |
|
30 | } |
@@ -0,0 +1,21 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | interface Decompose { | |
|
4 | (matrix: dojox.gfx.matrix.MatrixLike): MatrixDescriptor; | |
|
5 | } | |
|
6 | ||
|
7 | interface MatrixDescriptor { | |
|
8 | dx: number; | |
|
9 | dy: number; | |
|
10 | sx: number; | |
|
11 | sy: number; | |
|
12 | angle1: number; | |
|
13 | angle2: number; | |
|
14 | } | |
|
15 | } | |
|
16 | } | |
|
17 | ||
|
18 | declare module 'dojox/gfx/decompose' { | |
|
19 | const decompose: dojox.gfx.Decompose; | |
|
20 | export = decompose; | |
|
21 | } |
@@ -0,0 +1,264 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace filters { | |
|
4 | interface BlendOptions extends FilterOptions { | |
|
5 | in?: string; | |
|
6 | in2?: string; | |
|
7 | mode?: string; | |
|
8 | } | |
|
9 | ||
|
10 | interface ColorMatrixOptions extends FilterOptions { | |
|
11 | in?: string; | |
|
12 | type?: string; | |
|
13 | values?: string; | |
|
14 | } | |
|
15 | ||
|
16 | interface ComponentTransferOptions extends FilterOptions { | |
|
17 | in?: string; | |
|
18 | } | |
|
19 | ||
|
20 | interface CompositeOptions extends FilterOptions { | |
|
21 | in?: string; | |
|
22 | in2?: string; | |
|
23 | k1?: string; | |
|
24 | k2?: string; | |
|
25 | k3?: string; | |
|
26 | k4?: string; | |
|
27 | operator?: string; | |
|
28 | } | |
|
29 | ||
|
30 | interface ConvolveMatrixOptions extends FilterOptions { | |
|
31 | bias?: string; | |
|
32 | divisor?: string; | |
|
33 | edgeMode?: string; | |
|
34 | in?: string; | |
|
35 | kernelMatrix?: string; | |
|
36 | kernelUnitLength?: string; | |
|
37 | order?: string; | |
|
38 | preserveAlpha?: string; | |
|
39 | targetX?: string; | |
|
40 | targetY?: string; | |
|
41 | } | |
|
42 | ||
|
43 | interface DiffuseLightingOptions extends FilterOptions { | |
|
44 | diffuseConstant?: string; | |
|
45 | in?: string; | |
|
46 | kernelUnitLength?: string; | |
|
47 | surfaceScale?: string; | |
|
48 | } | |
|
49 | ||
|
50 | interface DistantLightOptions extends FilterOptions { | |
|
51 | azimuth?: string; | |
|
52 | elevation?: string; | |
|
53 | } | |
|
54 | ||
|
55 | interface DisplacementMapOptions extends FilterOptions { | |
|
56 | in?: string; | |
|
57 | in2?: string; | |
|
58 | scale?: string; | |
|
59 | xChannelSelector?: string; | |
|
60 | yChannelSelector?: string; | |
|
61 | } | |
|
62 | ||
|
63 | interface FloodOptions extends FilterOptions { | |
|
64 | 'flood-color'?: string; | |
|
65 | 'flood-opacity'?: string; | |
|
66 | } | |
|
67 | ||
|
68 | interface GaussianBlurOptions extends FilterOptions { | |
|
69 | in?: string; | |
|
70 | edgeMode?: string; | |
|
71 | stdDeviation?: string; | |
|
72 | } | |
|
73 | ||
|
74 | interface ImageOptions extends FilterOptions { | |
|
75 | preserveAspectRatio?: string; | |
|
76 | 'xlink:href'?: string; | |
|
77 | } | |
|
78 | ||
|
79 | interface MergeNodeOptions extends FilterOptions { | |
|
80 | in?: string; | |
|
81 | } | |
|
82 | ||
|
83 | interface MorphologyOptions extends FilterOptions { | |
|
84 | in?: string; | |
|
85 | operator?: string; | |
|
86 | radius?: string; | |
|
87 | } | |
|
88 | ||
|
89 | interface OffsetOptions extends FilterOptions { | |
|
90 | dx?: string; | |
|
91 | dy?: string; | |
|
92 | in?: string; | |
|
93 | } | |
|
94 | ||
|
95 | interface PointLightOptions extends FilterOptions { | |
|
96 | x?: string; | |
|
97 | y?: string; | |
|
98 | z?: string; | |
|
99 | } | |
|
100 | ||
|
101 | interface SpecularLightingOptions extends FilterOptions { | |
|
102 | in?: string; | |
|
103 | kernelUnitLength?: string; | |
|
104 | specularConstant?: string; | |
|
105 | specularExponent?: string; | |
|
106 | surfaceScale?: string; | |
|
107 | } | |
|
108 | ||
|
109 | interface SpotLightOptions extends FilterOptions { | |
|
110 | limitingConeAngle?: string; | |
|
111 | pointsAtX?: string; | |
|
112 | pointsAtY?: string; | |
|
113 | pointsAtZ?: string; | |
|
114 | specularExponent?: string; | |
|
115 | x?: string; | |
|
116 | y?: string; | |
|
117 | z?: string; | |
|
118 | } | |
|
119 | ||
|
120 | interface TileOptions extends FilterOptions { | |
|
121 | in?: string; | |
|
122 | } | |
|
123 | ||
|
124 | interface TurbulenceOptions extends FilterOptions { | |
|
125 | baseFrequency?: string; | |
|
126 | numOctaves?: string; | |
|
127 | seed?: string; | |
|
128 | stitchTiles?: string; | |
|
129 | type?: string; | |
|
130 | } | |
|
131 | ||
|
132 | interface Filter { | |
|
133 | _gfxName: string; | |
|
134 | height: string; | |
|
135 | primitives: FilterPrimitive[]; | |
|
136 | width: string; | |
|
137 | x: string; | |
|
138 | y: string; | |
|
139 | } | |
|
140 | ||
|
141 | interface FilterOptions { | |
|
142 | [key: string]: any; | |
|
143 | height?: string; | |
|
144 | result?: string; | |
|
145 | width?: string; | |
|
146 | x?: string; | |
|
147 | y?: string; | |
|
148 | } | |
|
149 | ||
|
150 | interface FilterPrimitive { | |
|
151 | children: FilterPrimitive[]; | |
|
152 | height?: string; | |
|
153 | result?: string; | |
|
154 | tag: string; | |
|
155 | width?: string; | |
|
156 | x?: string; | |
|
157 | y?: string; | |
|
158 | } | |
|
159 | ||
|
160 | interface Filters { | |
|
161 | createFilter(options?: FilterOptions, primitives?: FilterPrimitive[]): FilterPrimitive; | |
|
162 | feBlend(options: BlendOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
163 | feColorMatrix(options: ColorMatrixOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
164 | feComponentTransfer(options: ComponentTransferOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
165 | feComposite(options: CompositeOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
166 | feConvolveMatrix(options: ConvolveMatrixOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
167 | feDiffuseLighting(options: DiffuseLightingOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
168 | feDisplacementMap(options: DisplacementMapOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
169 | feDistantLight(options: DistantLightOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
170 | feFlood(options: FloodOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
171 | feFuncA(options: FilterOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
172 | feFuncB(options: FilterOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
173 | feFuncG(options: FilterOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
174 | feFuncR(options: FilterOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
175 | feGaussianBlur(options: GaussianBlurOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
176 | feImage(options: ImageOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
177 | feMerge(options: FilterOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
178 | feMergeNode(options: MergeNodeOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
179 | feMorphology(options: MorphologyOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
180 | feOffset(options: OffsetOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
181 | fePointLight(options: PointLightOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
182 | feSpecularLighting(options: SpecularLightingOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
183 | feSpotLight(options: SpotLightOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
184 | feTile(options: TileOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
185 | feTurbulence(options: TurbulenceOptions, children?: FilterPrimitive[]): FilterPrimitive; | |
|
186 | ||
|
187 | blurs: { | |
|
188 | blur1(): Filter; | |
|
189 | blur2(): Filter; | |
|
190 | blur4(): Filter; | |
|
191 | blur8(): Filter; | |
|
192 | glow(): Filter; | |
|
193 | }; | |
|
194 | ||
|
195 | colors: { | |
|
196 | grayscale(): Filter; | |
|
197 | hueRotate60(): Filter; | |
|
198 | hueRotate120(): Filter; | |
|
199 | hueRotate180(): Filter; | |
|
200 | hueRotate270(): Filter; | |
|
201 | negate(): Filter; | |
|
202 | sepia(): Filter; | |
|
203 | showBlue(): Filter; | |
|
204 | showGreen(): Filter; | |
|
205 | showRed(): Filter; | |
|
206 | }; | |
|
207 | ||
|
208 | convolutions: { | |
|
209 | allEdges3(): Filter; | |
|
210 | boxBlur3(): Filter; | |
|
211 | boxBlur5(): Filter; | |
|
212 | edgeEnhance(): Filter; | |
|
213 | horizontalEdges(): Filter; | |
|
214 | verticalEdges(): Filter; | |
|
215 | }; | |
|
216 | ||
|
217 | miscs: { | |
|
218 | embossDropShadow(): Filter; | |
|
219 | embossDropShadowLight(): Filter; | |
|
220 | fuzzy(): Filter; | |
|
221 | holes(): Filter; | |
|
222 | holesComplement(): Filter; | |
|
223 | impressionist(): Filter; | |
|
224 | largeEmbossDropShadow(): Filter; | |
|
225 | largeEmbossDropShadowLight(): Filter; | |
|
226 | melting(): Filter; | |
|
227 | thinEmbossDropShadow(): Filter; | |
|
228 | thinEmbossDropShadowLight(): Filter; | |
|
229 | veryFuzzy(): Filter; | |
|
230 | }; | |
|
231 | ||
|
232 | reliefs: { | |
|
233 | bumpIn(): Filter; | |
|
234 | bumpOut(): Filter; | |
|
235 | emboss(): Filter; | |
|
236 | largeEmboss(): Filter; | |
|
237 | thinEmboss(): Filter; | |
|
238 | }; | |
|
239 | ||
|
240 | shadows: { | |
|
241 | dropShadow(): Filter; | |
|
242 | dropShadowLight(): Filter; | |
|
243 | fastDropShadow(): Filter; | |
|
244 | fastDropShadowLight(): Filter; | |
|
245 | fastSmallDropShadow(): Filter; | |
|
246 | smallDropShadow(): Filter; | |
|
247 | smallDropShadowLight(): Filter; | |
|
248 | }; | |
|
249 | ||
|
250 | textures: { | |
|
251 | gold(): Filter; | |
|
252 | paper(): Filter; | |
|
253 | swirl(): Filter; | |
|
254 | swirl2(): Filter; | |
|
255 | }; | |
|
256 | } | |
|
257 | } | |
|
258 | } | |
|
259 | } | |
|
260 | ||
|
261 | declare module 'dojox/gfx/filters' { | |
|
262 | const filters: dojox.gfx.filters.Filters; | |
|
263 | export = filters; | |
|
264 | } |
@@ -0,0 +1,17 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace fx { | |
|
4 | interface Fx { | |
|
5 | animateFill(options: dojo._base.AnimationArguments): dojo._base.Animation; | |
|
6 | animateFont(options: dojo._base.AnimationArguments): dojo._base.Animation; | |
|
7 | animateStroke(options: dojo._base.AnimationArguments): dojo._base.Animation; | |
|
8 | animateTransform(options: dojo._base.AnimationArguments): dojo._base.Animation; | |
|
9 | } | |
|
10 | } | |
|
11 | } | |
|
12 | } | |
|
13 | ||
|
14 | declare module 'dojox/gfx/fx' { | |
|
15 | const fx: dojox.gfx.fx.Fx; | |
|
16 | export = fx; | |
|
17 | } |
@@ -0,0 +1,22 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace gradient { | |
|
4 | interface GradientModule { | |
|
5 | project( | |
|
6 | matrix: dojox.gfx.matrix.Matrix2D, | |
|
7 | gradient: LinearGradient, | |
|
8 | topLeft: Point, | |
|
9 | bottomRight: Point, | |
|
10 | transformTopLeft: Point, | |
|
11 | transformBottomRight: Point | |
|
12 | ): LinearGradient; | |
|
13 | rescale(stops: GradientOffsetColor[], from: number, to: number): GradientOffsetColor[]; | |
|
14 | } | |
|
15 | } | |
|
16 | } | |
|
17 | } | |
|
18 | ||
|
19 | declare module 'dojox/gfx/gradient' { | |
|
20 | const gradient: dojox.gfx.gradient.GradientModule; | |
|
21 | export = gradient; | |
|
22 | } |
@@ -0,0 +1,15 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace gradutils { | |
|
4 | interface GradUtils { | |
|
5 | getColor(fill: Fill, point: Point): dojo._base.Color; | |
|
6 | reverse(fill: Fill): Fill; | |
|
7 | } | |
|
8 | } | |
|
9 | } | |
|
10 | } | |
|
11 | ||
|
12 | declare module 'dojox/gfx/gradutils' { | |
|
13 | const gradutils: dojox.gfx.gradutils.GradUtils; | |
|
14 | export = gradutils; | |
|
15 | } |
@@ -0,0 +1,123 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace matrix { | |
|
4 | type MatrixLike = number | [number, number] | Matrix2D; | |
|
5 | ||
|
6 | interface Matrix2D { | |
|
7 | dx?: number; | |
|
8 | dy?: number; | |
|
9 | xx?: number; | |
|
10 | xy?: number; | |
|
11 | yx?: number; | |
|
12 | yy?: number; | |
|
13 | } | |
|
14 | ||
|
15 | interface Matrix2DConstructor { | |
|
16 | new(matrix: MatrixLike): Matrix2D; | |
|
17 | prototype: Matrix2D; | |
|
18 | } | |
|
19 | ||
|
20 | // TS does not allow overloaded method signatures within the module declaration, | |
|
21 | // so we need to define the interfaces here | |
|
22 | interface MultiplyPoint { | |
|
23 | (matrix: MatrixLike, point: dojox.gfx.Point): dojox.gfx.Point; | |
|
24 | (matrix: MatrixLike, x: number, y: number): dojox.gfx.Point; | |
|
25 | } | |
|
26 | ||
|
27 | interface Project { | |
|
28 | (point: dojox.gfx.Point): Matrix2D; | |
|
29 | (x: number, y: number): Matrix2D; | |
|
30 | } | |
|
31 | ||
|
32 | interface Reflect { | |
|
33 | (point: dojox.gfx.Point): Matrix2D; | |
|
34 | (x: number, y: number): Matrix2D; | |
|
35 | } | |
|
36 | ||
|
37 | interface RotateAt { | |
|
38 | (radians: number, point: dojox.gfx.Point): Matrix2D; | |
|
39 | (radians: number, x: number, y: number): Matrix2D; | |
|
40 | } | |
|
41 | ||
|
42 | interface RotategAt { | |
|
43 | (degrees: number, point: dojox.gfx.Point): Matrix2D; | |
|
44 | (degrees: number, x: number, y: number): Matrix2D; | |
|
45 | } | |
|
46 | ||
|
47 | interface Scale { | |
|
48 | (x: number, y: number): Matrix2D; | |
|
49 | (point: dojox.gfx.Point): Matrix2D; | |
|
50 | } | |
|
51 | ||
|
52 | interface ScaleAt { | |
|
53 | (factor: number | dojox.gfx.Point, point: dojox.gfx.Point): Matrix2D; | |
|
54 | (factor: number | dojox.gfx.Point, x: number, y: number): Matrix2D; | |
|
55 | (factorX: number, factorY: number, point: dojox.gfx.Point): Matrix2D; | |
|
56 | (factorX: number, factorY: number, x: number, y: number): Matrix2D; | |
|
57 | } | |
|
58 | ||
|
59 | interface SkewXAt { | |
|
60 | (radians: number, point: dojox.gfx.Point): Matrix2D; | |
|
61 | (radians: number, x: number, y: number): Matrix2D; | |
|
62 | } | |
|
63 | ||
|
64 | interface SkewXgAt { | |
|
65 | (degrees: number, point: dojox.gfx.Point): Matrix2D; | |
|
66 | (degrees: number, x: number, y: number): Matrix2D; | |
|
67 | } | |
|
68 | ||
|
69 | interface SkewYAt { | |
|
70 | (radians: number, point: dojox.gfx.Point): Matrix2D; | |
|
71 | (radians: number, x: number, y: number): Matrix2D; | |
|
72 | } | |
|
73 | ||
|
74 | interface SkewYgAt { | |
|
75 | (degrees: number, point: dojox.gfx.Point): Matrix2D; | |
|
76 | (degrees: number, x: number, y: number): Matrix2D; | |
|
77 | } | |
|
78 | ||
|
79 | interface Translate { | |
|
80 | (point: dojox.gfx.Point): Matrix2D; | |
|
81 | (x: number, y: number): Matrix2D; | |
|
82 | } | |
|
83 | } | |
|
84 | } | |
|
85 | } | |
|
86 | ||
|
87 | declare module 'dojox/gfx/matrix' { | |
|
88 | /* tslint:disable:no-unused-variable */ | |
|
89 | type MatrixLike = dojox.gfx.matrix.MatrixLike; | |
|
90 | type Matrix2D = dojox.gfx.matrix.Matrix2D; | |
|
91 | const Matrix2D: dojox.gfx.matrix.Matrix2DConstructor; | |
|
92 | ||
|
93 | const flipX: Matrix2D; | |
|
94 | const flipY: Matrix2D; | |
|
95 | const flipXY: Matrix2D; | |
|
96 | const identity: Matrix2D; | |
|
97 | ||
|
98 | const clone: (matrix: Matrix2D) => Matrix2D; | |
|
99 | const invert: (matrix: Matrix2D) => Matrix2D; | |
|
100 | const isIdentity: (matrix: Matrix2D) => boolean; | |
|
101 | const multiply: (...matrices: MatrixLike[]) => Matrix2D; | |
|
102 | const multiplyPoint: dojox.gfx.matrix.MultiplyPoint; | |
|
103 | const multiplyRectangle: (matrix: MatrixLike, rectangle: dojox.gfx.SimpleRectangle) => dojox.gfx.SimpleRectangle; | |
|
104 | const normalize: (matrix: MatrixLike) => Matrix2D; | |
|
105 | const project: dojox.gfx.matrix.Project; | |
|
106 | const reflect: dojox.gfx.matrix.Reflect; | |
|
107 | const rotate: (radians: number) => Matrix2D; | |
|
108 | const rotateAt: dojox.gfx.matrix.RotateAt; | |
|
109 | const rotateg: (degrees: number) => Matrix2D; | |
|
110 | const rotategAt: dojox.gfx.matrix.RotategAt; | |
|
111 | const scale: dojox.gfx.matrix.Scale; | |
|
112 | const scaleAt: dojox.gfx.matrix.ScaleAt; | |
|
113 | const skewX: (radians: number) => Matrix2D; | |
|
114 | const skewXAt: dojox.gfx.matrix.SkewXAt; | |
|
115 | const skewXg: (degrees: number) => Matrix2D; | |
|
116 | const skewXgAt: dojox.gfx.matrix.SkewXgAt; | |
|
117 | const skewY: (radians: number) => Matrix2D; | |
|
118 | const skewYAt: dojox.gfx.matrix.SkewYAt; | |
|
119 | const skewYg: (degrees: number) => Matrix2D; | |
|
120 | const skewYgAt: dojox.gfx.matrix.SkewYgAt; | |
|
121 | const translate: dojox.gfx.matrix.Translate; | |
|
122 | /* tslint:enable */ | |
|
123 | } |
@@ -0,0 +1,73 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace path { | |
|
4 | interface Path extends dojox.gfx.shape.Shape { | |
|
5 | absolute: boolean; | |
|
6 | last: Point; | |
|
7 | segmented: boolean; | |
|
8 | segments: Segment[]; | |
|
9 | shape: Path; | |
|
10 | tbbox: [Point, Point, Point, Point]; | |
|
11 | ||
|
12 | arcTo( | |
|
13 | rx: number, | |
|
14 | ry: number, | |
|
15 | /* tslint:disable:variable-name */ | |
|
16 | x_axis_rotation: number, | |
|
17 | large_arc_flag: number, | |
|
18 | sweep_flag: number, | |
|
19 | /* tslint:enable */ | |
|
20 | x: number, | |
|
21 | y: number | |
|
22 | ): this; | |
|
23 | closePath(): this; | |
|
24 | curveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): this; | |
|
25 | getAbsoluteMode(): boolean; | |
|
26 | getBoundingBox(): SimpleRectangle; | |
|
27 | getLastPosition(): Point; | |
|
28 | hLineTo(x: number): this; | |
|
29 | lineTo(x: number, y: number): this; | |
|
30 | moveTo(x: number, y: number): this; | |
|
31 | qCurveTo(x1: number, y1: number, x: number, y: number): this; | |
|
32 | setAbsoluteMode(mode: boolean | string): void; // TODO: enum | |
|
33 | // setShape(shape: string | dojox.gfx.path.Path): this; | |
|
34 | smoothCurveTo(x2: number, y2: number, x: number, y: number): void; | |
|
35 | vLineTo(y: number): this; | |
|
36 | } | |
|
37 | ||
|
38 | interface PathConstructor extends dojox.gfx.shape.ShapeConstructor { | |
|
39 | new(): Path; | |
|
40 | prototype: Path; | |
|
41 | } | |
|
42 | ||
|
43 | interface Segment { | |
|
44 | action: string; | |
|
45 | args: any[]; | |
|
46 | } | |
|
47 | ||
|
48 | interface TextPath extends Path { | |
|
49 | fontStyle: Font; | |
|
50 | text: TextPath; | |
|
51 | ||
|
52 | getFont(): Font; | |
|
53 | getText(): TextPath; | |
|
54 | setFont(font: string | Font): this; | |
|
55 | setText(text: string | TextPath): this; | |
|
56 | } | |
|
57 | ||
|
58 | interface TextPathConstructor extends PathConstructor { | |
|
59 | new(): TextPath; | |
|
60 | prototype: TextPath; | |
|
61 | } | |
|
62 | } | |
|
63 | } | |
|
64 | } | |
|
65 | ||
|
66 | declare module 'dojox/gfx/path' { | |
|
67 | /* tslint:disable:no-unused-variable */ | |
|
68 | type Path = dojox.gfx.path.Path; | |
|
69 | const Path: dojox.gfx.path.PathConstructor; | |
|
70 | type TextPath = dojox.gfx.path.TextPath; | |
|
71 | const TextPath: dojox.gfx.path.TextPathConstructor; | |
|
72 | /* tslint:enable */ | |
|
73 | } |
@@ -0,0 +1,14 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | interface Registry { | |
|
4 | byId(id: string): dojox.gfx.shape.Shape; | |
|
5 | dispose(shape: dojox.gfx.shape.Shape, recurse?: boolean): void; | |
|
6 | register(shape: dojox.gfx.shape.Shape): string; | |
|
7 | } | |
|
8 | } | |
|
9 | } | |
|
10 | ||
|
11 | declare module 'dojox/gfx/registry' { | |
|
12 | const registry: dojox.gfx.Registry; | |
|
13 | export = registry; | |
|
14 | } |
@@ -0,0 +1,208 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace shape { | |
|
4 | type Clip = EllipseClip | PathClip | PolylineClip | RectangleClip; | |
|
5 | ||
|
6 | type EllipseClip = { | |
|
7 | cx: number; | |
|
8 | cy: number; | |
|
9 | rx: number; | |
|
10 | ry: number; | |
|
11 | }; | |
|
12 | ||
|
13 | type PathClip = { | |
|
14 | d: string; | |
|
15 | }; | |
|
16 | ||
|
17 | type PolylineClip = { | |
|
18 | points: Point[]; | |
|
19 | }; | |
|
20 | ||
|
21 | type RectangleClip = { | |
|
22 | height: number; | |
|
23 | width: number; | |
|
24 | x: number; | |
|
25 | y: number; | |
|
26 | }; | |
|
27 | ||
|
28 | interface Container { | |
|
29 | children: Shape[]; | |
|
30 | ||
|
31 | add(shape: Shape): this; | |
|
32 | clear(destroy?: boolean): this; | |
|
33 | closeBatch(): this; | |
|
34 | getBoundingBox(): SimpleRectangle; | |
|
35 | openBatch(): this; | |
|
36 | remove(shape: Shape, silently?: boolean): this; | |
|
37 | } | |
|
38 | ||
|
39 | interface Creator { | |
|
40 | createCircle(options: dojox.gfx.SimpleCircle): Circle; | |
|
41 | createEllipse(options: dojox.gfx.SimpleEllipse): Ellipse; | |
|
42 | createGroup(): Group; | |
|
43 | createImage(options: dojox.gfx.SimpleImage): Image; | |
|
44 | createLine(options: dojox.gfx.SimpleLine): Line; | |
|
45 | createObject(constructor: ShapeConstructor, simpleShape?: SimpleShape): Shape; | |
|
46 | createPath(options: string | dojox.gfx.SimplePath): dojox.gfx.path.Path; | |
|
47 | createPolyLine(options: dojox.gfx.SimplePolyline): PolyLine; | |
|
48 | createRect(options: dojox.gfx.SimpleRectangle): Rect; | |
|
49 | createShape(shape: Shape | dojox.gfx.SimpleShape): Shape; | |
|
50 | createText(options: dojox.gfx.SimpleText): Text; | |
|
51 | createTextPath(options: dojox.gfx.SimpleTextPath): dojox.gfx.path.TextPath; | |
|
52 | } | |
|
53 | ||
|
54 | interface EventsProcessing { | |
|
55 | connect(event: string, listener: dojo.EventListener): dojo.Handle; | |
|
56 | connect(event: string, context: Object, listener: string | dojo.EventListener): dojo.Handle; | |
|
57 | disconnect(handle: dojo.Handle): void; | |
|
58 | on(event: string, listener: dojo.EventListener): dojo.Handle; | |
|
59 | } | |
|
60 | ||
|
61 | interface Circle extends Shape {} | |
|
62 | interface CircleConstructor extends ShapeConstructor { | |
|
63 | new(): Circle; | |
|
64 | prototype: Circle; | |
|
65 | } | |
|
66 | interface Ellipse extends Shape {} | |
|
67 | interface EllipseConstructor extends ShapeConstructor { | |
|
68 | new(): Ellipse; | |
|
69 | prototype: Ellipse; | |
|
70 | } | |
|
71 | interface Image extends Shape {} | |
|
72 | interface ImageConstructor extends ShapeConstructor { | |
|
73 | new(): Image; | |
|
74 | prototype: Image; | |
|
75 | } | |
|
76 | interface Line extends Shape {} | |
|
77 | interface LineConstructor extends ShapeConstructor { | |
|
78 | new(): Line; | |
|
79 | prototype: Line; | |
|
80 | } | |
|
81 | interface PolyLine extends Shape {} | |
|
82 | interface PolyLineConstructor extends ShapeConstructor { | |
|
83 | new(): PolyLine; | |
|
84 | prototype: PolyLine; | |
|
85 | } | |
|
86 | interface Rect extends Shape {} | |
|
87 | interface RectConstructor extends ShapeConstructor { | |
|
88 | new(): Rect; | |
|
89 | prototype: Rect; | |
|
90 | } | |
|
91 | interface Text extends Shape {} | |
|
92 | interface TextConstructor extends ShapeConstructor { | |
|
93 | new(): Text; | |
|
94 | prototype: Text; | |
|
95 | } | |
|
96 | ||
|
97 | interface Shape extends EventsProcessing { | |
|
98 | bbox: SimpleRectangle; | |
|
99 | fillStyle: dojox.gfx.Fill; | |
|
100 | matrix: dojox.gfx.matrix.Matrix2D; | |
|
101 | parent: Surface; | |
|
102 | parentMatrix: dojox.gfx.matrix.Matrix2D; | |
|
103 | rawNode: Node; | |
|
104 | shape: dojox.gfx.SimpleShape; | |
|
105 | strokeStyle: Stroke; | |
|
106 | type: string; // TODO: enum | |
|
107 | ||
|
108 | applyLeftTransform(matrix: dojox.gfx.matrix.MatrixLike): this; | |
|
109 | applyRightTransform(matrix: dojox.gfx.matrix.MatrixLike): this; | |
|
110 | applyTransform(matrix: dojox.gfx.matrix.MatrixLike): this; | |
|
111 | destroy(): void; | |
|
112 | getBoundingBox(): SimpleRectangle; | |
|
113 | getClip(): dojox.gfx.shape.Clip; | |
|
114 | getEventSource(): Node; | |
|
115 | getFill(): Fill; | |
|
116 | getNode(): Node; | |
|
117 | getParent(): Surface; | |
|
118 | getShape(): dojox.gfx.SimpleShape; | |
|
119 | getStroke(): Stroke; | |
|
120 | getTransform(): dojox.gfx.matrix.Matrix2D; | |
|
121 | getTransformedBoundingBox(): [number, number, number, number]; | |
|
122 | getUid(): number; | |
|
123 | moveToBack(): this; | |
|
124 | moveToFront(): this; | |
|
125 | removeShape(silently?: boolean): this; | |
|
126 | setClip(clip: dojox.gfx.shape.Clip): void; | |
|
127 | setFill(fill: dojox.gfx.Fill): this; | |
|
128 | setShape(shape: dojox.gfx.SimpleShape): this; | |
|
129 | // for Path | |
|
130 | setShape(shape: string | dojox.gfx.path.Path): this; | |
|
131 | // for Polyline | |
|
132 | setShape(points: Point[] | { points: Point[] }, closed?: boolean): this; | |
|
133 | setStroke(stroke: Stroke): this; | |
|
134 | setTransform(matrix: dojox.gfx.matrix.Matrix2D): this; | |
|
135 | } | |
|
136 | ||
|
137 | interface ShapeConstructor extends dojo._base.DeclareConstructor<Shape> { | |
|
138 | nodeType: string; | |
|
139 | ||
|
140 | new(rawNode?: Node): Shape; | |
|
141 | prototype: Shape; | |
|
142 | } | |
|
143 | ||
|
144 | interface Surface extends Container, Creator, EventsProcessing { | |
|
145 | isLoaded: boolean; | |
|
146 | rawNode: Node; | |
|
147 | ||
|
148 | destroy(): void; | |
|
149 | getDimensions(): { height: number, width: number}; | |
|
150 | getEventSource(): Node; | |
|
151 | onLoad(surface: Surface): void; | |
|
152 | setDimensions(width: number | string, height: number | string): void; | |
|
153 | whenLoaded(callback: SurfaceCallback): void; | |
|
154 | whenLoaded(context: Object, callback: string | SurfaceCallback): void; | |
|
155 | } | |
|
156 | ||
|
157 | interface SurfaceCallback { | |
|
158 | (surface: Surface): any; | |
|
159 | } | |
|
160 | ||
|
161 | interface SurfaceConstructor extends dojo._base.DeclareConstructor<Surface> { | |
|
162 | new(): Surface; | |
|
163 | prototype: Surface; | |
|
164 | } | |
|
165 | } | |
|
166 | } | |
|
167 | } | |
|
168 | ||
|
169 | declare module 'dojox/gfx/shape' { | |
|
170 | /* tslint:disable:no-unused-variable */ | |
|
171 | type Circle = dojox.gfx.shape.Circle; | |
|
172 | const Circle: dojox.gfx.shape.CircleConstructor; | |
|
173 | type Clip = dojox.gfx.shape.Clip; | |
|
174 | const Container: dojox.gfx.shape.Container; | |
|
175 | const Creator: dojox.gfx.shape.Creator; | |
|
176 | type Ellipse = dojox.gfx.shape.Ellipse; | |
|
177 | const Ellipse: dojox.gfx.shape.EllipseConstructor; | |
|
178 | type EllipseClip = dojox.gfx.shape.EllipseClip; | |
|
179 | type Image = dojox.gfx.shape.Image; | |
|
180 | const Image: dojox.gfx.shape.ImageConstructor; | |
|
181 | type Line = dojox.gfx.shape.Line; | |
|
182 | const Line: dojox.gfx.shape.LineConstructor; | |
|
183 | type Path = dojox.gfx.path.Path; | |
|
184 | const Path: dojox.gfx.path.PathConstructor; | |
|
185 | type PathClip = dojox.gfx.shape.PathClip; | |
|
186 | type PolyLine = dojox.gfx.shape.PolyLine; | |
|
187 | const PolyLine: dojox.gfx.shape.PolyLineConstructor; | |
|
188 | type PolyLineClip = dojox.gfx.shape.PolylineClip; | |
|
189 | type Rect = dojox.gfx.shape.Rect; | |
|
190 | const Rect: dojox.gfx.shape.RectConstructor; | |
|
191 | type RectangleClip = dojox.gfx.shape.RectangleClip; | |
|
192 | type Shape = dojox.gfx.shape.Shape; | |
|
193 | const Shape: dojox.gfx.shape.ShapeConstructor; | |
|
194 | type Surface = dojox.gfx.shape.Surface; | |
|
195 | const Surface: dojox.gfx.shape.SurfaceConstructor; | |
|
196 | type Text = dojox.gfx.shape.Text; | |
|
197 | const Text: dojox.gfx.shape.TextConstructor; | |
|
198 | type TextPath = dojox.gfx.path.TextPath; | |
|
199 | const TextPath: dojox.gfx.path.TextPathConstructor; | |
|
200 | ||
|
201 | const fixCallback: ( | |
|
202 | element: dojox.gfx.GfxElement, | |
|
203 | fixFunction: Function, | |
|
204 | scope: Object, | |
|
205 | method: string | Function | |
|
206 | ) => dojox.gfx.FixTarget; | |
|
207 | /* tslint:enable */ | |
|
208 | } |
@@ -0,0 +1,42 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace gfx { | |
|
3 | namespace utils { | |
|
4 | interface ShapeDescriptor { | |
|
5 | children: dojox.gfx.shape.Shape[]; | |
|
6 | fill: dojox.gfx.Fill; | |
|
7 | font: dojox.gfx.Font; | |
|
8 | shape: dojox.gfx.shape.Shape; | |
|
9 | stroke: dojox.gfx.Stroke; | |
|
10 | transform: dojox.gfx.matrix.Matrix2D; | |
|
11 | } | |
|
12 | ||
|
13 | interface Utils { | |
|
14 | forEach( | |
|
15 | shape: dojox.gfx.shape.Shape | dojox.gfx.shape.Surface, | |
|
16 | callback: Function, context?: Object | |
|
17 | ): void; | |
|
18 | deserialize( | |
|
19 | parent: dojox.gfx.shape.Shape | dojox.gfx.shape.Surface, | |
|
20 | shape: ShapeDescriptor | |
|
21 | ): dojox.gfx.shape.Shape; | |
|
22 | deserialize( | |
|
23 | parent: dojox.gfx.shape.Shape | dojox.gfx.shape.Surface, | |
|
24 | shape: ShapeDescriptor[] | |
|
25 | ): dojox.gfx.shape.Shape[]; | |
|
26 | fromJson( | |
|
27 | parent: dojox.gfx.shape.Shape | dojox.gfx.shape.Surface, | |
|
28 | shape: string | |
|
29 | ): dojox.gfx.shape.Shape | dojox.gfx.shape.Shape[]; | |
|
30 | serialize(shape: dojox.gfx.shape.Shape): ShapeDescriptor; | |
|
31 | serialize(shape: dojox.gfx.shape.Surface): ShapeDescriptor[]; | |
|
32 | toJson(shape: dojox.gfx.shape.Shape | dojox.gfx.shape.Surface): string; | |
|
33 | toSvg(surface: dojox.gfx.shape.Surface): dojo.Deferred<string>; | |
|
34 | } | |
|
35 | } | |
|
36 | } | |
|
37 | } | |
|
38 | ||
|
39 | declare module 'dojox/gfx/utils' { | |
|
40 | const utils: dojox.gfx.utils.Utils; | |
|
41 | export = utils; | |
|
42 | } |
@@ -0,0 +1,1 | |||
|
1 | /// <reference path="html/metrics.d.ts" /> |
@@ -0,0 +1,30 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace html { | |
|
3 | namespace entities { | |
|
4 | ||
|
5 | type CharCodeAndEntityName = [string, string]; | |
|
6 | ||
|
7 | interface Entities { | |
|
8 | ||
|
9 | html: CharCodeAndEntityName[]; | |
|
10 | ||
|
11 | latin: CharCodeAndEntityName[]; | |
|
12 | ||
|
13 | /** | |
|
14 | * Function to obtain an entity encoding for a specified character | |
|
15 | */ | |
|
16 | decode(str: string, map?: CharCodeAndEntityName[]): string; | |
|
17 | ||
|
18 | /** | |
|
19 | * Function to obtain an entity encoding for a specified character | |
|
20 | */ | |
|
21 | encode(str: string, map?: CharCodeAndEntityName[]): string; | |
|
22 | } | |
|
23 | } | |
|
24 | } | |
|
25 | } | |
|
26 | ||
|
27 | declare module 'dojox/html/entities' { | |
|
28 | const entities: dojox.html.entities.Entities; | |
|
29 | export = entities; | |
|
30 | } |
@@ -0,0 +1,35 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace html { | |
|
3 | namespace metrics { | |
|
4 | interface FontMeasurements { | |
|
5 | '100%': number; | |
|
6 | '12pt': number; | |
|
7 | '16px': number; | |
|
8 | '1em': number; | |
|
9 | '1ex': number; | |
|
10 | large: number; | |
|
11 | medium: number; | |
|
12 | small: number; | |
|
13 | 'x-large': number; | |
|
14 | 'xx-large': number; | |
|
15 | 'x-small': number; | |
|
16 | 'xx-small': number; | |
|
17 | ||
|
18 | } | |
|
19 | ||
|
20 | interface Metrics { | |
|
21 | getCachedFontMeasurements(recalculate?: boolean): FontMeasurements; | |
|
22 | getFontMeasurements(): FontMeasurements; | |
|
23 | getScrollbar(): dojo.DomGeometryWidthHeight; | |
|
24 | getTextBox(text: string, style?: Object, className?: string): dojo.DomGeometryXYBox; | |
|
25 | initOnFontResize(): void; | |
|
26 | onFontResize(event: Event): void; | |
|
27 | } | |
|
28 | } | |
|
29 | } | |
|
30 | } | |
|
31 | ||
|
32 | declare module 'dojox/html/metrics' { | |
|
33 | const metrics: dojox.html.metrics.Metrics; | |
|
34 | export = metrics; | |
|
35 | } |
@@ -0,0 +1,10 | |||
|
1 | /// <reference path="../dojo/index.d.ts" /> | |
|
2 | /// <reference path="../dijit/index.d.ts" /> | |
|
3 | /// <reference path="color.d.ts" /> | |
|
4 | /// <reference path="dojox.d.ts" /> | |
|
5 | /// <reference path="gfx.d.ts" /> | |
|
6 | /// <reference path="html.d.ts" /> | |
|
7 | /// <reference path="layout.d.ts" /> | |
|
8 | /// <reference path="string.d.ts" /> | |
|
9 | /// <reference path="widget.d.ts" /> | |
|
10 | /// <reference path="xml.d.ts" /> |
@@ -0,0 +1,208 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace layout { | |
|
3 | ||
|
4 | /* dojox/layout/ContentPane */ | |
|
5 | ||
|
6 | interface ContentPane extends dijit.layout.ContentPane { | |
|
7 | /** | |
|
8 | * Adjust relative paths in html string content to point to this page. | |
|
9 | * Only useful if you grab content from another folder than the current one. | |
|
10 | */ | |
|
11 | adjustPaths: boolean; | |
|
12 | ||
|
13 | /** | |
|
14 | * Cleans content to make it less likely to generate DOM/JS errors. | |
|
15 | * Useful if you send ContentPane a complete page, instead of a html fragment. | |
|
16 | * Scans for: | |
|
17 | * | |
|
18 | * - title Node, remove | |
|
19 | * - DOCTYPE tag, remove | |
|
20 | */ | |
|
21 | cleanContent: boolean; | |
|
22 | ||
|
23 | /** | |
|
24 | * trigger/load styles in the content | |
|
25 | */ | |
|
26 | renderStyles: boolean; | |
|
27 | ||
|
28 | /** | |
|
29 | * Execute (eval) scripts that are found in the content. | |
|
30 | */ | |
|
31 | executeScripts: boolean; | |
|
32 | ||
|
33 | /*** | |
|
34 | * Replace keyword '_container_' in scripts with 'dijit.byId(this.id)'. | |
|
35 | * NOTE this name might change in the near future. | |
|
36 | */ | |
|
37 | scriptHasHooks: boolean; | |
|
38 | ||
|
39 | /** | |
|
40 | * Event callback, called on script error or on java handler error. | |
|
41 | * Qverride and return your own html string if you want text | |
|
42 | * displayed within the ContentPane. | |
|
43 | */ | |
|
44 | onExecError(evt: Event): void; | |
|
45 | } | |
|
46 | ||
|
47 | interface ContentPaneConstructor extends dijit._WidgetBaseConstructor<ContentPane> { } | |
|
48 | ||
|
49 | /* dojox/layout/GridContainerLite */ | |
|
50 | ||
|
51 | interface GridContainerLite extends dijit.layout._LayoutWidget, dijit._TemplatedMixin { | |
|
52 | /** | |
|
53 | * Enable the refresh of registered areas on drag start. | |
|
54 | */ | |
|
55 | autoRefresh: boolean; | |
|
56 | ||
|
57 | /** | |
|
58 | * CSS class enabling a drag handle on a child. | |
|
59 | */ | |
|
60 | dragHandleClass: string; | |
|
61 | ||
|
62 | /** | |
|
63 | * The number of dropped zones, by default 1. | |
|
64 | */ | |
|
65 | nbZones: number; | |
|
66 | ||
|
67 | /** | |
|
68 | * If true, change the size of my currently displayed child to match | |
|
69 | * my size. | |
|
70 | */ | |
|
71 | doLayout: boolean; | |
|
72 | ||
|
73 | /** | |
|
74 | * If true, widgets are organized automatically, | |
|
75 | * else the attribute 'column' of child will define the right column. | |
|
76 | */ | |
|
77 | isAutoOrganized: boolean; | |
|
78 | ||
|
79 | /** | |
|
80 | * The GridContainer will only accept the children that fit to the types. | |
|
81 | */ | |
|
82 | acceptTypes: any[]; | |
|
83 | ||
|
84 | /** | |
|
85 | * A comma separated list of column widths. If the column widths do | |
|
86 | * not add up to 100, the remaining columns split the rest of the | |
|
87 | * width evenly between them. | |
|
88 | */ | |
|
89 | colWidths: string; | |
|
90 | ||
|
91 | /** | |
|
92 | * Resize the GridContainerLite inner table and the dropped widget. | |
|
93 | */ | |
|
94 | resizeChildAfterDrop(node: HTMLElement, targetArea: Object, indexChild: number): boolean; | |
|
95 | ||
|
96 | /** | |
|
97 | * Resize the GridContainerLite inner table only if the drag source | |
|
98 | * is a child of this gridContainer. | |
|
99 | */ | |
|
100 | resizeChildAfterDragStart(node: HTMLElement, sourceArea: Object, indexChild: number): boolean; | |
|
101 | ||
|
102 | onShow(): void; | |
|
103 | onHide(): void; | |
|
104 | ||
|
105 | /** | |
|
106 | * Enable drag-and-drop for children of this GridContainer. | |
|
107 | */ | |
|
108 | enableDnd(): void; | |
|
109 | ||
|
110 | /** | |
|
111 | * Disable drag-and-drop for children of this GridContainer. | |
|
112 | */ | |
|
113 | disableDnd(): void; | |
|
114 | } | |
|
115 | ||
|
116 | interface GridContainerLiteConstructor extends dijit._WidgetBaseConstructor<GridContainerLite> { } | |
|
117 | ||
|
118 | /* dojox/layout/GridContainer */ | |
|
119 | ||
|
120 | interface GridContainer extends GridContainerLite { | |
|
121 | /** | |
|
122 | * Allow or not resizing of columns by a grip handle. | |
|
123 | */ | |
|
124 | hasResizableColumns: boolean; | |
|
125 | ||
|
126 | /** | |
|
127 | * Specifies whether columns resize as you drag (true) or only upon mouseup (false). | |
|
128 | */ | |
|
129 | liveResizeColumns: boolean; | |
|
130 | ||
|
131 | /** | |
|
132 | * Minimum column width in percentage. | |
|
133 | */ | |
|
134 | minColWidth: number; | |
|
135 | ||
|
136 | /** | |
|
137 | * Minimum children width in pixel (only used for IE6 which doesn't | |
|
138 | * handle min-width css property). | |
|
139 | */ | |
|
140 | minChildWidth: number; | |
|
141 | ||
|
142 | /** | |
|
143 | * Location to add/remove columns, must be set to 'left' or 'right' (default). | |
|
144 | */ | |
|
145 | mode: string; | |
|
146 | // mode: 'left' | 'right'; | |
|
147 | ||
|
148 | /** | |
|
149 | * Define if the last right column is fixed. | |
|
150 | * Used when you add or remove columns by calling setColumns method. | |
|
151 | */ | |
|
152 | isRightFixed: boolean; | |
|
153 | ||
|
154 | /** | |
|
155 | * Define if the last left column is fixed. | |
|
156 | * Used when you add or remove columns by calling setColumns method. | |
|
157 | */ | |
|
158 | isLeftFixed: boolean; | |
|
159 | ||
|
160 | /** | |
|
161 | * Set the number of columns. | |
|
162 | */ | |
|
163 | setColumns(nbColumns: number): void; | |
|
164 | } | |
|
165 | ||
|
166 | interface GridContainerConstructor extends dijit._WidgetBaseConstructor<GridContainer> { } | |
|
167 | ||
|
168 | /* dojox/layout/TableContainer */ | |
|
169 | ||
|
170 | interface TableContainer extends dijit.layout._LayoutWidget { | |
|
171 | ||
|
172 | cols: number; | |
|
173 | ||
|
174 | /** | |
|
175 | * Defines the width of a label. If the value is a number, it is | |
|
176 | * treated as a pixel value. The other valid value is a percentage, | |
|
177 | * e.g. "50%". | |
|
178 | */ | |
|
179 | labelWidth: string | number; | |
|
180 | ||
|
181 | /** | |
|
182 | * True if labels should be displayed, false otherwise. | |
|
183 | */ | |
|
184 | showLabels: boolean; | |
|
185 | ||
|
186 | /** | |
|
187 | * Either "horiz" or "vert" for label orientation. | |
|
188 | */ | |
|
189 | orientation: string; | |
|
190 | // orientation: 'horiz' | 'vert'; | |
|
191 | ||
|
192 | /** | |
|
193 | * The cell spacing to apply to the table. | |
|
194 | */ | |
|
195 | spacing: number; | |
|
196 | ||
|
197 | /** | |
|
198 | * A CSS class that will be applied to child elements. For example, if | |
|
199 | * the class is "myClass", the table will have "myClass-table" applied to it, | |
|
200 | * each label TD will have "myClass-labelCell" applied, and each | |
|
201 | * widget TD will have "myClass-valueCell" applied. | |
|
202 | */ | |
|
203 | customClass: string; | |
|
204 | } | |
|
205 | ||
|
206 | interface TableContainerConstructor extends dijit._WidgetBaseConstructor<TableContainer> { } | |
|
207 | } | |
|
208 | } |
@@ -0,0 +1,55 | |||
|
1 | /// <reference path="index.d.ts" /> | |
|
2 | ||
|
3 | declare module 'dojox/layout/ContentPane' { | |
|
4 | type ContentPane = dojox.layout.ContentPane; | |
|
5 | const ContentPane: dojox.layout.ContentPaneConstructor; | |
|
6 | export = ContentPane; | |
|
7 | } | |
|
8 | ||
|
9 | declare module 'dojox/layout/GridContainer' { | |
|
10 | type GridContainer = dojox.layout.GridContainer; | |
|
11 | const GridContainer: dojox.layout.GridContainerConstructor; | |
|
12 | export = GridContainer; | |
|
13 | } | |
|
14 | ||
|
15 | declare module 'dojox/layout/GridContainerLite' { | |
|
16 | type GridContainerLite = dojox.layout.GridContainerLite; | |
|
17 | const GridContainerLite: dojox.layout.GridContainerLiteConstructor; | |
|
18 | export = GridContainerLite; | |
|
19 | } | |
|
20 | ||
|
21 | declare module 'dojox/layout/TableContainer' { | |
|
22 | type TableContainer = dojox.layout.TableContainer; | |
|
23 | const TableContainer: dojox.layout.TableContainerConstructor; | |
|
24 | export = TableContainer; | |
|
25 | } | |
|
26 | ||
|
27 | declare module 'dojox/string/BidiEngine' { | |
|
28 | type BidiEngine = dojox.string.BidiEngine; | |
|
29 | const BidiEngine: dojox.string.BidiEngineConstructor; | |
|
30 | export = BidiEngine; | |
|
31 | } | |
|
32 | ||
|
33 | declare module 'dojox/widget/DialogSimple' { | |
|
34 | type DialogSimple = dojox.widget.DialogSimple; | |
|
35 | const DialogSimple: dojox.widget.DialogSimpleConstructor; | |
|
36 | export = DialogSimple; | |
|
37 | } | |
|
38 | ||
|
39 | declare module 'dojox/widget/Dialog' { | |
|
40 | type Dialog = dojox.widget.Dialog; | |
|
41 | const Dialog: dojox.widget.DialogConstructor; | |
|
42 | export = Dialog; | |
|
43 | } | |
|
44 | ||
|
45 | declare module 'dojox/widget/Toaster' { | |
|
46 | type Toaster = dojox.widget.Toaster; | |
|
47 | const Toaster: dojox.widget.ToasterConstructor; | |
|
48 | export = Toaster; | |
|
49 | } | |
|
50 | ||
|
51 | declare module 'dojox/widget/Standby' { | |
|
52 | type Standby = dojox.widget.Standby; | |
|
53 | const Standby: dojox.widget.StandbyConstructor; | |
|
54 | export = Standby; | |
|
55 | } |
@@ -0,0 +1,30 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace string { | |
|
3 | ||
|
4 | /* dojox/string/BidiEngine */ | |
|
5 | ||
|
6 | interface BidiEngine { | |
|
7 | /** | |
|
8 | * Central public API for Bidi engine. Transforms the text according to | |
|
9 | * formatIn, formatOut parameters. If formatIn or formatOut parametrs are | |
|
10 | * not valid throws an exception. | |
|
11 | */ | |
|
12 | bidiTransform(text: string, formatIn: string, formatOut: string): string; | |
|
13 | ||
|
14 | /** | |
|
15 | * Determine the base direction of a bidi text according to its first strong | |
|
16 | * directional character. | |
|
17 | */ | |
|
18 | checkContextual(text: string): string; | |
|
19 | ||
|
20 | /** | |
|
21 | * Return true if text contains RTL directed character. | |
|
22 | */ | |
|
23 | hasBidiChar(text: string): boolean; | |
|
24 | } | |
|
25 | ||
|
26 | interface BidiEngineConstructor { | |
|
27 | new (): BidiEngine; | |
|
28 | } | |
|
29 | } | |
|
30 | } |
@@ -0,0 +1,215 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace widget { | |
|
3 | ||
|
4 | /* dojox/widget/DialogSimple */ | |
|
5 | ||
|
6 | interface DialogSimple extends dijit.layout.ContentPane, dijit._DialogMixin { | |
|
7 | // summary: | |
|
8 | // A Simple Dialog Mixing the `dojox.layout.ContentPane` functionality over | |
|
9 | // top of a vanilla `dijit.Dialog`. See `dojox.widget.Dialog` for a more flexible | |
|
10 | // dialog option allowing animations and different styles/theme support. | |
|
11 | } | |
|
12 | ||
|
13 | interface DialogSimpleConstructor extends dijit._WidgetBaseConstructor<DialogSimple> { } | |
|
14 | ||
|
15 | /* dojox/widget/Dialog */ | |
|
16 | ||
|
17 | interface Dialog extends DialogSimple { | |
|
18 | // sizeToViewport: Boolean | |
|
19 | // If true, fix the size of the dialog to the Viewport based on | |
|
20 | // viewportPadding value rather than the calculated or natural | |
|
21 | // style. If false, base the size on a passed dimension attribute. | |
|
22 | // Either way, the viewportPadding value is used if the the content | |
|
23 | // extends beyond the viewport size for whatever reason. | |
|
24 | sizeToViewport: boolean; | |
|
25 | ||
|
26 | // viewportPadding: Integer | |
|
27 | // If sizeToViewport="true", this is the amount of padding in pixels to leave | |
|
28 | // between the dialog border and the viewport edge. | |
|
29 | // This value is also used when sizeToViewport="false" and dimensions exceeded | |
|
30 | // by dialog content to ensure dialog does not go outside viewport boundary | |
|
31 | viewportPadding: number; | |
|
32 | ||
|
33 | // dimensions: Array | |
|
34 | // A two-element array of [width,height] to animate the Dialog to if sizeToViewport="false" | |
|
35 | // Defaults to [300,300] | |
|
36 | dimensions: number[]; | |
|
37 | ||
|
38 | // easing: Function?|String? | |
|
39 | // An easing function to apply to the sizing animation. | |
|
40 | easing: Function | string; | |
|
41 | ||
|
42 | // sizeDuration: Integer | |
|
43 | // Time (in ms) to use in the Animation for sizing. | |
|
44 | sizeDuration: number; | |
|
45 | ||
|
46 | // sizeMethod: String | |
|
47 | // To be passed to dojox.fx.sizeTo, one of "chain" or "combine" to effect | |
|
48 | // the animation sequence. | |
|
49 | sizeMethod: string; | |
|
50 | ||
|
51 | // showTitle: Boolean | |
|
52 | // Toogle to show or hide the Title area. Can only be set at startup. | |
|
53 | showTitle: boolean; | |
|
54 | ||
|
55 | // draggable: Boolean | |
|
56 | // Make the pane draggable. Differs from dijit.Dialog by setting default to false | |
|
57 | draggable: boolean; | |
|
58 | ||
|
59 | // modal: Boolean | |
|
60 | // If true, this Dialog instance will be truly modal and prevent closing until | |
|
61 | // explicitly told to by calling hide() - Defaults to false to preserve previous | |
|
62 | // behaviors. | |
|
63 | modal: boolean; | |
|
64 | } | |
|
65 | ||
|
66 | interface DialogConstructor extends dijit._WidgetBaseConstructor<Dialog> { } | |
|
67 | ||
|
68 | /* dojox/widget/Toaster */ | |
|
69 | ||
|
70 | interface ToasterMessageTypes { | |
|
71 | MESSAGE: string; | |
|
72 | WARNING: string; | |
|
73 | ERROR: string; | |
|
74 | FATAL: string; | |
|
75 | } | |
|
76 | ||
|
77 | interface Toaster extends dijit._WidgetBase, dijit._TemplatedMixin { | |
|
78 | // messageTopic: String | |
|
79 | // Name of topic; anything published to this topic will be displayed as a message. | |
|
80 | // Message format is either String or an object like | |
|
81 | // {message: "hello word", type: "error", duration: 500} | |
|
82 | messageTopic: string; | |
|
83 | ||
|
84 | // messageTypes: Enumeration | |
|
85 | // Possible message types. | |
|
86 | messageTypes: ToasterMessageTypes; | |
|
87 | ||
|
88 | // defaultType: String | |
|
89 | // If message type isn't specified (see "messageTopic" parameter), | |
|
90 | // then display message as this type. | |
|
91 | // Possible values in messageTypes enumeration ("message", "warning", "error", "fatal") | |
|
92 | defaultType: string; | |
|
93 | ||
|
94 | // positionDirection: String | |
|
95 | // Position from which message slides into screen, one of | |
|
96 | // ["br-up", "br-left", "bl-up", "bl-right", "tr-down", "tr-left", "tl-down", "tl-right"] | |
|
97 | positionDirection: string; | |
|
98 | ||
|
99 | // positionDirectionTypes: Array | |
|
100 | // Possible values for positionDirection parameter | |
|
101 | positionDirectionTypes: string[]; | |
|
102 | ||
|
103 | // duration: Integer | |
|
104 | // Number of milliseconds to show message | |
|
105 | duration: number; | |
|
106 | ||
|
107 | // slideDuration: Integer | |
|
108 | // Number of milliseconds for the slide animation, increasing will cause the Toaster | |
|
109 | // to slide in more slowly. | |
|
110 | slideDuration: number; | |
|
111 | ||
|
112 | // separator: String | |
|
113 | // String used to separate messages if consecutive calls are made to setContent before previous messages go away | |
|
114 | separator: string; | |
|
115 | ||
|
116 | setContent(message: string | Function, messageType: string, duration?: number): void; | |
|
117 | onSelect(e: Event): void; | |
|
118 | hide(): void; | |
|
119 | show(): void; | |
|
120 | } | |
|
121 | ||
|
122 | interface ToasterConstructor extends dijit._WidgetBaseConstructor<Toaster> {} | |
|
123 | ||
|
124 | interface Standby extends dijit._Widget, dijit._TemplatedMixin { | |
|
125 | ||
|
126 | /** | |
|
127 | * Property to define if the image and its alt text should be used, or a simple Text/HTML noe should be used. | |
|
128 | */ | |
|
129 | centerIndicator: string; | |
|
130 | ||
|
131 | /** | |
|
132 | * The color to set the overlay. | |
|
133 | */ | |
|
134 | color: string; | |
|
135 | ||
|
136 | /** | |
|
137 | * Integer defining how long the show and hide effects should take in milliseconds. | |
|
138 | */ | |
|
139 | duration: number; | |
|
140 | ||
|
141 | /** | |
|
142 | * A URL to an image to center within the blocking overlay. | |
|
143 | */ | |
|
144 | image: string; | |
|
145 | ||
|
146 | /** | |
|
147 | * Text to set on the ALT tag of the image. | |
|
148 | */ | |
|
149 | imageText: string; | |
|
150 | ||
|
151 | /** | |
|
152 | * The opacity to make the overlay when it is displayed/faded in. | |
|
153 | */ | |
|
154 | opacity: number; | |
|
155 | ||
|
156 | /** | |
|
157 | * The target to overlay when active. | |
|
158 | */ | |
|
159 | target: string; | |
|
160 | ||
|
161 | /** | |
|
162 | * The template string defining out the basics of the widget. | |
|
163 | */ | |
|
164 | templateString: string; | |
|
165 | ||
|
166 | /** | |
|
167 | * Text/HTML to display in the center of the overlay This is used if image center is disabled. | |
|
168 | */ | |
|
169 | text: string; | |
|
170 | ||
|
171 | /** | |
|
172 | * Control that lets you specify if the zIndex for the overlay shold be auto-computed based off parent zIndex, or should be set to a particular value. | |
|
173 | */ | |
|
174 | zIndex: string; | |
|
175 | ||
|
176 | /** | |
|
177 | * Function to hide the blocking overlay and status icon or text. | |
|
178 | */ | |
|
179 | hide(): void; | |
|
180 | ||
|
181 | /** | |
|
182 | * Helper function so you can test if the widget is already visible or not. | |
|
183 | */ | |
|
184 | isVisible(): boolean; | |
|
185 | ||
|
186 | /** | |
|
187 | * Function to display the blocking overlay and busy/status icon or text. | |
|
188 | */ | |
|
189 | show(): void; | |
|
190 | ||
|
191 | /** | |
|
192 | * Over-ride of the basic widget startup function. | |
|
193 | * @param args | |
|
194 | */ | |
|
195 | startup(): void; | |
|
196 | ||
|
197 | /** | |
|
198 | * Over-ride to hide the widget, which clears intervals, before cleanup. | |
|
199 | */ | |
|
200 | uninitialize(): boolean; | |
|
201 | ||
|
202 | /** | |
|
203 | * Event that fires when the display of the Standby completes. | |
|
204 | */ | |
|
205 | onHide(): void; | |
|
206 | ||
|
207 | /** | |
|
208 | * Event that fires when the display of the Standby completes. | |
|
209 | */ | |
|
210 | onShow(): void; | |
|
211 | } | |
|
212 | ||
|
213 | interface StandbyConstructor extends dijit._WidgetBaseConstructor<Standby> { } | |
|
214 | } | |
|
215 | } |
@@ -0,0 +1,1 | |||
|
1 | /// <reference path="xml/DomParser.d.ts" /> |
@@ -0,0 +1,12 | |||
|
1 | declare namespace dojox { | |
|
2 | namespace xml { | |
|
3 | interface DomParser { | |
|
4 | parse: (xml: string) => Document; | |
|
5 | } | |
|
6 | } | |
|
7 | } | |
|
8 | ||
|
9 | declare module 'dojox/xml/DomParser' { | |
|
10 | const domParser: dojox.xml.DomParser; | |
|
11 | export = domParser; | |
|
12 | } |
@@ -0,0 +1,21 | |||
|
1 | import Stateful = require("dojo/Stateful"); | |
|
2 | ||
|
3 | interface ScheduleAttrs { | |
|
4 | title: string; | |
|
5 | ||
|
6 | duration: number; | |
|
7 | ||
|
8 | } | |
|
9 | ||
|
10 | declare class Schedule extends Stateful<ScheduleAttrs> { | |
|
11 | title: string; | |
|
12 | ||
|
13 | ||
|
14 | } | |
|
15 | ||
|
16 | const model = new Schedule({duration: 10, title: "Test event"}); | |
|
17 | ||
|
18 | model.get("title"); | |
|
19 | model.get("duration"); | |
|
20 | ||
|
21 | model.set("duration", 12); No newline at end of file |
@@ -0,0 +1,21 | |||
|
1 | import Observable = require("dojo/store/Observable"); | |
|
2 | ||
|
3 | interface Schedule { | |
|
4 | ||
|
5 | id: string; | |
|
6 | ||
|
7 | title: string; | |
|
8 | ||
|
9 | duration: number; | |
|
10 | } | |
|
11 | ||
|
12 | declare const store: dojo.store.api.Store<Schedule>; | |
|
13 | ||
|
14 | const observable = new Observable(store); | |
|
15 | ||
|
16 | (async () => { | |
|
17 | observable.query().observe(() => {}); | |
|
18 | store.query().forEach(() => {}); | |
|
19 | const total = await store.query().total; | |
|
20 | const result = await store.query(); | |
|
21 | })(); No newline at end of file |
|
1 | NO CONTENT: new file 100644 |
@@ -0,0 +1,22 | |||
|
1 | { | |
|
2 | "extends": "../tsconfig", | |
|
3 | "compilerOptions": { | |
|
4 | "baseUrl": ".", | |
|
5 | "rootDir": "ts", | |
|
6 | "rootDirs": [ | |
|
7 | "ts", | |
|
8 | "../main/ts" | |
|
9 | ], | |
|
10 | "types": [ | |
|
11 | "requirejs", | |
|
12 | "../main/typings/dojo/modules", | |
|
13 | "../main/typings/dijit/modules" | |
|
14 | ], | |
|
15 | "module": "amd" | |
|
16 | }, | |
|
17 | "include": [ | |
|
18 | "typings/**/*.ts", | |
|
19 | "ts/**/*.ts", | |
|
20 | "ts/**/*.tsx" | |
|
21 | ] | |
|
22 | } No newline at end of file |
@@ -0,0 +1,17 | |||
|
1 | { | |
|
2 | "compilerOptions": { | |
|
3 | "moduleResolution": "node", | |
|
4 | "noEmitOnError": true, | |
|
5 | //"listFiles": true, | |
|
6 | "types": [], | |
|
7 | "module": "amd", | |
|
8 | "lib": [ | |
|
9 | "es5", | |
|
10 | "es2015.promise", | |
|
11 | "es2015.symbol", | |
|
12 | "es2015.iterable", | |
|
13 | "dom", | |
|
14 | "scripthost" | |
|
15 | ] | |
|
16 | } | |
|
17 | } No newline at end of file |
@@ -0,0 +1,48 | |||
|
1 | { | |
|
2 | "extends": "tslint:recommended", | |
|
3 | "defaultSeverity": "warn", | |
|
4 | "rules": { | |
|
5 | "align": [ | |
|
6 | true, | |
|
7 | "parameters", | |
|
8 | "statements" | |
|
9 | ], | |
|
10 | "interface-name": [ | |
|
11 | false | |
|
12 | ], | |
|
13 | "max-line-length": [ | |
|
14 | true, | |
|
15 | 185 | |
|
16 | ], | |
|
17 | "quotemark": [true, "double", "avoid-escape"], | |
|
18 | "member-access": false, | |
|
19 | "semicolon": [true, "always", "ignore-bound-class-methods"], | |
|
20 | "no-bitwise": false, | |
|
21 | "no-empty": false, | |
|
22 | "no-namespace": false, | |
|
23 | "ordered-imports": false, | |
|
24 | "no-return-await": true, | |
|
25 | "no-floating-promises": true, | |
|
26 | "one-line": [ | |
|
27 | true, | |
|
28 | "check-open-brace", | |
|
29 | "check-catch", | |
|
30 | "check-whitespace" | |
|
31 | ], | |
|
32 | "object-literal-sort-keys": false, | |
|
33 | "trailing-comma": [ | |
|
34 | true, | |
|
35 | { | |
|
36 | "singleline": "never", | |
|
37 | "multiline": "never" | |
|
38 | } | |
|
39 | ], | |
|
40 | "variable-name": false, | |
|
41 | "curly": false, | |
|
42 | "array-type": false, | |
|
43 | "arrow-parens": [ | |
|
44 | true, | |
|
45 | "ban-single-arg-parens" | |
|
46 | ] | |
|
47 | } | |
|
48 | } No newline at end of file |
@@ -0,0 +1,1 | |||
|
1 | npmScope=implab No newline at end of file |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -0,0 +1,5 | |||
|
1 | distributionBase=GRADLE_USER_HOME | |
|
2 | distributionPath=wrapper/dists | |
|
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | |
|
4 | zipStoreBase=GRADLE_USER_HOME | |
|
5 | zipStorePath=wrapper/dists |
@@ -0,0 +1,185 | |||
|
1 | #!/usr/bin/env sh | |
|
2 | ||
|
3 | # | |
|
4 | # Copyright 2015 the original author or authors. | |
|
5 | # | |
|
6 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
|
7 | # you may not use this file except in compliance with the License. | |
|
8 | # You may obtain a copy of the License at | |
|
9 | # | |
|
10 | # https://www.apache.org/licenses/LICENSE-2.0 | |
|
11 | # | |
|
12 | # Unless required by applicable law or agreed to in writing, software | |
|
13 | # distributed under the License is distributed on an "AS IS" BASIS, | |
|
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
|
15 | # See the License for the specific language governing permissions and | |
|
16 | # limitations under the License. | |
|
17 | # | |
|
18 | ||
|
19 | ############################################################################## | |
|
20 | ## | |
|
21 | ## Gradle start up script for UN*X | |
|
22 | ## | |
|
23 | ############################################################################## | |
|
24 | ||
|
25 | # Attempt to set APP_HOME | |
|
26 | # Resolve links: $0 may be a link | |
|
27 | PRG="$0" | |
|
28 | # Need this for relative symlinks. | |
|
29 | while [ -h "$PRG" ] ; do | |
|
30 | ls=`ls -ld "$PRG"` | |
|
31 | link=`expr "$ls" : '.*-> \(.*\)$'` | |
|
32 | if expr "$link" : '/.*' > /dev/null; then | |
|
33 | PRG="$link" | |
|
34 | else | |
|
35 | PRG=`dirname "$PRG"`"/$link" | |
|
36 | fi | |
|
37 | done | |
|
38 | SAVED="`pwd`" | |
|
39 | cd "`dirname \"$PRG\"`/" >/dev/null | |
|
40 | APP_HOME="`pwd -P`" | |
|
41 | cd "$SAVED" >/dev/null | |
|
42 | ||
|
43 | APP_NAME="Gradle" | |
|
44 | APP_BASE_NAME=`basename "$0"` | |
|
45 | ||
|
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | |
|
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' | |
|
48 | ||
|
49 | # Use the maximum available, or set MAX_FD != -1 to use that value. | |
|
50 | MAX_FD="maximum" | |
|
51 | ||
|
52 | warn () { | |
|
53 | echo "$*" | |
|
54 | } | |
|
55 | ||
|
56 | die () { | |
|
57 | echo | |
|
58 | echo "$*" | |
|
59 | echo | |
|
60 | exit 1 | |
|
61 | } | |
|
62 | ||
|
63 | # OS specific support (must be 'true' or 'false'). | |
|
64 | cygwin=false | |
|
65 | msys=false | |
|
66 | darwin=false | |
|
67 | nonstop=false | |
|
68 | case "`uname`" in | |
|
69 | CYGWIN* ) | |
|
70 | cygwin=true | |
|
71 | ;; | |
|
72 | Darwin* ) | |
|
73 | darwin=true | |
|
74 | ;; | |
|
75 | MINGW* ) | |
|
76 | msys=true | |
|
77 | ;; | |
|
78 | NONSTOP* ) | |
|
79 | nonstop=true | |
|
80 | ;; | |
|
81 | esac | |
|
82 | ||
|
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | |
|
84 | ||
|
85 | ||
|
86 | # Determine the Java command to use to start the JVM. | |
|
87 | if [ -n "$JAVA_HOME" ] ; then | |
|
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then | |
|
89 | # IBM's JDK on AIX uses strange locations for the executables | |
|
90 | JAVACMD="$JAVA_HOME/jre/sh/java" | |
|
91 | else | |
|
92 | JAVACMD="$JAVA_HOME/bin/java" | |
|
93 | fi | |
|
94 | if [ ! -x "$JAVACMD" ] ; then | |
|
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME | |
|
96 | ||
|
97 | Please set the JAVA_HOME variable in your environment to match the | |
|
98 | location of your Java installation." | |
|
99 | fi | |
|
100 | else | |
|
101 | JAVACMD="java" | |
|
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | |
|
103 | ||
|
104 | Please set the JAVA_HOME variable in your environment to match the | |
|
105 | location of your Java installation." | |
|
106 | fi | |
|
107 | ||
|
108 | # Increase the maximum file descriptors if we can. | |
|
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then | |
|
110 | MAX_FD_LIMIT=`ulimit -H -n` | |
|
111 | if [ $? -eq 0 ] ; then | |
|
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then | |
|
113 | MAX_FD="$MAX_FD_LIMIT" | |
|
114 | fi | |
|
115 | ulimit -n $MAX_FD | |
|
116 | if [ $? -ne 0 ] ; then | |
|
117 | warn "Could not set maximum file descriptor limit: $MAX_FD" | |
|
118 | fi | |
|
119 | else | |
|
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" | |
|
121 | fi | |
|
122 | fi | |
|
123 | ||
|
124 | # For Darwin, add options to specify how the application appears in the dock | |
|
125 | if $darwin; then | |
|
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" | |
|
127 | fi | |
|
128 | ||
|
129 | # For Cygwin or MSYS, switch paths to Windows format before running java | |
|
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then | |
|
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` | |
|
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` | |
|
133 | ||
|
134 | JAVACMD=`cygpath --unix "$JAVACMD"` | |
|
135 | ||
|
136 | # We build the pattern for arguments to be converted via cygpath | |
|
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` | |
|
138 | SEP="" | |
|
139 | for dir in $ROOTDIRSRAW ; do | |
|
140 | ROOTDIRS="$ROOTDIRS$SEP$dir" | |
|
141 | SEP="|" | |
|
142 | done | |
|
143 | OURCYGPATTERN="(^($ROOTDIRS))" | |
|
144 | # Add a user-defined pattern to the cygpath arguments | |
|
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then | |
|
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" | |
|
147 | fi | |
|
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh | |
|
149 | i=0 | |
|
150 | for arg in "$@" ; do | |
|
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` | |
|
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option | |
|
153 | ||
|
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition | |
|
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` | |
|
156 | else | |
|
157 | eval `echo args$i`="\"$arg\"" | |
|
158 | fi | |
|
159 | i=`expr $i + 1` | |
|
160 | done | |
|
161 | case $i in | |
|
162 | 0) set -- ;; | |
|
163 | 1) set -- "$args0" ;; | |
|
164 | 2) set -- "$args0" "$args1" ;; | |
|
165 | 3) set -- "$args0" "$args1" "$args2" ;; | |
|
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; | |
|
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; | |
|
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; | |
|
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; | |
|
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; | |
|
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; | |
|
172 | esac | |
|
173 | fi | |
|
174 | ||
|
175 | # Escape application args | |
|
176 | save () { | |
|
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done | |
|
178 | echo " " | |
|
179 | } | |
|
180 | APP_ARGS=`save "$@"` | |
|
181 | ||
|
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules | |
|
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" | |
|
184 | ||
|
185 | exec "$JAVACMD" "$@" |
@@ -0,0 +1,89 | |||
|
1 | @rem | |
|
2 | @rem Copyright 2015 the original author or authors. | |
|
3 | @rem | |
|
4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); | |
|
5 | @rem you may not use this file except in compliance with the License. | |
|
6 | @rem You may obtain a copy of the License at | |
|
7 | @rem | |
|
8 | @rem https://www.apache.org/licenses/LICENSE-2.0 | |
|
9 | @rem | |
|
10 | @rem Unless required by applicable law or agreed to in writing, software | |
|
11 | @rem distributed under the License is distributed on an "AS IS" BASIS, | |
|
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
|
13 | @rem See the License for the specific language governing permissions and | |
|
14 | @rem limitations under the License. | |
|
15 | @rem | |
|
16 | ||
|
17 | @if "%DEBUG%" == "" @echo off | |
|
18 | @rem ########################################################################## | |
|
19 | @rem | |
|
20 | @rem Gradle startup script for Windows | |
|
21 | @rem | |
|
22 | @rem ########################################################################## | |
|
23 | ||
|
24 | @rem Set local scope for the variables with windows NT shell | |
|
25 | if "%OS%"=="Windows_NT" setlocal | |
|
26 | ||
|
27 | set DIRNAME=%~dp0 | |
|
28 | if "%DIRNAME%" == "" set DIRNAME=. | |
|
29 | set APP_BASE_NAME=%~n0 | |
|
30 | set APP_HOME=%DIRNAME% | |
|
31 | ||
|
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. | |
|
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi | |
|
34 | ||
|
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | |
|
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" | |
|
37 | ||
|
38 | @rem Find java.exe | |
|
39 | if defined JAVA_HOME goto findJavaFromJavaHome | |
|
40 | ||
|
41 | set JAVA_EXE=java.exe | |
|
42 | %JAVA_EXE% -version >NUL 2>&1 | |
|
43 | if "%ERRORLEVEL%" == "0" goto execute | |
|
44 | ||
|
45 | echo. | |
|
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | |
|
47 | echo. | |
|
48 | echo Please set the JAVA_HOME variable in your environment to match the | |
|
49 | echo location of your Java installation. | |
|
50 | ||
|
51 | goto fail | |
|
52 | ||
|
53 | :findJavaFromJavaHome | |
|
54 | set JAVA_HOME=%JAVA_HOME:"=% | |
|
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe | |
|
56 | ||
|
57 | if exist "%JAVA_EXE%" goto execute | |
|
58 | ||
|
59 | echo. | |
|
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | |
|
61 | echo. | |
|
62 | echo Please set the JAVA_HOME variable in your environment to match the | |
|
63 | echo location of your Java installation. | |
|
64 | ||
|
65 | goto fail | |
|
66 | ||
|
67 | :execute | |
|
68 | @rem Setup the command line | |
|
69 | ||
|
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | |
|
71 | ||
|
72 | ||
|
73 | @rem Execute Gradle | |
|
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* | |
|
75 | ||
|
76 | :end | |
|
77 | @rem End local scope for the variables with windows NT shell | |
|
78 | if "%ERRORLEVEL%"=="0" goto mainEnd | |
|
79 | ||
|
80 | :fail | |
|
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | |
|
82 | rem the _cmd.exe /c_ return code! | |
|
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | |
|
84 | exit /b 1 | |
|
85 | ||
|
86 | :mainEnd | |
|
87 | if "%OS%"=="Windows_NT" endlocal | |
|
88 | ||
|
89 | :omega |
@@ -0,0 +1,18 | |||
|
1 | /* | |
|
2 | * This settings file was generated by the Gradle 'init' task. | |
|
3 | * | |
|
4 | * The settings file is used to specify which projects to include in your build. | |
|
5 | * In a single project build this file can be empty or even removed. | |
|
6 | * | |
|
7 | * Detailed information about configuring a multi-project build in Gradle can be found | |
|
8 | * in the user guide at https://docs.gradle.org/3.5/userguide/multi_project_builds.html | |
|
9 | */ | |
|
10 | ||
|
11 | // To declare projects as part of a multi-project build use the 'include' method | |
|
12 | ||
|
13 | // legacy build system | |
|
14 | // include 'profiles' | |
|
15 | ||
|
16 | include 'dojo-typings' | |
|
17 | ||
|
18 | rootProject.name = 'implabjs-dojo-typings' No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now