CngxStepperHost
projects/common/stepper/stepper-host.token.ts
Referenced by#
Import#
import { CngxStepperHost } from '@cngx/common/stepper'
Description#
Contract atoms see via CNGX_STEPPER_HOST. Mirrors the directive's surface 1:1 - atoms never reach the concrete class.
Index#
Properties
Instance Properties#
SignalRoot-level group whose subtree contains the active step, or null
when the active step is a root-level step (e.g. a trailing
Finish). The single focus-driven-collapse source: atoms read it
via this contract, never the concrete presenter. Drives
CngxStepGroup.isCollapsed, the strip aria-expanded binding, and
visibleStripNodes.
SignalSignalSignaltrue while a commit is in flight (commitState.status() === 'pending'). Drives the busy-disable on nav affordances. Keyed on
the strict 'pending' status, consistent with the per-step busy
gate.
Signaltrue when selectNext would move - i.e. an enabled,
linear-unblocked step follows the active one. Derived from the same
predicates select() enforces, so a Next affordance can never
drift from the navigation it gates.
Signaltrue when selectPrevious would move - i.e. an enabled
step precedes the active one. The single gate a Back affordance
reads; never re-derive it from stepsOnly at the call site.
CngxAsyncStateStatusTransitionReactive current/previous pair for the commit-state status. The
organism's <span cngxLiveRegion> reads this tracker on every
pending → success / error transition. Allocated once per
presenter - consumers MUST read this rather than calling
createTransitionTracker locally so the linkedSignal is shared.
SignalSignalIndex of the most recently refused commit target, or undefined
when no rejection is pending. Set by the rejection arm of
select(); cleared by a successful re-pick of the same target
or via clearLastFailed. Drives strip rejection decoration
and the commitRolledBackTo chain in liveAnnouncement.
SignalSignalLabel of the step selectNext would land on, or undefined
when none follows. Resolved through the enabled-step traversal so a
"Continue to {{ label }}" affordance announces the real target.
Signal<"horizontal" | "vertical">SignalOrigin captured at commit-window open - the safe-harbour the user
is returned to on optimistic rollback. Resolves the origin label
for the commitRolledBackTo(originLabel) phrase. Cleared on
success; retained on rejection through the persistence window.
SignalLabel of the step selectPrevious would land on, or
undefined when none precedes.
Step-only flat projection (group nodes filtered out).
Structural-equal via flatStepsEqual; the single source for any
step-count / step-position lookup.
Contract: variant and skin organisms MUST read this signal
directly. Local re-derivation (e.g. flatSteps().filter(...)
inside a variant's computed) is rejected at review time -
the projection's equality contract is the load-bearing
invariant, and a local re-filter breaks the shape-stable
short-circuit that downstream consumers rely on. Add lookup
helpers as methods on this contract rather than re-deriving.
Flat strip projection under the focus-driven group-collapse policy:
identical to flatSteps when groupCollapse is 'off', and
with every non-active root-level group's children dropped (header
node alone) under 'expand-active'. The strip @for reads this;
stepsOnly stays the single counting / announcement source.
Contract: variant and skin organisms drive the strip off this
projection, never re-derive it. Structural-equal via flatStepsEqual
(each retained node keeps its flatSteps flatIndex), so a
shape-stable re-emit short-circuits the strip render.
Methods#
Drop the persisted lastFailedIndex flag. Idempotent; safe to wire to a Dismiss button or aggregator-cleared.
register(handle: CngxStepRegistration, parentId?: string | null)string | null