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 among its siblings, and :order, in tree order. An item with no id or label, or
with the id of an earlier item, is left out with its children and listed in :dropped.
The items of `items` keyed by id: `:item`, `:children` (nil for the top level), `:parent`, `:position` among its siblings, and `:order`, in tree order. An item with no id or label, or with the id of an earlier item, is left out with its children 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`.
(normalize raw)(normalize {:keys [items-raw expanded-raw selected-raw selection-raw label
loading-text guides focused]}
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 the index of prev while items is
the same text.
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 the index of `prev` while `items` is the same text.
(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.
(places->visible pl)The visible ids of the places pl, in tree order.
The visible ids of the places `pl`, in tree order.
(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.
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.
(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.
(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.
(visible m)The visible ids of m, in tree order.
The visible ids of `m`, in tree order.
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 |