Aria Templates 1.3.1
Aria Templates 1.3.1 is finally available for the community. As usual you can get if from github 1.3.1, our website or npm.
Few words on our release process and versioning first.
We usually release a stable version every 3 weeks. Each of this versions comes with new features and bugfixes. Version number is compatible with node-semver, so it’s something like 1.2.7 (major.minor.patch).
On every release we increase the patch number even if we introduce new functionality, but we guarantee that this new version is fully compatible with any other release having the same major.minor numbers. You can safely update Aria Templates without having to change a single line of code.
Today we’re increasing the minor number as we’re removing some deprecated features and changing default values. Everything we remove was already deprecated long time ago, so it’s generally safe to upgrade if you don’t have any error/warning in your console.
As this article is the first of its kind I’ll talk about any change that happened between 1.2.0 and 1.3.1. From now on, you’ll see a blog article for each and every release.
New features
- IO Request headers
Thanks to some refactoring on
aria.core.IOit’s now possible to specify a list of headers to be sent with every request. More information on pull request #216 - History API for HTML4/HTML5 browsers
Introducing the history api inside aria templates for html5 browsers and with the hash mechanism for html4 browsers. More information on pull request #222
- Instant bind for MultiSelect
Now it is possible to see the refreshed value of MultiSelect (and have onchange callback fired) after each click on one of the options, without waiting for the user to close the dropdown. Look for
instantBindin API docs. Pull request #180 - Disable DatePicker validation
There were several problems related to the
invalidTextproperty of an input widget which impacted on the ability to disable DatePicker validation. These issues have now been resolved and around 30 new test cases have been added to better support the behavior ofinvalidTexton a DatePicker widget. - Match at word boundaries in AutoComplete
By default, the AutoComplete using
LCResourceHandlerfinds only the matches which share the whole substring at the beginning with what the user has typed (so, typing “France” will not find the entry “Air France”). From now, it’s possible to change this behavior by passing{ labelMatchAtWordBoundaries : true }to the constructor ofLCResourceHandler. Pull request #186 - DatePicker input format
DatePicker widget is able to parse input values according to an user specified format. When the specified format is
yy-MMM/d, “12-jul/6″ is parsed into the6th of July 2012. Pull request #193 - Parsing of JSON response before calling the filters and whatever the http status code
Adds the following features when
expectedResponseTypeis set tojson:- the response body is parsed to json whatever the http status code
responseJSONis set before calling filters.
Pull request #192
- Placeholder widget refresh
It is now possible to refresh the content of a placeholder widget.
- Bindable options list in Select and SelectBox
Adds the possibility to bind
optionslist in Select and SelectBox widgets. - Id constraints in section fulfill html4 recommendations
We can only use alphanumeric characters when defining
idin a section. This feature add the possibility to use any character allowed in html4 recommentations. For more details about html4 id recommendations look at recommendations - Focus after refresh
There is now a template API for setting and getting focus, also the focus method has been modified to accept an array containing a widget id and template ids forming the focused widget path.
- Support Mousewheel Callback
Support
onmousewheelcallback inonstatements. - Widget Class Refactoring
This provides a way to extend a widget from the AriaLib without creating a new configuration bean even if the developer doesn’t change the configuration accepted by the widget.
- Global unprefixed css template
This helps to write global CSS containing media types and still benefit from the templating engine. If
$prefixistrue, every rule is prefixed so that it only applies to the template it is linked to. When$prefixisfalseCSS selector applies to the whole page, use it only when required to use features like (@font-faceand@keyframes), avoid otherwise, to limit CSS class name collisions. - Calls to REST API in aria.core.IO
This feature allows users to make
PUT,DELETE,HEAD,TRACE,OPTIONS,CONNECT,PATCHrequests to a RESTful server. - Close on click for dialog
The dialog can now be closed by clicking outside of it, if the
closeOnMouseClickattribute is set to true. Pull request #119 - Reload of parent template
give the possibility to reload parent templates of a specific template providing a classpath to the method
unloadtemplate. Pull request #121 - CSS macro libraries
Macro libraries (a new flavor) can now be used in CSS templates. Pull request #123
- Configurable Event callback
Define a way to optionally specify the position of the callback arguments in the callback function or whether the event should be passed or not. Pull request #92
- LCResources Handler Improvements.
Now it is possible to configure any key/value as label and code in
LCResourceHandler. Now its possible to use same data model as options for both Select and Autocomplete widget. Pull request #115. - Event listeners on section
Now it is possible to define browser events on AT sections. Pull request #109.
- Splitting aria.widgets.GlobalStyle (phase 1)
This is the first part of a change to avoid depending on
aria.widgets.GlobalStyleif no widget from the AriaLib is used. Pull request #114. - Reload of template resources
When the unload template is called the resources are also reloaded. Pull request #112.
- String substitution in
aria.utils.String
Add a
substitutemethod inaria.utils.Stringto replace and format a string with placeholders. This method is used also to format logs. Pull request #41 - Placeholder widget
The placeholder widget has been created in the
embedlibrary. It allows to create containers with configurable contents. - Resizable Popup
Now the dialog can be resized by dragging any of the corners.
- Map widget
Aria Templates allows to use a Map widget. The only supported provider, at the moment, is Microsoft Bing 7 map. Nevertheless, it is possible to add and customize different providers.
- Storage API
This item provides a generic, cross browser interface to persistent storage API, like
sessionStorageandlocalStorage. - Splitter
Now it’s possible to drag splitter widget horizontally.
- Customizing SubmitJsonRequest POST payload
It is now possible for developers to customize the way the serialized JSON is inserted into the body of a request.
New tools
- Notepad++ Syntax Highlighter
Highlight your TPL / CSS / TML / CML from Notepad++. It comes with folding and two different color themes.
- Bundle Analyzer
Creates a report on the classes’ usage inside bundles. More information and usage on API docs.
Removed features
- aria.modules.environment.Environment.getRequestJsonSerializerCfg, deprecated in 1.2.0
The
getRequestJsonSerializerCfgmethod on this object has been removed. Please usearia.modules.requestHandler.environment.RequestHandler.getRequestJsonSerializerCfginstead. - Widget vertical alignment, introduced in 1.1-24
The default vertical alignment of the widgets is middle from now. If you’ve set
widgetSettings.middleAlignment = truein the application environment, you can remove that setting. If you want to change the new default behavior, you may set it at widget level with theverticalAlignproperty. - Methods of
aria.templates.DomElementWrapper, deprecated in 1.1-24
The following methods of class
aria.templates.DomElementWrapperare deprecated:getExpando (use
getDatainstead)setClassName (use
classList.setClassNameinstead)getClassName (use
classList.getClassNameinstead) - ‘_’ for expandos, deprecated in 1.1-18
The
_usage is deprecated for the expando data. Please use thedatasethtml attribute instead (i.e. usedata-fooinstead of_fooin HTML and then usegetData()instead ofgetExpando()to retrieve it from script). - CalendarRes resources moved, deprecated in 1.1-24
The
aria.widgets.calendar.CalendarResresource was moved toaria.resources.CalendarRes. Also, theselectedDaykey no longer exists in the new classpath, it was replaced withselectedDate. TemplateCtxt.createId()method, deprecated before 1.1
The
createId()method was removed fromTemplateCtxt. Please use$getId()instead.customizationsChangedevent, deprecated before 1.1
The
customizationsChangedevent was removed fromaria.core.AppEnvironment.- Private methods, deprecated before 1.1
The following protected/private methods have been removed:
aria.utils.Number._isValidNumber()aria.core.ResMgr.__getModuleResourceSetClassPath()
Deprecated features
We also decided to deprecate some features. They can still be used but will be removed in the next minor update (1.4.0)
- Request headers
Inside
aria.core.IO,useXHRHeader,defaultXHRHeader,useDefaultPostHeader,defaultPostHeader,useDefaultContentTypeHeader,defaultContentTypeHeaderare now deprecated in favor of a simpler JSON objectheaders. aria.core.CfgBeans.IOAsyncRequestCfg
postDatais used to send data in the body of POST method which is now deprecated, use data instead.postHeaderis used to set headerContent-typeforPOSTrequests which is now deprecated, useheadersinsteadaria.utils.FormatFactory
Format Factory is a utility class used to format dates, it is now deprecated and shouldn’t be used anymore.
