Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-458 ExportToExcel documentation revision #360

Merged
merged 2 commits into from
Feb 15, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions src/ui/ExportToExcel/ExportToExcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export interface IExportToExcelOptions {
}

/**
* This component allows the user to export their current search results to the Microsoft Excel format (.xlsx).
* It populates the {@link Settings} component menu.
* The ExportToExcel component renders an item in the {@link Settings} menu to allow the end user to export the current
* search results to the Microsoft Excel format (.xlsx).
*/
export class ExportToExcel extends Component {
static ID = 'ExportToExcel';
Expand All @@ -27,24 +27,25 @@ export class ExportToExcel extends Component {
static options: IExportToExcelOptions = {

/**
* Specifies the number of results to include in the exported Excel file.
* Specifies the number of results to include in the resulting Excel file.
*
* Generating and downloading the Excel file should take a reasonably short amount of time when using the default
* value. However, this amount of time will increase exponentially if you set the value higher.
* value. However, this amount of time will increase exponentially as you set the value higher.
*
* It is therefore not recommended to set this value above the default index limit of 1000 search results.
* Consequently, you should avoid setting this value above the default index limit of 1000 search results.
*
* Default value is `100`.
* Default value is `100`. Minimum value is `1`.
*/
numberOfResults: ComponentOptions.buildNumberOption({ defaultValue: 100, min: 1 }),
fieldsToInclude: ComponentOptions.buildFieldsOption()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI : This is not documented because we are waiting on a fix from the Search API team to support it correctly.

So instead of documenting something that does not work flawlessly from end to end, we decided to remove it from the documentation for the time being.

};

/**
* Creates a new ExportToExcel component
* @param element
* @param options
* @param bindings
* Creates a new ExportToExcel component.
* @param element The HTMLElement on which to instantiate the component.
* @param options The options for the ExportToExcel 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).
* @param _window The global Window object (used to download the Excel link).
*/
constructor(public element: HTMLElement, public options: IExportToExcelOptions, public bindings?: IComponentBindings, public _window?: Window) {
Expand All @@ -64,7 +65,7 @@ export class ExportToExcel extends Component {
/**
* Downloads the Excel representation of the current query.
*
* This method also logs an `exportToExcel` event in the usage analytics.
* Also logs an `exportToExcel` event in the usage analytics.
*/
public download() {
let query = this.queryController.getLastQuery();
Expand Down