The small words, numbers and dates the document resources' tables draw in their cells.
A table cell only receives the fields it requires, and a field the viewer's policy hides arrives
as a struct rather than a value, so each function here takes term() and answers a safe value for
anything it was not given.
Labels.version_label("1.2.0") #=> "v1.2.0"
Labels.counted(%Ash.NotLoaded{}) #=> 0
Summary
Functions
A count as a cell draws it: the integer itself, else 0.
The first of fields of record that is loaded, nil when none is or the loaded one holds nil.
The word for a kind of version bump, in the viewer's language.
The day a record was written, in the viewer's language; a dash for anything that is not a time.
The badge a review status wears, %{label: label, class: classes}, with the label in the viewer's
language. A status that is none of the five reads as a dash.
A badge map with its :label message id translated into the viewer's language.
A version number as a tag reads it, v1.2.0; a record without one reads as v0.0.1.
Types
Functions
@spec counted(term()) :: non_neg_integer()
A count as a cell draws it: the integer itself, else 0.
The first of fields of record that is loaded, nil when none is or the loaded one holds nil.
A record read by a master carries its relationships under master_ names, one read by a site
user under the plain ones; the other set stays %Ash.NotLoaded{}.
Labels.first_loaded(draft, [:master_section, :section])
The word for a kind of version bump, in the viewer's language.
The day a record was written, in the viewer's language; a dash for anything that is not a time.
The badge a review status wears, %{label: label, class: classes}, with the label in the viewer's
language. A status that is none of the five reads as a dash.
A badge map with its :label message id translated into the viewer's language.
A version number as a tag reads it, v1.2.0; a record without one reads as v0.0.1.