Skip to content

Commit

Permalink
chore(all): prepare release 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jan 26, 2019
1 parent f199daa commit 7ecedb1
Show file tree
Hide file tree
Showing 18 changed files with 144 additions and 38 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-templating-resources",
"version": "1.7.2",
"version": "1.8.0",
"description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.",
"keywords": [
"aurelia",
Expand Down
15 changes: 12 additions & 3 deletions dist/amd/if-core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define(["exports"], function (exports) {
"use strict";
define(['exports'], function (exports) {
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
Expand All @@ -18,6 +18,7 @@ define(["exports"], function (exports) {
this.overrideContext = null;

this.showing = false;
this.cache = true;
}

IfCore.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -78,11 +79,19 @@ define(["exports"], function (exports) {

if (removed instanceof Promise) {
return removed.then(function () {
return _this.view.unbind();
_this._unbindView();
});
}

this._unbindView();
};

IfCore.prototype._unbindView = function _unbindView() {
var cache = this.cache === 'false' ? false : !!this.cache;
this.view.unbind();
if (!cache) {
this.view = null;
}
};

return IfCore;
Expand Down
9 changes: 7 additions & 2 deletions dist/amd/if.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', './if-c
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2;
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

var If = exports.If = (_dec = (0, _aureliaTemplating.customAttribute)('if'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.ViewSlot), _dec3 = (0, _aureliaTemplating.bindable)({ primaryProperty: true }), _dec(_class = (0, _aureliaTemplating.templateController)(_class = _dec2(_class = (_class2 = function (_IfCore) {
_inherits(If, _IfCore);
Expand All @@ -89,7 +89,7 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', './if-c
args[_key] = arguments[_key];
}

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _temp), _possibleConstructorReturn(_this, _ret);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _initDefineProp(_this, 'cache', _descriptor3, _this), _temp), _possibleConstructorReturn(_this, _ret);
}

If.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -153,5 +153,10 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', './if-c
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'swapOrder', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'cache', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return true;
}
})), _class2)) || _class) || _class) || _class);
});
1 change: 1 addition & 0 deletions dist/aurelia-templating-resources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ export declare class Else extends IfCore {
export declare class If extends IfCore {
condition: any;
swapOrder: 'before' | 'with' | 'after';
cache: boolean | string;

/**
* Binds the if to the binding context and override context
Expand Down
14 changes: 13 additions & 1 deletion dist/aurelia-templating-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ export class IfCore {
// state anymore, so we use `showing` for that.
// Eventually, `showing` and `value` should be consistent.
this.showing = false;
this.cache = true;
}

bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -439,10 +440,20 @@ export class IfCore {
let removed = this.viewSlot.remove(this.view); // Promise or View

if (removed instanceof Promise) {
return removed.then(() => this.view.unbind());
return removed.then(() => {
this._unbindView();
});
}

this._unbindView();
}

_unbindView() {
const cache = this.cache === 'false' ? false : !!this.cache;
this.view.unbind();
if (!cache) {
this.view = null;
}
}
}

Expand Down Expand Up @@ -1753,6 +1764,7 @@ export class Else extends IfCore {
export class If extends IfCore {
@bindable({ primaryProperty: true }) condition: any;
@bindable swapOrder: "before"|"with"|"after";
@bindable cache: boolean|string = true;

/**
* Binds the if to the binding context and override context
Expand Down
13 changes: 11 additions & 2 deletions dist/commonjs/if-core.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
Expand All @@ -17,6 +17,7 @@ var IfCore = exports.IfCore = function () {
this.overrideContext = null;

this.showing = false;
this.cache = true;
}

IfCore.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -77,11 +78,19 @@ var IfCore = exports.IfCore = function () {

if (removed instanceof Promise) {
return removed.then(function () {
return _this.view.unbind();
_this._unbindView();
});
}

this._unbindView();
};

IfCore.prototype._unbindView = function _unbindView() {
var cache = this.cache === 'false' ? false : !!this.cache;
this.view.unbind();
if (!cache) {
this.view = null;
}
};

return IfCore;
Expand Down
9 changes: 7 additions & 2 deletions dist/commonjs/if.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.If = undefined;

var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2;
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

var _aureliaTemplating = require('aurelia-templating');

Expand Down Expand Up @@ -74,7 +74,7 @@ var If = exports.If = (_dec = (0, _aureliaTemplating.customAttribute)('if'), _de
args[_key] = arguments[_key];
}

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _temp), _possibleConstructorReturn(_this, _ret);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _initDefineProp(_this, 'cache', _descriptor3, _this), _temp), _possibleConstructorReturn(_this, _ret);
}

If.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -138,4 +138,9 @@ var If = exports.If = (_dec = (0, _aureliaTemplating.customAttribute)('if'), _de
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'swapOrder', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'cache', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return true;
}
})), _class2)) || _class) || _class) || _class);
13 changes: 12 additions & 1 deletion dist/es2015/if-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export let IfCore = class IfCore {
this.overrideContext = null;

this.showing = false;
this.cache = true;
}

bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -65,9 +66,19 @@ export let IfCore = class IfCore {
let removed = this.viewSlot.remove(this.view);

if (removed instanceof Promise) {
return removed.then(() => this.view.unbind());
return removed.then(() => {
this._unbindView();
});
}

this._unbindView();
}

_unbindView() {
const cache = this.cache === 'false' ? false : !!this.cache;
this.view.unbind();
if (!cache) {
this.view = null;
}
}
};
9 changes: 7 additions & 2 deletions dist/es2015/if.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2;
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Expand Down Expand Up @@ -51,7 +51,7 @@ export let If = (_dec = customAttribute('if'), _dec2 = inject(BoundViewFactory,
constructor(...args) {
var _temp;

return _temp = super(...args), _initDefineProp(this, 'condition', _descriptor, this), _initDefineProp(this, 'swapOrder', _descriptor2, this), _temp;
return _temp = super(...args), _initDefineProp(this, 'condition', _descriptor, this), _initDefineProp(this, 'swapOrder', _descriptor2, this), _initDefineProp(this, 'cache', _descriptor3, this), _temp;
}

bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -107,4 +107,9 @@ export let If = (_dec = customAttribute('if'), _dec2 = inject(BoundViewFactory,
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'swapOrder', [bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'cache', [bindable], {
enumerable: true,
initializer: function () {
return true;
}
})), _class2)) || _class) || _class) || _class);
11 changes: 10 additions & 1 deletion dist/native-modules/if-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export var IfCore = function () {
this.overrideContext = null;

this.showing = false;
this.cache = true;
}

IfCore.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -71,11 +72,19 @@ export var IfCore = function () {

if (removed instanceof Promise) {
return removed.then(function () {
return _this.view.unbind();
_this._unbindView();
});
}

this._unbindView();
};

IfCore.prototype._unbindView = function _unbindView() {
var cache = this.cache === 'false' ? false : !!this.cache;
this.view.unbind();
if (!cache) {
this.view = null;
}
};

return IfCore;
Expand Down
9 changes: 7 additions & 2 deletions dist/native-modules/if.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2;
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Expand Down Expand Up @@ -65,7 +65,7 @@ export var If = (_dec = customAttribute('if'), _dec2 = inject(BoundViewFactory,
args[_key] = arguments[_key];
}

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _temp), _possibleConstructorReturn(_this, _ret);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _initDefineProp(_this, 'cache', _descriptor3, _this), _temp), _possibleConstructorReturn(_this, _ret);
}

If.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -129,4 +129,9 @@ export var If = (_dec = customAttribute('if'), _dec2 = inject(BoundViewFactory,
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'swapOrder', [bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'cache', [bindable], {
enumerable: true,
initializer: function initializer() {
return true;
}
})), _class2)) || _class) || _class) || _class);
17 changes: 13 additions & 4 deletions dist/system/if-core.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";
'use strict';

System.register([], function (_export, _context) {
"use strict";
Expand All @@ -10,7 +10,7 @@ System.register([], function (_export, _context) {
return {
setters: [],
execute: function () {
_export("IfCore", IfCore = function () {
_export('IfCore', IfCore = function () {
function IfCore(viewFactory, viewSlot) {


Expand All @@ -21,6 +21,7 @@ System.register([], function (_export, _context) {
this.overrideContext = null;

this.showing = false;
this.cache = true;
}

IfCore.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -81,17 +82,25 @@ System.register([], function (_export, _context) {

if (removed instanceof Promise) {
return removed.then(function () {
return _this.view.unbind();
_this._unbindView();
});
}

this._unbindView();
};

IfCore.prototype._unbindView = function _unbindView() {
var cache = this.cache === 'false' ? false : !!this.cache;
this.view.unbind();
if (!cache) {
this.view = null;
}
};

return IfCore;
}());

_export("IfCore", IfCore);
_export('IfCore', IfCore);
}
};
});
9 changes: 7 additions & 2 deletions dist/system/if.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
System.register(['aurelia-templating', 'aurelia-dependency-injection', './if-core'], function (_export, _context) {
"use strict";

var BoundViewFactory, ViewSlot, bindable, customAttribute, templateController, inject, IfCore, _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, If;
var BoundViewFactory, ViewSlot, bindable, customAttribute, templateController, inject, IfCore, _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, If;

function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Expand Down Expand Up @@ -99,7 +99,7 @@ System.register(['aurelia-templating', 'aurelia-dependency-injection', './if-cor
args[_key] = arguments[_key];
}

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _temp), _possibleConstructorReturn(_this, _ret);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _IfCore.call.apply(_IfCore, [this].concat(args))), _this), _initDefineProp(_this, 'condition', _descriptor, _this), _initDefineProp(_this, 'swapOrder', _descriptor2, _this), _initDefineProp(_this, 'cache', _descriptor3, _this), _temp), _possibleConstructorReturn(_this, _ret);
}

If.prototype.bind = function bind(bindingContext, overrideContext) {
Expand Down Expand Up @@ -163,6 +163,11 @@ System.register(['aurelia-templating', 'aurelia-dependency-injection', './if-cor
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'swapOrder', [bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'cache', [bindable], {
enumerable: true,
initializer: function initializer() {
return true;
}
})), _class2)) || _class) || _class) || _class));

_export('If', If);
Expand Down
Loading

0 comments on commit 7ecedb1

Please sign in to comment.