One mounted position of a resolved component tree.
A node is one component rendered in one data scope: a template
component that is instantiated for three items is three nodes. Its
props hold what a renderer needs:
A2UICore.Resolution.Bindingfor dynamic properties,A2UICore.Resolution.Actionfor actions,{:node, ref}for a child component (the child isA2UICore.Resolution.NodeResolver.node/2of thatref),- plain JSON for everything else.
state says what the position holds:
:resolved— the component's definition is here and its type is in the catalog;:pending— a parent refers to a component that has not arrived;:unknown_type— the definition names a type the catalog lacks;:cyclic— the component is referenced by one of its own descendants; the repeated reference is cut here.
Placeholders (:pending, :unknown_type, :cyclic) have no props and
no children.
ref is the node's identity: it never changes while the position
keeps the same component, and a node that is replaced (a placeholder
that gets its definition, a component whose type changed) gets a new
one. instance_id is a readable, deterministic name for the position.
busy is true while a property waits for the response to an agent
function call (see A2UICore.Resolution.NodeResolver); the property
is nil meanwhile.
Summary
Functions
True for the states that hold no definition of their own.
Types
@type state() :: :resolved | :pending | :unknown_type | :cyclic
@type t() :: %A2UICore.Resolution.Node{ busy: boolean(), catalog_id: String.t() | nil, children: [pos_integer()], component_id: String.t(), data_path: String.t(), edge: String.t() | nil, instance_id: String.t(), occurrence: pos_integer(), parent: pos_integer() | nil, props: map(), ref: pos_integer(), state: state(), type: String.t() | nil }