Skip to content

Commit

Permalink
chore(all): prepare-release 0.2.4
Browse files Browse the repository at this point in the history
Release 0.2.4 is a small release which  introduced support setting up validation using BreezeJS or @Ensure decorator syntax
  • Loading branch information
janvanderhaegen committed May 2, 2015
1 parent 01aacab commit daee127
Show file tree
Hide file tree
Showing 67 changed files with 3,540 additions and 4,345 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-validation",
"version": "0.2.3",
"version": "0.2.4",
"description": "A validation plugin for Aurelia.",
"keywords": [
"aurelia",
Expand Down
14 changes: 11 additions & 3 deletions build/babel-options.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
module.exports = {
modules: 'system',
filename: '',
filenameRelative: '',
modules: '',
sourceMap: true,
sourceMapName: '',
sourceRoot: '',
moduleRoot: '',
moduleIds: false,
experimental: false,
comments: false,
compact: false,
code:true,
stage:2,
loose: "all",
optional: [
"es7.decorators",
"es7.classProperties"
"es7.decorators"
]
};
53 changes: 8 additions & 45 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,20 @@ define(['exports', './validation/validation-config', './validation/validation',

var _defaults = function (obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; };

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.configure = configure;
Object.defineProperty(exports, 'Utilities', {
enumerable: true,
get: function get() {
return _validationUtilities.Utilities;
}
});
Object.defineProperty(exports, 'ValidationConfig', {
enumerable: true,
get: function get() {
return _validationValidationConfig.ValidationConfig;
}
});
Object.defineProperty(exports, 'ValidationLocale', {
enumerable: true,
get: function get() {
return _validationValidationLocale.ValidationLocale;
}
});
exports.Utilities = _validationUtilities.Utilities;
exports.ValidationConfig = _validationValidationConfig.ValidationConfig;
exports.ValidationLocale = _validationValidationLocale.ValidationLocale;

_defaults(exports, _interopRequireWildcard(_validationValidationResult));

_defaults(exports, _interopRequireWildcard(_validationValidationRules));

Object.defineProperty(exports, 'Validation', {
enumerable: true,
get: function get() {
return _validationValidation.Validation;
}
});
Object.defineProperty(exports, 'ValidateCustomAttribute', {
enumerable: true,
get: function get() {
return _validationValidateCustomAttribute.ValidateCustomAttribute;
}
});
Object.defineProperty(exports, 'ValidateCustomAttributeViewStrategy', {
enumerable: true,
get: function get() {
return _validationValidateCustomAttributeViewStrategy.ValidateCustomAttributeViewStrategy;
}
});
Object.defineProperty(exports, 'ensure', {
enumerable: true,
get: function get() {
return _validationDecorators.ensure;
}
});
exports.Validation = _validationValidation.Validation;
exports.ValidateCustomAttribute = _validationValidateCustomAttribute.ValidateCustomAttribute;
exports.ValidateCustomAttributeViewStrategy = _validationValidateCustomAttributeViewStrategy.ValidateCustomAttributeViewStrategy;
exports.ensure = _validationDecorators.ensure;

function configure(aurelia, configCallback) {

Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/de-DE.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/en-US.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/es-MX.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/fr-FR.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/nl-BE.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/nl-NL.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/sv-SE.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
4 changes: 1 addition & 3 deletions dist/amd/resources/tr-TR.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['exports', '../validation/utilities'], function (exports, _validationUtilities) {
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var data = {
settings: {
numericRegex: /^-?(?:\d+)(?:\,\d+)?$/
Expand Down
33 changes: 13 additions & 20 deletions dist/amd/validation/debouncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ define(['exports', '../validation/validation'], function (exports, _validationVa

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

var Debouncer = (function () {
function Debouncer(debounceTimeout) {
Expand All @@ -17,22 +13,19 @@ define(['exports', '../validation/validation'], function (exports, _validationVa
this.debounceTimeout = debounceTimeout;
}

_createClass(Debouncer, [{
key: 'debounce',
value: function debounce(func) {
var _this = this;

this.currentFunction = func;
setTimeout(function () {
if (func !== null && func !== undefined) {
if (func === _this.currentFunction) {
_this.currentFunction = null;
func();
}
Debouncer.prototype.debounce = function debounce(func) {
var _this = this;

this.currentFunction = func;
setTimeout(function () {
if (func !== null && func !== undefined) {
if (func === _this.currentFunction) {
_this.currentFunction = null;
func();
}
}, this.debounceTimeout);
}
}]);
}
}, this.debounceTimeout);
};

return Debouncer;
})();
Expand Down
64 changes: 26 additions & 38 deletions dist/amd/validation/decorators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ define(["exports"], function (exports) {

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.__esModule = true;
exports.ensure = ensure;

var ValidationMetadata = (function () {
Expand All @@ -17,26 +13,22 @@ define(["exports"], function (exports) {
this.properties = [];
}

_createClass(ValidationMetadata, [{
key: "getOrCreateProperty",
value: function getOrCreateProperty(propertyName) {
var property = this.properties.find(function (x) {
return x.propertyName === propertyName;
});
if (property === undefined) {
property = new ValidationPropertyMetadata(propertyName);
this.properties.push(property);
}
return property;
}
}, {
key: "setup",
value: function setup(validation) {
this.properties.forEach(function (property) {
property.setup(validation);
});
ValidationMetadata.prototype.getOrCreateProperty = function getOrCreateProperty(propertyName) {
var property = this.properties.find(function (x) {
return x.propertyName === propertyName;
});
if (property === undefined) {
property = new ValidationPropertyMetadata(propertyName);
this.properties.push(property);
}
}]);
return property;
};

ValidationMetadata.prototype.setup = function setup(validation) {
this.properties.forEach(function (property) {
property.setup(validation);
});
};

return ValidationMetadata;
})();
Expand All @@ -49,20 +41,16 @@ define(["exports"], function (exports) {
this.setupSteps = [];
}

_createClass(ValidationPropertyMetadata, [{
key: "addSetupStep",
value: function addSetupStep(setupStep) {
this.setupSteps.push(setupStep);
}
}, {
key: "setup",
value: function setup(validation) {
validation.ensure(this.propertyName);
this.setupSteps.forEach(function (setupStep) {
setupStep(validation);
});
}
}]);
ValidationPropertyMetadata.prototype.addSetupStep = function addSetupStep(setupStep) {
this.setupSteps.push(setupStep);
};

ValidationPropertyMetadata.prototype.setup = function setup(validation) {
validation.ensure(this.propertyName);
this.setupSteps.forEach(function (setupStep) {
setupStep(validation);
});
};

return ValidationPropertyMetadata;
})();
Expand Down
Loading

0 comments on commit daee127

Please sign in to comment.