Source: tables/tables-typedefs.jsdoc

/**
 * @global
 */

/**
 * Top level store for table related data.  It's mounted as 'table_space' under the application state
 * @typedef {object} TableSpace
 * @prop {Object.<string, TableModel>}  data    repository for table model; keyed by tbl_id
 * @prop {Object.<string, TableGroup>}  results repository for table group information; keyed by tbl_group name
 * @prop {Object.<string, Object>}      ui      repository for table UI state; keyed by tbl_ui_id
 *
 * @global
 * @public
 */


/**
 * Table model.  The top level table data object with meta info.
 * @typedef {object} TableModel
 * @prop {string}   tbl_id    unique ID of this table.
 * @prop {string}   title     title, used on label.
 * @prop {TableRequest} request  the request used to create this table
 * @prop {TableKeywords} keywords  a list of all meta from the original source, including comments and duplicates
 * @prop {TableMeta} tableMeta     additional meta added and keywords as key/value pair.  comments and duplicates are no longer here.
 * @prop {TableData} tableData  table's meta information stored as key/value pair.
 * @prop {number}   totalRows   total number of rows.
 * @prop {number}   highlightedRow  the current highlighted row index.  index is natural order starting from 0.
 * @prop {object}   selectInfo  selection information.  use SelectInfo.newInstance take advantage of helper's functions.
 * @prop {boolean}  isFetching  true if data is being fetched and not ready for display.
 * @prop {string}   error       error message if the request fail to create a table.
 * @prop {Group[]} groups    groups is any.
 * @prop {Link[]}  links     links is any.
 * @prop {PARAM[]} params    params is any.
 *
 * @global
 * @public
 */

/**
 * Table data.  Table data object.
 * @typedef {object} TableData
 * @prop {TableColumn[]} columns    table column definition.
 * @prop {string[][]} data          2D array containing the table data
 */

/**
 * Table column information.
 * @typedef {object} TableColumn
 * @prop {string} name      name of the column
 * @prop {string} label     display name of the column
 * @prop {string} type      data type
 * @prop {string} units     data units
 * @prop {string} nullString string used to represent null value
 * @prop {string} desc      description of the column
 * @prop {number} width     max width needed to display data.
 * @prop {number} prefWidth     preferred width, regardless of the data.
 * @prop {boolean} sortable     true if undefined
 * @prop {boolean} filterable   true if undefined
 * @prop {string} visibility    show, hide, or hidden.  hidden columns are not viewable by users.
 * @prop {string} sortByCols    for multi-columns sorting.  column names separated by comma(',').
 * @prop {string} enumVals   contains only values in this list.  values are seprated by comma(',')
 * @prop {string} ID        ID used to reference this column.
 * @prop {string} precision applies only to floating point numbers.
 *                          A string Tn where T is either F, E, or G
 *                          If T is not present, it defaults to F.
 *                          When T is F or E, n is the number of significant figures after the decimal point.
 *                          When T is G, n is the number of significant digits
 * @prop {string} UCD       UCD of this column.
 * @prop {string} utype     UType of this column.
 * @prop {string} ref       refer to this column for declarations.
 * @prop {string} value     static value of this column for all of the rows in this table
 * @prop {string} maxValue  maximum value.
 * @prop {string} minValue  minimum value.
 * @prop {LINK[]} links     links if any.
 *
 * @global
 * @public
 */

/**
 * PARAM may have everything TableColumn has plus 'value'
 * @typedef {object} PARAM
 * @prop {string} value  value of this PARAM
 *
 * @global
 * @public
 */

/**
 * Table group info
 * @typedef {object} Group
 * @prop {string} ID     ID used to reference this group.
 * @prop {string} name   href of this group.
 * @prop {string} desc   description
 * @prop {PARAM[]} params   params if any
 * @prop {REF[]} paramRefs   reference to params
 * @prop {REF[]} columnRefs   reference to columns
 *
 * @global
 * @public
 */

/**
 * Table link info
 * @typedef {object} LINK
 * @prop {string} ID     ID used to reference this LINK.
 * @prop {string} href   href of this LINK.
 * @prop {string} value  text of this LINK.
 * @prop {string} title  title/label of this LINK.
 * @prop {string} role   role,  see VOTable content-role
 * @prop {string} type   type, see VOTable content-type
 * @prop {string} action see VOTable LINK action
 *
 * @global
 * @public
 */

/**
 * reference to another object, i.e TableColumn, PARAM, LINK
 * @typedef {object} REF
 * @prop {string} ref    ID if the referenced object
 * @prop {string} UCD    UCD, see VOTable
 * @prop {string} utype  utype, see VOTable
 *
 * @global
 * @public
 */

/**
 * The full list of meta info for this table.  It includes the original meta from source, comments, duplicates, and additional meta inserted
 * @typedef {object} TableKeywords
 * @prop {string} key  meta key
 * @prop {string} value meta value
 * @prop {boolean} isKeyword  true if this entry is from the original source.
 *
 * @global
 * @public
 */

