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 {Injectable} from 'angular2/angular2';
import {global} from 'angular2/src/core/facade/lang';
import {global} from 'angular2/src/facade/lang';
let _nextRequestId = 0;
export const JSONP_HOME = '__ng_jsonp__';

View File

@ -5,8 +5,8 @@ import {Response} from '../static_response';
import {ResponseOptions, BaseResponseOptions} from '../base_response_options';
import {Injectable} from 'angular2/angular2';
import {BrowserJsonp} from './browser_jsonp';
import {makeTypeError} from 'angular2/src/core/facade/exceptions';
import {StringWrapper, isPresent} from 'angular2/src/core/facade/lang';
import {makeTypeError} from 'angular2/src/facade/exceptions';
import {StringWrapper, isPresent} from 'angular2/src/facade/lang';
import {Observable} from 'angular2/angular2';
const JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';

View File

@ -3,8 +3,8 @@ import {Request} from '../static_request';
import {Response} from '../static_response';
import {ReadyStates} from '../enums';
import {Connection, ConnectionBackend} from '../interfaces';
import {isPresent} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {isPresent} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
var Rx = require('@reactivex/rxjs/dist/cjs/Rx');
let {Subject, ReplaySubject} = Rx;

View File

@ -5,7 +5,7 @@ import {Response} from '../static_response';
import {ResponseOptions, BaseResponseOptions} from '../base_response_options';
import {Injectable} from 'angular2/angular2';
import {BrowserXhr} from './browser_xhr';
import {isPresent} from 'angular2/src/core/facade/lang';
import {isPresent} from 'angular2/src/facade/lang';
import {Observable} from 'angular2/angular2';
/**
* Creates connections using `XMLHttpRequest`. Given a fully-qualified

View File

@ -1,4 +1,4 @@
import {isPresent, isString} from 'angular2/src/core/facade/lang';
import {isPresent, isString} from 'angular2/src/facade/lang';
import {Headers} from './headers';
import {RequestMethods} from './enums';
import {RequestOptionsArgs} from './interfaces';

View File

@ -1,5 +1,5 @@
import {Injectable} from 'angular2/angular2';
import {isPresent, isJsObject} from 'angular2/src/core/facade/lang';
import {isPresent, isJsObject} from 'angular2/src/facade/lang';
import {Headers} from './headers';
import {ResponseTypes} from './enums';
import {ResponseOptionsArgs} from './interfaces';

View File

@ -1,4 +1,4 @@
import {StringMapWrapper} from 'angular2/src/core/facade/collection';
import {StringMapWrapper} from 'angular2/src/facade/collection';
/**
* Supported http methods.

View File

@ -1,12 +1,12 @@
import {isPresent, isBlank, isJsObject, isType, StringWrapper} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {isPresent, isBlank, isJsObject, isType, StringWrapper} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {
isListLikeIterable,
Map,
MapWrapper,
StringMapWrapper,
ListWrapper,
} from 'angular2/src/core/facade/collection';
} from 'angular2/src/facade/collection';
/**
* Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as

View File

@ -1,5 +1,5 @@
import {isString, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {makeTypeError} from 'angular2/src/core/facade/exceptions';
import {isString, isPresent, isBlank} from 'angular2/src/facade/lang';
import {makeTypeError} from 'angular2/src/facade/exceptions';
import {Injectable} from 'angular2/angular2';
import {RequestOptionsArgs, Connection, ConnectionBackend} from './interfaces';
import {Request} from './static_request';

View File

@ -1,6 +1,6 @@
import {isString} from 'angular2/src/core/facade/lang';
import {isString} from 'angular2/src/facade/lang';
import {RequestMethods} from './enums';
import {makeTypeError} from 'angular2/src/core/facade/exceptions';
import {makeTypeError} from 'angular2/src/facade/exceptions';
export function normalizeMethodName(method): RequestMethods {
if (isString(method)) {
@ -14,4 +14,4 @@ export function normalizeMethodName(method): RequestMethods {
return method;
}
export {isJsObject} from 'angular2/src/core/facade/lang';
export {isJsObject} from 'angular2/src/facade/lang';

View File

@ -1,7 +1,7 @@
import {ReadyStates, RequestMethods, ResponseTypes} from './enums';
import {Headers} from './headers';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {EventEmitter} from 'angular2/src/core/facade/async';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {EventEmitter} from 'angular2/src/facade/async';
import {Request} from './static_request';
import {URLSearchParams} from './url_search_params';

View File

@ -8,7 +8,7 @@ import {
isPresent,
isJsObject,
StringWrapper
} from 'angular2/src/core/facade/lang';
} from 'angular2/src/facade/lang';
// TODO(jeffbcross): properly implement body accessors
/**

View File

@ -1,6 +1,6 @@
import {ResponseTypes} from './enums';
import {CONST_EXPR, isString, isPresent, Json} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {CONST_EXPR, isString, isPresent, Json} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {Headers} from './headers';
import {ResponseOptions} from './base_response_options';
import {isJsObject} from './http_utils';

View File

@ -1,10 +1,5 @@
import {CONST_EXPR, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {
Map,
MapWrapper,
ListWrapper,
isListLikeIterable
} from 'angular2/src/core/facade/collection';
import {CONST_EXPR, isPresent, isBlank} from 'angular2/src/facade/lang';
import {Map, MapWrapper, ListWrapper, isListLikeIterable} from 'angular2/src/facade/collection';
function paramParser(rawParams: string = ''): Map<string, string[]> {
var map = new Map<string, string[]>();