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
@@ -1,4 +1,4 @@
import {CONST_EXPR, Type} from 'angular2/src/core/facade/lang';
import {CONST_EXPR, Type} from 'angular2/src/facade/lang';
import {FORM_DIRECTIVES} from './forms';
import {CORE_DIRECTIVES} from './directives';
@@ -1,4 +1,4 @@
import {CONST_EXPR, Type} from 'angular2/src/core/facade/lang';
import {CONST_EXPR, Type} from 'angular2/src/facade/lang';
import {NgClass} from './ng_class';
import {NgFor} from './ng_for';
import {NgIf} from './ng_if';
@@ -1,4 +1,4 @@
import {isPresent, isString, StringWrapper, isBlank, isArray} from 'angular2/src/core/facade/lang';
import {isPresent, isString, StringWrapper, isBlank, isArray} from 'angular2/src/facade/lang';
import {DoCheck, OnDestroy} from 'angular2/lifecycle_hooks';
import {Directive} from 'angular2/src/core/metadata';
import {ElementRef} from 'angular2/src/core/linker';
@@ -9,7 +9,7 @@ import {
KeyValueDiffers
} from 'angular2/src/core/change_detection';
import {Renderer} from 'angular2/src/core/render';
import {StringMapWrapper, isListLikeIterable} from 'angular2/src/core/facade/collection';
import {StringMapWrapper, isListLikeIterable} from 'angular2/src/facade/collection';
/**
* The `NgClass` directive conditionally adds and removes CSS classes on an HTML element based on
@@ -6,7 +6,7 @@ import {
IterableDiffers
} from 'angular2/src/core/change_detection';
import {ViewContainerRef, TemplateRef, ViewRef} from 'angular2/src/core/linker';
import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {isPresent, isBlank} from 'angular2/src/facade/lang';
/**
* The `NgFor` directive instantiates a template once per item from an iterable. The context for
@@ -1,6 +1,6 @@
import {Directive} from 'angular2/src/core/metadata';
import {ViewContainerRef, TemplateRef} from 'angular2/src/core/linker';
import {isBlank} from 'angular2/src/core/facade/lang';
import {isBlank} from 'angular2/src/facade/lang';
/**
* Removes or recreates a portion of the DOM tree based on an {expression}.
@@ -6,7 +6,7 @@ import {
import {ElementRef} from 'angular2/src/core/linker';
import {Directive} from 'angular2/src/core/metadata';
import {Renderer} from 'angular2/src/core/render';
import {isPresent, isBlank, print} from 'angular2/src/core/facade/lang';
import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
/**
* The `NgStyle` directive changes styles based on a result of expression evaluation.
@@ -1,8 +1,8 @@
import {Directive} from 'angular2/src/core/metadata';
import {Host} from 'angular2/src/core/di';
import {ViewContainerRef, TemplateRef} from 'angular2/src/core/linker';
import {isPresent, isBlank, normalizeBlank, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {ListWrapper, Map} from 'angular2/src/core/facade/collection';
import {isPresent, isBlank, normalizeBlank, CONST_EXPR} from 'angular2/src/facade/lang';
import {ListWrapper, Map} from 'angular2/src/facade/collection';
const _WHEN_DEFAULT = CONST_EXPR(new Object());
@@ -1,5 +1,5 @@
// TS does not have Observables
// I need to be here to make TypeScript think this is a module.
import {} from 'angular2/src/core/facade/lang';
import {} from 'angular2/src/facade/lang';
export var workaround_empty_observable_list_diff: any;
@@ -1,4 +1,4 @@
import {Type, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {Type, CONST_EXPR} from 'angular2/src/facade/lang';
import {NgControlName} from './directives/ng_control_name';
import {NgFormControl} from './directives/ng_form_control';
import {NgModel} from './directives/ng_model';
@@ -1,6 +1,6 @@
import {AbstractControl} from '../model';
import {isPresent} from 'angular2/src/core/facade/lang';
import {unimplemented} from 'angular2/src/core/facade/exceptions';
import {isPresent} from 'angular2/src/facade/lang';
import {unimplemented} from 'angular2/src/facade/exceptions';
/**
* Base class for control directives.
@@ -4,7 +4,7 @@ import {ElementRef} from 'angular2/src/core/linker';
import {Self, forwardRef, Provider} from 'angular2/src/core/di';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {setProperty} from './shared';
const CHECKBOX_VALUE_ACCESSOR = CONST_EXPR(new Provider(
@@ -1,4 +1,4 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {OpaqueToken} from 'angular2/src/core/di';
/**
@@ -3,7 +3,7 @@ import {ElementRef} from 'angular2/src/core/linker';
import {Renderer} from 'angular2/src/core/render';
import {Self, forwardRef, Provider} from 'angular2/src/core/di';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
import {isBlank, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {isBlank, CONST_EXPR} from 'angular2/src/facade/lang';
import {setProperty} from './shared';
const DEFAULT_VALUE_ACCESSOR = CONST_EXPR(new Provider(
@@ -1,6 +1,6 @@
import {ControlValueAccessor} from './control_value_accessor';
import {AbstractControlDirective} from './abstract_control_directive';
import {unimplemented} from 'angular2/src/core/facade/exceptions';
import {unimplemented} from 'angular2/src/facade/exceptions';
/**
* A base class that all control directive extend.
@@ -1,8 +1,8 @@
import {OnInit, OnDestroy} from 'angular2/lifecycle_hooks';
import {Directive} from 'angular2/src/core/metadata';
import {Optional, Inject, Host, SkipSelf, forwardRef, Provider} from 'angular2/src/core/di';
import {ListWrapper} from 'angular2/src/core/facade/collection';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {ListWrapper} from 'angular2/src/facade/collection';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {ControlContainer} from './control_container';
import {controlPath, composeValidators, composeAsyncValidators} from './shared';
@@ -1,5 +1,5 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {OnChanges, OnDestroy} from 'angular2/lifecycle_hooks';
import {SimpleChange} from 'angular2/src/core/change_detection';
import {Query, Directive} from 'angular2/src/core/metadata';
@@ -1,7 +1,7 @@
import {Directive} from 'angular2/src/core/metadata';
import {Self} from 'angular2/src/core/di';
import {NgControl} from './ng_control';
import {isBlank, isPresent} from 'angular2/src/core/facade/lang';
import {isBlank, isPresent} from 'angular2/src/facade/lang';
@Directive({
selector: '[ng-control],[ng-model],[ng-form-control]',
@@ -3,9 +3,9 @@ import {
ObservableWrapper,
EventEmitter,
PromiseCompleter
} from 'angular2/src/core/facade/async';
import {StringMapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {isPresent, isBlank, CONST_EXPR} from 'angular2/src/core/facade/lang';
} from 'angular2/src/facade/async';
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
import {isPresent, isBlank, CONST_EXPR} from 'angular2/src/facade/lang';
import {Directive} from 'angular2/src/core/metadata';
import {forwardRef, Provider, Optional, Inject} from 'angular2/src/core/di';
import {NgControl} from './ng_control';
@@ -1,6 +1,6 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {StringMapWrapper} from 'angular2/src/core/facade/collection';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {StringMapWrapper} from 'angular2/src/facade/collection';
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {OnChanges} from 'angular2/lifecycle_hooks';
import {SimpleChange} from 'angular2/src/core/change_detection';
import {Query, Directive} from 'angular2/src/core/metadata';
@@ -1,6 +1,6 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {ObservableWrapper, EventEmitter} from 'angular2/src/core/facade/async';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {ObservableWrapper, EventEmitter} from 'angular2/src/facade/async';
import {SimpleChange} from 'angular2/src/core/change_detection';
import {OnChanges} from 'angular2/lifecycle_hooks';
@@ -1,5 +1,5 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {OnChanges} from 'angular2/lifecycle_hooks';
import {SimpleChange} from 'angular2/src/core/change_detection';
import {Query, Directive} from 'angular2/src/core/metadata';
@@ -3,7 +3,7 @@ import {ElementRef} from 'angular2/src/core/linker';
import {Renderer} from 'angular2/src/core/render';
import {Self, forwardRef, Provider} from 'angular2/src/core/di';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
import {isBlank, CONST_EXPR, NumberWrapper} from 'angular2/src/core/facade/lang';
import {isBlank, CONST_EXPR, NumberWrapper} from 'angular2/src/facade/lang';
import {setProperty} from './shared';
const NUMBER_VALUE_ACCESSOR = CONST_EXPR(new Provider(
@@ -3,9 +3,9 @@ import {Renderer} from 'angular2/src/core/render';
import {ElementRef, QueryList} from 'angular2/src/core/linker';
import {Query, Directive} from 'angular2/src/core/metadata';
import {ObservableWrapper} from 'angular2/src/core/facade/async';
import {ObservableWrapper} from 'angular2/src/facade/async';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {setProperty} from './shared';
const SELECT_VALUE_ACCESSOR = CONST_EXPR(new Provider(
@@ -1,6 +1,6 @@
import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, isPresent, looseIdentical} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {isBlank, isPresent, looseIdentical} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {ControlContainer} from './control_container';
import {NgControl} from './ng_control';
@@ -1,10 +1,10 @@
import {forwardRef, Provider, OpaqueToken} from 'angular2/src/core/di';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {Attribute, Directive} from 'angular2/src/core/metadata';
import {Validators, NG_VALIDATORS} from '../validators';
import {Control} from '../model';
import * as modelModule from '../model';
import {NumberWrapper} from "angular2/src/core/facade/lang";
import {NumberWrapper} from "angular2/src/facade/lang";
/**
@@ -1,6 +1,6 @@
import {Injectable} from 'angular2/src/core/di';
import {StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isPresent, isArray, CONST_EXPR, Type} from 'angular2/src/core/facade/lang';
import {StringMapWrapper} from 'angular2/src/facade/collection';
import {isPresent, isArray, CONST_EXPR, Type} from 'angular2/src/facade/lang';
import * as modelModule from './model';
+4 -4
View File
@@ -1,7 +1,7 @@
import {StringWrapper, isPresent, isBlank, normalizeBool} from 'angular2/src/core/facade/lang';
import {Observable, EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {PromiseWrapper} from 'angular2/src/core/facade/promise';
import {StringMapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {StringWrapper, isPresent, isBlank, normalizeBool} from 'angular2/src/facade/lang';
import {Observable, EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {PromiseWrapper} from 'angular2/src/facade/promise';
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
/**
* Indicates that a Control is valid, i.e. that no errors exist in the input value.
@@ -1,7 +1,7 @@
import {isBlank, isPresent, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {PromiseWrapper} from 'angular2/src/core/facade/promise';
import {ObservableWrapper} from 'angular2/src/core/facade/async';
import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, isPresent, CONST_EXPR} from 'angular2/src/facade/lang';
import {PromiseWrapper} from 'angular2/src/facade/promise';
import {ObservableWrapper} from 'angular2/src/facade/async';
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {OpaqueToken} from 'angular2/src/core/di';
import * as modelModule from './model';
+1 -1
View File
@@ -10,7 +10,7 @@ import {JsonPipe} from './pipes/json_pipe';
import {SlicePipe} from './pipes/slice_pipe';
import {DatePipe} from './pipes/date_pipe';
import {DecimalPipe, PercentPipe, CurrencyPipe} from './pipes/number_pipe';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
export {AsyncPipe} from './pipes/async_pipe';
export {DatePipe} from './pipes/date_pipe';
@@ -1,5 +1,5 @@
import {isBlank, isPresent, isPromise, CONST} from 'angular2/src/core/facade/lang';
import {Promise, ObservableWrapper, Observable, EventEmitter} from 'angular2/src/core/facade/async';
import {isBlank, isPresent, isPromise, CONST} from 'angular2/src/facade/lang';
import {Promise, ObservableWrapper, Observable, EventEmitter} from 'angular2/src/facade/async';
import {Pipe} from 'angular2/src/core/metadata';
import {Injectable} from 'angular2/src/core/di';
import {
@@ -10,7 +10,7 @@ import {JsonPipe} from './json_pipe';
import {SlicePipe} from './slice_pipe';
import {DatePipe} from './date_pipe';
import {DecimalPipe, PercentPipe, CurrencyPipe} from './number_pipe';
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {CONST_EXPR} from 'angular2/src/facade/lang';
export const COMMON_PIPES = CONST_EXPR([
AsyncPipe,
@@ -7,12 +7,12 @@ import {
CONST,
isBlank,
FunctionWrapper
} from 'angular2/src/core/facade/lang';
import {DateFormatter} from 'angular2/src/core/facade/intl';
} from 'angular2/src/facade/lang';
import {DateFormatter} from 'angular2/src/facade/intl';
import {Injectable} from 'angular2/src/core/di';
import {Pipe} from 'angular2/src/core/metadata';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
import {StringMapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
@@ -1,5 +1,5 @@
import {CONST, Type} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {CONST, Type} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
export class InvalidPipeArgumentException extends BaseException {
constructor(type: Type, value: Object) {
@@ -1,4 +1,4 @@
import {isBlank, isPresent, Json, CONST} from 'angular2/src/core/facade/lang';
import {isBlank, isPresent, Json, CONST} from 'angular2/src/facade/lang';
import {Injectable} from 'angular2/src/core/di';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
import {Pipe} from 'angular2/src/core/metadata';
@@ -1,4 +1,4 @@
import {isString, CONST, isBlank} from 'angular2/src/core/facade/lang';
import {isString, CONST, isBlank} from 'angular2/src/facade/lang';
import {Injectable} from 'angular2/src/core/di';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
import {Pipe} from 'angular2/src/core/metadata';
@@ -7,13 +7,13 @@ import {
RegExpWrapper,
CONST,
FunctionWrapper
} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {NumberFormatter, NumberFormatStyle} from 'angular2/src/core/facade/intl';
} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {NumberFormatter, NumberFormatStyle} from 'angular2/src/facade/intl';
import {Injectable} from 'angular2/src/core/di';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
import {Pipe} from 'angular2/src/core/metadata';
import {ListWrapper} from 'angular2/src/core/facade/collection';
import {ListWrapper} from 'angular2/src/facade/collection';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
@@ -1,6 +1,6 @@
import {isBlank, isString, isArray, StringWrapper, CONST} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {ListWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, isString, isArray, StringWrapper, CONST} from 'angular2/src/facade/lang';
import {BaseException} from 'angular2/src/facade/exceptions';
import {ListWrapper} from 'angular2/src/facade/collection';
import {Injectable} from 'angular2/src/core/di';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
@@ -1,4 +1,4 @@
import {isString, CONST, isBlank} from 'angular2/src/core/facade/lang';
import {isString, CONST, isBlank} from 'angular2/src/facade/lang';
import {Pipe} from 'angular2/src/core/metadata';
import {Injectable} from 'angular2/src/core/di';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';