Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "TrivialCore"

Index

Type aliases

EditingMode

EditingMode: "editable" | "disabled" | "readonly"

HighlightDirection

HighlightDirection: number | null | undefined

Match

Match: object

Type declaration

  • Optional distance?: number
  • length: number
  • start: number

MatchingOptions

MatchingOptions: object

Type declaration

  • Optional ignoreCase?: boolean
  • Optional matchingMode?: "contains" | "prefix" | "prefix-word" | "prefix-levenshtein" | "levenshtein"
  • Optional maxLevenshteinDistance?: number

NavigationDirection

NavigationDirection: "up" | "left" | "down" | "right"

QueryFunction

QueryFunction: function

A function used to retrieve the entries ("suggestions") to be displayed in the dropdown box. Does not return any result. The entries need to be provided via the resultCallback function.

param

the text currently entered by the user

param

the callback function to call with the entries to display in the dropdown

Type declaration

    • Parameters

      Returns void

RenderingFunction

RenderingFunction: function

Used to render an entry.

param

the entry to render

returns

HTML string

Type declaration

    • (entry: E): string
    • Parameters

      • entry: E

      Returns string

ResultCallback

ResultCallback: function

Type declaration

    • (entries: E[]): void
    • Parameters

      • entries: E[]

      Returns void

Functions

createProxy

  • createProxy(delegate: any): any

customTreeQueryFunctionFactory

  • customTreeQueryFunctionFactory(topLevelEntries: any[], childrenPropertyName: string, expandedPropertyName: string, customNodeMatchingFunction: function): (Anonymous function)
  • Parameters

    • topLevelEntries: any[]
    • childrenPropertyName: string
    • expandedPropertyName: string
    • customNodeMatchingFunction: function
        • (entry: any, queryString: string, nodeDepth: number): boolean
        • Parameters

          • entry: any
          • queryString: string
          • nodeDepth: number

          Returns boolean

    Returns (Anonymous function)

defaultEntryMatchingFunctionFactory

  • defaultEntryMatchingFunctionFactory(searchedPropertyNames: string[], matchingOptions: MatchingOptions): (Anonymous function)

defaultListQueryFunctionFactory

defaultTreeQueryFunctionFactory

  • defaultTreeQueryFunctionFactory(topLevelEntries: any[], entryMatchingFunction: Function, childrenPropertyName: string, expandedPropertyName: string): (Anonymous function)
  • Parameters

    • topLevelEntries: any[]
    • entryMatchingFunction: Function
    • childrenPropertyName: string
    • expandedPropertyName: string

    Returns (Anonymous function)

escapeSpecialRegexCharacter

  • escapeSpecialRegexCharacter(s: string): string

minimallyScrollTo

  • minimallyScrollTo(element: JQuery | Element | string, target: JQuery | Element | string): void
  • Parameters

    • element: JQuery | Element | string
    • target: JQuery | Element | string

    Returns void

objectEquals

  • objectEquals(x: any, y: any): boolean

selectElementContents

  • selectElementContents(domElement: Node, start: number, end: number): void
  • Parameters

    • domElement: Node
    • start: number
    • end: number

    Returns void

setTimeoutOrDoImmediately

  • setTimeoutOrDoImmediately(f: Function, delay?: number): number
  • Parameters

    • f: Function
    • Optional delay: number

    Returns number

trivialMatch

  • Parameters

    • text: string
    • searchString: string
    • Optional options: MatchingOptions

      matchingMode: 'prefix', 'prefix-word', 'contain', 'prefix-levenshtein', 'levenshtein'; ignoreCase: boolean maxLevenshteinDistance: integer (number) - only for levenshtein

    Returns Match[]

    array of matchers {start, length, distance}

wrapWithDefaultTagWrapper

  • wrapWithDefaultTagWrapper(entryHtml: string): string

Object literals

DEFAULT_RENDERING_FUNCTIONS

DEFAULT_RENDERING_FUNCTIONS: object

currency2Line

currencySingleLineLong

currencySingleLineShort

icon2Lines

iconSingleLine

image2Lines

roundImage2LinesColorBubble

singleLine

DEFAULT_TEMPLATES

DEFAULT_TEMPLATES: object

defaultNoEntriesTemplate

defaultNoEntriesTemplate: string = `<div class="tr-default-no-data-display"><div>No matching entries...</div></div>`

defaultSpinnerTemplate

defaultSpinnerTemplate: string = `<div class="tr-default-spinner"><div class="spinner"></div><div>Fetching data...</div></div>`

keyCodes

keyCodes: object

alt

alt: number = 18

backspace

backspace: number = 8

caps_lock

caps_lock: number = 20

ctrl

ctrl: number = 17

delete

delete: number = 46

down_arrow

down_arrow: number = 40

end

end: number = 35

enter

enter: number = 13

escape

escape: number = 27

home

home: number = 36

insert

insert: number = 45

left_arrow

left_arrow: number = 37

left_window_key

left_window_key: number = 91

num_lock

num_lock: number = 144

numberKeys

numberKeys: number[] = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105]

page_down

page_down: number = 34

page_up

page_up: number = 33

pause

pause: number = 19

right_arrow

right_arrow: number = 39

right_window_key

right_window_key: number = 92

scroll_lock

scroll_lock: number = 145

select_key

select_key: number = 93

shift

shift: number = 16

space

space: number = 32

specialKeys

specialKeys: number[] = [8, 9, 13, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 91, 92, 93, 144, 145]

tab

tab: number = 9

up_arrow

up_arrow: number = 38

isDigitKey

  • isDigitKey(keyCode: number): boolean

isModifierKey

  • isModifierKey(e: KeyboardEvent): boolean

isSpecialKey

  • isSpecialKey(keyCode: number): boolean

Generated using TypeDoc