CngxTabGroupHost
projects/common/tabs/tab-group-host.token.ts
Referenced by#
Import#
import { CngxTabGroupHost } from '@cngx/common/tabs'
Description#
Contract atoms see when they inject the presenter via CNGX_TAB_GROUP_HOST. Atoms never reach into the concrete class - keeps layering cycle-free and the decompose schematic clean.
Index#
Instance Properties#
SignalModelSignalCngxAsyncStateStatusTransitionReactive current/previous pair for the commit-state status. Lets
organisms and skin sub-components derive transition-driven
announcements (pending → success, pending → error, sync
idle → error) from a single tracker.
SignalSignalTab index of the last refused commit (both optimistic and pessimistic modes). Cleared on next successful re-pick of the same index or via clearLastFailed. Drives the persistent rejection-icon decoration.
The pending → error pulse keyframe (cngx-tab-pulse-error)
does not retrigger on rapid supersede sequences - CSS animations
only fire on fresh class application. See tabs-accepted-debt §3;
the persistent icon plus static red outline carry the durable
signal in the no-pulse case.
SignalSignal<"horizontal" | "vertical">SignalSafe-harbour origin index captured at the start of an active
commit window. Written when select() opens a transition under
commitAction; retained on error so the live-region phrase
can resolve the origin label; cleared on success. Outside the
commit window the slot may carry a stale value - consumers must
gate reads by joining with lastFailedIndex. The origin is
meaningful only when lastFailedIndex !== undefined.
Methods#
Clear lastFailedIndex without unwinding
originIndexDuringCommit (consumers gate reads on
lastFailedIndex anyway). Call when the bound data source
changes and the rollback marker is no longer meaningful.
Request adding a new tab. Emits tabAdd; the consumer appends to
its data. The presenter owns no tab-creation logic - tabs are
derived from consumer data (Ableitung statt Verwaltung).
requestClose(id: string)Request closing the tab with the given id. The presenter moves the
active index onto the surviving neighbour (APG: next tab, or the
previous one when closing the last tab) and emits tabClose; the
consumer performs the actual removal from its data. No-op for an
unknown id.