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.IO it’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 instantBind in API docs. Pull request #180

  • Disable DatePicker validation

    There were several problems related to the invalidText property 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 of invalidText on a DatePicker widget.

  • Match at word boundaries in AutoComplete

    By default, the AutoComplete using LCResourceHandler finds 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 of LCResourceHandler. 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 the 6th 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 expectedResponseType is set to json:

    • the response body is parsed to json whatever the http status code
    • responseJSON is 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 options list in Select and SelectBox widgets.

  • Id constraints in section fulfill html4 recommendations

    We can only use alphanumeric characters when defining id in 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 onmousewheel callback in on statements.

  • 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 $prefix is true, every rule is prefixed so that it only applies to the template it is linked to. When $prefix is false CSS selector applies to the whole page, use it only when required to use features like ( @font-face and @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, PATCH requests to a RESTful server.

  • Close on click for dialog

    The dialog can now be closed by clicking outside of it, if the closeOnMouseClick attribute 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.GlobalStyle if 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 substitute method in aria.utils.String to 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 embed library. 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 sessionStorage and localStorage.

  • 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 getRequestJsonSerializerCfg method on this object has been removed. Please use aria.modules.requestHandler.environment.RequestHandler.getRequestJsonSerializerCfg instead.

  • 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 = true in 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 the verticalAlign property.

  • Methods of aria.templates.DomElementWrapper, deprecated in 1.1-24

    The following methods of class aria.templates.DomElementWrapper are deprecated:

    getExpando (use getData instead)

    setClassName (use classList.setClassName instead)

    getClassName (use classList.getClassName instead)

  • ‘_’ for expandos, deprecated in 1.1-18

    The _ usage is deprecated for the expando data. Please use the dataset html attribute instead (i.e. use data-foo instead of _foo in HTML and then use getData() instead of getExpando() to retrieve it from script).

  • CalendarRes resources moved, deprecated in 1.1-24

    The aria.widgets.calendar.CalendarRes resource was moved to aria.resources.CalendarRes. Also, the selectedDay key no longer exists in the new classpath, it was replaced with selectedDate.

  • TemplateCtxt.createId() method, deprecated before 1.1

    The createId() method was removed from TemplateCtxt. Please use $getId() instead.

  • customizationsChanged event, deprecated before 1.1

    The customizationsChanged event was removed from aria.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, defaultContentTypeHeader are now deprecated in favor of a simpler JSON object headers.

  • aria.core.CfgBeans.IOAsyncRequestCfg

    postData is used to send data in the body of POST method which is now deprecated, use data instead. postHeader is used to set header Content-type for POST requests which is now deprecated, use headers instead

  • aria.utils.FormatFactory

    Format Factory is a utility class used to format dates, it is now deprecated and shouldn’t be used anymore.

Leave a Reply

Your email address will not be published. Required fields are marked *