Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Messages<E>

Type parameters

  • E: HTMLElement

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly attributes

attributes: AttributeManipulator<this>

Readonly classes

classes: ClassManipulator<this>

Readonly data

data: DataManipulator<this>

event

Readonly filter

filter: Button | undefined

filters

filters: IFilters = Messages.defaultFilters

Protected Readonly host

Readonly id

Readonly input

input: Input

Readonly log

pinNotesAutomatically

pinNotesAutomatically: boolean = false

Readonly pinnedMessages

pinnedMessages: Component

Protected Readonly scrollableHandler

scrollableHandler: void = new ScrollableHandler(this.element, "quadrant-component").watchAnimations()

Readonly sendButton

sendButton: Button

Readonly style

style: StyleManipulator<this>

Static preferredQuadrant

preferredQuadrant: Quadrant = Quadrant.BottomLeft

Accessors

childCount

  • get childCount(): number
  • Returns number

dataset

  • get dataset(): DOMStringMap
  • Returns DOMStringMap

element

  • get element(): E
  • Returns E

listen

  • get listen(): (...args: A) => R
  • Alias of .element.addEventListener

    Returns (...args: A) => R

      • (...args: A): R
      • Parameters

        • Rest ...args: A

        Returns R

preferredQuadrant

quadrant

quadrantName

  • get quadrantName(): "Top" | "TopRight" | "BottomRight" | "Bottom" | "BottomLeft" | "TopLeft" | "None"
  • Returns "Top" | "TopRight" | "BottomRight" | "Bottom" | "BottomLeft" | "TopLeft" | "None"

selectable

Methods

append

appendTo

closest

  • closest(selector: string): null | Element
  • Parameters

    • selector: string

    Returns null | Element

contains

  • Parameters

    Returns boolean

deregisterBindHandlers

  • deregisterBindHandlers(): void

deregisterEventBusSubscriber

  • deregisterEventBusSubscriber(): void

dump

  • dump(filter?: undefined | ((element: HTMLElement, component?: Component) => boolean)): this
  • Parameters

    • Optional filter: undefined | ((element: HTMLElement, component?: Component) => boolean)

    Returns this

exists

  • exists(): boolean
  • Returns boolean

findDescendants

  • findDescendants<E>(selector: string): NodeListOf<E>

getAs

  • getAs<C>(cls: Class<C>): undefined | C
  • Type parameters

    Parameters

    Returns undefined | C

getBox

  • getBox(regenIfZero?: boolean, forceRegen?: boolean): Rectangle
  • Parameters

    • Default value regenIfZero: boolean = true
    • Default value forceRegen: boolean = false

    Returns Rectangle

getChildren

  • getChildren<C>(selector?: undefined | string): Stream<C>
  • Type parameters

    Parameters

    • Optional selector: undefined | string

    Returns Stream<C>

Protected getContextMenuDescription

getDefaultFilterName

  • Parameters

    Returns string

getID

getIndex

  • getIndex(): number | undefined
  • Returns number | undefined

getMaxMessages

  • getMaxMessages(): number
  • Returns number

getMessageTimestampMode

  • Returns MessageTimestamp

getName

  • The name is displayed in the Move To context menu option, and in the Switch With options

    Returns Translation

getNthChild

  • getNthChild<C>(nth?: number): C
  • Type parameters

    Parameters

    • Default value nth: number = 0

    Returns C

getOffset

  • getOffset(): { left: number; top: number }
  • Returns { left: number; top: number }

    • left: number
    • top: number

getParent

  • getParent<C>(): C | null
  • Type parameters

    Returns C | null

getPins

  • Returns Stream<IPinnedMessage>

hide

  • hide(): this
  • Returns this

isFocused

  • isFocused(): boolean
  • Returns boolean

isVisible

  • isVisible(): boolean

matches

  • matches(selector: string): boolean
  • Parameters

    • selector: string

    Returns boolean

Protected onChangeQuadrant

  • onChangeQuadrant(): void
  • Returns void

Protected onContextMenu

onDisplayMessage

  • Parameters

    Returns void

Protected onEnter

  • onEnter(reason: "mouse" | "focus"): void
  • Parameters

    • reason: "mouse" | "focus"

    Returns void

onFocusChat

  • onFocusChat(): boolean
  • Returns boolean

Protected onLeave

  • onLeave(reason: "mouse" | "focus"): void
  • Parameters

    • reason: "mouse" | "focus"

    Returns void

onReadNote

  • onReadNote(player: Player, id: number): void
  • Parameters

    Returns void

onWrittenNote

  • onWrittenNote(player: Player, id: number): void
  • Parameters

    Returns void

pinQuestRequirement

reflow

  • reflow(reason: string): void
  • Parameters

    • reason: string

    Returns void

regenerateBoxes

  • regenerateBoxes(): void

