Releases: revodigital/pamela
v1.12.1-alpha
Summary
Solves Cell
rendering problems with underline. Implements very useful new methods on the Matrix2D
collection class,
such as:
setCell
to set the value of a specific cellcountColumnsWhere
to count the columns where a given predicate is truecountRowsWhere
anyRow
to check if at least one row satisfies a predicateanyColumn
slice
to create a copy of this matrixhasRowAtIndex
to check if a number is a valid indexremoveRow
to remove a rowremoveColumn
to remove a column
Installing
npm i @revodigital/[email protected]
v1.11.1-alpha
Summary
Implements TableBuilder methods to handle directly JSON strings. Now you can:
- Create a table starting from the JSON (
TableBuilder.fromJSON()
) - Build a table to JSON (
builder.buildJSON()
)
IMPORTANT NOTE: The structure of the JSON string is the same of the Table
class. Normally, you can use a similar snippet to create and store a table to
JSON easily:
import { TableBuilder } from './TableBuilder';
const builder = TableBuilder.withCells(100,
100,
{ width: 200, height: 200 }).build()
const json = builder.buildJSON()
// Store your json
Please avoid creating the json by hand, it can lead to very stupid errors. Do
use the TableBuilder
for that purpose.
Installing
npm i @revodigital/[email protected]
v1.10.1-alpha
Summary
Implements TableBuilder population methods:
populateContent
to populate all the contents of a tablebuildContent
to get a matrix with only the contents of a tablewithCells
to create a xy table
Implements populateContent
also on the Table
class.
Installing
npm i @revodigital/[email protected]
v1.9.1-alpha
Summary
Solves Table persistence issues with cells. Adds new useful methods to Table for:
- Count columns (
countColumns()
) - Count rows (
countRows()
) - Get a
Matrix2D
helper for managing table cells (getCellsMatrix()
)
Install this version
npm i @revodigital/[email protected]
v1.8.4-alpha
Summary
Adds more useful function on CellCollection interface, such as:
- Remove cell at index
- Remove cell when predicate is true
- Overwrite cell configuration
- Get last cell index
- Overwrite first cell
- Overwrite last cell
It also implements the method rowBuilder.mergeCells() to merge 2 cells horizontally.
tBuilder.firstRow()?.mergeCells(0, 1, true)
Coming soon
Vertical merge cell, general refactorings
v1.8.2-alpha
Summary
Revolutionizes Table rendering method. Now each table works only with cells, without
specifing a policy to change them. Every Pamela.Table now receives a
cells Matrix2D object and draws it. How can i create such matrix? We
decided to create an entire Builder for that. It's an object that simplifies
the process of creating and editing tables.
It uses the Builder gof pattern, so it can be instantiated and when the **
build** method is called, it will create a complete Pamela.Table object for
you.
It implements very advanced ways of customizing your table, allowing also
different idioms:
- Working by columns
- Working by rows
- Fully functional set / get operations
- Advanced iterators
- Automatic size managing (using auto-width and auto-height)
- Async table building
This builder is completely un-opinionated on how you should look at your table.
See online documentation for better informations about it.