The pure model of x-tree.
The pure model of x-tree.
The op that activating a branch or a leaf gives, by selection mode.
The op that activating a branch or a leaf gives, by selection mode.
(array-of v)The JS array v, or the one that the JSON text v holds. Nil for anything else.
The JS array `v`, or the one that the JSON text `v` holds. Nil for anything else.
(branch? m id)True when the item id of m has children or is lazy.
True when the item `id` of `m` has children or is lazy.
(click->action m id part)The action of a click on the part (:row or :chevron) of the item id, or nil.
The action of a click on the `part` (`:row` or `:chevron`) of the item `id`, or nil.
(counted m {:keys [selection expanded selected]})The ids of expanded and selected that m counts under selection, as sets, and in
:unknown the ids of each that name no item.
The ids of `expanded` and `selected` that `m` counts under `selection`, as sets, and in `:unknown` the ids of each that name no item.
(end-item? m id)True when the item id of m has no children.
True when the item `id` of `m` has no children.
(events m action m')The events that action sends, from m to m', in order, as [name detail] pairs.
The events that `action` sends, from `m` to `m'`, in order, as `[name detail]` pairs.
(index items)The items of items keyed by id: :item, :children (nil for the top level), :parent,
:position, :order, :rank, and the end items under each branch in :ends and
:enabled-ends. An invalid or repeated item is left out and listed in :dropped.
The items of `items` keyed by id: `:item`, `:children` (nil for the top level), `:parent`, `:position`, `:order`, `:rank`, and the end items under each branch in `:ends` and `:enabled-ends`. An invalid or repeated item is left out and listed in `:dropped`.
(key->action m key)The action of the key key on the focused item of m, or nil when it does nothing.
The action of the key `key` on the focused item of `m`, or nil when it does nothing.
The step of each key, by the kind of the focused item: :open, :closed, :leaf or :any.
The step of each key, by the kind of the focused item: `:open`, `:closed`, `:leaf` or `:any`.
(loading? m id)True when the item id of m is open and has no children.
True when the item `id` of `m` is open and has no children.
(normalize raw)(normalize {:keys [items-raw expanded-raw selected-raw selection-raw label
loading-text guides focused]
:as raw}
prev)The model of the attribute texts in the -raw keys of raw, and the focused id in
:focused. With prev, the model before, it keeps what each attribute text gives while
that text is the same.
The model of the attribute texts in the `-raw` keys of `raw`, and the focused id in `:focused`. With `prev`, the model before, it keeps what each attribute text gives while that text is the same.
(parse-list s)The array that the JSON text s holds, as a vector with keyword keys, or nil.
The array that the JSON text `s` holds, as a vector with keyword keys, or nil.
(parse-selection s)The selection mode that s names, or :single.
The selection mode that `s` names, or `:single`.
(places m)The wanted places of m for places/sync!: the top level under :tree, and each visible id
with its children when it is open, else none.
The wanted places of `m` for `places/sync!`: the top level under `:tree`, and each visible id with its children when it is open, else none.
(resolve-focus m focused)The id that takes focus in m: focused or its nearest visible ancestor, else the first
selected id or its nearest visible ancestor, else the first visible id. Nil with no items.
m holds its places (see with-places).
The id that takes focus in `m`: `focused` or its nearest visible ancestor, else the first selected id or its nearest visible ancestor, else the first visible id. Nil with no items. `m` holds its places (see `with-places`).
(row m id)The facts the tree writes for the item id of m.
The facts the tree writes for the item `id` of `m`.
(row->attrs {:keys [level setsize posinset branch? disabled? focused? loading?
guide-active? expanded select check]})The attributes of each part of the item of row. Nil removes an attribute.
The attributes of each part of the item of `row`. Nil removes an attribute.
(stale-ids old-m m)The ids whose row may differ between old-m and m, or nil when every row may.
The ids whose row may differ between `old-m` and `m`, or nil when every row may.
(step m {:keys [op id]})The model after action. Every action focuses its id.
The model after `action`. Every action focuses its id.
(target m id move)The id that move reaches from id in m, or nil.
The id that `move` reaches from `id` in `m`, or nil.
(with-places m)m with its :places, its :visible ids and the index of each in :visible-at.
`m` with its `:places`, its `:visible` ids and the index of each in `:visible-at`.
(with-selected-counts m)m with the number of selected end items under each branch, in :selected-ends, and of
enabled ones, in :selected-enabled-ends.
`m` with the number of selected end items under each branch, in `:selected-ends`, and of enabled ones, in `:selected-enabled-ends`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |