src/HTMLTableWrapperListener.js
/**
 * @constructor
 * @implements Disposable
 * @param {(HTMLTableElement|HTMLTableWrapper)} table `HTMLTableElement` or {@link HTMLTableWrapper} backing this listener.
 * @param {ColumnControlFactory|HTMLTableWrapperListener~getColumnControl} [columnControlFactory] Optional factory if custom column controls are needed.
 * @param {CellInterpreter|HTMLTableWrapperControl~populateCellValues} [cellInterpreter]
 *   Interpreter to use when falling back to the default {@link HTMLTableWrapperControl} on calls to {@link HTMLTableWrapperListener#getColumnControl}.
 * @classdesc
 *
 * Facilitates communication between the API-level {@link HTMLTableWrapper} and the UI-level {@link ColumnControl}. In addition to the constraints
 * placed on the backing `HTMLTableElement` in {@link HTMLTableWrapper}, this class also requires it to define a table header section
 * (`<thead>`) with the first row's cells defining the column headers for the table. Although the table can define more than one row in its table
 * header section, only the first row will be processed by this class.
 * 
 * Upon {@link HTMLTableWrapperListener#init initialization}, this class will add itself as a listener for click events on
 * all cells in the first row of the backing `HTMLTableElement`'s table header section, as well as add the class name
 * {@link HTMLTableWrapperListener.processedColumnHeader} to each cell.
 * 
 * In response to click events, the appropriate {@link ColumnControl} will be created using the given {@link ColumnControlFactory} (or {@link HTMLTableWrapperListener~getColumnControl} 
 * callback), if defined, or will fall back to {@link HTMLTableWrapperControl} in the case no {@link ColumnControlFactory} (or callback) is defined, or the call to 
 * {@link ColumnControlFactory#getColumnControl} (or direct invocation of the {@link HTMLTableWrapperListener~getColumnControl} callback) returns {@link Nothing}. {@link ColumnControl}s 
 * are cached after they are created, and are reused for subsequent click events. The given `cellInterpreter` is used when falling back to {@link HTMLTableWrapperControl}.
 * 
 * {@link ColumnControl}s can make calls back to {@link HTMLTableWrapperListener#processTable} to trigger table-wide
 * sorting and filtering in response to user-triggered events on the control that would be expected to update the state of the 
 * backing table. Upon a call to {@link HTMLTableWrapperListener#processTable}, {@link ColumnControl#getFilterDescriptor} and 
 * {@link ColumnControl#getSortDescriptor} are called for each cached {@link ColumnControl}. Each result that is not {@link Nothing} is stored, 
 * and ultimately passed to {@link HTMLTableWrapper#filter} and {@link HTMLTableWrapper#sort}. (Implicit to this, calls to {@link HTMLTableWrapperListener#processTable}
 * should not be made in {@link ColumnControl#getFilterDescriptor} and {@link ColumnControl#getSortDescriptor}, as such would cause infinite recursion).
 */


Facilitates communication between the API-level  HTMLTableWrapper and the UI-level  ColumnControl. In addition to the constraints
placed on the backing `HTMLTableElement` in  HTMLTableWrapper, this class also requires it to define a table header section
(``) with the first row's cells defining the column headers for the table. Although the table can define more than one row in its table
header section, only the first row will be processed by this class.

Upon  HTMLTableWrapperListener#init initialization, this class will add itself as a listener for click events on
all cells in the first row of the backing `HTMLTableElement`'s table header section, as well as add the class name
HTMLTableWrapperListener.processedColumnHeader to each cell.

In response to click events, the appropriate  ColumnControl will be created using the given  ColumnControlFactory (or  HTMLTableWrapperListener~getColumnControl
callback), if defined, or will fall back to  HTMLTableWrapperControl in the case no  ColumnControlFactory (or callback) is defined, or the call to
ColumnControlFactory#getColumnControl (or direct invocation of the  HTMLTableWrapperListener~getColumnControl callback) returns  Nothing.  ColumnControls
are cached after they are created, and are reused for subsequent click events. The given `cellInterpreter` is used when falling back to  HTMLTableWrapperControl.

ColumnControls can make calls back to  HTMLTableWrapperListener#processTable to trigger table-wide
sorting and filtering in response to user-triggered events on the control that would be expected to update the state of the
backing table.
Facilitates communication between the API - level HTMLTableWrapper and the UI - level ColumnControl . In addition to the constraints placed on the backing ` HTMLTableElement ` in HTMLTableWrapper this class also requires it to define a table header section ( ` ` ) with the first row ' s cells defining the column headers for the table . Although the table can define more than one row in its table header section only the first row will be processed by this class . Upon HTMLTableWrapperListener#init initialization this class will add itself as a listener for click events on all cells in the first row of the backing ` HTMLTableElement ` ' s table header section as well as add the class name HTMLTableWrapperListener . processedColumnHeader to each cell . In response to click events the appropriate ColumnControl will be created using the given ColumnControlFactory ( or HTMLTableWrapperListener~getColumnControl callback ) if defined or will fall back to HTMLTableWrapperControl in the case no ColumnControlFactory ( or callback ) is defined or the call to ColumnControlFactory#getColumnControl ( or direct invocation of the HTMLTableWrapperListener~getColumnControl callback ) returns Nothing . ColumnControls are cached after they are created and are reused for subsequent click events . The given ` cellInterpreter ` is used when falling back to HTMLTableWrapperControl . ColumnControls can make calls back to HTMLTableWrapperListener#processTable to trigger table - wide sorting and filtering in response to user - triggered events on the control that would be expected to update the state of the backing table .
function HTMLTableWrapperListener(table, columnControlFactory, cellInterpreter) {
    'use strict';
    if (table instanceof HTMLTableWrapper) {
        this.dataTable = dataTable;
    } else {
        this.dataTable = new HTMLTableWrapper(table);
    }
    if (columnControlFactory) {
        this.columnControlFactory = columnControlFactory;
    }
    if (cellInterpreter) {
        this.cellInterpreter = cellInterpreter;
    }
    this.columnControls = [];
}
function HTMLTableWrapperListener ( table , columnControlFactory , cellInterpreter ) { 'use strict' ; if ( table instanceof HTMLTableWrapper ) { this . dataTable = dataTable ; } else { this . dataTable = new HTMLTableWrapper ( table ) ; } if ( columnControlFactory ) { this . columnControlFactory = columnControlFactory ; } if ( cellInterpreter ) { this . cellInterpreter = cellInterpreter ; } this . columnControls = [ ] ; }
@constructor
 @implements Disposable
 @param {(HTMLTableElement|HTMLTableWrapper)} table `HTMLTableElement` or {@link HTMLTableWrapper} backing this listener.
@constructor @implements Disposable @param { ( HTMLTableElement|HTMLTableWrapper ) } table ` HTMLTableElement ` or { @link HTMLTableWrapper } backing this listener .
/**
     * {@link ColumnControl} cache.
     *
     * @private
     * @type {ColumnControl[]}
     */