CngxChipGroupHost
projects/common/interactive/chip-group/chip-group-host.token.ts
Referenced by#
Import#
import { CngxChipGroupHost } from '@cngx/common/interactive'
Description#
Parent contract every chip-group molecule (CngxChipGroup single,
CngxMultiChipGroup multi) provides via useExisting.
CngxChipInGroup leaves inject this token (NOT optional) - never
the concrete group class - so the leaf stays decompose-ready and
free of cyclic type dependencies, and the Phase 5 split between
single + multi groups can share the same leaf implementation.
Selection state is queried via isSelected(value) and mutated via
toggle(value) / remove(value). isDisabled is a
Signal<boolean> so the leaf's reactive aria-disabled and the
disabled-cascade derivation track it without re-injection. Per
reference_atomic_decompose ยง4 - leaf communicates with its
parent via DI token, never via concrete parent-class injection.
Mode (single vs multi) is intentionally NOT exposed on this contract: the leaf does not branch behaviour on mode, and no consumer / bridge surface in scope reads it. A future feature that needs mode discovery can extend the interface then; until then the field stays out of the public surface.