Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 22, 2016
1 parent 5ad6cab commit a81cf65
Show file tree
Hide file tree
Showing 150 changed files with 6,338 additions and 5,462 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.0.0-beta.1.1.3",
"version": "1.0.0-beta.1.2.0",
"description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.",
"keywords": [
"aurelia",
Expand Down
13 changes: 5 additions & 8 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,25 @@ System.config({
"util": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-metadata": "npm:[email protected].3",
"aurelia-metadata": "npm:[email protected].6",
"aurelia-pal": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]",
"core-js": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected].3",
"aurelia-metadata": "npm:[email protected].6",
"aurelia-pal": "npm:[email protected]",
"core-js": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-metadata": "npm:[email protected].3",
"aurelia-metadata": "npm:[email protected].6",
"aurelia-path": "npm:[email protected]"
},
"npm:[email protected].3": {
"npm:[email protected].6": {
"aurelia-pal": "npm:[email protected]",
"core-js": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-pal": "npm:[email protected]",
"core-js": "npm:[email protected]"
Expand All @@ -88,7 +85,7 @@ System.config({
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-loader": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected].3",
"aurelia-metadata": "npm:[email protected].6",
"aurelia-pal": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]",
Expand Down
58 changes: 58 additions & 0 deletions dist/amd/abstract-repeater.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
define(['exports'], function (exports) {
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

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

var AbstractRepeater = exports.AbstractRepeater = function () {
function AbstractRepeater(options) {
_classCallCheck(this, AbstractRepeater);

Object.assign(this, {
local: 'items',
viewsRequireLifecycle: true
}, options);
}

AbstractRepeater.prototype.viewCount = function viewCount() {
throw new Error('subclass must implement `viewCount`');
};

AbstractRepeater.prototype.views = function views() {
throw new Error('subclass must implement `views`');
};

AbstractRepeater.prototype.view = function view(index) {
throw new Error('subclass must implement `view`');
};

AbstractRepeater.prototype.addView = function addView(bindingContext, overrideContext) {
throw new Error('subclass must implement `addView`');
};

AbstractRepeater.prototype.insertView = function insertView(index, bindingContext, overrideContext) {
throw new Error('subclass must implement `insertView`');
};

AbstractRepeater.prototype.removeAllViews = function removeAllViews(returnToCache, skipAnimation) {
throw new Error('subclass must implement `removeAllViews`');
};

AbstractRepeater.prototype.removeView = function removeView(index, returnToCache, skipAnimation) {
throw new Error('subclass must implement `removeView`');
};

AbstractRepeater.prototype.updateBindings = function updateBindings(view) {
throw new Error('subclass must implement `updateBindings`');
};

return AbstractRepeater;
}();
});
7 changes: 4 additions & 3 deletions dist/amd/analyze-view-factory.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
define(['exports'], function (exports) {
'use strict';

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.viewsRequireLifecycle = viewsRequireLifecycle;
var lifecycleOptionalBehaviors = ['focus', 'if', 'repeat', 'show', 'with'];
var lifecycleOptionalBehaviors = exports.lifecycleOptionalBehaviors = ['focus', 'if', 'repeat', 'show', 'with'];

exports.lifecycleOptionalBehaviors = lifecycleOptionalBehaviors;
function behaviorRequiresLifecycle(instruction) {
var t = instruction.type;
var name = t.elementName !== null ? t.elementName : t.attributeName;
Expand Down
78 changes: 33 additions & 45 deletions dist/amd/array-repeat-strategy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports, _repeatUtilities, _aureliaBinding) {
'use strict';

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrayRepeatStrategy = undefined;

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

var ArrayRepeatStrategy = (function () {
var ArrayRepeatStrategy = exports.ArrayRepeatStrategy = function () {
function ArrayRepeatStrategy() {
_classCallCheck(this, ArrayRepeatStrategy);
}
Expand All @@ -18,7 +25,7 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,
var _this = this;

if (repeat.viewsRequireLifecycle) {
var removePromise = repeat.viewSlot.removeAll(true);
var removePromise = repeat.removeAllViews(true);
if (removePromise instanceof Promise) {
removePromise.then(function () {
return _this._standardProcessInstanceChanged(repeat, items);
Expand All @@ -33,26 +40,24 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,

ArrayRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) {
for (var i = 0, ii = items.length; i < ii; i++) {
var overrideContext = _repeatUtilities.createFullOverrideContext(repeat, items[i], i, ii);
var view = repeat.viewFactory.create();
view.bind(overrideContext.bindingContext, overrideContext);
repeat.viewSlot.add(view);
var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, items[i], i, ii);
repeat.addView(overrideContext.bindingContext, overrideContext);
}
};

ArrayRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) {
var itemsLength = items.length;
var viewsLength = repeat.viewSlot.children.length;
var viewsLength = repeat.viewCount();

while (viewsLength > itemsLength) {
viewsLength--;
repeat.viewSlot.removeAt(viewsLength, true);
repeat.removeView(viewsLength, true);
}

var local = repeat.local;

for (var i = 0; i < viewsLength; i++) {
var view = repeat.viewSlot.children[i];
var view = repeat.view(i);
var last = i === itemsLength - 1;
var middle = i !== 0 && !last;

Expand All @@ -63,25 +68,12 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,
view.bindingContext[local] = items[i];
view.overrideContext.$middle = middle;
view.overrideContext.$last = last;
var j = view.bindings.length;
while (j--) {
_repeatUtilities.updateOneTimeBinding(view.bindings[j]);
}
j = view.controllers.length;
while (j--) {
var k = view.controllers[j].boundProperties.length;
while (k--) {
var binding = view.controllers[j].boundProperties[k].binding;
_repeatUtilities.updateOneTimeBinding(binding);
}
}
repeat.updateBindings(view);
}

for (var i = viewsLength; i < itemsLength; i++) {
var overrideContext = _repeatUtilities.createFullOverrideContext(repeat, items[i], i, itemsLength);
var view = repeat.viewFactory.create();
view.bind(overrideContext.bindingContext, overrideContext);
repeat.viewSlot.add(view);
for (var _i = viewsLength; _i < itemsLength; _i++) {
var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, items[_i], _i, itemsLength);
repeat.addView(overrideContext.bindingContext, overrideContext);
}
};

Expand All @@ -103,8 +95,9 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,
var removed = _splices$i.removed;
var addedCount = _splices$i.addedCount;

_aureliaBinding.mergeSplice(repeat.__queuedSplices, index, removed, addedCount);
(0, _aureliaBinding.mergeSplice)(repeat.__queuedSplices, index, removed, addedCount);
}

repeat.__array = array.slice(0);
return;
}
Expand All @@ -116,8 +109,8 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,

var runQueuedSplices = function runQueuedSplices() {
if (!queuedSplices.length) {
delete repeat.__queuedSplices;
delete repeat.__array;
repeat.__queuedSplices = undefined;
repeat.__array = undefined;
return;
}

Expand All @@ -135,15 +128,14 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,
var _this3 = this;

var removeDelta = 0;
var viewSlot = repeat.viewSlot;
var rmPromises = [];

for (var i = 0, ii = splices.length; i < ii; ++i) {
var splice = splices[i];
var removed = splice.removed;

for (var j = 0, jj = removed.length; j < jj; ++j) {
var viewOrPromise = viewSlot.removeAt(splice.index + removeDelta + rmPromises.length, true);
var viewOrPromise = repeat.removeView(splice.index + removeDelta + rmPromises.length, true);
if (viewOrPromise instanceof Promise) {
rmPromises.push(viewOrPromise);
}
Expand All @@ -154,17 +146,17 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,
if (rmPromises.length > 0) {
return Promise.all(rmPromises).then(function () {
var spliceIndexLow = _this3._handleAddedSplices(repeat, array, splices);
_repeatUtilities.updateOverrideContexts(repeat.viewSlot.children, spliceIndexLow);
(0, _repeatUtilities.updateOverrideContexts)(repeat.views(), spliceIndexLow);
});
}

var spliceIndexLow = this._handleAddedSplices(repeat, array, splices);
_repeatUtilities.updateOverrideContexts(repeat.viewSlot.children, spliceIndexLow);
(0, _repeatUtilities.updateOverrideContexts)(repeat.views(), spliceIndexLow);
};

ArrayRepeatStrategy.prototype._handleAddedSplices = function _handleAddedSplices(repeat, array, splices) {
var spliceIndex = undefined;
var spliceIndexLow = undefined;
var spliceIndex = void 0;
var spliceIndexLow = void 0;
var arrayLength = array.length;
for (var i = 0, ii = splices.length; i < ii; ++i) {
var splice = splices[i];
Expand All @@ -176,18 +168,14 @@ define(['exports', './repeat-utilities', 'aurelia-binding'], function (exports,
}

for (; addIndex < end; ++addIndex) {
var overrideContext = _repeatUtilities.createFullOverrideContext(repeat, array[addIndex], addIndex, arrayLength);
var view = repeat.viewFactory.create();
view.bind(overrideContext.bindingContext, overrideContext);
repeat.viewSlot.insert(addIndex, view);
var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, array[addIndex], addIndex, arrayLength);
repeat.insertView(addIndex, overrideContext.bindingContext, overrideContext);
}
}

return spliceIndexLow;
};

return ArrayRepeatStrategy;
})();

exports.ArrayRepeatStrategy = ArrayRepeatStrategy;
}();
});
Loading

0 comments on commit a81cf65

Please sign in to comment.