Skip to content

Commit

Permalink
Merge b98849c into d6b267c
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeaudoincoveo committed Feb 7, 2017
2 parents d6b267c + b98849c commit 34d7b4b
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions src/ui/Settings/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ export interface ISettingsOptions {
}

/**
* The Settings component is comprised of a settings button (usually located
* on the right of the search box) which allows for some contextual actions.<br/>
* This component references other components to show in its menu, for example
* the {@link ShareQuery} component.
* The Settings component renders a **Settings** button that the end user can click to access a popup menu from which
* it is possible to perform several contextual actions. The usual location of the **Settings** button in the page is to
* the right of the {@link Searchbox}.
*
* This component can reference several components to populate its popup menu:
* - {@link AdvancedSearch}
* - {@link ExportToExcel}
* - {@link FollowItem}
* - {@link PreferencesPanel} (see also {@link ResultsFiltersPreferences} and {@link ResultsPreferences})
* - {@link SearchAlerts} (see also {@link SearchAlertsMessage})
* - {@link ShareQuery}
*/
export class Settings extends Component {
static ID = 'Settings';
Expand All @@ -30,9 +37,11 @@ export class Settings extends Component {
* @componentOptions
*/
static options: ISettingsOptions = {

/**
* The delay before hiding the popup menu when the mouse leaves it.<br/>
* The default value is <code>300</code>.
* Specifies the delay (in milliseconds) before hiding the popup menu when the cursor is not hovering over it.
*
* Default value is `300`. Minimum value is `0 `.
*/
menuDelay: ComponentOptions.buildNumberOption({ defaultValue: 300, min: 0 })
};
Expand All @@ -42,10 +51,11 @@ export class Settings extends Component {
private isOpened: boolean = false;

/**
* Create a new Settings component
* @param element
* @param options
* @param bindings
* Creates a new Settings component.
* @param element The HTMLElement on which to instantiate the component.
* @param options The options for the Settings component.
* @param bindings The bindings that the component requires to function normally. If not set, these will be
* automatically resolved (with a slower execution time).
*/
constructor(public element: HTMLElement, public options: ISettingsOptions, bindings?: IComponentBindings) {
super(element, Settings.ID, bindings);
Expand All @@ -54,7 +64,7 @@ export class Settings extends Component {
}

/**
* Open the settings popup
* Opens the **Settings** popup menu.
*/
public open() {
this.isOpened = true;
Expand All @@ -69,7 +79,7 @@ export class Settings extends Component {
}

/**
* Close the settings popup
* Closes the **Settings** popup menu.
*/
public close() {
this.isOpened = false;
Expand Down

0 comments on commit 34d7b4b

Please sign in to comment.