/// declare namespace JQueryUI { // Accordion ////////////////////////////////////////////////// interface AccordionOptions extends AccordionEvents { active?: any; // boolean or number animate?: any; // boolean, number, string or object collapsible?: boolean | undefined; disabled?: boolean | undefined; event?: string | undefined; header?: string | undefined; heightStyle?: string | undefined; icons?: any; } interface AccordionUIParams { newHeader: JQuery; oldHeader: JQuery; newPanel: JQuery; oldPanel: JQuery; } interface AccordionEvent { (event: JQueryEventObject, ui: AccordionUIParams): void; } interface AccordionEvents { activate?: AccordionEvent | undefined; beforeActivate?: AccordionEvent | undefined; create?: AccordionEvent | undefined; } interface Accordion extends Widget, AccordionOptions { } // Autocomplete ////////////////////////////////////////////////// interface AutocompleteOptions extends AutocompleteEvents { appendTo?: any; // Selector; autoFocus?: boolean | undefined; delay?: number | undefined; disabled?: boolean | undefined; minLength?: number | undefined; position?: any; // object source?: any; // [], string or () classes?: AutocompleteClasses | undefined; } interface AutocompleteClasses { "ui-autocomplete"?: string | undefined; "ui-autocomplete-input"?: string | undefined; } interface AutocompleteUIParams { /** * The item selected from the menu, if any. Otherwise the property is null */ item?: any; content?: any; } interface AutocompleteEvent { (event: JQueryEventObject, ui: AutocompleteUIParams): void; } interface AutocompleteEvents { change?: AutocompleteEvent | undefined; close?: AutocompleteEvent | undefined; create?: AutocompleteEvent | undefined; focus?: AutocompleteEvent | undefined; open?: AutocompleteEvent | undefined; response?: AutocompleteEvent | undefined; search?: AutocompleteEvent | undefined; select?: AutocompleteEvent | undefined; } interface Autocomplete extends Widget, AutocompleteOptions { escapeRegex: (value: string) => string; filter: (array: any, term: string) => any; } // Button ////////////////////////////////////////////////// interface ButtonOptions { disabled?: boolean | undefined; icons?: any; label?: string | undefined; text?: string | boolean | undefined; click?: ((event?: Event) => void) | undefined; } interface Button extends Widget, ButtonOptions { } // Datepicker ////////////////////////////////////////////////// interface DatepickerOptions { /** * An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field. */ altField?: any; // Selector, jQuery or Element /** * The dateFormat to be used for the altField option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. For a full list of the possible formats see the formatDate function */ altFormat?: string | undefined; /** * The text to display after each date field, e.g., to show the required format. */ appendText?: string | undefined; /** * Set to true to automatically resize the input field to accommodate dates in the current dateFormat. */ autoSize?: boolean | undefined; /** * A function that takes an input field and current datepicker instance and returns an options object to update the datepicker with. It is called just before the datepicker is displayed. */ beforeShow?: ((input: Element, inst: any) => JQueryUI.DatepickerOptions) | undefined; /** * A function that takes a date as a parameter and must return an array with: * [0]: true/false indicating whether or not this date is selectable * [1]: a CSS class name to add to the date's cell or "" for the default presentation * [2]: an optional popup tooltip for this date * The function is called for each day in the datepicker before it is displayed. */ beforeShowDay?: ((date: Date) => any[]) | undefined; /** * A URL of an image to use to display the datepicker when the showOn option is set to "button" or "both". If set, the buttonText option becomes the alt value and is not directly displayed. */ buttonImage?: string | undefined; /** * Whether the button image should be rendered by itself instead of inside a button element. This option is only relevant if the buttonImage option has also been set. */ buttonImageOnly?: boolean | undefined; /** * The text to display on the trigger button. Use in conjunction with the showOn option set to "button" or "both". */ buttonText?: string | undefined; /** * A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year. */ calculateWeek?: ((date: Date) => string) | undefined; /** * Whether the month should be rendered as a dropdown instead of text. */ changeMonth?: boolean | undefined; /** * Whether the year should be rendered as a dropdown instead of text. Use the yearRange option to control which years are made available for selection. */ changeYear?: boolean | undefined; /** * The text to display for the close link. Use the showButtonPanel option to display this button. */ closeText?: string | undefined; /** * When true, entry in the input field is constrained to those characters allowed by the current dateFormat option. */ constrainInput?: boolean | undefined; /** * The text to display for the current day link. Use the showButtonPanel option to display this button. */ currentText?: string | undefined; /** * The format for parsed and displayed dates. For a full list of the possible formats see the formatDate function. */ dateFormat?: string | undefined; /** * The list of long day names, starting from Sunday, for use as requested via the dateFormat option. */ dayNames?: string[] | undefined; /** * The list of minimised day names, starting from Sunday, for use as column headers within the datepicker. */ dayNamesMin?: string[] | undefined; /** * The list of abbreviated day names, starting from Sunday, for use as requested via the dateFormat option. */ dayNamesShort?: string[] | undefined; /** * Set the date to highlight on first opening if the field is blank. Specify either an actual date via a Date object or as a string in the current dateFormat, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today. * Multiple types supported: * Date: A date object containing the default date. * Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday. * String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today. */ defaultDate?: any; // Date, number or string /** * Control the speed at which the datepicker appears, it may be a time in milliseconds or a string representing one of the three predefined speeds ("slow", "normal", "fast"). */ duration?: string | undefined; /** * Set the first day of the week: Sunday is 0, Monday is 1, etc. */ firstDay?: number | undefined; /** * When true, the current day link moves to the currently selected date instead of today. */ gotoCurrent?: boolean | undefined; /** * Normally the previous and next links are disabled when not applicable (see the minDate and maxDate options). You can hide them altogether by setting this attribute to true. */ hideIfNoPrevNext?: boolean | undefined; /** * Whether the current language is drawn from right to left. */ isRTL?: boolean | undefined; /** * The maximum selectable date. When set to null, there is no maximum. * Multiple types supported: * Date: A date object containing the maximum date. * Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday. * String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today. */ maxDate?: any; // Date, number or string /** * The minimum selectable date. When set to null, there is no minimum. * Multiple types supported: * Date: A date object containing the minimum date. * Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday. * String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today. */ minDate?: any; // Date, number or string /** * The list of full month names, for use as requested via the dateFormat option. */ monthNames?: string[] | undefined; /** * The list of abbreviated month names, as used in the month header on each datepicker and as requested via the dateFormat option. */ monthNamesShort?: string[] | undefined; /** * Whether the prevText and nextText options should be parsed as dates by the formatDate function, allowing them to display the target month names for example. */ navigationAsDateFormat?: boolean | undefined; /** * The text to display for the next month link. With the standard ThemeRoller styling, this value is replaced by an icon. */ nextText?: string | undefined; /** * The number of months to show at once. * Multiple types supported: * Number: The number of months to display in a single row. * Array: An array defining the number of rows and columns to display. */ numberOfMonths?: any; // number or number[] /** * Called when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as parameters. this refers to the associated input field. */ onChangeMonthYear?: ((year: number, month: number, inst: any) => void) | undefined; /** * Called when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text ("" if none) and the datepicker instance as parameters. this refers to the associated input field. */ onClose?: ((dateText: string, inst: any) => void) | undefined; /** * Called when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field. */ onSelect?: ((dateText: string, inst: any) => void) | undefined; /** * The text to display for the previous month link. With the standard ThemeRoller styling, this value is replaced by an icon. */ prevText?: string | undefined; /** * Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true. */ selectOtherMonths?: boolean | undefined; /** * The cutoff year for determining the century for a date (used in conjunction with dateFormat 'y'). Any dates entered with a year value less than or equal to the cutoff year are considered to be in the current century, while those greater than it are deemed to be in the previous century. * Multiple types supported: * Number: A value between 0 and 99 indicating the cutoff year. * String: A relative number of years from the current year, e.g., "+3" or "-5". */ shortYearCutoff?: any; // number or string /** * The name of the animation used to show and hide the datepicker. Use "show" (the default), "slideDown", "fadeIn", any of the jQuery UI effects. Set to an empty string to disable animation. */ showAnim?: string | undefined; /** * Whether to display a button pane underneath the calendar. The button pane contains two buttons, a Today button that links to the current day, and a Done button that closes the datepicker. The buttons' text can be customized using the currentText and closeText options respectively. */ showButtonPanel?: boolean | undefined; /** * When displaying multiple months via the numberOfMonths option, the showCurrentAtPos option defines which position to display the current month in. */ showCurrentAtPos?: number | undefined; /** * Whether to show the month after the year in the header. */ showMonthAfterYear?: boolean | undefined; /** * When the datepicker should appear. The datepicker can appear when the field receives focus ("focus"), when a button is clicked ("button"), or when either event occurs ("both"). */ showOn?: string | undefined; /** * If using one of the jQuery UI effects for the showAnim option, you can provide additional settings for that animation via this option. */ showOptions?: any; // TODO /** * Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option. */ showOtherMonths?: boolean | undefined; /** * When true, a column is added to show the week of the year. The calculateWeek option determines how the week of the year is calculated. You may also want to change the firstDay option. */ showWeek?: boolean | undefined; /** * Set how many months to move when clicking the previous/next links. */ stepMonths?: number | undefined; /** * The text to display for the week of the year column heading. Use the showWeek option to display this column. */ weekHeader?: string | undefined; /** * The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the minDate and/or maxDate options. */ yearRange?: string | undefined; /** * Additional text to display after the year in the month headers. */ yearSuffix?: string | undefined; /** * Set to true to automatically hide the datepicker. */ autohide?: boolean | undefined; /** * Set to date to automatically enddate the datepicker. */ endDate?: Date | undefined; } interface DatepickerFormatDateOptions { dayNamesShort?: string[] | undefined; dayNames?: string[] | undefined; monthNamesShort?: string[] | undefined; monthNames?: string[] | undefined; } interface Datepicker extends Widget, DatepickerOptions { regional: { [languageCod3: string]: any }; setDefaults(defaults: DatepickerOptions): void; formatDate(format: string, date: Date, settings?: DatepickerFormatDateOptions): string; parseDate(format: string, date: string, settings?: DatepickerFormatDateOptions): Date; iso8601Week(date: Date): number; noWeekends(date: Date): any[]; } // Dialog ////////////////////////////////////////////////// interface DialogOptions extends DialogEvents { autoOpen?: boolean | undefined; buttons?: { [buttonText: string]: (event?: Event) => void } | DialogButtonOptions[] | undefined; closeOnEscape?: boolean | undefined; classes?: DialogClasses | undefined; closeText?: string | undefined; appendTo?: string | undefined; dialogClass?: string | undefined; disabled?: boolean | undefined; draggable?: boolean | undefined; height?: number | string | undefined; hide?: boolean | number | string | DialogShowHideOptions | undefined; maxHeight?: number | undefined; maxWidth?: number | undefined; minHeight?: number | undefined; minWidth?: number | undefined; modal?: boolean | undefined; position?: any; // object, string or [] resizable?: boolean | undefined; show?: boolean | number | string | DialogShowHideOptions | undefined; stack?: boolean | undefined; title?: string | undefined; width?: any; // number or string zIndex?: number | undefined; open?: DialogEvent | undefined; close?: DialogEvent | undefined; } interface DialogClasses { "ui-dialog"?: string | undefined; "ui-dialog-content"?: string | undefined; "ui-dialog-dragging"?: string | undefined; "ui-dialog-resizing"?: string | undefined; "ui-dialog-buttons"?: string | undefined; "ui-dialog-titlebar"?: string | undefined; "ui-dialog-title"?: string | undefined; "ui-dialog-titlebar-close"?: string | undefined; "ui-dialog-buttonpane"?: string | undefined; "ui-dialog-buttonset"?: string | undefined; "ui-widget-overlay"?: string | undefined; } interface DialogButtonOptions { icons?: any; showText?: string | boolean | undefined; text?: string | undefined; click?: ((eventObject: JQueryEventObject) => any) | undefined; [attr: string]: any; // attributes for the