hosanna-ui-docs - v0.9.0
    Preparing search index...

    NavControllerView manages a stack of navigatable views and transitions between them.

    • Only one view is visible at a time (or two during transitions).
    • Supports push, pop, reset, and replace operations with optional transitions.
    • Notifies when the last view is removed.
    NavController({ id: 'dialogNavController' })
    .isInitialFocus()
    .onViewRemoved((view: IHosannaView<ViewState>) => {
    console.info('[DialogManager] Dialog removed', view);
    this.focusManager._setFocusUnlocked();
    this?.state?.onDialogDismissed?.(view as IDialogView<ViewState>);
    })
    .onLastViewRemoved(() => {
    console.info('[DialogManager] Last dialog removed');
    this?.state?.onLastDialogDismissed?.();
    })
    .onViewAdded((view: IHosannaView<ViewState>) => {
    console.info('[DialogManager] Dialog added', view);
    this.focusManager._setFocusLocked(this);
    this.onDialogPresented?.(view as IDialogView<ViewState>);
    })

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    __isMemoizedStateValid: boolean = false
    _cacheKey: string = ''
    _hid: string
    _isInFocusChain: boolean = false
    _rendereredTranslation: [number, number] = ...
    activeStyleViewStatus: ViewStatus = ViewStatus.Normal
    aggregateView: undefined | IAggregateView.IAggregateView

    IHosannaView


    audioGuideHint?: string = ''

    This hint can be used in conjunction with the audio guide item

    audioGuideItem?: string | IAudioGuideItem
    calculatedHeight: number = 0
    calculatedWidth: number = 0
    calculatedX: number = 0
    calculatedY: number = 0
    canReceiveFocus: boolean = true

    Indicates whether the element can receive focus.

    children: BaseView.BaseView<ViewState, ISGNGroup>[] = []

    These are the children that are rendered on screen in the tree structure of the view

    childrenChanged: boolean = false
    clippingRect: number[] = ...
    compositeView: boolean = true

    Indicdates whether the view is a focus group which means it can have a focused child Otherwise it will be focused itself

    currentView: undefined | IHosannaView<ViewState> = undefined

    The currently visible view.

    customData?: unknown
    defaultValues: Partial<NavControllerState> = {}
    eventHandlers: Record<string, Function> = {}
    focusedChildId?: string
    focusId: string = ''
    height: number = 0
    id: string = ''
    includeInLayout: boolean = true
    initialFocusId: string = ''
    initialView?: IHosannaView<ViewState> | ViewStruct<ViewState>
    instancePool: IInstancePool
    isAggregateView: boolean = true
    isAutoFocusEnabled: boolean = true

    Indicates whether auto-focus is enabled for the view.

    isFocused: boolean = false

    Indicates whether the element is currently focused.

    isLayoutDirty: boolean = false
    isManagingVisibilityCallbacks: boolean = true

    Indicates whether the view is managing visibility callbacks.

    isNavController: boolean = true

    Indicates this is a NavController.

    isPresented: boolean = false

    If true, this view has been presented in an AggregateViewController

    isSkeleton: boolean = false
    isWaking: boolean = false
    nextViewId: number = 0
    nodePool: INodePool
    onLastViewRemoved: onLastViewRemovedHandler = ...

    Callback invoked when the last view is removed from the stack.

    onViewAdded?: onViewAddedHandler
    onViewRemoved?: onViewRemovedHandler
    opacity: number = 1.0
    parent?: IHosannaView<ViewState> = undefined

    The parent focusable element, if any.

    partialRendererHibernatedState: Partial<NavControllerState> = {}
    rotation: number = 0
    scale: number[] = ...
    scaleRotateCenter: number[] = ...
    scrollablePositionX: undefined | number = undefined
    scrollablePositionY: undefined | number = undefined
    shouldRemoveFromAggregateView: boolean = true

    Indicates whether the view should be removed from the aggregate view.

    staticType: ViewStaticType = ViewStaticType.None
    styleRegistry: IStyleRegistry
    subViews: BaseView.BaseView<ViewState, ISGNGroup>[] = []

    These are the children that were created in getViews, in a flat strcuture - it contains EVERYTHING that we declared.

    subViewsChanged: boolean = false

    A temporary transition for the view.

    transitionStyleKey: string = ""

    Specifies the key used to determine the transition style for the view. This string can be used to select or identify different animation or transition effects when navigating between views or states within the application.

    translation: number[] = ...
    viewOwner: IHosannaView<ViewState>

    The IHosannaView subclass that created us in getViews

    viewStack: IHosannaView<ViewState>[] = []

    This is a virtual stack, showing you what's in the NavController - however, the navController, only shows one view at a time (or 2 if you are in a transition).

    viewStatus: ViewStatus = ViewStatus.Normal
    visible: boolean = true

    Indicates whether the navigatable entity is visible.

    width: number = 0

    Accessors

    Methods

    • Builds the view and attaches it to the view owner.

      Parameters

      • struct: ViewStruct<ViewState>
      • OptionalmountTarget: IHosannaView<ViewState>

        The target to mount the view.

      • childIndex: number = -1

      Returns undefined | IHosannaView<ViewState>

      The built view or undefined.

    • Parameters

      • nextStructs: ViewStruct<ViewState>[]
      • map: Record<string, ViewStruct<ViewState>> = {}
      • idList: { childIndex: number; id: string }[] = []

      Returns {
          idList: { childIndex: number; id: string }[];
          mappedNextStructs: Record<string, ViewStruct<ViewState>>;
      }

    • Pops the current view off the stack.

      Parameters

      • animated: boolean = true

        Whether the transition should be animated.

      • transitionStyleKey: undefined | string = undefined

      Returns undefined | IHosannaView<ViewState>

      The view that was popped off the stack.

    • Presents a new screen in the navigation stack or as a dialog.

      Parameters

      • screen: ViewStruct<ViewState>

        The screen to be presented, represented by a ViewStruct<ViewState>.

      • Optionaloptions: IScreenPresentationOptions

        Optional presentation options.

        • isDialog

          If true, the screen will be presented as a dialog.

        • animated

          If true, the screen transition will be animated.

      Returns void

    • Pushes a new view onto the stack.

      Parameters

      • view: IHosannaView<ViewState> | ViewStruct<ViewState>

        The view to be pushed onto the stack.

      • animated: boolean = true

        Whether the transition should be animated.

      • transitionStyleKey: undefined | string = undefined

      Returns void

    • Replaces the current view with a new view.

      Parameters

      • newView: undefined | IHosannaView<ViewState> | ViewStruct<ViewState> = undefined

        The new view to replace the current view.

      • animated: boolean = false

        Whether the transition should be animated.

      • transitionStyleKey: undefined | string = undefined

      Returns undefined | IHosannaView<ViewState>

      The view that was replaced.

    • Resets the stack to a new state.

      Parameters

      • endIndex: number = 0

        The index of the last screen to pop - by default it will clear all screens (0).

      • newFirstScreen: undefined | IHosannaView<ViewState> | ViewStruct<ViewState> = undefined

        The new first screen to be pushed onto the stack.

      • animated: boolean = false

        Whether the transition should be animated.

      • transitionStyleKey: undefined | string = undefined

      Returns void