From 783639509a43dcdd30c60a5652f487ef4055859f Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Sat, 28 Feb 2015 00:47:40 -0500 Subject: [PATCH] chore(all): prepare release 0.8.9 --- bower.json | 2 +- dist/amd/compose.js | 10 ++++++++-- dist/amd/global-behavior.js | 10 ++++++++-- dist/amd/if.js | 10 +++++++++- dist/amd/index.js | 5 +++-- dist/amd/inner-html.js | 10 +++++++++- dist/amd/repeat.js | 19 +++++++++++++++++-- dist/amd/selected-item.js | 10 +++++++++- dist/amd/show.js | 10 ++++++++-- dist/amd/with.js | 10 +++++++++- dist/commonjs/compose.js | 11 +++++++++-- dist/commonjs/global-behavior.js | 10 ++++++++-- dist/commonjs/if.js | 10 +++++++++- dist/commonjs/index.js | 12 ++++++++++-- dist/commonjs/inner-html.js | 10 +++++++++- dist/commonjs/repeat.js | 20 ++++++++++++++++++-- dist/commonjs/selected-item.js | 10 +++++++++- dist/commonjs/show.js | 10 ++++++++-- dist/commonjs/with.js | 10 +++++++++- dist/system/compose.js | 11 +++++++---- dist/system/global-behavior.js | 10 +++++++--- dist/system/if.js | 9 +++++++-- dist/system/index.js | 5 ++--- dist/system/inner-html.js | 9 +++++++-- dist/system/repeat.js | 18 +++++++++++++++--- dist/system/selected-item.js | 9 +++++++-- dist/system/show.js | 11 +++++++---- dist/system/with.js | 9 +++++++-- doc/CHANGELOG.md | 8 ++++++++ package.json | 2 +- 30 files changed, 245 insertions(+), 55 deletions(-) diff --git a/bower.json b/bower.json index 50d731d..bc9fee6 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-resources", - "version": "0.8.8", + "version": "0.8.9", "description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.", "keywords": [ "aurelia", diff --git a/dist/amd/compose.js b/dist/amd/compose.js index 62fbfb5..36fb16a 100644 --- a/dist/amd/compose.js +++ b/dist/amd/compose.js @@ -3,13 +3,18 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating"], functi var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Container = _aureliaDependencyInjection.Container; var Behavior = _aureliaTemplating.Behavior; var CompositionEngine = _aureliaTemplating.CompositionEngine; var ViewSlot = _aureliaTemplating.ViewSlot; var ViewResources = _aureliaTemplating.ViewResources; + var Compose = exports.Compose = (function () { function Compose(container, compositionEngine, viewSlot, viewResources) { + _classCallCheck(this, Compose); + this.container = container; this.compositionEngine = compositionEngine; this.viewSlot = viewSlot; @@ -68,7 +73,6 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating"], functi return Compose; })(); - function processInstruction(composer, instruction) { composer.compositionEngine.compose(Object.assign(instruction, { executionContext: composer.executionContext, @@ -80,5 +84,7 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating"], functi composer.current = next; }); } - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/global-behavior.js b/dist/amd/global-behavior.js index 2ccc4b3..827d62b 100644 --- a/dist/amd/global-behavior.js +++ b/dist/amd/global-behavior.js @@ -3,10 +3,15 @@ define(["exports", "aurelia-templating", "aurelia-logging"], function (exports, var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = _aureliaTemplating.Behavior; var LogManager = _aureliaLogging; + var GlobalBehavior = exports.GlobalBehavior = (function () { function GlobalBehavior(element) { + _classCallCheck(this, GlobalBehavior); + this.element = element; } @@ -79,7 +84,6 @@ define(["exports", "aurelia-templating", "aurelia-logging"], function (exports, return GlobalBehavior; })(); - GlobalBehavior.createSettingsFromBehavior = function (behavior) { var settings = {}; @@ -123,5 +127,7 @@ define(["exports", "aurelia-templating", "aurelia-logging"], function (exports, } } }; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/if.js b/dist/amd/if.js index 7855a3a..9a01d56 100644 --- a/dist/amd/if.js +++ b/dist/amd/if.js @@ -3,11 +3,16 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = _aureliaTemplating.Behavior; var BoundViewFactory = _aureliaTemplating.BoundViewFactory; var ViewSlot = _aureliaTemplating.ViewSlot; + var If = exports.If = (function () { function If(viewFactory, viewSlot) { + _classCallCheck(this, If); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; this.showing = false; @@ -62,5 +67,8 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) return If; })(); - exports.__esModule = true; + + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/index.js b/dist/amd/index.js index 7d73e9a..8f11d01 100644 --- a/dist/amd/index.js +++ b/dist/amd/index.js @@ -10,7 +10,6 @@ define(["exports", "./compose", "./if", "./with", "./repeat", "./show", "./selec var GlobalBehavior = _globalBehavior.GlobalBehavior; var InnerHTML = _innerHtml.InnerHTML; - function install(aurelia) { aurelia.withResources([Show, If, With, Repeat, Compose, SelectedItem, GlobalBehavior, InnerHTML]); } @@ -24,5 +23,7 @@ define(["exports", "./compose", "./if", "./with", "./repeat", "./show", "./selec exports.SelectedItem = SelectedItem; exports.GlobalBehavior = GlobalBehavior; exports.install = install; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/inner-html.js b/dist/amd/inner-html.js index cc6ba61..7a64bad 100644 --- a/dist/amd/inner-html.js +++ b/dist/amd/inner-html.js @@ -3,9 +3,14 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = _aureliaTemplating.Behavior; + var InnerHTML = exports.InnerHTML = (function () { function InnerHTML(element) { + _classCallCheck(this, InnerHTML); + this.element = element; this.sanitizer = InnerHTML.defaultSanitizer; } @@ -68,5 +73,8 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) return InnerHTML; })(); - exports.__esModule = true; + + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/repeat.js b/dist/amd/repeat.js index faf6cd0..4392aac 100644 --- a/dist/amd/repeat.js +++ b/dist/amd/repeat.js @@ -3,14 +3,19 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var ObserverLocator = _aureliaBinding.ObserverLocator; var calcSplices = _aureliaBinding.calcSplices; var getChangeRecords = _aureliaBinding.getChangeRecords; var Behavior = _aureliaTemplating.Behavior; var BoundViewFactory = _aureliaTemplating.BoundViewFactory; var ViewSlot = _aureliaTemplating.ViewSlot; + var Repeat = exports.Repeat = (function () { function Repeat(viewFactory, viewSlot, observerLocator) { + _classCallCheck(this, Repeat); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; this.observerLocator = observerLocator; @@ -38,6 +43,7 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, bind: { value: function bind(executionContext) { var _this = this; + var items = this.items; this.executionContext = executionContext; @@ -127,6 +133,7 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, processArrayItems: { value: function processArrayItems(items) { var _this = this; + var viewFactory = this.viewFactory, viewSlot = this.viewSlot, i, @@ -153,6 +160,7 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, processMapEntries: { value: function processMapEntries(items) { var _this = this; + var viewFactory = this.viewFactory, viewSlot = this.viewSlot, index = 0, @@ -251,6 +259,9 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, length, row; + //TODO: track which views are moved instead of removed better + //TODO: only update context after highest changed index + for (i = 0, ii = splices.length; i < ii; ++i) { splice = splices[i]; removed = splice.removed; @@ -278,7 +289,7 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, if (view) { viewLookup["delete"](model); - viewSlot.insert(addIndex, view); + viewSlot.insert(addIndex, view); //TODO: move } else { row = this.createBaseExecutionContext(model); view = this.viewFactory.create(row); @@ -360,6 +371,7 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, child; for (i = 0, ii = viewSlot.children.length; i < ii; ++i) { + // TODO (martingust) better way to get index? child = viewSlot.children[i]; if (child.bindings[0].source[this.key] === key) { return i; @@ -373,5 +385,8 @@ define(["exports", "aurelia-binding", "aurelia-templating"], function (exports, return Repeat; })(); - exports.__esModule = true; + + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/selected-item.js b/dist/amd/selected-item.js index 4e79fd3..624e28a 100644 --- a/dist/amd/selected-item.js +++ b/dist/amd/selected-item.js @@ -3,9 +3,14 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = _aureliaTemplating.Behavior; + var SelectedItem = exports.SelectedItem = (function () { function SelectedItem(element) { + _classCallCheck(this, SelectedItem); + this.element = element; this.options = []; this.callback = this.selectedIndexChanged.bind(this); @@ -89,5 +94,8 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) return SelectedItem; })(); - exports.__esModule = true; + + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/show.js b/dist/amd/show.js index a497005..fb5b240 100644 --- a/dist/amd/show.js +++ b/dist/amd/show.js @@ -3,8 +3,9 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; - var Behavior = _aureliaTemplating.Behavior; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = _aureliaTemplating.Behavior; function addStyleString(str) { var node = document.createElement("style"); @@ -17,6 +18,8 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) var Show = exports.Show = (function () { function Show(element) { + _classCallCheck(this, Show); + this.element = element; } @@ -51,5 +54,8 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) return Show; })(); - exports.__esModule = true; + + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/amd/with.js b/dist/amd/with.js index 8ba6a30..68bd57b 100644 --- a/dist/amd/with.js +++ b/dist/amd/with.js @@ -3,11 +3,16 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = _aureliaTemplating.Behavior; var BoundViewFactory = _aureliaTemplating.BoundViewFactory; var ViewSlot = _aureliaTemplating.ViewSlot; + var With = exports.With = (function () { function With(viewFactory, viewSlot) { + _classCallCheck(this, With); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; } @@ -44,5 +49,8 @@ define(["exports", "aurelia-templating"], function (exports, _aureliaTemplating) return With; })(); - exports.__esModule = true; + + Object.defineProperty(exports, "__esModule", { + value: true + }); }); \ No newline at end of file diff --git a/dist/commonjs/compose.js b/dist/commonjs/compose.js index fe415f3..9cd7e6c 100644 --- a/dist/commonjs/compose.js +++ b/dist/commonjs/compose.js @@ -2,15 +2,21 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Container = require("aurelia-dependency-injection").Container; + var _aureliaTemplating = require("aurelia-templating"); var Behavior = _aureliaTemplating.Behavior; var CompositionEngine = _aureliaTemplating.CompositionEngine; var ViewSlot = _aureliaTemplating.ViewSlot; var ViewResources = _aureliaTemplating.ViewResources; + var Compose = exports.Compose = (function () { function Compose(container, compositionEngine, viewSlot, viewResources) { + _classCallCheck(this, Compose); + this.container = container; this.compositionEngine = compositionEngine; this.viewSlot = viewSlot; @@ -69,7 +75,6 @@ var Compose = exports.Compose = (function () { return Compose; })(); - function processInstruction(composer, instruction) { composer.compositionEngine.compose(Object.assign(instruction, { executionContext: composer.executionContext, @@ -81,4 +86,6 @@ function processInstruction(composer, instruction) { composer.current = next; }); } -exports.__esModule = true; \ No newline at end of file +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/global-behavior.js b/dist/commonjs/global-behavior.js index 2a31ddd..e3cd7a6 100644 --- a/dist/commonjs/global-behavior.js +++ b/dist/commonjs/global-behavior.js @@ -4,11 +4,16 @@ var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? ob var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = require("aurelia-templating").Behavior; + var LogManager = _interopRequireWildcard(require("aurelia-logging")); var GlobalBehavior = exports.GlobalBehavior = (function () { function GlobalBehavior(element) { + _classCallCheck(this, GlobalBehavior); + this.element = element; } @@ -81,7 +86,6 @@ var GlobalBehavior = exports.GlobalBehavior = (function () { return GlobalBehavior; })(); - GlobalBehavior.createSettingsFromBehavior = function (behavior) { var settings = {}; @@ -125,4 +129,6 @@ GlobalBehavior.handlers = { } } }; -exports.__esModule = true; \ No newline at end of file +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/if.js b/dist/commonjs/if.js index 0dc3aba..93906e7 100644 --- a/dist/commonjs/if.js +++ b/dist/commonjs/if.js @@ -2,13 +2,18 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var _aureliaTemplating = require("aurelia-templating"); var Behavior = _aureliaTemplating.Behavior; var BoundViewFactory = _aureliaTemplating.BoundViewFactory; var ViewSlot = _aureliaTemplating.ViewSlot; + var If = exports.If = (function () { function If(viewFactory, viewSlot) { + _classCallCheck(this, If); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; this.showing = false; @@ -63,4 +68,7 @@ var If = exports.If = (function () { return If; })(); -exports.__esModule = true; \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/index.js b/dist/commonjs/index.js index 6ee9a4e..99c24dc 100644 --- a/dist/commonjs/index.js +++ b/dist/commonjs/index.js @@ -1,14 +1,20 @@ "use strict"; var Compose = require("./compose").Compose; + var If = require("./if").If; + var With = require("./with").With; + var Repeat = require("./repeat").Repeat; + var Show = require("./show").Show; + var SelectedItem = require("./selected-item").SelectedItem; + var GlobalBehavior = require("./global-behavior").GlobalBehavior; -var InnerHTML = require("./inner-html").InnerHTML; +var InnerHTML = require("./inner-html").InnerHTML; function install(aurelia) { aurelia.withResources([Show, If, With, Repeat, Compose, SelectedItem, GlobalBehavior, InnerHTML]); @@ -23,4 +29,6 @@ exports.InnerHTML = InnerHTML; exports.SelectedItem = SelectedItem; exports.GlobalBehavior = GlobalBehavior; exports.install = install; -exports.__esModule = true; \ No newline at end of file +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/inner-html.js b/dist/commonjs/inner-html.js index 9ec220a..6211f15 100644 --- a/dist/commonjs/inner-html.js +++ b/dist/commonjs/inner-html.js @@ -2,9 +2,14 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = require("aurelia-templating").Behavior; + var InnerHTML = exports.InnerHTML = (function () { function InnerHTML(element) { + _classCallCheck(this, InnerHTML); + this.element = element; this.sanitizer = InnerHTML.defaultSanitizer; } @@ -67,4 +72,7 @@ var InnerHTML = exports.InnerHTML = (function () { return InnerHTML; })(); -exports.__esModule = true; \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/repeat.js b/dist/commonjs/repeat.js index a12d3b7..c69d138 100644 --- a/dist/commonjs/repeat.js +++ b/dist/commonjs/repeat.js @@ -2,18 +2,24 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var _aureliaBinding = require("aurelia-binding"); var ObserverLocator = _aureliaBinding.ObserverLocator; var calcSplices = _aureliaBinding.calcSplices; var getChangeRecords = _aureliaBinding.getChangeRecords; + var _aureliaTemplating = require("aurelia-templating"); var Behavior = _aureliaTemplating.Behavior; var BoundViewFactory = _aureliaTemplating.BoundViewFactory; var ViewSlot = _aureliaTemplating.ViewSlot; + var Repeat = exports.Repeat = (function () { function Repeat(viewFactory, viewSlot, observerLocator) { + _classCallCheck(this, Repeat); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; this.observerLocator = observerLocator; @@ -41,6 +47,7 @@ var Repeat = exports.Repeat = (function () { bind: { value: function bind(executionContext) { var _this = this; + var items = this.items; this.executionContext = executionContext; @@ -130,6 +137,7 @@ var Repeat = exports.Repeat = (function () { processArrayItems: { value: function processArrayItems(items) { var _this = this; + var viewFactory = this.viewFactory, viewSlot = this.viewSlot, i, @@ -156,6 +164,7 @@ var Repeat = exports.Repeat = (function () { processMapEntries: { value: function processMapEntries(items) { var _this = this; + var viewFactory = this.viewFactory, viewSlot = this.viewSlot, index = 0, @@ -254,6 +263,9 @@ var Repeat = exports.Repeat = (function () { length, row; + //TODO: track which views are moved instead of removed better + //TODO: only update context after highest changed index + for (i = 0, ii = splices.length; i < ii; ++i) { splice = splices[i]; removed = splice.removed; @@ -281,7 +293,7 @@ var Repeat = exports.Repeat = (function () { if (view) { viewLookup["delete"](model); - viewSlot.insert(addIndex, view); + viewSlot.insert(addIndex, view); //TODO: move } else { row = this.createBaseExecutionContext(model); view = this.viewFactory.create(row); @@ -363,6 +375,7 @@ var Repeat = exports.Repeat = (function () { child; for (i = 0, ii = viewSlot.children.length; i < ii; ++i) { + // TODO (martingust) better way to get index? child = viewSlot.children[i]; if (child.bindings[0].source[this.key] === key) { return i; @@ -376,4 +389,7 @@ var Repeat = exports.Repeat = (function () { return Repeat; })(); -exports.__esModule = true; \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/selected-item.js b/dist/commonjs/selected-item.js index ee162b0..39f7f87 100644 --- a/dist/commonjs/selected-item.js +++ b/dist/commonjs/selected-item.js @@ -2,9 +2,14 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var Behavior = require("aurelia-templating").Behavior; + var SelectedItem = exports.SelectedItem = (function () { function SelectedItem(element) { + _classCallCheck(this, SelectedItem); + this.element = element; this.options = []; this.callback = this.selectedIndexChanged.bind(this); @@ -88,4 +93,7 @@ var SelectedItem = exports.SelectedItem = (function () { return SelectedItem; })(); -exports.__esModule = true; \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/show.js b/dist/commonjs/show.js index 0f98b59..29a203c 100644 --- a/dist/commonjs/show.js +++ b/dist/commonjs/show.js @@ -2,8 +2,9 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; -var Behavior = require("aurelia-templating").Behavior; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; +var Behavior = require("aurelia-templating").Behavior; function addStyleString(str) { var node = document.createElement("style"); @@ -16,6 +17,8 @@ addStyleString(".aurelia-hide { display:none !important; }"); var Show = exports.Show = (function () { function Show(element) { + _classCallCheck(this, Show); + this.element = element; } @@ -50,4 +53,7 @@ var Show = exports.Show = (function () { return Show; })(); -exports.__esModule = true; \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/commonjs/with.js b/dist/commonjs/with.js index 97f8e36..b6c0c48 100644 --- a/dist/commonjs/with.js +++ b/dist/commonjs/with.js @@ -2,13 +2,18 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var _aureliaTemplating = require("aurelia-templating"); var Behavior = _aureliaTemplating.Behavior; var BoundViewFactory = _aureliaTemplating.BoundViewFactory; var ViewSlot = _aureliaTemplating.ViewSlot; + var With = exports.With = (function () { function With(viewFactory, viewSlot) { + _classCallCheck(this, With); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; } @@ -45,4 +50,7 @@ var With = exports.With = (function () { return With; })(); -exports.__esModule = true; \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); \ No newline at end of file diff --git a/dist/system/compose.js b/dist/system/compose.js index 032197f..0ffdd62 100644 --- a/dist/system/compose.js +++ b/dist/system/compose.js @@ -1,8 +1,5 @@ System.register(["aurelia-dependency-injection", "aurelia-templating"], function (_export) { - "use strict"; - - var Container, Behavior, CompositionEngine, ViewSlot, ViewResources, _prototypeProperties, Compose; - + var Container, Behavior, CompositionEngine, ViewSlot, ViewResources, _prototypeProperties, _classCallCheck, Compose; function processInstruction(composer, instruction) { composer.compositionEngine.compose(Object.assign(instruction, { @@ -25,10 +22,16 @@ System.register(["aurelia-dependency-injection", "aurelia-templating"], function ViewResources = _aureliaTemplating.ViewResources; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + Compose = _export("Compose", (function () { function Compose(container, compositionEngine, viewSlot, viewResources) { + _classCallCheck(this, Compose); + this.container = container; this.compositionEngine = compositionEngine; this.viewSlot = viewSlot; diff --git a/dist/system/global-behavior.js b/dist/system/global-behavior.js index a45c9eb..48f2330 100644 --- a/dist/system/global-behavior.js +++ b/dist/system/global-behavior.js @@ -1,7 +1,6 @@ System.register(["aurelia-templating", "aurelia-logging"], function (_export) { - "use strict"; + var Behavior, LogManager, _prototypeProperties, _classCallCheck, GlobalBehavior; - var Behavior, LogManager, _prototypeProperties, GlobalBehavior; return { setters: [function (_aureliaTemplating) { Behavior = _aureliaTemplating.Behavior; @@ -9,10 +8,16 @@ System.register(["aurelia-templating", "aurelia-logging"], function (_export) { LogManager = _aureliaLogging; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + GlobalBehavior = _export("GlobalBehavior", (function () { function GlobalBehavior(element) { + _classCallCheck(this, GlobalBehavior); + this.element = element; } @@ -85,7 +90,6 @@ System.register(["aurelia-templating", "aurelia-logging"], function (_export) { return GlobalBehavior; })()); - GlobalBehavior.createSettingsFromBehavior = function (behavior) { var settings = {}; diff --git a/dist/system/if.js b/dist/system/if.js index bdd6d47..9b4047c 100644 --- a/dist/system/if.js +++ b/dist/system/if.js @@ -1,7 +1,6 @@ System.register(["aurelia-templating"], function (_export) { - "use strict"; + var Behavior, BoundViewFactory, ViewSlot, _prototypeProperties, _classCallCheck, If; - var Behavior, BoundViewFactory, ViewSlot, _prototypeProperties, If; return { setters: [function (_aureliaTemplating) { Behavior = _aureliaTemplating.Behavior; @@ -9,10 +8,16 @@ System.register(["aurelia-templating"], function (_export) { ViewSlot = _aureliaTemplating.ViewSlot; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + If = _export("If", (function () { function If(viewFactory, viewSlot) { + _classCallCheck(this, If); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; this.showing = false; diff --git a/dist/system/index.js b/dist/system/index.js index 396775c..8b49d63 100644 --- a/dist/system/index.js +++ b/dist/system/index.js @@ -1,9 +1,6 @@ System.register(["./compose", "./if", "./with", "./repeat", "./show", "./selected-item", "./global-behavior", "./inner-html"], function (_export) { - "use strict"; - var Compose, If, With, Repeat, Show, SelectedItem, GlobalBehavior, InnerHTML; - function install(aurelia) { aurelia.withResources([Show, If, With, Repeat, Compose, SelectedItem, GlobalBehavior, InnerHTML]); } @@ -27,6 +24,8 @@ System.register(["./compose", "./if", "./with", "./repeat", "./show", "./selecte InnerHTML = _innerHtml.InnerHTML; }], execute: function () { + "use strict"; + _export("Compose", Compose); _export("If", If); diff --git a/dist/system/inner-html.js b/dist/system/inner-html.js index 17cfb60..9b0a53f 100644 --- a/dist/system/inner-html.js +++ b/dist/system/inner-html.js @@ -1,16 +1,21 @@ System.register(["aurelia-templating"], function (_export) { - "use strict"; + var Behavior, _prototypeProperties, _classCallCheck, InnerHTML; - var Behavior, _prototypeProperties, InnerHTML; return { setters: [function (_aureliaTemplating) { Behavior = _aureliaTemplating.Behavior; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + InnerHTML = _export("InnerHTML", (function () { function InnerHTML(element) { + _classCallCheck(this, InnerHTML); + this.element = element; this.sanitizer = InnerHTML.defaultSanitizer; } diff --git a/dist/system/repeat.js b/dist/system/repeat.js index 9809ed6..9ccbdf5 100644 --- a/dist/system/repeat.js +++ b/dist/system/repeat.js @@ -1,7 +1,6 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { - "use strict"; + var ObserverLocator, calcSplices, getChangeRecords, Behavior, BoundViewFactory, ViewSlot, _prototypeProperties, _classCallCheck, Repeat; - var ObserverLocator, calcSplices, getChangeRecords, Behavior, BoundViewFactory, ViewSlot, _prototypeProperties, Repeat; return { setters: [function (_aureliaBinding) { ObserverLocator = _aureliaBinding.ObserverLocator; @@ -13,10 +12,16 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { ViewSlot = _aureliaTemplating.ViewSlot; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + Repeat = _export("Repeat", (function () { function Repeat(viewFactory, viewSlot, observerLocator) { + _classCallCheck(this, Repeat); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; this.observerLocator = observerLocator; @@ -44,6 +49,7 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { bind: { value: function bind(executionContext) { var _this = this; + var items = this.items; this.executionContext = executionContext; @@ -133,6 +139,7 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { processArrayItems: { value: function processArrayItems(items) { var _this = this; + var viewFactory = this.viewFactory, viewSlot = this.viewSlot, i, @@ -159,6 +166,7 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { processMapEntries: { value: function processMapEntries(items) { var _this = this; + var viewFactory = this.viewFactory, viewSlot = this.viewSlot, index = 0, @@ -257,6 +265,9 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { length, row; + //TODO: track which views are moved instead of removed better + //TODO: only update context after highest changed index + for (i = 0, ii = splices.length; i < ii; ++i) { splice = splices[i]; removed = splice.removed; @@ -284,7 +295,7 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { if (view) { viewLookup["delete"](model); - viewSlot.insert(addIndex, view); + viewSlot.insert(addIndex, view); //TODO: move } else { row = this.createBaseExecutionContext(model); view = this.viewFactory.create(row); @@ -366,6 +377,7 @@ System.register(["aurelia-binding", "aurelia-templating"], function (_export) { child; for (i = 0, ii = viewSlot.children.length; i < ii; ++i) { + // TODO (martingust) better way to get index? child = viewSlot.children[i]; if (child.bindings[0].source[this.key] === key) { return i; diff --git a/dist/system/selected-item.js b/dist/system/selected-item.js index 5181d22..05ed0c9 100644 --- a/dist/system/selected-item.js +++ b/dist/system/selected-item.js @@ -1,16 +1,21 @@ System.register(["aurelia-templating"], function (_export) { - "use strict"; + var Behavior, _prototypeProperties, _classCallCheck, SelectedItem; - var Behavior, _prototypeProperties, SelectedItem; return { setters: [function (_aureliaTemplating) { Behavior = _aureliaTemplating.Behavior; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + SelectedItem = _export("SelectedItem", (function () { function SelectedItem(element) { + _classCallCheck(this, SelectedItem); + this.element = element; this.options = []; this.callback = this.selectedIndexChanged.bind(this); diff --git a/dist/system/show.js b/dist/system/show.js index 933b12b..437cce8 100644 --- a/dist/system/show.js +++ b/dist/system/show.js @@ -1,8 +1,5 @@ System.register(["aurelia-templating"], function (_export) { - "use strict"; - - var Behavior, _prototypeProperties, Show; - + var Behavior, _prototypeProperties, _classCallCheck, Show; function addStyleString(str) { var node = document.createElement("style"); @@ -16,12 +13,18 @@ System.register(["aurelia-templating"], function (_export) { Behavior = _aureliaTemplating.Behavior; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + addStyleString(".aurelia-hide { display:none !important; }"); Show = _export("Show", (function () { function Show(element) { + _classCallCheck(this, Show); + this.element = element; } diff --git a/dist/system/with.js b/dist/system/with.js index a96b729..86df2a0 100644 --- a/dist/system/with.js +++ b/dist/system/with.js @@ -1,7 +1,6 @@ System.register(["aurelia-templating"], function (_export) { - "use strict"; + var Behavior, BoundViewFactory, ViewSlot, _prototypeProperties, _classCallCheck, With; - var Behavior, BoundViewFactory, ViewSlot, _prototypeProperties, With; return { setters: [function (_aureliaTemplating) { Behavior = _aureliaTemplating.Behavior; @@ -9,10 +8,16 @@ System.register(["aurelia-templating"], function (_export) { ViewSlot = _aureliaTemplating.ViewSlot; }], execute: function () { + "use strict"; + _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; + _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + With = _export("With", (function () { function With(viewFactory, viewSlot) { + _classCallCheck(this, With); + this.viewFactory = viewFactory; this.viewSlot = viewSlot; } diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 46d2aab..ed87f05 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,11 @@ +### 0.8.9 (2015-02-28) + + +#### Bug Fixes + +* **package:** update dependencies ([3775b621](http://github.com/aurelia/templating-resources/commit/3775b6218f3d37fffbb032c3490f5a41c78b8891)) + + ### 0.8.8 (2015-02-19) diff --git a/package.json b/package.json index 97d934c..8beb6ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-resources", - "version": "0.8.8", + "version": "0.8.9", "description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.", "keywords": [ "aurelia",