Hierarchy

  • LitElement
    • Widget

Constructors

  • Returns Widget

Properties

authors: boolean
changed: boolean = false
channel: string
choices: IChoiceItem[]
dataId: string
dateTimeFormatter: ((__namedParameters) => string) = formatDateTime

Type declaration

    • (__namedParameters): string
    • Formats timestamp

      Parameters

      • __namedParameters: {
            format: any;
            lang: any;
            time: any;
        }
        • format: any
        • lang: any
        • time: any

      Returns string

      Since

      2.43.1

      Argument

      object of type {time, format, lang}

firstInteractionTime: Date = null
hide_dismiss_button: boolean = false
initialLoad: boolean = false
interacted: boolean = false
interaction: IWidgetInteraction = null
interactions: IWidgetInteraction[] = null
interactiveUntilTimerTimeout: any
isInteractable: boolean = true
isStockWidget: boolean
kind: any
lang: any
mode: any
options: IOptionItem[]
phase: Phase = Phase.READY
programid: string
question: string
reactions: any
reply: string
selectedOption: any = {}
syntheticIncrement: boolean = false
timeformat: any
timeout: any
timestamps: boolean
vote: {
    id?: string;
    url: string;
    votes?: any;
} = null

Type declaration

  • Optional id?: string
  • url: string
  • Optional votes?: any
voteDisable: any
widgetPayload: IWidgetPayload

Accessors

  • get disabled(): boolean
  • Returns boolean

  • set disabled(val): void
  • Parameters

    • val: boolean

    Returns void

Methods

  • Parameters

    • e: any

    Returns void

  • Returns void

  • Parameters

    • url: any
    • Optional data: Object

    Returns Promise<any>

  • Returns void

  • Returns void

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    Returns Promise<void>

    Since

    1.18.0

  • Returns void

  • Parameters

    • Optional voteCount: number

    Returns void

  • Returns void

  • Optional timeout argument. If no timeout arg passed, widget.widgetPayload.timeout is used. Initiates timer countdown, allows interaction/voting. Resolves when timer duration elapses. widget.phase = 'interactive'

    Parameters

    Returns Promise<void>

    Since

    1.18.0

  • Parameters

    • key: string
    • Optional variables: Object

    Returns any

  • Returns void

  • Parameters

    • e: any

    Returns void

  • Fires rankchange event when user profile's rank updates

    Parameters

    Returns void

    Fires

    rankchange

  • Widget ready state. widget.phase = 'ready'.

    Parameters

    Returns Promise<void>

    Since

    1.18.0

  • Parameters

    • Optional evt: string

    Returns Promise<void>

  • Returns void

  • Timer is removed, widget is disabled, widget vote/answers are shown. Resolves when timer duration elapses. If program rewards_type is either 'points' or 'badges' and user has interacted with widget, user points received are displayed. If program rewards_type is 'badges' and user has interacted with widget and user has received a new badge, the new badge is displayed. widget.phase = 'results' widget.disabled = true

    Parameters

    Returns Promise<void>

    Since

    1.18.0

  • Returns boolean

  • Returns void

  • Parameters

    • option: any

    Returns void

  • Parameters

    • url: any
    • data: any

    Returns Promise<any>

  • Parameters

    • changedProps: any

    Returns void

  • Parameters

    • url: string
    • type: "post" | "patch"
    • Optional data: Object

    Returns Promise<any>

  • Parameters

    • e: any

    Returns void

  • Returns Promise<void>

Generated using TypeDoc