ViewContext
What the compute function of a view receives, besides the arguments of the view: the state of the library, the current time, and the means to search.
Properties
Section titled “Properties”lookup
Section titled “lookup”readonly lookup: QueryLookup;What a search can look up in the indexes.
readonly now: number;The current time, in milliseconds.
readonly state: StateView;The state of the library.
Methods
Section titled “Methods”order()
Section titled “order()”order(ids, options?): QueryHit[];Puts rows in the order of the library. Rows that a filter hides for this person, such as the rows of other people, are left out unless unfiltered is true.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ids |
Iterable<string> |
the ids of the rows |
options? |
{ unfiltered?: boolean; } |
unfiltered keeps the rows that a filter would hide |
options.unfiltered? |
boolean |
- |
Returns
Section titled “Returns”QueryHit[]
the rows, in order
parseDay()
Section titled “parseDay()”parseDay(text): string | null;Reads a day that is written as a date or in words.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
text |
string |
the text, for example 2026-11-24 or friday |
Returns
Section titled “Returns”string | null
the day, or null when the text is not a day
run(query, options?): QueryHit[];Runs a search.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
query |
string |
the text of the search |
options? |
QueryOptions |
the options of the search |
Returns
Section titled “Returns”QueryHit[]
the rows that match
