-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(all): prepare release 1.0.0-beta.1.0.4
- Loading branch information
1 parent
871b380
commit 7816b7b
Showing
35 changed files
with
1,801 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,16 +15,16 @@ System.config({ | |
}, | ||
|
||
map: { | ||
"aurelia-binding": "npm:[email protected].3", | ||
"aurelia-dependency-injection": "npm:[email protected]", | ||
"aurelia-loader": "npm:[email protected]", | ||
"aurelia-binding": "npm:[email protected].5", | ||
"aurelia-dependency-injection": "npm:[email protected].0.1", | ||
"aurelia-loader": "npm:[email protected].0.1", | ||
"aurelia-logging": "npm:[email protected]", | ||
"aurelia-metadata": "npm:[email protected]", | ||
"aurelia-pal": "npm:[email protected].1", | ||
"aurelia-pal-browser": "npm:[email protected].1", | ||
"aurelia-pal": "npm:[email protected].2", | ||
"aurelia-pal-browser": "npm:[email protected].3", | ||
"aurelia-path": "npm:[email protected]", | ||
"aurelia-task-queue": "npm:[email protected]", | ||
"aurelia-templating": "npm:[email protected].2", | ||
"aurelia-templating": "npm:[email protected].3", | ||
"aurelia-templating-binding": "npm:[email protected]", | ||
"babel": "npm:[email protected]", | ||
"babel-runtime": "npm:[email protected]", | ||
|
@@ -44,44 +44,45 @@ System.config({ | |
"npm:[email protected]": { | ||
"util": "npm:[email protected]" | ||
}, | ||
"npm:[email protected].3": { | ||
"npm:[email protected].5": { | ||
"aurelia-metadata": "npm:[email protected]", | ||
"aurelia-pal": "npm:[email protected].1", | ||
"aurelia-pal": "npm:[email protected].2", | ||
"aurelia-task-queue": "npm:[email protected]", | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"npm:[email protected]": { | ||
"npm:[email protected].0.1": { | ||
"aurelia-logging": "npm:[email protected]", | ||
"aurelia-metadata": "npm:[email protected]", | ||
"aurelia-pal": "npm:[email protected].1", | ||
"aurelia-pal": "npm:[email protected].2", | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"npm:[email protected]": { | ||
"npm:[email protected].0.1": { | ||
"aurelia-metadata": "npm:[email protected]", | ||
"aurelia-path": "npm:[email protected]" | ||
}, | ||
"npm:[email protected]": { | ||
"aurelia-pal": "npm:[email protected].1", | ||
"aurelia-pal": "npm:[email protected].2", | ||
"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]" | ||
}, | ||
"npm:[email protected]": { | ||
"aurelia-pal": "npm:[email protected].1" | ||
"aurelia-pal": "npm:[email protected].2" | ||
}, | ||
"npm:[email protected]": { | ||
"aurelia-binding": "npm:[email protected].3", | ||
"aurelia-binding": "npm:[email protected].5", | ||
"aurelia-logging": "npm:[email protected]", | ||
"aurelia-templating": "npm:[email protected].2" | ||
"aurelia-templating": "npm:[email protected].3" | ||
}, | ||
"npm:[email protected].2": { | ||
"aurelia-binding": "npm:[email protected].3", | ||
"aurelia-dependency-injection": "npm:[email protected]", | ||
"aurelia-loader": "npm:[email protected]", | ||
"npm:[email protected].3": { | ||
"aurelia-binding": "npm:[email protected].5", | ||
"aurelia-dependency-injection": "npm:[email protected].0.1", | ||
"aurelia-loader": "npm:[email protected].0.1", | ||
"aurelia-logging": "npm:[email protected]", | ||
"aurelia-metadata": "npm:[email protected]", | ||
"aurelia-pal": "npm:[email protected].1", | ||
"aurelia-pal": "npm:[email protected].2", | ||
"aurelia-path": "npm:[email protected]", | ||
"aurelia-task-queue": "npm:[email protected]", | ||
"core-js": "npm:[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
define(['exports', './repeat-utilities'], function (exports, _repeatUtilities) { | ||
'use strict'; | ||
|
||
exports.__esModule = true; | ||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
|
||
var SetRepeatStrategy = (function () { | ||
function SetRepeatStrategy() { | ||
_classCallCheck(this, SetRepeatStrategy); | ||
} | ||
|
||
SetRepeatStrategy.prototype.getCollectionObserver = function getCollectionObserver(observerLocator, items) { | ||
return observerLocator.getSetObserver(items); | ||
}; | ||
|
||
SetRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { | ||
var _this = this; | ||
|
||
var removePromise = repeat.viewSlot.removeAll(true); | ||
if (removePromise instanceof Promise) { | ||
removePromise.then(function () { | ||
return _this._standardProcessItems(repeat, items); | ||
}); | ||
return; | ||
} | ||
this._standardProcessItems(repeat, items); | ||
}; | ||
|
||
SetRepeatStrategy.prototype._standardProcessItems = function _standardProcessItems(repeat, items) { | ||
var viewFactory = repeat.viewFactory; | ||
var viewSlot = repeat.viewSlot; | ||
var index = 0; | ||
var overrideContext = undefined; | ||
var view = undefined; | ||
|
||
items.forEach(function (value) { | ||
overrideContext = _repeatUtilities.createFullOverrideContext(repeat, value, index, items.size); | ||
view = viewFactory.create(); | ||
view.bind(overrideContext.bindingContext, overrideContext); | ||
viewSlot.add(view); | ||
++index; | ||
}); | ||
}; | ||
|
||
SetRepeatStrategy.prototype.instanceMutated = function instanceMutated(repeat, set, records) { | ||
var viewSlot = repeat.viewSlot; | ||
var value = undefined; | ||
var i = undefined; | ||
var ii = undefined; | ||
var view = undefined; | ||
var overrideContext = undefined; | ||
var removeIndex = undefined; | ||
var record = undefined; | ||
var rmPromises = []; | ||
var viewOrPromise = undefined; | ||
|
||
for (i = 0, ii = records.length; i < ii; ++i) { | ||
record = records[i]; | ||
value = record.value; | ||
switch (record.type) { | ||
case 'add': | ||
overrideContext = _repeatUtilities.createFullOverrideContext(repeat, value, set.size - 1, set.size); | ||
view = repeat.viewFactory.create(); | ||
view.bind(overrideContext.bindingContext, overrideContext); | ||
viewSlot.insert(set.size - 1, view); | ||
break; | ||
case 'delete': | ||
removeIndex = this._getViewIndexByValue(repeat, value); | ||
viewOrPromise = viewSlot.removeAt(removeIndex, true); | ||
if (viewOrPromise instanceof Promise) { | ||
rmPromises.push(viewOrPromise); | ||
} | ||
break; | ||
case 'clear': | ||
viewSlot.removeAll(true); | ||
break; | ||
default: | ||
continue; | ||
} | ||
} | ||
|
||
if (rmPromises.length > 0) { | ||
Promise.all(rmPromises).then(function () { | ||
_repeatUtilities.updateOverrideContexts(repeat.viewSlot.children, 0); | ||
}); | ||
} else { | ||
_repeatUtilities.updateOverrideContexts(repeat.viewSlot.children, 0); | ||
} | ||
}; | ||
|
||
SetRepeatStrategy.prototype._getViewIndexByValue = function _getViewIndexByValue(repeat, value) { | ||
var viewSlot = repeat.viewSlot; | ||
var i = undefined; | ||
var ii = undefined; | ||
var child = undefined; | ||
|
||
for (i = 0, ii = viewSlot.children.length; i < ii; ++i) { | ||
child = viewSlot.children[i]; | ||
if (child.bindingContext[repeat.local] === value) { | ||
return i; | ||
} | ||
} | ||
}; | ||
|
||
return SetRepeatStrategy; | ||
})(); | ||
|
||
exports.SetRepeatStrategy = SetRepeatStrategy; | ||
}); |
Oops, something went wrong.