The Augmented.js Next - Presentation Table View Module.
npm install presentation-tableAugmented.js Presentation Table View Module
- AutomaticTable
- Parameters
- Examples
- theme
- Properties
- linkable
- Properties
- links
- Properties
- Examples
- selectable
- Properties
- sortable
- Properties
- sortStyle
- Properties
- display
- Properties
- renderPaginationControl
- Properties
- paginationAPI
- Properties
- description
- Properties
- localStorage
- Properties
- localStorageKey
- Properties
- editable
- Properties
- crossOrigin
- Properties
- lineNumbers
- Properties
- uri
- Properties
- isInitalized
- Properties
- pageControlBound
- Properties
- schema
- Properties
- name
- Properties
- setTheme
- Parameters
- rowLink
- Parameters
- sortBy
- Parameters
- currentPage
- totalPages
- nextPage
- previousPage
- goToPage
- Parameters
- firstPage
- lastPage
- editCell
- Parameters
- copyCell
- Parameters
- clearCell
- Parameters
- render
- retrieveSchema
- Parameters
- fetch
- save
- Parameters
- populate
- Parameters
- clear
- refresh
- compileTemplate
- setURI
- Parameters
- setSchema
- Parameters
- showProgressBar
- Parameters
- showMessage
- Parameters
- validate
- isValid
- remove
- getSelected
- Parameters
- getSelectedAsJSON
- getSelectedIndex
- removeRows
- Parameters
- removeSelectedRows
- addRow
- Parameters
- exportTo
- Parameters
- BigDataTable
- Parameters
- EditableBigDataTable
- Parameters
- EditableLocalStorageTable
- Parameters
- EditableTable
- Parameters
- LocalStorageTable
- Parameters
- Spreadsheet
- Parameters
- \_generate
- \_generate
Extends DecoratorView
AutomaticTable
Creates a table automatically via a schema for defintion and a uri/json for data
- options (optional, default {})
``javascript`
const at = new AutomaticTable({
schema: schema,
el: "#autoTable",
crossOrigin: false,
sortable: true,
lineNumbers: true,
editable: true,
uri: "/example/data/table.json",
messagePosition: "top", // or bottom
theme: "material",
linkable: true,
links: {
wholeRow: true,
column: "",
link: "rowLink"
},
fetchOnStart: false
});
The theme property - The theme of this table (default is 'material')
#### Properties
- theme string The theme of this table
The linkable property - enable links in a row (only works in non-editable tables)
#### Properties
- linkable boolean enable/disable linking a row
The links property - setup linking structure for links in a row
#### Properties
- linkable boolean enable/disable linking a row
#### Examples
`javascript`
links: {
wholeRow: false, // link whole row vs column
column: "name", // name of column
link: "rowLink" // callback or method in class
}
The selectable property - enable selecting a row in table
#### Properties
- selectable boolean enable/disable selecting a row
The sortable property - enable sorting in table
#### Properties
- sortable boolean enable sorting in the table
The sortStyle property - setup the sort API
#### Properties
- sortStyle string setup the sort API
Fields to display - null will display all
#### Properties
- display array Fields to display
The renderPaginationControl property - render the pagination control
#### Properties
- renderPaginationControl boolean render the pagination control
The paginationAPI property - setup the paginatin API to use
#### Properties
- paginationAPI PaginationFactory.type the pagination API to use
The description property
#### Properties
- description string The description of the table
The localStorage property - enables localStorage
#### Properties
- localStorage boolean The localStorage property
The localStorageKey property - set the key for use in storage
#### Properties
- localStorageKey string The localStorage key property
The editable property - enables editing of cells
#### Properties
- editable boolean The editable property
The crossOrigin property - enables cross origin fetch
#### Properties
- crossOrigin boolean The crossOrigin property
The lineNumber property - turns on line numbers
#### Properties
- lineNumbers boolean The lineNumbers property
The URI property
#### Properties
- uri string The URI property
The initialized property
#### Properties
- isInitalized boolean The initialized property
The pageControlBound property
#### Properties
- pageControlBound boolean is the pagecontrol bound
The schema property - the defining schema
#### Properties
- schema object The schema
The name property
#### Properties
- name string The name of the table
The theme of the table
#### Parameters
- theme string name of the theme
The default rowlink function callback called by row to format a link
#### Parameters
- row array The row data
Returns string Returns the link uri
Sort the table by a key (sent via a UI Event)
#### Parameters
- key string The key to sort by
Return the current page number
Returns number The current page number
Return the total pages
Returns number The total pages
Advance to the next page
Return to the previous page
Go to a specific page
#### Parameters
- page number The page to go to
Return to the first page
Advance to the last page
Edit a cell at the row and column specified
#### Parameters
- row number The rowcol
- number The columnvalue
- any The value to set
Copy a cell at the row and column to another
#### Parameters
- row1 number The 'from' rowcol1
- number The 'from' columnrow2
- number The 'to' rowcol2
- number The 'to' column
Clear a cell at the row and column specified
#### Parameters
- row number The rowcol
- number The column
Render the table
Returns object Returns the view context ('this')
Fetch the schema from the source URI
#### Parameters
- uri {string} the URI to fetch from
Fetch the data from the source URI
Save the data to the source
This only functions if the table is editable
#### Parameters
- override boolean Save even if not editable
Returns any Returns true if succesfull
Populate the data in the table
#### Parameters
- source array The source data array
Clear all the data in the table
- **See: AutomaticTable.render
**
Refresh the table (Same as render)
Returns object Returns the view context ('this')
An overridable template compile
Returns string Returns the template
Sets the URI
#### Parameters
- uri string The URI
Sets the schema
#### Parameters
- schema object The JSON schema of the dataset
Enable/Disable the progress bar
#### Parameters
- show boolean Show or Hide the progress bar
Show a message related to the table
#### Parameters
- message string Some message to display
Validate the table
Returns boolean Returns true on success of validation
Is the table valid
Returns boolean Returns true if valid
Remove the table and all binds
Returns any Returns the context (this)
Gets the selected models
#### Parameters
- json boolean convert to array of objects
Returns Array Returns array of selected rows (models)
Gets the selected models as JSON
Returns Array Returns array of selected rows (JSON Objects)
Gets the selected row indexes
Returns Array Returns array of selected rows (indexes)
Removes the models
#### Parameters
- rows Array Models of the rows to remove
Removes the selected models
adds a row to the table
#### Parameters
- model Model The model to add
Export the table data in requested format
#### Parameters
- type string The type requested (csv, tsv, json, or html) html is default
Returns string The table data in requested format
Extends AutomaticTable
Instance class preconfigured for sorting and pagination
- options
Extends AutomaticTable
Instance class preconfigured for sorting and pagination
- options
Extends AutomaticTable
Instance class preconfigured for editing, sorting, from local storage
- options
Extends AutomaticTable
Instance class preconfigured for editing
- options
Extends AutomaticTable
Instance class preconfigured for local storage-based table
- options
Extends AutomaticTable
Instance class preconfigured for editing for use as a Spreadsheet.
If a propery for length is not specified, it will buffer 10 lines for editing.
- options`