refactor(core): move facades out of core

This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
This commit is contained in:
vsavkin
2015-11-06 17:34:07 -08:00
committed by Victor Savkin
parent 3593d85807
commit 79472b77ca
451 changed files with 823 additions and 979 deletions

View File

@ -1,5 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
import {Promise} from 'angular2/src/core/facade/async';
import {Promise} from 'angular2/src/facade/async';
function waitForElement(selector) {
var EC = (<any>protractor).ExpectedConditions;

View File

@ -1,5 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
import {Promise} from 'angular2/src/core/facade/async';
import {Promise} from 'angular2/src/facade/async';
function waitForElement(selector) {
var EC = (<any>protractor).ExpectedConditions;

View File

@ -1,5 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
import {Promise} from 'angular2/src/core/facade/async';
import {Promise} from 'angular2/src/facade/async';
describe('WebWorkers Kitchen Sink', function() {
afterEach(() => {

View File

@ -1,5 +1,5 @@
import {verifyNoBrowserErrors} from "angular2/src/testing/e2e_util";
import {PromiseWrapper} from "angular2/src/core/facade/async";
import {PromiseWrapper} from "angular2/src/facade/async";
var URL = 'playground/src/web_workers/message_broker/index.html';

View File

@ -1,5 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
import {Promise} from 'angular2/src/core/facade/async';
import {Promise} from 'angular2/src/facade/async';
describe('WebWorkers Todo', function() {
afterEach(() => {

View File

@ -1,6 +1,6 @@
import {bootstrap} from 'angular2/bootstrap';
import {NgIf, Component, View} from 'angular2/core';
import {TimerWrapper} from 'angular2/src/core/facade/async';
import {TimerWrapper} from 'angular2/src/facade/async';
@Component({selector: 'async-app'})
@View({

View File

@ -1,6 +1,6 @@
import {Component, View, NgFor} from 'angular2/angular2';
import {Jsonp, Response} from 'angular2/http';
import {ObservableWrapper} from 'angular2/src/core/facade/async';
import {ObservableWrapper} from 'angular2/src/facade/async';
@Component({selector: 'jsonp-app'})
@View({

View File

@ -1,6 +1,6 @@
import {print} from 'angular2/src/core/facade/lang';
import {print} from 'angular2/src/facade/lang';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
import {isPresent, isBlank, RegExpWrapper, StringWrapper} from 'angular2/src/core/facade/lang';
import {isPresent, isBlank, RegExpWrapper, StringWrapper} from 'angular2/src/facade/lang';
import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Injectable} from 'angular2/core';
import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter';

View File

@ -15,7 +15,7 @@ import {
MdDialogConfig
} from 'angular2_material/src/components/dialog/dialog';
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
import {isPresent} from 'angular2/src/core/facade/lang';
import {isPresent} from 'angular2/src/facade/lang';
@Component({

View File

@ -5,6 +5,7 @@ import {
Validators,
NgFormModel,
FormBuilder,
ControlGroup,
NgIf,
NgFor,
Component,
@ -13,7 +14,7 @@ import {
Host
} from 'angular2/core';
import {RegExpWrapper, print, isPresent} from 'angular2/src/core/facade/lang';
import {RegExpWrapper, print, isPresent} from 'angular2/src/facade/lang';
/**
* Custom validator.
@ -56,7 +57,7 @@ class ShowError {
constructor(@Host() formDir: NgFormModel) { this.formDir = formDir; }
get errorMessage(): string {
var control = this.formDir.form.find(this.controlPath);
var control = (<ControlGroup>this.formDir.form).find(this.controlPath);
if (isPresent(control) && control.touched) {
for (var i = 0; i < this.errorTypes.length; ++i) {
if (control.hasError(this.errorTypes[i])) {

View File

@ -1,6 +1,6 @@
library benchmarks.src.naive_infinite_scroll.app;
import "package:angular2/src/core/facade/collection.dart" show List, ListWrapper;
import "package:angular2/src/facade/collection.dart" show List, ListWrapper;
import "scroll_area.dart" show ScrollAreaComponent;
import "package:angular2/angular2.dart" show Component, Directive, View, IterableDiffers, SkipSelf, Binding;
import "package:angular2/core.dart" show ObservableListDiffFactory, NgIf, NgFor;

View File

@ -1,6 +1,6 @@
library benchmarks.src.naive_infinite_scroll.cells;
import "package:angular2/src/core/facade/collection.dart"
import "package:angular2/src/facade/collection.dart"
show List, ListWrapper, Map;
import "common.dart"
show Company, Opportunity, Offering, Account, CustomDate, STATUS_LIST;

View File

@ -1,7 +1,7 @@
library benchmarks.src.naive_infinite_scroll.common;
import "package:angular2/src/core/facade/math.dart" show Math;
import "package:angular2/src/core/facade/collection.dart";
import "package:angular2/src/facade/math.dart" show Math;
import "package:angular2/src/facade/collection.dart";
import 'package:observe/observe.dart';
import 'dart:collection';
import 'dart:async';

View File

@ -1,7 +1,7 @@
library benchmarks.src.naive_infinite_scroll.random_data;
import "package:angular2/src/core/facade/lang.dart" show StringWrapper;
import "package:angular2/src/core/facade/collection.dart" show List, ListWrapper;
import "package:angular2/src/facade/lang.dart" show StringWrapper;
import "package:angular2/src/facade/collection.dart" show List, ListWrapper;
import "common.dart"
show
CustomDate,

View File

@ -1,7 +1,7 @@
library benchmarks.src.naive_infinite_scroll.scroll_area;
import "package:angular2/src/core/facade/collection.dart" show ListWrapper;
import "package:angular2/src/core/facade/math.dart" show Math;
import "package:angular2/src/facade/collection.dart" show ListWrapper;
import "package:angular2/src/facade/math.dart" show Math;
import "package:angular2/angular2.dart" show Component, Directive, View, ChangeDetectionStrategy;
import "common.dart"
show

View File

@ -14,7 +14,7 @@ import {
Output
} from 'angular2/core';
import {ListWrapper} from 'angular2/src/core/facade/collection';
import {ListWrapper} from 'angular2/src/facade/collection';
/**
* You can find the Angular 1 implementation of this example here:
@ -35,7 +35,7 @@ class Order {
private _dataService: DataService) {}
get items(): OrderItem[] { return this._dataService.itemsFor(this); }
get total(): number { return this.items.map(i => i.total).reduce((a, b) => a + b); }
get total(): number { return this.items.map(i => i.total).reduce((a, b) => a + b, 0); }
}

View File

@ -12,7 +12,7 @@ import {
Injectable
} from 'angular2/core';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
/**

View File

@ -9,9 +9,9 @@ import {
RouteParams
} from 'angular2/router';
import * as db from './data';
import {ObservableWrapper, PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {ListWrapper} from 'angular2/src/core/facade/collection';
import {isPresent, DateWrapper} from 'angular2/src/core/facade/lang';
import {ObservableWrapper, PromiseWrapper, Promise} from 'angular2/src/facade/async';
import {ListWrapper} from 'angular2/src/facade/collection';
import {isPresent, DateWrapper} from 'angular2/src/facade/lang';
class InboxRecord {
id: string = '';

View File

@ -1,4 +1,4 @@
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {bootstrap} from 'angular2/bootstrap';
import {Component, View} from 'angular2/core';

View File

@ -11,11 +11,12 @@ import {
Provider,
FORM_DIRECTIVES,
NgControl,
ControlGroup,
Validators,
NgForm
} from 'angular2/core';
import {RegExpWrapper, print, isPresent, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {RegExpWrapper, print, isPresent, CONST_EXPR} from 'angular2/src/facade/lang';
/**
* A domain model we are binding the form controls to.
@ -80,7 +81,7 @@ class ShowError {
constructor(@Host() formDir: NgForm) { this.formDir = formDir; }
get errorMessage(): string {
var control = this.formDir.form.find(this.controlPath);
var control = (<ControlGroup>this.formDir.form).find(this.controlPath);
if (isPresent(control) && control.touched) {
for (var i = 0; i < this.errorTypes.length; ++i) {
if (control.hasError(this.errorTypes[i])) {

View File

@ -1,5 +1,5 @@
import {Injectable} from 'angular2/angular2';
import {ListWrapper, Predicate} from 'angular2/src/core/facade/collection';
import {ListWrapper, Predicate} from 'angular2/src/facade/collection';
// base model for RecordStore
export class KeyModel {

View File

@ -1,8 +1,8 @@
import {NgZone, NgFor, Component, View, NgIf, FORM_DIRECTIVES} from 'angular2/angular2';
import {BitmapService} from './services/bitmap';
import {EventListener} from 'angular2/src/core/facade/browser';
import {EventListener} from 'angular2/src/facade/browser';
import {FileReader, Uint8ArrayWrapper} from './file_api';
import {TimerWrapper} from 'angular2/src/core/facade/async';
import {TimerWrapper} from 'angular2/src/facade/async';
@Component({selector: 'image-demo', viewProviders: [BitmapService]})
@View({templateUrl: 'image_demo.html', directives: [NgFor, NgIf, FORM_DIRECTIVES]})

View File

@ -1,6 +1,6 @@
import {ElementRef, Component, Directive, View, Injectable} from 'angular2/core';
import {Renderer} from 'angular2/render';
import {StringWrapper} from 'angular2/src/core/facade/lang';
import {StringWrapper} from 'angular2/src/facade/lang';
// A service available to the Injector, used by the HelloCmp component.
@Injectable()

View File

@ -1,4 +1,4 @@
import {PromiseWrapper} from "angular2/src/core/facade/async";
import {PromiseWrapper} from "angular2/src/facade/async";
import {Component, View, ServiceMessageBrokerFactory, PRIMITIVE} from "angular2/web_worker/worker";
const ECHO_CHANNEL = "ECHO";

View File

@ -1,5 +1,5 @@
import {Injectable} from 'angular2/web_worker/worker';
import {ListWrapper, Predicate} from 'angular2/src/core/facade/collection';
import {ListWrapper, Predicate} from 'angular2/src/facade/collection';
// base model for RecordStore
export class KeyModel {

View File

@ -1,5 +1,5 @@
import {Component, EventEmitter, Input, Output} from 'angular2/angular2';
import {ObservableWrapper} from 'angular2/src/core/facade/async';
import {ObservableWrapper} from 'angular2/src/facade/async';
@Component({selector: 'zippy', templateUrl: 'zippy.html'})
export class Zippy {