@angular/core 6.0.0-rc.3 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +95 -19
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +10 -11
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +555 -389
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +77 -77
- package/bundles/core.umd.min.js.map +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/index.js +2 -2
- package/esm2015/public_api.js +2 -2
- package/esm2015/src/application_ref.js +6 -6
- package/esm2015/src/change_detection/change_detection_util.js +3 -3
- package/esm2015/src/change_detection/change_detector_ref.js +2 -2
- package/esm2015/src/change_detection/constants.js +1 -1
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +15 -15
- package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +2 -2
- package/esm2015/src/change_detection/differs/iterable_differs.js +15 -7
- package/esm2015/src/change_detection/differs/keyvalue_differs.js +6 -6
- package/esm2015/src/change_detection/pipe_transform.js +2 -2
- package/esm2015/src/core.js +4 -4
- package/esm2015/src/core_private_export.js +2 -2
- package/esm2015/src/core_render3_private_export.js +2 -2
- package/esm2015/src/di/defs.js +36 -19
- package/esm2015/src/di/injectable.js +3 -3
- package/esm2015/src/di/injection_token.js +2 -2
- package/esm2015/src/di/injector.js +35 -14
- package/esm2015/src/di/metadata.js +11 -11
- package/esm2015/src/di/provider.js +9 -9
- package/esm2015/src/di/r3_injector.js +12 -12
- package/esm2015/src/di/reflective_errors.js +3 -3
- package/esm2015/src/di.js +1 -1
- package/esm2015/src/error_handler.js +2 -2
- package/esm2015/src/event_emitter.js +2 -2
- package/esm2015/src/linker/compiler.js +2 -2
- package/esm2015/src/linker/component_factory.js +3 -3
- package/esm2015/src/linker/component_factory_resolver.js +2 -2
- package/esm2015/src/linker/element_ref.js +3 -3
- package/esm2015/src/linker/ng_module_factory.js +2 -2
- package/esm2015/src/linker/ng_module_factory_loader.js +2 -2
- package/esm2015/src/linker/query_list.js +2 -2
- package/esm2015/src/linker/template_ref.js +2 -2
- package/esm2015/src/linker/view_container_ref.js +2 -2
- package/esm2015/src/linker/view_ref.js +2 -2
- package/esm2015/src/metadata/di.js +12 -12
- package/esm2015/src/metadata/directives.js +15 -15
- package/esm2015/src/metadata/lifecycle_hooks.js +10 -10
- package/esm2015/src/metadata/ng_module.js +5 -5
- package/esm2015/src/metadata/view.js +1 -1
- package/esm2015/src/render3/assert.js +13 -1
- package/esm2015/src/render3/component.js +2 -1
- package/esm2015/src/render3/definition.js +4 -4
- package/esm2015/src/render3/di.js +61 -89
- package/esm2015/src/render3/hooks.js +7 -7
- package/esm2015/src/render3/index.js +1 -1
- package/esm2015/src/render3/instructions.js +128 -79
- package/esm2015/src/render3/interfaces/definition.js +9 -1
- package/esm2015/src/render3/interfaces/injector.js +1 -3
- package/esm2015/src/render3/interfaces/node.js +7 -11
- package/esm2015/src/render3/interfaces/view.js +17 -3
- package/esm2015/src/render3/node_manipulation.js +23 -3
- package/esm2015/src/render3/query.js +9 -7
- package/esm2015/src/sanitization/security.js +2 -2
- package/esm2015/src/type.js +2 -2
- package/esm2015/src/util/decorators.js +2 -2
- package/esm2015/src/util/lang.js +2 -2
- package/esm2015/src/version.js +4 -4
- package/esm2015/src/view/ng_module.js +5 -2
- package/esm2015/src/view/refs.js +1 -1
- package/esm2015/testing/src/async.js +2 -2
- package/esm2015/testing/src/async_fallback.js +2 -2
- package/esm2015/testing/src/component_fixture.js +2 -2
- package/esm2015/testing/src/test_bed.js +3 -3
- package/esm5/src/application_ref.js +7 -7
- package/esm5/src/change_detection/change_detection_util.js +7 -7
- package/esm5/src/change_detection/change_detector_ref.js +4 -4
- package/esm5/src/change_detection/constants.js +4 -4
- package/esm5/src/change_detection/differs/default_iterable_differ.js +18 -18
- package/esm5/src/change_detection/differs/default_keyvalue_differ.js +3 -3
- package/esm5/src/change_detection/differs/iterable_differs.js +9 -11
- package/esm5/src/change_detection/differs/keyvalue_differs.js +4 -4
- package/esm5/src/change_detection/pipe_transform.js +1 -1
- package/esm5/src/core_private_export.js +2 -2
- package/esm5/src/core_render3_private_export.js +2 -2
- package/esm5/src/di/defs.js +3 -6
- package/esm5/src/di/injectable.js +2 -2
- package/esm5/src/di/injection_token.js +4 -4
- package/esm5/src/di/injector.js +26 -11
- package/esm5/src/di/metadata.js +6 -6
- package/esm5/src/di/provider.js +1 -1
- package/esm5/src/di/r3_injector.js +12 -12
- package/esm5/src/di/reflective_errors.js +3 -3
- package/esm5/src/di.js +2 -2
- package/esm5/src/error_handler.js +4 -4
- package/esm5/src/event_emitter.js +4 -4
- package/esm5/src/linker/compiler.js +2 -2
- package/esm5/src/linker/component_factory.js +7 -7
- package/esm5/src/linker/component_factory_resolver.js +2 -2
- package/esm5/src/linker/element_ref.js +4 -4
- package/esm5/src/linker/ng_module_factory.js +4 -4
- package/esm5/src/linker/ng_module_factory_loader.js +4 -4
- package/esm5/src/linker/query_list.js +4 -4
- package/esm5/src/linker/template_ref.js +4 -4
- package/esm5/src/linker/view_container_ref.js +4 -4
- package/esm5/src/linker/view_ref.js +4 -4
- package/esm5/src/metadata/di.js +9 -9
- package/esm5/src/metadata/directives.js +8 -8
- package/esm5/src/metadata/lifecycle_hooks.js +1 -1
- package/esm5/src/metadata/ng_module.js +3 -3
- package/esm5/src/metadata/view.js +4 -4
- package/esm5/src/render3/assert.js +6 -1
- package/esm5/src/render3/component.js +2 -1
- package/esm5/src/render3/definition.js +1 -1
- package/esm5/src/render3/di.js +51 -74
- package/esm5/src/render3/hooks.js +6 -6
- package/esm5/src/render3/index.js +1 -1
- package/esm5/src/render3/instructions.js +123 -76
- package/esm5/src/render3/interfaces/definition.js +1 -1
- package/esm5/src/render3/interfaces/injector.js +1 -1
- package/esm5/src/render3/interfaces/node.js +1 -1
- package/esm5/src/render3/interfaces/view.js +1 -1
- package/esm5/src/render3/node_manipulation.js +20 -2
- package/esm5/src/render3/query.js +9 -7
- package/esm5/src/sanitization/security.js +7 -7
- package/esm5/src/type.js +2 -2
- package/esm5/src/util/decorators.js +1 -1
- package/esm5/src/util/lang.js +2 -2
- package/esm5/src/version.js +6 -6
- package/esm5/src/view/ng_module.js +5 -2
- package/esm5/src/view/refs.js +1 -1
- package/esm5/testing/src/async.js +2 -2
- package/esm5/testing/src/async_fallback.js +2 -2
- package/esm5/testing/src/component_fixture.js +4 -4
- package/esm5/testing/src/test_bed.js +5 -5
- package/fesm2015/core.js +468 -372
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +6 -6
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +403 -321
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +6 -6
- package/fesm5/testing.js.map +1 -1
- package/package.json +5 -4
- package/src/application_ref.d.ts +5 -5
- package/src/change_detection/change_detection_util.d.ts +2 -2
- package/src/change_detection/change_detector_ref.d.ts +1 -1
- package/src/change_detection/constants.d.ts +1 -1
- package/src/change_detection/differs/default_iterable_differ.d.ts +1 -1
- package/src/change_detection/differs/iterable_differs.d.ts +8 -7
- package/src/change_detection/differs/keyvalue_differs.d.ts +5 -5
- package/src/change_detection/pipe_transform.d.ts +1 -1
- package/src/core_private_export.d.ts +1 -1
- package/src/core_render3_private_export.d.ts +1 -1
- package/src/di/defs.d.ts +29 -10
- package/src/di/injectable.d.ts +3 -3
- package/src/di/injection_token.d.ts +3 -4
- package/src/di/injector.d.ts +14 -11
- package/src/di/metadata.d.ts +20 -20
- package/src/di/provider.d.ts +10 -10
- package/src/di/r3_injector.d.ts +3 -3
- package/src/di/reflective_errors.d.ts +2 -2
- package/src/di.d.ts +1 -1
- package/src/error_handler.d.ts +1 -1
- package/src/event_emitter.d.ts +1 -1
- package/src/linker/compiler.d.ts +1 -1
- package/src/linker/component_factory.d.ts +2 -2
- package/src/linker/component_factory_resolver.d.ts +1 -1
- package/src/linker/element_ref.d.ts +2 -2
- package/src/linker/ng_module_factory.d.ts +1 -1
- package/src/linker/ng_module_factory_loader.d.ts +1 -1
- package/src/linker/query_list.d.ts +1 -1
- package/src/linker/template_ref.d.ts +1 -1
- package/src/linker/view_container_ref.d.ts +1 -1
- package/src/linker/view_ref.d.ts +1 -1
- package/src/metadata/di.d.ts +21 -21
- package/src/metadata/directives.d.ts +28 -28
- package/src/metadata/lifecycle_hooks.d.ts +9 -9
- package/src/metadata/ng_module.d.ts +5 -5
- package/src/metadata/view.d.ts +1 -1
- package/src/render3/assert.d.ts +1 -0
- package/src/render3/definition.d.ts +3 -3
- package/src/render3/di.d.ts +4 -14
- package/src/render3/index.d.ts +2 -1
- package/src/render3/instructions.d.ts +3 -3
- package/src/render3/interfaces/definition.d.ts +23 -4
- package/src/render3/interfaces/injector.d.ts +0 -2
- package/src/render3/interfaces/node.d.ts +7 -13
- package/src/render3/interfaces/view.d.ts +16 -3
- package/src/render3/node_manipulation.d.ts +3 -2
- package/src/sanitization/security.d.ts +2 -2
- package/src/type.d.ts +1 -1
- package/src/util/decorators.d.ts +1 -1
- package/src/version.d.ts +2 -2
- package/testing/src/async.d.ts +1 -1
- package/testing/src/async_fallback.d.ts +1 -1
- package/testing/src/component_fixture.d.ts +1 -1
- package/testing/src/test_bed.d.ts +2 -2
- package/testing.d.ts +1 -1
|
@@ -9,7 +9,7 @@ import { SimpleChange } from '../change_detection/change_detection_util';
|
|
|
9
9
|
/**
|
|
10
10
|
* A `changes` object whose keys are property names and
|
|
11
11
|
* values are instances of {@link SimpleChange}. See {@link OnChanges}
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
*/
|
|
14
14
|
export interface SimpleChanges {
|
|
15
15
|
[propName: string]: SimpleChange;
|
|
@@ -27,7 +27,7 @@ export interface SimpleChanges {
|
|
|
27
27
|
*
|
|
28
28
|
* See {@linkDocs guide/lifecycle-hooks#onchanges "Lifecycle Hooks Guide"}.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
30
|
+
*
|
|
31
31
|
*/
|
|
32
32
|
export interface OnChanges {
|
|
33
33
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -46,7 +46,7 @@ export interface OnChanges {
|
|
|
46
46
|
*
|
|
47
47
|
* See {@linkDocs guide/lifecycle-hooks "Lifecycle Hooks Guide"}.
|
|
48
48
|
*
|
|
49
|
-
*
|
|
49
|
+
*
|
|
50
50
|
*/
|
|
51
51
|
export interface OnInit {
|
|
52
52
|
ngOnInit(): void;
|
|
@@ -71,7 +71,7 @@ export interface OnInit {
|
|
|
71
71
|
*
|
|
72
72
|
* See {@linkDocs guide/lifecycle-hooks#docheck "Lifecycle Hooks Guide"}.
|
|
73
73
|
*
|
|
74
|
-
*
|
|
74
|
+
*
|
|
75
75
|
*/
|
|
76
76
|
export interface DoCheck {
|
|
77
77
|
ngDoCheck(): void;
|
|
@@ -88,7 +88,7 @@ export interface DoCheck {
|
|
|
88
88
|
*
|
|
89
89
|
* See {@linkDocs guide/lifecycle-hooks "Lifecycle Hooks Guide"}.
|
|
90
90
|
*
|
|
91
|
-
*
|
|
91
|
+
*
|
|
92
92
|
*/
|
|
93
93
|
export interface OnDestroy {
|
|
94
94
|
ngOnDestroy(): void;
|
|
@@ -104,7 +104,7 @@ export interface OnDestroy {
|
|
|
104
104
|
*
|
|
105
105
|
* See {@linkDocs guide/lifecycle-hooks#aftercontent "Lifecycle Hooks Guide"}.
|
|
106
106
|
*
|
|
107
|
-
*
|
|
107
|
+
*
|
|
108
108
|
*/
|
|
109
109
|
export interface AfterContentInit {
|
|
110
110
|
ngAfterContentInit(): void;
|
|
@@ -118,7 +118,7 @@ export interface AfterContentInit {
|
|
|
118
118
|
*
|
|
119
119
|
* See {@linkDocs guide/lifecycle-hooks#aftercontent "Lifecycle Hooks Guide"}.
|
|
120
120
|
*
|
|
121
|
-
*
|
|
121
|
+
*
|
|
122
122
|
*/
|
|
123
123
|
export interface AfterContentChecked {
|
|
124
124
|
ngAfterContentChecked(): void;
|
|
@@ -133,7 +133,7 @@ export interface AfterContentChecked {
|
|
|
133
133
|
*
|
|
134
134
|
* See {@linkDocs guide/lifecycle-hooks#afterview "Lifecycle Hooks Guide"}.
|
|
135
135
|
*
|
|
136
|
-
*
|
|
136
|
+
*
|
|
137
137
|
*/
|
|
138
138
|
export interface AfterViewInit {
|
|
139
139
|
ngAfterViewInit(): void;
|
|
@@ -147,7 +147,7 @@ export interface AfterViewInit {
|
|
|
147
147
|
*
|
|
148
148
|
* See {@linkDocs guide/lifecycle-hooks#afterview "Lifecycle Hooks Guide"}.
|
|
149
149
|
*
|
|
150
|
-
*
|
|
150
|
+
*
|
|
151
151
|
*/
|
|
152
152
|
export interface AfterViewChecked {
|
|
153
153
|
ngAfterViewChecked(): void;
|
|
@@ -4,7 +4,7 @@ import { TypeDecorator } from '../util/decorators';
|
|
|
4
4
|
/**
|
|
5
5
|
* A wrapper around a module that also includes the providers.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
8
|
*/
|
|
9
9
|
export interface ModuleWithProviders {
|
|
10
10
|
ngModule: Type<any>;
|
|
@@ -24,7 +24,7 @@ export interface SchemaMetadata {
|
|
|
24
24
|
* - any properties on elements with a `-` in their name which is the common rule for custom
|
|
25
25
|
* elements.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
27
|
+
*
|
|
28
28
|
*/
|
|
29
29
|
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
|
30
30
|
/**
|
|
@@ -36,7 +36,7 @@ export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
|
|
36
36
|
/**
|
|
37
37
|
* Type of the NgModule decorator / constructor function.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
40
|
*/
|
|
41
41
|
export interface NgModuleDecorator {
|
|
42
42
|
/**
|
|
@@ -48,7 +48,7 @@ export interface NgModuleDecorator {
|
|
|
48
48
|
/**
|
|
49
49
|
* Type of the NgModule metadata.
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
*
|
|
52
52
|
*/
|
|
53
53
|
export interface NgModule {
|
|
54
54
|
/**
|
|
@@ -162,7 +162,7 @@ export interface NgModule {
|
|
|
162
162
|
/**
|
|
163
163
|
* NgModule decorator and metadata.
|
|
164
164
|
*
|
|
165
|
-
*
|
|
165
|
+
*
|
|
166
166
|
* @Annotation
|
|
167
167
|
*/
|
|
168
168
|
export declare const NgModule: NgModuleDecorator;
|
package/src/metadata/view.d.ts
CHANGED
package/src/render3/assert.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare function assertEqual<T>(actual: T, expected: T, msg: string): voi
|
|
|
10
10
|
export declare function assertNotEqual<T>(actual: T, expected: T, msg: string): void;
|
|
11
11
|
export declare function assertSame<T>(actual: T, expected: T, msg: string): void;
|
|
12
12
|
export declare function assertLessThan<T>(actual: T, expected: T, msg: string): void;
|
|
13
|
+
export declare function assertGreaterThan<T>(actual: T, expected: T, msg: string): void;
|
|
13
14
|
export declare function assertNull<T>(actual: T, msg: string): void;
|
|
14
15
|
export declare function assertNotNull<T>(actual: T, msg: string): void;
|
|
15
16
|
export declare function assertComponentType(actual: any, msg?: string): void;
|
|
@@ -136,7 +136,7 @@ export declare function defineComponent<T>(componentDefinition: {
|
|
|
136
136
|
* `PipeDefs`s. The function is necessary to be able to support forward declarations.
|
|
137
137
|
*/
|
|
138
138
|
pipes?: PipeTypesOrFactory | null;
|
|
139
|
-
}):
|
|
139
|
+
}): never;
|
|
140
140
|
export declare function extractDirectiveDef(type: DirectiveType<any> & ComponentType<any>): DirectiveDef<any> | ComponentDef<any>;
|
|
141
141
|
export declare function extractPipeDef(type: PipeType<any>): PipeDef<any>;
|
|
142
142
|
/**
|
|
@@ -192,7 +192,7 @@ export declare const defineDirective: <T>(directiveDefinition: {
|
|
|
192
192
|
features?: DirectiveDefFeature[] | undefined;
|
|
193
193
|
hostBindings?: ((directiveIndex: number, elementIndex: number) => void) | undefined;
|
|
194
194
|
exportAs?: string | undefined;
|
|
195
|
-
}) =>
|
|
195
|
+
}) => never;
|
|
196
196
|
/**
|
|
197
197
|
* Create a pipe definition object.
|
|
198
198
|
*
|
|
@@ -216,4 +216,4 @@ export declare function definePipe<T>(pipeDef: {
|
|
|
216
216
|
factory: () => T;
|
|
217
217
|
/** Whether the pipe is pure. */
|
|
218
218
|
pure?: boolean;
|
|
219
|
-
}):
|
|
219
|
+
}): never;
|
package/src/render3/di.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { ChangeDetectorRef as viewEngine_ChangeDetectorRef } from '../change_detection/change_detector_ref';
|
|
9
|
+
import { InjectFlags } from '../di/injector';
|
|
9
10
|
import { ElementRef as viewEngine_ElementRef } from '../linker/element_ref';
|
|
10
11
|
import { TemplateRef as viewEngine_TemplateRef } from '../linker/template_ref';
|
|
11
12
|
import { ViewContainerRef as viewEngine_ViewContainerRef } from '../linker/view_container_ref';
|
|
@@ -30,18 +31,6 @@ export declare function getOrCreateNodeInjector(): LInjector;
|
|
|
30
31
|
* @returns Node injector
|
|
31
32
|
*/
|
|
32
33
|
export declare function getOrCreateNodeInjectorForNode(node: LElementNode | LContainerNode): LInjector;
|
|
33
|
-
/** Injection flags for DI. */
|
|
34
|
-
export declare const enum InjectFlags {
|
|
35
|
-
/** Dependency is not required. Null will be injected if there is no provider for the dependency.
|
|
36
|
-
*/
|
|
37
|
-
Optional = 1,
|
|
38
|
-
/** When resolving a dependency, include the node that is requesting injection. */
|
|
39
|
-
CheckSelf = 2,
|
|
40
|
-
/** When resolving a dependency, include ancestors of the node requesting injection. */
|
|
41
|
-
CheckParent = 4,
|
|
42
|
-
/** Default injection options: required, checks both self and ancestors. */
|
|
43
|
-
Default = 6,
|
|
44
|
-
}
|
|
45
34
|
/**
|
|
46
35
|
* Makes a directive public to the DI system by adding it to an injector's bloom filter.
|
|
47
36
|
*
|
|
@@ -80,7 +69,8 @@ export declare function diPublic(def: DirectiveDef<any>): void;
|
|
|
80
69
|
* @param flags Injection flags (e.g. CheckParent)
|
|
81
70
|
* @returns The instance found
|
|
82
71
|
*/
|
|
83
|
-
export declare function directiveInject<T>(token: Type<T
|
|
72
|
+
export declare function directiveInject<T>(token: Type<T>): T;
|
|
73
|
+
export declare function directiveInject<T>(token: Type<T>, flags?: InjectFlags): T | null;
|
|
84
74
|
/**
|
|
85
75
|
* Creates an ElementRef and stores it on the injector.
|
|
86
76
|
* Or, if the ElementRef already exists, retrieves the existing ElementRef.
|
|
@@ -160,7 +150,7 @@ export declare function getOrCreateChangeDetectorRef(di: LInjector, context: any
|
|
|
160
150
|
* @param flags Injection flags (e.g. CheckParent)
|
|
161
151
|
* @returns The instance found
|
|
162
152
|
*/
|
|
163
|
-
export declare function getOrCreateInjectable<T>(di: LInjector, token: Type<T>, flags?: InjectFlags
|
|
153
|
+
export declare function getOrCreateInjectable<T>(di: LInjector, token: Type<T>, flags?: InjectFlags): T | null;
|
|
164
154
|
/**
|
|
165
155
|
* Finds the closest injector that might have a certain directive.
|
|
166
156
|
*
|
package/src/render3/index.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
import { LifecycleHooksFeature, createComponentRef, getHostElement, getRenderedText, renderComponent, whenRendered } from './component';
|
|
9
9
|
import { NgOnChangesFeature, PublicFeature, defineComponent, defineDirective, definePipe } from './definition';
|
|
10
10
|
import { ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef } from './interfaces/definition';
|
|
11
|
-
export {
|
|
11
|
+
export { QUERY_READ_CONTAINER_REF, QUERY_READ_ELEMENT_REF, QUERY_READ_FROM_NODE, QUERY_READ_TEMPLATE_REF, directiveInject, injectAttribute, injectChangeDetectorRef, injectElementRef, injectTemplateRef, injectViewContainerRef } from './di';
|
|
12
|
+
export { RenderFlags } from './interfaces/definition';
|
|
12
13
|
export { CssSelectorList } from './interfaces/projection';
|
|
13
14
|
export { NO_CHANGE as NC, bind as b, interpolation1 as i1, interpolation2 as i2, interpolation3 as i3, interpolation4 as i4, interpolation5 as i5, interpolation6 as i6, interpolation7 as i7, interpolation8 as i8, interpolationV as iV, container as C, containerRefreshStart as cR, containerRefreshEnd as cr, elementAttribute as a, elementClass as k, elementClassNamed as kn, elementEnd as e, elementProperty as p, elementStart as E, elementStyle as s, elementStyleNamed as sn, listener as L, store as st, load as ld, loadDirective as d, projection as P, projectionDef as pD, text as T, textBinding as t, embeddedViewStart as V, embeddedViewEnd as v, detectChanges, markDirty, tick } from './instructions';
|
|
14
15
|
export { pipe as Pp, pipeBind1 as pb1, pipeBind2 as pb2, pipeBind3 as pb3, pipeBind4 as pb4, pipeBindV as pbV } from './pipe';
|
|
@@ -12,7 +12,7 @@ import { CssSelectorList, LProjection } from './interfaces/projection';
|
|
|
12
12
|
import { LQueries } from './interfaces/query';
|
|
13
13
|
import { CurrentMatchesList, LView, LViewFlags, RootContext, TView } from './interfaces/view';
|
|
14
14
|
import { LContainerNode, LElementNode, LNode, LNodeType, LProjectionNode, LTextNode, LViewNode, TNode } from './interfaces/node';
|
|
15
|
-
import { ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, PipeDefListOrFactory } from './interfaces/definition';
|
|
15
|
+
import { ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, DirectiveDefListOrFactory, PipeDefList, PipeDefListOrFactory, RenderFlags } from './interfaces/definition';
|
|
16
16
|
import { RElement, RText, Renderer3, RendererFactory3 } from './interfaces/renderer';
|
|
17
17
|
/**
|
|
18
18
|
* Directive (D) sets a property on all component instances using this constant as a key and the
|
|
@@ -90,7 +90,7 @@ export declare function createLNode(index: number, type: LNodeType.Projection, n
|
|
|
90
90
|
* @param pipes Pipe defs that should be used for matching
|
|
91
91
|
*/
|
|
92
92
|
export declare function renderTemplate<T>(hostNode: RElement, template: ComponentTemplate<T>, context: T, providedRendererFactory: RendererFactory3, host: LElementNode | null, directives?: DirectiveDefListOrFactory | null, pipes?: PipeDefListOrFactory | null): LElementNode;
|
|
93
|
-
export declare function renderEmbeddedTemplate<T>(viewNode: LViewNode | null, template: ComponentTemplate<T>, context: T, renderer: Renderer3): LViewNode;
|
|
93
|
+
export declare function renderEmbeddedTemplate<T>(viewNode: LViewNode | null, template: ComponentTemplate<T>, context: T, renderer: Renderer3, directives?: DirectiveDefList | null, pipes?: PipeDefList | null): LViewNode;
|
|
94
94
|
export declare function renderComponentOrTemplate<T>(node: LElementNode, hostView: LView, componentOrContext: T, template?: ComponentTemplate<T>): void;
|
|
95
95
|
/**
|
|
96
96
|
* Create DOM element. The instruction must later be followed by `elementEnd()` call.
|
|
@@ -281,7 +281,7 @@ export declare function containerRefreshEnd(): void;
|
|
|
281
281
|
* @param viewBlockId The ID of this view
|
|
282
282
|
* @return boolean Whether or not this view is in creation mode
|
|
283
283
|
*/
|
|
284
|
-
export declare function embeddedViewStart(viewBlockId: number):
|
|
284
|
+
export declare function embeddedViewStart(viewBlockId: number): RenderFlags;
|
|
285
285
|
/** Marks the end of an embedded view. */
|
|
286
286
|
export declare function embeddedViewEnd(): void;
|
|
287
287
|
/**
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
1
8
|
import { Provider } from '../../core';
|
|
2
9
|
import { RendererType2 } from '../../render/api';
|
|
3
10
|
import { Type } from '../../type';
|
|
@@ -6,22 +13,34 @@ import { CssSelectorList } from './projection';
|
|
|
6
13
|
* Definition of what a template rendering function should look like.
|
|
7
14
|
*/
|
|
8
15
|
export declare type ComponentTemplate<T> = {
|
|
9
|
-
(
|
|
16
|
+
(rf: RenderFlags, ctx: T): void;
|
|
10
17
|
ngPrivateData?: never;
|
|
11
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Flags passed into template functions to determine which blocks (i.e. creation, update)
|
|
21
|
+
* should be executed.
|
|
22
|
+
*
|
|
23
|
+
* Typically, a template runs both the creation block and the update block on initialization and
|
|
24
|
+
* subsequent runs only execute the update block. However, dynamically created views require that
|
|
25
|
+
* the creation block be executed separately from the update block (for backwards compat).
|
|
26
|
+
*/
|
|
27
|
+
export declare const enum RenderFlags {
|
|
28
|
+
Create = 1,
|
|
29
|
+
Update = 2,
|
|
30
|
+
}
|
|
12
31
|
/**
|
|
13
32
|
* A subclass of `Type` which has a static `ngComponentDef`:`ComponentDef` field making it
|
|
14
33
|
* consumable for rendering.
|
|
15
34
|
*/
|
|
16
35
|
export interface ComponentType<T> extends Type<T> {
|
|
17
|
-
ngComponentDef:
|
|
36
|
+
ngComponentDef: never;
|
|
18
37
|
}
|
|
19
38
|
/**
|
|
20
39
|
* A subclass of `Type` which has a static `ngDirectiveDef`:`DirectiveDef` field making it
|
|
21
40
|
* consumable for rendering.
|
|
22
41
|
*/
|
|
23
42
|
export interface DirectiveType<T> extends Type<T> {
|
|
24
|
-
ngDirectiveDef:
|
|
43
|
+
ngDirectiveDef: never;
|
|
25
44
|
}
|
|
26
45
|
export declare const enum DirectiveDefFlags {
|
|
27
46
|
ContentQuery = 2,
|
|
@@ -31,7 +50,7 @@ export declare const enum DirectiveDefFlags {
|
|
|
31
50
|
* consumable for rendering.
|
|
32
51
|
*/
|
|
33
52
|
export interface PipeType<T> extends Type<T> {
|
|
34
|
-
ngPipeDef:
|
|
53
|
+
ngPipeDef: never;
|
|
35
54
|
}
|
|
36
55
|
/**
|
|
37
56
|
* Runtime link information for Directives.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { ChangeDetectorRef } from '../../change_detection/change_detector_ref';
|
|
9
|
-
import { Injector } from '../../di/injector';
|
|
10
9
|
import { ElementRef } from '../../linker/element_ref';
|
|
11
10
|
import { TemplateRef } from '../../linker/template_ref';
|
|
12
11
|
import { ViewContainerRef } from '../../linker/view_container_ref';
|
|
@@ -62,7 +61,6 @@ export interface LInjector {
|
|
|
62
61
|
cbf5: number;
|
|
63
62
|
cbf6: number;
|
|
64
63
|
cbf7: number;
|
|
65
|
-
injector: Injector | null;
|
|
66
64
|
/** Stores the TemplateRef so subsequent injections of the TemplateRef get the same instance. */
|
|
67
65
|
templateRef: TemplateRef<any> | null;
|
|
68
66
|
/** Stores the ViewContainerRef so subsequent injections of the ViewContainerRef get the same
|
|
@@ -23,21 +23,15 @@ export declare const enum LNodeType {
|
|
|
23
23
|
ViewOrElement = 2,
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* on how to map a particular set of bits to the node's first directive index
|
|
28
|
-
* (with INDX_SHIFT) or the node's directive count (with SIZE_MASK)
|
|
26
|
+
* Corresponds to the TNode.flags property.
|
|
29
27
|
*/
|
|
30
28
|
export declare const enum TNodeFlags {
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
/** The amount to add to flags to increment size when each directive is added */
|
|
38
|
-
SIZE_SKIP = 2,
|
|
39
|
-
/** Mask to get the number of directives on this node */
|
|
40
|
-
SIZE_MASK = 8190,
|
|
29
|
+
/** The number of directives on this node is encoded on the least significant bits */
|
|
30
|
+
DirectiveCountMask = 4095,
|
|
31
|
+
/** Then this bit is set when the node is a component */
|
|
32
|
+
isComponent = 4096,
|
|
33
|
+
/** The index of the first directive on this node is encoded on the most significant bits */
|
|
34
|
+
DirectiveStartingIndexShift = 13,
|
|
41
35
|
}
|
|
42
36
|
/**
|
|
43
37
|
* LNode is an internal data structure which is used for the incremental DOM algorithm.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
+
import { Injector } from '../../di/injector';
|
|
8
9
|
import { LContainer } from './container';
|
|
9
10
|
import { ComponentTemplate, DirectiveDef, DirectiveDefList, PipeDef, PipeDefList } from './definition';
|
|
10
11
|
import { LElementNode, LViewNode, TNode } from './node';
|
|
@@ -52,7 +53,15 @@ export interface LView {
|
|
|
52
53
|
* will begin reading bindings at the correct point in the array when
|
|
53
54
|
* we are in update mode.
|
|
54
55
|
*/
|
|
55
|
-
bindingStartIndex: number
|
|
56
|
+
bindingStartIndex: number;
|
|
57
|
+
/**
|
|
58
|
+
* The binding index we should access next.
|
|
59
|
+
*
|
|
60
|
+
* This is stored so that bindings can continue where they left off
|
|
61
|
+
* if a view is left midway through processing bindings (e.g. if there is
|
|
62
|
+
* a setter that creates an embedded view, like in ngIf).
|
|
63
|
+
*/
|
|
64
|
+
bindingIndex: number;
|
|
56
65
|
/**
|
|
57
66
|
* When a view is destroyed, listeners need to be released and outputs need to be
|
|
58
67
|
* unsubscribed. This cleanup array stores both listener data (in chunks of 4)
|
|
@@ -159,6 +168,10 @@ export interface LView {
|
|
|
159
168
|
* Queries active for this view - nodes from a view are reported to those queries
|
|
160
169
|
*/
|
|
161
170
|
queries: LQueries | null;
|
|
171
|
+
/**
|
|
172
|
+
* An optional Module Injector to be used as fall back after Element Injectors are consulted.
|
|
173
|
+
*/
|
|
174
|
+
injector: Injector | null;
|
|
162
175
|
}
|
|
163
176
|
/** Flags associated with an LView (saved in LView.flags) */
|
|
164
177
|
export declare const enum LViewFlags {
|
|
@@ -349,8 +362,8 @@ export interface RootContext {
|
|
|
349
362
|
export declare type HookData = (number | (() => void))[];
|
|
350
363
|
/** Possible values of LView.lifecycleStage, used to determine which hooks to run. */
|
|
351
364
|
export declare const enum LifecycleStage {
|
|
352
|
-
|
|
353
|
-
|
|
365
|
+
Init = 1,
|
|
366
|
+
AfterInit = 2,
|
|
354
367
|
}
|
|
355
368
|
/**
|
|
356
369
|
* Static data that corresponds to the instance-specific data array on an LView.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LContainerNode, LElementNode, LNode, LTextNode, LViewNode } from './interfaces/node';
|
|
2
|
-
import { RNode } from './interfaces/renderer';
|
|
2
|
+
import { RNode, RText, Renderer3 } from './interfaces/renderer';
|
|
3
3
|
import { LView, LViewOrLContainer } from './interfaces/view';
|
|
4
|
+
export declare function createTextNode(value: any, renderer: Renderer3): RText;
|
|
4
5
|
/**
|
|
5
6
|
* Adds or removes all DOM elements associated with a view.
|
|
6
7
|
*
|
|
@@ -123,4 +124,4 @@ export declare function insertChild(node: LNode, currentView: LView): void;
|
|
|
123
124
|
* @param currentParent The last parent element to be processed
|
|
124
125
|
* @param currentView Current LView
|
|
125
126
|
*/
|
|
126
|
-
export declare function appendProjectedNode(node: LElementNode | LTextNode | LContainerNode, currentParent:
|
|
127
|
+
export declare function appendProjectedNode(node: LElementNode | LTextNode | LContainerNode, currentParent: LElementNode, currentView: LView): void;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* See DomSanitizer for more details on security in Angular applications.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
16
|
*/
|
|
17
17
|
export declare enum SecurityContext {
|
|
18
18
|
NONE = 0,
|
|
@@ -25,7 +25,7 @@ export declare enum SecurityContext {
|
|
|
25
25
|
/**
|
|
26
26
|
* Sanitizer is used by the views to sanitize potentially dangerous values.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
28
|
+
*
|
|
29
29
|
*/
|
|
30
30
|
export declare abstract class Sanitizer {
|
|
31
31
|
abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
|
package/src/type.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
|
|
14
14
|
* the `MyCustomComponent` constructor function.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
*
|
|
17
17
|
*/
|
|
18
18
|
export declare const Type: FunctionConstructor;
|
|
19
19
|
export declare function isType(v: any): v is Type<any>;
|
package/src/util/decorators.d.ts
CHANGED
package/src/version.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Represents the version of Angular
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
*/
|
|
13
13
|
export declare class Version {
|
|
14
14
|
full: string;
|
|
@@ -18,6 +18,6 @@ export declare class Version {
|
|
|
18
18
|
constructor(full: string);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
*
|
|
22
22
|
*/
|
|
23
23
|
export declare const VERSION: Version;
|
package/testing/src/async.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare type TestModuleMetadata = {
|
|
|
41
41
|
*
|
|
42
42
|
* TestBed is the primary api for writing unit tests for Angular applications and libraries.
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
45
|
*/
|
|
46
46
|
export declare class TestBed implements Injector {
|
|
47
47
|
/**
|
|
@@ -231,7 +231,7 @@ export declare function getTestBed(): TestBed;
|
|
|
231
231
|
* eventually
|
|
232
232
|
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
|
233
233
|
*
|
|
234
|
-
*
|
|
234
|
+
*
|
|
235
235
|
*/
|
|
236
236
|
export declare function inject(tokens: any[], fn: Function): () => any;
|
|
237
237
|
/**
|
package/testing.d.ts
CHANGED