This diff has been collapsed as it changes many lines, (4671 lines changed)
Show them
Hide them
|
|
@@
-3,2301
+3,2378
|
|
3
|
3
|
/// <reference path="layout.d.ts" />
|
|
4
|
4
|
|
|
5
|
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 & _WidgetBase>, 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> { }
|
|
|
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
|
interface _WidgetBase {
|
|
|
553
|
/**
|
|
|
554
|
* Used across all instances a hash to cache attribute names and their getter
|
|
|
555
|
* and setter names.
|
|
|
556
|
*/
|
|
|
557
|
_attrPairNames: { [attr: string]: string };
|
|
|
558
|
|
|
|
559
|
/**
|
|
|
560
|
* Helper function for get() and set().
|
|
|
561
|
* Caches attribute name values so we don't do the string ops every time.
|
|
|
562
|
*/
|
|
|
563
|
_getAttrNames(name: string): string;
|
|
|
564
|
|
|
|
565
|
/**
|
|
|
566
|
* Internal helper for directly changing an attribute value.
|
|
|
567
|
* This method id derived from Stateful and must not be used!
|
|
|
568
|
* @deprecated use `_set(name, value)` instead.
|
|
|
569
|
*/
|
|
|
570
|
_changeAttrValue(name: string, value: any): this;
|
|
|
571
|
|
|
|
572
|
get<K extends keyof this & string>(name: K): this[K];
|
|
|
573
|
|
|
|
574
|
/**
|
|
|
575
|
* Helper function to set new value for specified property, and call handlers
|
|
|
576
|
* registered with watch() if the value has changed.
|
|
|
577
|
* @param name
|
|
|
578
|
* @param value
|
|
|
579
|
*/
|
|
|
580
|
_set<K extends keyof this>(name: K, value: this[K]): void;
|
|
|
581
|
|
|
|
582
|
/**
|
|
|
583
|
* Helper function to get value for specified property stored by this._set(),
|
|
|
584
|
* i.e. for properties with custom setters. Used mainly by custom getters.
|
|
|
585
|
*
|
|
|
586
|
* For example, CheckBox._getValueAttr() calls this._get("value").
|
|
|
587
|
* @param name
|
|
|
588
|
*/
|
|
|
589
|
_get<K extends keyof this>(name: K): this[K];
|
|
|
590
|
|
|
|
591
|
/**
|
|
|
592
|
* Set a property on a Stateful instance
|
|
|
593
|
*/
|
|
|
594
|
set<K extends keyof this & string>(name: K, value: this[K]): this;
|
|
|
595
|
set<K extends { [p in keyof this]: this[p] extends any[] ? p : never; }[keyof this & string]>(name: K, ...values: this[K]): this;
|
|
|
596
|
set(values: Partial<this>): this;
|
|
|
597
|
|
|
|
598
|
/**
|
|
|
599
|
* Watches a property for changes
|
|
|
600
|
*/
|
|
|
601
|
watch(callback: <K extends keyof any>(prop: K, oldValue: any, newValue: any) => void): dojo.WatchHandle;
|
|
|
602
|
watch<K extends keyof this>(name: K, callback: (prop: K, oldValue: this[K], newValue: this[K]) => void): dojo.WatchHandle;
|
|
|
603
|
}
|
|
|
604
|
|
|
|
605
|
type EventInitArgs<T extends Event> = {
|
|
|
606
|
[p in keyof T]?: T[p] extends (...args: any) => any ? never : T[p];
|
|
|
607
|
};
|
|
|
608
|
|
|
|
609
|
/* dijit/_WidgetBase */
|
|
|
610
|
interface _WidgetBase<Events extends { [name in keyof Events]: Event } = GlobalEventHandlersEventMap> extends Destroyable {
|
|
|
611
|
|
|
|
612
|
/**
|
|
|
613
|
* A unique, opaque ID string that can be assigned by users or by the
|
|
|
614
|
* system. If the developer passes an ID which is known not to be
|
|
|
615
|
* unique, the specified ID is ignored and the system-generated ID is
|
|
|
616
|
* used instead.
|
|
|
617
|
*/
|
|
|
618
|
id: string;
|
|
|
619
|
|
|
|
620
|
/**
|
|
|
621
|
* Rarely used. Overrides the default Dojo locale used to render this widget,
|
|
|
622
|
* as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute.
|
|
|
623
|
* Value must be among the list of locales specified during by the Dojo bootstrap,
|
|
|
624
|
* formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us).
|
|
|
625
|
*/
|
|
|
626
|
lang: string;
|
|
|
627
|
|
|
|
628
|
/**
|
|
|
629
|
* Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir)
|
|
|
630
|
* attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's
|
|
|
631
|
* default direction.
|
|
|
632
|
*/
|
|
|
633
|
dir: string;
|
|
|
634
|
|
|
|
635
|
/**
|
|
|
636
|
* HTML class attribute
|
|
|
637
|
*/
|
|
|
638
|
class: string;
|
|
|
639
|
|
|
|
640
|
/**
|
|
|
641
|
* HTML style attributes as cssText string or name/value hash
|
|
|
642
|
*/
|
|
|
643
|
style: string;
|
|
|
644
|
|
|
|
645
|
/**
|
|
|
646
|
* HTML title attribute.
|
|
|
647
|
*
|
|
|
648
|
* For form widgets this specifies a tooltip to display when hovering over
|
|
|
649
|
* the widget (just like the native HTML title attribute).
|
|
|
650
|
*
|
|
|
651
|
* For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer,
|
|
|
652
|
* etc., it's used to specify the tab label, accordion pane title, etc. In this case it's
|
|
|
653
|
* interpreted as HTML.
|
|
|
654
|
*/
|
|
|
655
|
title: string;
|
|
|
656
|
|
|
|
657
|
/**
|
|
|
658
|
* When this widget's title attribute is used to for a tab label, accordion pane title, etc.,
|
|
|
659
|
* this specifies the tooltip to appear when the mouse is hovered over that text.
|
|
|
660
|
*/
|
|
|
661
|
tooltip: string;
|
|
|
662
|
|
|
|
663
|
/**
|
|
|
664
|
* Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate
|
|
|
665
|
* widget state.
|
|
|
666
|
*/
|
|
|
667
|
baseClass: string;
|
|
|
668
|
|
|
|
669
|
/**
|
|
|
670
|
* pointer to original DOM node
|
|
|
671
|
*/
|
|
|
672
|
srcNodeRef: HTMLElement;
|
|
|
673
|
|
|
|
674
|
/**
|
|
|
675
|
* This is our visible representation of the widget! Other DOM
|
|
|
676
|
* Nodes may by assigned to other properties, usually through the
|
|
|
677
|
* template system's data-dojo-attach-point syntax, but the domNode
|
|
|
678
|
* property is the canonical "top level" node in widget UI.
|
|
|
679
|
*/
|
|
|
680
|
domNode: HTMLElement;
|
|
|
681
|
|
|
|
682
|
/**
|
|
|
683
|
* Designates where children of the source DOM node will be placed.
|
|
|
684
|
* "Children" in this case refers to both DOM nodes and widgets.
|
|
|
685
|
*/
|
|
|
686
|
containerNode: HTMLElement;
|
|
|
687
|
|
|
|
688
|
/**
|
|
|
689
|
* The document this widget belongs to. If not specified to constructor, will default to
|
|
|
690
|
* srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global
|
|
|
691
|
*/
|
|
|
692
|
ownerDocument: HTMLElement;
|
|
|
693
|
|
|
|
694
|
/**
|
|
|
695
|
* Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute
|
|
|
696
|
* for each XXX attribute to be mapped to the DOM.
|
|
|
697
|
*/
|
|
|
698
|
attributeMap: { [attribute: string]: any };
|
|
|
699
|
|
|
|
700
|
/**
|
|
|
701
|
* Bi-directional support, the main variable which is responsible for the direction of the text.
|
|
|
702
|
* The text direction can be different than the GUI direction by using this parameter in creation
|
|
|
703
|
* of a widget.
|
|
|
704
|
*/
|
|
|
705
|
textDir: string;
|
|
|
706
|
|
|
|
707
|
_started?: boolean;
|
|
|
708
|
|
|
|
709
|
/**
|
|
|
710
|
* Kicks off widget instantiation. See create() for details.
|
|
|
711
|
*/
|
|
|
712
|
postscript(params?: any, srcNodeRef?: HTMLElement): void;
|
|
|
713
|
|
|
|
714
|
/**
|
|
|
715
|
* Kick off the life-cycle of a widget
|
|
|
716
|
*/
|
|
|
717
|
create(params?: any, srcNodeRef?: HTMLElement): void;
|
|
|
718
|
|
|
|
719
|
/**
|
|
|
720
|
* Called after the parameters to the widget have been read-in,
|
|
|
721
|
* but before the widget template is instantiated. Especially
|
|
|
722
|
* useful to set properties that are referenced in the widget
|
|
|
723
|
* template.
|
|
|
724
|
*/
|
|
|
725
|
postMixInProperties(): void;
|
|
|
726
|
|
|
|
727
|
/**
|
|
|
728
|
* Construct the UI for this widget, setting this.domNode.
|
|
|
729
|
* Most widgets will mixin `dijit._TemplatedMixin`, which implements this method.
|
|
|
730
|
*/
|
|
|
731
|
buildRendering(): void;
|
|
|
732
|
|
|
|
733
|
/**
|
|
|
734
|
* Processing after the DOM fragment is created
|
|
|
735
|
*/
|
|
|
736
|
postCreate(): void;
|
|
|
737
|
|
|
|
738
|
/**
|
|
|
739
|
* Processing after the DOM fragment is added to the document
|
|
|
740
|
*/
|
|
|
741
|
startup(): void;
|
|
|
742
|
|
|
|
743
|
/**
|
|
|
744
|
* Destroy this widget and its descendants
|
|
|
745
|
*/
|
|
|
746
|
destroyRecursive(preserveDom?: boolean): void;
|
|
|
747
|
|
|
|
748
|
/**
|
|
|
749
|
* Destroys the DOM nodes associated with this widget.
|
|
|
750
|
*/
|
|
|
751
|
destroyRendering(preserveDom?: boolean): void;
|
|
|
752
|
|
|
|
753
|
/**
|
|
|
754
|
* Recursively destroy the children of this widget and their
|
|
|
755
|
* descendants.
|
|
|
756
|
*/
|
|
|
757
|
destroyDescendants(preserveDom?: boolean): void;
|
|
|
758
|
|
|
|
759
|
/**
|
|
|
760
|
* Deprecated. Override destroy() instead to implement custom widget tear-down
|
|
|
761
|
* behavior.
|
|
|
762
|
* @deprecated
|
|
|
763
|
*/
|
|
|
764
|
uninitialize(): boolean;
|
|
|
765
|
|
|
|
766
|
/**
|
|
|
767
|
* Used by widgets to signal that a synthetic event occurred, ex:
|
|
|
768
|
* | myWidget.emit("attrmodified-selectedChildWidget", {}).
|
|
|
769
|
*/
|
|
|
770
|
emit<K extends keyof Events>(eventName: K, evt: EventInitArgs<Events[K]>): void;
|
|
|
771
|
|
|
|
772
|
/**
|
|
|
773
|
* @param type
|
|
|
774
|
* @param eventObj
|
|
|
775
|
* @param callbackArgs
|
|
|
776
|
*/
|
|
|
777
|
emit<K extends string>(
|
|
|
778
|
type: K,
|
|
|
779
|
eventObj?: K extends keyof Events ? EventInitArgs<Events[K]> : any,
|
|
|
780
|
callbackArgs?: any[]
|
|
|
781
|
): any;
|
|
|
782
|
|
|
|
783
|
/**
|
|
|
784
|
* Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }).
|
|
|
785
|
*/
|
|
|
786
|
on<K extends keyof Events>(eventName: K, cb: (evt: Events[K]) => void): dojo.WatchHandle;
|
|
|
787
|
|
|
|
788
|
on(type: string | dojo.ExtensionEvent, func: dojo.EventListener | Function): dojo.WatchHandle;
|
|
|
789
|
|
|
|
790
|
/**
|
|
|
791
|
* Returns a string that represents the widget.
|
|
|
792
|
*/
|
|
|
793
|
toString(): string;
|
|
|
794
|
|
|
|
795
|
/**
|
|
|
796
|
* Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent
|
|
|
797
|
* is this widget. Note that it does not return all descendants, but rather just direct children.
|
|
|
798
|
*/
|
|
|
799
|
getChildren<T extends _WidgetBase>(): T[];
|
|
|
800
|
|
|
|
801
|
/**
|
|
|
802
|
* Returns the parent widget of this widget.
|
|
|
803
|
*/
|
|
|
804
|
getParent<T extends _WidgetBase>(): T;
|
|
|
805
|
|
|
|
806
|
/**
|
|
|
807
|
* Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.
|
|
|
808
|
* @deprecated
|
|
|
809
|
*/
|
|
|
810
|
connect(obj: any, event: string | dojo.ExtensionEvent, method: string | dojo.EventListener): dojo.WatchHandle;
|
|
|
811
|
|
|
|
812
|
/**
|
|
|
813
|
* Deprecated, will be removed in 2.0, use handle.remove() instead.
|
|
|
814
|
* @deprecated
|
|
|
815
|
*/
|
|
|
816
|
disconnect(handle: dojo.WatchHandle): void;
|
|
|
817
|
|
|
|
818
|
/**
|
|
|
819
|
* Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.
|
|
|
820
|
* @deprecated
|
|
|
821
|
*/
|
|
|
822
|
subscribe(t: string, method: dojo.EventListener): dojo.WatchHandle;
|
|
|
823
|
|
|
|
824
|
/**
|
|
|
825
|
* Deprecated, will be removed in 2.0, use handle.remove() instead.
|
|
|
826
|
* @deprecated
|
|
|
827
|
*/
|
|
|
828
|
unsubscribe(handle: dojo.WatchHandle): void;
|
|
|
829
|
|
|
|
830
|
/**
|
|
|
831
|
* Return this widget's explicit or implicit orientation (true for LTR, false for RTL)
|
|
|
832
|
*/
|
|
|
833
|
isLeftToRight(): boolean;
|
|
|
834
|
|
|
|
835
|
/**
|
|
|
836
|
* Return true if this widget can currently be focused
|
|
|
837
|
* and false if not
|
|
|
838
|
*/
|
|
|
839
|
isFocusable(): boolean;
|
|
|
840
|
|
|
|
841
|
/**
|
|
|
842
|
* Place this widget somewhere in the DOM based
|
|
|
843
|
* on standard domConstruct.place() conventions.
|
|
|
844
|
*/
|
|
|
845
|
placeAt<T extends _WidgetBase>(reference: dojo.NodeFragmentOrString | T, position?: string | number): this;
|
|
|
846
|
|
|
|
847
|
/**
|
|
|
848
|
* Wrapper to setTimeout to avoid deferred functions executing
|
|
|
849
|
* after the originating widget has been destroyed.
|
|
|
850
|
* Returns an object handle with a remove method (that returns null) (replaces clearTimeout).
|
|
|
851
|
*/
|
|
|
852
|
defer(fcn: Function, delay?: number): dojo.Handle;
|
|
|
853
|
}
|
|
|
854
|
|
|
|
855
|
interface _WidgetBaseConstructor<W> extends Pick<dojo._base.DeclareConstructor<W>, Exclude<keyof dojo._base.DeclareConstructor<W>, 'new'>> {
|
|
|
856
|
new(params?: Partial<W> & ThisType<W>, srcNodeRef?: dojo.NodeOrString): W & dojo._base.DeclareCreatedObject;
|
|
|
857
|
}
|
|
|
858
|
|
|
|
859
|
/* dijit/_WidgetsInTemplateMixin */
|
|
|
860
|
|
|
|
861
|
interface _WidgetsInTemplateMixin {
|
|
|
862
|
/**
|
|
|
863
|
* Used to provide a context require to dojo/parser in order to be
|
|
|
864
|
* able to use relative MIDs (e.g. `./Widget`) in the widget's template.
|
|
|
865
|
*/
|
|
|
866
|
contextRequire: Function;
|
|
|
867
|
|
|
|
868
|
startup(): void;
|
|
|
869
|
}
|
|
|
870
|
|
|
|
871
|
interface _WidgetsInTemplateMixinConstructor extends dojo._base.DeclareConstructor<_WidgetsInTemplateMixin> {
|
|
|
872
|
new(params: Object, srcNodeRef: dojo.NodeOrString): _WidgetsInTemplateMixin;
|
|
|
873
|
}
|
|
|
874
|
|
|
|
875
|
/* dijit/a11yclick */
|
|
|
876
|
|
|
|
877
|
interface A11yClick {
|
|
|
878
|
|
|
|
879
|
/**
|
|
|
880
|
* Custom press, release, and click synthetic events
|
|
|
881
|
* which trigger on a left mouse click, touch, or space/enter keyup.
|
|
|
882
|
*/
|
|
|
883
|
(node: HTMLElement, listener: Function): dojo.Handle;
|
|
|
884
|
|
|
|
885
|
/**
|
|
|
886
|
* Mousedown (left button), touchstart, or keydown (space or enter) corresponding to logical click operation.
|
|
|
887
|
*/
|
|
|
888
|
press: dojo.ExtensionEvent;
|
|
|
889
|
|
|
|
890
|
/**
|
|
|
891
|
* Mouseup (left button), touchend, or keyup (space or enter) corresponding to logical click operation.
|
|
|
892
|
*/
|
|
|
893
|
release: dojo.ExtensionEvent;
|
|
|
894
|
|
|
|
895
|
/**
|
|
|
896
|
* Mouse cursor or a finger is dragged over the given node.
|
|
|
897
|
*/
|
|
|
898
|
move: dojo.ExtensionEvent;
|
|
|
899
|
}
|
|
|
900
|
|
|
|
901
|
/* dijit/Calendar */
|
|
|
902
|
|
|
|
903
|
interface _MonthDropDownButton extends form.DropDownButton<_MonthDropDown> {
|
|
|
904
|
onMonthSelect(): void;
|
|
|
905
|
postCreate(): void;
|
|
|
906
|
|
|
|
907
|
//set(name: 'month', value: number): this;
|
|
|
908
|
//set(name: string, value: any): this;
|
|
|
909
|
//set(values: Object): this;
|
|
|
910
|
}
|
|
|
911
|
|
|
|
912
|
interface _MonthDropDownButtonConstructor extends _WidgetBaseConstructor<_MonthDropDownButton> { }
|
|
|
913
|
|
|
|
914
|
interface _MonthDropDown extends _Widget, _TemplatedMixin, _CssStateMixin {
|
|
|
915
|
months: string[];
|
|
|
916
|
baseClass: string;
|
|
|
917
|
templateString: string;
|
|
|
918
|
|
|
|
919
|
/**
|
|
|
920
|
* Callback when month is selected from drop down
|
|
|
921
|
*/
|
|
|
922
|
onChange(month: number): void;
|
|
|
923
|
|
|
|
924
|
//set(name: 'months', value: string[]): this;
|
|
|
925
|
//set(name: string, value: any): this;
|
|
|
926
|
//set(values: Object): this;
|
|
|
927
|
}
|
|
|
928
|
|
|
|
929
|
interface _MonthDropDownConstructor extends _WidgetBaseConstructor<_MonthDropDown> { }
|
|
|
930
|
|
|
|
931
|
interface Calendar extends CalendarLite, _Widget, _CssStateMixin {
|
|
|
932
|
|
|
|
933
|
baseClass: string;
|
|
|
934
|
|
|
|
935
|
/**
|
|
|
936
|
* Set node classes for various mouse events, see dijit._CssStateMixin for more details
|
|
|
937
|
*/
|
|
|
938
|
cssStateNodes: CSSStateNodes;
|
|
|
939
|
|
|
|
940
|
/**
|
|
|
941
|
* Creates the drop down button that displays the current month and lets user pick a new one
|
|
|
942
|
*/
|
|
|
943
|
_createMonthWidget(): _MonthDropDownButton;
|
|
|
944
|
|
|
|
945
|
postCreate(): void;
|
|
|
946
|
|
|
|
947
|
/**
|
|
|
948
|
* Handler for when user selects a month from the drop down list
|
|
|
949
|
*/
|
|
|
950
|
_onMonthSelect(newMonth: number): void;
|
|
|
951
|
|
|
|
952
|
/**
|
|
|
953
|
* Handler for mouse over events on days, sets hovered style
|
|
|
954
|
*/
|
|
|
955
|
_onDayMouseOver(evt: MouseEvent): void;
|
|
|
956
|
|
|
|
957
|
/**
|
|
|
958
|
* Handler for mouse out events on days, clears hovered style
|
|
|
959
|
*/
|
|
|
960
|
_onDayMouseOut(evt: MouseEvent): void;
|
|
|
961
|
_onDayMouseDown(evt: MouseEvent): void;
|
|
|
962
|
_onDayMouseUp(evt: MouseEvent): void;
|
|
|
963
|
|
|
|
964
|
/**
|
|
|
965
|
* Provides keyboard navigation of calendar.
|
|
|
966
|
*/
|
|
|
967
|
handleKey(evt: KeyboardEvent): void;
|
|
|
968
|
|
|
|
969
|
/**
|
|
|
970
|
* For handling keydown events on a stand alone calendar
|
|
|
971
|
*/
|
|
|
972
|
_onKeyDown(evt: KeyboardEvent): void;
|
|
|
973
|
|
|
|
974
|
/**
|
|
|
975
|
* Deprecated. Notification that a date cell was selected. It may be the same as the previous value.
|
|
|
976
|
*/
|
|
|
977
|
onValueSelected(date: Date): void;
|
|
|
978
|
|
|
|
979
|
onChange(date: Date): void;
|
|
|
980
|
|
|
|
981
|
/**
|
|
|
982
|
* May be overridden to return CSS classes to associate with the date entry for the given dateObject
|
|
|
983
|
* for example to indicate a holiday in specified locale.
|
|
|
984
|
*/
|
|
|
985
|
getClassForDate(dateObject: Date, locale?: string): string;
|
|
|
986
|
|
|
|
987
|
// get(name: 'value'): Date;
|
|
|
988
|
// get(name: string): any;
|
|
|
989
|
|
|
|
990
|
// set(name: 'value', value: number | Date): this;
|
|
|
991
|
// set(name: string, value: any): this;
|
|
|
992
|
// set(values: Object): this;
|
|
|
993
|
}
|
|
|
994
|
|
|
|
995
|
interface CalendarConstructor extends _WidgetBaseConstructor<Calendar> {
|
|
|
996
|
_MonthWidget: _MonthWidgetConstructor;
|
|
|
997
|
_MonthDropDown: _MonthDropDownButtonConstructor;
|
|
|
998
|
_MonthDropDownButton: _MonthDropDownButtonConstructor;
|
|
|
999
|
}
|
|
|
1000
|
|
|
|
1001
|
/* dijit/CalendarLite */
|
|
|
1002
|
|
|
|
1003
|
interface _MonthWidget extends _WidgetBase {
|
|
|
1004
|
// set(name: 'month', value: Date): this;
|
|
|
1005
|
// set(name: string, value: any): this;
|
|
|
1006
|
// set(values: Object): this;
|
|
|
1007
|
}
|
|
|
1008
|
|
|
|
1009
|
interface _MonthWidgetConstructor extends _WidgetBaseConstructor<_MonthWidget> { }
|
|
|
1010
|
|
|
|
1011
|
interface CalendarLite extends _WidgetBase, _TemplatedMixin {
|
|
|
1012
|
/**
|
|
|
1013
|
* Template for main calendar
|
|
|
1014
|
*/
|
|
|
1015
|
templateString: string;
|
|
|
1016
|
|
|
|
1017
|
/**
|
|
|
1018
|
* Template for cell for a day of the week (ex: M)
|
|
|
1019
|
*/
|
|
|
1020
|
dowTemplateString: string;
|
|
|
1021
|
|
|
|
1022
|
dateTemplateString: string;
|
|
|
1023
|
weekTemplateString: string;
|
|
|
1024
|
|
|
|
1025
|
/**
|
|
|
1026
|
* The currently selected Date, initially set to invalid date to indicate no selection.
|
|
|
1027
|
*/
|
|
|
1028
|
value: Date;
|
|
|
1029
|
|
|
|
1030
|
/**
|
|
|
1031
|
* JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines
|
|
|
1032
|
* at dojo/date and dojo/date/locale.
|
|
|
1033
|
*/
|
|
|
1034
|
datePackage: string;
|
|
|
1035
|
|
|
|
1036
|
/**
|
|
|
1037
|
* How to represent the days of the week in the calendar header. See locale
|
|
|
1038
|
*/
|
|
|
1039
|
dayWidth: string;
|
|
|
1040
|
|
|
|
1041
|
/**
|
|
|
1042
|
* Order fields are traversed when user hits the tab key
|
|
|
1043
|
*/
|
|
|
1044
|
tabIndex: string;
|
|
|
1045
|
|
|
|
1046
|
/**
|
|
|
1047
|
* (Optional) The first day of week override. By default the first day of week is determined
|
|
|
1048
|
* for the current locale (extracted from the CLDR).
|
|
|
1049
|
* Special value -1 (default value), means use locale dependent value.
|
|
|
1050
|
*/
|
|
|
1051
|
dayOffset: number;
|
|
|
1052
|
|
|
|
1053
|
/**
|
|
|
1054
|
* Date object containing the currently focused date, or the date which would be focused
|
|
|
1055
|
* if the calendar itself was focused. Also indicates which year and month to display,
|
|
|
1056
|
* i.e. the current "page" the calendar is on.
|
|
|
1057
|
*/
|
|
|
1058
|
currentFocus: Date;
|
|
|
1059
|
|
|
|
1060
|
/**
|
|
|
1061
|
* Put the summary to the node with role=grid
|
|
|
1062
|
*/
|
|
|
1063
|
_setSummaryAttr: string;
|
|
|
1064
|
|
|
|
1065
|
baseClass: string;
|
|
|
1066
|
|
|
|
1067
|
/**
|
|
|
1068
|
* Runs various tests on the value, checking that it's a valid date, rather
|
|
|
1069
|
* than blank or NaN.
|
|
|
1070
|
*/
|
|
|
1071
|
_isValidDate(value: Date): boolean;
|
|
|
1072
|
|
|
|
1073
|
/**
|
|
|
1074
|
* Convert Number into Date, or copy Date object. Then, round to nearest day,
|
|
|
1075
|
* setting to 1am to avoid issues when DST shift occurs at midnight, see #8521, #9366)
|
|
|
1076
|
*/
|
|
|
1077
|
_patchDate(value: number | Date): Date;
|
|
|
1078
|
|
|
|
1079
|
/**
|
|
|
1080
|
* This just sets the content of node to the specified text.
|
|
|
1081
|
* Can't do "node.innerHTML=text" because of an IE bug w/tables, see #3434.
|
|
|
1082
|
*/
|
|
|
1083
|
_setText(node: HTMLElement, text?: string): void;
|
|
|
1084
|
|
|
|
1085
|
/**
|
|
|
1086
|
* Fills in the calendar grid with each day (1-31).
|
|
|
1087
|
* Call this on creation, when moving to a new month.
|
|
|
1088
|
*/
|
|
|
1089
|
_populateGrid(): void;
|
|
|
1090
|
|
|
|
1091
|
/**
|
|
|
1092
|
* Fill in localized month, and prev/current/next years
|
|
|
1093
|
*/
|
|
|
1094
|
_populateControls(): void;
|
|
|
1095
|
|
|
|
1096
|
/**
|
|
|
1097
|
* Sets calendar's value to today's date
|
|
|
1098
|
*/
|
|
|
1099
|
goToToday(): void;
|
|
|
1100
|
|
|
|
1101
|
/**
|
|
|
1102
|
* Creates the drop down button that displays the current month and lets user pick a new one
|
|
|
1103
|
*/
|
|
|
1104
|
_createMonthWidget(): void;
|
|
|
1105
|
|
|
|
1106
|
buildRendering(): void;
|
|
|
1107
|
postCreate(): void;
|
|
|
1108
|
|
|
|
1109
|
/**
|
|
|
1110
|
* Set up connects for increment/decrement of months/years
|
|
|
1111
|
*/
|
|
|
1112
|
_connectControls(): void;
|
|
|
1113
|
|
|
|
1114
|
/**
|
|
|
1115
|
* If the calendar currently has focus, then focuses specified date,
|
|
|
1116
|
* changing the currently displayed month/year if necessary.
|
|
|
1117
|
* If the calendar doesn't have focus, updates currently
|
|
|
1118
|
* displayed month/year, and sets the cell that will get focus
|
|
|
1119
|
* when Calendar is focused.
|
|
|
1120
|
*/
|
|
|
1121
|
_setCurrentFocusAttr(date: Date, forceFocus?: boolean): void;
|
|
|
1122
|
|
|
|
1123
|
/**
|
|
|
1124
|
* Focus the calendar by focusing one of the calendar cells
|
|
|
1125
|
*/
|
|
|
1126
|
focus(): void;
|
|
|
1127
|
|
|
|
1128
|
/**
|
|
|
1129
|
* Handler for day clicks, selects the date if appropriate
|
|
|
1130
|
*/
|
|
|
1131
|
_onDayClick(evt: MouseEvent): void;
|
|
|
1132
|
|
|
|
1133
|
/**
|
|
|
1134
|
* Returns the cell corresponding to the date, or null if the date is not within the currently
|
|
|
1135
|
* displayed month.
|
|
|
1136
|
*/
|
|
|
1137
|
_getNodeByDate(value: Date): HTMLElement;
|
|
|
1138
|
|
|
|
1139
|
/**
|
|
|
1140
|
* Marks the specified cells as selected, and clears cells previously marked as selected.
|
|
|
1141
|
* For CalendarLite at most one cell is selected at any point, but this allows an array
|
|
|
1142
|
* for easy subclassing.
|
|
|
1143
|
*/
|
|
|
1144
|
_markSelectedDates(dates: Date[]): void;
|
|
|
1145
|
|
|
|
1146
|
/**
|
|
|
1147
|
* Called only when the selected date has changed
|
|
|
1148
|
*/
|
|
|
1149
|
onChange(date: Date): void;
|
|
|
1150
|
|
|
|
1151
|
/**
|
|
|
1152
|
* May be overridden to disable certain dates in the calendar e.g. `isDisabledDate=dojo.date.locale.isWeekend`
|
|
|
1153
|
*/
|
|
|
1154
|
isDisabledDate(dateObject: Date, locale?: string): boolean;
|
|
|
1155
|
|
|
|
1156
|
/**
|
|
|
1157
|
* May be overridden to return CSS classes to associate with the date entry for the given dateObject,
|
|
|
1158
|
* for example to indicate a holiday in specified locale.
|
|
|
1159
|
*/
|
|
|
1160
|
getClassForDate(dateObject: Date, locale?: string): string;
|
|
|
1161
|
|
|
|
1162
|
// get(name: 'value'): Date;
|
|
|
1163
|
// get(name: string): any;
|
|
|
1164
|
|
|
|
1165
|
// set(name: 'value', value: number | Date): this;
|
|
|
1166
|
// set(name: string, value: any): this;
|
|
|
1167
|
// set(values: Object): this;
|
|
|
1168
|
}
|
|
|
1169
|
|
|
|
1170
|
interface CalendarLiteConstructor extends _WidgetBaseConstructor<CalendarLite> {
|
|
|
1171
|
_MonthWidget: _MonthWidgetConstructor;
|
|
|
1172
|
}
|
|
|
1173
|
|
|
|
1174
|
/* dijit/Destroyable */
|
|
|
1175
|
|
|
|
1176
|
interface Destroyable {
|
|
|
1177
|
_destroyed?: true;
|
|
|
1178
|
|
|
|
1179
|
/**
|
|
|
1180
|
* Destroy this class, releasing any resources registered via own().
|
|
|
1181
|
*/
|
|
|
1182
|
destroy(preserveDom?: boolean): void;
|
|
|
1183
|
|
|
|
1184
|
/**
|
|
|
1185
|
* Track specified handles and remove/destroy them when this instance is destroyed, unless they were
|
|
|
1186
|
* already removed/destroyed manually.
|
|
|
1187
|
*/
|
|
|
1188
|
own(...args: any[]): any[];
|
|
|
1189
|
}
|
|
|
1190
|
|
|
|
1191
|
/**
|
|
|
1192
|
* Mixin to track handles and release them when instance is destroyed.
|
|
|
1193
|
*/
|
|
|
1194
|
interface DestroyableConstructor extends dojo._base.DeclareConstructor<Destroyable> { }
|
|
|
1195
|
|
|
|
1196
|
/** dijit/_KeyNavMixin */
|
|
|
1197
|
|
|
|
1198
|
/**
|
|
|
1199
|
* A mixin to allow arrow key and letter key navigation of child or descendant widgets.
|
|
|
1200
|
* It can be used by dijit/_Container based widgets with a flat list of children, or more complex widgets like dijit/Tree.
|
|
|
1201
|
*
|
|
|
1202
|
* To use this mixin, the subclass must:
|
|
|
1203
|
*
|
|
|
1204
|
* - 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.
|
|
|
1205
|
* - Set all descendants' initial tabIndex to "-1"; both initial descendants and any descendants added later, by for example addChild()
|
|
|
1206
|
* - Define childSelector to a function or string that identifies focusable descendant widgets
|
|
|
1207
|
*
|
|
|
1208
|
* Also, child widgets must implement a focus() method.
|
|
|
1209
|
*/
|
|
|
1210
|
interface _KeyNavMixin extends _FocusMixin {
|
|
|
1211
|
/**
|
|
|
1212
|
* Tab index of the container; same as HTML tabIndex attribute.
|
|
|
1213
|
* Note then when user tabs into the container, focus is immediately moved to the first item in the container.
|
|
|
1214
|
*/
|
|
|
1215
|
tabIndex: string;
|
|
|
1216
|
|
|
|
1217
|
/**
|
|
|
1218
|
* 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.
|
|
|
1219
|
*/
|
|
|
1220
|
childSelector: string | Function | null;
|
|
|
1221
|
|
|
|
1222
|
/**
|
|
|
1223
|
* Called on left arrow key, or right arrow key if widget is in RTL mode.
|
|
|
1224
|
* Should go back to the previous child in horizontal container widgets like Toolbar.
|
|
|
1225
|
*/
|
|
|
1226
|
_onLeftArrow(evt?: KeyboardEvent): void;
|
|
|
1227
|
|
|
|
1228
|
/**
|
|
|
1229
|
* Called on right arrow key, or left arrow key if widget is in RTL mode.
|
|
|
1230
|
* Should go to the next child in horizontal container widgets like Toolbar.
|
|
|
1231
|
*/
|
|
|
1232
|
_onRightArrow(evt?: KeyboardEvent): void;
|
|
|
1233
|
|
|
|
1234
|
/**
|
|
|
1235
|
* Called on up arrow key. Should go to the previous child in vertical container widgets like Menu.
|
|
|
1236
|
*/
|
|
|
1237
|
_onUpArrow(evt?: KeyboardEvent): void;
|
|
|
1238
|
|
|
|
1239
|
/**
|
|
|
1240
|
* Called on down arrow key. Should go to the next child in vertical container widgets like Menu.
|
|
|
1241
|
*/
|
|
|
1242
|
_onDownArrow(evt?: KeyboardEvent): void;
|
|
|
1243
|
|
|
|
1244
|
/**
|
|
|
1245
|
* Default focus() implementation: focus the first child.
|
|
|
1246
|
*/
|
|
|
1247
|
focus(): void;
|
|
|
1248
|
|
|
|
1249
|
/**
|
|
|
1250
|
* Returns first child that can be focused.
|
|
|
1251
|
*/
|
|
|
1252
|
_getFirstFocusableChild(): _WidgetBase;
|
|
|
1253
|
|
|
|
1254
|
/**
|
|
|
1255
|
* Returns last child that can be focused.
|
|
|
1256
|
*/
|
|
|
1257
|
_getLastFocusableChild(): _WidgetBase;
|
|
|
1258
|
|
|
|
1259
|
/**
|
|
|
1260
|
* Focus the first focusable child in the container.
|
|
|
1261
|
*/
|
|
|
1262
|
focusFirstChild(): void;
|
|
|
1263
|
|
|
|
1264
|
/**
|
|
|
1265
|
* Focus the last focusable child in the container.
|
|
|
1266
|
*/
|
|
|
1267
|
focusLastChild(): void;
|
|
|
1268
|
|
|
|
1269
|
/**
|
|
|
1270
|
* Focus specified child widget.
|
|
|
1271
|
*
|
|
|
1272
|
* @param widget Reference to container's child widget
|
|
|
1273
|
* @param last If true and if widget has multiple focusable nodes, focus the last one instead of the first one
|
|
|
1274
|
*/
|
|
|
1275
|
focusChild(widget: _WidgetBase, last?: boolean): void;
|
|
|
1276
|
|
|
|
1277
|
/**
|
|
|
1278
|
* Handler for when the container itself gets focus.
|
|
|
1279
|
*
|
|
|
1280
|
* Initially the container itself has a tabIndex, but when it gets focus, switch focus to first child.
|
|
|
1281
|
*/
|
|
|
1282
|
_onContainerFocus(evt: Event): void;
|
|
|
1283
|
|
|
|
1284
|
/**
|
|
|
1285
|
* Called when a child widget gets focus, either by user clicking it, or programatically by arrow key handling code.
|
|
|
1286
|
*
|
|
|
1287
|
* It marks that the current node is the selected one, and the previously selected node no longer is.
|
|
|
1288
|
*/
|
|
|
1289
|
_onChildFocus(child?: _WidgetBase): void;
|
|
|
1290
|
|
|
|
1291
|
_searchString: string;
|
|
|
1292
|
|
|
|
1293
|
multiCharSearchDuration: number;
|
|
|
1294
|
|
|
|
1295
|
/**
|
|
|
1296
|
* When a key is pressed that matches a child item, this method is called so that a widget can take appropriate action is necessary.
|
|
|
1297
|
*/
|
|
|
1298
|
onKeyboardSearch(tem: _WidgetBase, evt: Event, searchString: string, numMatches: number): void;
|
|
|
1299
|
|
|
|
1300
|
/**
|
|
|
1301
|
* Compares the searchString to the widget's text label, returning:
|
|
|
1302
|
*
|
|
|
1303
|
* * -1: a high priority match and stop searching
|
|
|
1304
|
* * 0: not a match
|
|
|
1305
|
* * 1: a match but keep looking for a higher priority match
|
|
|
1306
|
*/
|
|
|
1307
|
_keyboardSearchCompare(item: _WidgetBase, searchString: string): -1 | 0 | 1;
|
|
|
1308
|
|
|
|
1309
|
/**
|
|
|
1310
|
* When a key is pressed, if it's an arrow key etc. then it's handled here.
|
|
|
1311
|
*/
|
|
|
1312
|
_onContainerKeydown(evt: Event): void;
|
|
|
1313
|
|
|
|
1314
|
/**
|
|
|
1315
|
* When a printable key is pressed, it's handled here, searching by letter.
|
|
|
1316
|
*/
|
|
|
1317
|
_onContainerKeypress(evt: Event): void;
|
|
|
1318
|
|
|
|
1319
|
/**
|
|
|
1320
|
* Perform a search of the widget's options based on the user's keyboard activity
|
|
|
1321
|
*
|
|
|
1322
|
* 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.
|
|
|
1323
|
*/
|
|
|
1324
|
_keyboardSearch(evt: Event, keyChar: string): void;
|
|
|
1325
|
|
|
|
1326
|
/**
|
|
|
1327
|
* Called when focus leaves a child widget to go to a sibling widget.
|
|
|
1328
|
*/
|
|
|
1329
|
_onChildBlur(widget: _WidgetBase): void;
|
|
|
1330
|
|
|
|
1331
|
/**
|
|
|
1332
|
* Returns the next or previous focusable descendant, compared to "child".
|
|
|
1333
|
* Implements and extends _KeyNavMixin._getNextFocusableChild() for a _Container.
|
|
|
1334
|
*/
|
|
|
1335
|
_getNextFocusableChild(child: _WidgetBase, dir: 1 | -1): _WidgetBase | null;
|
|
|
1336
|
|
|
|
1337
|
/**
|
|
|
1338
|
* Returns the first child.
|
|
|
1339
|
*/
|
|
|
1340
|
_getFirst(): _WidgetBase | null;
|
|
|
1341
|
|
|
|
1342
|
/**
|
|
|
1343
|
* Returns the last descendant.
|
|
|
1344
|
*/
|
|
|
1345
|
_getLast(): _WidgetBase | null;
|
|
|
1346
|
|
|
|
1347
|
/**
|
|
|
1348
|
* Returns the next descendant, compared to "child".
|
|
|
1349
|
*/
|
|
|
1350
|
_getNext(child: _WidgetBase, dir: 1 | -1): _WidgetBase | null;
|
|
|
1351
|
}
|
|
|
1352
|
|
|
|
1353
|
interface _KeyNavMixinConstructor extends dojo._base.DeclareConstructor<_KeyNavMixin> { }
|
|
|
1354
|
|
|
|
1355
|
/* dijit/_KeyNavContainer */
|
|
|
1356
|
|
|
|
1357
|
/**
|
|
|
1358
|
* A _Container with keyboard navigation of its children.
|
|
|
1359
|
*
|
|
|
1360
|
* Provides normalized keyboard and focusing code for Container widgets.
|
|
|
1361
|
* To use this mixin, call connectKeyNavHandlers() in postCreate().
|
|
|
1362
|
* Also, child widgets must implement a focus() method.
|
|
|
1363
|
*/
|
|
|
1364
|
interface _KeyNavContainer extends _FocusMixin, _KeyNavMixin, _Container {
|
|
|
1365
|
/**
|
|
|
1366
|
* 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().
|
|
|
1367
|
*
|
|
|
1368
|
* @param prevKeyCodes Key codes for navigating to the previous child.
|
|
|
1369
|
* @param nextKeyCodes Key codes for navigating to the next child.
|
|
|
1370
|
*/
|
|
|
1371
|
connectKeyNavHandlers(prevKeyCodes: number[], nextKeyCodes: number[]): void;
|
|
|
1372
|
|
|
|
1373
|
/**
|
|
|
1374
|
* @deprecated
|
|
|
1375
|
*/
|
|
|
1376
|
startupKeyNavChildren(): void;
|
|
|
1377
|
|
|
|
1378
|
/**
|
|
|
1379
|
* Setup for each child widget.
|
|
|
1380
|
*
|
|
|
1381
|
* Sets tabIndex=-1 on each child, so that the tab key will leave the container rather than visiting each child.
|
|
|
1382
|
*
|
|
|
1383
|
* 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.
|
|
|
1384
|
*
|
|
|
1385
|
* Note: see also _LayoutWidget.setupChild(), which is also called for each child widget.
|
|
|
1386
|
*/
|
|
|
1387
|
_startupChild(widget: _WidgetBase): void;
|
|
|
1388
|
|
|
|
1389
|
/**
|
|
|
1390
|
* Returns the first child.
|
|
|
1391
|
*/
|
|
|
1392
|
_getFirst(): _Widget | null;
|
|
|
1393
|
|
|
|
1394
|
/**
|
|
|
1395
|
* Returns the last descendant.
|
|
|
1396
|
*/
|
|
|
1397
|
_getLast(): _Widget | null;
|
|
|
1398
|
|
|
|
1399
|
/**
|
|
|
1400
|
* Focus the next widget
|
|
|
1401
|
*/
|
|
|
1402
|
focusNext(): void;
|
|
|
1403
|
|
|
|
1404
|
/**
|
|
|
1405
|
* Focus the last focusable node in the previous widget
|
|
|
1406
|
*
|
|
|
1407
|
* (ex: go to the ComboButton icon section rather than button section)
|
|
|
1408
|
*/
|
|
|
1409
|
focusPrev(): void;
|
|
|
1410
|
|
|
|
1411
|
/**
|
|
|
1412
|
* Implement _KeyNavMixin.childSelector, to identify focusable child nodes.
|
|
|
1413
|
*
|
|
|
1414
|
* If we allowed a dojo/query dependency from this module this could more simply be a string "> *" instead of this function.
|
|
|
1415
|
*/
|
|
|
1416
|
childSelector(node: Element | Node): boolean | void | any;
|
|
|
1417
|
}
|
|
|
1418
|
|
|
|
1419
|
interface _KeyNavContainerConstructor extends dojo._base.DeclareConstructor<_KeyNavContainer> { }
|
|
|
1420
|
|
|
|
1421
|
/* dijit/_MenuBase */
|
|
|
1422
|
|
|
|
1423
|
/**
|
|
|
1424
|
* Abstract base class for Menu and MenuBar.
|
|
|
1425
|
* Subclass should implement _onUpArrow(), _onDownArrow(), _onLeftArrow(), and _onRightArrow().
|
|
|
1426
|
*/
|
|
|
1427
|
interface _MenuBase extends _Widget, _TemplatedMixin, _KeyNavContainer, _CssStateMixin {
|
|
|
1428
|
selected: MenuItem | null;
|
|
|
1429
|
|
|
|
1430
|
_setSelectedAttr(item?: MenuItem | null): void;
|
|
|
1431
|
|
|
|
1432
|
/**
|
|
|
1433
|
* 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.
|
|
|
1434
|
*
|
|
|
1435
|
* 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.
|
|
|
1436
|
*/
|
|
|
1437
|
activated: boolean;
|
|
|
1438
|
|
|
|
1439
|
_setActivatedAttr(val: boolean): void;
|
|
|
1440
|
|
|
|
1441
|
/**
|
|
|
1442
|
* pointer to menu that displayed me
|
|
|
1443
|
*/
|
|
|
1444
|
parentMenu: _Widget | null;
|
|
|
1445
|
|
|
|
1446
|
/**
|
|
|
1447
|
* 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.
|
|
|
1448
|
*/
|
|
|
1449
|
popupDelay: number;
|
|
|
1450
|
|
|
|
1451
|
/**
|
|
|
1452
|
* 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.
|
|
|
1453
|
*/
|
|
|
1454
|
passivePopupDelay: number;
|
|
|
1455
|
|
|
|
1456
|
/**
|
|
|
1457
|
* 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.
|
|
|
1458
|
*/
|
|
|
1459
|
autoFocus: boolean;
|
|
|
1460
|
|
|
|
1461
|
/**
|
|
|
1462
|
* 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.
|
|
|
1463
|
*/
|
|
|
1464
|
childSelector(node: Element | Node): boolean | void | Function;
|
|
|
1465
|
|
|
|
1466
|
/**
|
|
|
1467
|
* 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.
|
|
|
1468
|
*/
|
|
|
1469
|
onExecute(): void;
|
|
|
1470
|
|
|
|
1471
|
/**
|
|
|
1472
|
* Attach point for notification about when the user cancels the current menu
|
|
|
1473
|
* 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.
|
|
|
1474
|
*/
|
|
|
1475
|
onCancel(): void;
|
|
|
1476
|
|
|
|
1477
|
/**
|
|
|
1478
|
* 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
|
|
|
1479
|
*/
|
|
|
1480
|
_moveToPopup(evt: Event): void;
|
|
|
1481
|
|
|
|
1482
|
/**
|
|
|
1483
|
* This handler is called when the mouse moves over the popup.
|
|
|
1484
|
*/
|
|
|
1485
|
_onPopupHover(evt?: MouseEvent): void;
|
|
|
1486
|
|
|
|
1487
|
/**
|
|
|
1488
|
* Called when cursor is over a MenuItem.
|
|
|
1489
|
*/
|
|
|
1490
|
onItemHover(item: MenuItem): void;
|
|
|
1491
|
|
|
|
1492
|
/**
|
|
|
1493
|
* Called when a child MenuItem becomes deselected. Setup timer to close its popup.
|
|
|
1494
|
*/
|
|
|
1495
|
_onChildDeselect(item: MenuItem): void;
|
|
|
1496
|
|
|
|
1497
|
/**
|
|
|
1498
|
* Callback fires when mouse exits a MenuItem
|
|
|
1499
|
*/
|
|
|
1500
|
onItemUnhover(item: MenuItem): void;
|
|
|
1501
|
|
|
|
1502
|
/**
|
|
|
1503
|
* Cancels the popup timer because the user has stop hovering on the MenuItem, etc.
|
|
|
1504
|
*/
|
|
|
1505
|
_stopPopupTimer(): void;
|
|
|
1506
|
|
|
|
1507
|
/**
|
|
|
1508
|
* Cancels the pending-close timer because the close has been preempted
|
|
|
1509
|
*/
|
|
|
1510
|
_stopPendingCloseTimer(): void;
|
|
|
1511
|
|
|
|
1512
|
/**
|
|
|
1513
|
* Returns the top menu in this chain of Menus
|
|
|
1514
|
*/
|
|
|
1515
|
_getTopMenu(): void;
|
|
|
1516
|
|
|
|
1517
|
/**
|
|
|
1518
|
* Handle clicks on an item.
|
|
|
1519
|
*/
|
|
|
1520
|
onItemClick(item: _WidgetBase, evt: Event): void;
|
|
|
1521
|
|
|
|
1522
|
/**
|
|
|
1523
|
* Open the popup to the side of/underneath the current menu item, and optionally focus first item
|
|
|
1524
|
*/
|
|
|
1525
|
_openItemPopup(fromItem: MenuItem, focus: boolean): void;
|
|
|
1526
|
|
|
|
1527
|
/**
|
|
|
1528
|
* Callback when this menu is opened.
|
|
|
1529
|
* This is called by the popup manager as notification that the menu was opened.
|
|
|
1530
|
*/
|
|
|
1531
|
onOpen(evt?: Event): void;
|
|
|
1532
|
|
|
|
1533
|
/**
|
|
|
1534
|
* Callback when this menu is closed.
|
|
|
1535
|
* This is called by the popup manager as notification that the menu was closed.
|
|
|
1536
|
*/
|
|
|
1537
|
onClose(): boolean;
|
|
|
1538
|
|
|
|
1539
|
/**
|
|
|
1540
|
* Called when submenu is clicked or focus is lost. Close hierarchy of menus.
|
|
|
1541
|
*/
|
|
|
1542
|
_closeChild(): void;
|
|
|
1543
|
/**
|
|
|
1544
|
* Called when child of this Menu gets focus from:
|
|
|
1545
|
*
|
|
|
1546
|
* 1. clicking it
|
|
|
1547
|
* 2. tabbing into it
|
|
|
1548
|
* 3. being opened by a parent menu.
|
|
|
1549
|
*
|
|
|
1550
|
* This is not called just from mouse hover.
|
|
|
1551
|
*/
|
|
|
1552
|
_onItemFocus(item: MenuItem): void;
|
|
|
1553
|
|
|
|
1554
|
/**
|
|
|
1555
|
* Called when focus is moved away from this Menu and it's submenus.
|
|
|
1556
|
*/
|
|
|
1557
|
_onBlur(): void;
|
|
|
1558
|
|
|
|
1559
|
/**
|
|
|
1560
|
* Called when the user is done with this menu. Closes hierarchy of menus.
|
|
|
1561
|
*/
|
|
|
1562
|
_cleanUp(clearSelectedItem?: boolean): void;
|
|
|
1563
|
}
|
|
|
1564
|
|
|
|
1565
|
interface _MenuBaseConstructor extends _WidgetBaseConstructor<_MenuBase> { }
|
|
|
1566
|
|
|
|
1567
|
/* dijit/Dialog */
|
|
|
1568
|
|
|
|
1569
|
interface _DialogBase extends _TemplatedMixin, form._FormMixin, _DialogMixin, _CssStateMixin {
|
|
|
1570
|
templateString: string;
|
|
|
1571
|
baseClass: string;
|
|
|
1572
|
cssStateNodes: CSSStateNodes;
|
|
|
1573
|
|
|
|
1574
|
/**
|
|
|
1575
|
* True if Dialog is currently displayed on screen.
|
|
|
1576
|
*/
|
|
|
1577
|
open: boolean;
|
|
|
1578
|
|
|
|
1579
|
/**
|
|
|
1580
|
* The time in milliseconds it takes the dialog to fade in and out
|
|
|
1581
|
*/
|
|
|
1582
|
duration: number;
|
|
|
1583
|
|
|
|
1584
|
/**
|
|
|
1585
|
* A Toggle to modify the default focus behavior of a Dialog, which
|
|
|
1586
|
* is to re-focus the element which had focus before being opened.
|
|
|
1587
|
* False will disable refocusing. Default: true
|
|
|
1588
|
*/
|
|
|
1589
|
refocus: boolean;
|
|
|
1590
|
|
|
|
1591
|
/**
|
|
|
1592
|
* A Toggle to modify the default focus behavior of a Dialog, which
|
|
|
1593
|
* is to focus on the first dialog element after opening the dialog.
|
|
|
1594
|
* False will disable autofocusing. Default: true
|
|
|
1595
|
*/
|
|
|
1596
|
autofocus: boolean;
|
|
|
1597
|
|
|
|
1598
|
/**
|
|
|
1599
|
* Toggles the movable aspect of the Dialog. If true, Dialog
|
|
|
1600
|
* can be dragged by it's title. If false it will remain centered
|
|
|
1601
|
* in the viewport.
|
|
|
1602
|
*/
|
|
|
1603
|
draggable: boolean;
|
|
|
1604
|
|
|
|
1605
|
/**
|
|
|
1606
|
* Maximum size to allow the dialog to expand to, relative to viewport size
|
|
|
1607
|
*/
|
|
|
1608
|
maxRatio: number;
|
|
|
1609
|
|
|
|
1610
|
/**
|
|
|
1611
|
* Dialog show [x] icon to close itself, and ESC key will close the dialog.
|
|
|
1612
|
*/
|
|
|
1613
|
closable: boolean;
|
|
|
1614
|
postMixInProperties(): void;
|
|
|
1615
|
postCreate(): void;
|
|
|
1616
|
|
|
|
1617
|
/**
|
|
|
1618
|
* Called when data has been loaded from an href.
|
|
|
1619
|
* Unlike most other callbacks, this function can be connected to (via `dojo.connect`)
|
|
|
1620
|
* but should *not* be overridden.
|
|
|
1621
|
*/
|
|
|
1622
|
onLoad(data?: any): void;
|
|
|
1623
|
|
|
|
1624
|
focus(): void;
|
|
|
1625
|
|
|
|
1626
|
/* Not entirely sure of the resolution type of these promises */
|
|
|
1627
|
|
|
|
1628
|
/**
|
|
|
1629
|
* Display the dialog
|
|
|
1630
|
*/
|
|
|
1631
|
show(): dojo.promise.Promise<any>;
|
|
|
1632
|
|
|
|
1633
|
/**
|
|
|
1634
|
* Hide the dialog
|
|
|
1635
|
*/
|
|
|
1636
|
hide(): dojo.promise.Promise<any>;
|
|
|
1637
|
|
|
|
1638
|
/**
|
|
|
1639
|
* Called with no argument when viewport scrolled or viewport size changed. Adjusts Dialog as
|
|
|
1640
|
* necessary to keep it visible.
|
|
|
1641
|
*
|
|
|
1642
|
* Can also be called with an argument (by dojox/layout/ResizeHandle etc.) to explicitly set the
|
|
|
1643
|
* size of the dialog.
|
|
|
1644
|
*/
|
|
|
1645
|
resize(dim?: dojo.DomGeometryWidthHeight): void;
|
|
|
1646
|
|
|
|
1647
|
destroy(preserveDom?: boolean): void;
|
|
|
1648
|
}
|
|
|
1649
|
|
|
|
1650
|
interface _DialogBaseConstructor extends _WidgetBaseConstructor<_DialogBase> { }
|
|
|
1651
|
|
|
|
1652
|
interface Dialog extends layout.ContentPane, _DialogBase {
|
|
|
1653
|
/* overrides conflicting methods */
|
|
|
1654
|
resize(dim?: dojo.DomGeometryWidthHeight): void;
|
|
|
1655
|
}
|
|
|
1656
|
|
|
|
1657
|
interface DialogLevelManager {
|
|
|
1658
|
_beginZIndex: number;
|
|
|
1659
|
|
|
|
1660
|
/**
|
|
|
1661
|
* Call right before fade-in animation for new dialog.
|
|
|
1662
|
*
|
|
|
1663
|
* Saves current focus, displays/adjusts underlay for new dialog,
|
|
|
1664
|
* and sets the z-index of the dialog itself.
|
|
|
1665
|
*
|
|
|
1666
|
* New dialog will be displayed on top of all currently displayed dialogs.
|
|
|
1667
|
* Caller is responsible for setting focus in new dialog after the fade-in
|
|
|
1668
|
* animation completes.
|
|
|
1669
|
*/
|
|
|
1670
|
show(dialog: _WidgetBase, underlayAttrs: Object): void;
|
|
|
1671
|
|
|
|
1672
|
/**
|
|
|
1673
|
* Called when the specified dialog is hidden/destroyed, after the fade-out
|
|
|
1674
|
* animation ends, in order to reset page focus, fix the underlay, etc.
|
|
|
1675
|
* If the specified dialog isn't open then does nothing.
|
|
|
1676
|
*
|
|
|
1677
|
* Caller is responsible for either setting display:none on the dialog domNode,
|
|
|
1678
|
* or calling dijit/popup.hide(), or removing it from the page DOM.
|
|
|
1679
|
*/
|
|
|
1680
|
hide(dialog: _WidgetBase): void;
|
|
|
1681
|
|
|
|
1682
|
/**
|
|
|
1683
|
* Returns true if specified Dialog is the top in the task
|
|
|
1684
|
*/
|
|
|
1685
|
isTop(dialog: _WidgetBase): boolean;
|
|
|
1686
|
}
|
|
|
1687
|
|
|
|
1688
|
interface DialogConstructor extends _WidgetBaseConstructor<Dialog> {
|
|
|
1689
|
/**
|
|
|
1690
|
* for monkey patching and dojox/widget/DialogSimple
|
|
|
1691
|
*/
|
|
|
1692
|
_DialogBase: _DialogBaseConstructor;
|
|
|
1693
|
_DialogLevelManager: DialogLevelManager;
|
|
|
1694
|
_dialogStack: {
|
|
|
1695
|
dialog: _WidgetBase,
|
|
|
1696
|
focus: any,
|
|
|
1697
|
underlayAttrs: any
|
|
|
1698
|
}[];
|
|
|
1699
|
}
|
|
|
1700
|
|
|
|
1701
|
/* dijit/ConfirmDialog */
|
|
|
1702
|
|
|
|
1703
|
interface ConfirmDialog extends _ConfirmDialogMixin { }
|
|
|
1704
|
|
|
|
1705
|
interface ConfirmDialogConstructor extends DialogConstructor { }
|
|
|
1706
|
|
|
|
1707
|
/* dijit/DropDownMenu */
|
|
|
1708
|
|
|
|
1709
|
/**
|
|
|
1710
|
* A menu, without features for context menu (Meaning, drop down menu)
|
|
|
1711
|
*/
|
|
|
1712
|
interface DropDownMenu extends _MenuBase { }
|
|
|
1713
|
|
|
|
1714
|
interface DropDownMenuConstructor extends _WidgetBaseConstructor<DropDownMenu> { }
|
|
|
1715
|
|
|
|
1716
|
/* dijit/Fieldset */
|
|
|
1717
|
|
|
|
1718
|
/**
|
|
|
1719
|
* An accessible fieldset that can be expanded or collapsed via
|
|
|
1720
|
* its legend. Fieldset extends `dijit.TitlePane`.
|
|
|
1721
|
*/
|
|
|
1722
|
interface Fieldset extends TitlePane {
|
|
|
1723
|
open: boolean;
|
|
|
1724
|
}
|
|
|
1725
|
|
|
|
1726
|
interface FieldsetConstructor extends _WidgetBaseConstructor<Fieldset> { }
|
|
|
1727
|
|
|
|
1728
|
/* dijit/Menu */
|
|
|
1729
|
|
|
|
1730
|
/**
|
|
|
1731
|
* A context menu you can assign to multiple elements
|
|
|
1732
|
*/
|
|
|
1733
|
interface Menu extends dijit.DropDownMenu {
|
|
|
1734
|
/**
|
|
|
1735
|
* Array of dom node ids of nodes to attach to.
|
|
|
1736
|
* Fill this with nodeIds upon widget creation and it becomes context menu for those nodes.
|
|
|
1737
|
*/
|
|
|
1738
|
targetNodeIds: string[];
|
|
|
1739
|
|
|
|
1740
|
/**
|
|
|
1741
|
* CSS expression to apply this Menu to descendants of targetNodeIds, rather than to
|
|
|
1742
|
* the nodes specified by targetNodeIds themselves. Useful for applying a Menu to
|
|
|
1743
|
* a range of rows in a table, tree, etc.
|
|
|
1744
|
*
|
|
|
1745
|
* The application must require() an appropriate level of dojo/query to handle the selector.
|
|
|
1746
|
*/
|
|
|
1747
|
selector: string;
|
|
|
1748
|
|
|
|
1749
|
/**
|
|
|
1750
|
* If true, right clicking anywhere on the window will cause this context menu to open.
|
|
|
1751
|
* If false, must specify targetNodeIds.
|
|
|
1752
|
*/
|
|
|
1753
|
contextMenuForWindow: boolean;
|
|
|
1754
|
|
|
|
1755
|
/**
|
|
|
1756
|
* If true, menu will open on left click instead of right click, similar to a file menu.
|
|
|
1757
|
*/
|
|
|
1758
|
leftClickToOpen: boolean;
|
|
|
1759
|
|
|
|
1760
|
/**
|
|
|
1761
|
* When this menu closes, re-focus the element which had focus before it was opened.
|
|
|
1762
|
*/
|
|
|
1763
|
refocus: boolean;
|
|
|
1764
|
|
|
|
1765
|
/**
|
|
|
1766
|
* Attach menu to given node
|
|
|
1767
|
*/
|
|
|
1768
|
bindDomNode(node: string | Node): void;
|
|
|
1769
|
|
|
|
1770
|
/**
|
|
|
1771
|
* Detach menu from given node
|
|
|
1772
|
*/
|
|
|
1773
|
unBindDomNode(nodeName: string | Node): void;
|
|
|
1774
|
}
|
|
|
1775
|
|
|
|
1776
|
interface MenuConstructor extends _WidgetBaseConstructor<Menu> { }
|
|
|
1777
|
|
|
|
1778
|
/* dijit/MenuBar */
|
|
|
1779
|
interface MenuBar extends _MenuBase {
|
|
|
1780
|
baseClass: 'dijitMenuBar';
|
|
|
1781
|
popupDelay: number;
|
|
|
1782
|
_isMenuBar: true;
|
|
|
1783
|
_orient: string[];
|
|
|
1784
|
_moveToPopup(evt: Event): void;
|
|
|
1785
|
focusChild(item: _WidgetBase): void;
|
|
|
1786
|
_onChildDeselect(item: _WidgetBase): void;
|
|
|
1787
|
_onLeftArrow(): void;
|
|
|
1788
|
_onRightArrow(): void;
|
|
|
1789
|
_onDownArrow(): void;
|
|
|
1790
|
_onUpArrow(): void;
|
|
|
1791
|
onItemClick(item: _WidgetBase, evt: Event): void;
|
|
|
1792
|
}
|
|
|
1793
|
|
|
|
1794
|
interface MenuBarConstructor extends _WidgetBaseConstructor<MenuBar> { }
|
|
|
1795
|
|
|
|
1796
|
/* dijit/MenuBarItem */
|
|
|
1797
|
interface MenuBarItem extends MenuItem { }
|
|
|
1798
|
|
|
|
1799
|
interface MenuBarItemConstructor extends _WidgetBaseConstructor<MenuBarItem> { }
|
|
|
1800
|
|
|
|
1801
|
/* dijit/MenuItem */
|
|
|
1802
|
interface MenuItem extends _Widget, _TemplatedMixin, _Contained, _CssStateMixin {
|
|
|
1803
|
/**
|
|
|
1804
|
* 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.
|
|
|
1805
|
*
|
|
|
1806
|
* Note that although Menu can display accelerator keys, there is no infrastructure to actually catch and execute those accelerators.
|
|
|
1807
|
*/
|
|
|
1808
|
accelKey: string;
|
|
|
1809
|
|
|
|
1810
|
/**
|
|
|
1811
|
* If true, the menu item is disabled.
|
|
|
1812
|
* If false, the menu item is enabled.
|
|
|
1813
|
*/
|
|
|
1814
|
disabled: boolean;
|
|
|
1815
|
|
|
|
1816
|
/** Menu text as HTML */
|
|
|
1817
|
label: string;
|
|
|
1818
|
|
|
|
1819
|
/**
|
|
|
1820
|
* Class to apply to DOMNode to make it display an icon.
|
|
|
1821
|
*/
|
|
|
1822
|
iconClass: string;
|
|
|
1823
|
|
|
|
1824
|
/**
|
|
|
1825
|
* Hook for attr('accelKey', ...) to work.
|
|
|
1826
|
* Set accelKey on this menu item.
|
|
|
1827
|
*/
|
|
|
1828
|
_setAccelKeyAttr(value: string): void;
|
|
|
1829
|
|
|
|
1830
|
/**
|
|
|
1831
|
* Hook for attr('disabled', ...) to work.
|
|
|
1832
|
* Enable or disable this menu item.
|
|
|
1833
|
*/
|
|
|
1834
|
_setDisabledAttr(value: boolean): void;
|
|
|
1835
|
|
|
|
1836
|
_setLabelAttr(val: string): void;
|
|
|
1837
|
_setIconClassAttr(val: string): void;
|
|
|
1838
|
|
|
|
1839
|
_fillContent(source: Element): void;
|
|
|
1840
|
|
|
|
1841
|
/**
|
|
|
1842
|
* Indicate that this node is the currently selected one
|
|
|
1843
|
*/
|
|
|
1844
|
_setSelected(selected: boolean): void;
|
|
|
1845
|
|
|
|
1846
|
focus(): void;
|
|
|
1847
|
|
|
|
1848
|
/**
|
|
|
1849
|
* Deprecated.
|
|
|
1850
|
* Use set('disabled', bool) instead.
|
|
|
1851
|
*/
|
|
|
1852
|
setDisabled(disabled: boolean): void;
|
|
|
1853
|
|
|
|
1854
|
/**
|
|
|
1855
|
* Deprecated.
|
|
|
1856
|
* Use set('label', ...) instead.
|
|
|
1857
|
*/
|
|
|
1858
|
setLabel(content: string): void;
|
|
|
1859
|
}
|
|
|
1860
|
|
|
|
1861
|
interface MenuItemConstructor extends _WidgetBaseConstructor<MenuItem> { }
|
|
|
1862
|
|
|
|
1863
|
/* dijit/MenuSeparator */
|
|
|
1864
|
interface MenuSeparator extends _WidgetBase, _TemplatedMixin, _Contained { }
|
|
|
1865
|
|
|
|
1866
|
interface MenuSeparatorConstructor extends _WidgetBaseConstructor<MenuSeparator> { }
|
|
|
1867
|
|
|
|
1868
|
/* dijit/place */
|
|
|
1869
|
|
|
|
1870
|
interface PlacePosition {
|
|
|
1871
|
x: number;
|
|
|
1872
|
y: number;
|
|
|
1873
|
}
|
|
|
1874
|
|
|
|
1875
|
interface PlaceWidthHeight {
|
|
|
1876
|
w: number;
|
|
|
1877
|
h: number;
|
|
|
1878
|
}
|
|
|
1879
|
|
|
|
1880
|
interface PlaceRectangle extends PlacePosition, PlaceWidthHeight { }
|
|
|
1881
|
|
|
|
1882
|
type PlaceCorner = 'BL' | 'TR' | 'BR' | 'TL';
|
|
|
1883
|
|
|
|
1884
|
type PlacePositions = 'before' | 'after' | 'before-centered' | 'after-centered' | 'above-centered' | 'above' | 'above-alt' | 'below-centered' | 'below' | 'below-alt';
|
|
|
1885
|
|
|
|
1886
|
interface PlaceChoice {
|
|
|
1887
|
corner: PlaceCorner;
|
|
|
1888
|
pos: PlacePosition;
|
|
|
1889
|
aroundCorner?: PlaceCorner;
|
|
|
1890
|
}
|
|
|
1891
|
|
|
|
1892
|
interface PlaceLocation extends PlaceRectangle {
|
|
|
1893
|
corner: PlaceCorner;
|
|
|
1894
|
aroundCorner: PlaceCorner;
|
|
|
1895
|
overflow: number;
|
|
|
1896
|
spaceAvailable: PlaceWidthHeight;
|
|
|
1897
|
}
|
|
|
1898
|
|
|
|
1899
|
interface LayoutNodeFunction {
|
|
|
1900
|
(node: HTMLElement, aroundCorner: string, corner: string, spaceAvailable: PlaceWidthHeight, aroundNodeCoords: PlaceWidthHeight): number;
|
|
|
1901
|
}
|
|
|
1902
|
|
|
|
1903
|
interface Place {
|
|
|
1904
|
/**
|
|
|
1905
|
* Positions node kitty-corner to the rectangle centered at (pos.x, pos.y) with width and height of
|
|
|
1906
|
* padding.x * 2 and padding.y * 2, or zero if padding not specified. Picks first corner in corners[]
|
|
|
1907
|
* where node is fully visible, or the corner where it's most visible.
|
|
|
1908
|
*
|
|
|
1909
|
* Node is assumed to be absolutely or relatively positioned.
|
|
|
1910
|
*/
|
|
|
1911
|
at(node: Element, pos?: PlacePosition, corners?: PlaceCorner[], padding?: PlacePosition, layoutNode?: LayoutNodeFunction): PlaceLocation;
|
|
|
1912
|
|
|
|
1913
|
/**
|
|
|
1914
|
* Position node adjacent or kitty-corner to anchor
|
|
|
1915
|
* such that it's fully visible in viewport.
|
|
|
1916
|
*/
|
|
|
1917
|
around(node: Element, anchor: Element | PlaceRectangle, positions: PlacePositions[], leftToRight?: boolean, layoutNode?: LayoutNodeFunction): PlaceLocation;
|
|
|
1918
|
}
|
|
|
1919
|
|
|
|
1920
|
/* dijit/popup */
|
|
|
1921
|
|
|
|
1922
|
interface PopupOpenArgs {
|
|
|
1923
|
/**
|
|
|
1924
|
* widget to display
|
|
|
1925
|
*/
|
|
|
1926
|
popup?: _WidgetBase;
|
|
|
1927
|
|
|
|
1928
|
/**
|
|
|
1929
|
* the button etc. that is displaying this popup
|
|
|
1930
|
*/
|
|
|
1931
|
parent?: _WidgetBase;
|
|
|
1932
|
|
|
|
1933
|
/**
|
|
|
1934
|
* DOM node (typically a button); place popup relative to this node. (Specify this *or* "x" and "y" parameters.)
|
|
|
1935
|
*/
|
|
|
1936
|
around?: HTMLElement;
|
|
|
1937
|
|
|
|
1938
|
/**
|
|
|
1939
|
* Absolute horizontal position (in pixels) to place node at. (Specify this *or* "around" parameter.)
|
|
|
1940
|
*/
|
|
|
1941
|
x?: number;
|
|
|
1942
|
|
|
|
1943
|
/**
|
|
|
1944
|
* Absolute vertical position (in pixels) to place node at. (Specify this *or* "around" parameter.)
|
|
|
1945
|
*/
|
|
|
1946
|
y?: number;
|
|
|
1947
|
|
|
|
1948
|
/**
|
|
|
1949
|
* When the around parameter is specified, orient should be a list of positions to try
|
|
|
1950
|
*/
|
|
|
1951
|
orient?: string | string[] | { BL?: string; TR?: string; TL?: string; BR?: string; };
|
|
|
1952
|
|
|
|
1953
|
/**
|
|
|
1954
|
* callback when user has canceled the popup by:
|
|
|
1955
|
*
|
|
|
1956
|
* 1. hitting ESC or
|
|
|
1957
|
* 2. by using the popup widget's proprietary cancel mechanism (like a cancel button in a dialog);
|
|
|
1958
|
* i.e. whenever popupWidget.onCancel() is called, args.onCancel is called
|
|
|
1959
|
*/
|
|
|
1960
|
onCancel?: () => void;
|
|
|
1961
|
|
|
|
1962
|
/**
|
|
|
1963
|
* callback whenever this popup is closed
|
|
|
1964
|
*/
|
|
|
1965
|
onClose?: () => void;
|
|
|
1966
|
|
|
|
1967
|
/**
|
|
|
1968
|
* callback when user "executed" on the popup/sub-popup by selecting a menu choice, etc. (top menu only)
|
|
|
1969
|
*/
|
|
|
1970
|
onExecute?: () => void;
|
|
|
1971
|
|
|
|
1972
|
/**
|
|
|
1973
|
* adding a buffer around the opening position. This is only useful when around is not set.
|
|
|
1974
|
*/
|
|
|
1975
|
padding?: PlacePosition;
|
|
|
1976
|
|
|
|
1977
|
/**
|
|
|
1978
|
* The max height for the popup. Any popup taller than this will have scrollbars.
|
|
|
1979
|
* Set to Infinity for no max height. Default is to limit height to available space in viewport,
|
|
|
1980
|
* above or below the aroundNode or specified x/y position.
|
|
|
1981
|
*/
|
|
|
1982
|
maxHeight?: number;
|
|
|
1983
|
}
|
|
|
1984
|
|
|
|
1985
|
interface PopupManager {
|
|
|
1986
|
/**
|
|
|
1987
|
* Stack of currently popped up widgets.
|
|
|
1988
|
* (someone opened _stack[0], and then it opened _stack[1], etc.)
|
|
|
1989
|
*/
|
|
|
1990
|
_stack: _WidgetBase[];
|
|
|
1991
|
|
|
|
1992
|
/**
|
|
|
1993
|
* Z-index of the first popup. (If first popup opens other
|
|
|
1994
|
* popups they get a higher z-index.)
|
|
|
1995
|
*/
|
|
|
1996
|
_beginZIndex: number;
|
|
|
1997
|
|
|
|
1998
|
_idGen: number;
|
|
|
1999
|
|
|
|
2000
|
/**
|
|
|
2001
|
* If screen has been scrolled, reposition all the popups in the stack.
|
|
|
2002
|
* Then set timer to check again later.
|
|
|
2003
|
*/
|
|
|
2004
|
_repositionAll(): void;
|
|
|
2005
|
|
|
|
2006
|
/**
|
|
|
2007
|
* Initialization for widgets that will be used as popups.
|
|
|
2008
|
* Puts widget inside a wrapper DIV (if not already in one),
|
|
|
2009
|
* and returns pointer to that wrapper DIV.
|
|
|
2010
|
*/
|
|
|
2011
|
_createWrapper(widget: _WidgetBase): HTMLDivElement;
|
|
|
2012
|
|
|
|
2013
|
/**
|
|
|
2014
|
* Moves the popup widget off-screen.
|
|
|
2015
|
* Do not use this method to hide popups when not in use, because
|
|
|
2016
|
* that will create an accessibility issue: the offscreen popup is
|
|
|
2017
|
* still in the tabbing order.
|
|
|
2018
|
*/
|
|
|
2019
|
moveOffScreen(widget: _WidgetBase): HTMLDivElement;
|
|
|
2020
|
|
|
|
2021
|
/**
|
|
|
2022
|
* Hide this popup widget (until it is ready to be shown).
|
|
|
2023
|
* Initialization for widgets that will be used as popups
|
|
|
2024
|
*
|
|
|
2025
|
* Also puts widget inside a wrapper DIV (if not already in one)
|
|
|
2026
|
*
|
|
|
2027
|
* If popup widget needs to layout it should
|
|
|
2028
|
* do so when it is made visible, and popup._onShow() is called.
|
|
|
2029
|
*/
|
|
|
2030
|
hide(widget: _WidgetBase): void;
|
|
|
2031
|
|
|
|
2032
|
/**
|
|
|
2033
|
* Compute the closest ancestor popup that's *not* a child of another popup.
|
|
|
2034
|
* Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
|
|
|
2035
|
*/
|
|
|
2036
|
getTopPopup(): _WidgetBase;
|
|
|
2037
|
|
|
|
2038
|
/**
|
|
|
2039
|
* Popup the widget at the specified position
|
|
|
2040
|
*/
|
|
|
2041
|
open(args: PopupOpenArgs): PlaceLocation;
|
|
|
2042
|
|
|
|
2043
|
/**
|
|
|
2044
|
* Close specified popup and any popups that it parented.
|
|
|
2045
|
* If no popup is specified, closes all popups.
|
|
|
2046
|
*/
|
|
|
2047
|
close(popup?: _WidgetBase): void;
|
|
|
2048
|
}
|
|
|
2049
|
|
|
|
2050
|
/* dijit/PopupMenuBarItem */
|
|
|
2051
|
|
|
|
2052
|
interface PopupMenuBarItem extends PopupMenuItem { }
|
|
|
2053
|
|
|
|
2054
|
interface PopupMenuBarItemConstructor extends _WidgetBaseConstructor<PopupMenuBarItem> { }
|
|
|
2055
|
|
|
|
2056
|
/** dijit/PopupMenuItem */
|
|
|
2057
|
|
|
|
2058
|
/**
|
|
|
2059
|
* An item in a Menu that spawn a drop down (usually a drop down menu)
|
|
|
2060
|
*/
|
|
|
2061
|
interface PopupMenuItem extends MenuItem {
|
|
|
2062
|
/**
|
|
|
2063
|
* When Menu is declared in markup, this code gets the menu label and the popup widget from the srcNodeRef.
|
|
|
2064
|
*
|
|
|
2065
|
* srcNodeRef.innerHTML contains both the menu item text and a popup widget
|
|
|
2066
|
* The first part holds the menu item text and the second part is the popup
|
|
|
2067
|
*/
|
|
|
2068
|
_fillContent(source: Element): void;
|
|
|
2069
|
|
|
|
2070
|
/**
|
|
|
2071
|
* Open the popup to the side of/underneath this MenuItem, and optionally focus first item
|
|
|
2072
|
*/
|
|
|
2073
|
_openPopup(params: { around?: Element; popup?: Function }, focus?: boolean): void;
|
|
|
2074
|
|
|
|
2075
|
_closePopup(): void;
|
|
|
2076
|
}
|
|
|
2077
|
|
|
|
2078
|
interface PopupMenuItemConstructor extends _WidgetBaseConstructor<PopupMenuItem> { }
|
|
|
2079
|
|
|
|
2080
|
/* dijit/registry */
|
|
|
2081
|
|
|
|
2082
|
interface Registry {
|
|
|
2083
|
/**
|
|
|
2084
|
* Number of registered widgets
|
|
|
2085
|
*/
|
|
|
2086
|
length: number;
|
|
|
2087
|
|
|
|
2088
|
/**
|
|
|
2089
|
* Add a widget to the registry. If a duplicate ID is detected, a error is thrown.
|
|
|
2090
|
*/
|
|
|
2091
|
add(widget: _WidgetBase): void;
|
|
|
2092
|
|
|
|
2093
|
/**
|
|
|
2094
|
* Remove a widget from the registry. Does not destroy the widget; simply
|
|
|
2095
|
* removes the reference.
|
|
|
2096
|
*/
|
|
|
2097
|
remove(id: string): void;
|
|
|
2098
|
|
|
|
2099
|
/**
|
|
|
2100
|
* Find a widget by it's id.
|
|
|
2101
|
* If passed a widget then just returns the widget.
|
|
|
2102
|
*/
|
|
|
2103
|
byId(id: string | _WidgetBase): _WidgetBase;
|
|
|
2104
|
|
|
|
2105
|
/**
|
|
|
2106
|
* Returns the widget corresponding to the given DOMNode
|
|
|
2107
|
*/
|
|
|
2108
|
byNode(node: Element | Node): _WidgetBase;
|
|
|
2109
|
|
|
|
2110
|
/**
|
|
|
2111
|
* Convert registry into a true Array
|
|
|
2112
|
*/
|
|
|
2113
|
toArray(): _WidgetBase[];
|
|
|
2114
|
|
|
|
2115
|
/**
|
|
|
2116
|
* Generates a unique id for a given widgetType
|
|
|
2117
|
*/
|
|
|
2118
|
getUniqueId(widgetType: string): string;
|
|
|
2119
|
|
|
|
2120
|
/**
|
|
|
2121
|
* Search subtree under root returning widgets found.
|
|
|
2122
|
* Doesn't search for nested widgets (ie, widgets inside other widgets).
|
|
|
2123
|
*/
|
|
|
2124
|
findWidgets(root: Node, skipNode?: Node): _WidgetBase[];
|
|
|
2125
|
|
|
|
2126
|
/**
|
|
|
2127
|
* Returns the widget whose DOM tree contains the specified DOMNode, or null if
|
|
|
2128
|
* the node is not contained within the DOM tree of any widget
|
|
|
2129
|
*/
|
|
|
2130
|
getEnclosingWidget(node: Element | Node): _WidgetBase;
|
|
|
2131
|
}
|
|
|
2132
|
|
|
|
2133
|
/* dijit/TitlePane */
|
|
|
2134
|
|
|
|
2135
|
interface TitlePane extends dijit.layout.ContentPane, _TemplatedMixin, _CssStateMixin {
|
|
|
2136
|
/**
|
|
|
2137
|
* Whether pane can be opened or closed by clicking the title bar.
|
|
|
2138
|
*/
|
|
|
2139
|
toggleable: boolean;
|
|
|
2140
|
|
|
|
2141
|
/**
|
|
|
2142
|
* Tabindex setting for the title (so users can tab to the title then use space/enter to open/close the title pane)
|
|
|
2143
|
*/
|
|
|
2144
|
tabIndex: string;
|
|
|
2145
|
|
|
|
2146
|
/**
|
|
|
2147
|
* Time in milliseconds to fade in/fade out
|
|
|
2148
|
*/
|
|
|
2149
|
duration: number;
|
|
|
2150
|
|
|
|
2151
|
/**
|
|
|
2152
|
* Don't change this parameter from the default value.
|
|
|
2153
|
*
|
|
|
2154
|
* 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.
|
|
|
2155
|
*/
|
|
|
2156
|
doLayout: boolean;
|
|
|
2157
|
|
|
|
2158
|
/**
|
|
|
2159
|
* Switches between opened and closed state
|
|
|
2160
|
*/
|
|
|
2161
|
toggle(): void;
|
|
|
2162
|
|
|
|
2163
|
/**
|
|
|
2164
|
* Set the open/close css state for the TitlePane
|
|
|
2165
|
*/
|
|
|
2166
|
_setCss(): void;
|
|
|
2167
|
|
|
|
2168
|
/**
|
|
|
2169
|
* Handler for when user hits a key
|
|
|
2170
|
*/
|
|
|
2171
|
_onTitleKey(e: Event): void;
|
|
|
2172
|
|
|
|
2173
|
/**
|
|
|
2174
|
* Handler when user clicks the title bar
|
|
|
2175
|
*/
|
|
|
2176
|
_onTitleClick(): void;
|
|
|
2177
|
|
|
|
2178
|
/**
|
|
|
2179
|
* Deprecated. Use set('title', ...) instead.
|
|
|
2180
|
*/
|
|
|
2181
|
setTitle(): void;
|
|
|
2182
|
}
|
|
|
2183
|
|
|
|
2184
|
interface TitlePaneConstructor extends _WidgetBaseConstructor<TitlePane> { }
|
|
|
2185
|
|
|
|
2186
|
/* dijit/Toolbar */
|
|
|
2187
|
|
|
|
2188
|
interface Toolbar extends dijit._Widget, dijit._TemplatedMixin, dijit._KeyNavContainer { }
|
|
|
2189
|
|
|
|
2190
|
interface ToolbarConstructor extends _WidgetBaseConstructor<Toolbar> { }
|
|
|
2191
|
|
|
|
2192
|
/* dijit/ToolbarSeparator */
|
|
|
2193
|
|
|
|
2194
|
interface ToolbarSeparator extends dijit._Widget, dijit._TemplatedMixin { }
|
|
|
2195
|
|
|
|
2196
|
interface ToolbarSeparatorConstructor extends _WidgetBaseConstructor<ToolbarSeparator> { }
|
|
|
2197
|
|
|
|
2198
|
/* dijit/Tooltip */
|
|
|
2199
|
|
|
|
2200
|
interface Tooltip extends _Widget {
|
|
|
2201
|
/**
|
|
|
2202
|
* HTML to display in the tooltip.
|
|
|
2203
|
* Specified as innerHTML when creating the widget from markup.
|
|
|
2204
|
*/
|
|
|
2205
|
label: string;
|
|
|
2206
|
|
|
|
2207
|
/**
|
|
|
2208
|
* Number of milliseconds to wait after hovering over/focusing on the object, before
|
|
|
2209
|
* the tooltip is displayed.
|
|
|
2210
|
*/
|
|
|
2211
|
showDelay: number;
|
|
|
2212
|
|
|
|
2213
|
/**
|
|
|
2214
|
* Number of milliseconds to wait after unhovering the object, before
|
|
|
2215
|
* the tooltip is hidden. Note that blurring an object hides the tooltip immediately.
|
|
|
2216
|
*/
|
|
|
2217
|
hideDelay: number;
|
|
|
2218
|
|
|
|
2219
|
/**
|
|
|
2220
|
* Id of domNode(s) to attach the tooltip to.
|
|
|
2221
|
* When user hovers over specified dom node(s), the tooltip will appear.
|
|
|
2222
|
*/
|
|
|
2223
|
connectId: dojo.NodeOrString | dojo.NodeOrString[];
|
|
|
2224
|
|
|
|
2225
|
/**
|
|
|
2226
|
* See description of `dijit/Tooltip.defaultPosition` for details on position parameter.
|
|
|
2227
|
*/
|
|
|
2228
|
position: string;
|
|
|
2229
|
|
|
|
2230
|
/**
|
|
|
2231
|
* CSS expression to apply this Tooltip to descendants of connectIds, rather than to
|
|
|
2232
|
* the nodes specified by connectIds themselves. Useful for applying a Tooltip to
|
|
|
2233
|
* a range of rows in a table, tree, etc. Use in conjunction with getContent() parameter.
|
|
|
2234
|
* Ex: connectId: myTable, selector: "tr", getContent: function(node){ return ...; }
|
|
|
2235
|
*
|
|
|
2236
|
* The application must require() an appropriate level of dojo/query to handle the selector.
|
|
|
2237
|
*/
|
|
|
2238
|
selector: string;
|
|
|
2239
|
|
|
|
2240
|
/**
|
|
|
2241
|
* Attach tooltip to specified node if it's not already connected
|
|
|
2242
|
*/
|
|
|
2243
|
addTarget(node: dojo.NodeOrString): void;
|
|
|
2244
|
|
|
|
2245
|
/**
|
|
|
2246
|
* Detach tooltip from specified node
|
|
|
2247
|
*/
|
|
|
2248
|
removeTarget(node: dojo.NodeOrString): void;
|
|
|
2249
|
|
|
|
2250
|
/**
|
|
|
2251
|
* User overridable function that return the text to display in the tooltip.
|
|
|
2252
|
*/
|
|
|
2253
|
getContent(node: Node): Node;
|
|
|
2254
|
|
|
|
2255
|
/**
|
|
|
2256
|
* Display the tooltip; usually not called directly.
|
|
|
2257
|
*/
|
|
|
2258
|
open(target: Node): void;
|
|
|
2259
|
|
|
|
2260
|
/**
|
|
|
2261
|
* Hide the tooltip or cancel timer for show of tooltip
|
|
|
2262
|
*/
|
|
|
2263
|
close(): void;
|
|
|
2264
|
|
|
|
2265
|
/**
|
|
|
2266
|
* Called when the tooltip is shown
|
|
|
2267
|
*/
|
|
|
2268
|
onShow(): void;
|
|
|
2269
|
|
|
|
2270
|
/**
|
|
|
2271
|
* Called when the tooltip is hidden
|
|
|
2272
|
*/
|
|
|
2273
|
onHide(): void;
|
|
|
2274
|
}
|
|
|
2275
|
|
|
|
2276
|
interface TooltipConstructor extends _WidgetBaseConstructor<Tooltip> {
|
|
|
2277
|
/**
|
|
|
2278
|
* This variable controls the position of tooltips, if the position is not specified to
|
|
|
2279
|
* the Tooltip widget or *TextBox widget itself. It's an array of strings with the values
|
|
|
2280
|
* possible for `dijit/place.around()`. The recommended values are:
|
|
|
2281
|
*
|
|
|
2282
|
* - before-centered: centers tooltip to the left of the anchor node/widget, or to the right
|
|
|
2283
|
* in the case of RTL scripts like Hebrew and Arabic
|
|
|
2284
|
* - after-centered: centers tooltip to the right of the anchor node/widget, or to the left
|
|
|
2285
|
* in the case of RTL scripts like Hebrew and Arabic
|
|
|
2286
|
* - above-centered: tooltip is centered above anchor node
|
|
|
2287
|
* - below-centered: tooltip is centered above anchor node
|
|
|
2288
|
*
|
|
|
2289
|
* The list is positions is tried, in order, until a position is found where the tooltip fits
|
|
|
2290
|
* within the viewport.
|
|
|
2291
|
*
|
|
|
2292
|
* Be careful setting this parameter. A value of "above-centered" may work fine until the user scrolls
|
|
|
2293
|
* the screen so that there's no room above the target node. Nodes with drop downs, like
|
|
|
2294
|
* DropDownButton or FilteringSelect, are especially problematic, in that you need to be sure
|
|
|
2295
|
* that the drop down and tooltip don't overlap, even when the viewport is scrolled so that there
|
|
|
2296
|
* is only room below (or above) the target node, but not both.
|
|
|
2297
|
*/
|
|
|
2298
|
defaultPosition: [string];
|
|
|
2299
|
|
|
|
2300
|
/**
|
|
|
2301
|
* Static method to display tooltip w/specified contents in specified position.
|
|
|
2302
|
* See description of dijit/Tooltip.defaultPosition for details on position parameter.
|
|
|
2303
|
* If position is not specified then dijit/Tooltip.defaultPosition is used.
|
|
|
2304
|
*/
|
|
|
2305
|
show(innerHTML: string, aroundNode: PlaceRectangle, position?: [string], rtl?: boolean, textDir?: string, onMouseEnter?: Function, onMouseLeave?: Function): void;
|
|
|
2306
|
|
|
|
2307
|
/**
|
|
|
2308
|
* Hide the tooltip
|
|
|
2309
|
*/
|
|
|
2310
|
hide(aroundNode: PlaceRectangle): void;
|
|
|
2311
|
}
|
|
|
2312
|
|
|
|
2313
|
/* dijit/TooltipDialog */
|
|
|
2314
|
|
|
|
2315
|
interface TooltipDialog extends layout.ContentPane, _TemplatedMixin, form._FormMixin, _DialogMixin {
|
|
|
2316
|
/**
|
|
|
2317
|
* Description of tooltip dialog (required for a11y)
|
|
|
2318
|
*/
|
|
|
2319
|
title: string;
|
|
|
2320
|
|
|
|
2321
|
/**
|
|
|
2322
|
* Don't change this parameter from the default value.
|
|
|
2323
|
* This ContentPane parameter doesn't make sense for TooltipDialog, since TooltipDialog
|
|
|
2324
|
* is never a child of a layout container, nor can you specify the size of
|
|
|
2325
|
* TooltipDialog in order to control the size of an inner widget.
|
|
|
2326
|
*/
|
|
|
2327
|
doLayout: boolean;
|
|
|
2328
|
|
|
|
2329
|
/**
|
|
|
2330
|
* A Toggle to modify the default focus behavior of a Dialog, which
|
|
|
2331
|
* is to focus on the first dialog element after opening the dialog.
|
|
|
2332
|
* False will disable autofocusing. Default: true.
|
|
|
2333
|
*/
|
|
|
2334
|
autofocus: boolean;
|
|
|
2335
|
|
|
|
2336
|
/**
|
|
|
2337
|
* The pointer to the first focusable node in the dialog.
|
|
|
2338
|
*/
|
|
|
2339
|
_firstFocusItem: any;
|
|
|
2340
|
|
|
|
2341
|
/**
|
|
|
2342
|
* The pointer to which node has focus prior to our dialog.
|
|
|
2343
|
*/
|
|
|
2344
|
_lastFocusItem: any;
|
|
|
2345
|
|
|
|
2346
|
/**
|
|
|
2347
|
* Configure widget to be displayed in given position relative to the button.
|
|
|
2348
|
*
|
|
|
2349
|
* This is called from the dijit.popup code, and should not be called directly.
|
|
|
2350
|
*/
|
|
|
2351
|
orient(node: Node | HTMLElement, aroundCorner: PlaceCorner, tooltipCorner: PlaceCorner): void;
|
|
|
2352
|
|
|
|
2353
|
/**
|
|
|
2354
|
* Focus on first field
|
|
|
2355
|
*/
|
|
|
2356
|
focus(): void;
|
|
|
2357
|
|
|
|
2358
|
/**
|
|
|
2359
|
* Called when dialog is displayed.
|
|
|
2360
|
*
|
|
|
2361
|
* This is called from the dijit.popup code, and should not be called directly.
|
|
|
2362
|
*/
|
|
|
2363
|
onOpen(pos: {
|
|
|
2364
|
aroundCorner: PlaceCorner
|
|
|
2365
|
aroundNodePos: PlacePosition
|
|
|
2366
|
corner: PlaceCorner
|
|
|
2367
|
x: number
|
|
|
2368
|
y: number
|
|
|
2369
|
}): void;
|
|
|
2370
|
|
|
|
2371
|
/**
|
|
|
2372
|
* Handler for keydown events
|
|
|
2373
|
*
|
|
|
2374
|
* Keep keyboard focus in dialog; close dialog on escape key
|
|
|
2375
|
*/
|
|
|
2376
|
_onKey(evt: KeyboardEvent): void;
|
|
|
2377
|
}
|
|
|
2378
|
|
|
|
2379
|
interface TooltipDialogConstructor extends _WidgetBaseConstructor<TooltipDialog> { }
|
|
2303
|
2380
|
}
|