registerBindHandlers

  • registerBindHandlers(...untilEvents: Array<keyof Events<this>>): void
  • registerBindHandlers(warnIfNoHandlers: false, ...untilEvents: Array<keyof Events<this>>): void
  • Parameters

    • Rest ...untilEvents: Array<keyof Events<this>>

    Returns void

  • Parameters

    • warnIfNoHandlers: false
    • Rest ...untilEvents: Array<keyof Events<this>>

    Returns void

registerEventBusSubscriber

  • registerEventBusSubscriber(...untilEvents: Array<keyof Events<this>>): void

registerHookHost

  • registerHookHost(name?: undefined | string, ...untilEvents: Array<keyof Events<this>>): void
  • Parameters

    • Optional name: undefined | string
    • Rest ...untilEvents: Array<keyof Events<this>>

    Returns void

remove

  • remove(): this

removeTooltip

  • removeTooltip(): void
  • Returns void

repaint

  • repaint(): void

schedule

  • schedule<A>(cb: (this: this, button: this, ...args: A) => any, ...args: A): this
  • schedule(cb?: undefined | ((this: this, button: this) => any), ...args: any[]): this
  • schedule<A>(ms: number, cb: (this: this, button: this, ...args: A) => any, ...args: A): this
  • schedule(ms: number, cb?: undefined | ((this: this, button: this) => any), ...args: any[]): this
  • schedule<A>(ms: number, debounce: number, cb: (this: this, button: this, ...args: A) => any, ...args: A): this
  • schedule(ms: number, debounce: number, cb?: undefined | ((this: this, button: this) => any), ...args: any[]): this
  • Type parameters

    • A: any[]

    Parameters

    • cb: (this: this, button: this, ...args: A) => any
        • (this: this, button: this, ...args: A): any
        • Parameters

          • this: this
          • button: this
          • Rest ...args: A

          Returns any

    • Rest ...args: A

    Returns this

  • Parameters

    • Optional cb: undefined | ((this: this, button: this) => any)
    • Rest ...args: any[]

    Returns this

  • Type parameters

    • A: any[]

    Parameters

    • ms: number
    • cb: (this: this, button: this, ...args: A) => any
        • (this: this, button: this, ...args: A): any
        • Parameters

          • this: this
          • button: this
          • Rest ...args: A

          Returns any

    • Rest ...args: A

    Returns this

  • Parameters

    • ms: number
    • Optional cb: undefined | ((this: this, button: this) => any)
    • Rest ...args: any[]

    Returns this

  • Type parameters

    • A: any[]

    Parameters

    • ms: number
    • debounce: number
    • cb: (this: this, button: this, ...args: A) => any
        • (this: this, button: this, ...args: A): any
        • Parameters

          • this: this
          • button: this
          • Rest ...args: A

          Returns any

    • Rest ...args: A

    Returns this

  • Parameters

    • ms: number
    • debounce: number
    • Optional cb: undefined | ((this: this, button: this) => any)
    • Rest ...args: any[]

    Returns this

scrollTo

  • scrollTo(child: Component, ms?: undefined | number): void
  • scrollTo(child: Component, offsetTop: number, ms?: undefined | number): void
  • Parameters

    • child: Component
    • Optional ms: undefined | number

    Returns void

  • Parameters

    • child: Component
    • offsetTop: number
    • Optional ms: undefined | number

    Returns void

scrollToNewest

  • scrollToNewest(): void
  • Returns void

Protected sendMessage

  • sendMessage(): boolean
  • Event handler for when the text in the chat box should be sent as a message.

    Returns boolean

sendPinnedMessage

setContents

  • setContents(html: string, escape?: boolean): this
  • Parameters

    • html: string
    • Default value escape: boolean = false

    Returns this

setContextMenu

  • setContextMenu(): this
  • setContextMenu(generator: (contextMenu: ContextMenu) => ContextMenu | undefined, priority?: undefined | number): this

setElement

  • setElement(element: E): this
  • setElement(elementType?: undefined | string, namespace?: Namespace): this
  • Warning: This method will replace the internal element backing this component.

    Only call this directly after constructing the element.

    Parameters

    • element: E

    Returns this

  • Warning: This method will replace the internal element backing this component.

    Only call this directly after constructing the element.

    Parameters

    • Optional elementType: undefined | string
    • Optional namespace: Namespace

    Returns this

setHighlight

setId

  • setId(id: string): this
  • Parameters

    • id: string

    Returns this

setInitialSelection

  • setInitialSelection(initialSelection?: boolean): this
  • Parameters

    • Default value initialSelection: boolean = true

    Returns this

setMaxMessages

  • setMaxMessages(maxMessages: number): this
  • Parameters

    • maxMessages: number

    Returns this

setMessageTimestampMode

  • Parameters

    Returns this

