Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1440)

Unified Diff: third_party/pkg/angular/lib/formatter/order_by.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/formatter/order_by.dart
diff --git a/third_party/pkg/angular/lib/filter/order_by.dart b/third_party/pkg/angular/lib/formatter/order_by.dart
similarity index 93%
rename from third_party/pkg/angular/lib/filter/order_by.dart
rename to third_party/pkg/angular/lib/formatter/order_by.dart
index b31b22651dac6053ea66738df71e08a826b7c7fe..739433d5dd845d8cfdd87c7a60b82898d8c6c440 100644
--- a/third_party/pkg/angular/lib/filter/order_by.dart
+++ b/third_party/pkg/angular/lib/formatter/order_by.dart
@@ -1,6 +1,6 @@
-part of angular.filter;
+part of angular.formatter_internal;
-typedef dynamic Mapper(dynamic e);
+typedef dynamic _Mapper(dynamic e);
/**
* Orders the provided [Iterable] by the `expression` predicate.
@@ -104,11 +104,11 @@ typedef dynamic Mapper(dynamic e);
* list itself might be provided as an expression that is looked up on the scope
* chain.
*/
-@NgFilter(name: 'orderBy')
-class OrderByFilter {
+@Formatter(name: 'orderBy')
+class OrderBy implements Function {
Parser _parser;
- OrderByFilter(this._parser);
+ OrderBy(this._parser);
static _nop(e) => e;
static bool _isNonZero(int n) => (n != 0);
@@ -122,7 +122,7 @@ class OrderByFilter {
}
static List _sorted(
- List items, List<Mapper> mappers, List<Comparator> comparators, bool descending) {
+ List items, List<_Mapper> mappers, List<Comparator> comparators, bool descending) {
// Do the standard decorate-sort-undecorate aka Schwartzian dance since Dart
// doesn't support a key/transform parameter to sort().
// Ref: http://en.wikipedia.org/wiki/Schwartzian_transform
@@ -142,7 +142,7 @@ class OrderByFilter {
return null;
}
List expressions = null;
- if (expression is String || expression is Mapper) {
+ if (expression is String || expression is _Mapper) {
expressions = [expression];
} else if (expression is List) {
expressions = expression as List;
@@ -152,7 +152,7 @@ class OrderByFilter {
return items;
}
int numExpressions = expressions.length;
- List<Mapper> mappers = new List(numExpressions);
+ List<_Mapper> mappers = new List(numExpressions);
List<Comparator> comparators = new List<Comparator>(numExpressions);
for (int i = 0; i < numExpressions; i++) {
expression = expressions[i];
@@ -170,8 +170,8 @@ class OrderByFilter {
Expression parsed = _parser(strExp);
mappers[i] = (e) => parsed.eval(e);
}
- } else if (expression is Mapper) {
- mappers[i] = (expression as Mapper);
+ } else if (expression is _Mapper) {
+ mappers[i] = (expression as _Mapper);
comparators[i] = _defaultComparator;
}
}
« no previous file with comments | « third_party/pkg/angular/lib/formatter/number.dart ('k') | third_party/pkg/angular/lib/formatter/stringify.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698