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

    ComboBoxButtonView is a primitive view for displaying a button in a ComboBox.

    • Renders a button with text, icon, and background.
    • Supports focus, click, and dropdown open state.
    ComboBoxButton({
    id: 'button',
    text: buttonText,
    width: this.width,
    height: this.height,
    titleFontKey: this.buttonTitleFontKey,
    color: this.color,
    backgroundColor: this.backgroundColor,
    backgroundUri: this.backgroundUri,
    focusUri: this.buttonFocusUri,
    focusColor: this.buttonFocusColor,
    isOpened: this.isDropdownOpen,
    horizPadding: this.horizPadding,
    iconUri: this.iconUri,
    iconColor: this.iconColor,
    dropdownPosition: this.dropdownPosition,
    })
    .isInitialFocus()
    .onClick(() => this.isDropdownOpen = !this.isDropdownOpen)
    .focusMap({
    down: this.dropdownPosition === DropdownPosition.Bottom ? 'cardsContainer' : undefined,
    up: this.dropdownPosition === DropdownPosition.Top ? 'cardsContainer' : undefined,
    default: undefined
    })

    Type Parameters

    Hierarchy (View Summary)

    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
    backgroundColor: string = '#ffffff'

    The background color.

    backgroundUri: string = ''

    The background image URI.

    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[] = ...
    color: string = '#ffffff'

    The text color.

    compositeView: boolean = false

    Indicates this is not a composite view.

    customData?: unknown
    defaultValues: Partial<T> = {}
    dropdownPosition: DropdownPosition = DropdownPosition.Bottom

    The dropdown position (top or bottom).

    eventHandlers: Record<string, Function> = {}
    focusColor: string = ''

    The focus color.

    focusedChildId?: string
    focusId: string = ''
    focusUri: string = ''

    The focus image URI.

    height: number = 63

    The button height.

    horizPadding: { left: number; right: number } = ...

    The horizontal padding for the button.

    iconColor: string = '#ffffff'

    The icon color.

    iconSize: number[] = ...

    The icon size as [width, height].

    iconUri: string = ''

    The icon image URI.

    id: string = ''
    includeInLayout: boolean = true
    initialFocusId: string = ''
    instancePool: IInstancePool
    isFocused: boolean = false

    Indicates whether the element is currently focused.

    isLayoutDirty: boolean = false
    isOpened: boolean = false

    Whether the dropdown is opened.

    isPresented: boolean = false

    If true, this view has been presented in an AggregateViewController

    isSkeleton: boolean = false
    isWaking: boolean = false
    labelIconGap: number = 9

    Gap between label and icon.

    nextViewId: number = 0
    nodePool: INodePool
    opacity: number = 1.0
    parent?: IHosannaView<ViewState> = undefined
    partialRendererHibernatedState: Partial<T> = {}
    rotation: number = 0
    scale: number[] = ...
    scaleRotateCenter: number[] = ...
    scrollablePositionX: undefined | number = undefined
    scrollablePositionY: undefined | number = undefined
    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
    text: string = ''

    The button text.

    titleFontKey: string = 'Medium,30'

    The font key for the button title.

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

    The IHosannaView subclass that created us in getViews

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

    Indicates whether the navigatable entity is visible.

    width: number = 261

    The button width.

    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>>;
      }

    • 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