presentation-widget
Augmented.js Presentation Widget Module
API
Table of Contents
Widget
Widgets and small presentation modules
List
List widget - renders a standard list
Parameters
idstring The id of the parent to attach the listdataArray The data to renderorderedboolean True if the list should be orderedbindingstring The binding (used for decorator and optional)
Returns Element Returns a DOM element as a list
DescriptionList
DescriptionList widget - renders a description list
Parameters
idstring The id of the parent to attach the listdataObject The data to renderbindingstring The binding (used for decorator and optional)
Returns Element Returns a DOM element as a description list
DataList
DataList widget - renders a data list
Parameters
idstring The id of the parent to attach the listdataArray The data to renderbindingstring The binding (used for decorator and optional)
Returns Element Returns a DOM element as a data list
Input
Input widget - renders an input or simular based on type
Parameters
fieldobject Field property object (required)namestring The name of the fieldvaluestring The value to presetidstring The id of the fieldrequiredboolean If the field is requiredbindingstring The binding (used for decorator and optional)
Examples
field object format:
{
"description": "Something",
"type": "string", // string, number, integer, boolean, object (can be an array), email, uri, date-time
"minimum": 0,
"maximum": 85,
"format": "email", // optional
"pattern": "[A-Za-z]", // any regex
"value": "bubba",
"enum": [ "something", ... ]
}Returns Element Returns a DOM element as an input