carbon-components-angular 5.45.0 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/docs/documentation/classes/TableModel.html +95 -46
  2. package/docs/documentation/coverage.html +1 -1
  3. package/docs/documentation/js/search/search_index.js +2 -2
  4. package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
  5. package/docs/documentation/modules/ThemeModule.html +4 -4
  6. package/docs/documentation/modules/TilesModule/dependencies.svg +92 -92
  7. package/docs/documentation/modules/TilesModule.html +92 -92
  8. package/docs/documentation/modules/TimePickerModule/dependencies.svg +42 -46
  9. package/docs/documentation/modules/TimePickerModule.html +42 -46
  10. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +41 -45
  11. package/docs/documentation/modules/TimePickerSelectModule.html +41 -45
  12. package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
  13. package/docs/documentation/modules/ToggletipModule.html +37 -37
  14. package/docs/documentation/modules/TooltipModule/dependencies.svg +29 -29
  15. package/docs/documentation/modules/TooltipModule.html +29 -29
  16. package/docs/documentation/modules/TreeviewModule/dependencies.svg +36 -36
  17. package/docs/documentation/modules/TreeviewModule.html +36 -36
  18. package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
  19. package/docs/documentation/modules/UIShellModule.html +4 -4
  20. package/docs/documentation.json +92 -80
  21. package/docs/storybook/{5868.37cc7ea3.iframe.bundle.js → 5868.6c94dae1.iframe.bundle.js} +1 -1
  22. package/docs/storybook/iframe.html +2 -2
  23. package/docs/storybook/main.3a7cdf77.iframe.bundle.js +1 -0
  24. package/docs/storybook/project.json +1 -1
  25. package/docs/storybook/{runtime~main.2e05cdb7.iframe.bundle.js → runtime~main.5b8b90c1.iframe.bundle.js} +1 -1
  26. package/esm2020/table/table-model.class.mjs +7 -1
  27. package/fesm2015/carbon-components-angular-table.mjs +6 -0
  28. package/fesm2015/carbon-components-angular-table.mjs.map +1 -1
  29. package/fesm2020/carbon-components-angular-table.mjs +6 -0
  30. package/fesm2020/carbon-components-angular-table.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/table/table-model.class.d.ts +4 -0
  33. package/telemetry.yml +1 -1
  34. package/docs/storybook/main.6e0761c8.iframe.bundle.js +0 -1
@@ -8796,12 +8796,12 @@
8796
8796
  },