setQuadrant

  • setQuadrant(quadrant: Quadrant, trigger?: boolean): void
  • Changes the quadrant of this element, then emits the ChangeQuadrant event with the parameters being the new quadrant and the old quadrant.

    Does not emit the event if the quadrant is not changing.

    Parameters

    • quadrant: Quadrant
    • Default value trigger: boolean = true

    Returns void

setSelectable

setShouldShowOptionsButton

  • setShouldShowOptionsButton(shouldShow: boolean): this
  • Parameters

    • shouldShow: boolean

    Returns this

setShouldShowSendButton

  • setShouldShowSendButton(shouldShow: boolean): this
  • Parameters

    • shouldShow: boolean

    Returns this

setShouldUnfocusOnSend

  • setShouldUnfocusOnSend(shouldUnfocusOnSend: boolean): this
  • Parameters

    • shouldUnfocusOnSend: boolean

    Returns this

setStyle

  • setStyle(property: string, value: string | number): this
  • Parameters

    • property: string
    • value: string | number

    Returns this

setTooltip

  • setTooltip(initializer?: undefined | ((tooltip: ITooltip) => any), _showOnHover?: boolean): this
  • Parameters

    • Optional initializer: undefined | ((tooltip: ITooltip) => any)
    • Default value _showOnHover: boolean = true

    Returns this

shouldShowOptionsButton

  • shouldShowOptionsButton(): boolean
  • Returns boolean

shouldShowSendButton

  • shouldShowSendButton(): boolean
  • Returns boolean

shouldUnfocusOnSend

  • shouldUnfocusOnSend(): boolean
  • Returns boolean

show

  • show(): this
  • Returns this

siblings

  • siblings<C>(selector?: undefined | string): Stream<C>
  • Type parameters

    Parameters

    • Optional selector: undefined | string

    Returns Stream<C>

store

  • store(): this

toggle

  • toggle(visible?: boolean): this
  • Parameters

    • Default value visible: boolean = this.classes.hasAny("hidden")

    Returns this

unpinMessage

  • Parameters

    Returns Promise<void>

Static all

  • all(selector: string): Stream<Component<HTMLElement>>
  • Parameters

    • selector: string

    Returns Stream<Component<HTMLElement>>

Static append

  • Parameters

    Returns void

Static findDescendants

  • findDescendants(inElement: IComponent | HTMLElement, selector: string, includeSelf?: boolean): HTMLElement[]
  • Parameters

    • inElement: IComponent | HTMLElement
    • selector: string
    • Default value includeSelf: boolean = false

    Returns HTMLElement[]

Static get

  • get(selector: string): Component | undefined
  • get(element: Element): Component
  • get(event: Event): Component
  • get(element: Element | null | false | undefined): Component | undefined
  • get(selector: string, create: false | undefined): Component | undefined
  • get(element: Element, create: false | undefined): Component | undefined
  • get(event: Event, create: false | undefined): Component | undefined
  • get(element: Element | null | false | undefined, create: false | undefined): Component | undefined
  • get<C>(selector: string): C | undefined
  • get<C>(element: Element): C
  • get<C>(event: Event): C
  • get<C>(element: Element | null | false | undefined): C | undefined
  • get<C>(selector: string, create: false | undefined): C | undefined
  • get<C>(element: Element, create: false | undefined): C | undefined
  • get<C>(event: Event, create: false | undefined): C | undefined
  • get<C>(element: Element | null | false | undefined, create: false | undefined): C | undefined
  • Parameters

    • selector: string

    Returns Component | undefined

  • Parameters

    Returns Component

  • Parameters

    Returns Component

  • Parameters

    • element: Element | null | false | undefined

    Returns Component | undefined

  • Parameters

    • selector: string
    • create: false | undefined

    Returns Component | undefined

  • Parameters

    • element: Element
    • create: false | undefined

    Returns Component | undefined

  • Parameters

    • event: Event
    • create: false | undefined

    Returns Component | undefined

  • Parameters

    • element: Element | null | false | undefined
    • create: false | undefined

    Returns Component | undefined

  • Type parameters

    Parameters

    • selector: string

    Returns C | undefined

  • Type parameters

    Parameters

    Returns C

  • Type parameters

    Parameters

    Returns C

  • Type parameters

    Parameters

    • element: Element | null | false | undefined

    Returns C | undefined

  • Type parameters

    Parameters

    • selector: string
    • create: false | undefined

    Returns C | undefined

  • Type parameters

    Parameters

    • element: Element
    • create: false | undefined

    Returns C | undefined

  • Type parameters

    Parameters

    • event: Event
    • create: false | undefined

    Returns C | undefined

  • Type parameters

    Parameters

    • element: Element | null | false | undefined
    • create: false | undefined

    Returns C | undefined

Static getSelectableLayer

  • getSelectableLayer(element: IComponent | HTMLElement): number | false

Static remove

  • Parameters

    Returns void

Static sendChatMessage

  • Parameters

    • sender: Player
    • message: string

    Returns Messages

Generated using TypeDoc