Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "renderer/utils"

Index

Variables

Const uniqueId

uniqueId: function = (function () {// side effect but just within the function itself, so good for the librarylet idCounter = 0;return (prefix: string) => `${prefix}${(idCounter++).toString(36)}`;})()

Type declaration

    • (prefix: string): string
    • Parameters

      • prefix: string

      Returns string

Functions

adaptDynamicColorToBgColor

  • adaptDynamicColorToBgColor(node: HTMLElement, bgColor: string, title: string, width: number): void
  • Parameters

    • node: HTMLElement
    • bgColor: string
    • title: string
    • width: number

    Returns void

adaptTextColorToBgColor

  • adaptTextColorToBgColor(bgColor: string): string
  • Parameters

    • bgColor: string

    Returns string

    returns black or white for best contrast

colorOf

  • colorOf(col: Column): string

exampleText

forEach

  • forEach<T>(node: Element, selector: string, callback: function): void
  • Type parameters

    • T: Element

    Parameters

    • node: Element
    • selector: string
    • callback: function
        • (d: T, i: number): void
        • Parameters

          • d: T
          • i: number

          Returns void

    Returns void

forEachChild

  • forEachChild<T>(node: Element, callback: function): void
  • Type parameters

    • T: Element

    Parameters

    • node: Element
    • callback: function
        • (d: T, i: number): void
        • Parameters

          • d: T
          • i: number

          Returns void

    Returns void

matchColumns

  • matchColumns(node: HTMLElement, columns: object[], ctx: IRenderContext): void

multiLevelGridCSSClass

  • multiLevelGridCSSClass(idPrefix: string, column: Column): string

noop

  • noop(): void

setText

  • setText<T>(node: T, text: undefined | string): T
  • Type parameters

    • T: Node

    Parameters

    • node: T
    • Optional text: undefined | string

    Returns T

wideEnough

  • wideEnough(col: IArrayColumn<any>, length?: number): boolean

wideEnoughCat

Object literals

Const noRenderer

noRenderer: object

template

template: string = `<div></div>`

update

update: function = <() => void>noop

Type declaration

    • (): void
    • Returns void