Skip to content

Commit

Permalink
chore(all): prepare release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jan 12, 2015
1 parent f121fbb commit 8c9886d
Show file tree
Hide file tree
Showing 18 changed files with 1,357 additions and 802 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": "0.6.0",
"version": "0.7.0",
"description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.",
"keywords": [
"aurelia",
Expand Down
105 changes: 71 additions & 34 deletions dist/amd/compose.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,87 @@
define(["exports", "aurelia-dependency-injection", "aurelia-templating"], function (exports, _aureliaDependencyInjection, _aureliaTemplating) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};

var Container = _aureliaDependencyInjection.Container;
var CustomElement = _aureliaTemplating.CustomElement;
var CompositionEngine = _aureliaTemplating.CompositionEngine;
var Property = _aureliaTemplating.Property;
var ViewSlot = _aureliaTemplating.ViewSlot;
var NoView = _aureliaTemplating.NoView;
var ViewResources = _aureliaTemplating.ViewResources;
var Compose = function Compose(container, compositionEngine, viewSlot, viewResources) {
this.container = container;
this.compositionEngine = compositionEngine;
this.viewSlot = viewSlot;
this.viewResources = viewResources;
};

Compose.annotations = function () {
return [new CustomElement("compose"), new Property("model"), new Property("view"), new Property("viewModel"), new NoView()];
};

Compose.inject = function () {
return [Container, CompositionEngine, ViewSlot, ViewResources];
};
var Compose = (function () {
var Compose = function Compose(container, compositionEngine, viewSlot, viewResources) {
this.container = container;
this.compositionEngine = compositionEngine;
this.viewSlot = viewSlot;
this.viewResources = viewResources;
};

Compose.prototype.bind = function (executionContext) {
this.executionContext = executionContext;
processInstruction(this, {
view: this.view,
viewModel: this.viewModel,
model: this.model
_prototypeProperties(Compose, {
annotations: {
value: function () {
return [new CustomElement("compose"), new Property("model"), new Property("view"), new Property("viewModel"), new NoView()];
},
writable: true,
enumerable: true,
configurable: true
},
inject: {
value: function () {
return [Container, CompositionEngine, ViewSlot, ViewResources];
},
writable: true,
enumerable: true,
configurable: true
}
}, {
bind: {
value: function (executionContext) {
this.executionContext = executionContext;
processInstruction(this, {
view: this.view,
viewModel: this.viewModel,
model: this.model
});
},
writable: true,
enumerable: true,
configurable: true
},
modelChanged: {
value: function (newValue, oldValue) {
if (this.viewModel && typeof this.viewModel.activate === "function") {
this.viewModel.activate(newValue);
}
},
writable: true,
enumerable: true,
configurable: true
},
viewChanged: {
value: function (newValue, oldValue) {
processInstruction(this, { view: newValue });
},
writable: true,
enumerable: true,
configurable: true
},
viewModelChanged: {
value: function (newValue, oldValue) {
processInstruction(this, { viewModel: newValue });
},
writable: true,
enumerable: true,
configurable: true
}
});
};

Compose.prototype.modelChanged = function (newValue, oldValue) {
if (this.viewModel && typeof this.viewModel.activate === "function") {
this.viewModel.activate(newValue);
}
};

Compose.prototype.viewChanged = function (newValue, oldValue) {
processInstruction(this, { view: newValue });
};

Compose.prototype.viewModelChanged = function (newValue, oldValue) {
processInstruction(this, { viewModel: newValue });
};
return Compose;
})();

exports.Compose = Compose;

Expand Down
87 changes: 56 additions & 31 deletions dist/amd/if.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,74 @@
define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};

var TemplateController = _aureliaTemplating.TemplateController;
var Property = _aureliaTemplating.Property;
var BoundViewFactory = _aureliaTemplating.BoundViewFactory;
var ViewSlot = _aureliaTemplating.ViewSlot;
var If = function If(viewFactory, viewSlot) {
this.viewFactory = viewFactory;
this.viewSlot = viewSlot;
this.showing = false;
};

If.annotations = function () {
return [new TemplateController("if"), new Property("value", "valueChanged", "if")];
};

If.inject = function () {
return [BoundViewFactory, ViewSlot];
};
var If = (function () {
var If = function If(viewFactory, viewSlot) {
this.viewFactory = viewFactory;
this.viewSlot = viewSlot;
this.showing = false;
};

If.prototype.valueChanged = function (newValue) {
if (!newValue) {
if (this.view) {
this.viewSlot.remove(this.view);
this.view.unbind();
_prototypeProperties(If, {
annotations: {
value: function () {
return [new TemplateController("if"), new Property("value", "valueChanged", "if")];
},
writable: true,
enumerable: true,
configurable: true
},
inject: {
value: function () {
return [BoundViewFactory, ViewSlot];
},
writable: true,
enumerable: true,
configurable: true
}
}, {
valueChanged: {
value: function (newValue) {
if (!newValue) {
if (this.view) {
this.viewSlot.remove(this.view);
this.view.unbind();
}

this.showing = false;
return;
}
this.showing = false;
return;
}

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

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

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

this.viewSlot.add(this.view);
}
},
writable: true,
enumerable: true,
configurable: true
}
});

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

exports.If = If;
});
Loading

0 comments on commit 8c9886d

Please sign in to comment.