##// END OF EJS Templates
Maintenance release...
cin -
r8:b71d8639b457 v1.0.1 default
parent child
Show More
@@ -0,0 +1,33
1 # dojo-typings
2
3 This project is forked from the original `dojo-typings` package to
4 improve it with more tight and customizable type definitions.
5
6 The primary aims are
7
8 * Parametrize collections with items type.
9 * Distinguish sync and async methods in stores.
10 * Parametrize widget typings with event and attribute maps.
11
12 ## Changes
13
14 ### 1.0.1
15
16 Maintenance release
17
18 * `NodeList-fx` added overloads to all methods to distinguish returned values
19 of different types (`Animation | this`).
20 * Added missing signatures to `NodeList` constructor
21 * Improved `dijit.form._FormWidgetMixin`
22 * Added module declarations `dijit/form/_FormWidgetMixin`,
23 `dijit/form/_FormValueMixin`, `dijit/_HasDropDown`
24
25 ### 1.0.0
26
27 Initial release
28
29 * Parametrized `dojo/Stateful`, `diji/_WidgetBase`
30 * split `dojo.store.api.Store` in two `SyncStore` and `AsyncStore` interfaces
31 * `dojo/store/Memory` implements `SyncStore` and can be used synchronously,
32 * `dojo/store/Rest` implements `AsyncStore` and all its methods are
33 returning explicit promises.
@@ -0,0 +1,8
1 import "dojo/NodeList-fx";
2
3 declare const nl: dojo.NodeList<Node>;
4
5 const anim: dojo._base.Animation = nl.fadeIn();
6 const anim2: dojo._base.Animation = nl.fadeIn({duration: 500});
7 const nl2: typeof nl = nl.fadeOut({auto: true, onEnd: () => {}});
8 const other = nl.fadeOut({auto: false}); No newline at end of file
This diff has been collapsed as it changes many lines, (3103 lines changed) Show them Hide them
@@ -1,1889 +1,1868
1 declare namespace dijit {
1 declare namespace dijit {
2
2
3 namespace form {
3 namespace form {
4
4
5 /* implied */
5 /* implied */
6
6
7 interface Constraints {
7 interface Constraints {
8 [prop: string]: any;
8 [prop: string]: any;
9 }
9 }
10
10
11 interface ConstrainedValueFunction<V = any, C extends Constraints = Constraints, T = any> {
11 interface ConstrainedValueFunction<V = any, C extends Constraints = Constraints, T = any> {
12 /**
12 /**
13 * Returns a value that has been constrained by the constraints
13 * Returns a value that has been constrained by the constraints
14 * @param value The value to constrain
14 * @param value The value to constrain
15 * @param constraints The constraints to use
15 * @param constraints The constraints to use
16 * @returns The constrained value
16 * @returns The constrained value
17 */
17 */
18 (value: V, constraints: C): T;
18 (value: V, constraints: C): T;
19 }
19 }
20
20
21 interface ConstrainedValidFunction<C extends Constraints = Constraints> {
21 interface ConstrainedValidFunction<C extends Constraints = Constraints> {
22 /**
22 /**
23 * Returns true if the value is valid based on the constraints, otherwise
23 * Returns true if the value is valid based on the constraints, otherwise
24 * returns false.
24 * returns false.
25 * @param value The value to check
25 * @param value The value to check
26 * @param constraints The constraints to use
26 * @param constraints The constraints to use
27 * @returns true if valid, otherwise false
27 * @returns true if valid, otherwise false
28 */
28 */
29 (value: any, constraints: C): boolean;
29 (value: any, constraints: C): boolean;
30 }
30 }
31
31
32 interface ConstraintsToRegExpString<C extends Constraints = Constraints> {
32 interface ConstraintsToRegExpString<C extends Constraints = Constraints> {
33 /**
33 /**
34 * Takes a set of constraints and returns a RegExpString that can be used
34 * Takes a set of constraints and returns a RegExpString that can be used
35 * to match values against
35 * to match values against
36 * @param constraints The constraints to use
36 * @param constraints The constraints to use
37 * @returns The RegExpString that represents the constraints
37 * @returns The RegExpString that represents the constraints
38 */
38 */
39 (constraints: C): string;
39 (constraints: C): string;
40 }
40 }
41
41
42 interface SerializationFunction {
42 interface SerializationFunction {
43 (val: any, options?: Object): string;
43 (val: any, options?: Object): string;
44 }
44 }
45
45
46 /* dijit/form/_AutoCompleterMixin */
46 /* dijit/form/_AutoCompleterMixin */
47
47
48 /* tslint:disable:class-name */
48 /* tslint:disable:class-name */
49 interface _AutoCompleterMixin<T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> extends _SearchMixin<T, Q, O> {
49 interface _AutoCompleterMixin<T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> extends _SearchMixin<T, Q, O> {
50 /**
50 /**
51 * This is the item returned by the dojo/store/api/Store implementation that
51 * This is the item returned by the dojo/store/api/Store implementation that
52 * provides the data for this ComboBox, it's the currently selected item.
52 * provides the data for this ComboBox, it's the currently selected item.
53 */
53 */
54 item: T;
54 item: T;
55
55
56 /**
56 /**
57 * If user types in a partial string, and then tab out of the `<input>` box,
57 * If user types in a partial string, and then tab out of the `<input>` box,
58 * automatically copy the first entry displayed in the drop down list to
58 * automatically copy the first entry displayed in the drop down list to
59 * the `<input>` field
59 * the `<input>` field
60 */
60 */
61 autoComplete: boolean;
61 autoComplete: boolean;
62
62
63 /**
63 /**
64 * One of: "first", "all" or "none".
64 * One of: "first", "all" or "none".
65 */
65 */
66 highlightMatch: string;
66 highlightMatch: string;
67 /* TODO: Uncomment for TS 1.8 and remove above */
67 /* TODO: Uncomment for TS 1.8 and remove above */
68 /* highlightMatch: 'fisrt' | 'all' | 'none'; */
68 /* highlightMatch: 'fisrt' | 'all' | 'none'; */
69
69
70 /**
70 /**
71 * The entries in the drop down list come from this attribute in the
71 * The entries in the drop down list come from this attribute in the
72 * dojo.data items.
72 * dojo.data items.
73 * If not specified, the searchAttr attribute is used instead.
73 * If not specified, the searchAttr attribute is used instead.
74 */
74 */
75 labelAttr: string;
75 labelAttr: string;
76
76
77 /**
77 /**
78 * Specifies how to interpret the labelAttr in the data store items.
78 * Specifies how to interpret the labelAttr in the data store items.
79 * Can be "html" or "text".
79 * Can be "html" or "text".
80 */
80 */
81 labelType: string;
81 labelType: string;
82
82
83 /**
83 /**
84 * Flags to _HasDropDown to limit height of drop down to make it fit in viewport
84 * Flags to _HasDropDown to limit height of drop down to make it fit in viewport
85 */
85 */
86 maxHeight: number;
86 maxHeight: number;
87
87
88 /**
88 /**
89 * For backwards compatibility let onClick events propagate, even clicks on the down arrow button
89 * For backwards compatibility let onClick events propagate, even clicks on the down arrow button
90 */
90 */
91 _stopClickEvents: boolean;
91 _stopClickEvents: boolean;
92
92
93 _getCaretPos(element: HTMLElement): number;
93 _getCaretPos(element: HTMLElement): number;
94 _setCaretPos(element: HTMLElement, location: number): void;
94 _setCaretPos(element: HTMLElement, location: number): void;
95
95
96 /**
96 /**
97 * Overrides _HasDropDown.loadDropDown().
97 * Overrides _HasDropDown.loadDropDown().
98 */
98 */
99 loadDropDown(loadCallback: () => void): void;
99 loadDropDown(loadCallback: () => void): void;
100
100
101 /**
101 /**
102 * signal to _HasDropDown that it needs to call loadDropDown() to load the
102 * signal to _HasDropDown that it needs to call loadDropDown() to load the
103 * drop down asynchronously before displaying it
103 * drop down asynchronously before displaying it
104 */
104 */
105 isLoaded(): boolean;
105 isLoaded(): boolean;
106
106
107 /**
107 /**
108 * Overrides _HasDropDown.closeDropDown(). Closes the drop down (assuming that it's open).
108 * Overrides _HasDropDown.closeDropDown(). Closes the drop down (assuming that it's open).
109 * This method is the callback when the user types ESC or clicking
109 * This method is the callback when the user types ESC or clicking
110 * the button icon while the drop down is open. It's also called by other code.
110 * the button icon while the drop down is open. It's also called by other code.
111 */
111 */
112 closeDropDown(focus?: boolean): void;
112 closeDropDown(focus?: boolean): void;
113
113
114 postMixInProperties(): void;
114 postMixInProperties(): void;
115 postCreate(): void;
115 postCreate(): void;
116
116
117 /**
117 /**
118 * Highlights the string entered by the user in the menu. By default this
118 * Highlights the string entered by the user in the menu. By default this
119 * highlights the first occurrence found. Override this method
119 * highlights the first occurrence found. Override this method
120 * to implement your custom highlighting.
120 * to implement your custom highlighting.
121 */
121 */
122 doHighlight(label: string, find: string): string;
122 doHighlight(label: string, find: string): string;
123 reset(): void;
123 reset(): void;
124 labelFunc(item: T, store: dojo.store.api.Store<T, Q, O>): string;
124 labelFunc(item: T, store: dojo.store.api.Store<T, Q, O>): string;
125
125
126 // set(name: 'value', value: string): this;
126 // set(name: 'value', value: string): this;
127 // set(name: 'item', value: T): this;
127 // set(name: 'item', value: T): this;
128 // set(name: 'disabled', value: boolean): this;
128 // set(name: 'disabled', value: boolean): this;
129 // set(name: string, value: any): this;
129 // set(name: string, value: any): this;
130 // set(values: Object): this;
130 // set(values: Object): this;
131 }
131 }
132
132
133 /* dijit/form/_ButtonMixin */
133 /* dijit/form/_ButtonMixin */
134
134
135 interface _ButtonMixin {
135 interface _ButtonMixin {
136 /**
136 /**
137 * A mixin to add a thin standard API wrapper to a normal HTML button
137 * A mixin to add a thin standard API wrapper to a normal HTML button
138 */
138 */
139 label: string;
139 label: string;
140
140
141 /**
141 /**
142 * Type of button (submit, reset, button, checkbox, radio)
142 * Type of button (submit, reset, button, checkbox, radio)
143 */
143 */
144 type: string;
144 type: string;
145 postCreate(): void;
145 postCreate(): void;
146
146
147 /**
147 /**
148 * Callback for when button is clicked.
148 * Callback for when button is clicked.
149 * If type="submit", return true to perform submit, or false to cancel it.
149 * If type="submit", return true to perform submit, or false to cancel it.
150 */
150 */
151 onClick(e: MouseEvent): boolean | void;
151 onClick(e: MouseEvent): boolean | void;
152 onSetLabel(e: Event): void;
152 onSetLabel(e: Event): void;
153 }
153 }
154
154
155 /* dijit/form/_CheckBoxMixin */
155 /* dijit/form/_CheckBoxMixin */
156
156
157 interface _CheckBoxMixin {
157 interface _CheckBoxMixin {
158 /**
158 /**
159 * type attribute on `<input>` node.
159 * type attribute on `<input>` node.
160 * Overrides `dijit/form/Button.type`. Users should not change this value.
160 * Overrides `dijit/form/Button.type`. Users should not change this value.
161 */
161 */
162 type: string;
162 type: string;
163
163
164 /**
164 /**
165 * As an initialization parameter, equivalent to value field on normal checkbox
165 * As an initialization parameter, equivalent to value field on normal checkbox
166 * (if checked, the value is passed as the value when form is submitted).
166 * (if checked, the value is passed as the value when form is submitted).
167 */
167 */
168 value: string;
168 value: string;
169
169
170 /**
170 /**
171 * Should this widget respond to user input?
171 * Should this widget respond to user input?
172 * In markup, this is specified as "readOnly".
172 * In markup, this is specified as "readOnly".
173 * Similar to disabled except readOnly form values are submitted.
173 * Similar to disabled except readOnly form values are submitted.
174 */
174 */
175 readOnly: boolean;
175 readOnly: boolean;
176
176
177 reset: () => void;
177 reset: () => void;
178 }
178 }
179
179
180 /* dijit/form/_ComboBoxMenu */
180 /* dijit/form/_ComboBoxMenu */
181
181
182 interface _ComboBoxMenu<T = any> extends _WidgetBase, _TemplatedMixin, _ListMouseMixin, _ComboBoxMenuMixin<T> {
182 interface _ComboBoxMenu<T = any> extends _WidgetBase, _TemplatedMixin, _ListMouseMixin, _ComboBoxMenuMixin<T> {
183 templateString: string;
183 templateString: string;
184 baseClass: string;
184 baseClass: string;
185
185
186 /**
186 /**
187 * Add hover CSS
187 * Add hover CSS
188 */
188 */
189 onHover(node: HTMLElement): void;
189 onHover(node: HTMLElement): void;
190
190
191 /**
191 /**
192 * Remove hover CSS
192 * Remove hover CSS
193 */
193 */
194 onUnhover(node: HTMLElement): void;
194 onUnhover(node: HTMLElement): void;
195
195
196 /**
196 /**
197 * Add selected CSS
197 * Add selected CSS
198 */
198 */
199 onSelect(node: HTMLElement): void;
199 onSelect(node: HTMLElement): void;
200
200
201 /**
201 /**
202 * Remove selected CSS
202 * Remove selected CSS
203 */
203 */
204 onDeselect(node: HTMLElement): void;
204 onDeselect(node: HTMLElement): void;
205
205
206 /**
206 /**
207 * Handles page-up and page-down keypresses
207 * Handles page-up and page-down keypresses
208 */
208 */
209 _page(up?: boolean): void;
209 _page(up?: boolean): void;
210
210
211 /**
211 /**
212 * Handle keystroke event forwarded from ComboBox, returning false if it's
212 * Handle keystroke event forwarded from ComboBox, returning false if it's
213 * a keystroke I recognize and process, true otherwise.
213 * a keystroke I recognize and process, true otherwise.
214 */
214 */
215 handleKey(evt: KeyboardEvent): boolean;
215 handleKey(evt: KeyboardEvent): boolean;
216
216
217 // set(name: string, value: any): this;
217 // set(name: string, value: any): this;
218 // set(values: Object): this;
218 // set(values: Object): this;
219 }
219 }
220
220
221 interface _ComboBoxMenuConstructor extends _WidgetBaseConstructor<_ComboBoxMenu<any>> {
221 interface _ComboBoxMenuConstructor extends _WidgetBaseConstructor<_ComboBoxMenu<any>> {
222 new <T = any>(params: Object, srcNodeRef: dojo.NodeOrString): _ComboBoxMenu<T>;
222 new <T = any>(params: Object, srcNodeRef: dojo.NodeOrString): _ComboBoxMenu<T>;
223 }
223 }
224
224
225 /* dijit/form/_ComboBoxMenuMixin */
225 /* dijit/form/_ComboBoxMenuMixin */
226
226
227 interface _ComboBoxMenuMixin<T = any> {
227 interface _ComboBoxMenuMixin<T = any> {
228 /**
228 /**
229 * Holds "next" and "previous" text for paging buttons on drop down
229 * Holds "next" and "previous" text for paging buttons on drop down
230 */
230 */
231 _messages: { next: string; previous: string; };
231 _messages: { next: string; previous: string; };
232
233 onClick(node: HTMLElement): void;
234
232
235 /**
233 onClick(node: HTMLElement): void;
236 * Notifies ComboBox/FilteringSelect that user selected an option.
237 */
238 onChange(direction: number): void;
239
234
240 /**
235 /**
241 * Notifies ComboBox/FilteringSelect that user clicked to advance to next/previous page.
236 * Notifies ComboBox/FilteringSelect that user selected an option.
242 */
237 */
243 onPage(direction: number): void;
238 onChange(direction: number): void;
244
239
245 /**
240 /**
246 * Callback from dijit.popup code to this widget, notifying it that it closed
241 * Notifies ComboBox/FilteringSelect that user clicked to advance to next/previous page.
247 */
242 */
248 onClose(): void;
243 onPage(direction: number): void;
249
244
250 /**
245 /**
251 * Fills in the items in the drop down list
246 * Callback from dijit.popup code to this widget, notifying it that it closed
252 */
247 */
253 createOptions(results: T[], options: dojo.store.api.QueryOptions, labelFunc: (item: T) => { html: boolean; label: string; }): void;
248 onClose(): void;
254
249
255 /**
250 /**
256 * Clears the entries in the drop down list, but of course keeps the previous and next buttons.
251 * Fills in the items in the drop down list
257 */
252 */
258 clearResultList(): void;
253 createOptions(results: T[], options: dojo.store.api.QueryOptions, labelFunc: (item: T) => { html: boolean; label: string; }): void;
259
254
260 /**
255 /**
261 * Highlight the first real item in the list (not Previous Choices).
256 * Clears the entries in the drop down list, but of course keeps the previous and next buttons.
262 */
257 */
263 highlightFirstOption(): void;
258 clearResultList(): void;
264
259
265 /**
260 /**
266 * Highlight the last real item in the list (not More Choices).
261 * Highlight the first real item in the list (not Previous Choices).
267 */
262 */
268 highlightLastOption(): void;
263 highlightFirstOption(): void;
264
265 /**
266 * Highlight the last real item in the list (not More Choices).
267 */
268 highlightLastOption(): void;
269
269
270 selectFirstNode(): void;
270 selectFirstNode(): void;
271 selectLastNode(): void;
271 selectLastNode(): void;
272 getHighlightedOption(): HTMLElement;
272 getHighlightedOption(): HTMLElement;
273
273
274 // set(name: 'value', value: Object): this;
274 // set(name: 'value', value: Object): this;
275 // set(name: string, value: any): this;
275 // set(name: string, value: any): this;
276 // set(values: Object): this;
276 // set(values: Object): this;
277 }
277 }
278
278
279 /* dijit/form/_DateTimeTextBox */
279 /* dijit/form/_DateTimeTextBox */
280
280
281 interface DateTimeConstraints extends Constraints, dojo.date.DateLocaleFormatOptions { }
281 interface DateTimeConstraints extends Constraints, dojo.date.DateLocaleFormatOptions { }
282
282
283 interface _DateTimeTextBox<T extends _WidgetBase> extends RangeBoundTextBox, _HasDropDown<T> {
283 interface _DateTimeTextBox<T extends _WidgetBase> extends RangeBoundTextBox, _HasDropDown<T> {
284 templateString: string;
284 templateString: string;
285
285
286 /**
286 /**
287 * Set this textbox to display a down arrow button, to open the drop down list.
287 * Set this textbox to display a down arrow button, to open the drop down list.
288 */
288 */
289 hasDownArrow: boolean;
289 hasDownArrow: boolean;
290 cssStateNodes: CSSStateNodes;
290 cssStateNodes: CSSStateNodes;
291
291
292 /**
292 /**
293 * Despite the name, this parameter specifies both constraints on the input
293 * Despite the name, this parameter specifies both constraints on the input
294 * (including starting/ending dates/times allowed) as well as
294 * (including starting/ending dates/times allowed) as well as
295 * formatting options like whether the date is displayed in long (ex: December 25, 2005)
295 * formatting options like whether the date is displayed in long (ex: December 25, 2005)
296 * or short (ex: 12/25/2005) format. See `dijit/form/_DateTimeTextBox.__Constraints` for details.
296 * or short (ex: 12/25/2005) format. See `dijit/form/_DateTimeTextBox.__Constraints` for details.
297 */
297 */
298 constraints: DateTimeConstraints;
298 constraints: DateTimeConstraints;
299
299
300 /**
300 /**
301 * The constraints without the min/max properties. Used by the compare() method
301 * The constraints without the min/max properties. Used by the compare() method
302 */
302 */
303 _unboundedConstraints: DateTimeConstraints;
303 _unboundedConstraints: DateTimeConstraints;
304
304
305 pattern: (options?: dojo.date.DateLocaleFormatOptions | RangeBoundTextBoxConstraints) => string;
305 pattern: (options?: dojo.date.DateLocaleFormatOptions | RangeBoundTextBoxConstraints) => string;
306
306
307 /**
307 /**
308 * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines
308 * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines
309 * at dojo/date and dojo/date/locale.
309 * at dojo/date and dojo/date/locale.
310 */
310 */
311 datePackage: string;
311 datePackage: string;
312
312
313 postMixInProperties(): void;
313 postMixInProperties(): void;
314 compare(val1: Date, val2: Date): number;
314 compare(val1: Date, val2: Date): number;
315 autoWidth: boolean;
315 autoWidth: boolean;
316
316
317 /**
317 /**
318 * Formats the value as a Date, according to specified locale (second argument)
318 * Formats the value as a Date, according to specified locale (second argument)
319 */
319 */
320 format: ConstrainedValueFunction<Date, DateTimeConstraints, string>;
320 format: ConstrainedValueFunction<Date, DateTimeConstraints, string>;
321
321
322 /**
322 /**
323 * Parses as string as a Date, according to constraints
323 * Parses as string as a Date, according to constraints
324 */
324 */
325 parse: ConstrainedValueFunction<string, DateTimeConstraints, Date>;
325 parse: ConstrainedValueFunction<string, DateTimeConstraints, Date>;
326
326
327 serialize(val: any, options?: dojo.date.StampFormatOptions): string;
327 serialize(val: any, options?: dojo.date.StampFormatOptions): string;
328
328
329 /**
329 /**
330 * The default value to focus in the popupClass widget when the textbox value is empty.
330 * The default value to focus in the popupClass widget when the textbox value is empty.
331 */
331 */
332 dropDownDefaultValue: Date;
332 dropDownDefaultValue: Date;
333
333
334 /**
334 /**
335 * The value of this widget as a JavaScript Date object. Use get("value") / set("value", val) to manipulate.
335 * The value of this widget as a JavaScript Date object. Use get("value") / set("value", val) to manipulate.
336 * When passed to the parser in markup, must be specified according to `dojo/date/stamp.fromISOString()`
336 * When passed to the parser in markup, must be specified according to `dojo/date/stamp.fromISOString()`
337 */
337 */
338 value: Date;
338 value: Date;
339
339
340 _blankValue: string;
340 _blankValue: string;
341
341
342 /**
342 /**
343 * Name of the popup widget class used to select a date/time.
343 * Name of the popup widget class used to select a date/time.
344 * Subclasses should specify this.
344 * Subclasses should specify this.
345 */
345 */
346 popupClass: string | _WidgetBaseConstructor<T>;
346 popupClass: string | _WidgetBaseConstructor<T>;
347
347
348 /**
348 /**
349 * Specifies constraints.selector passed to dojo.date functions, should be either
349 * Specifies constraints.selector passed to dojo.date functions, should be either
350 * "date" or "time".
350 * "date" or "time".
351 * Subclass must specify this.
351 * Subclass must specify this.
352 */
352 */
353 _selector: string;
353 _selector: string;
354 /* TODO: uncomment for TS 1.8 */
354 /* TODO: uncomment for TS 1.8 */
355 /* _selector: 'data' | 'time'; */
355 /* _selector: 'data' | 'time'; */
356
356
357 buildRendering(): void;
357 buildRendering(): void;
358
358
359 /**
359 /**
360 * Runs various tests on the value, checking for invalid conditions
360 * Runs various tests on the value, checking for invalid conditions
361 */
361 */
362 _isInvalidDate(value: Date): boolean;
362 _isInvalidDate(value: Date): boolean;
363
363
364 // get(name: 'displayedValue'): string;
364 // get(name: 'displayedValue'): string;
365 // get(name: string): any;
365 // get(name: string): any;
366
366
367 // set(name: 'displayedValue', value: string): this;
367 // set(name: 'displayedValue', value: string): this;
368 // set(name: 'dropDownDefaultValue', value: Date): this;
368 // set(name: 'dropDownDefaultValue', value: Date): this;
369 // set(name: 'value', value: Date | string): this;
369 // set(name: 'value', value: Date | string): this;
370 // set(name: 'constraints', value: DateTimeConstraints): this;
370 // set(name: 'constraints', value: DateTimeConstraints): this;
371 // set(name: string, value: any): this;
371 // set(name: string, value: any): this;
372 // set(values: Object): this;
372 // set(values: Object): this;
373 }
373 }
374
375 interface _DateTimeTextBoxConstructor<T extends _WidgetBase> extends _WidgetBaseConstructor<_DateTimeTextBox<T>> { }
376
374
377 /* dijit/form/_ExpandingTextAreaMixin */
375 interface _DateTimeTextBoxConstructor<T extends _WidgetBase> extends _WidgetBaseConstructor<_DateTimeTextBox<T>> { }
376
377 /* dijit/form/_ExpandingTextAreaMixin */
378
378
379 interface _ExpandingTextAreaMixin {
379 interface _ExpandingTextAreaMixin {
380 postCreate(): void;
380 postCreate(): void;
381 startup(): void;
381 startup(): void;
382 resize(): void;
382 resize(): void;
383 }
383 }
384
384
385 /* dijit/form/_FormMixin */
385 /* dijit/form/_FormMixin */
386
387 interface OnValidStateChange {
388 (isValid?: boolean): void;
389 }
390
386
391 interface _FormMixin {
387 interface OnValidStateChange {
388 (isValid?: boolean): void;
389 }
390
391 interface _FormMixin {
392
392
393 /**
393 /**
394 * Will be "Error" if one or more of the child widgets has an invalid value,
394 * Will be "Error" if one or more of the child widgets has an invalid value,
395 * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "",
395 * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "",
396 * which indicates that the form is ready to be submitted.
396 * which indicates that the form is ready to be submitted.
397 */
397 */
398 state: '' | 'Error' | 'Incomplete';
398 state: '' | 'Error' | 'Incomplete';
399
399
400 /**
400 /**
401 * Returns all form widget descendants, searching through non-form child widgets like BorderContainer
401 * Returns all form widget descendants, searching through non-form child widgets like BorderContainer
402 */
402 */
403 _getDescendantFormWidgets(children?: _WidgetBase[]): _FormWidget[];
403 _getDescendantFormWidgets(children?: _WidgetBase[]): _FormWidget[];
404
405 reset(): void;
406
404
407 /**
405 reset(): void;
408 * returns if the form is valid - same as isValid - but
409 * provides a few additional (ui-specific) features:
410 *
411 * 1. it will highlight any sub-widgets that are not valid
412 * 2. it will call focus() on the first invalid sub-widget
413 */
414 validate(): boolean;
415
406
416 setValues(val: any): _FormMixin;
407 /**
417 getValues(): any;
408 * returns if the form is valid - same as isValid - but
409 * provides a few additional (ui-specific) features:
410 *
411 * 1. it will highlight any sub-widgets that are not valid
412 * 2. it will call focus() on the first invalid sub-widget
413 */
414 validate(): boolean;
415
416 setValues(val: any): _FormMixin;
417 getValues(): any;
418
418
419 /**
419 /**
420 * Returns true if all of the widgets are valid.
420 * Returns true if all of the widgets are valid.
421 * Deprecated, will be removed in 2.0. Use get("state") instead.
421 * Deprecated, will be removed in 2.0. Use get("state") instead.
422 */
422 */
423 isValid(): boolean;
423 isValid(): boolean;
424
424
425 /**
425 /**
426 * Stub function to connect to if you want to do something
426 * Stub function to connect to if you want to do something
427 * (like disable/enable a submit button) when the valid
427 * (like disable/enable a submit button) when the valid
428 * state changes on the form as a whole.
428 * state changes on the form as a whole.
429 *
429 *
430 * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead.
430 * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead.
431 */
431 */
432 onValidStateChange: OnValidStateChange;
432 onValidStateChange: OnValidStateChange;
433
434 /**
435 * Compute what this.state should be based on state of children
436 */
437 _getState(): '' | 'Error' | 'Incomplete';
438
433
439 /**
434 /**
440 * Deprecated method. Applications no longer need to call this. Remove for 2.0.
435 * Compute what this.state should be based on state of children
441 */
436 */
442 disconnectChildren(): void;
437 _getState(): '' | 'Error' | 'Incomplete';
443
438
444 /**
439 /**
445 * You can call this function directly, ex. in the event that you
440 * Deprecated method. Applications no longer need to call this. Remove for 2.0.
446 * programmatically add a widget to the form *after* the form has been
441 */
447 * initialized.
442 disconnectChildren(): void;
448 */
449 connectChildren(inStartup?: boolean): void;
450
443
451 /**
444 /**
452 * Called when child's value or disabled state changes
445 * You can call this function directly, ex. in the event that you
453 */
446 * programmatically add a widget to the form *after* the form has been
454 _onChildChange(attr?: string): void;
447 * initialized.
455
448 */
456 startup(): void;
449 connectChildren(inStartup?: boolean): void;
457 destroy(preserveDom?: boolean): void;
458 }
459
450
460 interface _FormMixinConstructor extends dojo._base.DeclareConstructor<_FormMixin> { }
451 /**
461
452 * Called when child's value or disabled state changes
462 /* dijit/form/_FormSelectWidget */
453 */
454 _onChildChange(attr?: string): void;
463
455
464 interface SelectOption {
456 startup(): void;
465 value?: string;
457 destroy(preserveDom?: boolean): void;
466 label: string;
458 }
467 selected?: boolean;
459
468 disabled?: boolean;
460 interface _FormMixinConstructor extends dojo._base.DeclareConstructor<_FormMixin> { }
469 }
461
462 /* dijit/form/_FormSelectWidget */
470
463
471 interface _FormSelectWidget<T extends Object, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> extends _FormValueWidget {
464 interface SelectOption {
472 /**
465 value?: string;
473 * Whether or not we are multi-valued
466 label: string;
474 */
467 selected?: boolean;
475 multiple: boolean;
468 disabled?: boolean;
469 }
476
470
477 /**
471 interface _FormSelectWidget<T extends Object, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> extends _FormValueWidget {
478 * The set of options for our select item. Roughly corresponds to
472 /**
479 * the html `<option>` tag.
473 * Whether or not we are multi-valued
480 */
474 */
481 options: SelectOption[];
475 multiple: boolean;
482
476
483 /**
477 /**
484 * A store to use for getting our list of options - rather than reading them
478 * The set of options for our select item. Roughly corresponds to
485 * from the `<option>` html tags. Should support getIdentity().
479 * the html `<option>` tag.
486 * For back-compat store can also be a dojo/data/api/Identity.
480 */
487 */
481 options: SelectOption[];
488 store: dojo.store.api.Store<T, Q, O>;
489
482
490 /**
483 /**
491 * A query to use when fetching items from our store
484 * A store to use for getting our list of options - rather than reading them
492 */
485 * from the `<option>` html tags. Should support getIdentity().
493 query: Q;
486 * For back-compat store can also be a dojo/data/api/Identity.
487 */
488 store: dojo.store.api.Store<T, Q, O>;
494
489
495 /**
490 /**
496 * Query options to use when fetching from the store
491 * A query to use when fetching items from our store
497 */
492 */
498 queryOptions: O;
493 query: Q;
499
494
500 /**
495 /**
501 * The entries in the drop down list come from this attribute in the dojo.store items.
496 * Query options to use when fetching from the store
502 * If ``store`` is set, labelAttr must be set too, unless store is an old-style
497 */
503 * dojo.data store rather than a new dojo/store.
498 queryOptions: O;
504 */
505 labelAttr: string;
506
499
507 /**
500 /**
508 * A callback to do with an onFetch - but before any items are actually
501 * The entries in the drop down list come from this attribute in the dojo.store items.
509 * iterated over (i.e. to filter even further what you want to add)
502 * If ``store`` is set, labelAttr must be set too, unless store is an old-style
510 */
503 * dojo.data store rather than a new dojo/store.
511 onFetch: (items: T[]) => void;
504 */
505 labelAttr: string;
512
506
513 /**
507 /**
514 * Flag to sort the options returned from a store by the label of
508 * A callback to do with an onFetch - but before any items are actually
515 * the store.
509 * iterated over (i.e. to filter even further what you want to add)
516 */
510 */
517 sortByLabel: boolean;
511 onFetch: (items: T[]) => void;
512
513 /**
514 * Flag to sort the options returned from a store by the label of
515 * the store.
516 */
517 sortByLabel: boolean;
518
518
519 /**
519 /**
520 * By default loadChildren is called when the items are fetched from the
520 * By default loadChildren is called when the items are fetched from the
521 * store. This property allows delaying loadChildren (and the creation
521 * store. This property allows delaying loadChildren (and the creation
522 * of the options/menuitems) until the user clicks the button to open the
522 * of the options/menuitems) until the user clicks the button to open the
523 * dropdown.
523 * dropdown.
524 */
524 */
525 loadChildrenOnOpen: boolean;
525 loadChildrenOnOpen: boolean;
526
526
527 /**
527 /**
528 * This is the `dojo.Deferred` returned by setStore().
528 * This is the `dojo.Deferred` returned by setStore().
529 * Calling onLoadDeferred.then() registers your
529 * Calling onLoadDeferred.then() registers your
530 * callback to be called only once, when the prior setStore completes.
530 * callback to be called only once, when the prior setStore completes.
531 */
531 */
532 onLoadDeferred: dojo.Deferred<void>;
532 onLoadDeferred: dojo.Deferred<void>;
533
533
534 /**
534 /**
535 * Returns a given option (or options).
535 * Returns a given option (or options).
536 */
536 */
537 getOptions(valueOrIdx: string): SelectOption;
537 getOptions(valueOrIdx: string): SelectOption;
538 getOptions(valueOrIdx: number): SelectOption;
538 getOptions(valueOrIdx: number): SelectOption;
539 getOptions(valueOrIdx: SelectOption): SelectOption;
539 getOptions(valueOrIdx: SelectOption): SelectOption;
540 getOptions(valueOrIdx: (string | number | SelectOption)[]): SelectOption[];
540 getOptions(valueOrIdx: (string | number | SelectOption)[]): SelectOption[];
541 getOptions(): SelectOption[];
541 getOptions(): SelectOption[];
542
542
543 /**
543 /**
544 * Adds an option or options to the end of the select. If value
544 * Adds an option or options to the end of the select. If value
545 * of the option is empty or missing, a separator is created instead.
545 * of the option is empty or missing, a separator is created instead.
546 * Passing in an array of options will yield slightly better performance
546 * Passing in an array of options will yield slightly better performance
547 * since the children are only loaded once.
547 * since the children are only loaded once.
548 */
548 */
549 addOption(option: SelectOption | SelectOption[]): void;
549 addOption(option: SelectOption | SelectOption[]): void;
550
550
551 /**
551 /**
552 * Removes the given option or options. You can remove by string
552 * Removes the given option or options. You can remove by string
553 * (in which case the value is removed), number (in which case the
553 * (in which case the value is removed), number (in which case the
554 * index in the options array is removed), or select option (in
554 * index in the options array is removed), or select option (in
555 * which case, the select option with a matching value is removed).
555 * which case, the select option with a matching value is removed).
556 * You can also pass in an array of those values for a slightly
556 * You can also pass in an array of those values for a slightly
557 * better performance since the children are only loaded once.
557 * better performance since the children are only loaded once.
558 * For numeric option values, specify {value: number} as the argument.
558 * For numeric option values, specify {value: number} as the argument.
559 */
559 */
560 removeOption(option: string | number | SelectOption | (string | number | SelectOption)[]): void;
560 removeOption(option: string | number | SelectOption | (string | number | SelectOption)[]): void;
561
561
562 /**
562 /**
563 * Updates the values of the given option. The option to update
563 * Updates the values of the given option. The option to update
564 * is matched based on the value of the entered option. Passing
564 * is matched based on the value of the entered option. Passing
565 * in an array of new options will yield better performance since
565 * in an array of new options will yield better performance since
566 * the children will only be loaded once.
566 * the children will only be loaded once.
567 */
567 */
568 updateOption(newOption: SelectOption | SelectOption[]): void;
568 updateOption(newOption: SelectOption | SelectOption[]): void;
569
569
570 /**
570 /**
571 * Deprecated!
571 * Deprecated!
572 */
572 */
573 setStore(store: dojo.store.api.Store<T, Q, O>, selectedValue?: T, fetchArgs?: {
573 setStore(store: dojo.store.api.Store<T, Q, O>, selectedValue?: T, fetchArgs?: {
574 query: Q;
574 query: Q;
575 queryOptions: O;
575 queryOptions: O;
576 onFetch: (items: T[], fetchArgs?: any) => void;
576 onFetch: (items: T[], fetchArgs?: any) => void;
577 }): dojo.store.api.Store<T, Q, O>;
577 }): dojo.store.api.Store<T, Q, O>;
578
578
579 /**
579 /**
580 * Sets the store you would like to use with this select widget.
580 * Sets the store you would like to use with this select widget.
581 * The selected value is the value of the new store to set. This
581 * The selected value is the value of the new store to set. This
582 * function returns the original store, in case you want to reuse
582 * function returns the original store, in case you want to reuse
583 * it or something.
583 * it or something.
584 */
584 */
585 _deprecatedSetStore(store: dojo.store.api.Store<T, Q, O>, selectedValue?: T, fetchArgs?: {
585 _deprecatedSetStore(store: dojo.store.api.Store<T, Q, O>, selectedValue?: T, fetchArgs?: {
586 query: Q;
586 query: Q;
587 queryOptions: O;
587 queryOptions: O;
588 onFetch: (items: T[], fetchArgs?: any) => void;
588 onFetch: (items: T[], fetchArgs?: any) => void;
589 }): dojo.store.api.Store<T, Q, O>;
589 }): dojo.store.api.Store<T, Q, O>;
590
590
591 /**
591 /**
592 * Loads the children represented by this widget's options.
592 * Loads the children represented by this widget's options.
593 * reset the menu to make it populatable on the next click
593 * reset the menu to make it populatable on the next click
594 */
594 */
595 _loadChildren(): void;
595 _loadChildren(): void;
596
596
597 /**
597 /**
598 * Sets the "selected" class on the item for styling purposes
598 * Sets the "selected" class on the item for styling purposes
599 */
599 */
600 _updateSelection(): void;
600 _updateSelection(): void;
601
601
602 /**
602 /**
603 * Returns the value of the widget by reading the options for
603 * Returns the value of the widget by reading the options for
604 * the selected flag
604 * the selected flag
605 */
605 */
606 _getValueFromOpts(): string;
606 _getValueFromOpts(): string;
607
607
608 buildRendering(): void;
608 buildRendering(): void;
609
609
610 /**
610 /**
611 * Loads our options and sets up our dropdown correctly. We
611 * Loads our options and sets up our dropdown correctly. We
612 * don't want any content, so we don't call any inherit chain
612 * don't want any content, so we don't call any inherit chain
613 * function.
613 * function.
614 */
614 */
615 _fillContent(): void;
615 _fillContent(): void;
616
616
617 /**
617 /**
618 * sets up our event handling that we need for functioning
618 * sets up our event handling that we need for functioning
619 * as a select
619 * as a select
620 */
620 */
621 postCreate(): void;
621 postCreate(): void;
622
622
623 startup(): void;
623 startup(): void;
624
624
625 /**
625 /**
626 * Clean up our connections
626 * Clean up our connections
627 */
627 */
628 destroy(preserveDom?: boolean): void;
628 destroy(preserveDom?: boolean): void;
629
629
630 /**
630 /**
631 * User-overridable function which, for the given option, adds an
631 * User-overridable function which, for the given option, adds an
632 * item to the select. If the option doesn't have a value, then a
632 * item to the select. If the option doesn't have a value, then a
633 * separator is added in that place. Make sure to store the option
633 * separator is added in that place. Make sure to store the option
634 * in the created option widget.
634 * in the created option widget.
635 */
635 */
636 _addOptionItem(option: SelectOption): void;
636 _addOptionItem(option: SelectOption): void;
637
637
638 /**
638 /**
639 * User-overridable function which, for the given option, removes
639 * User-overridable function which, for the given option, removes
640 * its item from the select.
640 * its item from the select.
641 */
641 */
642 _removeOptionItem(option: SelectOption): void;
642 _removeOptionItem(option: SelectOption): void;
643
643
644 /**
644 /**
645 * Overridable function which will set the display for the
645 * Overridable function which will set the display for the
646 * widget. newDisplay is either a string (in the case of
646 * widget. newDisplay is either a string (in the case of
647 * single selects) or array of strings (in the case of multi-selects)
647 * single selects) or array of strings (in the case of multi-selects)
648 */
648 */
649 _setDisplay(newDisplay: string | string[]): void;
649 _setDisplay(newDisplay: string | string[]): void;
650
650
651 /**
651 /**
652 * Overridable function to return the children that this widget contains.
652 * Overridable function to return the children that this widget contains.
653 */
653 */
654 _getChildren(): any[];
654 _getChildren(): any[];
655
655
656 /**
656 /**
657 * hooks into this.attr to provide a mechanism for getting the
657 * hooks into this.attr to provide a mechanism for getting the
658 * option items for the current value of the widget.
658 * option items for the current value of the widget.
659 */
659 */
660 _getSelectedOptionsAttr(): SelectOption[];
660 _getSelectedOptionsAttr(): SelectOption[];
661
661
662 /**
662 /**
663 * a function that will "fake" loading children, if needed, and
663 * a function that will "fake" loading children, if needed, and
664 * if we have set to not load children until the widget opens.
664 * if we have set to not load children until the widget opens.
665 */
665 */
666 _pseudoLoadChildren(items: T[]): void;
666 _pseudoLoadChildren(items: T[]): void;
667
667
668 /**
668 /**
669 * a function that can be connected to in order to receive a
669 * a function that can be connected to in order to receive a
670 * notification that the store has finished loading and all options
670 * notification that the store has finished loading and all options
671 * from that store are available
671 * from that store are available
672 */
672 */
673 onSetStore(): void;
673 onSetStore(): void;
674 }
674 }
675
675
676 /* dijit/form/_FormValueMixin */
676 /* dijit/form/_FormValueMixin */
677
677
678 interface _FormValueMixin extends _FormWidgetMixin {
678 interface _FormValueMixin extends _FormWidgetMixin {
679
679
680 /**
680 /**
681 * Should this widget respond to user input?
681 * Should this widget respond to user input?
682 * In markup, this is specified as "readOnly".
682 * In markup, this is specified as "readOnly".
683 * Similar to disabled except readOnly form values are submitted.
683 * Similar to disabled except readOnly form values are submitted.
684 */
684 */
685 readOnly: boolean;
685 readOnly: boolean;
686
686
687 postCreate(): void;
687 postCreate(): void;
688
688
689 /**
689 /**
690 * Restore the value to the last value passed to onChange
690 * Restore the value to the last value passed to onChange
691 */
691 */
692 undo(): void;
692 undo(): void;
693
693
694 /**
694 /**
695 * Reset the widget's value to what it was at initialization time
695 * Reset the widget's value to what it was at initialization time
696 */
696 */
697 reset(): void;
697 reset(): void;
698
699 _hasBeenBlurred?: boolean;
700 }
701
702 /* dijit/form/_FormValueWidget */
703
698
704 interface _FormValueWidget extends _FormWidget, _FormValueMixin {
699 _hasBeenBlurred?: boolean;
705 /**
700 }
706 * Work around table sizing bugs on IE7 by forcing redraw
701
707 */
702 /* dijit/form/_FormValueWidget */
708 _layoutHackIE7(): void;
709
703
710 // set(name: string, value: any): this;
704 interface _FormValueWidget extends _FormWidget, _FormValueMixin {
711 // set(values: Object): this;
705 /**
712 }
706 * Work around table sizing bugs on IE7 by forcing redraw
713
707 */
714 interface _FormValueWidgetConstructor extends _WidgetBaseConstructor<_FormValueWidget> { }
708 _layoutHackIE7(): void;
715
716 /* dijit/form/_FormWidget */
717
709
718 interface _FormWidget extends _Widget, _TemplatedMixin, _CssStateMixin, _FormWidgetMixin {
710 // set(name: string, value: any): this;
719 setDisabled(disabled: boolean): void;
711 // set(values: Object): this;
720 setValue(value: string): void;
712 }
721 postMixInProperties(): void;
713
714 interface _FormValueWidgetConstructor extends _WidgetBaseConstructor<_FormValueWidget> { }
722
715
723 // set(name: 'value', value: string): this;
716 /* dijit/form/_FormWidget */
724 // set(name: string, value: any): this;
725 // set(values: Object): this;
726 }
727
717
728 interface _FormWidgetConstructor extends _WidgetBaseConstructor<_FormWidget> { }
718 interface _FormWidget extends _Widget, _TemplatedMixin, _CssStateMixin, _FormWidgetMixin {
729
719 setDisabled(disabled: boolean): void;
730 /* dijit/form/_FormWidgetMixin */
720 setValue(value: string): void;
721 postMixInProperties(): void;
731
722
732 interface _FormWidgetMixin {
723 // set(name: 'value', value: string): this;
733 /**
724 // set(name: string, value: any): this;
734 * Name used when submitting form; same as "name" attribute or plain HTML elements
725 // set(values: Object): this;
735 */
726 }
736 name: string;
737
727
738 /**
728 interface _FormWidgetConstructor extends _WidgetBaseConstructor<_FormWidget> { }
739 * Corresponds to the native HTML `<input>` element's attribute.
729
740 */
730 /* dijit/form/_FormWidgetMixin */
741 alt: string;
742
731
743 /**
732 /**
744 * Corresponds to the native HTML `<input>` element's attribute.
733 * Mixin for widgets corresponding to native HTML elements such as `<checkbox>` or `<button>`,
745 */
734 * which can be children of a `<form>` node or a `dijit/form/Form` widget.
746 value: any;
735 *
747
736 * Represents a single HTML element.
748 /**
737 * All these widgets should have these attributes just like native HTML input elements.
749 * Corresponds to the native HTML `<input>` element's attribute.
738 * You can set them during widget construction or afterwards, via `dijit/_WidgetBase.set()`.
750 */
739 *
751 type: string;
740 * They also share some common methods.
741 */
742 interface _FormWidgetMixin {
743 /**
744 * Name used when submitting form; same as "name" attribute or plain HTML elements
745 */
746 name: string;
752
747
753 /**
754 * Apply aria-label in markup to the widget's focusNode
755 */
756 'aria-label': string;
757
748
758 /**
749 /** Corresponds to the native HTML `<input>` element's attribute. */
759 * Order fields are traversed when user hits the tab key
750 alt: string;
760 */
751
761 tabIndex: number;
752 /** Corresponds to the native HTML `<input>` element's attribute. */
753 value: any;
762
754
763 /**
755 /** Corresponds to the native HTML `<input>` element's attribute. */
764 * Should this widget respond to user input?
756 type: string;
765 * In markup, this is specified as "disabled='disabled'", or just "disabled".
757
766 */
758 /** Apply aria-label in markup to the widget's focusNode */
767 disabled: boolean;
759 "aria-label": "focusNode";
768
760
769 /**
761 /** Order fields are traversed when user hits the tab key */
770 * Fires onChange for each value change or only on demand
762 tabIndex: number;
771 */
763
772 intermediateChanges: boolean;
764 /** Should this widget respond to user input?
765 * In markup, this is specified as "disabled='disabled'", or just "disabled".
766 */
767 disabled: boolean;
773
768
774 /**
769 /** Fires onChange for each value change or only on demand */
775 * On focus, should this widget scroll into view?
770 intermediateChanges: boolean;
776 */
771
777 scrollOnFocus: boolean;
772 /** On focus, should this widget scroll into view? */
773 scrollOnFocus: boolean;
778
774
779 /**
775 _setDisabledAttr(value: boolean): void;
780 * Tells if this widget is focusable or not. Used internally by dijit.
776
781 */
777 _onFocus(by: string): void;
782 isFocusable(): boolean;
783
778
784 /**
779 /** Tells if this widget is focusable or not. Used internally by dijit.
785 * Put focus on this widget
780 * @protected
786 */
781 */
787 focus(): void;
782 isFocusable(): boolean;
788
783
789 /**
784 /** Put focus on this widget */
790 * Compare 2 values (as returned by get('value') for this widget).
785 focus(): void;
791 */
792 compare(val1: any, val2: any): number;
793
786
794 /**
787 /** Compare 2 values (as returned by get('value') for this widget).
795 * Callback when this widget's value is changed.
788 * @protected
796 */
789 */
797 onChange(value: string): void;
790 compare(val1: any, val2: any): number;
798
791
799 /**
792 onChange(newValue: any): void;
800 * Overrides _Widget.create()
801 */
802 create(params?: any, srcNodeRef?: HTMLElement): void;
803
804 destroy(preserveDom?: boolean): void;
805
793
806 // set(name: 'disabled', value: boolean): this;
794 /**
807 // set(name: string, value: any): this;
795 * Hook so set('value', value) works.
808 // set(values: Object): this;
796 *
809 }
797 * Sets the value of the widget.
810
798 * If the value has changed, then fire onChange event, unless priorityChange
811 /* dijit/form/_ListBase */
799 * is specified as null (or false?)
800 *
801 * @param value
802 * @param priorityChange
803 */
804 _setValueAttr(value: any, priorityChange?: boolean);
812
805
813 interface _ListBase {
806 /**
814 /**
807 * Called when the value of the widget has changed. Saves the new value in this.value,
815 * currently selected node
808 * and calls onChange() if appropriate. See _FormWidget._handleOnChange() for details.
816 */
809 *
817 selected: HTMLElement;
810 * @param newValue
818
811 * @param priorityChange
819 /**
812 */
820 * Select the first displayed item in the list.
813 _handleOnChange(newValue: any, priorityChange?: boolean);
821 */
814 }
822 selectFirstNode(): void;
823
815
824 /**
816 /* dijit/form/_ListBase */
825 * Select the last displayed item in the list
826 */
827 selectLastNode(): void;
828
817
829 /**
818 interface _ListBase {
830 * Select the item just below the current selection.
819 /**
831 * If nothing selected, select first node.
820 * currently selected node
832 */
821 */
833 selectNextNode(): void;
822 selected: HTMLElement;
834
823
835 /**
824 /**
836 * Select the item just above the current selection.
825 * Select the first displayed item in the list.
837 * If nothing selected, select last node (if
826 */
838 * you select Previous and try to keep scrolling up the list).
827 selectFirstNode(): void;
839 */
840 selectPreviousNode(): void;
841
828
842 // set(name: 'selected', value: HTMLElement): this;
829 /**
843 // set(name: string, value: any): this;
830 * Select the last displayed item in the list
844 // set(values: Object): this;
831 */
845 }
832 selectLastNode(): void;
846
833
847 /* dijit/form/_ListMouseMixin */
834 /**
835 * Select the item just below the current selection.
836 * If nothing selected, select first node.
837 */
838 selectNextNode(): void;
848
839
849 interface _ListMouseMixin extends _ListBase {
840 /**
850 postCreate(): void;
841 * Select the item just above the current selection.
851 }
842 * If nothing selected, select last node (if
852
843 * you select Previous and try to keep scrolling up the list).
853 /* dijit/form/_RadioButtonMixin */
844 */
845 selectPreviousNode(): void;
854
846
855 interface _RadioButtonMixin {
847 // set(name: 'selected', value: HTMLElement): this;
856 /**
848 // set(name: string, value: any): this;
857 * type attribute on `<input>` node.
849 // set(values: Object): this;
858 * Users should not change this value.
850 }
859 */
851
860 type: string;
852 /* dijit/form/_ListMouseMixin */
861 }
862
853
863 /* dijit/form/_SearchMixin */
854 interface _ListMouseMixin extends _ListBase {
855 postCreate(): void;
856 }
857
858 /* dijit/form/_RadioButtonMixin */
864
859
865 interface _SearchMixin<T extends Object, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> {
860 interface _RadioButtonMixin {
866 /**
861 /**
867 * Argument to data provider.
862 * type attribute on `<input>` node.
868 * Specifies maximum number of search results to return per query
863 * Users should not change this value.
869 */
864 */
870 pageSize: number;
865 type: string;
866 }
871
867
872 /**
868 /* dijit/form/_SearchMixin */
873 * Reference to data provider object used by this ComboBox.
874 * The store must accept an object hash of properties for its query. See `query` and `queryExpr` for details.
875 */
876 store: dojo.store.api.Store<T, Q, O>;
877
869
878 /**
870 interface _SearchMixin<T extends Object, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> {
879 * Mixin to the store's fetch.
871 /**
880 * For example, to set the sort order of the ComboBox menu, pass:
872 * Argument to data provider.
881 * { sort: [{attribute:"name",descending: true}] }
873 * Specifies maximum number of search results to return per query
882 * To override the default queryOptions so that deep=false, do:
874 */
883 * { queryOptions: {ignoreCase: true, deep: false} }
875 pageSize: number;
884 */
885 fetchProperties: { [property: string]: any };
886
876
887 /**
877 /**
888 * A query that can be passed to `store` to initially filter the items.
878 * Reference to data provider object used by this ComboBox.
889 * ComboBox overwrites any reference to the `searchAttr` and sets it to the `queryExpr` with the user's input substituted.
879 * The store must accept an object hash of properties for its query. See `query` and `queryExpr` for details.
890 */
880 */
891 query: Q;
881 store: dojo.store.api.Store<T, Q, O>;
892
882
893 /**
883 /**
894 * Alternate to specifying a store. Id of a dijit/form/DataList widget.
884 * Mixin to the store's fetch.
895 */
885 * For example, to set the sort order of the ComboBox menu, pass:
896 list: string;
886 * { sort: [{attribute:"name",descending: true}] }
887 * To override the default queryOptions so that deep=false, do:
888 * { queryOptions: {ignoreCase: true, deep: false} }
889 */
890 fetchProperties: { [property: string]: any };
897
891
898 /**
892 /**
899 * Delay in milliseconds between when user types something and we start
893 * A query that can be passed to `store` to initially filter the items.
900 * searching based on that value
894 * ComboBox overwrites any reference to the `searchAttr` and sets it to the `queryExpr` with the user's input substituted.
901 */
895 */
902 searchDelay: number;
896 query: Q;
903
897
904 /**
898 /**
905 * Search for items in the data store where this attribute (in the item)
899 * Alternate to specifying a store. Id of a dijit/form/DataList widget.
906 * matches what the user typed
900 */
907 */
901 list: string;
908 searchAttr: string;
909
902
910 /**
903 /**
911 * This specifies what query is sent to the data store,
904 * Delay in milliseconds between when user types something and we start
912 * based on what the user has typed. Changing this expression will modify
905 * searching based on that value
913 * whether the results are only exact matches, a "starting with" match,
906 */
914 * etc.
907 searchDelay: number;
915 * `${0}` will be substituted for the user text.
916 * `*` is used for wildcards.
917 * `${0}*` means "starts with", `*${0}*` means "contains", `${0}` means "is"
918 */
919 queryExpr: string;
920
908
921 /**
909 /**
922 * Set true if the query should ignore case when matching possible items
910 * Search for items in the data store where this attribute (in the item)
923 */
911 * matches what the user typed
924 ignoreCase: boolean;
912 */
913 searchAttr: string;
925
914
926 /**
915 /**
927 * Helper function to convert a simple pattern to a regular expression for matching.
916 * This specifies what query is sent to the data store,
928 */
917 * based on what the user has typed. Changing this expression will modify
929 _patternToRegExp(pattern: string): RegExp;
918 * whether the results are only exact matches, a "starting with" match,
930
919 * etc.
931 _abortQuery(): void;
920 * `${0}` will be substituted for the user text.
921 * `*` is used for wildcards.
922 * `${0}*` means "starts with", `*${0}*` means "contains", `${0}` means "is"
923 */
924 queryExpr: string;
932
925
933 /**
926 /**
934 * Handles input (keyboard/paste) events
927 * Set true if the query should ignore case when matching possible items
935 */
928 */
936 _processInput(e: KeyboardEvent): void;
929 ignoreCase: boolean;
937
930
938 /**
931 /**
939 * Callback when a search completes.
932 * Helper function to convert a simple pattern to a regular expression for matching.
940 */
933 */
941 onSearch(results: T[], query: Q, options: O): void;
934 _patternToRegExp(pattern: string): RegExp;
942
943 _startSearchFromInput(): void;
944
935
945 /**
936 _abortQuery(): void;
946 * Starts a search for elements matching text (text=="" means to return all items
947 * and calls onSearch(...) when the search completes, to display the results.
948 */
949 _startSearch(text: string): void;
950
937
951 postMixInProperties(): void;
938 /**
939 * Handles input (keyboard/paste) events
940 */
941 _processInput(e: KeyboardEvent): void;
952
942
953 // set(name: 'list', value: string): this;
943 /**
954 // set(name: string, value: any): this;
944 * Callback when a search completes.
955 // set(values: Object): this;
945 */
956 }
946 onSearch(results: T[], query: Q, options: O): void;
957
947
958 /* dijit/form/_Spinner */
948 _startSearchFromInput(): void;
959
949
960 interface AdjustFunction {
950 /**
961 (val: any, delta: number): any;
951 * Starts a search for elements matching text (text=="" means to return all items
962 }
952 * and calls onSearch(...) when the search completes, to display the results.
953 */
954 _startSearch(text: string): void;
963
955
964 interface _Spinner extends RangeBoundTextBox {
956 postMixInProperties(): void;
965 /**
966 * Number of milliseconds before a held arrow key or up/down button becomes typematic
967 */
968 defaultTimeout: number;
969
957
970 /**
958 // set(name: 'list', value: string): this;
971 * minimum number of milliseconds that typematic event fires when held key or button is held
959 // set(name: string, value: any): this;
972 */
960 // set(values: Object): this;
973 minimumTimeout: number;
961 }
974
962
975 /**
963 /* dijit/form/_Spinner */
976 * Fraction of time used to change the typematic timer between events.
964
977 * 1.0 means that each typematic event fires at defaultTimeout intervals.
965 interface AdjustFunction {
978 * Less than 1.0 means that each typematic event fires at an increasing faster rate.
966 (val: any, delta: number): any;
979 */
967 }
980 timeoutChangeRate: number;
981
968
982 /**
969 interface _Spinner extends RangeBoundTextBox {
983 * Adjust the value by this much when spinning using the arrow keys/buttons
970 /**
984 */
971 * Number of milliseconds before a held arrow key or up/down button becomes typematic
985 smallDelta: number;
972 */
986
973 defaultTimeout: number;
987 /**
988 * Adjust the value by this much when spinning using the PgUp/Dn keys
989 */
990 largeDelta: number;
991
974
992 templateString: string;
975 /**
993 baseClass: string;
976 * minimum number of milliseconds that typematic event fires when held key or button is held
994 cssStateNodes: CSSStateNodes;
977 */
978 minimumTimeout: number;
995
979
996 /**
980 /**
997 * Overridable function used to adjust a primitive value(Number/Date/...) by the delta amount specified.
981 * Fraction of time used to change the typematic timer between events.
998 * The val is adjusted in a way that makes sense to the object type.
982 * 1.0 means that each typematic event fires at defaultTimeout intervals.
999 */
983 * Less than 1.0 means that each typematic event fires at an increasing faster rate.
1000 adjust: AdjustFunction;
984 */
985 timeoutChangeRate: number;
1001
986
1002 postCreate(): void;
987 /**
1003 }
988 * Adjust the value by this much when spinning using the arrow keys/buttons
1004
989 */
1005 interface _SpinnerConstrctor extends _WidgetBaseConstructor<_Spinner> { }
990 smallDelta: number;
1006
991
1007 /* dijit/form/_TextBoxMixin */
992 /**
1008
993 * Adjust the value by this much when spinning using the PgUp/Dn keys
1009 interface _TextBoxMixin<C extends Constraints = Constraints> {
994 */
1010 /**
995 largeDelta: number;
1011 * Removes leading and trailing whitespace if true. Default is false.
1012 */
1013 trim: boolean;
1014
996
1015 /**
997 templateString: string;
1016 * Converts all characters to uppercase if true. Default is false.
998 baseClass: string;
1017 */
999 cssStateNodes: CSSStateNodes;
1018 uppercase: boolean;
1019
1000
1020 /**
1001 /**
1021 * Converts all characters to lowercase if true. Default is false.
1002 * Overridable function used to adjust a primitive value(Number/Date/...) by the delta amount specified.
1022 */
1003 * The val is adjusted in a way that makes sense to the object type.
1023 lowercase: boolean;
1004 */
1005 adjust: AdjustFunction;
1024
1006
1025 /**
1007 postCreate(): void;
1026 * Converts the first character of each word to uppercase if true.
1008 }
1027 */
1009
1028 propercase: boolean;
1010 interface _SpinnerConstrctor extends _WidgetBaseConstructor<_Spinner> { }
1011
1012 /* dijit/form/_TextBoxMixin */
1029
1013
1030 /**
1014 interface _TextBoxMixin<C extends Constraints = Constraints> {
1031 * HTML INPUT tag maxLength declaration.
1015 /**
1032 */
1016 * Removes leading and trailing whitespace if true. Default is false.
1033 maxLength: string;
1017 */
1018 trim: boolean;
1034
1019
1035 /**
1020 /**
1036 * If true, all text will be selected when focused with mouse
1021 * Converts all characters to uppercase if true. Default is false.
1037 */
1022 */
1038 selectOnClick: boolean;
1023 uppercase: boolean;
1039
1040 /**
1041 * Defines a hint to help users fill out the input field (as defined in HTML 5).
1042 * This should only contain plain text (no html markup).
1043 */
1044 placeHolder: string;
1045
1024
1046 /**
1025 /**
1047 * For subclasses like ComboBox where the displayed value
1026 * Converts all characters to lowercase if true. Default is false.
1048 * (ex: Kentucky) and the serialized value (ex: KY) are different,
1027 */
1049 * this represents the displayed value.
1028 lowercase: boolean;
1050 *
1029
1051 * Setting 'displayedValue' through set('displayedValue', ...)
1030 /**
1052 * updates 'value', and vice-versa. Otherwise 'value' is updated
1031 * Converts the first character of each word to uppercase if true.
1053 * from 'displayedValue' periodically, like onBlur etc.
1032 */
1054 */
1033 propercase: boolean;
1055 displayedValue: string;
1056
1034
1057 /**
1035 /**
1058 * Replaceable function to convert a value to a properly formatted string.
1036 * HTML INPUT tag maxLength declaration.
1059 */
1037 */
1060 format: ConstrainedValueFunction<any, C, any>;
1038 maxLength: string;
1039
1040 /**
1041 * If true, all text will be selected when focused with mouse
1042 */
1043 selectOnClick: boolean;
1061
1044
1062 /**
1045 /**
1063 * Replaceable function to convert a formatted string to a value
1046 * Defines a hint to help users fill out the input field (as defined in HTML 5).
1064 */
1047 * This should only contain plain text (no html markup).
1065 parse: ConstrainedValueFunction<any, C, any>;
1048 */
1066
1049 placeHolder: string;
1067 /**
1068 * Connect to this function to receive notifications of various user data-input events.
1069 * Return false to cancel the event and prevent it from being processed.
1070 * Note that although for historical reasons this method is called `onInput()`, it doesn't
1071 * correspond to the standard DOM "input" event, because it occurs before the input has been processed.
1072 */
1073 onInput(e: InputEvent): void;
1074
1050
1075 postCreate(): void;
1051 /**
1076
1052 * For subclasses like ComboBox where the displayed value
1077 /**
1053 * (ex: Kentucky) and the serialized value (ex: KY) are different,
1078 * if the textbox is blank, what value should be reported
1054 * this represents the displayed value.
1079 */
1055 *
1080 _blankValue: string;
1056 * Setting 'displayedValue' through set('displayedValue', ...)
1057 * updates 'value', and vice-versa. Otherwise 'value' is updated
1058 * from 'displayedValue' periodically, like onBlur etc.
1059 */
1060 displayedValue: string;
1081
1061
1082 /**
1062 /**
1083 * Auto-corrections (such as trimming) that are applied to textbox
1063 * Replaceable function to convert a value to a properly formatted string.
1084 * value on blur or form submit.
1064 */
1085 */
1065 format: ConstrainedValueFunction<any, C, any>;
1086 filter<T>(val: T): T;
1066
1087 filter<T extends number>(value: T): T;
1067 /**
1068 * Replaceable function to convert a formatted string to a value
1069 */
1070 parse: ConstrainedValueFunction<any, C, any>;
1088
1071
1089 _setBlurValue(): void;
1072 /**
1073 * Connect to this function to receive notifications of various user data-input events.
1074 * Return false to cancel the event and prevent it from being processed.
1075 * Note that although for historical reasons this method is called `onInput()`, it doesn't
1076 * correspond to the standard DOM "input" event, because it occurs before the input has been processed.
1077 */
1078 onInput(e: InputEvent): void;
1090
1079
1091 reset(): void;
1080 postCreate(): void;
1092 }
1093
1094 /* dijit/form/_ToggleButtonMixin */
1095
1081
1096 interface _ToggleButtonMixin {
1082 /**
1097 /**
1083 * if the textbox is blank, what value should be reported
1098 * Corresponds to the native HTML `<input>` element's attribute.
1084 */
1099 * In markup, specified as "checked='checked'" or just "checked".
1085 _blankValue: string;
1100 * True if the button is depressed, or the checkbox is checked,
1101 * or the radio button is selected, etc.
1102 */
1103 checked: boolean;
1104
1086
1105 postCreate(): void;
1087 /**
1088 * Auto-corrections (such as trimming) that are applied to textbox
1089 * value on blur or form submit.
1090 */
1091 filter<T>(val: T): T;
1092 filter<T extends number>(value: T): T;
1106
1093
1107 /**
1094 _setBlurValue(): void;
1108 * Reset the widget's value to what it was at initialization time
1109 */
1110 reset(): void;
1111
1095
1112 _hasBeenBlurred?: boolean;
1096 reset(): void;
1113 }
1097 }
1114
1098
1115 /* dijit/form/Button */
1099 /* dijit/form/_ToggleButtonMixin */
1116
1100
1117 interface Button extends _FormWidget, _ButtonMixin {
1101 interface _ToggleButtonMixin {
1118 /**
1102 /**
1119 * Set this to true to hide the label text and display only the icon.
1103 * Corresponds to the native HTML `<input>` element's attribute.
1120 * (If showLabel=false then iconClass must be specified.)
1104 * In markup, specified as "checked='checked'" or just "checked".
1121 * Especially useful for toolbars.
1105 * True if the button is depressed, or the checkbox is checked,
1122 * If showLabel=true, the label will become the title (a.k.a. tooltip/hint)
1106 * or the radio button is selected, etc.
1123 */
1107 */
1124 showLabel: boolean;
1108 checked: boolean;
1125
1109
1126 /**
1110 postCreate(): void;
1127 * Class to apply to DOMNode in button to make it display an icon
1128 */
1129 iconClass: string;
1130
1111
1131 baseClass: string;
1112 /**
1132 templateString: string;
1113 * Reset the widget's value to what it was at initialization time
1133 postCreate(): void;
1114 */
1134 setLabel(content: string): void;
1115 reset(): void;
1135 onLabelSet(e: Event): void;
1136
1116
1137 onClick(e: MouseEvent): boolean | void;
1117 _hasBeenBlurred?: boolean;
1118 }
1138
1119
1139 // set(name: 'showLabel', value: boolean): this;
1120 /* dijit/form/Button */
1140 // set(name: 'value', value: string): this;
1121
1141 // set(name: 'name', value: string): this;
1122 interface Button extends _FormWidget, _ButtonMixin {
1142 // set(name: 'label', value: string): this;
1123 /**
1143 // set(name: string, value: any): this;
1124 * Set this to true to hide the label text and display only the icon.
1144 // set(values: Object): this;
1125 * (If showLabel=false then iconClass must be specified.)
1145 }
1126 * Especially useful for toolbars.
1127 * If showLabel=true, the label will become the title (a.k.a. tooltip/hint)
1128 */
1129 showLabel: boolean;
1146
1130
1147 interface ButtonConstructor extends _WidgetBaseConstructor<Button> { }
1131 /**
1148
1132 * Class to apply to DOMNode in button to make it display an icon
1149 /* dijit/form/CheckBox */
1133 */
1134 iconClass: string;
1150
1135
1151 interface CheckBox extends ToggleButton, _CheckBoxMixin {
1136 baseClass: string;
1152 templateString: string;
1137 templateString: string;
1153 baseClass: string;
1138 postCreate(): void;
1154 postMixInProperties(): void;
1139 setLabel(content: string): void;
1155 value: string;
1140 onLabelSet(e: Event): void;
1156
1141
1157 // set(name: 'value', value: string | boolean): this;
1142 onClick(e: MouseEvent): boolean | void;
1158 // set(name: string, value: any): this;
1159 // set(values: Object): this;
1160 }
1161
1143
1162 interface CheckBoxConstructor extends _WidgetBaseConstructor<CheckBox> { }
1144 // set(name: 'showLabel', value: boolean): this;
1163
1145 // set(name: 'value', value: string): this;
1164 /* dijit/form/ComboBox */
1146 // set(name: 'name', value: string): this;
1147 // set(name: 'label', value: string): this;
1148 // set(name: string, value: any): this;
1149 // set(values: Object): this;
1150 }
1165
1151
1166 interface ComboBox<T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions, C extends Constraints = Constraints> extends ValidationTextBox<C>, ComboBoxMixin<T, Q, O> {
1152 interface ButtonConstructor extends _WidgetBaseConstructor<Button> { }
1167 // set(name: string, value: any): this;
1153
1168 // set(values: Object): this;
1154 /* dijit/form/CheckBox */
1169 }
1170
1155
1171 interface ComboBoxConstructor extends _WidgetBaseConstructor<ComboBox<any>> {
1156 interface CheckBox extends ToggleButton, _CheckBoxMixin {
1172 new <T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions, C extends Constraints = Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): ComboBox<T, Q, O, C>;
1157 templateString: string;
1173 }
1158 baseClass: string;
1174
1159 postMixInProperties(): void;
1175 /* dijit/form/ComboBoxMixin */
1160 value: string;
1176
1177 interface ComboBoxMixin<T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> extends _HasDropDown<_ComboBoxMenu<T>>, _AutoCompleterMixin<T, Q, O> {
1178
1161
1179 /**
1162 // set(name: 'value', value: string | boolean): this;
1180 * Dropdown widget class used to select a date/time.
1163 // set(name: string, value: any): this;
1181 * Subclasses should specify this.
1164 // set(values: Object): this;
1182 */
1165 }
1183 dropDownClass: _ComboBoxMenu<T>;
1166
1167 interface CheckBoxConstructor extends _WidgetBaseConstructor<CheckBox> { }
1168
1169 /* dijit/form/ComboBox */
1170
1171 interface ComboBox<T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions, C extends Constraints = Constraints> extends ValidationTextBox<C>, ComboBoxMixin<T, Q, O> {
1172 // set(name: string, value: any): this;
1173 // set(values: Object): this;
1174 }
1184
1175
1185 /**
1176 interface ComboBoxConstructor extends _WidgetBaseConstructor<ComboBox<any>> {
1186 * Set this textbox to have a down arrow button, to display the drop down list.
1177 new <T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions, C extends Constraints = Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): ComboBox<T, Q, O, C>;
1187 * Defaults to true.
1178 }
1188 */
1179
1189 hasDownArrow: boolean;
1180 /* dijit/form/ComboBoxMixin */
1190
1181
1191 templateString: string;
1182 interface ComboBoxMixin<T extends Object = any, Q extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions = dojo.store.api.QueryOptions> extends _HasDropDown<_ComboBoxMenu<T>>, _AutoCompleterMixin<T, Q, O> {
1192 baseClass: string;
1193
1183
1194 /**
1184 /**
1195 * Reference to data provider object used by this ComboBox.
1185 * Dropdown widget class used to select a date/time.
1196 *
1186 * Subclasses should specify this.
1197 * Should be dojo/store/api/Store, but dojo/data/api/Read supported
1187 */
1198 * for backwards compatibility.
1188 dropDownClass: _ComboBoxMenu<T>;
1199 */
1200 store: dojo.store.api.Store<T, Q, O>;
1201
1189
1202 cssStateNodes: CSSStateNodes;
1190 /**
1203 postMixInProperties(): void;
1191 * Set this textbox to have a down arrow button, to display the drop down list.
1204 buildRendering(): void;
1192 * Defaults to true.
1205 }
1193 */
1194 hasDownArrow: boolean;
1206
1195
1207 interface ComboBoxMixinConstructor<T = any, U extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, V = any> extends _WidgetBaseConstructor<ComboBoxMixin<T, U, V>> { }
1196 templateString: string;
1208
1197 baseClass: string;
1209 /* dijit/form/CurrencyTextBox */
1210
1211 interface CurrencyTextBoxConstraints extends NumberTextBoxConstraints, dojo.CurrencyFormatOptions, dojo.CurrencyParseOptions {
1212 }
1213
1198
1214 interface CurrencyTextBox extends NumberTextBox {
1199 /**
1215 /**
1200 * Reference to data provider object used by this ComboBox.
1216 * the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
1201 *
1217 */
1202 * Should be dojo/store/api/Store, but dojo/data/api/Read supported
1218 currency: string;
1203 * for backwards compatibility.
1204 */
1205 store: dojo.store.api.Store<T, Q, O>;
1219
1206
1220 /**
1207 cssStateNodes: CSSStateNodes;
1221 * Despite the name, this parameter specifies both constraints on the input
1208 postMixInProperties(): void;
1222 * (including minimum/maximum allowed values) as well as
1209 buildRendering(): void;
1223 * formatting options. See `dijit/form/CurrencyTextBox.__Constraints` for details.
1210 }
1224 */
1225 constraints: CurrencyTextBoxConstraints;
1226
1211
1227 baseClass: string;
1212 interface ComboBoxMixinConstructor<T = any, U extends dojo.store.api.BaseQueryType = dojo.store.api.BaseQueryType, V = any> extends _WidgetBaseConstructor<ComboBoxMixin<T, U, V>> { }
1228
1213
1229 _formatter: (value: number, options?: dojo.CurrencyFormatOptions) => string;
1214 /* dijit/form/CurrencyTextBox */
1230 _parser: (expression: string, options?: dojo.CurrencyParseOptions) => number;
1215
1231 _regExpGenerator: (options?: dojo.NumberRegexpOptions) => string;
1216 interface CurrencyTextBoxConstraints extends NumberTextBoxConstraints, dojo.CurrencyFormatOptions, dojo.CurrencyParseOptions {
1217 }
1232
1218
1233 /**
1219 interface CurrencyTextBox extends NumberTextBox {
1234 * Parses string value as a Currency, according to the constraints object
1220 /**
1235 */
1221 * the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
1236 parse(value: string, constraints: CurrencyTextBoxConstraints): string;
1222 */
1237 }
1223 currency: string;
1238
1224
1239 interface CurrencyTextBoxConstructor extends _WidgetBaseConstructor<CurrencyTextBox> { }
1225 /**
1240
1226 * Despite the name, this parameter specifies both constraints on the input
1241 /* dijit/form/DataList */
1227 * (including minimum/maximum allowed values) as well as
1228 * formatting options. See `dijit/form/CurrencyTextBox.__Constraints` for details.
1229 */
1230 constraints: CurrencyTextBoxConstraints;
1242
1231
1243 interface DataList<T extends Object> extends dojo.store.Memory<T> {
1232 baseClass: string;
1244 /**
1233
1245 * Get the option marked as selected, like `<option selected>`.
1234 _formatter: (value: number, options?: dojo.CurrencyFormatOptions) => string;
1246 * Not part of dojo.data API.
1235 _parser: (expression: string, options?: dojo.CurrencyParseOptions) => number;
1247 */
1236 _regExpGenerator: (options?: dojo.NumberRegexpOptions) => string;
1248 fetchSelectedItem(): T;
1249 }
1250
1237
1251 interface DataListConstructor {
1238 /**
1252 new <T extends Object>(params: Object, srcNodeRef: dojo.NodeOrString): DataList<T>;
1239 * Parses string value as a Currency, according to the constraints object
1253 }
1240 */
1241 parse(value: string, constraints: CurrencyTextBoxConstraints): string;
1242 }
1254
1243
1255 /* dijit/form/DateTextBox */
1244 interface CurrencyTextBoxConstructor extends _WidgetBaseConstructor<CurrencyTextBox> { }
1245
1246 /* dijit/form/DataList */
1256
1247
1257 interface DateTextBox extends _DateTimeTextBox<Calendar> {
1248 interface DataList<T extends Object> extends dojo.store.Memory<T> {
1258 baseClass: string;
1249 /**
1259 popupClass: CalendarConstructor;
1250 * Get the option marked as selected, like `<option selected>`.
1260 _selector: string;
1251 * Not part of dojo.data API.
1261 maxHeight: number;
1252 */
1253 fetchSelectedItem(): T;
1254 }
1262
1255
1263 /**
1256 interface DataListConstructor {
1264 * The value of this widget as a JavaScript Date object, with only year/month/day specified.`
1257 new <T extends Object>(params: Object, srcNodeRef: dojo.NodeOrString): DataList<T>;
1265 */
1258 }
1266 value: Date;
1267 }
1268
1259
1269 interface DateTextBoxConstructor extends _WidgetBaseConstructor<DateTextBox> { }
1260 /* dijit/form/DateTextBox */
1270
1271 /* dijit/form/DropDownButton */
1272
1261
1273 interface DropDownButton<T extends _WidgetBase> extends Button, _Container, _HasDropDown<T> {
1262 interface DateTextBox extends _DateTimeTextBox<Calendar> {
1274 baseClass: string;
1263 baseClass: string;
1275 templateString: string;
1264 popupClass: CalendarConstructor;
1265 _selector: string;
1266 maxHeight: number;
1276
1267
1277 /**
1268 /**
1278 * Overrides _TemplatedMixin#_fillContent().
1269 * The value of this widget as a JavaScript Date object, with only year/month/day specified.`
1279 * My inner HTML possibly contains both the button label and/or a drop down widget, like
1270 */
1280 * <DropDownButton> <span>push me</span> <Menu> ... </Menu> </DropDownButton>
1271 value: Date;
1281 */
1272 }
1282 _fillContent(): void;
1283 startup(): void;
1284
1273
1285 /**
1274 interface DateTextBoxConstructor extends _WidgetBaseConstructor<DateTextBox> { }
1286 * Returns whether or not we are loaded - if our dropdown has an href,
1275
1287 * then we want to check that.
1276 /* dijit/form/DropDownButton */
1288 */
1289 isLoaded(): boolean;
1290
1277
1291 /**
1278 interface DropDownButton<T extends _WidgetBase> extends Button, _Container, _HasDropDown<T> {
1292 * Default implementation assumes that drop down already exists,
1279 baseClass: string;
1293 * but hasn't loaded it's data (ex: ContentPane w/href).
1280 templateString: string;
1294 * App must override if the drop down is lazy-created.
1281
1295 */
1282 /**
1296 loadDropDown(callback: () => void): void;
1283 * Overrides _TemplatedMixin#_fillContent().
1284 * My inner HTML possibly contains both the button label and/or a drop down widget, like
1285 * <DropDownButton> <span>push me</span> <Menu> ... </Menu> </DropDownButton>
1286 */
1287 _fillContent(): void;
1288 startup(): void;
1297
1289
1298 /**
1290 /**
1299 * Overridden so that focus is handled by the _HasDropDown mixin, not by
1291 * Returns whether or not we are loaded - if our dropdown has an href,
1300 * the _FormWidget mixin.
1292 * then we want to check that.
1301 */
1293 */
1302 isFocusable(): boolean;
1294 isLoaded(): boolean;
1303 }
1304
1295
1305 interface DropDownButtonConstructor extends _WidgetBaseConstructor<DropDownButton<any>> {
1296 /**
1306 new <T extends _WidgetBase>(params: Object, srcNodeRef: dojo.NodeOrString): DropDownButton<T>;
1297 * Default implementation assumes that drop down already exists,
1307 }
1298 * but hasn't loaded it's data (ex: ContentPane w/href).
1308
1299 * App must override if the drop down is lazy-created.
1309 /* dijit/form/FilteringSelect */
1300 */
1310
1301 loadDropDown(callback: () => void): void;
1311 interface FilteringSelect<C extends Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions> extends MappedTextBox<C>, ComboBoxMixin<T, Q, O> {
1312 /**
1313 * True (default) if user is required to enter a value into this field.
1314 */
1315 required: boolean;
1316
1302
1317 _lastDisplayedValue: string;
1303 /**
1318 _isValidSubset(): boolean;
1304 * Overridden so that focus is handled by the _HasDropDown mixin, not by
1319 isValid(): boolean;
1305 * the _FormWidget mixin.
1320 _refreshState(): void;
1306 */
1307 isFocusable(): boolean;
1308 }
1321
1309
1322 /**
1310 interface DropDownButtonConstructor extends _WidgetBaseConstructor<DropDownButton<any>> {
1323 * Callback from dojo.store after lookup of user entered value finishes
1311 new <T extends _WidgetBase>(params: Object, srcNodeRef: dojo.NodeOrString): DropDownButton<T>;
1324 */
1312 }
1325 _callbackSetLabel(result: T[], query: Q, options: O, priorityChange?: boolean): void;
1326
1313
1327 _openResultList(results: T[], query: Q, options: O): void;
1314 /* dijit/form/FilteringSelect */
1328 undo(): void;
1329
1315
1330 // set(name: 'displayedValue', value: string): this;
1316 interface FilteringSelect<C extends Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions> extends MappedTextBox<C>, ComboBoxMixin<T, Q, O> {
1331 // set(name: 'item', value: T): this;
1317 /**
1332 // set(name: string, value: any): this;
1318 * True (default) if user is required to enter a value into this field.
1333 // set(values: Object): this;
1319 */
1334 }
1320 required: boolean;
1335
1336 interface FilteringSelectConstructor extends _WidgetBaseConstructor<FilteringSelect<any, any, any, any>> {
1337 new <C extends Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions>(params: Object, srcNodeRef: dojo.NodeOrString): FilteringSelect<C, T, Q, O>;
1338 }
1339
1321
1340 /* dijit/form/Form */
1322 _lastDisplayedValue: string;
1323 _isValidSubset(): boolean;
1324 isValid(): boolean;
1325 _refreshState(): void;
1341
1326
1342 interface Form extends _Widget, _TemplatedMixin, _FormMixin, layout._ContentPaneResizeMixin {
1327 /**
1343 name?: string;
1328 * Callback from dojo.store after lookup of user entered value finishes
1344 action?: string;
1329 */
1345 method?: string;
1330 _callbackSetLabel(result: T[], query: Q, options: O, priorityChange?: boolean): void;
1346 encType?: string;
1331
1347 'accept-charset'?: string;
1332 _openResultList(results: T[], query: Q, options: O): void;
1348 accept?: string;
1333 undo(): void;
1349 target?: string;
1350 templateString: string;
1351
1334
1352 /**
1335 // set(name: 'displayedValue', value: string): this;
1353 * Deprecated: use submit()
1336 // set(name: 'item', value: T): this;
1354 */
1337 // set(name: string, value: any): this;
1355 execute(formContents: Object): void;
1338 // set(values: Object): this;
1339 }
1356
1340
1357 /**
1341 interface FilteringSelectConstructor extends _WidgetBaseConstructor<FilteringSelect<any, any, any, any>> {
1358 * Deprecated: use onSubmit()
1342 new <C extends Constraints, T extends Object, Q extends string | Object | Function, O extends dojo.store.api.QueryOptions>(params: Object, srcNodeRef: dojo.NodeOrString): FilteringSelect<C, T, Q, O>;
1359 */
1343 }
1360 onExecute(): void;
1344
1345 /* dijit/form/Form */
1361
1346
1362 /**
1347 interface Form extends _Widget, _TemplatedMixin, _FormMixin, layout._ContentPaneResizeMixin {
1363 * restores all widget values back to their init values,
1348 name?: string;
1364 * calls onReset() which can cancel the reset by returning false
1349 action?: string;
1365 */
1350 method?: string;
1366 reset(e?: Event): void;
1351 encType?: string;
1352 'accept-charset'?: string;
1353 accept?: string;
1354 target?: string;
1355 templateString: string;
1367
1356
1368 /**
1357 /**
1369 * Callback when user resets the form. This method is intended
1358 * Deprecated: use submit()
1370 * to be over-ridden. When the `reset` method is called
1359 */
1371 * programmatically, the return value from `onReset` is used
1360 execute(formContents: Object): void;
1372 * to compute whether or not resetting should proceed
1373 */
1374 onReset(e?: Event): boolean;
1375
1376 /**
1377 * Callback when user submits the form.
1378 */
1379 onSubmit(e?: Event): boolean;
1380
1361
1381 /**
1362 /**
1382 * programmatically submit form if and only if the `onSubmit` returns true
1363 * Deprecated: use onSubmit()
1383 */
1364 */
1384 submit(): void;
1365 onExecute(): void;
1385 }
1386
1366
1387 interface FormConstructor extends _WidgetBaseConstructor<Form> { }
1367 /**
1388
1368 * restores all widget values back to their init values,
1389 /* dijit/form/HorizontalRule */
1369 * calls onReset() which can cancel the reset by returning false
1370 */
1371 reset(e?: Event): void;
1390
1372
1391 /**
1373 /**
1392 * Hash marks for `dijit/form/HorizontalSlider`
1374 * Callback when user resets the form. This method is intended
1393 */
1375 * to be over-ridden. When the `reset` method is called
1394 interface HorizontalRule extends _Widget, _TemplatedMixin {
1376 * programmatically, the return value from `onReset` is used
1395 /**
1377 * to compute whether or not resetting should proceed
1396 * Number of hash marks to generate
1378 */
1397 */
1379 onReset(e?: Event): boolean;
1398 count: number;
1399
1380
1400 /**
1381 /**
1401 * For HorizontalSlider, this is either "topDecoration" or "bottomDecoration", and indicates whether this rule goes above or below the slider.
1382 * Callback when user submits the form.
1402 */
1383 */
1403 container: string;
1384 onSubmit(e?: Event): boolean;
1404
1385
1405 /**
1386 /**
1406 * CSS style to apply to individual hash marks
1387 * programmatically submit form if and only if the `onSubmit` returns true
1407 */
1388 */
1408 ruleStyle: string;
1389 submit(): void;
1390 }
1409
1391
1410 _positionPrefix: string;
1392 interface FormConstructor extends _WidgetBaseConstructor<Form> { }
1411 _positionSuffix: string;
1412 _suffix: string;
1413
1393
1414 _genHTML(pos: number): string;
1394 /* dijit/form/HorizontalRule */
1415
1395
1416 /**
1396 /**
1417 * VerticalRule will override this...
1397 * Hash marks for `dijit/form/HorizontalSlider`
1418 */
1398 */
1419 _isHorizontal: boolean;
1399 interface HorizontalRule extends _Widget, _TemplatedMixin {
1420 }
1400 /**
1421
1401 * Number of hash marks to generate
1422 interface HorizontalRuleConstructor extends _WidgetBaseConstructor<HorizontalRule> { }
1402 */
1423
1403 count: number;
1424 /* dijit/form/HorizontalRuleLabels */
1425
1404
1426 /**
1405 /**
1427 * Labels for `dijit/form/HorizontalSlider`
1406 * For HorizontalSlider, this is either "topDecoration" or "bottomDecoration", and indicates whether this rule goes above or below the slider.
1428 */
1407 */
1429 interface HorizontalRuleLabels extends HorizontalRule {
1408 container: string;
1430 /**
1431 * CSS style to apply to individual text labels
1432 */
1433 labelStyle: string;
1434
1409
1435 /**
1410 /**
1436 * Array of text labels to render - evenly spaced from left-to-right or bottom-to-top.
1411 * CSS style to apply to individual hash marks
1437 * Alternately, minimum and maximum can be specified, to get numeric labels.
1412 */
1438 */
1413 ruleStyle: string;
1439 labels: string[];
1414
1415 _positionPrefix: string;
1416 _positionSuffix: string;
1417 _suffix: string;
1418
1419 _genHTML(pos: number): string;
1440
1420
1441 /**
1421 /**
1442 * Number of generated numeric labels that should be rendered as '' on the ends when labels[] are not specified
1422 * VerticalRule will override this...
1443 */
1423 */
1444 numericMargin: number;
1424 _isHorizontal: boolean;
1425 }
1445
1426
1446 /**
1427 interface HorizontalRuleConstructor extends _WidgetBaseConstructor<HorizontalRule> { }
1447 * Leftmost label value for generated numeric labels when labels[] are not specified
1448 */
1449 minimum: number;
1450
1428
1451 /**
1429 /* dijit/form/HorizontalRuleLabels */
1452 * Rightmost label value for generated numeric labels when labels[] are not specified
1453 */
1454 maximum: number;
1455
1430
1456 /**
1431 /**
1457 * pattern, places, lang, et al (see dojo.number) for generated numeric labels when labels[] are not specified
1432 * Labels for `dijit/form/HorizontalSlider`
1458 */
1433 */
1459 constraints: { pattern: string };
1434 interface HorizontalRuleLabels extends HorizontalRule {
1435 /**
1436 * CSS style to apply to individual text labels
1437 */
1438 labelStyle: string;
1460
1439
1461 /**
1440 /**
1462 * Returns the value to be used in HTML for the label as part of the left: attribute
1441 * Array of text labels to render - evenly spaced from left-to-right or bottom-to-top.
1463 */
1442 * Alternately, minimum and maximum can be specified, to get numeric labels.
1464 _calcPosition(pos: number): number;
1443 */
1444 labels: string[];
1465
1445
1466 _genHTML(pos: number, ndx?: number): string;
1446 /**
1467
1447 * Number of generated numeric labels that should be rendered as '' on the ends when labels[] are not specified
1468 /**
1448 */
1469 * extension point for bidi code
1449 numericMargin: number;
1470 */
1471 _genDirectionHTML(label: string): string;
1472
1450
1473 /**
1451 /**
1474 * Overridable function to return array of labels to use for this slider.
1452 * Leftmost label value for generated numeric labels when labels[] are not specified
1475 * Can specify a getLabels() method instead of a labels[] array, or min/max attributes.
1453 */
1476 */
1454 minimum: number;
1477 getLabels(): string[];
1478 }
1479
1455
1480 interface HorizontalRuleLabelsConstructor extends _WidgetBaseConstructor<HorizontalRuleLabels> { }
1456 /**
1481
1457 * Rightmost label value for generated numeric labels when labels[] are not specified
1482 /* dijit/form/HorizontalSlider */
1458 */
1483
1459 maximum: number;
1484 interface _SliderMover extends dojo.dnd.Mover { }
1485
1460
1486 /**
1461 /**
1487 * A form widget that allows one to select a value with a horizontally draggable handle
1462 * pattern, places, lang, et al (see dojo.number) for generated numeric labels when labels[] are not specified
1488 */
1463 */
1489 interface HorizontalSlider extends _FormValueWidget, _Container {
1464 constraints: { pattern: string };
1490 /**
1491 * Show increment/decrement buttons at the ends of the slider?
1492 */
1493 showButtons: boolean;
1494
1465
1495 /**
1466 /**
1496 * The minimum value the slider can be set to.
1467 * Returns the value to be used in HTML for the label as part of the left: attribute
1497 */
1468 */
1498 minimum: number;
1469 _calcPosition(pos: number): number;
1470
1471 _genHTML(pos: number, ndx?: number): string;
1472
1473 /**
1474 * extension point for bidi code
1475 */
1476 _genDirectionHTML(label: string): string;
1499
1477
1500 /**
1478 /**
1501 * The maximum value the slider can be set to.
1479 * Overridable function to return array of labels to use for this slider.
1502 */
1480 * Can specify a getLabels() method instead of a labels[] array, or min/max attributes.
1503 maximum: number;
1481 */
1482 getLabels(): string[];
1483 }
1504
1484
1505 /**
1485 interface HorizontalRuleLabelsConstructor extends _WidgetBaseConstructor<HorizontalRuleLabels> { }
1506 * If specified, indicates that the slider handle has only 'discreteValues' possible positions, and that after dragging the handle, it will snap to the nearest possible position.
1486
1507 * Thus, the slider has only 'discreteValues' possible values.
1487 /* dijit/form/HorizontalSlider */
1508 *
1488
1509 * For example, if minimum=10, maxiumum=30, and discreteValues=3, then the slider handle has three possible positions, representing values 10, 20, or 30.
1489 interface _SliderMover extends dojo.dnd.Mover { }
1510 *
1511 * If discreteValues is not specified or if it's value is higher than the number of pixels in the slider bar, then the slider handle can be moved freely, and the slider's value will be computed/reported based on pixel position (in this case it will likely be fractional, such as 123.456789).
1512 */
1513 discreteValues: number;
1514
1490
1515 /**
1491 /**
1516 * If discreteValues is also specified, this indicates the amount of clicks (ie, snap positions) that the slider handle is moved via pageup/pagedown keys.
1492 * A form widget that allows one to select a value with a horizontally draggable handle
1517 * If discreteValues is not specified, it indicates the number of pixels.
1493 */
1518 */
1494 interface HorizontalSlider extends _FormValueWidget, _Container {
1519 pageIncrement: number;
1495 /**
1496 * Show increment/decrement buttons at the ends of the slider?
1497 */
1498 showButtons: boolean;
1520
1499
1521 /**
1500 /**
1522 * If clicking the slider bar changes the value or not
1501 * The minimum value the slider can be set to.
1523 */
1502 */
1524 clickSelect: boolean;
1503 minimum: number;
1525
1504
1526 /**
1505 /**
1527 * The time in ms to take to animate the slider handle from 0% to 100%, when clicking the slider bar to make the handle move.
1506 * The maximum value the slider can be set to.
1528 */
1507 */
1529 slideDuration: number;
1508 maximum: number;
1530
1509
1531 _mousePixelCoord: string;
1510 /**
1532 _pixelCount: string;
1511 * If specified, indicates that the slider handle has only 'discreteValues' possible positions, and that after dragging the handle, it will snap to the nearest possible position.
1533 _startingPixelCoord: string;
1512 * Thus, the slider has only 'discreteValues' possible values.
1534 _handleOffsetCoord: string;
1513 *
1535 _progressPixelSize: string;
1514 * For example, if minimum=10, maxiumum=30, and discreteValues=3, then the slider handle has three possible positions, representing values 10, 20, or 30.
1536
1515 *
1537 _onKeyUp(e: Event): void;
1516 * If discreteValues is not specified or if it's value is higher than the number of pixels in the slider bar, then the slider handle can be moved freely, and the slider's value will be computed/reported based on pixel position (in this case it will likely be fractional, such as 123.456789).
1538 _onKeyDown(e: Event): void;
1517 */
1539 _onHandleClick(e: Event): void;
1518 discreteValues: number;
1540
1519
1541 /**
1520 /**
1542 * Returns true if direction is from right to left
1521 * If discreteValues is also specified, this indicates the amount of clicks (ie, snap positions) that the slider handle is moved via pageup/pagedown keys.
1543 */
1522 * If discreteValues is not specified, it indicates the number of pixels.
1544 _isReversed(): boolean;
1523 */
1545
1524 pageIncrement: number;
1546 _onBarClick(e: Event): void;
1547
1525
1548 _setPixelValue(pixelValue: number, maxPixels: number, priorityChange?: boolean): void;
1526 /**
1549
1527 * If clicking the slider bar changes the value or not
1550 _setValueAttr(value: number, priorityChange?: boolean): void;
1528 */
1529 clickSelect: boolean;
1551
1530
1552 _bumpValue(signedChange: number, priorityChange: boolean): void;
1531 /**
1553
1532 * The time in ms to take to animate the slider handle from 0% to 100%, when clicking the slider bar to make the handle move.
1554 _onClkBumper(val: any): void;
1533 */
1555 _onClkIncBumper(): void;
1534 slideDuration: number;
1556 _onClkDecBumper(): void;
1557
1535
1558 decrement(e: Event): void;
1536 _mousePixelCoord: string;
1559 increment(e: Event): void;
1537 _pixelCount: string;
1560
1538 _startingPixelCoord: string;
1561 _mouseWheeled(evt: Event): void;
1539 _handleOffsetCoord: string;
1540 _progressPixelSize: string;
1562
1541
1563 _typematicCallback(count: number, button: Element, e: Event): void;
1542 _onKeyUp(e: Event): void;
1564 }
1543 _onKeyDown(e: Event): void;
1544 _onHandleClick(e: Event): void;
1565
1545
1566 interface HorizontalSliderConstructor extends _WidgetBaseConstructor<HorizontalSlider> {
1546 /**
1567 /**
1547 * Returns true if direction is from right to left
1568 * for monkey patching
1548 */
1569 */
1549 _isReversed(): boolean;
1570 _Mover: _SliderMover;
1550
1571 }
1551 _onBarClick(e: Event): void;
1572
1552
1573 /* dijit/form/MappedTextBox */
1553 _setPixelValue(pixelValue: number, maxPixels: number, priorityChange?: boolean): void;
1554
1555 _setValueAttr(value: number, priorityChange?: boolean): void;
1556
1557 _bumpValue(signedChange: number, priorityChange: boolean): void;
1574
1558
1575 interface MappedTextBox<C extends Constraints> extends ValidationTextBox<C> {
1559 _onClkBumper(val: any): void;
1576 postMixInProperties(): void;
1560 _onClkIncBumper(): void;
1577 serialize: SerializationFunction;
1561 _onClkDecBumper(): void;
1578 toString(): string;
1579 validate(isFocused?: boolean): boolean;
1580 buildRendering(): void;
1581 reset(): void;
1582 }
1583
1562
1584 interface MappedTextBoxConstructor extends _WidgetBaseConstructor<MappedTextBox<Constraints>> {
1563 decrement(e: Event): void;
1585 new <C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): MappedTextBox<C>;
1564 increment(e: Event): void;
1586 }
1587
1565
1588 /* dijit/form/NumberSpinner */
1566 _mouseWheeled(evt: Event): void;
1567
1568 _typematicCallback(count: number, button: Element, e: Event): void;
1569 }
1589
1570
1590 interface NumberSpinner extends _Spinner, NumberTextBoxMixin {
1571 interface HorizontalSliderConstructor extends _WidgetBaseConstructor<HorizontalSlider> {
1591 constraints: NumberTextBoxConstraints;
1572 /**
1592 baseClass: string;
1573 * for monkey patching
1593 adjust(val: any, delta: number): any;
1574 */
1575 _Mover: _SliderMover;
1576 }
1577
1578 /* dijit/form/MappedTextBox */
1594
1579
1595 /* overrides */
1580 interface MappedTextBox<C extends Constraints> extends ValidationTextBox<C> {
1596 pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>;
1581 postMixInProperties(): void;
1597 parse(value: string, constraints: NumberTextBoxConstraints): string;
1582 serialize: SerializationFunction;
1598 format(value: number, constraints: NumberTextBoxConstraints): string;
1583 toString(): string;
1599 filter(value: number): number;
1584 validate(isFocused?: boolean): boolean;
1600 value: number;
1585 buildRendering(): void;
1601 }
1586 reset(): void;
1587 }
1602
1588
1603 interface NumberSpinnerConstructor extends _WidgetBaseConstructor<NumberSpinner> { }
1589 interface MappedTextBoxConstructor extends _WidgetBaseConstructor<MappedTextBox<Constraints>> {
1590 new <C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): MappedTextBox<C>;
1591 }
1604
1592
1605 /* dijit/form/NumberTextBox */
1593 /* dijit/form/NumberSpinner */
1606
1594
1607 interface NumberTextBoxConstraints extends RangeBoundTextBoxConstraints, dojo.NumberFormatOptions, dojo.NumberParseOptions { }
1595 interface NumberSpinner extends _Spinner, NumberTextBoxMixin {
1596 constraints: NumberTextBoxConstraints;
1597 baseClass: string;
1598 adjust(val: any, delta: number): any;
1608
1599
1609 interface NumberTextBoxMixin {
1600 /* overrides */
1610 pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>;
1601 pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>;
1611 constraints: NumberTextBoxConstraints;
1602 parse(value: string, constraints: NumberTextBoxConstraints): string;
1612 value: number;
1603 format(value: number, constraints: NumberTextBoxConstraints): string;
1613 editOptions: { pattern: string };
1604 filter(value: number): number;
1614 _formatter: (value: number, options?: dojo.NumberFormatOptions) => string;
1605 value: number;
1615 _regExpGenerator: (options?: dojo.NumberRegexpOptions) => string;
1606 }
1616 _decimalInfo: (constraints: Constraints) => { sep: string; places: number; };
1617 postMixInProperties(): void;
1618 format(value: number, constraints: NumberTextBoxConstraints): string;
1619 _parser: (expression: string, options?: dojo.NumberParseOptions) => number;
1620 parse(value: string, constraints: dojo.NumberParseOptions): string;
1621 filter(value: number): number;
1622 serialize: SerializationFunction;
1623 isValid(isFocused: boolean): boolean;
1624 }
1625
1607
1626 interface NumberTextBoxMixinConstructor extends _WidgetBaseConstructor<NumberTextBoxMixin> { }
1608 interface NumberSpinnerConstructor extends _WidgetBaseConstructor<NumberSpinner> { }
1609
1610 /* dijit/form/NumberTextBox */
1611
1612 interface NumberTextBoxConstraints extends RangeBoundTextBoxConstraints, dojo.NumberFormatOptions, dojo.NumberParseOptions { }
1627
1613
1628 interface NumberTextBox extends RangeBoundTextBox, NumberTextBoxMixin {
1614 interface NumberTextBoxMixin {
1629 constraints: NumberTextBoxConstraints;
1615 pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>;
1630 pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>;
1616 constraints: NumberTextBoxConstraints;
1631 parse(value: string, constraints: dojo.NumberParseOptions): string;
1617 value: number;
1632 format(value: number, constraints: dojo.NumberFormatOptions): string;
1618 editOptions: { pattern: string };
1633 value: number;
1619 _formatter: (value: number, options?: dojo.NumberFormatOptions) => string;
1634 filter(value: number): number;
1620 _regExpGenerator: (options?: dojo.NumberRegexpOptions) => string;
1635 }
1621 _decimalInfo: (constraints: Constraints) => { sep: string; places: number; };
1622 postMixInProperties(): void;
1623 format(value: number, constraints: NumberTextBoxConstraints): string;
1624 _parser: (expression: string, options?: dojo.NumberParseOptions) => number;
1625 parse(value: string, constraints: dojo.NumberParseOptions): string;
1626 filter(value: number): number;
1627 serialize: SerializationFunction;
1628 isValid(isFocused: boolean): boolean;
1629 }
1636
1630
1637 interface NumberTextBoxConstructor extends _WidgetBaseConstructor<NumberTextBox> {
1631 interface NumberTextBoxMixinConstructor extends _WidgetBaseConstructor<NumberTextBoxMixin> { }
1638 Mixin: NumberTextBoxMixinConstructor;
1639 }
1640
1641 /* dijit/form/RadioButton */
1642
1643 interface RadioButton extends CheckBox, _RadioButtonMixin {
1644 baseClass: string;
1645 }
1646
1647 interface RadioButtonConstructor extends _WidgetBaseConstructor<RadioButton> { }
1648
1649 /* dijit/form/RangeBoundTextBox */
1650
1632
1651 interface RangeBoundTextBoxConstraints extends Constraints {
1633 interface NumberTextBox extends RangeBoundTextBox, NumberTextBoxMixin {
1652 min?: number;
1634 constraints: NumberTextBoxConstraints;
1653 max?: number;
1635 pattern: ConstraintsToRegExpString<NumberTextBoxConstraints>;
1654 }
1636 parse(value: string, constraints: dojo.NumberParseOptions): string;
1637 format(value: number, constraints: dojo.NumberFormatOptions): string;
1638 value: number;
1639 filter(value: number): number;
1640 }
1655
1641
1656 interface RangeBoundTextBox extends MappedTextBox<RangeBoundTextBoxConstraints> {
1642 interface NumberTextBoxConstructor extends _WidgetBaseConstructor<NumberTextBox> {
1657 /**
1643 Mixin: NumberTextBoxMixinConstructor;
1658 * The message to display if value is out-of-range
1644 }
1659 */
1660 rangeMessage: string;
1661
1645
1662 /**
1646 /* dijit/form/RadioButton */
1663 * Overridable function used to validate the range of the numeric input value.
1647
1664 */
1648 interface RadioButton extends CheckBox, _RadioButtonMixin {
1665 rangeCheck(primative: number, constraints: RangeBoundTextBoxConstraints): boolean;
1649 baseClass: string;
1650 }
1666
1651
1667 /**
1652 interface RadioButtonConstructor extends _WidgetBaseConstructor<RadioButton> { }
1668 * Tests if the value is in the min/max range specified in constraints
1653
1669 */
1654 /* dijit/form/RangeBoundTextBox */
1670 isInRange(isFocused: boolean): boolean;
1671
1655
1672 /**
1656 interface RangeBoundTextBoxConstraints extends Constraints {
1673 * Returns true if the value is out of range and will remain
1657 min?: number;
1674 * out of range even if the user types more characters
1658 max?: number;
1675 */
1659 }
1676 _isDefinitelyOutOfRange(): boolean;
1677
1660
1678 isValid(isFocused: boolean): boolean;
1661 interface RangeBoundTextBox extends MappedTextBox<RangeBoundTextBoxConstraints> {
1679 getErrorMessage(isFocused: boolean): string;
1662 /**
1680 postMixInProperties(): void;
1663 * The message to display if value is out-of-range
1681 }
1664 */
1665 rangeMessage: string;
1682
1666
1683 interface RangeBoundTextBoxConstructor extends _WidgetBaseConstructor<RangeBoundTextBox> { }
1667 /**
1684
1668 * Overridable function used to validate the range of the numeric input value.
1685 /* dijit/form/Select */
1669 */
1686
1670 rangeCheck(primative: number, constraints: RangeBoundTextBoxConstraints): boolean;
1687 interface Select<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions, U extends dijit._WidgetBase> extends _FormSelectWidget<T, Q, O>, _HasDropDown<U>, _KeyNavMixin {
1688 baseClass: string;
1689
1671
1690 /**
1672 /**
1691 * What to display in an "empty" drop down.
1673 * Tests if the value is in the min/max range specified in constraints
1692 */
1674 */
1693 emptyLabel: string;
1675 isInRange(isFocused: boolean): boolean;
1694
1676
1695 /**
1677 /**
1696 * Specifies how to interpret the labelAttr in the data store items.
1678 * Returns true if the value is out of range and will remain
1697 */
1679 * out of range even if the user types more characters
1698 labelType: string;
1680 */
1681 _isDefinitelyOutOfRange(): boolean;
1699
1682
1700 /**
1683 isValid(isFocused: boolean): boolean;
1701 * Currently displayed error/prompt message
1684 getErrorMessage(isFocused: boolean): string;
1702 */
1685 postMixInProperties(): void;
1703 message: string;
1686 }
1687
1688 interface RangeBoundTextBoxConstructor extends _WidgetBaseConstructor<RangeBoundTextBox> { }
1704
1689
1705 /**
1690 /* dijit/form/Select */
1706 * Can be true or false, default is false.
1691
1707 */
1692 interface Select<T extends Object, Q extends dojo.store.api.BaseQueryType, O extends dojo.store.api.QueryOptions, U extends dijit._WidgetBase> extends _FormSelectWidget<T, Q, O>, _HasDropDown<U>, _KeyNavMixin {
1708 required: boolean;
1693 baseClass: string;
1709
1694
1710 /**
1695 /**
1711 * "Incomplete" if this select is required but unset (i.e. blank value), "" otherwise
1696 * What to display in an "empty" drop down.
1712 */
1697 */
1713 state: string;
1698 emptyLabel: string;
1714
1699
1715 /**
1700 /**
1716 * Order fields are traversed when user hits the tab key
1701 * Specifies how to interpret the labelAttr in the data store items.
1717 */
1702 */
1718 tabIndex: any;
1703 labelType: string;
1719 templateString: any;
1720
1704
1721 /**
1705 /**
1722 * See the description of dijit/Tooltip.defaultPosition for details on this parameter.
1706 * Currently displayed error/prompt message
1723 */
1707 */
1724 tooltipPosition: any;
1708 message: string;
1725
1709
1726 childSelector(node: Element | Node): boolean;
1710 /**
1727 destroy(preserveDom: boolean): void;
1711 * Can be true or false, default is false.
1728 focus(): void;
1712 */
1713 required: boolean;
1729
1714
1730 /**
1715 /**
1731 * Sets the value to the given option, used during search by letter.
1716 * "Incomplete" if this select is required but unset (i.e. blank value), "" otherwise
1732 * @param widget Reference to option's widget
1717 */
1733 */
1718 state: string;
1734 focusChild(widget: dijit._WidgetBase): void;
1735 isLoaded(): boolean;
1736
1719
1737 /**
1720 /**
1738 * Whether or not this is a valid value.
1721 * Order fields are traversed when user hits the tab key
1739 * @param isFocused
1722 */
1740 */
1723 tabIndex: any;
1741 isValid(isFocused: boolean): boolean;
1724 templateString: any;
1725
1726 /**
1727 * See the description of dijit/Tooltip.defaultPosition for details on this parameter.
1728 */
1729 tooltipPosition: any;
1742
1730
1743 /**
1731 childSelector(node: Element | Node): boolean;
1744 * populates the menu
1732 destroy(preserveDom: boolean): void;
1745 * @param loadCallback
1733 focus(): void;
1746 */
1747 loadDropDown(loadCallback: () => any): void;
1748 postCreate(): void;
1749
1750 /**
1751 * set the missing message
1752 */
1753 postMixInProperties(): void;
1754
1734
1755 /**
1735 /**
1756 * Overridden so that the state will be cleared.
1736 * Sets the value to the given option, used during search by letter.
1757 */
1737 * @param widget Reference to option's widget
1758 reset(): void;
1738 */
1759 startup(): void;
1739 focusChild(widget: dijit._WidgetBase): void;
1740 isLoaded(): boolean;
1760
1741
1761 /**
1742 /**
1762 * Called by oninit, onblur, and onkeypress, and whenever required/disabled state changes
1743 * Whether or not this is a valid value.
1763 * @param isFocused
1744 * @param isFocused
1764 */
1745 */
1765 validate(isFocused: boolean): boolean;
1746 isValid(isFocused: boolean): boolean;
1766
1747
1767 /**
1748 /**
1768 * When a key is pressed that matches a child item,
1749 * populates the menu
1769 * this method is called so that a widget can take
1750 * @param loadCallback
1770 * appropriate action is necessary.
1751 */
1771 * @param item
1752 loadDropDown(loadCallback: () => any): void;
1772 * @param evt
1753 postCreate(): void;
1773 * @param searchString
1774 * @param numMatches
1775 */
1776 onKeyboardSearch(item: dijit._WidgetBase, evt: Event, searchString: string, numMatches: number): void;
1777 }
1778
1754
1779 interface SelectConstructor extends _WidgetBaseConstructor<Select<any, any, any, any>> { }
1755 /**
1756 * set the missing message
1757 */
1758 postMixInProperties(): void;
1780
1759
1781 /* dijit/form/SimpleTextarea */
1760 /**
1761 * Overridden so that the state will be cleared.
1762 */
1763 reset(): void;
1764 startup(): void;
1782
1765
1783 interface SimpleTextarea extends TextBox {
1766 /**
1784 baseClass: string;
1767 * Called by oninit, onblur, and onkeypress, and whenever required/disabled state changes
1785 rows: string;
1768 * @param isFocused
1786 cols: string;
1769 */
1787 templateString: string;
1770 validate(isFocused: boolean): boolean;
1788 postMixInProperties(): void;
1789 buildRendering(): void;
1790 filter(value: string): string;
1791 }
1792
1793 interface SimpleTextareaConstructor extends _WidgetBaseConstructor<SimpleTextarea> {
1794 new (params: Object, srcNodeRef: dojo.NodeOrString): SimpleTextarea;
1795 }
1796
1771
1797 /* dijit/form/Textarea */
1772 /**
1773 * When a key is pressed that matches a child item,
1774 * this method is called so that a widget can take
1775 * appropriate action is necessary.
1776 * @param item
1777 * @param evt
1778 * @param searchString
1779 * @param numMatches
1780 */
1781 onKeyboardSearch(item: dijit._WidgetBase, evt: Event, searchString: string, numMatches: number): void;
1782 }
1798
1783
1799 interface Textarea extends SimpleTextarea, _ExpandingTextAreaMixin {
1784 interface SelectConstructor extends _WidgetBaseConstructor<Select<any, any, any, any>> { }
1800 baseClass: string;
1801 cols: string;
1802 buildRendering(): void;
1803 }
1804
1785
1805 interface TextareaConstructor extends _WidgetBaseConstructor<Textarea> { }
1786 /* dijit/form/SimpleTextarea */
1806
1807 /* dijit/form/TextBox */
1808
1787
1809 interface TextBox extends _FormValueWidget, _TextBoxMixin<Constraints> {
1788 interface SimpleTextarea extends TextBox {
1810 // set(name: 'displayedValue', value: string): this;
1789 baseClass: string;
1811 // set(name: 'disabled', value: boolean): this;
1790 rows: string;
1812 // set(name: 'value', value: string): this;
1791 cols: string;
1813 // set(name: string, value: any): this;
1792 templateString: string;
1814 // set(values: Object): this;
1793 postMixInProperties(): void;
1794 buildRendering(): void;
1795 filter(value: string): string;
1796 }
1815
1797
1816 // get(name: 'displayedValue'): string;
1798 interface SimpleTextareaConstructor extends _WidgetBaseConstructor<SimpleTextarea> {
1817 // get(name: 'value'): string;
1799 new(params: Object, srcNodeRef: dojo.NodeOrString): SimpleTextarea;
1818 // get(name: string): any;
1800 }
1819 }
1820
1801
1821 interface TextBoxConstructor extends _WidgetBaseConstructor<TextBox> { }
1802 /* dijit/form/Textarea */
1822
1823 /* dijit/form/ToggleButton */
1824
1825 interface ToggleButton extends Button, _ToggleButtonMixin {
1826 baseClass: string;
1827
1803
1828 setChecked(checked: boolean): void;
1804 interface Textarea extends SimpleTextarea, _ExpandingTextAreaMixin {
1805 baseClass: string;
1806 cols: string;
1807 buildRendering(): void;
1808 }
1809
1810 interface TextareaConstructor extends _WidgetBaseConstructor<Textarea> { }
1829
1811
1830 // set(name: 'checked', value: boolean): this;
1812 /* dijit/form/TextBox */
1831 // set(name: string, value: any): this;
1813
1832 // set(values: Object): this;
1814 interface TextBox extends _FormValueWidget, _TextBoxMixin<Constraints> {
1833 }
1815
1816 }
1817
1818 interface TextBoxConstructor extends _WidgetBaseConstructor<TextBox> { }
1834
1819
1835 interface ToggleButtonConstructor extends _WidgetBaseConstructor<ToggleButton> { }
1820 /* dijit/form/ToggleButton */
1836
1821
1837 /* dijit/form/ValidationTextBox */
1822 interface ToggleButton extends Button, _ToggleButtonMixin {
1823 baseClass: string;
1824
1825 setChecked(checked: boolean): void;
1826 }
1838
1827
1839 interface IsValidFunction {
1828 interface ToggleButtonConstructor extends _WidgetBaseConstructor<ToggleButton> { }
1840 (isFocused?: boolean): boolean;
1829
1841 }
1830 /* dijit/form/ValidationTextBox */
1831
1832 interface IsValidFunction {
1833 (isFocused?: boolean): boolean;
1834 }
1842
1835
1843 interface ValidationTextBox<C extends Constraints = Constraints> extends TextBox {
1836 interface ValidationTextBox<C extends Constraints = Constraints> extends TextBox {
1844 templateString: string;
1837 templateString: string;
1845 required: boolean;
1838 required: boolean;
1846 promptMessage: string;
1839 promptMessage: string;
1847 invalidMessage: string;
1840 invalidMessage: string;
1848 missingMessage: string;
1841 missingMessage: string;
1849 message: string;
1842 message: string;
1850 constraints: C;
1843 constraints: C;
1851 pattern: string | ConstraintsToRegExpString<C>;
1844 pattern: string | ConstraintsToRegExpString<C>;
1852 regExp: string;
1845 regExp: string;
1853 regExpGen(constraints: C): void;
1846 regExpGen(constraints: C): void;
1854 state: string;
1847 state: string;
1855 tooltipPosition: string[];
1848 tooltipPosition: string[];
1856 validator: ConstrainedValidFunction<C>;
1849 validator: ConstrainedValidFunction<C>;
1857 isValid: IsValidFunction;
1850 isValid: IsValidFunction;
1858 getErrorMessage(isFocused: boolean): string;
1851 getErrorMessage(isFocused: boolean): string;
1859 getPromptMessage(isFocused: boolean): string;
1852 getPromptMessage(isFocused: boolean): string;
1860 validate(isFocused: boolean): boolean;
1853 validate(isFocused: boolean): boolean;
1861 displayMessage(message: string): void;
1854 displayMessage(message: string): void;
1862
1863 startup(): void;
1864 postMixInProperties(): void;
1865
1855
1866 reset(): void;
1856 startup(): void;
1857 postMixInProperties(): void;
1867
1858
1868 destroy(preserveDom?: boolean): void;
1859 reset(): void;
1869
1860
1870 // set(name: 'constraints', value: Constraints): this;
1861 destroy(preserveDom?: boolean): void;
1871 // set(name: 'disabled', value: boolean): this;
1862 }
1872 // set(name: 'message', value: string): this;
1873 // set(name: 'pattern', value: string | ConstraintsToRegExpString<C>): this;
1874 // set(name: 'regExp', value: string): this;
1875 // set(name: 'regExpGen', value: Constraints): this;
1876 // set(name: 'required', value: boolean): this;
1877 // set(name: 'value', value: string): this;
1878 // set(name: string, value: any): this;
1879 // set(values: Object): this;
1880
1863
1881 // get(name: 'pattern'): string | ConstraintsToRegExpString<C>;
1864 interface ValidationTextBoxConstructor extends _WidgetBaseConstructor<ValidationTextBox<Constraints>> {
1882 // get(name: string): any;
1865 new <C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): ValidationTextBox<C>;
1883 }
1866 }
1884
1867 }
1885 interface ValidationTextBoxConstructor extends _WidgetBaseConstructor<ValidationTextBox<Constraints>> {
1886 new <C extends Constraints>(params: Object, srcNodeRef: dojo.NodeOrString): ValidationTextBox<C>;
1887 }
1888 }
1889 }
1868 }
@@ -102,6 +102,13 declare module 'dijit/Dialog' {
102 export = Dialog;
102 export = Dialog;
103 }
103 }
104
104
105 declare module "dijit/_HasDropDown" {
106 type _HasDropDown<T extends dijit._WidgetBase = dijit._WidgetBase> = dijit._HasDropDown<T>;
107 const _HasDropDown: dijit._WidgetBaseConstructor<_HasDropDown>;
108
109 export = _HasDropDown;
110 }
111
105 declare module 'dijit/DropDownMenu' {
112 declare module 'dijit/DropDownMenu' {
106 type DropDownMenu = dijit.DropDownMenu;
113 type DropDownMenu = dijit.DropDownMenu;
107 const DropDownMenu: dijit.DropDownMenuConstructor;
114 const DropDownMenu: dijit.DropDownMenuConstructor;
@@ -252,6 +259,18 declare module 'dijit/form/_FormMixin' {
252 export = _FormMixin;
259 export = _FormMixin;
253 }
260 }
254
261
262 declare module "dijit/form/_FormWidgetMixin" {
263 type _FormWidgetMixin = dijit.form._FormWidgetMixin;
264 const _FormWidgetMixin: dijit._WidgetBaseConstructor<_FormWidgetMixin>;
265 export = _FormWidgetMixin;
266 }
267
268 declare module "dijit/form/_FormValueMixin" {
269 type _FormValueMixin = dijit.form._FormValueMixin;
270 const _FormValueMixin: dijit._WidgetBaseConstructor<_FormValueMixin>;
271 export = _FormValueMixin;
272 }
273
255 declare module 'dijit/form/_FormValueWidget' {
274 declare module 'dijit/form/_FormValueWidget' {
256 type _FormValueWidget = dijit.form._FormValueWidget;
275 type _FormValueWidget = dijit.form._FormValueWidget;
257 const _FormValueWidget: dijit.form._FormValueWidgetConstructor;
276 const _FormValueWidget: dijit.form._FormValueWidgetConstructor;
@@ -4,55 +4,67
4
4
5 declare namespace dojo {
5 declare namespace dojo {
6
6
7 interface NodeListAnimationArgs extends _base.AnimationArguments {
7 interface NodeListAnimationArgs extends Omit<_base.AnimationArguments, "node"> {
8 auto?: boolean;
8 auto?: false;
9 }
9 }
10
10
11 interface NodeList<T extends Node> {
11 interface NodeListAutoAnimationArgs extends Omit<_base.AnimationArguments, "node"> {
12 _anim(obj: any, method: string, args?: NodeListAnimationArgs): _base.Animation | this;
12 auto: true;
13 }
14
15 interface NodeList<T extends Node> {
13
16
14 /**
17 _anim(obj: any, method: string, args?: NodeListAnimationArgs): _base.Animation;
15 * wipe in all elements of this NodeList via `dojo/fx.wipeIn()`
18 _anim(obj: any, method: string, args: NodeListAutoAnimationArgs): this;
16 */
17 wipeIn(args: NodeListAnimationArgs): _base.Animation | this;
18
19
19 /**
20 /**
20 * wipe out all elements of this NodeList via `dojo/fx.wipeOut()`
21 * wipe in all elements of this NodeList via `dojo/fx.wipeIn()`
21 */
22 */
22 wipeOut(args: NodeListAnimationArgs): _base.Animation | this;
23 wipeIn(args?: NodeListAnimationArgs): _base.Animation;
24 wipeIn(args: NodeListAutoAnimationArgs): this;
23
25
24 /**
26 /**
25 * slide all elements of the node list to the specified place via `dojo/fx.slideTo()`
27 * wipe out all elements of this NodeList via `dojo/fx.wipeOut()`
26 */
28 */
27 slideTo(args: NodeListAnimationArgs): _base.Animation | this;
29 wipeOut(args?: NodeListAnimationArgs): _base.Animation;
30 wipeOut(args: NodeListAutoAnimationArgs): this;
28
31
29 /**
32 /**
30 * fade in all elements of this NodeList via `dojo.fadeIn`
33 * slide all elements of the node list to the specified place via `dojo/fx.slideTo()`
31 */
34 */
32 fadeIn(args: NodeListAnimationArgs): _base.Animation | this;
35 slideTo(args?: NodeListAnimationArgs): _base.Animation;
36 slideTo(args: NodeListAutoAnimationArgs): this;
33
37
34 /**
38 /**
35 * fade out all elements of this NodeList via `dojo.fadeOut`
39 * fade in all elements of this NodeList via `dojo.fadeIn`
36 */
40 */
37 fadeOut(args: NodeListAnimationArgs): _base.Animation | this;
41 fadeIn(args?: NodeListAnimationArgs): _base.Animation;
42 fadeIn(args: NodeListAutoAnimationArgs): this;
38
43
39 /**
44 /**
40 * Animate all elements of this NodeList across the properties specified.
45 * fade out all elements of this NodeList via `dojo.fadeOut`
41 * syntax identical to `dojo.animateProperty`
46 */
42 */
47 fadeOut(args?: NodeListAnimationArgs): _base.Animation;
43 animateProperty(args: NodeListAnimationArgs): _base.Animation | this;
48 fadeOut(args: NodeListAutoAnimationArgs): this;
44
49
45 /**
50 /**
46 * Animate one or more CSS properties for all nodes in this list.
51 * Animate all elements of this NodeList across the properties specified.
47 * The returned animation object will already be playing when it
52 * syntax identical to `dojo.animateProperty`
48 * is returned. See the docs for `dojo.anim` for full details.
53 */
49 */
54 animateProperty(args?: NodeListAnimationArgs): _base.Animation;
50 anim(properties: _base.AnimationArgumentsProperties, duration?: number, easing?: (n?: number) => number, onEnd?: Function, delay?: number): _base.Animation;
55 animateProperty(args: NodeListAutoAnimationArgs): this;
51 }
56
57 /**
58 * Animate one or more CSS properties for all nodes in this list.
59 * The returned animation object will already be playing when it
60 * is returned. See the docs for `dojo.anim` for full details.
61 */
62 anim(properties: _base.AnimationArgumentsProperties, duration?: number, easing?: (n?: number) => number, onEnd?: Function, delay?: number): _base.Animation;
63 }
52 }
64 }
53
65
54 declare module 'dojo/NodeList-fx' {
66 declare module 'dojo/NodeList-fx' {
55 type NodeList<T extends Node> = dojo.NodeList<T>;
67 type NodeList<T extends Node> = dojo.NodeList<T>;
56 const NodeList: dojo.NodeListConstructor;
68 const NodeList: dojo.NodeListConstructor;
57 export = NodeList;
69 export = NodeList;
58 }
70 }
@@ -1726,9 +1726,9 declare namespace dojo {
1726 }
1726 }
1727
1727
1728 interface NodeListConstructor {
1728 interface NodeListConstructor {
1729 new <T extends Node>(array: number | Array<T>): NodeList<T>;
1729 new <T extends Node>(array: number | Array<T> | NodeListOf<T>): NodeList<T>;
1730 new <T extends Node>(...args: T[]): NodeList<T>;
1730 new <T extends Node>(...args: T[]): NodeList<T>;
1731 <T extends Node>(array: number | Array<T>): NodeList<T>;
1731 <T extends Node>(array: number | Array<T> | NodeListOf<T>): NodeList<T>;
1732 <T extends Node>(...args: T[]): NodeList<T>;
1732 <T extends Node>(...args: T[]): NodeList<T>;
1733
1733
1734 prototype: NodeList<any>;
1734 prototype: NodeList<any>;
@@ -1770,6 +1770,9 declare namespace dojo {
1770 * the search by. Returns an instance of NodeList.
1770 * the search by. Returns an instance of NodeList.
1771 */
1771 */
1772 <T extends Node>(query: string, root?: NodeOrString): NodeList<T>;
1772 <T extends Node>(query: string, root?: NodeOrString): NodeList<T>;
1773 <T extends Node>(root: Node): NodeList<T>;
1774
1775 NodeList: NodeListConstructor;
1773
1776
1774 /**
1777 /**
1775 * Test to see if a node matches a selector
1778 * Test to see if a node matches a selector
@@ -10,7 +10,8
10 ],
10 ],
11 "types": [
11 "types": [
12 "requirejs",
12 "requirejs",
13 "../main/typings"
13 "../main/typings",
14 "../main/typings/dojo/NodeList-fx"
14 ],
15 ],
15 "module": "ESNext",
16 "module": "ESNext",
16 "target": "ESNext"
17 "target": "ESNext"
General Comments 0
You need to be logged in to leave comments. Login now