/**
 * Table meta information.  Below is only a small set of predefined meta used by table.
 * The meta information in this object are used by many components for many reasons.  ie catalog overlay.
 * @typedef {object} TableMeta
 * @prop {string} Loading-Status COMPLETED or INPROGRESS
 * @prop {string} resultSetID ID for this table.  If sorted or filtered, a new one will be generated.
 * @prop {string} source    path of the original table source before any operations were performed. ie sort, filter, etc.  this may not be fully supported.
 * @prop {string} relatedCols  highlight related rows based on this column's value.
 *
 * @global
 * @public
 */

/**
 * Table request.  Below is a list of predefined parameters available for table request.  All of the options are optional.
 * These parameters let you control what data and how it will be returned.
 * @typedef {object} TableRequest
 * @prop {number} startIdx  the starting index to fetch.  defaults to zero.
 * @prop {number} pageSize  the number of rows per page.  defaults to 100.
 * @prop {string} filters   list of conditions separted by comma(,). Format:  (col_name|index) operator value.
 *                  operator is one of '> < = ! >= <= IN'.  See DataGroupQueryStatement.java doc for more details.
 * @prop {string} sortInfo  sort information.  Format:  (ASC|DESC),col_name[,col_name]*
 * @prop {string} inclCols  list of columns to select.  Column names separted by comma(,)
 * @prop {object} META_INFO meta information passed as key/value pair to server then returned as tableMeta.
 * @prop {string} use       one of 'catalog_overlay', 'catalog_primary', 'data_primary'.
 * @prop {string} tbl_id    unique id of the table. auto-create if not given.
 *
 * @global
 * @public
 */

/**
 * Table group.  Define a group of tables used by the UI.
 * @typedef {Object} TableGroup
 * @prop {string}   name     unique name of this group
 * @prop {string}   active   tbl_id of the active table in this group
 * @prop {Object.<string, TableGroupItem>}   tables     a map of TableGroupItem(s) keyed by tbl_id
 *
 * @global
 * @public
 */

/**
 * Table group item.  Contains enough key information to identify the table data as well as the UI data associate with this item.
 * @typedef {Object} TableGroupItem
 * @prop {string}   tbl_group  table group name
 * @prop {string}   tbl_id     unique id of the table data
 * @prop {string}   tbl_ui_id  unique id of the table's UI data
 * @prop {string}   title      title or label of the table
 * @prop {boolean}  removable  true if this item can be removed from group.
 * @prop {Object.<string, *>}   options   table options, ie.  selectable, expandable
 *
 * @global
 * @public
 */


/**
 * Download request.  Below is a list of predefined parameters available for a download request.  All of the options are optional.
 * These parameters let you control what data and how it will be returned.
 * @typedef {object} DownloadRequest
 * @prop {number} FilePrefix  
 * @prop {number} BaseFileName
 * @prop {string} Title   
 * @prop {string} TitlePrefix
 * @prop {string} Email
 * @prop {string} MaxBundleSize
 * @prop {object} DataSource
 * @prop {TableRequest} tableRequest 
 * @prop {string} selectionInfo
 *
 * @global
 * @public
 */


/**
 * Available options when a table is added.
 * @global
 * @public
 * @typedef {object} TblOptions
 * @prop {string}  [tbl_group]    the group this table belongs to.  Defaults to 'main'.
 * @prop {boolean} [backgroundable=false]    true if this search can be sent to background.  Defaults to false.
 * @prop {string}  [title]        title of this table.
 * @prop {boolean} [setAsActive=true]  make this the active table once it's added to the UI.
 * @prop {number}  [pageSize]     the starting page size.  Will use the request's pageSize if not given.
 * @prop {boolean} [selectable=true]
 * @prop {boolean} [expandable=true]
 * @prop {boolean} [removable=true]  true if this table can be removed from view.
 * @prop {boolean} [border=true]
 * @prop {boolean} [showToolbar=true]   when false, showFilters, showTitle, showPaging, showSave, and showFilterButton will be false as well.
 * @prop {boolean} [showFilters=false]
 * @prop {boolean} [showTitle=true]
 * @prop {boolean} [showPaging=true]    enable/disable paging feature.  When false, all data will be displayed.
 * @prop {boolean} [showSave=true]
 * @prop {boolean} [showFilterButton=true]
 * @prop {boolean} [showInfoButton=false] when true, shows additional information about table, if available
 * @prop {boolean} [showOptionButton=true]
 * @prop {boolean} [showUnits=true]
 * @prop {boolean} [allowUnits=true] enable/disable the use of units in a table.
 * @prop {function[]}  [leftButtons]   an array of functions that returns a button-like component laid out on the left side of this table header.
 * @prop {function[]}  [rightButtons]  an array of functions that returns a button-like component laid out on the right side of this table header.
 */