Total.js v3.4.3.
I have released a new version of Total.js framework with great new features and some bug fixes. This version is stable as never before
Highlights
- Total.js is optimized for Node.js
v14
- Improved performance of
RESTBuilder
around 10%
- Improved CSS compiler by adding of compressing uniform colors e.g.
#FFFFFF
to #FFF
- Updated Tangular version to
v4
- Disabled parsing arrays in
query
arguments, all values are string types
New schema type
Now you can define nested
schemas much simpler:
NEWSCHEMA('Orders', function(schema) {
...
...
schema.define('billing', 'street:String(50),number:String(20),city:String(50),zip:String(20)', true);
...
...
});
Verify values asynchronously in schemas
I have added schema.verify()
method which allows you to verify a specific field value asynchronously. Very helpful feature for verifying of values in database. More info in documentation.
Example:
NEWSCHEMA('Users', function(schema) {
schema.define('countryid', 'Upper(3)', true);
...
...
...
// Performs verification of the specific field when the schema is validating
schema.verify('countryid', function($) {
DBMS().one('cl_country').where('id', $.value).error('error-country').callback(function(err, response) {
if (err)
$.invalid(err);
else
$.success();
});
});
});
Bug fixes
- Fixed phone validation
- Fixed rouding in
Number.VAT()
by Tomas Novak
- Fixed
PATCH
method in $ACTION()
- Fixed resizing of images in
debug
mode
- Fixed localization utility in Total.js executable app
- Fixed a problem with spaces in
ROUTE()
method