Module

lifeCycle

Contains methods related to life cycle data of the widget.

The life cyle of a widget pass for the following steps:

  1. Set the widget in loading view
  2. Call the requests
  3. Validate the requests
  4. Normalize the data
  5. Process the data
  6. Validate the process
  7. Render the data

View Source mixins/lifeCycle.js, line 3

Methods

# getData()

Get the data structure of the widget.

View Source mixins/lifeCycle.js, line 55

  • Data structure.

# getStats()

Show stats of the widget.

View Source mixins/lifeCycle.js, line 72

# refresh()

Process the whole life cycle to draw a widget.

View Source mixins/lifeCycle.js, line 80

# render() → {any}

Render the data in the widget. To be defined in each widget.

View Source mixins/lifeCycle.js, line 396

any

# setData(data)

Set the data to the widget from outside of the request process.

Parameters:
Name Type Description
data Array

Data to use in the widget.

View Source mixins/lifeCycle.js, line 46

# setLoadingVisibility(bool)

Set the visibility of the loading icon.

Parameters:
Name Type Description
bool boolean

True for see loading, false to hide it.

View Source mixins/lifeCycle.js, line 64

# setRequests(requests, bindChangeopt)

Set the requests objects

Parameters:
Name Type Attributes Default Description
requests Array

Array of request to perform

bindChange boolean <optional>
false

Subscribe to the Request "change".

View Source mixins/lifeCycle.js, line 32