Hosanna UI API v2.3.0-next
    Preparing search index...

    CollectionViewFocusManager manages the focus rectangle and animations for a collection view. It handles focus transitions, rendering, and applying focus to rows and items.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    activeTransitionStrategy: ICollectionViewFocusTransitionStrategy
    collectionView: ICollectionView & { focusManager: IFocusManager.IFocusManager }

    The collection view instance associated with this focus manager.

    continuousTransitionStrategy: ContinuousFocusTransitionStrategy

    Internal transition strategies share this manager's one pooled focus-indicator poster.

    focusIndicatorPoster: ISGNPoster

    The focus rectangle node used to visually indicate the focused item.

    focusInfo: IFocusInfo

    The current focus information.

    focusPercent: number = 1

    The shared movement clock for the indicator and opt-in percentage recipients. A settled or reset manager has no transition in flight.

    instantTransitionStrategy: InstantFocusTransitionStrategy
    isAnimatingFocus: boolean = false

    Whether the focus rectangle is currently animating.

    isFocusIndicatorSuppressed: boolean = false
    isFocusShown: boolean = false

    Whether the focus rectangle is currently visible.

    lastSpokenItemIndex: number = -1
    lastSpokenRowIndex: number = -1

    The last spoken row index and item index for text-to-speech feedback.

    nextFocusInfo: IFocusInfo

    The next focus information for transitioning focus.

    nullFocusInfo: IFocusInfo = ...

    A null focus information object used as a fallback.

    percentHasActiveRecipients: boolean = false
    percentHeaderRows: Record<string, string> = {}
    percentInFocusChain: boolean = false
    percentOwnerId: string = ''
    percentRecipientCount: number = 0
    percentRows: Record<string, FocusPercentRowRecipients> = {}
    percentSource: undefined | FocusPercentEndpoint
    percentSupplementaryHasRecipients: boolean = false
    percentSupplementaryRowKey: string = ''
    percentTarget: undefined | FocusPercentEndpoint
    startEndTransitionStrategy: StartEndFocusTransitionStrategy
    textToSpeechManager: ITextToSpeechManager

    Injects the text-to-speech manager for providing audio feedback on focus changes.

    Methods

    • Applies the view status to the specified cell view.

      Parameters

      • rowIndex: number

        The row index of the cell.

      • itemIndex: number

        The item index of the cell.

      • focused: boolean

        Whether the cell is focused.

      • isFootprint: boolean = false

      Returns void

    • Applies focus to the currently focused row in the collection view.

      Parameters

      • focused: boolean

        Whether the collection view remains in the focus chain.

      Returns void

    • Creates the focus rectangle node with default properties.

      Returns ISGNPoster

    • Returns IFocusInfo

    • Parameters

      • rowIndex: number

      Returns string

    • Parameters

      • rowKey: string

      Returns FocusPercentRowRecipients

    • Returns the rendered cell coordinate for an endpoint without changing logical focus.

      Parameters

      Returns [number, number]

    • Parameters

      • rowKey: string
      • itemIndex: number

      Returns number

    • Parameters

      • rowKey: string

      Returns number

    • Returns IFocusInfo

    • Parameters

      • rowKey: string

      Returns number

    • Parameters

      • endpoint: FocusPercentEndpoint

      Returns boolean

    • Whether an intra-row Instant destination has not reached its final horizontal anchor yet.

      Parameters

      Returns boolean

    • Whether an Instant destination still needs vertical or horizontal collection movement.

      Parameters

      Returns boolean

    • Parameters

      • rowKey: string
      • itemIndex: number

      Returns void

    • Parameters

      • rowKey: string

      Returns void

    • Returns void

    • Membership changes at target/registration boundaries, never on movement ticks.

      Parameters

      • OptionalchangedRowKey: string

      Returns void

    • Updates the appearance of the focus rectangle based on the animation progress.

      Parameters

      • percent: number

        The percentage of focus animation completion.

      • useLiveEndpoint: boolean = false

      Returns void

    • Applies visibility for one endpoint without consulting the opposite endpoint.

      Parameters

      Returns void

    • Writes only endpoint translation so StartEnd avoids continuous size/style work.

      Parameters

      • info: IFocusInfo
      • useLiveTranslation: boolean = false

      Returns void

    • Returns void

    • Resets focus manager state to initial values. Called when the collection view is cleared (e.g. DataSourceChangeType.Clear).

      Returns void

    • Sets the focus information and renders the focus indicator.

      Parameters

      • info: undefined | IFocusInfo

        The focus information to set and render.

      • preserveFocusPercentTransition: boolean = false

      Returns void

    • Marks the focus transition as complete and applies the focus to the row.

      Returns void

    • Parameters

      • Optionalscale: number
      • progress: number = 1.0

      Returns void

    • Updates the visibility of the focus rectangle based on the focus chain state.

      Parameters

      • applyInFlightPolicy: boolean = false

        Whether the active transition may suppress visibility between endpoints.

      Returns void