Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TrivialUnitBox<U>

Type parameters

  • U

Hierarchy

  • TrivialUnitBox

Implements

Index

Constructors

constructor

Properties

Private $dropDown

$dropDown: JQuery

Private $dropDownTargetElement

$dropDownTargetElement: JQuery

Private $editor

$editor: JQuery

Private $originalInput

$originalInput: JQuery

Private $selectedEntryAndTriggerWrapper

$selectedEntryAndTriggerWrapper: JQuery

Private $selectedEntryWrapper

$selectedEntryWrapper: JQuery

Private $spinners

$spinners: JQuery = $()

Private $unitBox

$unitBox: JQuery

Private blurCausedByClickInsideComponent

blurCausedByClickInsideComponent: boolean = false

Private config

Private editingMode

editingMode: EditingMode

Private entries

entries: U[]

Private isDropDownOpen

isDropDownOpen: boolean = false

Private listBox

listBox: TrivialListBox<U>

Private numberRegex

numberRegex: RegExp

onBlur

onBlur: TrivialEvent<void> = new TrivialEvent<void>(this)

onChange

onChange: TrivialEvent<object> = new TrivialEvent<TrivialUnitBoxChangeEvent<U>>(this)

onFocus

onFocus: TrivialEvent<void> = new TrivialEvent<void>(this)

onSelectedEntryChanged

onSelectedEntryChanged: TrivialEvent<U> = new TrivialEvent<U>(this)

Private selectedEntry

selectedEntry: U

Private usingDefaultQueryFunction

usingDefaultQueryFunction: boolean

Methods

Private cleanupEditorValue

  • cleanupEditorValue(): void

closeDropDown

  • closeDropDown(): void

destroy

  • destroy(): void

Private ensureDecimalInput

  • ensureDecimalInput(): void

Private fireChangeEvents

  • fireChangeEvents(originalEvent: Event): void

Private fireSelectedEntryChangedEvent

  • fireSelectedEntryChangedEvent(): void

focus

  • focus(): void

Private formatAmount

  • formatAmount(integerNumber: number, precision: number, decimalSeparator: string, thousandsSeparator: string): string
  • Parameters

    • integerNumber: number
    • precision: number
    • decimalSeparator: string
    • thousandsSeparator: string

    Returns string

Private formatEditorValue

  • formatEditorValue(): void

getAmount

  • getAmount(): number

getEditor

  • getEditor(): Element

Private getEditorValueNumberPart

  • getEditorValueNumberPart(fillupDecimals?: boolean): string

getMainDomElement

  • getMainDomElement(): Element

Private getQueryString

  • getQueryString(): any

getSelectedEntry

  • getSelectedEntry(): U

Private isDropDownNeeded

  • isDropDownNeeded(): boolean

openDropDown

  • openDropDown(): void

Private query

Private repositionDropDown

  • repositionDropDown(): void

Private selectUnit

  • selectUnit(unitIdentifier: string): void

setAmount

  • setAmount(amount: number): void

setEditingMode

setSelectedEntry

  • setSelectedEntry(entry: U, fireEvent?: boolean, originalEvent?: Event): void
  • Parameters

    • entry: U
    • Optional fireEvent: boolean
    • Optional originalEvent: Event

    Returns void

updateEntries

  • updateEntries(newEntries: U[]): void

Private updateOriginalInputValue

  • updateOriginalInputValue(): void

Generated using TypeDoc