refactor(core/testing): remove deprecated ViewMetadata (#10837)
Note that this doesn't actually remove all uses, but makes them private.
This commit is contained in:
parent
62078eee45
commit
a86c554a8e
|
@ -90,3 +90,5 @@ export var flattenStyles: typeof t.flattenStyles = r.flattenStyles;
|
|||
export var clearStyles: typeof t.clearStyles = r.clearStyles;
|
||||
export var collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles;
|
||||
export var renderStyles: typeof t.renderStyles = r.renderStyles;
|
||||
export type ViewMetadata = t.ViewMetadata;
|
||||
export var ViewMetadata: typeof t.ViewMetadata = r.ViewMetadata;
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, ComponentMetadata, Injector, ViewMetadata} from '@angular/core';
|
||||
import {Component, ComponentMetadata, Injector} from '@angular/core';
|
||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {ViewMetadata} from '../core_private';
|
||||
import {isBlank, stringify} from '../src/facade/lang';
|
||||
import {MockDirectiveResolver} from '../testing';
|
||||
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
|
||||
import {DirectiveResolver, XHR} from '@angular/compiler';
|
||||
import {MockDirectiveResolver} from '@angular/compiler/testing';
|
||||
import {Compiler, Component, ComponentFactory, Injectable, Injector, Input, NgModule, NgModuleFactory, Type, ViewMetadata} from '@angular/core';
|
||||
import {Compiler, Component, ComponentFactory, Injectable, Injector, Input, NgModule, NgModuleFactory, Type} from '@angular/core';
|
||||
import {ComponentFixture, TestBed, fakeAsync, tick} from '@angular/core/testing';
|
||||
import {TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {expect} from '@angular/platform-browser/testing/matchers';
|
||||
|
||||
import {ViewMetadata} from '../core_private';
|
||||
import {stringify} from '../src/facade/lang';
|
||||
|
||||
import {SpyXHR} from './spies';
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
*/
|
||||
|
||||
import {NgIf} from '@angular/common';
|
||||
import {Component, Injectable, Input, NgModule, Pipe, ViewMetadata} from '@angular/core';
|
||||
import {Component, Injectable, Input, NgModule, Pipe} from '@angular/core';
|
||||
import {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, withModule} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {dispatchEvent} from '@angular/platform-browser/testing/browser_util';
|
||||
import {expect} from '@angular/platform-browser/testing/matchers';
|
||||
|
||||
import {ViewMetadata} from '../core_private';
|
||||
|
||||
@Component(
|
||||
{selector: 'child-comp', template: `<span>Original {{childBinding}}</span>`, directives: []})
|
||||
@Injectable()
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AnimationEntryMetadata, Compiler, ComponentMetadata, DirectiveMetadata, Injectable, Injector, Type, ViewMetadata, resolveForwardRef} from '@angular/core';
|
||||
import {AnimationEntryMetadata, Compiler, ComponentMetadata, DirectiveMetadata, Injectable, Injector, Type, resolveForwardRef} from '@angular/core';
|
||||
import {ViewMetadata} from '../core_private';
|
||||
|
||||
import {DirectiveResolver} from '../src/directive_resolver';
|
||||
import {Map} from '../src/facade/collection';
|
||||
|
|
|
@ -6,9 +6,12 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AnimationEntryMetadata, Compiler, ComponentFactory, Inject, Injectable, Injector, NgZone, Type, ViewMetadata} from '@angular/core';
|
||||
import {AnimationEntryMetadata, Compiler, ComponentFactory, Inject, Injectable, Injector, NgZone, Type} from '@angular/core';
|
||||
import {ComponentFixture, ComponentFixtureNoNgZone, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {ViewMetadata} from '../core_private';
|
||||
import {TestComponentBuilder} from '../core_private_testing';
|
||||
// export {ViewMetadata} from '../core_private';
|
||||
|
||||
import {DirectiveResolver} from '../index';
|
||||
import {MapWrapper} from '../src/facade/collection';
|
||||
|
@ -25,17 +28,17 @@ import {isPresent} from '../src/facade/lang';
|
|||
@Injectable()
|
||||
export class OverridingTestComponentBuilder extends TestComponentBuilder {
|
||||
/** @internal */
|
||||
_bindingsOverrides = new Map<Type<any>, any[]>();
|
||||
private _bindingsOverrides = new Map<Type<any>, any[]>();
|
||||
/** @internal */
|
||||
_directiveOverrides = new Map<Type<any>, Map<Type<any>, Type<any>>>();
|
||||
private _directiveOverrides = new Map<Type<any>, Map<Type<any>, Type<any>>>();
|
||||
/** @internal */
|
||||
_templateOverrides = new Map<Type<any>, string>();
|
||||
private _templateOverrides = new Map<Type<any>, string>();
|
||||
/** @internal */
|
||||
_animationOverrides = new Map<Type<any>, AnimationEntryMetadata[]>();
|
||||
private _animationOverrides = new Map<Type<any>, AnimationEntryMetadata[]>();
|
||||
/** @internal */
|
||||
_viewBindingsOverrides = new Map<Type<any>, any[]>();
|
||||
private _viewBindingsOverrides = new Map<Type<any>, any[]>();
|
||||
/** @internal */
|
||||
_viewOverrides = new Map<Type<any>, ViewMetadata>();
|
||||
private _viewOverrides = new Map<Type<any>, ViewMetadata>();
|
||||
|
||||
constructor(@Inject(TestBed) injector: Injector) { super(injector); }
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@ export declare namespace __core_private_types__ {
|
|||
export var interpolate: typeof view_utils.interpolate;
|
||||
export var ViewUtils: typeof view_utils.ViewUtils;
|
||||
export var VIEW_ENCAPSULATION_VALUES: typeof metadata_view.VIEW_ENCAPSULATION_VALUES;
|
||||
export type ViewMetadata = metadata_view.ViewMetadata;
|
||||
export var ViewMetadata: typeof metadata_view.ViewMetadata;
|
||||
export var DebugContext: typeof debug_context.DebugContext;
|
||||
export var StaticNodeDebugInfo: typeof debug_context.StaticNodeDebugInfo;
|
||||
export var devModeEqual: typeof change_detection_util.devModeEqual;
|
||||
|
@ -144,6 +146,7 @@ export var __core_private__ = {
|
|||
interpolate: view_utils.interpolate,
|
||||
ViewUtils: view_utils.ViewUtils,
|
||||
VIEW_ENCAPSULATION_VALUES: metadata_view.VIEW_ENCAPSULATION_VALUES,
|
||||
ViewMetadata: metadata_view.ViewMetadata,
|
||||
DebugContext: debug_context.DebugContext,
|
||||
StaticNodeDebugInfo: debug_context.StaticNodeDebugInfo,
|
||||
devModeEqual: change_detection_util.devModeEqual,
|
||||
|
|
|
@ -21,5 +21,5 @@ export declare namespace __core_private_testing_types__ {
|
|||
export var __core_private_testing__ = {
|
||||
TestingCompiler: test_compiler.TestingCompiler,
|
||||
TestingCompilerFactory: test_compiler.TestingCompilerFactory,
|
||||
TestComponentBuilder: test_component_builder.TestComponentBuilder
|
||||
TestComponentBuilder: test_component_builder.TestComponentBuilder,
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ export {ANALYZE_FOR_ENTRY_COMPONENTS, AttributeMetadata, ContentChildMetadata, C
|
|||
export {ComponentMetadata, ComponentMetadataType, DirectiveMetadata, DirectiveMetadataType, HostBindingMetadata, HostListenerMetadata, InputMetadata, OutputMetadata, PipeMetadata, PipeMetadataType} from './metadata/directives';
|
||||
export {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './metadata/lifecycle_hooks';
|
||||
export {CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NgModuleMetadata, NgModuleMetadataType, SchemaMetadata} from './metadata/ng_module';
|
||||
export {ViewEncapsulation, ViewMetadata} from './metadata/view';
|
||||
export {ViewEncapsulation} from './metadata/view';
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
*/
|
||||
|
||||
import {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnInit} from '@angular/core';
|
||||
import {Component, Directive, ViewMetadata} from '@angular/core/src/metadata';
|
||||
import {Component, Directive} from '@angular/core/src/metadata';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {AsyncTestCompleter, Log, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
|
||||
export function main() {
|
||||
|
|
|
@ -10,8 +10,9 @@ import {AsyncPipe, NgFor} from '@angular/common';
|
|||
import {ElementSchemaRegistry} from '@angular/compiler/src/schema/element_schema_registry';
|
||||
import {TEST_COMPILER_PROVIDERS} from '@angular/compiler/test/test_bindings';
|
||||
import {MockSchemaRegistry} from '@angular/compiler/testing';
|
||||
import {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, DebugElement, Directive, DoCheck, Injectable, Input, OnChanges, OnDestroy, OnInit, Output, Pipe, PipeTransform, RenderComponentType, Renderer, RootRenderer, SimpleChange, SimpleChanges, TemplateRef, Type, ViewContainerRef, ViewMetadata, WrappedValue, forwardRef} from '@angular/core';
|
||||
import {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, DebugElement, Directive, DoCheck, Injectable, Input, OnChanges, OnDestroy, OnInit, Output, Pipe, PipeTransform, RenderComponentType, Renderer, RootRenderer, SimpleChange, SimpleChanges, TemplateRef, Type, ViewContainerRef, WrappedValue, forwardRef} from '@angular/core';
|
||||
import {DebugDomRenderer} from '@angular/core/src/debug/debug_renderer';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {ComponentFixture, TestBed, fakeAsync, flushMicrotasks, tick} from '@angular/core/testing';
|
||||
import {TestComponentBuilder, afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ANALYZE_FOR_ENTRY_COMPONENTS, Component, ComponentFactoryResolver, NoComponentFactoryError, ViewMetadata, forwardRef} from '@angular/core';
|
||||
import {ANALYZE_FOR_ENTRY_COMPONENTS, Component, ComponentFactoryResolver, NoComponentFactoryError, forwardRef} from '@angular/core';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ import {QueryList} from '@angular/core/src/linker/query_list';
|
|||
import {TemplateRef, TemplateRef_} from '@angular/core/src/linker/template_ref';
|
||||
import {ViewContainerRef} from '@angular/core/src/linker/view_container_ref';
|
||||
import {EmbeddedViewRef} from '@angular/core/src/linker/view_ref';
|
||||
import {Attribute, Component, ContentChildren, Directive, HostBinding, HostListener, Input, Output, Pipe, ViewMetadata} from '@angular/core/src/metadata';
|
||||
import {Attribute, Component, ContentChildren, Directive, HostBinding, HostListener, Input, Output, Pipe} from '@angular/core/src/metadata';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {Renderer} from '@angular/core/src/render';
|
||||
import {ComponentFixture, TestBed, fakeAsync, tick} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, Directive, ElementRef, TemplateRef, ViewContainerRef, ViewEncapsulation, ViewMetadata, forwardRef} from '@angular/core';
|
||||
import {Component, Directive, ElementRef, TemplateRef, ViewContainerRef, ViewEncapsulation, forwardRef} from '@angular/core';
|
||||
import {getAllDebugNodes} from '@angular/core/src/debug/debug_node';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {ComponentFixture} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
*/
|
||||
|
||||
import {NgClass, NgIf} from '@angular/common';
|
||||
import {Component, Injector, OpaqueToken, Pipe, PipeTransform, ViewMetadata, forwardRef} from '@angular/core';
|
||||
import {Component, Injector, OpaqueToken, Pipe, PipeTransform, forwardRef} from '@angular/core';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {expect} from '@angular/platform-browser/testing/matchers';
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
*/
|
||||
|
||||
import {NgFor, NgIf} from '@angular/common';
|
||||
import {Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, DebugElement, Directive, ElementRef, Host, Inject, InjectMetadata, Input, Optional, Pipe, PipeTransform, Self, SkipSelfMetadata, TemplateRef, Type, ViewContainerRef, ViewMetadata, forwardRef} from '@angular/core';
|
||||
import {Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, DebugElement, Directive, ElementRef, Host, Inject, InjectMetadata, Input, Optional, Pipe, PipeTransform, Self, SkipSelfMetadata, TemplateRef, Type, ViewContainerRef, forwardRef} from '@angular/core';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {ComponentFixture, fakeAsync, flushMicrotasks, tick} from '@angular/core/testing';
|
||||
import {TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, Directive, ElementRef, Input, QueryList, ViewChild, ViewChildren, ViewMetadata} from '@angular/core';
|
||||
import {Component, Directive, ElementRef, Input, QueryList, ViewChild, ViewChildren} from '@angular/core';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
|
||||
|
||||
export function main() {
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AnimationEntryMetadata, Compiler, ComponentFactory, Injectable, Injector, NgZone, OpaqueToken, ViewMetadata} from '../index';
|
||||
import {AnimationEntryMetadata, Compiler, ComponentFactory, Injectable, Injector, NgZone, OpaqueToken} from '../index';
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
import {ViewMetadata} from '../src/metadata/view';
|
||||
import {Type} from '../src/type';
|
||||
|
||||
import {ComponentFixture} from './component_fixture';
|
||||
import {tick} from './fake_async';
|
||||
|
||||
import {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, TestComponentRenderer} from './test_bed';
|
||||
|
||||
var _nextRootElementId = 0;
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
*/
|
||||
|
||||
import {NgIf} from '@angular/common';
|
||||
import {Component, ComponentRef, Injectable, Injector, ReflectiveInjector, ViewMetadata, getPlatform} from '@angular/core';
|
||||
import {Component, ComponentRef, Injectable, Injector, ReflectiveInjector, getPlatform} from '@angular/core';
|
||||
import {DebugDomRootRenderer} from '@angular/core/src/debug/debug_renderer';
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
import {RootRenderer} from '@angular/core/src/render/api';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, TestComponentBuilder, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it} from '@angular/core/testing/testing_internal';
|
||||
|
|
|
@ -10,9 +10,10 @@ import {
|
|||
Component,
|
||||
Directive,
|
||||
ViewContainerRef,
|
||||
ViewMetadata
|
||||
} from '@angular/core';
|
||||
|
||||
import {ViewMetadata} from '@angular/core/src/metadata/view';
|
||||
|
||||
import {CompilerConfig, DirectiveResolver} from '@angular/compiler';
|
||||
|
||||
import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util';
|
||||
|
|
|
@ -1314,30 +1314,6 @@ export declare enum ViewEncapsulation {
|
|||
None = 2,
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ViewMetadata {
|
||||
animations: AnimationEntryMetadata[];
|
||||
directives: Array<Type<any> | any[]>;
|
||||
encapsulation: ViewEncapsulation;
|
||||
interpolation: [string, string];
|
||||
pipes: Array<Type<any> | any[]>;
|
||||
styleUrls: string[];
|
||||
styles: string[];
|
||||
template: string;
|
||||
templateUrl: string;
|
||||
constructor({templateUrl, template, directives, pipes, encapsulation, styles, styleUrls, animations, interpolation}?: {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
directives?: Array<Type<any> | any[]>;
|
||||
pipes?: Array<Type<any> | any[]>;
|
||||
encapsulation?: ViewEncapsulation;
|
||||
styles?: string[];
|
||||
styleUrls?: string[];
|
||||
animations?: AnimationEntryMetadata[];
|
||||
interpolation?: [string, string];
|
||||
});
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare class ViewQueryMetadata extends QueryMetadata {
|
||||
isViewQuery: boolean;
|
||||
|
|
Loading…
Reference in New Issue