aurelia-validation
Advanced tools
Comparing version 0.12.4 to 0.12.5
{ | ||
"name": "aurelia-validation", | ||
"version": "0.12.4", | ||
"version": "0.12.5", | ||
"description": "Validation for Aurelia applications", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -38,3 +38,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
ValidationParser.prototype.getAccessorExpression = function (fn) { | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; | ||
@@ -41,0 +41,0 @@ var match = classic.exec(fn) || arrow.exec(fn); |
@@ -7,3 +7,3 @@ import { Container } from 'aurelia-dependency-injection'; | ||
private container; | ||
static inject: typeof Container[]; | ||
static get(container: Container): ValidationControllerFactory; | ||
constructor(container: Container); | ||
@@ -10,0 +10,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports", 'aurelia-dependency-injection', './validation-controller'], function (require, exports, aurelia_dependency_injection_1, validation_controller_1) { | ||
define(["require", "exports", './validation-controller'], function (require, exports, validation_controller_1) { | ||
"use strict"; | ||
@@ -10,2 +10,5 @@ /** | ||
} | ||
ValidationControllerFactory.get = function (container) { | ||
return new ValidationControllerFactory(container); | ||
}; | ||
/** | ||
@@ -27,6 +30,6 @@ * Creates a new controller and registers it in the current element's container so that it's | ||
}; | ||
ValidationControllerFactory.inject = [aurelia_dependency_injection_1.Container]; | ||
return ValidationControllerFactory; | ||
}()); | ||
exports.ValidationControllerFactory = ValidationControllerFactory; | ||
ValidationControllerFactory['protocol:aurelia:resolver'] = true; | ||
}); |
@@ -41,3 +41,3 @@ "use strict"; | ||
ValidationParser.prototype.getAccessorExpression = function (fn) { | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; | ||
@@ -44,0 +44,0 @@ var match = classic.exec(fn) || arrow.exec(fn); |
@@ -7,3 +7,3 @@ import { Container } from 'aurelia-dependency-injection'; | ||
private container; | ||
static inject: typeof Container[]; | ||
static get(container: Container): ValidationControllerFactory; | ||
constructor(container: Container); | ||
@@ -10,0 +10,0 @@ /** |
"use strict"; | ||
var aurelia_dependency_injection_1 = require('aurelia-dependency-injection'); | ||
var validation_controller_1 = require('./validation-controller'); | ||
@@ -11,2 +10,5 @@ /** | ||
} | ||
ValidationControllerFactory.get = function (container) { | ||
return new ValidationControllerFactory(container); | ||
}; | ||
/** | ||
@@ -28,5 +30,5 @@ * Creates a new controller and registers it in the current element's container so that it's | ||
}; | ||
ValidationControllerFactory.inject = [aurelia_dependency_injection_1.Container]; | ||
return ValidationControllerFactory; | ||
}()); | ||
exports.ValidationControllerFactory = ValidationControllerFactory; | ||
ValidationControllerFactory['protocol:aurelia:resolver'] = true; |
@@ -35,3 +35,3 @@ import { Parser, AccessMember, AccessScope, LiteralString, Binary, Conditional, LiteralPrimitive, CallMember, Unparser } from 'aurelia-binding'; | ||
getAccessorExpression(fn) { | ||
const classic = /^function\s*\([$_\w\d]+\)\s*\{\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
const classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
const arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; | ||
@@ -38,0 +38,0 @@ const match = classic.exec(fn) || arrow.exec(fn); |
@@ -7,3 +7,3 @@ import { Container } from 'aurelia-dependency-injection'; | ||
private container; | ||
static inject: typeof Container[]; | ||
static get(container: Container): ValidationControllerFactory; | ||
constructor(container: Container); | ||
@@ -10,0 +10,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
import { Container } from 'aurelia-dependency-injection'; | ||
import { ValidationController } from './validation-controller'; | ||
@@ -10,2 +9,5 @@ /** | ||
} | ||
static get(container) { | ||
return new ValidationControllerFactory(container); | ||
} | ||
/** | ||
@@ -28,2 +30,2 @@ * Creates a new controller and registers it in the current element's container so that it's | ||
} | ||
ValidationControllerFactory.inject = [Container]; | ||
ValidationControllerFactory['protocol:aurelia:resolver'] = true; |
@@ -40,3 +40,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
ValidationParser.prototype.getAccessorExpression = function (fn) { | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; | ||
@@ -43,0 +43,0 @@ var match = classic.exec(fn) || arrow.exec(fn); |
@@ -7,3 +7,3 @@ import { Container } from 'aurelia-dependency-injection'; | ||
private container; | ||
static inject: typeof Container[]; | ||
static get(container: Container): ValidationControllerFactory; | ||
constructor(container: Container); | ||
@@ -10,0 +10,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
import { Container } from 'aurelia-dependency-injection'; | ||
import { ValidationController } from './validation-controller'; | ||
@@ -10,2 +9,5 @@ /** | ||
} | ||
ValidationControllerFactory.get = function (container) { | ||
return new ValidationControllerFactory(container); | ||
}; | ||
/** | ||
@@ -27,4 +29,4 @@ * Creates a new controller and registers it in the current element's container so that it's | ||
}; | ||
ValidationControllerFactory.inject = [Container]; | ||
return ValidationControllerFactory; | ||
}()); | ||
ValidationControllerFactory['protocol:aurelia:resolver'] = true; |
@@ -56,3 +56,3 @@ System.register(['aurelia-binding', 'aurelia-templating', './util', 'aurelia-logging'], function(exports_1, context_1) { | ||
ValidationParser.prototype.getAccessorExpression = function (fn) { | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; | ||
@@ -59,0 +59,0 @@ var match = classic.exec(fn) || arrow.exec(fn); |
@@ -7,3 +7,3 @@ import { Container } from 'aurelia-dependency-injection'; | ||
private container; | ||
static inject: typeof Container[]; | ||
static get(container: Container): ValidationControllerFactory; | ||
constructor(container: Container); | ||
@@ -10,0 +10,0 @@ /** |
@@ -1,11 +0,8 @@ | ||
System.register(['aurelia-dependency-injection', './validation-controller'], function(exports_1, context_1) { | ||
System.register(['./validation-controller'], function(exports_1, context_1) { | ||
"use strict"; | ||
var __moduleName = context_1 && context_1.id; | ||
var aurelia_dependency_injection_1, validation_controller_1; | ||
var validation_controller_1; | ||
var ValidationControllerFactory; | ||
return { | ||
setters:[ | ||
function (aurelia_dependency_injection_1_1) { | ||
aurelia_dependency_injection_1 = aurelia_dependency_injection_1_1; | ||
}, | ||
function (validation_controller_1_1) { | ||
@@ -22,2 +19,5 @@ validation_controller_1 = validation_controller_1_1; | ||
} | ||
ValidationControllerFactory.get = function (container) { | ||
return new ValidationControllerFactory(container); | ||
}; | ||
/** | ||
@@ -39,8 +39,8 @@ * Creates a new controller and registers it in the current element's container so that it's | ||
}; | ||
ValidationControllerFactory.inject = [aurelia_dependency_injection_1.Container]; | ||
return ValidationControllerFactory; | ||
}()); | ||
exports_1("ValidationControllerFactory", ValidationControllerFactory); | ||
ValidationControllerFactory['protocol:aurelia:resolver'] = true; | ||
} | ||
} | ||
}); |
{ | ||
"name": "aurelia-validation", | ||
"version": "0.12.4", | ||
"version": "0.12.5", | ||
"description": "Validation for Aurelia applications", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -76,3 +76,3 @@ import { | ||
private getAccessorExpression(fn: string): Expression { | ||
const classic = /^function\s*\([$_\w\d]+\)\s*\{\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
const classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; | ||
const arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; | ||
@@ -79,0 +79,0 @@ const match = classic.exec(fn) || arrow.exec(fn); |
@@ -8,3 +8,5 @@ import {Container} from 'aurelia-dependency-injection'; | ||
export class ValidationControllerFactory { | ||
static inject = [Container]; | ||
static get(container: Container) { | ||
return new ValidationControllerFactory(container); | ||
} | ||
@@ -31,1 +33,3 @@ constructor(private container: Container) {} | ||
} | ||
(<any>ValidationControllerFactory)['protocol:aurelia:resolver'] = true; |
@@ -8,9 +8,2 @@ import {StageComponent, ComponentTester} from 'aurelia-testing'; | ||
declare var describe: { (name: string, fn: () => void): void }; | ||
// declare var beforeEach: { (fn: () => void): void }; | ||
// declare var afterEach: { (fn: () => void): void }; | ||
declare var it: { (name: string, fn: (done?: () => void) => void): void }; | ||
declare var expect: (x: any) => any; | ||
declare var jasmine: { createSpy: () => any; }; | ||
function configure(aurelia: Aurelia) { | ||
@@ -17,0 +10,0 @@ aurelia.use |
@@ -7,7 +7,2 @@ import {Expression, AccessScope} from 'aurelia-binding'; | ||
declare var describe: { (name: string, fn: () => void): void }; | ||
declare var beforeAll: { (fn: () => void): void }; | ||
declare var it: { (name: string, fn: (done?: () => void) => void): void }; | ||
declare var expect: (x: any) => any; | ||
describe('Validator', () => { | ||
@@ -32,2 +27,4 @@ let parser: ValidationParser; | ||
expect(parse('function (_) { return _.bc_de; }')).toEqual(new AccessScope('bc_de', 0)); | ||
expect(parse('function (a) {"use strict"; return a.b; }')).toEqual(new AccessScope('b', 0)); | ||
expect(parse('function (a) { "use strict"; return a.b; }')).toEqual(new AccessScope('b', 0)); | ||
expect(parse('a=>a.b')).toEqual(new AccessScope('b', 0)); | ||
@@ -34,0 +31,0 @@ expect(parse('a =>a.b')).toEqual(new AccessScope('b', 0)); |
@@ -11,7 +11,2 @@ import {Container} from 'aurelia-dependency-injection'; | ||
declare var describe: { (name: string, fn: () => void): void }; | ||
declare var beforeAll: { (fn: () => void): void }; | ||
declare var it: { (name: string, fn: (done?: () => void) => void): void }; | ||
declare var expect: (x: any) => any; | ||
describe('Validator', () => { | ||
@@ -18,0 +13,0 @@ let validator: StandardValidator; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
672594
227
13036