Skip to content

Commit

Permalink
chore(all): prepare release 0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 9, 2015
1 parent ef76602 commit 299b375
Show file tree
Hide file tree
Showing 43 changed files with 1,024 additions and 269 deletions.
11 changes: 6 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-templating-resources",
"version": "0.11.1",
"version": "0.12.0",
"description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.",
"keywords": [
"aurelia",
Expand All @@ -17,10 +17,11 @@
"url": "http://github.com/aurelia/templating-resources"
},
"dependencies": {
"aurelia-binding": "^0.6.1",
"aurelia-dependency-injection": "^0.7.1",
"aurelia-logging": "^0.4.0",
"aurelia-templating": "^0.11.1",
"aurelia-binding": "^0.7.0",
"aurelia-dependency-injection": "^0.8.1",
"aurelia-logging": "^0.5.0",
"aurelia-task-queue": "^0.5.0",
"aurelia-templating": "^0.12.0",
"core-js": "zloirock/core-js"
}
}
66 changes: 34 additions & 32 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,52 @@ System.config({

System.config({
"map": {
"aurelia-binding": "github:aurelia/binding@0.6.1",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1",
"aurelia-logging": "github:aurelia/logging@0.4.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.4.0",
"aurelia-templating": "github:aurelia/templating@0.11.1",
"aurelia-binding": "github:aurelia/binding@0.7.0",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.8.1",
"aurelia-logging": "github:aurelia/logging@0.5.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.5.0",
"aurelia-templating": "github:aurelia/templating@0.12.0",
"babel": "npm:[email protected]",
"babel-runtime": "npm:[email protected]",
"core-js": "npm:[email protected].6",
"github:aurelia/binding@0.6.1": {
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1",
"aurelia-metadata": "github:aurelia/metadata@0.5.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.4.0",
"core-js": "npm:[email protected].6"
"core-js": "npm:[email protected].15",
"github:aurelia/binding@0.7.0": {
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.8.1",
"aurelia-metadata": "github:aurelia/metadata@0.6.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.5.0",
"core-js": "npm:[email protected].15"
},
"github:aurelia/dependency-injection@0.7.1": {
"aurelia-logging": "github:aurelia/logging@0.4.0",
"aurelia-metadata": "github:aurelia/metadata@0.5.0",
"core-js": "npm:[email protected].6"
"github:aurelia/dependency-injection@0.8.1": {
"aurelia-logging": "github:aurelia/logging@0.5.0",
"aurelia-metadata": "github:aurelia/metadata@0.6.0",
"core-js": "npm:[email protected].15"
},
"github:aurelia/loader@0.6.0": {
"github:aurelia/loader@0.7.0": {
"aurelia-html-template-element": "github:aurelia/[email protected]",
"aurelia-path": "github:aurelia/path@0.6.1",
"core-js": "npm:[email protected].6",
"webcomponentsjs": "github:webcomponents/[email protected].1"
"aurelia-path": "github:aurelia/path@0.7.0",
"core-js": "npm:[email protected].15",
"webcomponentsjs": "github:webcomponents/[email protected].3"
},
"github:aurelia/metadata@0.5.0": {
"core-js": "npm:[email protected].6"
"github:aurelia/metadata@0.6.0": {
"core-js": "npm:[email protected].15"
},
"github:aurelia/templating@0.11.1": {
"aurelia-binding": "github:aurelia/binding@0.6.1",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1",
"github:aurelia/templating@0.12.0": {
"aurelia-binding": "github:aurelia/binding@0.7.0",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.8.1",
"aurelia-html-template-element": "github:aurelia/[email protected]",
"aurelia-loader": "github:aurelia/loader@0.6.0",
"aurelia-logging": "github:aurelia/logging@0.4.0",
"aurelia-metadata": "github:aurelia/metadata@0.5.0",
"aurelia-path": "github:aurelia/path@0.6.1",
"aurelia-task-queue": "github:aurelia/task-queue@0.4.0",
"core-js": "npm:[email protected].6"
"aurelia-loader": "github:aurelia/loader@0.7.0",
"aurelia-logging": "github:aurelia/logging@0.5.0",
"aurelia-metadata": "github:aurelia/metadata@0.6.0",
"aurelia-path": "github:aurelia/path@0.7.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.5.0",
"core-js": "npm:[email protected].15"
},
"github:jspm/[email protected]": {
"process": "npm:[email protected]"
},
"npm:[email protected]": {
"process": "github:jspm/[email protected]"
"npm:[email protected]": {
"fs": "github:jspm/[email protected]",
"process": "github:jspm/[email protected]",
"systemjs-json": "github:systemjs/[email protected]"
}
}
});
Expand Down
48 changes: 38 additions & 10 deletions dist/amd/compose.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
define(['exports', 'aurelia-dependency-injection', 'aurelia-task-queue', 'aurelia-templating'], function (exports, _aureliaDependencyInjection, _aureliaTaskQueue, _aureliaTemplating) {
'use strict';

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

exports.__esModule = true;

var _createDecoratedClass = (function () { function defineProperties(target, descriptors, initializers) { for (var i = 0; i < descriptors.length; i++) { var descriptor = descriptors[i]; var decorators = descriptor.decorators; var key = descriptor.key; delete descriptor.key; delete descriptor.decorators; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor || descriptor.initializer) descriptor.writable = true; if (decorators) { for (var f = 0; f < decorators.length; f++) { var decorator = decorators[f]; if (typeof decorator === 'function') { descriptor = decorator(target, key, descriptor) || descriptor; } else { throw new TypeError('The decorator for method ' + descriptor.key + ' is of the invalid type ' + typeof decorator); } } if (descriptor.initializer !== undefined) { initializers[key] = descriptor; continue; } } Object.defineProperty(target, key, descriptor); } } return function (Constructor, protoProps, staticProps, protoInitializers, staticInitializers) { if (protoProps) defineProperties(Constructor.prototype, protoProps, protoInitializers); if (staticProps) defineProperties(Constructor, staticProps, staticInitializers); return Constructor; }; })();

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

function _defineDecoratedPropertyDescriptor(target, key, descriptors) { var _descriptor = descriptors[key]; if (!_descriptor) return; var descriptor = {}; for (var _key in _descriptor) descriptor[_key] = _descriptor[_key]; descriptor.value = descriptor.initializer.call(target); Object.defineProperty(target, key, descriptor); }

var Compose = (function () {
function Compose(container, compositionEngine, viewSlot, viewResources, taskQueue) {
var _instanceInitializers = {};

function Compose(element, container, compositionEngine, viewSlot, viewResources, taskQueue) {
_classCallCheck(this, _Compose);

_defineDecoratedPropertyDescriptor(this, 'model', _instanceInitializers);

_defineDecoratedPropertyDescriptor(this, 'view', _instanceInitializers);

_defineDecoratedPropertyDescriptor(this, 'viewModel', _instanceInitializers);

this.element = element;
this.container = container;
this.compositionEngine = compositionEngine;
this.viewSlot = viewSlot;
Expand Down Expand Up @@ -89,12 +102,26 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-task-queue', 'aureli
});
};

Compose = _aureliaDependencyInjection.inject(_aureliaDependencyInjection.Container, _aureliaTemplating.CompositionEngine, _aureliaTemplating.ViewSlot, _aureliaTemplating.ViewResources, _aureliaTaskQueue.TaskQueue)(Compose) || Compose;
Compose = _aureliaTemplating.noView(Compose) || Compose;
Compose = _aureliaTemplating.bindable('viewModel')(Compose) || Compose;
Compose = _aureliaTemplating.bindable('view')(Compose) || Compose;
Compose = _aureliaTemplating.bindable('model')(Compose) || Compose;
Compose = _aureliaTemplating.customElement('compose')(Compose) || Compose;
_createDecoratedClass(_Compose, [{
key: 'model',
decorators: [_aureliaTemplating.bindable],
initializer: null,
enumerable: true
}, {
key: 'view',
decorators: [_aureliaTemplating.bindable],
initializer: null,
enumerable: true
}, {
key: 'viewModel',
decorators: [_aureliaTemplating.bindable],
initializer: null,
enumerable: true
}], null, _instanceInitializers);

Compose = (0, _aureliaDependencyInjection.inject)(Element, _aureliaDependencyInjection.Container, _aureliaTemplating.CompositionEngine, _aureliaTemplating.ViewSlot, _aureliaTemplating.ViewResources, _aureliaTaskQueue.TaskQueue)(Compose) || Compose;
Compose = (0, _aureliaTemplating.noView)(Compose) || Compose;
Compose = (0, _aureliaTemplating.customElement)('compose')(Compose) || Compose;
return Compose;
})();

Expand All @@ -106,7 +133,8 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-task-queue', 'aureli
container: composer.container,
viewSlot: composer.viewSlot,
viewResources: composer.viewResources,
currentBehavior: composer.currentBehavior
currentBehavior: composer.currentBehavior,
host: composer.element
});
}

Expand Down
63 changes: 63 additions & 0 deletions dist/amd/focus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-task-queue'], function (exports, _aureliaTemplating, _aureliaBinding, _aureliaDependencyInjection, _aureliaTaskQueue) {
'use strict';

exports.__esModule = true;

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

var Focus = (function () {
function Focus(element, taskQueue) {
var _this = this;

_classCallCheck(this, _Focus);

this.element = element;
this.taskQueue = taskQueue;

this.focusListener = function (e) {
_this.value = true;
};
this.blurListener = function (e) {
if (document.activeElement !== _this.element) {
_this.value = false;
}
};
}

var _Focus = Focus;

_Focus.prototype.valueChanged = function valueChanged(newValue) {
if (newValue) {
this.giveFocus();
} else {
this.element.blur();
}
};

_Focus.prototype.giveFocus = function giveFocus() {
var _this2 = this;

this.taskQueue.queueMicroTask(function () {
if (_this2.value) {
_this2.element.focus();
}
});
};

_Focus.prototype.attached = function attached() {
this.element.addEventListener('focus', this.focusListener);
this.element.addEventListener('blur', this.blurListener);
};

_Focus.prototype.detached = function detached() {
this.element.removeEventListener('focus', this.focusListener);
this.element.removeEventListener('blur', this.blurListener);
};

Focus = (0, _aureliaDependencyInjection.inject)(Element, _aureliaTaskQueue.TaskQueue)(Focus) || Focus;
Focus = (0, _aureliaTemplating.customAttribute)('focus', _aureliaBinding.bindingMode.twoWay)(Focus) || Focus;
return Focus;
})();

exports.Focus = Focus;
});
12 changes: 6 additions & 6 deletions dist/amd/global-behavior.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', 'aurelia-logging'], function (exports, _aureliaDependencyInjection, _aureliaTemplating, _aureliaLogging) {
'use strict';

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

exports.__esModule = true;

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

var GlobalBehavior = (function () {
function GlobalBehavior(element) {
_classCallCheck(this, _GlobalBehavior);
Expand All @@ -24,7 +24,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', 'aureli
try {
this.handler = handler.bind(this, this.element, this.aureliaCommand) || handler;
} catch (error) {
throw _aureliaLogging.AggregateError('Conventional binding handler failed.', error);
throw (0, _aureliaLogging.AggregateError)('Conventional binding handler failed.', error);
}
};

Expand All @@ -48,9 +48,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', 'aureli
this.handler = null;
};

GlobalBehavior = _aureliaDependencyInjection.inject(Element)(GlobalBehavior) || GlobalBehavior;
GlobalBehavior = _aureliaTemplating.dynamicOptions(GlobalBehavior) || GlobalBehavior;
GlobalBehavior = _aureliaTemplating.customAttribute('global-behavior')(GlobalBehavior) || GlobalBehavior;
GlobalBehavior = (0, _aureliaDependencyInjection.inject)(Element)(GlobalBehavior) || GlobalBehavior;
GlobalBehavior = (0, _aureliaTemplating.dynamicOptions)(GlobalBehavior) || GlobalBehavior;
GlobalBehavior = (0, _aureliaTemplating.customAttribute)('global-behavior')(GlobalBehavior) || GlobalBehavior;
return GlobalBehavior;
})();

Expand Down
19 changes: 12 additions & 7 deletions dist/amd/if.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
define(['exports', 'aurelia-templating', 'aurelia-dependency-injection'], function (exports, _aureliaTemplating, _aureliaDependencyInjection) {
'use strict';

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

exports.__esModule = true;

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

var If = (function () {
function If(viewFactory, viewSlot) {
_classCallCheck(this, _If);
Expand All @@ -16,6 +16,11 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection'], functi

var _If = If;

_If.prototype.bind = function bind(executionContext) {
this.executionContext = executionContext;
this.valueChanged(this.value);
};

_If.prototype.valueChanged = function valueChanged(newValue) {
if (!newValue) {
if (this.view) {
Expand All @@ -28,23 +33,23 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection'], functi
}

if (!this.view) {
this.view = this.viewFactory.create();
this.view = this.viewFactory.create(this.executionContext);
}

if (!this.showing) {
this.showing = true;

if (!this.view.bound) {
if (!this.view.isBound) {
this.view.bind();
}

this.viewSlot.add(this.view);
}
};

If = _aureliaDependencyInjection.inject(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.ViewSlot)(If) || If;
If = _aureliaTemplating.templateController(If) || If;
If = _aureliaTemplating.customAttribute('if')(If) || If;
If = (0, _aureliaDependencyInjection.inject)(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.ViewSlot)(If) || If;
If = (0, _aureliaTemplating.templateController)(If) || If;
If = (0, _aureliaTemplating.customAttribute)('if')(If) || If;
return If;
})();

Expand Down
6 changes: 4 additions & 2 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
define(['exports', './compose', './if', './with', './repeat', './show', './global-behavior', './sanitize-html'], function (exports, _compose, _if, _with, _repeat, _show, _globalBehavior, _sanitizeHtml) {
define(['exports', './compose', './if', './with', './repeat', './show', './global-behavior', './sanitize-html', './replaceable', './focus'], function (exports, _compose, _if, _with, _repeat, _show, _globalBehavior, _sanitizeHtml, _replaceable, _focus) {
'use strict';

exports.__esModule = true;

function configure(aurelia) {
aurelia.globalizeResources('./compose', './if', './with', './repeat', './show', './global-behavior', './sanitize-html');
aurelia.globalizeResources('./compose', './if', './with', './repeat', './show', './replaceable', './global-behavior', './sanitize-html', './focus');
}

exports.Compose = _compose.Compose;
Expand All @@ -14,5 +14,7 @@ define(['exports', './compose', './if', './with', './repeat', './show', './globa
exports.Show = _show.Show;
exports.SanitizeHtmlValueConverter = _sanitizeHtml.SanitizeHtmlValueConverter;
exports.GlobalBehavior = _globalBehavior.GlobalBehavior;
exports.Replaceable = _replaceable.Replaceable;
exports.Focus = _focus.Focus;
exports.configure = configure;
});
Loading

0 comments on commit 299b375

Please sign in to comment.