Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LitElement
    • Widget

Index

Constructors

constructor

  • Returns Widget

Properties

authors

authors: boolean

changed

changed: boolean = false

channel

channel: string

choices

choices: IChoiceItem[]

Readonly dataId

dataId: string

firstInteractionTime

firstInteractionTime: Date = null

hide_dismiss_button

hide_dismiss_button: boolean = false

initialLoad

initialLoad: boolean = false

interacted

interacted: boolean = false

interaction

interaction: IWidgetInteraction = null

interactions

interactions: IWidgetInteraction[] = null

interactiveUntilTimerTimeout

interactiveUntilTimerTimeout: any

isInteractable

isInteractable: boolean = true

isStockWidget

isStockWidget: boolean

kind

kind: any

lang

lang: any

mode

mode: any

options

options: IOptionItem[]

phase

phase: Phase = Phase.READY

Readonly programid

programid: string

question

question: string

reactions

reactions: any

reply

reply: string

selectedOption

selectedOption: any = {}

syntheticIncrement

syntheticIncrement: boolean = false

timeformat

timeformat: any

timeout

timeout: any

timestamps

timestamps: boolean

vote

vote: { id?: string; url: string; votes?: any } = null

Type declaration

  • Optional id?: string
  • url: string
  • Optional votes?: any

voteDisable

voteDisable: any

widgetPayload

widgetPayload: IWidgetPayload

Accessors

disabled

  • get disabled(): boolean
  • set disabled(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

Methods

answerCountChanged

  • answerCountChanged(e: any): void
  • Parameters

    • e: any

    Returns void

connectedCallback

  • connectedCallback(): void
  • Returns void

createVote

  • createVote(url: any, data?: Object): Promise<any>
  • Parameters

    • url: any
    • Optional data: Object

    Returns Promise<any>

detach

  • detach(): void
  • Returns void

disconnectedCallback

  • disconnectedCallback(): void
  • Returns void

dismiss

  • dismiss(): Promise<void>
  • Returns Promise<void>

expire

  • expire(): Promise<void>
  • Returns Promise<void>

finished

firstUpdated

  • firstUpdated(): void
  • Returns void

interactionEvent

  • interactionEvent(voteCount?: number): void
  • Parameters

    • Optional voteCount: number

    Returns void

interactionTrack

  • interactionTrack(): void
  • Returns void

interactive

  • 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'

    since

    1.18.0

    Parameters

    Returns Promise<void>

localize

  • localize(key: string, variables?: Object): any
  • Parameters

    • key: string
    • Optional variables: Object

    Returns any

lockInVote

  • lockInVote(): void
  • Returns void

onResults

  • onResults(e: any): void
  • Parameters

    • e: any

    Returns void

rankChanged

  • rankChanged(widget: any, rewards: IReward[]): void
  • Fires rankchange event when user profile's rank updates

    fires

    rankchange

    Parameters

    Returns void

ready

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

    since

    1.18.0

    Parameters

    Returns Promise<void>

removeListener

  • removeListener(evt?: string): Promise<void>
  • Parameters

    • Optional evt: string

    Returns Promise<void>

resultEvent

  • resultEvent(): void
  • Returns void

results

  • 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

    since

    1.18.0

    Parameters

    Returns Promise<void>

shouldUpdate

  • shouldUpdate(): boolean
  • Returns boolean

startInteractiveUntilTimer

  • startInteractiveUntilTimer(): void
  • Returns void

submitVote

  • submitVote(option: any): void
  • Parameters

    • option: any

    Returns void

updateVote

  • updateVote(url: any, data: any): Promise<any>
  • Parameters

    • url: any
    • data: any

    Returns Promise<any>

updated

  • updated(changedProps: any): void
  • Parameters

    • changedProps: any

    Returns void

voteBase

  • voteBase(url: string, type: "post" | "patch", data?: Object): Promise<any>
  • Parameters

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

    Returns Promise<any>

voteCountChanged

  • voteCountChanged(e: any): void
  • Parameters

    • e: any

    Returns void

widgetDismissClick

  • widgetDismissClick(): Promise<void>
  • Returns Promise<void>

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Property
  • Method
  • Accessor
  • Interface
  • Interface with type parameter
  • Enumeration
  • Inherited constructor

Generated using TypeDoc