8797
8797
  {
8798
8798
  "name": "TableModel",
8799
- "id": "class-TableModel-b50033b9ec64d94390dbcf01a02ce31f03e30bff3081f86bb63f698f17513cd429f1c05ffa448fe6b85bade54c54cf2ad1843e74a5c8ad7a71e2c93520fbdd78",
8799
+ "id": "class-TableModel-417cd399ce3d14280d41dd6a40ddf6ffb12e530e359140f60ed3e3496df0e388876da9761e82bbc8aca3270ab8c578877479632ca51ce8652f809dbaec5d09bc",
8800
8800
  "file": "src/table/table-model.class.ts",
8801
8801
  "deprecated": false,
8802
8802
  "deprecationMessage": "",
8803
8803
  "type": "class",
8804
- "sourceCode": "import { EventEmitter } from \"@angular/core\";\n\nimport { PaginationModel } from \"carbon-components-angular/pagination\";\nimport { TableHeaderItem } from \"./table-header-item.class\";\nimport { TableItem } from \"./table-item.class\";\nimport { TableRow } from \"./table-row.class\";\nimport { Subject } from \"rxjs\";\n\nexport type HeaderType = number | \"select\" | \"expand\";\n\n/**\n * TableModel represents a data model for two-dimensional data. It's used for all things table\n * (table component, table toolbar, pagination, etc)\n *\n * TableModel manages its internal data integrity very well if you use the provided helper\n * functions for modifying rows and columns and assigning header and data in that order.\n *\n * It also provides direct access to the data so you can read and modify it.\n * If you change the structure of the data (by directly pushing into the arrays or otherwise),\n * keep in mind to keep the data structure intact.\n *\n * Header length and length of every line in the data should be equal.\n *\n * If they are not consistent, unexpected things will happen.\n *\n * Use the provided functions when in doubt.\n */\nexport class TableModel implements PaginationModel {\n\t/**\n\t * The number of models instantiated, used for (among other things) unique id generation\n\t */\n\tprotected static COUNT = 0;\n\n\t/**\n\t * Sets data of the table.\n\t *\n\t * Make sure all rows are the same length to keep the column count accurate.\n\t */\n\tset data(newData: TableItem[][]) {\n\t\tif (!newData || (Array.isArray(newData) && newData.length === 0)) {\n\t\t\tnewData = [[]];\n\t\t}\n\n\t\tthis._data = newData;\n\n\t\t// init rowsSelected\n\t\tthis.rowsSelected = new Array<boolean>(this._data.length).fill(false);\n\t\tthis.rowsExpanded = new Array<boolean>(this._data.length).fill(false);\n\t\t// init rows indices\n\t\tthis.rowsIndices = [...Array(this._data.length).keys()];\n\t\t// init rowsContext\n\t\tthis.rowsContext = new Array<string>(this._data.length);\n\n\t\t// init rowsClass\n\t\tthis.rowsClass = new Array<string>(this._data.length);\n\n\t\t// only create a fresh header if necessary (header doesn't exist or differs in length)\n\t\tif (this.header == null || (this.header.length !== this._data[0].length && this._data[0].length > 0)) {\n\t\t\tlet header = new Array<TableHeaderItem>();\n\t\t\tfor (let i = 0; i < this._data[0].length; i++) {\n\t\t\t\theader.push(new TableHeaderItem());\n\t\t\t}\n\t\t\tthis.header = header;\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\tdataChange = new EventEmitter();\n\trowsSelectedChange = new EventEmitter<number>();\n\trowsExpandedChange = new EventEmitter<number>();\n\trowsExpandedAllChange = new EventEmitter();\n\trowsCollapsedAllChange = new EventEmitter();\n\t/**\n\t * Gets emitted when `selectAll` is called. Emits false if all rows are deselected and true if\n\t * all rows are selected.\n\t */\n\tselectAllChange = new Subject<boolean>();\n\n\t/**\n\t * Gets the full data.\n\t *\n\t * You can use it to alter individual `TableItem`s but if you need to change\n\t * table structure, use `addRow()` and/or `addColumn()`\n\t */\n\tget data() {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Contains information about selection state of rows in the table.\n\t */\n\trowsSelected: boolean[] = [];\n\n\t/**\n\t * Contains information about expanded state of rows in the table.\n\t */\n\trowsExpanded: boolean[] = [];\n\n\t/**\n\t * Contains information about initial index of rows in the table\n\t */\n\trowsIndices: number[] = [];\n\n\t/**\n\t * Contains information about the context of the row.\n\t *\n\t * It affects styling of the row to reflect the context.\n\t *\n\t * string can be one of `\"success\" | \"warning\" | \"info\" | \"error\" | \"\"` and it's\n\t * empty or undefined by default\n\t */\n\trowsContext: string[] = [];\n\n\t/**\n\t * Contains class name(s) of the row.\n\t *\n\t * It affects styling of the row to reflect the appended class name(s).\n\t *\n\t * It's empty or undefined by default\n\t */\n\trowsClass: string[] = [];\n\n\t/**\n\t * Contains information about the header cells of the table.\n\t */\n\theader: TableHeaderItem[] = [];\n\n\t/**\n\t * Tracks the current page.\n\t */\n\tcurrentPage = 1;\n\n\t/**\n\t * Length of page.\n\t */\n\tpageLength = 10;\n\n\t/**\n\t * Set to true when there is no more data to load in the table\n\t */\n\tisEnd = false;\n\n\t/**\n\t * Set to true when lazy loading to show loading indicator\n\t */\n\tisLoading = false;\n\n\t/**\n\t * Absolute total number of rows of the table.\n\t */\n\tprotected _totalDataLength: number;\n\n\t/**\n\t * Manually set data length in case the data in the table doesn't\n\t * correctly reflect all the data that table is to display.\n\t *\n\t * Example: if you have multiple pages of data that table will display\n\t * but you're loading one at a time.\n\t *\n\t * Set to `null` to reset to default behavior.\n\t */\n\tset totalDataLength(length: number) {\n\t\t// if this function is called without a parameter we need to set to null to avoid having undefined != null\n\t\tthis._totalDataLength = isNaN(length) ? null : length;\n\t}\n\n\t/**\n\t * Total length of data that table has access to, or the amount manually set\n\t */\n\tget totalDataLength() {\n\t\t// if manually set data length\n\t\tif (this._totalDataLength !== null && this._totalDataLength >= 0) {\n\t\t\treturn this._totalDataLength;\n\t\t}\n\n\t\t// if empty dataset\n\t\tif (this.data && this.data.length === 1 && this.data[0].length === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Used in `data`\n\t */\n\tprotected _data: TableItem[][] = [[]];\n\n\t/**\n\t * The number of models instantiated, this is to make sure each table has a different\n\t * model count for unique id generation.\n\t */\n\tprotected tableModelCount = 0;\n\n\tconstructor() {\n\t\tthis.tableModelCount = TableModel.COUNT++;\n\t}\n\n\t/**\n\t * Returns an id for the given column\n\t *\n\t * @param column the column to generate an id for\n\t * @param row the row of the header to generate an id for\n\t */\n\tgetId(column: HeaderType, row = 0): string {\n\t\treturn `table-header-${row}-${column}-${this.tableModelCount}`;\n\t}\n\n\t/**\n\t * Returns the id of the header. Used to link the cells with headers (or headers with headers)\n\t *\n\t * @param column the column to start getting headers for\n\t * @param colSpan the number of columns to get headers for (defaults to 1)\n\t */\n\tgetHeaderId(column: HeaderType, colSpan = 1): string {\n\t\tif (column === \"select\" || column === \"expand\") {\n\t\t\treturn this.getId(column);\n\t\t}\n\n\t\tlet ids = [];\n\t\tfor (let i = column; i >= 0; i--) {\n\t\t\tif (this.header[i]) {\n\t\t\t\tfor (let j = 0; j < colSpan; j++) {\n\t\t\t\t\tids.push(this.getId(i + j));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn ids.join(\" \");\n\t}\n\n\t/**\n\t * Finds closest header by trying the `column` and then working its way to the left\n\t *\n\t * @param column the target column\n\t */\n\tgetHeader(column: number): TableHeaderItem {\n\t\tif (!this.header) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = column; i >= 0; i--) {\n\t\t\tconst headerCell = this.header[i];\n\t\t\tif (headerCell) {\n\t\t\t\treturn headerCell;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns how many rows is currently selected\n\t */\n\tselectedRowsCount(): number {\n\t\tlet count = 0;\n\t\tif (this.rowsSelected) {\n\t\t\tthis.rowsSelected.forEach(rowSelected => {\n\t\t\t\tif (rowSelected) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn count;\n\t}\n\n\t/**\n\t * Returns how many rows is currently expanded\n\t */\n\texpandedRowsCount(): number {\n\t\tlet count = 0;\n\t\tif (this.rowsExpanded) {\n\t\t\tthis.rowsExpanded.forEach(rowExpanded => {\n\t\t\t\tif (rowExpanded) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn count;\n\t}\n\n\t/**\n\t * Returns `index`th row of the table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\trow(index: number): TableItem[] {\n\t\treturn this.data[this.realRowIndex(index)];\n\t}\n\n\t/**\n\t * Adds a row to the `index`th row or appends to table if index not provided.\n\t *\n\t * If row is shorter than other rows or not provided, it will be padded with\n\t * empty `TableItem` elements.\n\t *\n\t * If row is longer than other rows, others will be extended to match so no data is lost.\n\t *\n\t * If called on an empty table with no parameters, it creates a 1x1 table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param [row]\n\t * @param [index]\n\t */\n\taddRow(row?: TableItem[], index?: number) {\n\t\t// if table empty create table with row\n\t\tif (!this.data || this.data.length === 0 || this.data[0].length === 0) {\n\t\t\tlet newData = new Array<Array<TableItem>>();\n\t\t\tnewData.push(row ? row : [new TableItem()]); // row or one empty one column row\n\t\t\tthis.data = newData;\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet realRow = row;\n\t\tconst columnCount = this.data[0].length;\n\n\t\tif (row == null) {\n\t\t\trealRow = new Array<TableItem>();\n\t\t\tfor (let i = 0; i < columnCount; i++) {\n\t\t\t\trealRow.push(new TableItem());\n\t\t\t}\n\t\t}\n\n\t\tif (realRow.length < columnCount) {\n\t\t\t// extend the length of realRow\n\t\t\tconst difference = columnCount - realRow.length;\n\t\t\tfor (let i = 0; i < difference; i++) {\n\t\t\t\trealRow.push(new TableItem());\n\t\t\t}\n\t\t} else if (realRow.length > columnCount) {\n\t\t\t// extend the length of header\n\t\t\tlet difference = realRow.length - this.header.length;\n\t\t\tfor (let j = 0; j < difference; j++) {\n\t\t\t\tthis.header.push(new TableHeaderItem());\n\t\t\t}\n\t\t\t// extend the length of every other row\n\t\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\t\tlet currentRow = this.data[i];\n\t\t\t\tdifference = realRow.length - currentRow.length;\n\t\t\t\tfor (let j = 0; j < difference; j++) {\n\t\t\t\t\tcurrentRow.push(new TableItem());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (index == null) {\n\t\t\tthis.data.push(realRow);\n\n\t\t\t// update rowsSelected property for length\n\t\t\tthis.rowsSelected.push(false);\n\n\t\t\t// update rowsExpanded property for length\n\t\t\tthis.rowsExpanded.push(false);\n\n\t\t\t// update rowsContext property for length\n\t\t\tthis.rowsContext.push(undefined);\n\n\t\t\t// update rowsClass property for length\n\t\t\tthis.rowsClass.push(undefined);\n\n\t\t\t// update rowsIndices property for length\n\t\t\tthis.rowsIndices.push(this.data.length - 1);\n\t\t} else {\n\t\t\tconst ri = this.realRowIndex(index);\n\t\t\tthis.data.splice(ri, 0, realRow);\n\n\t\t\t// update rowsSelected property for length\n\t\t\tthis.rowsSelected.splice(ri, 0, false);\n\n\t\t\t// update rowsExpanded property for length\n\t\t\tthis.rowsExpanded.splice(ri, 0, false);\n\n\t\t\t// update rowsContext property for length\n\t\t\tthis.rowsContext.splice(ri, 0, undefined);\n\n\t\t\t// update rowsClass property for length\n\t\t\tthis.rowsClass.splice(ri, 0, undefined);\n\n\t\t\t// update rowsIndices property for length\n\t\t\tthis.rowsIndices.splice(ri, 0, this.data.length - 1);\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\t/**\n\t * Deletes `index`th row.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\tdeleteRow(index: number) {\n\t\tconst rri = this.realRowIndex(index);\n\t\tthis.data.splice(rri, 1);\n\t\tthis.rowsSelected.splice(rri, 1);\n\t\tthis.rowsExpanded.splice(rri, 1);\n\t\tthis.rowsContext.splice(rri, 1);\n\t\tthis.rowsClass.splice(rri, 1);\n\n\t\tconst rowIndex = this.rowsIndices[rri];\n\t\tthis.rowsIndices.splice(rri, 1);\n\t\tthis.rowsIndices = this.rowsIndices.map((value) => (value > rowIndex) ? --value : value);\n\n\t\tthis.dataChange.emit();\n\t}\n\n\thasExpandableRows() {\n\t\treturn this.data.some(data => data.some(d => d && d.expandedData)); // checking for some in 2D array\n\t}\n\n\t/**\n\t * Number of rows that can be expanded.\n\t *\n\t * @returns number\n\t */\n\texpandableRowsCount() {\n\t\treturn this.data.reduce((counter, _, index) => {\n\t\t\tcounter = (this.isRowExpandable(index)) ? counter + 1 : counter;\n\t\t\treturn counter;\n\t\t}, 0);\n\t}\n\n\tisRowExpandable(index: number) {\n\t\treturn this.data[index].some(d => d && d.expandedData);\n\t}\n\n\tisRowExpanded(index: number) {\n\t\treturn this.rowsExpanded[index];\n\t}\n\n\tgetRowContext(index: number) {\n\t\treturn this.rowsContext[index];\n\t}\n\n\t/**\n\t * Returns `index`th column of the table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\tcolumn(index: number): TableItem[] {\n\t\tlet column = new Array<TableItem>();\n\t\tconst ri = this.realColumnIndex(index);\n\t\tconst rc = this.data.length;\n\n\t\tfor (let i = 0; i < rc; i++) {\n\t\t\tconst row = this.data[i];\n\t\t\tcolumn.push(row[ri]);\n\t\t}\n\n\t\treturn column;\n\t}\n\n\t/**\n\t * Adds a column to the `index`th column or appends to table if index not provided.\n\t *\n\t * If column is shorter than other columns or not provided, it will be padded with\n\t * empty `TableItem` elements.\n\t *\n\t * If column is longer than other columns, others will be extended to match so no data is lost.\n\t *\n\t * If called on an empty table with no parameters, it creates a 1x1 table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param [column]\n\t * @param [index]\n\t */\n\taddColumn(column?: TableItem[], index?: number) {\n\t\t// if table empty create table with row\n\t\tif (!this.data || this.data.length === 0 || this.data[0].length === 0) {\n\t\t\tlet newData = new Array<Array<TableItem>>();\n\t\t\tif (column == null) {\n\t\t\t\tnewData.push([new TableItem()]);\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < column.length; i++) {\n\t\t\t\t\tlet item = column[i];\n\t\t\t\t\tnewData.push([item]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.data = newData;\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet rc = this.data.length; // row count\n\t\tlet ci = this.realColumnIndex(index);\n\n\t\t// append missing rows\n\t\tfor (let i = 0; column != null && i < column.length - rc; i++) {\n\t\t\tthis.addRow();\n\t\t}\n\t\trc = this.data.length;\n\t\tif (index == null) {\n\t\t\t// append to end\n\t\t\tfor (let i = 0; i < rc; i++) {\n\t\t\t\tlet row = this.data[i];\n\t\t\t\trow.push(column == null || column[i] == null ? new TableItem() : column[i]);\n\t\t\t}\n\t\t\t// update header if not already set by user\n\t\t\tif (this.header.length < this.data[0].length) {\n\t\t\t\tthis.header.push(new TableHeaderItem());\n\t\t\t}\n\t\t} else {\n\t\t\tif (index >= this.data[0].length) {\n\t\t\t\t// if trying to append\n\t\t\t\tci++;\n\t\t\t}\n\t\t\t// insert\n\t\t\tfor (let i = 0; i < rc; i++) {\n\t\t\t\tlet row = this.data[i];\n\t\t\t\trow.splice(ci, 0, column == null || column[i] == null ? new TableItem() : column[i]);\n\t\t\t}\n\t\t\t// update header if not already set by user\n\t\t\tif (this.header.length < this.data[0].length) {\n\t\t\t\tthis.header.splice(ci, 0, new TableHeaderItem());\n\t\t\t}\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\t/**\n\t * Deletes `index`th column.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\tdeleteColumn(index: number) {\n\t\tconst rci = this.realColumnIndex(index);\n\t\tconst rowCount = this.data.length;\n\t\tfor (let i = 0; i < rowCount; i++) {\n\t\t\tthis.data[i].splice(rci, 1);\n\t\t}\n\t\t// update header if not already set by user\n\t\tif (this.header.length > this.data[0].length) {\n\t\t\tthis.header.splice(rci, 1);\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\tmoveColumn(indexFrom: number, indexTo: number) {\n\t\tconst headerFrom = this.header[indexFrom];\n\n\t\tthis.addColumn(this.column(indexFrom), indexTo);\n\t\tthis.deleteColumn(indexFrom + (indexTo < indexFrom ? 1 : 0));\n\n\t\tthis.header[indexTo + (indexTo > indexFrom ? -1 : 0)] = headerFrom;\n\t}\n\n\t/**\n\t * cycle through the three sort states\n\t * @param index\n\t */\n\tcycleSortState(index: number) {\n\t\t// no sort provided so do the simple sort\n\t\tswitch (this.header[index].sortDirection) {\n\t\t\tcase \"ASCENDING\":\n\t\t\t\tthis.header[index].sortDirection = \"DESCENDING\";\n\t\t\t\tbreak;\n\t\t\tcase \"DESCENDING\":\n\t\t\t\tthis.header[index].sortDirection = \"NONE\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.header[index].sortDirection = \"ASCENDING\";\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Sorts the data currently present in the model based on `compare()`\n\t *\n\t * Direction is set by `ascending` and `descending` properties of `TableHeaderItem`\n\t * in `index`th column.\n\t *\n\t * @param index The column based on which it's sorting\n\t */\n\tsort(index: number) {\n\t\tthis.pushRowStateToModelData();\n\t\tconst headerSorted = this.header[index].sorted;\n\t\t// We only allow sorting by a single column, so reset sort state for all columns before specifying new sort state\n\t\tthis.header.forEach(column => column.sorted = false);\n\t\tif (this.header[index].sortDirection === \"NONE\" && headerSorted) {\n\t\t\t// Restore initial order of rows\n\t\t\tconst oldData = this._data;\n\t\t\tthis._data = [];\n\t\t\tfor (let i = 0; i < this.rowsIndices.length; i++) {\n\t\t\t\tconst ri = this.rowsIndices[i];\n\t\t\t\tthis._data[ri] = oldData[i];\n\t\t\t}\n\t\t} else {\n\t\t\tconst descending = this.header[index].sortDirection === \"DESCENDING\" ? -1 : 1;\n\t\t\tthis.data.sort((a, b) => {\n\t\t\t\treturn descending * this.header[index].compare(a[index], b[index]);\n\t\t\t});\n\t\t\tthis.header[index].sorted = true;\n\t\t}\n\t\tthis.popRowStateFromModelData();\n\t}\n\n\t/**\n\t * Appends `rowsSelected` and `rowsExpanded` info to model data.\n\t *\n\t * When sorting rows, do this first so information about row selection\n\t * gets sorted with the other row info.\n\t *\n\t * Call `popRowSelectionFromModelData()` after sorting to make everything\n\t * right with the world again.\n\t */\n\tpushRowStateToModelData() {\n\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\tconst rowSelectedMark = new TableItem();\n\t\t\trowSelectedMark.data = this.rowsSelected[i];\n\t\t\tthis.data[i].push(rowSelectedMark);\n\n\t\t\tconst rowExpandedMark = new TableItem();\n\t\t\trowExpandedMark.data = this.rowsExpanded[i];\n\t\t\tthis.data[i].push(rowExpandedMark);\n\n\t\t\tconst rowContext = new TableItem();\n\t\t\trowContext.data = this.rowsContext[i];\n\t\t\tthis.data[i].push(rowContext);\n\n\t\t\tconst rowClass = new TableItem();\n\t\t\trowClass.data = this.rowsClass[i];\n\t\t\tthis.data[i].push(rowClass);\n\n\t\t\tconst rowIndex = new TableItem();\n\t\t\trowIndex.data = this.rowsIndices[i];\n\t\t\tthis.data[i].push(rowIndex);\n\t\t}\n\t}\n\n\t/**\n\t * Restores `rowsSelected` from data pushed by `pushRowSelectionToModelData()`\n\t *\n\t * Call after sorting data (if you previously pushed to maintain selection order)\n\t * to make everything right with the world again.\n\t */\n\tpopRowStateFromModelData() {\n\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\tthis.rowsIndices[i] = this.data[i].pop().data;\n\t\t\tthis.rowsClass[i] = this.data[i].pop().data;\n\t\t\tthis.rowsContext[i] = this.data[i].pop().data;\n\t\t\tthis.rowsExpanded[i] = !!this.data[i].pop().data;\n\t\t\tthis.rowsSelected[i] = !!this.data[i].pop().data;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if row is filtered out.\n\t *\n\t * @param index\n\t * @returns true if any of the filters in header filters out the `index`th row\n\t */\n\tisRowFiltered(index: number): boolean {\n\t\tconst realIndex = this.realRowIndex(index);\n\t\treturn this.header.some((item, i) => item && item.filter(this.row(realIndex)[i]));\n\t}\n\n\t/**\n\t * Select/deselect `index`th row based on value\n\t *\n\t * @param index index of the row to select\n\t * @param value state to set the row to. Defaults to `true`\n\t */\n\tselectRow(index: number, value = true) {\n\t\tif (this.isRowDisabled(index)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.rowsSelected[index] = value;\n\t\tthis.rowsSelectedChange.emit(index);\n\t}\n\n\t/**\n\t * Selects or deselects all rows in the model\n\t *\n\t * @param value state to set all rows to. Defaults to `true`\n\t */\n\tselectAll(value = true) {\n\t\tif (this.data.length >= 1 && this.data[0].length >= 1) {\n\t\t\tfor (let i = 0; i < this.rowsSelected.length; i++) {\n\t\t\t\tthis.selectRow(i, value);\n\t\t\t}\n\t\t}\n\t\tthis.selectAllChange.next(value);\n\t}\n\n\tisRowSelected(index: number) {\n\t\treturn this.rowsSelected[index];\n\t}\n\n\t/**\n\t * Checks if row is disabled or not.\n\t */\n\tisRowDisabled(index: number) {\n\t\tconst row = this.data[index] as TableRow;\n\t\treturn !!row.disabled;\n\t}\n\n\t/**\n\t * Expands/Collapses `index`th row based on value\n\t *\n\t * @param index index of the row to expand or collapse\n\t * @param value expanded state of the row. `true` is expanded and `false` is collapsed\n\t */\n\texpandRow(index: number, value = true) {\n\t\tthis.rowsExpanded[index] = value;\n\t\tthis.rowsExpandedChange.emit(index);\n\t}\n\n\t/**\n\t * Expands / collapses all rows\n\t *\n\t * @param value expanded state of the rows. `true` is expanded and `false` is collapsed\n\t */\n\texpandAllRows(value = true) {\n\t\tif (this.data.length > 0) {\n\t\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\t\tif (this.isRowExpandable(i)) {\n\t\t\t\t\tthis.rowsExpanded[i] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tthis.rowsExpandedAllChange.emit();\n\t\t\t} else {\n\t\t\t\tthis.rowsCollapsedAllChange.emit();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets the true index of a row based on it's relative position.\n\t * Like in Python, positive numbers start from the top and\n\t * negative numbers start from the bottom.\n\t *\n\t * @param index\n\t */\n\tprotected realRowIndex(index: number): number {\n\t\treturn this.realIndex(index, this.data.length);\n\t}\n\n\t/**\n\t * Gets the true index of a column based on it's relative position.\n\t * Like in Python, positive numbers start from the top and\n\t * negative numbers start from the bottom.\n\t *\n\t * @param index\n\t */\n\tprotected realColumnIndex(index: number): number {\n\t\treturn this.realIndex(index, this.data[0].length);\n\t}\n\n\t/**\n\t * Generic function to calculate the real index of something.\n\t * Used by `realRowIndex()` and `realColumnIndex()`\n\t *\n\t * @param index\n\t * @param length\n\t */\n\tprotected realIndex(index: number, length: number): number {\n\t\tif (index == null) {\n\t\t\treturn length - 1;\n\t\t} else if (index >= 0) {\n\t\t\treturn index >= length ? length - 1 : index;\n\t\t} else {\n\t\t\treturn -index >= length ? 0 : length + index;\n\t\t}\n\t}\n}\n",
8804
+ "sourceCode": "import { EventEmitter } from \"@angular/core\";\n\nimport { PaginationModel } from \"carbon-components-angular/pagination\";\nimport { TableHeaderItem } from \"./table-header-item.class\";\nimport { TableItem } from \"./table-item.class\";\nimport { TableRow } from \"./table-row.class\";\nimport { Subject } from \"rxjs\";\n\nexport type HeaderType = number | \"select\" | \"expand\";\n\n/**\n * TableModel represents a data model for two-dimensional data. It's used for all things table\n * (table component, table toolbar, pagination, etc)\n *\n * TableModel manages its internal data integrity very well if you use the provided helper\n * functions for modifying rows and columns and assigning header and data in that order.\n *\n * It also provides direct access to the data so you can read and modify it.\n * If you change the structure of the data (by directly pushing into the arrays or otherwise),\n * keep in mind to keep the data structure intact.\n *\n * Header length and length of every line in the data should be equal.\n *\n * If they are not consistent, unexpected things will happen.\n *\n * Use the provided functions when in doubt.\n */\nexport class TableModel implements PaginationModel {\n\t/**\n\t * The number of models instantiated, used for (among other things) unique id generation\n\t */\n\tprotected static COUNT = 0;\n\n\t/**\n\t * Sets data of the table.\n\t *\n\t * Make sure all rows are the same length to keep the column count accurate.\n\t */\n\tset data(newData: TableItem[][]) {\n\t\tif (!newData || (Array.isArray(newData) && newData.length === 0)) {\n\t\t\tnewData = [[]];\n\t\t}\n\n\t\tthis._data = newData;\n\n\t\t// init rowsSelected\n\t\tthis.rowsSelected = new Array<boolean>(this._data.length).fill(false);\n\t\tthis.rowsExpanded = new Array<boolean>(this._data.length).fill(false);\n\t\t// init rows indices\n\t\tthis.rowsIndices = [...Array(this._data.length).keys()];\n\t\t// init rowsContext\n\t\tthis.rowsContext = new Array<string>(this._data.length);\n\n\t\t// init rowsClass\n\t\tthis.rowsClass = new Array<string>(this._data.length);\n\n\t\t// only create a fresh header if necessary (header doesn't exist or differs in length)\n\t\tif (this.header == null || (this.header.length !== this._data[0].length && this._data[0].length > 0)) {\n\t\t\tlet header = new Array<TableHeaderItem>();\n\t\t\tfor (let i = 0; i < this._data[0].length; i++) {\n\t\t\t\theader.push(new TableHeaderItem());\n\t\t\t}\n\t\t\tthis.header = header;\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\tdataChange = new EventEmitter();\n\trowsSelectedChange = new EventEmitter<number>();\n\trowsExpandedChange = new EventEmitter<number>();\n\trowsExpandedAllChange = new EventEmitter();\n\trowsCollapsedAllChange = new EventEmitter();\n\t/**\n\t * Gets emitted when `selectAll` is called. Emits false if all rows are deselected and true if\n\t * all rows are selected.\n\t */\n\tselectAllChange = new Subject<boolean>();\n\n\t/**\n\t * Gets the full data.\n\t *\n\t * You can use it to alter individual `TableItem`s but if you need to change\n\t * table structure, use `addRow()` and/or `addColumn()`\n\t */\n\tget data() {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Contains information about selection state of rows in the table.\n\t */\n\trowsSelected: boolean[] = [];\n\n\t/**\n\t * Contains information about expanded state of rows in the table.\n\t */\n\trowsExpanded: boolean[] = [];\n\n\t/**\n\t * Contains information about initial index of rows in the table\n\t */\n\trowsIndices: number[] = [];\n\n\t/**\n\t * Contains information about the context of the row.\n\t *\n\t * It affects styling of the row to reflect the context.\n\t *\n\t * string can be one of `\"success\" | \"warning\" | \"info\" | \"error\" | \"\"` and it's\n\t * empty or undefined by default\n\t */\n\trowsContext: string[] = [];\n\n\t/**\n\t * Contains class name(s) of the row.\n\t *\n\t * It affects styling of the row to reflect the appended class name(s).\n\t *\n\t * It's empty or undefined by default\n\t */\n\trowsClass: string[] = [];\n\n\t/**\n\t * Contains information about the header cells of the table.\n\t */\n\theader: TableHeaderItem[] = [];\n\n\t/**\n\t * Tracks the current page.\n\t */\n\tcurrentPage = 1;\n\n\t/**\n\t * Length of page.\n\t */\n\tpageLength = 10;\n\n\t/**\n\t * Set to true when there is no more data to load in the table\n\t */\n\tisEnd = false;\n\n\t/**\n\t * Set to true when lazy loading to show loading indicator\n\t */\n\tisLoading = false;\n\n\t/**\n\t * Absolute total number of rows of the table.\n\t */\n\tprotected _totalDataLength: number;\n\n\t/**\n\t * Manually set data length in case the data in the table doesn't\n\t * correctly reflect all the data that table is to display.\n\t *\n\t * Example: if you have multiple pages of data that table will display\n\t * but you're loading one at a time.\n\t *\n\t * Set to `null` to reset to default behavior.\n\t */\n\tset totalDataLength(length: number) {\n\t\t// if this function is called without a parameter we need to set to null to avoid having undefined != null\n\t\tthis._totalDataLength = isNaN(length) ? null : length;\n\t}\n\n\t/**\n\t * Total length of data that table has access to, or the amount manually set\n\t */\n\tget totalDataLength() {\n\t\t// if manually set data length\n\t\tif (this._totalDataLength !== null && this._totalDataLength >= 0) {\n\t\t\treturn this._totalDataLength;\n\t\t}\n\n\t\t// if empty dataset\n\t\tif (this.data && this.data.length === 1 && this.data[0].length === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Used in `data`\n\t */\n\tprotected _data: TableItem[][] = [[]];\n\n\t/**\n\t * The number of models instantiated, this is to make sure each table has a different\n\t * model count for unique id generation.\n\t */\n\tprotected tableModelCount = 0;\n\n\tconstructor() {\n\t\tthis.tableModelCount = TableModel.COUNT++;\n\t}\n\n\t/**\n\t * Returns an id for the given column\n\t *\n\t * @param column the column to generate an id for\n\t * @param row the row of the header to generate an id for\n\t */\n\tgetId(column: HeaderType, row = 0): string {\n\t\treturn `table-header-${row}-${column}-${this.tableModelCount}`;\n\t}\n\n\t/**\n\t * Returns the id of the header. Used to link the cells with headers (or headers with headers)\n\t *\n\t * @param column the column to start getting headers for\n\t * @param colSpan the number of columns to get headers for (defaults to 1)\n\t */\n\tgetHeaderId(column: HeaderType, colSpan = 1): string {\n\t\tif (column === \"select\" || column === \"expand\") {\n\t\t\treturn this.getId(column);\n\t\t}\n\n\t\tlet ids = [];\n\t\tfor (let i = column; i >= 0; i--) {\n\t\t\tif (this.header[i]) {\n\t\t\t\tfor (let j = 0; j < colSpan; j++) {\n\t\t\t\t\tids.push(this.getId(i + j));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn ids.join(\" \");\n\t}\n\n\t/**\n\t * Finds closest header by trying the `column` and then working its way to the left\n\t *\n\t * @param column the target column\n\t */\n\tgetHeader(column: number): TableHeaderItem {\n\t\tif (!this.header) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = column; i >= 0; i--) {\n\t\t\tconst headerCell = this.header[i];\n\t\t\tif (headerCell) {\n\t\t\t\treturn headerCell;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns how many rows is currently selected\n\t */\n\tselectedRowsCount(): number {\n\t\tlet count = 0;\n\t\tif (this.rowsSelected) {\n\t\t\tthis.rowsSelected.forEach(rowSelected => {\n\t\t\t\tif (rowSelected) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn count;\n\t}\n\n\t/**\n\t * Returns how many rows is currently expanded\n\t */\n\texpandedRowsCount(): number {\n\t\tlet count = 0;\n\t\tif (this.rowsExpanded) {\n\t\t\tthis.rowsExpanded.forEach(rowExpanded => {\n\t\t\t\tif (rowExpanded) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn count;\n\t}\n\n\t/**\n\t * Returns `index`th row of the table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\trow(index: number): TableItem[] {\n\t\treturn this.data[this.realRowIndex(index)];\n\t}\n\n\t/**\n\t * Adds a row to the `index`th row or appends to table if index not provided.\n\t *\n\t * If row is shorter than other rows or not provided, it will be padded with\n\t * empty `TableItem` elements.\n\t *\n\t * If row is longer than other rows, others will be extended to match so no data is lost.\n\t *\n\t * If called on an empty table with no parameters, it creates a 1x1 table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param [row]\n\t * @param [index]\n\t */\n\taddRow(row?: TableItem[], index?: number) {\n\t\t// if table empty create table with row\n\t\tif (!this.data || this.data.length === 0 || this.data[0].length === 0) {\n\t\t\tlet newData = new Array<Array<TableItem>>();\n\t\t\tnewData.push(row ? row : [new TableItem()]); // row or one empty one column row\n\t\t\tthis.data = newData;\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet realRow = row;\n\t\tconst columnCount = this.data[0].length;\n\n\t\tif (row == null) {\n\t\t\trealRow = new Array<TableItem>();\n\t\t\tfor (let i = 0; i < columnCount; i++) {\n\t\t\t\trealRow.push(new TableItem());\n\t\t\t}\n\t\t}\n\n\t\tif (realRow.length < columnCount) {\n\t\t\t// extend the length of realRow\n\t\t\tconst difference = columnCount - realRow.length;\n\t\t\tfor (let i = 0; i < difference; i++) {\n\t\t\t\trealRow.push(new TableItem());\n\t\t\t}\n\t\t} else if (realRow.length > columnCount) {\n\t\t\t// extend the length of header\n\t\t\tlet difference = realRow.length - this.header.length;\n\t\t\tfor (let j = 0; j < difference; j++) {\n\t\t\t\tthis.header.push(new TableHeaderItem());\n\t\t\t}\n\t\t\t// extend the length of every other row\n\t\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\t\tlet currentRow = this.data[i];\n\t\t\t\tdifference = realRow.length - currentRow.length;\n\t\t\t\tfor (let j = 0; j < difference; j++) {\n\t\t\t\t\tcurrentRow.push(new TableItem());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (index == null) {\n\t\t\tthis.data.push(realRow);\n\n\t\t\t// update rowsSelected property for length\n\t\t\tthis.rowsSelected.push(false);\n\n\t\t\t// update rowsExpanded property for length\n\t\t\tthis.rowsExpanded.push(false);\n\n\t\t\t// update rowsContext property for length\n\t\t\tthis.rowsContext.push(undefined);\n\n\t\t\t// update rowsClass property for length\n\t\t\tthis.rowsClass.push(undefined);\n\n\t\t\t// update rowsIndices property for length\n\t\t\tthis.rowsIndices.push(this.data.length - 1);\n\t\t} else {\n\t\t\tconst ri = this.realRowIndex(index);\n\t\t\tthis.data.splice(ri, 0, realRow);\n\n\t\t\t// update rowsSelected property for length\n\t\t\tthis.rowsSelected.splice(ri, 0, false);\n\n\t\t\t// update rowsExpanded property for length\n\t\t\tthis.rowsExpanded.splice(ri, 0, false);\n\n\t\t\t// update rowsContext property for length\n\t\t\tthis.rowsContext.splice(ri, 0, undefined);\n\n\t\t\t// update rowsClass property for length\n\t\t\tthis.rowsClass.splice(ri, 0, undefined);\n\n\t\t\t// update rowsIndices property for length\n\t\t\tthis.rowsIndices.splice(ri, 0, this.data.length - 1);\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\t/**\n\t * Deletes `index`th row.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\tdeleteRow(index: number) {\n\t\tconst rri = this.realRowIndex(index);\n\t\tthis.data.splice(rri, 1);\n\t\tthis.rowsSelected.splice(rri, 1);\n\t\tthis.rowsExpanded.splice(rri, 1);\n\t\tthis.rowsContext.splice(rri, 1);\n\t\tthis.rowsClass.splice(rri, 1);\n\n\t\tconst rowIndex = this.rowsIndices[rri];\n\t\tthis.rowsIndices.splice(rri, 1);\n\t\tthis.rowsIndices = this.rowsIndices.map((value) => (value > rowIndex) ? --value : value);\n\n\t\tthis.dataChange.emit();\n\t}\n\n\t/**\n\t * Deletes all rows.\n\t */\n\tdeleteAllRows() {\n\t\tthis.data = [];\n\t}\n\n\thasExpandableRows() {\n\t\treturn this.data.some(data => data.some(d => d && d.expandedData)); // checking for some in 2D array\n\t}\n\n\t/**\n\t * Number of rows that can be expanded.\n\t *\n\t * @returns number\n\t */\n\texpandableRowsCount() {\n\t\treturn this.data.reduce((counter, _, index) => {\n\t\t\tcounter = (this.isRowExpandable(index)) ? counter + 1 : counter;\n\t\t\treturn counter;\n\t\t}, 0);\n\t}\n\n\tisRowExpandable(index: number) {\n\t\treturn this.data[index].some(d => d && d.expandedData);\n\t}\n\n\tisRowExpanded(index: number) {\n\t\treturn this.rowsExpanded[index];\n\t}\n\n\tgetRowContext(index: number) {\n\t\treturn this.rowsContext[index];\n\t}\n\n\t/**\n\t * Returns `index`th column of the table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\tcolumn(index: number): TableItem[] {\n\t\tlet column = new Array<TableItem>();\n\t\tconst ri = this.realColumnIndex(index);\n\t\tconst rc = this.data.length;\n\n\t\tfor (let i = 0; i < rc; i++) {\n\t\t\tconst row = this.data[i];\n\t\t\tcolumn.push(row[ri]);\n\t\t}\n\n\t\treturn column;\n\t}\n\n\t/**\n\t * Adds a column to the `index`th column or appends to table if index not provided.\n\t *\n\t * If column is shorter than other columns or not provided, it will be padded with\n\t * empty `TableItem` elements.\n\t *\n\t * If column is longer than other columns, others will be extended to match so no data is lost.\n\t *\n\t * If called on an empty table with no parameters, it creates a 1x1 table.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param [column]\n\t * @param [index]\n\t */\n\taddColumn(column?: TableItem[], index?: number) {\n\t\t// if table empty create table with row\n\t\tif (!this.data || this.data.length === 0 || this.data[0].length === 0) {\n\t\t\tlet newData = new Array<Array<TableItem>>();\n\t\t\tif (column == null) {\n\t\t\t\tnewData.push([new TableItem()]);\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < column.length; i++) {\n\t\t\t\t\tlet item = column[i];\n\t\t\t\t\tnewData.push([item]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.data = newData;\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet rc = this.data.length; // row count\n\t\tlet ci = this.realColumnIndex(index);\n\n\t\t// append missing rows\n\t\tfor (let i = 0; column != null && i < column.length - rc; i++) {\n\t\t\tthis.addRow();\n\t\t}\n\t\trc = this.data.length;\n\t\tif (index == null) {\n\t\t\t// append to end\n\t\t\tfor (let i = 0; i < rc; i++) {\n\t\t\t\tlet row = this.data[i];\n\t\t\t\trow.push(column == null || column[i] == null ? new TableItem() : column[i]);\n\t\t\t}\n\t\t\t// update header if not already set by user\n\t\t\tif (this.header.length < this.data[0].length) {\n\t\t\t\tthis.header.push(new TableHeaderItem());\n\t\t\t}\n\t\t} else {\n\t\t\tif (index >= this.data[0].length) {\n\t\t\t\t// if trying to append\n\t\t\t\tci++;\n\t\t\t}\n\t\t\t// insert\n\t\t\tfor (let i = 0; i < rc; i++) {\n\t\t\t\tlet row = this.data[i];\n\t\t\t\trow.splice(ci, 0, column == null || column[i] == null ? new TableItem() : column[i]);\n\t\t\t}\n\t\t\t// update header if not already set by user\n\t\t\tif (this.header.length < this.data[0].length) {\n\t\t\t\tthis.header.splice(ci, 0, new TableHeaderItem());\n\t\t\t}\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\t/**\n\t * Deletes `index`th column.\n\t *\n\t * Negative index starts from the end. -1 being the last element.\n\t *\n\t * @param index\n\t */\n\tdeleteColumn(index: number) {\n\t\tconst rci = this.realColumnIndex(index);\n\t\tconst rowCount = this.data.length;\n\t\tfor (let i = 0; i < rowCount; i++) {\n\t\t\tthis.data[i].splice(rci, 1);\n\t\t}\n\t\t// update header if not already set by user\n\t\tif (this.header.length > this.data[0].length) {\n\t\t\tthis.header.splice(rci, 1);\n\t\t}\n\n\t\tthis.dataChange.emit();\n\t}\n\n\tmoveColumn(indexFrom: number, indexTo: number) {\n\t\tconst headerFrom = this.header[indexFrom];\n\n\t\tthis.addColumn(this.column(indexFrom), indexTo);\n\t\tthis.deleteColumn(indexFrom + (indexTo < indexFrom ? 1 : 0));\n\n\t\tthis.header[indexTo + (indexTo > indexFrom ? -1 : 0)] = headerFrom;\n\t}\n\n\t/**\n\t * cycle through the three sort states\n\t * @param index\n\t */\n\tcycleSortState(index: number) {\n\t\t// no sort provided so do the simple sort\n\t\tswitch (this.header[index].sortDirection) {\n\t\t\tcase \"ASCENDING\":\n\t\t\t\tthis.header[index].sortDirection = \"DESCENDING\";\n\t\t\t\tbreak;\n\t\t\tcase \"DESCENDING\":\n\t\t\t\tthis.header[index].sortDirection = \"NONE\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.header[index].sortDirection = \"ASCENDING\";\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Sorts the data currently present in the model based on `compare()`\n\t *\n\t * Direction is set by `ascending` and `descending` properties of `TableHeaderItem`\n\t * in `index`th column.\n\t *\n\t * @param index The column based on which it's sorting\n\t */\n\tsort(index: number) {\n\t\tthis.pushRowStateToModelData();\n\t\tconst headerSorted = this.header[index].sorted;\n\t\t// We only allow sorting by a single column, so reset sort state for all columns before specifying new sort state\n\t\tthis.header.forEach(column => column.sorted = false);\n\t\tif (this.header[index].sortDirection === \"NONE\" && headerSorted) {\n\t\t\t// Restore initial order of rows\n\t\t\tconst oldData = this._data;\n\t\t\tthis._data = [];\n\t\t\tfor (let i = 0; i < this.rowsIndices.length; i++) {\n\t\t\t\tconst ri = this.rowsIndices[i];\n\t\t\t\tthis._data[ri] = oldData[i];\n\t\t\t}\n\t\t} else {\n\t\t\tconst descending = this.header[index].sortDirection === \"DESCENDING\" ? -1 : 1;\n\t\t\tthis.data.sort((a, b) => {\n\t\t\t\treturn descending * this.header[index].compare(a[index], b[index]);\n\t\t\t});\n\t\t\tthis.header[index].sorted = true;\n\t\t}\n\t\tthis.popRowStateFromModelData();\n\t}\n\n\t/**\n\t * Appends `rowsSelected` and `rowsExpanded` info to model data.\n\t *\n\t * When sorting rows, do this first so information about row selection\n\t * gets sorted with the other row info.\n\t *\n\t * Call `popRowSelectionFromModelData()` after sorting to make everything\n\t * right with the world again.\n\t */\n\tpushRowStateToModelData() {\n\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\tconst rowSelectedMark = new TableItem();\n\t\t\trowSelectedMark.data = this.rowsSelected[i];\n\t\t\tthis.data[i].push(rowSelectedMark);\n\n\t\t\tconst rowExpandedMark = new TableItem();\n\t\t\trowExpandedMark.data = this.rowsExpanded[i];\n\t\t\tthis.data[i].push(rowExpandedMark);\n\n\t\t\tconst rowContext = new TableItem();\n\t\t\trowContext.data = this.rowsContext[i];\n\t\t\tthis.data[i].push(rowContext);\n\n\t\t\tconst rowClass = new TableItem();\n\t\t\trowClass.data = this.rowsClass[i];\n\t\t\tthis.data[i].push(rowClass);\n\n\t\t\tconst rowIndex = new TableItem();\n\t\t\trowIndex.data = this.rowsIndices[i];\n\t\t\tthis.data[i].push(rowIndex);\n\t\t}\n\t}\n\n\t/**\n\t * Restores `rowsSelected` from data pushed by `pushRowSelectionToModelData()`\n\t *\n\t * Call after sorting data (if you previously pushed to maintain selection order)\n\t * to make everything right with the world again.\n\t */\n\tpopRowStateFromModelData() {\n\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\tthis.rowsIndices[i] = this.data[i].pop().data;\n\t\t\tthis.rowsClass[i] = this.data[i].pop().data;\n\t\t\tthis.rowsContext[i] = this.data[i].pop().data;\n\t\t\tthis.rowsExpanded[i] = !!this.data[i].pop().data;\n\t\t\tthis.rowsSelected[i] = !!this.data[i].pop().data;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if row is filtered out.\n\t *\n\t * @param index\n\t * @returns true if any of the filters in header filters out the `index`th row\n\t */\n\tisRowFiltered(index: number): boolean {\n\t\tconst realIndex = this.realRowIndex(index);\n\t\treturn this.header.some((item, i) => item && item.filter(this.row(realIndex)[i]));\n\t}\n\n\t/**\n\t * Select/deselect `index`th row based on value\n\t *\n\t * @param index index of the row to select\n\t * @param value state to set the row to. Defaults to `true`\n\t */\n\tselectRow(index: number, value = true) {\n\t\tif (this.isRowDisabled(index)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.rowsSelected[index] = value;\n\t\tthis.rowsSelectedChange.emit(index);\n\t}\n\n\t/**\n\t * Selects or deselects all rows in the model\n\t *\n\t * @param value state to set all rows to. Defaults to `true`\n\t */\n\tselectAll(value = true) {\n\t\tif (this.data.length >= 1 && this.data[0].length >= 1) {\n\t\t\tfor (let i = 0; i < this.rowsSelected.length; i++) {\n\t\t\t\tthis.selectRow(i, value);\n\t\t\t}\n\t\t}\n\t\tthis.selectAllChange.next(value);\n\t}\n\n\tisRowSelected(index: number) {\n\t\treturn this.rowsSelected[index];\n\t}\n\n\t/**\n\t * Checks if row is disabled or not.\n\t */\n\tisRowDisabled(index: number) {\n\t\tconst row = this.data[index] as TableRow;\n\t\treturn !!row.disabled;\n\t}\n\n\t/**\n\t * Expands/Collapses `index`th row based on value\n\t *\n\t * @param index index of the row to expand or collapse\n\t * @param value expanded state of the row. `true` is expanded and `false` is collapsed\n\t */\n\texpandRow(index: number, value = true) {\n\t\tthis.rowsExpanded[index] = value;\n\t\tthis.rowsExpandedChange.emit(index);\n\t}\n\n\t/**\n\t * Expands / collapses all rows\n\t *\n\t * @param value expanded state of the rows. `true` is expanded and `false` is collapsed\n\t */\n\texpandAllRows(value = true) {\n\t\tif (this.data.length > 0) {\n\t\t\tfor (let i = 0; i < this.data.length; i++) {\n\t\t\t\tif (this.isRowExpandable(i)) {\n\t\t\t\t\tthis.rowsExpanded[i] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tthis.rowsExpandedAllChange.emit();\n\t\t\t} else {\n\t\t\t\tthis.rowsCollapsedAllChange.emit();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets the true index of a row based on it's relative position.\n\t * Like in Python, positive numbers start from the top and\n\t * negative numbers start from the bottom.\n\t *\n\t * @param index\n\t */\n\tprotected realRowIndex(index: number): number {\n\t\treturn this.realIndex(index, this.data.length);\n\t}\n\n\t/**\n\t * Gets the true index of a column based on it's relative position.\n\t * Like in Python, positive numbers start from the top and\n\t * negative numbers start from the bottom.\n\t *\n\t * @param index\n\t */\n\tprotected realColumnIndex(index: number): number {\n\t\treturn this.realIndex(index, this.data[0].length);\n\t}\n\n\t/**\n\t * Generic function to calculate the real index of something.\n\t * Used by `realRowIndex()` and `realColumnIndex()`\n\t *\n\t * @param index\n\t * @param length\n\t */\n\tprotected realIndex(index: number, length: number): number {\n\t\tif (index == null) {\n\t\t\treturn length - 1;\n\t\t} else if (index >= 0) {\n\t\t\treturn index >= length ? length - 1 : index;\n\t\t} else {\n\t\t\treturn -index >= length ? 0 : length + index;\n\t\t}\n\t}\n}\n",
8805
8805
  "constructorObj": {
8806
8806
  "name": "constructor",
8807
8807
  "description": "",
@@ -9009,7 +9009,7 @@
9009
9009
  "optional": false,
9010
9010
  "returnType": "void",
9011
9011
  "typeParameters": [],
9012
- "line": 477,
9012
+ "line": 484,
9013
9013
  "deprecated": false,
9014
9014
  "deprecationMessage": "",
9015
9015
  "rawdescription": "\n\nAdds a column to the `index`th column or appends to table if index not provided.\n\nIf column is shorter than other columns or not provided, it will be padded with\nempty `TableItem` elements.\n\nIf column is longer than other columns, others will be extended to match so no data is lost.\n\nIf called on an empty table with no parameters, it creates a 1x1 table.\n\nNegative index starts from the end. -1 being the last element.\n\n",
@@ -9017,8 +9017,8 @@
9017
9017
  "jsdoctags": [
9018
9018
  {
9019
9019
  "name": {
9020
- "pos": 12361,
9021
- "end": 12367,
9020
+ "pos": 12434,
9021
+ "end": 12440,
9022
9022
  "flags": 16842752,
9023
9023
  "modifierFlagsCache": 0,
9024
9024
  "transformFlags": 0,
@@ -9030,8 +9030,8 @@
9030
9030
  "deprecationMessage": "",
9031
9031
  "optional": true,
9032
9032
  "tagName": {
9033
- "pos": 12354,
9034
- "end": 12359,
9033
+ "pos": 12427,
9034
+ "end": 12432,
9035
9035
  "flags": 16842752,
9036
9036
  "modifierFlagsCache": 0,
9037
9037
  "transformFlags": 0,
@@ -9042,8 +9042,8 @@
9042
9042
  },
9043
9043
  {
9044
9044
  "name": {
9045
- "pos": 12381,
9046
- "end": 12386,
9045
+ "pos": 12454,
9046
+ "end": 12459,
9047
9047
  "flags": 16842752,
9048
9048
  "modifierFlagsCache": 0,
9049
9049
  "transformFlags": 0,
@@ -9055,8 +9055,8 @@
9055
9055
  "deprecationMessage": "",
9056
9056
  "optional": true,
9057
9057
  "tagName": {
9058
- "pos": 12374,
9059
- "end": 12379,
9058
+ "pos": 12447,
9059
+ "end": 12452,
9060
9060
  "flags": 16842752,
9061
9061
  "modifierFlagsCache": 0,
9062
9062
  "transformFlags": 0,
@@ -9159,7 +9159,7 @@
9159
9159
  "optional": false,
9160
9160
  "returnType": "TableItem[]",
9161
9161
  "typeParameters": [],
9162
- "line": 449,
9162
+ "line": 456,
9163
9163
  "deprecated": false,
9164
9164
  "deprecationMessage": "",
9165
9165
  "rawdescription": "\n\nReturns `index`th column of the table.\n\nNegative index starts from the end. -1 being the last element.\n\n",
@@ -9167,8 +9167,8 @@
9167
9167
  "jsdoctags": [
9168
9168
  {
9169
9169
  "name": {
9170
- "pos": 11608,
9171
- "end": 11613,
9170
+ "pos": 11681,
9171
+ "end": 11686,
9172
9172
  "flags": 16842752,
9173
9173
  "modifierFlagsCache": 0,
9174
9174
  "transformFlags": 0,
@@ -9179,8 +9179,8 @@
9179
9179
  "deprecated": false,
9180
9180
  "deprecationMessage": "",
9181
9181
  "tagName": {
9182
- "pos": 11602,
9183
- "end": 11607,
9182
+ "pos": 11675,
9183
+ "end": 11680,
9184
9184
  "flags": 16842752,
9185
9185
  "modifierFlagsCache": 0,
9186
9186
  "transformFlags": 0,
@@ -9204,7 +9204,7 @@
9204
9204
  "optional": false,
9205
9205
  "returnType": "void",
9206
9206
  "typeParameters": [],
9207
- "line": 565,
9207
+ "line": 572,
9208
9208
  "deprecated": false,
9209
9209
  "deprecationMessage": "",
9210
9210
  "rawdescription": "\n\ncycle through the three sort states\n",
@@ -9212,8 +9212,8 @@
9212
9212
  "jsdoctags": [
9213
9213
  {
9214
9214
  "name": {
9215
- "pos": 14673,
9216
- "end": 14678,
9215
+ "pos": 14746,
9216
+ "end": 14751,
9217
9217
  "flags": 16842752,
9218
9218
  "modifierFlagsCache": 0,
9219
9219
  "transformFlags": 0,
@@ -9224,8 +9224,8 @@
9224
9224
  "deprecated": false,
9225
9225
  "deprecationMessage": "",
9226
9226
  "tagName": {
9227
- "pos": 14667,
9228
- "end": 14672,
9227
+ "pos": 14740,
9228
+ "end": 14745,
9229
9229
  "flags": 16842752,
9230
9230
  "modifierFlagsCache": 0,
9231
9231
  "transformFlags": 0,
@@ -9236,6 +9236,18 @@
9236
9236
  }
9237
9237
  ]
9238
9238
  },
9239
+ {
9240
+ "name": "deleteAllRows",
9241
+ "args": [],
9242
+ "optional": false,
9243
+ "returnType": "void",
9244
+ "typeParameters": [],
9245
+ "line": 417,
9246
+ "deprecated": false,
9247
+ "deprecationMessage": "",
9248
+ "rawdescription": "\n\nDeletes all rows.\n",
9249
+ "description": "<p>Deletes all rows.</p>\n"
9250
+ },
9239
9251
  {
9240
9252
  "name": "deleteColumn",
9241
9253
  "args": [
@@ -9249,7 +9261,7 @@
9249
9261
  "optional": false,
9250
9262
  "returnType": "void",
9251
9263
  "typeParameters": [],
9252
- "line": 538,
9264
+ "line": 545,
9253
9265
  "deprecated": false,
9254
9266
  "deprecationMessage": "",
9255
9267
  "rawdescription": "\n\nDeletes `index`th column.\n\nNegative index starts from the end. -1 being the last element.\n\n",
@@ -9257,8 +9269,8 @@
9257
9269
  "jsdoctags": [
9258
9270
  {
9259
9271
  "name": {
9260
- "pos": 13972,
9261
- "end": 13977,
9272
+ "pos": 14045,
9273
+ "end": 14050,
9262
9274
  "flags": 16842752,
9263
9275
  "modifierFlagsCache": 0,
9264
9276
  "transformFlags": 0,
@@ -9269,8 +9281,8 @@
9269
9281
  "deprecated": false,
9270
9282
  "deprecationMessage": "",
9271
9283
  "tagName": {
9272
- "pos": 13966,
9273
- "end": 13971,
9284
+ "pos": 14039,
9285
+ "end": 14044,
9274
9286
  "flags": 16842752,
9275
9287
  "modifierFlagsCache": 0,
9276
9288
  "transformFlags": 0,
@@ -9332,7 +9344,7 @@
9332
9344
  "optional": false,
9333
9345
  "returnType": "any",
9334
9346
  "typeParameters": [],
9335
- "line": 423,
9347
+ "line": 430,
9336
9348
  "deprecated": false,
9337
9349
  "deprecationMessage": "",
9338
9350
  "rawdescription": "\n\nNumber of rows that can be expanded.\n\n",
@@ -9340,8 +9352,8 @@
9340
9352
  "jsdoctags": [
9341
9353
  {
9342
9354
  "tagName": {
9343
- "pos": 11041,
9344
- "end": 11048,
9355
+ "pos": 11114,
9356
+ "end": 11121,
9345
9357
  "flags": 16842752,
9346
9358
  "modifierFlagsCache": 0,
9347
9359
  "transformFlags": 0,
@@ -9366,7 +9378,7 @@
9366
9378
  "optional": false,
9367
9379
  "returnType": "void",
9368
9380
  "typeParameters": [],
9369
- "line": 727,
9381
+ "line": 734,
9370
9382
  "deprecated": false,
9371
9383
  "deprecationMessage": "",
9372
9384
  "rawdescription": "\n\nExpands / collapses all rows\n\n",
@@ -9374,8 +9386,8 @@
9374
9386
  "jsdoctags": [
9375
9387
  {
9376
9388
  "name": {
9377
- "pos": 19320,
9378
- "end": 19325,
9389
+ "pos": 19393,
9390
+ "end": 19398,
9379
9391
  "flags": 16842752,
9380
9392
  "modifierFlagsCache": 0,
9381
9393
  "transformFlags": 0,
@@ -9387,8 +9399,8 @@
9387
9399
  "deprecationMessage": "",
9388
9400
  "defaultValue": "true",
9389
9401
  "tagName": {
9390
- "pos": 19314,
9391
- "end": 19319,
9402
+ "pos": 19387,
9403
+ "end": 19392,
9392
9404
  "flags": 16842752,
9393
9405
  "modifierFlagsCache": 0,
9394
9406
  "transformFlags": 0,
@@ -9431,7 +9443,7 @@
9431
9443
  "optional": false,
9432
9444
  "returnType": "void",
9433
9445
  "typeParameters": [],
9434
- "line": 717,
9446
+ "line": 724,
9435
9447
  "deprecated": false,
9436
9448
  "deprecationMessage": "",
9437
9449
  "rawdescription": "\n\nExpands/Collapses `index`th row based on value\n\n",
@@ -9439,8 +9451,8 @@
9439
9451
  "jsdoctags": [
9440
9452
  {
9441
9453
  "name": {
9442
- "pos": 19008,
9443
- "end": 19013,
9454
+ "pos": 19081,
9455
+ "end": 19086,
9444
9456
  "flags": 16842752,
9445
9457
  "modifierFlagsCache": 0,
9446
9458
  "transformFlags": 0,
@@ -9451,8 +9463,8 @@
9451
9463
  "deprecated": false,
9452
9464
  "deprecationMessage": "",
9453
9465
  "tagName": {
9454
- "pos": 19002,
9455
- "end": 19007,
9466
+ "pos": 19075,
9467
+ "end": 19080,
9456
9468
  "flags": 16842752,
9457
9469
  "modifierFlagsCache": 0,
9458
9470
  "transformFlags": 0,
@@ -9463,8 +9475,8 @@
9463
9475
  },
9464
9476
  {
9465
9477
  "name": {
9466
- "pos": 19064,
9467
- "end": 19069,
9478
+ "pos": 19137,
9479
+ "end": 19142,
9468
9480
  "flags": 16842752,
9469
9481
  "modifierFlagsCache": 0,
9470
9482
  "transformFlags": 0,
@@ -9476,8 +9488,8 @@
9476
9488
  "deprecationMessage": "",
9477
9489
  "defaultValue": "true",
9478
9490
  "tagName": {
9479
- "pos": 19058,
9480
- "end": 19063,
9491
+ "pos": 19131,
9492
+ "end": 19136,
9481
9493
  "flags": 16842752,
9482
9494
  "modifierFlagsCache": 0,
9483
9495
  "transformFlags": 0,
@@ -9700,7 +9712,7 @@
9700
9712
  "optional": false,
9701
9713
  "returnType": "any",
9702
9714
  "typeParameters": [],
9703
- "line": 438,
9715
+ "line": 445,
9704
9716
  "deprecated": false,
9705
9717
  "deprecationMessage": "",
9706
9718
  "jsdoctags": [
@@ -9721,7 +9733,7 @@
9721
9733
  "optional": false,
9722
9734
  "returnType": "any",
9723
9735
  "typeParameters": [],
9724
- "line": 414,
9736
+ "line": 421,
9725
9737
  "deprecated": false,
9726
9738
  "deprecationMessage": ""
9727
9739
  },
@@ -9738,7 +9750,7 @@
9738
9750
  "optional": false,
9739
9751
  "returnType": "boolean",
9740
9752
  "typeParameters": [],
9741
- "line": 706,
9753
+ "line": 713,
9742
9754
  "deprecated": false,
9743
9755
  "deprecationMessage": "",
9744
9756
  "rawdescription": "\n\nChecks if row is disabled or not.\n",
@@ -9768,7 +9780,7 @@
9768
9780
  "optional": false,
9769
9781
  "returnType": "any",
9770
9782
  "typeParameters": [],
9771
- "line": 430,
9783
+ "line": 437,
9772
9784
  "deprecated": false,
9773
9785
  "deprecationMessage": "",
9774
9786
  "jsdoctags": [
@@ -9796,7 +9808,7 @@
9796
9808
  "optional": false,
9797
9809
  "returnType": "any",
9798
9810
  "typeParameters": [],
9799
- "line": 434,
9811
+ "line": 441,
9800
9812
  "deprecated": false,
9801
9813
  "deprecationMessage": "",
9802
9814
  "jsdoctags": [
@@ -9824,7 +9836,7 @@
9824
9836
  "optional": false,
9825
9837
  "returnType": "boolean",
9826
9838
  "typeParameters": [],
9827
- "line": 666,
9839
+ "line": 673,
9828
9840
  "deprecated": false,
9829
9841
  "deprecationMessage": "",
9830
9842
  "rawdescription": "\n\nChecks if row is filtered out.\n\n",
@@ -9832,8 +9844,8 @@
9832
9844
  "jsdoctags": [
9833
9845
  {
9834
9846
  "name": {
9835
- "pos": 17763,
9836
- "end": 17768,
9847
+ "pos": 17836,
9848
+ "end": 17841,
9837
9849
  "flags": 16842752,
9838
9850
  "modifierFlagsCache": 0,
9839
9851
  "transformFlags": 0,
@@ -9844,8 +9856,8 @@
9844
9856
  "deprecated": false,
9845
9857
  "deprecationMessage": "",
9846
9858
  "tagName": {
9847
- "pos": 17757,
9848
- "end": 17762,
9859
+ "pos": 17830,
9860
+ "end": 17835,
9849
9861
  "flags": 16842752,
9850
9862
  "modifierFlagsCache": 0,
9851
9863
  "transformFlags": 0,
@@ -9856,8 +9868,8 @@
9856
9868
  },
9857
9869
  {
9858
9870
  "tagName": {
9859
- "pos": 17774,
9860
- "end": 17781,
9871
+ "pos": 17847,
9872
+ "end": 17854,
9861
9873
  "flags": 16842752,
9862
9874
  "modifierFlagsCache": 0,
9863
9875
  "transformFlags": 0,
@@ -9881,7 +9893,7 @@
9881
9893
  "optional": false,
9882
9894
  "returnType": "any",
9883
9895
  "typeParameters": [],
9884
- "line": 699,
9896
+ "line": 706,
9885
9897
  "deprecated": false,
9886
9898
  "deprecationMessage": "",
9887
9899
  "jsdoctags": [
@@ -9915,7 +9927,7 @@
9915
9927
  "optional": false,
9916
9928
  "returnType": "void",
9917
9929
  "typeParameters": [],
9918
- "line": 552,
9930
+ "line": 559,
9919
9931
  "deprecated": false,
9920
9932
  "deprecationMessage": "",
9921
9933
  "jsdoctags": [
@@ -9945,7 +9957,7 @@
9945
9957
  "optional": false,
9946
9958
  "returnType": "void",
9947
9959
  "typeParameters": [],
9948
- "line": 650,
9960
+ "line": 657,
9949
9961
  "deprecated": false,
9950
9962
  "deprecationMessage": "",
9951
9963
  "rawdescription": "\n\nRestores `rowsSelected` from data pushed by `pushRowSelectionToModelData()`\n\nCall after sorting data (if you previously pushed to maintain selection order)\nto make everything right with the world again.\n",
@@ -9957,7 +9969,7 @@
9957
9969
  "optional": false,
9958
9970
  "returnType": "void",
9959
9971
  "typeParameters": [],
9960
- "line": 620,
9972
+ "line": 627,
9961
9973
  "deprecated": false,
9962
9974
  "deprecationMessage": "",
9963
9975
  "rawdescription": "\n\nAppends `rowsSelected` and `rowsExpanded` info to model data.\n\nWhen sorting rows, do this first so information about row selection\ngets sorted with the other row info.\n\nCall `popRowSelectionFromModelData()` after sorting to make everything\nright with the world again.\n",
@@ -10022,7 +10034,7 @@
10022
10034
  "optional": false,
10023
10035
  "returnType": "void",
10024
10036
  "typeParameters": [],
10025
- "line": 690,
10037
+ "line": 697,
10026
10038
  "deprecated": false,
10027
10039
  "deprecationMessage": "",
10028
10040
  "rawdescription": "\n\nSelects or deselects all rows in the model\n\n",
@@ -10030,8 +10042,8 @@
10030
10042
  "jsdoctags": [
10031
10043
  {
10032
10044
  "name": {
10033
- "pos": 18436,
10034
- "end": 18441,
10045
+ "pos": 18509,
10046
+ "end": 18514,
10035
10047
  "flags": 16842752,
10036
10048
  "modifierFlagsCache": 0,
10037
10049
  "transformFlags": 0,
@@ -10043,8 +10055,8 @@
10043
10055
  "deprecationMessage": "",
10044
10056
  "defaultValue": "true",
10045
10057
  "tagName": {
10046
- "pos": 18430,
10047
- "end": 18435,
10058
+ "pos": 18503,
10059
+ "end": 18508,
10048
10060
  "flags": 16842752,
10049
10061
  "modifierFlagsCache": 0,
10050
10062
  "transformFlags": 0,
@@ -10087,7 +10099,7 @@
10087
10099
  "optional": false,
10088
10100
  "returnType": "void",
10089
10101
  "typeParameters": [],
10090
- "line": 677,
10102
+ "line": 684,
10091
10103
  "deprecated": false,
10092
10104
  "deprecationMessage": "",
10093
10105
  "rawdescription": "\n\nSelect/deselect `index`th row based on value\n\n",
@@ -10095,8 +10107,8 @@
10095
10107
  "jsdoctags": [
10096
10108
  {
10097
10109
  "name": {
10098
- "pos": 18099,
10099
- "end": 18104,
10110
+ "pos": 18172,
10111
+ "end": 18177,
10100
10112
  "flags": 16842752,
10101
10113
  "modifierFlagsCache": 0,
10102
10114
  "transformFlags": 0,
@@ -10107,8 +10119,8 @@
10107
10119
  "deprecated": false,
10108
10120
  "deprecationMessage": "",
10109
10121
  "tagName": {
10110
- "pos": 18093,
10111
- "end": 18098,
10122
+ "pos": 18166,
10123
+ "end": 18171,
10112
10124
  "flags": 16842752,
10113
10125
  "modifierFlagsCache": 0,
10114
10126
  "transformFlags": 0,
@@ -10119,8 +10131,8 @@
10119
10131
  },
10120
10132
  {
10121
10133
  "name": {
10122
- "pos": 18143,
10123
- "end": 18148,
10134
+ "pos": 18216,
10135
+ "end": 18221,
10124
10136
  "flags": 16842752,
10125
10137
  "modifierFlagsCache": 0,
10126
10138
  "transformFlags": 0,
@@ -10132,8 +10144,8 @@
10132
10144
  "deprecationMessage": "",
10133
10145
  "defaultValue": "true",
10134
10146
  "tagName": {
10135
- "pos": 18137,
10136
- "end": 18142,
10147
+ "pos": 18210,
10148
+ "end": 18215,
10137
10149
  "flags": 16842752,
10138
10150
  "modifierFlagsCache": 0,
10139
10151
  "transformFlags": 0,
@@ -10157,7 +10169,7 @@
10157
10169
  "optional": false,
10158
10170
  "returnType": "void",
10159
10171
  "typeParameters": [],
10160
- "line": 588,
10172
+ "line": 595,
10161
10173
  "deprecated": false,
10162
10174
  "deprecationMessage": "",
10163
10175
  "rawdescription": "\n\nSorts the data currently present in the model based on `compare()`\n\nDirection is set by `ascending` and `descending` properties of `TableHeaderItem`\nin `index`th column.\n\n",
@@ -10165,8 +10177,8 @@
10165
10177
  "jsdoctags": [
10166
10178
  {
10167
10179
  "name": {
10168
- "pos": 15260,
10169
- "end": 15265,
10180
+ "pos": 15333,
10181
+ "end": 15338,
10170
10182
  "flags": 16842752,
10171
10183
  "modifierFlagsCache": 0,
10172
10184
  "transformFlags": 0,
@@ -10177,8 +10189,8 @@
10177
10189
  "deprecated": false,
10178
10190
  "deprecationMessage": "",
10179
10191
  "tagName": {
10180
- "pos": 15254,
10181
- "end": 15259,
10192
+ "pos": 15327,
10193
+ "end": 15332,
10182
10194
  "flags": 16842752,
10183
10195
  "modifierFlagsCache": 0,
10184
10196
  "transformFlags": 0,
@@ -88657,8 +88669,8 @@
88657
88669
  "type": "class",
88658
88670
  "linktype": "classe",
88659
88671
  "name": "TableModel",
88660
- "coveragePercent": 73,
88661
- "coverageCount": "34/46",
88672
+ "coveragePercent": 74,
88673
+ "coverageCount": "35/47",
88662
88674
  "status": "good"
88663
88675
  },
88664
88676
  {