refactor(core): move directives, pipes, and forms into common

BREAKING CHANGE

All private exports from 'angular2/src/core/{directives,pipes,forms}' should be replaced with 'angular2/src/common/{directives,pipes,formis}'

Closes #5153
This commit is contained in:
vsavkin
2015-11-05 14:58:24 -08:00
committed by Victor Savkin
parent 6edd964a83
commit 695923dcd6
82 changed files with 166 additions and 147 deletions
@@ -16,7 +16,7 @@ import {
} from 'angular2/testing_internal';
import {ListWrapper, StringMapWrapper, SetWrapper} from 'angular2/src/core/facade/collection';
import {Component, View, NgFor, provide} from 'angular2/angular2';
import {NgClass} from 'angular2/src/core/directives/ng_class';
import {NgClass} from 'angular2/src/common/directives/ng_class';
import {APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/linker/view_pool';
function detectChangesAndCheck(fixture: ComponentFixture, classes: string, elIndex: number = 0) {
@@ -17,7 +17,7 @@ import {ListWrapper} from 'angular2/src/core/facade/collection';
import {Component, View, TemplateRef, ContentChild} from 'angular2/angular2';
import {NgFor} from 'angular2/src/core/directives/ng_for';
import {NgFor} from 'angular2/src/common/directives/ng_for';
export function main() {
@@ -19,7 +19,7 @@ import {StringMapWrapper} from 'angular2/src/core/facade/collection';
import {Component, View} from 'angular2/angular2';
import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {NgStyle} from 'angular2/src/core/directives/ng_style';
import {NgStyle} from 'angular2/src/common/directives/ng_style';
export function main() {
describe('binding to CSS styles', () => {
@@ -14,7 +14,7 @@ import {
import {Component, View} from 'angular2/angular2';
import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/src/core/directives/ng_switch';
import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/src/common/directives/ng_switch';
export function main() {
describe('switch', () => {
@@ -17,7 +17,6 @@ import {
import {SpyNgControl, SpyValueAccessor} from '../spies';
import {
ControlGroup,
Control,
@@ -38,7 +37,7 @@ import {
} from 'angular2/core';
import {selectValueAccessor, composeValidators} from 'angular2/src/core/forms/directives/shared';
import {selectValueAccessor, composeValidators} from 'angular2/src/common/forms/directives/shared';
import {TimerWrapper} from 'angular2/src/core/facade/async';
import {PromiseWrapper} from 'angular2/src/core/facade/promise';
import {SimpleChange} from 'angular2/src/core/change_detection';
@@ -9,10 +9,9 @@ import {
afterEach,
AsyncTestCompleter,
inject,
SpyObject,
browserDetection
} from 'angular2/testing_internal';
import {SpyChangeDetectorRef} from './spies';
import {SpyChangeDetectorRef} from '../spies';
import {isBlank} from 'angular2/src/core/facade/lang';
import {AsyncPipe, WrappedValue} from 'angular2/core';
@@ -10,7 +10,6 @@ import {
AsyncTestCompleter,
inject,
proxy,
SpyObject,
TestComponentBuilder
} from 'angular2/testing_internal';
import {Json, RegExp, NumberWrapper, StringWrapper} from 'angular2/src/core/facade/lang';
+20
View File
@@ -0,0 +1,20 @@
library core.spies;
import 'package:angular2/common.dart';
import 'package:angular2/src/core/change_detection/change_detection.dart';
import 'package:angular2/testing_internal.dart';
@proxy
class SpyNgControl extends SpyObject implements NgControl {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyValueAccessor extends SpyObject implements ControlValueAccessor {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyChangeDetectorRef extends SpyObject implements ChangeDetectorRef {
noSuchMethod(m) => super.noSuchMethod(m);
}
@@ -1,7 +1,10 @@
import {ChangeDetectorRef_} from 'angular2/src/core/change_detection/change_detector_ref';
import {SpyObject, proxy} from 'angular2/testing_internal';
export class SpyChangeDetectorRef extends SpyObject {
constructor() { super(ChangeDetectorRef_); }
}
}
export class SpyNgControl extends SpyObject {}
export class SpyValueAccessor extends SpyObject {}
@@ -1,9 +0,0 @@
library pipes.spies;
import 'package:angular2/src/core/change_detection/change_detection.dart';
import 'package:angular2/testing_internal.dart';
@proxy
class SpyChangeDetectorRef extends SpyObject implements ChangeDetectorRef {
noSuchMethod(m) => super.noSuchMethod(m);
}
+1 -11
View File
@@ -106,14 +106,4 @@ class SpyDomAdapter extends SpyObject implements DomAdapter {
class SpyRenderEventDispatcher extends SpyObject
implements RenderEventDispatcher {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyNgControl extends SpyObject implements NgControl {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyValueAccessor extends SpyObject implements ControlValueAccessor {
noSuchMethod(m) => super.noSuchMethod(m);
}
}
+1 -5
View File
@@ -105,8 +105,4 @@ export class SpyRenderEventDispatcher extends SpyObject {
super();
this.spy('dispatchRenderEvent');
}
}
export class SpyNgControl extends SpyObject {}
export class SpyValueAccessor extends SpyObject {}
}