Class: ExportButtonModel

ExportButtonModel

new ExportButtonModel(){void}

modules/snippets/exportButton/model.js, line 25
creates a downloadable Blob from Objects / ObjectArrays and appends them to a "download"-button
Properties:
Name Type Default Description
tag string button name
rawData= string origin data as json string
filename string name of the file
fileExtension string
data object data for export

Extends

Methods

inherited checkSnippetInfos(snippetInfos, name){void}

modules/snippets/model.js, line 40
Checks if info text is available and sets it
Name Type Description
snippetInfos object [description]
name string [description]

convertJsonToCsv(data){void}

modules/snippets/exportButton/model.js, line 65
converts the original data to csv and triggers conversion to blob
Name Type Description
data * the original data, taken from constructor if not defined otherwise

convertRawData(){void}

modules/snippets/exportButton/model.js, line 45
triggers the conversion of input data depending on the data type

inherited deselectValueModels(){void}

modules/snippets/model.js, line 68
Deselects all value models in the values collection

inherited extentBaseModel(obj){object}

modules/snippets/model.js, line 79
Extent Object with new ValueModel
Name Type Description
obj object Object to be extended
Returns:
extended Object

generateFilename(){string}

modules/snippets/exportButton/model.js, line 103
generates the filename based on construction paramters and current date

inherited hasSelectedValues(){boolean}

modules/snippets/model.js, line 58
Returns true if any of the value models is selected

htmlToCanvas(){void}

modules/snippets/exportButton/model.js, line 136
converts the specified html element to a canvas and prepares it for download
Fires:
  • event:#download

prepareForExport(){void}

modules/snippets/exportButton/model.js, line 115
triggers the data conversion and button rendering on view
Fires:
  • event:#render

refineObject(data){Array.<object>}

modules/snippets/exportButton/model.js, line 88
converts an object to an array
Name Type Description
data object the input data
Returns:
converted array

inherited removeView(){void}

modules/snippets/model.js, line 50
Trigger removeView

inherited setAttr(value){void}

modules/snippets/model.js, line 116
Setter for attr
Name Type Description
value string attr

setData(data, type){void}

modules/snippets/exportButton/model.js, line 127
Converts an arbitrary object to Blob and stores it for download
Name Type Description
data * the object to convert to Blob
type string the type of the input object

inherited setDisplayName(value){void}

modules/snippets/model.js, line 144
Setter for displayName
Name Type Description
value string displayName

inherited setId(value){void}

modules/snippets/model.js, line 98
Setter for id
Name Type Description
value string id

inherited setName(value){void}

modules/snippets/model.js, line 107
Setter for name
Name Type Description
value string name

inherited setPreselectedValues(value){void}

modules/snippets/model.js, line 126
Setter for preselectedValues
Name Type Description
value string preselectedValues

inherited setType(value){void}

modules/snippets/model.js, line 135
Setter for type
Name Type Description
value string type

inherited setValues(value){void}

modules/snippets/model.js, line 162
Setter for values
Name Type Description
value string values

inherited setValuesCollection(value){void}

modules/snippets/model.js, line 153
Setter for valuesCollection
Name Type Description
value string valuesCollection

inherited superInitialize(){void}

modules/snippets/model.js, line 26
Initialize after Child-Initialize

inherited triggerValuesChanged(model, value){void}

modules/snippets/model.js, line 89
Trigger valuesChanged to children
Name Type Description
model object Model to be transmitted
value string Value to be transmitted