# Masu v0.1.0 - API Reference

## Modules

- Grid
  - [Masu](Masu.md): Masu (枡) adds data grids to a Phoenix app.
  - [Masu.Action](Masu.Action.md): An item of a grid's menus of your own: in a column's header menu
(`:header_action`), or in the menu of a cell (`:cell_action`), which a
right click opens, or the context-menu key or Shift+F10 on the active
cell.
  - [Masu.Column](Masu.Column.md): A column of a grid: which value of a row it shows, how, and what a
person may do with it.
  - [Masu.Components](Masu.Components.md): The grid component.
  - [Masu.Grid](Masu.Grid.md): The LiveComponent behind `Masu.Components.data_grid/1`.
  - [Masu.Group](Masu.Group.md): Rows grouped by the values of columns, with totals.
  - [Masu.Live](Masu.Live.md): Live rows: a grid that follows a PubSub topic, and shows the rows that
change on it as they change.
  - [Masu.Presence](Masu.Presence.md): Who else has a grid open, and where they are: the people of a grid,
with `Phoenix.Presence`.
  - [Masu.Tree](Masu.Tree.md): Rows in a tree: children with the columns of their parent, indented,
opened and closed.

- Queries
  - [Masu.Filter](Masu.Filter.md): A condition on a column that a row must meet to be in the grid.
  - [Masu.Query](Masu.Query.md): What a person asked of a grid: its order, its filters and its search.
  - [Masu.Sort](Masu.Sort.md): An order of a grid's rows: a column, and a direction.

- Views
  - [Masu.Layout](Masu.Layout.md): How a grid lays out its columns: their order, which are hidden, which
are pinned to the start or the end, and their widths.
  - [Masu.View](Masu.View.md): A person's view of a grid: its query (`Masu.Query`: order, filters and
search) and its layout (`Masu.Layout`: the order, visibility, pins and
widths of its columns).
  - [Masu.Views](Masu.Views.md): Where a grid keeps people's views: the last view of each person, which
the grid restores when they come back, and named views ("My open
orders") that a person saves for themselves or shares with everyone.
  - [Masu.Views.Ecto](Masu.Views.Ecto.md): Views in a table of your database (see `Masu.Views`).
  - [Masu.Views.Memory](Masu.Views.Memory.md): Views in memory, for development and tests: they last as long as the
node, and every grid of the node shares them. Not for production.

- Sources
  - [Masu.Source](Masu.Source.md): Where a grid's rows come from.
  - [Masu.Source.Ecto](Masu.Source.Ecto.md): The source of a grid given an Ecto query or schema and a repo:
`<.data_grid source={from(o in Order, where: o.shop_id == ^shop.id)} repo={Repo}>`.
  - [Masu.Source.List](Masu.Source.List.md): The source of a grid given its rows: `<.data_grid rows={@users}>`.

- Export
  - [Masu.Export](Masu.Export.md): A grid's rows as a file: CSV or XLSX, of every row of the person's
query (their order, filters and search), with the columns that show,
in their order, and their labels as the first row.
  - [Masu.Router](Masu.Router.md): The route a grid's exports download from.

- Testing
  - [Masu.Test](Masu.Test.md): Helpers for `Phoenix.LiveViewTest`, to read and query the grids of a
LiveView with no browser.

- Exceptions
  - [Masu.Source.Error](Masu.Source.Error.md): A source's read failed: `c:Masu.Source.rows/3` gave `{:error, reason}`.
A grid with `load={:async}` shows it; one that reads inline raises it.

## Mix Tasks

- [mix masu.build](Mix.Tasks.Masu.Build.md): Builds the Masu grid into `priv/static`.
- [mix masu.gen.views](Mix.Tasks.Masu.Gen.Views.md): Writes the migration of the table where `Masu.Views.Ecto` keeps
people's views of grids.
- [mix masu.install](Mix.Tasks.Masu.Install.md): Sets up Masu in a Phoenix application.
- [mix masu.release_check](Mix.Tasks.Masu.ReleaseCheck.md): Checks the built files before a release of Masu.

