@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"main": "./bundles/core.umd.js",
|
|
6
6
|
"module": "./fesm5/core.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"tslib": "^1.9.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"rxjs": "^6.0.0
|
|
20
|
-
"zone.js": "~0.8.
|
|
19
|
+
"rxjs": "^6.0.0",
|
|
20
|
+
"zone.js": "~0.8.26"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -25,12 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"ng-update": {
|
|
27
27
|
"packageGroup": [
|
|
28
|
-
"@angular/bazel",
|
|
29
28
|
"@angular/core",
|
|
29
|
+
"@angular/bazel",
|
|
30
30
|
"@angular/common",
|
|
31
31
|
"@angular/compiler",
|
|
32
32
|
"@angular/compiler-cli",
|
|
33
33
|
"@angular/animations",
|
|
34
|
+
"@angular/elements",
|
|
34
35
|
"@angular/platform-browser",
|
|
35
36
|
"@angular/platform-browser-dynamic",
|
|
36
37
|
"@angular/forms",
|
package/src/application_ref.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const ALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
|
|
|
22
22
|
* does not result in additional changes to any bindings (also known as
|
|
23
23
|
* unidirectional data flow).
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
*/
|
|
27
27
|
export declare function enableProdMode(): void;
|
|
28
28
|
/**
|
|
@@ -78,7 +78,7 @@ export declare function getPlatform(): PlatformRef | null;
|
|
|
78
78
|
/**
|
|
79
79
|
* Provides additional options to the bootstraping process.
|
|
80
80
|
*
|
|
81
|
-
*
|
|
81
|
+
*
|
|
82
82
|
*/
|
|
83
83
|
export interface BootstrapOptions {
|
|
84
84
|
/**
|
|
@@ -98,7 +98,7 @@ export interface BootstrapOptions {
|
|
|
98
98
|
* A page's platform is initialized implicitly when a platform is created via a platform factory
|
|
99
99
|
* (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
|
|
100
100
|
*
|
|
101
|
-
*
|
|
101
|
+
*
|
|
102
102
|
*/
|
|
103
103
|
export declare class PlatformRef {
|
|
104
104
|
private _injector;
|
|
@@ -142,7 +142,7 @@ export declare class PlatformRef {
|
|
|
142
142
|
*
|
|
143
143
|
* let moduleRef = platformBrowser().bootstrapModule(MyModule);
|
|
144
144
|
* ```
|
|
145
|
-
*
|
|
145
|
+
*
|
|
146
146
|
*/
|
|
147
147
|
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
|
|
148
148
|
private _moduleDoBootstrap(moduleRef);
|
|
@@ -164,7 +164,7 @@ export declare class PlatformRef {
|
|
|
164
164
|
/**
|
|
165
165
|
* A reference to an Angular application running on a page.
|
|
166
166
|
*
|
|
167
|
-
*
|
|
167
|
+
*
|
|
168
168
|
*/
|
|
169
169
|
export declare class ApplicationRef {
|
|
170
170
|
private _zone;
|
|
@@ -16,7 +16,7 @@ export declare function devModeEqual(a: any, b: any): boolean;
|
|
|
16
16
|
* return WrappedValue.wrap(this._latestValue); // this will force update
|
|
17
17
|
* }
|
|
18
18
|
* ```
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
*/
|
|
21
21
|
export declare class WrappedValue {
|
|
22
22
|
/** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */
|
|
@@ -34,7 +34,7 @@ export declare class WrappedValue {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Represents a basic change from a previous to a new value.
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
*/
|
|
39
39
|
export declare class SimpleChange {
|
|
40
40
|
previousValue: any;
|
|
@@ -2,14 +2,14 @@ import { StaticProvider } from '../../di/provider';
|
|
|
2
2
|
/**
|
|
3
3
|
* A type describing supported iterable types.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
*/
|
|
7
7
|
export declare type NgIterable<T> = Array<T> | Iterable<T>;
|
|
8
8
|
/**
|
|
9
9
|
* A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
|
|
10
10
|
* respond to changes in an iterable by effecting equivalent changes in the DOM.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
*/
|
|
14
14
|
export interface IterableDiffer<V> {
|
|
15
15
|
/**
|
|
@@ -25,7 +25,7 @@ export interface IterableDiffer<V> {
|
|
|
25
25
|
* An object describing the changes in the `Iterable` collection since last time
|
|
26
26
|
* `IterableDiffer#diff()` was invoked.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
28
|
+
*
|
|
29
29
|
*/
|
|
30
30
|
export interface IterableChanges<V> {
|
|
31
31
|
/**
|
|
@@ -68,7 +68,7 @@ export interface IterableChanges<V> {
|
|
|
68
68
|
/**
|
|
69
69
|
* Record representing the item change information.
|
|
70
70
|
*
|
|
71
|
-
*
|
|
71
|
+
*
|
|
72
72
|
*/
|
|
73
73
|
export interface IterableChangeRecord<V> {
|
|
74
74
|
/** Current index of the item in `Iterable` or null if removed. */
|
|
@@ -89,7 +89,7 @@ export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {
|
|
|
89
89
|
* An optional function passed into {@link NgForOf} that defines how to track
|
|
90
90
|
* items in an iterable (e.g. fby index or id)
|
|
91
91
|
*
|
|
92
|
-
*
|
|
92
|
+
*
|
|
93
93
|
*/
|
|
94
94
|
export interface TrackByFunction<T> {
|
|
95
95
|
(index: number, item: T): any;
|
|
@@ -97,7 +97,7 @@ export interface TrackByFunction<T> {
|
|
|
97
97
|
/**
|
|
98
98
|
* Provides a factory for {@link IterableDiffer}.
|
|
99
99
|
*
|
|
100
|
-
*
|
|
100
|
+
*
|
|
101
101
|
*/
|
|
102
102
|
export interface IterableDifferFactory {
|
|
103
103
|
supports(objects: any): boolean;
|
|
@@ -105,9 +105,10 @@ export interface IterableDifferFactory {
|
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
107
|
* A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
|
|
108
|
-
*
|
|
108
|
+
*
|
|
109
109
|
*/
|
|
110
110
|
export declare class IterableDiffers {
|
|
111
|
+
static ngInjectableDef: never;
|
|
111
112
|
/**
|
|
112
113
|
* @deprecated v4.0.0 - Should be private
|
|
113
114
|
*/
|
|
@@ -9,7 +9,7 @@ import { StaticProvider } from '../../di';
|
|
|
9
9
|
/**
|
|
10
10
|
* A differ that tracks changes made to an object over time.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
*/
|
|
14
14
|
export interface KeyValueDiffer<K, V> {
|
|
15
15
|
/**
|
|
@@ -35,7 +35,7 @@ export interface KeyValueDiffer<K, V> {
|
|
|
35
35
|
* An object describing the changes in the `Map` or `{[k:string]: string}` since last time
|
|
36
36
|
* `KeyValueDiffer#diff()` was invoked.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
39
|
*/
|
|
40
40
|
export interface KeyValueChanges<K, V> {
|
|
41
41
|
/**
|
|
@@ -64,7 +64,7 @@ export interface KeyValueChanges<K, V> {
|
|
|
64
64
|
/**
|
|
65
65
|
* Record representing the item change information.
|
|
66
66
|
*
|
|
67
|
-
*
|
|
67
|
+
*
|
|
68
68
|
*/
|
|
69
69
|
export interface KeyValueChangeRecord<K, V> {
|
|
70
70
|
/**
|
|
@@ -83,7 +83,7 @@ export interface KeyValueChangeRecord<K, V> {
|
|
|
83
83
|
/**
|
|
84
84
|
* Provides a factory for {@link KeyValueDiffer}.
|
|
85
85
|
*
|
|
86
|
-
*
|
|
86
|
+
*
|
|
87
87
|
*/
|
|
88
88
|
export interface KeyValueDifferFactory {
|
|
89
89
|
/**
|
|
@@ -97,7 +97,7 @@ export interface KeyValueDifferFactory {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
|
|
100
|
-
*
|
|
100
|
+
*
|
|
101
101
|
*/
|
|
102
102
|
export declare class KeyValueDiffers {
|
|
103
103
|
/**
|
|
@@ -12,7 +12,7 @@ export { devModeEqual as ɵdevModeEqual } from './change_detection/change_detect
|
|
|
12
12
|
export { isListLikeIterable as ɵisListLikeIterable } from './change_detection/change_detection_util';
|
|
13
13
|
export { ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy } from './change_detection/constants';
|
|
14
14
|
export { Console as ɵConsole } from './console';
|
|
15
|
-
export { setCurrentInjector as ɵsetCurrentInjector } from './di/injector';
|
|
15
|
+
export { inject as ɵinject, setCurrentInjector as ɵsetCurrentInjector } from './di/injector';
|
|
16
16
|
export { APP_ROOT as ɵAPP_ROOT } from './di/scope';
|
|
17
17
|
export { ComponentFactory as ɵComponentFactory } from './linker/component_factory';
|
|
18
18
|
export { CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver } from './linker/component_factory_resolver';
|
|
@@ -5,5 +5,5 @@
|
|
|
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
|
-
export { defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentType as ɵComponentType, DirectiveType as ɵDirectiveType, directiveInject as ɵdirectiveInject, injectTemplateRef as ɵinjectTemplateRef, injectViewContainerRef as ɵinjectViewContainerRef, injectChangeDetectorRef as ɵinjectChangeDetectorRef, injectAttribute as ɵinjectAttribute,
|
|
8
|
+
export { defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentType as ɵComponentType, DirectiveType as ɵDirectiveType, RenderFlags as ɵRenderFlags, directiveInject as ɵdirectiveInject, injectTemplateRef as ɵinjectTemplateRef, injectViewContainerRef as ɵinjectViewContainerRef, injectChangeDetectorRef as ɵinjectChangeDetectorRef, injectAttribute as ɵinjectAttribute, PublicFeature as ɵPublicFeature, NgOnChangesFeature as ɵNgOnChangesFeature, CssSelectorList as ɵCssSelectorList, markDirty as ɵmarkDirty, NC as ɵNC, C as ɵC, E as ɵE, L as ɵL, T as ɵT, V as ɵV, Q as ɵQ, d as ɵd, P as ɵP, b as ɵb, i1 as ɵi1, i2 as ɵi2, i3 as ɵi3, i4 as ɵi4, i5 as ɵi5, i6 as ɵi6, i7 as ɵi7, i8 as ɵi8, iV as ɵiV, pb1 as ɵpb1, pb2 as ɵpb2, pb3 as ɵpb3, pb4 as ɵpb4, pbV as ɵpbV, f0 as ɵf0, f1 as ɵf1, f2 as ɵf2, f3 as ɵf3, f4 as ɵf4, f5 as ɵf5, f6 as ɵf6, f7 as ɵf7, f8 as ɵf8, fV as ɵfV, cR as ɵcR, cr as ɵcr, qR as ɵqR, e as ɵe, p as ɵp, pD as ɵpD, a as ɵa, s as ɵs, sn as ɵsn, k as ɵk, kn as ɵkn, t as ɵt, v as ɵv, st as ɵst, ld as ɵld, Pp as ɵPp, ComponentDef as ɵComponentDef, DirectiveDef as ɵDirectiveDef, PipeDef as ɵPipeDef, whenRendered as ɵwhenRendered } from './render3/index';
|
|
9
9
|
export { bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, sanitizeHtml as ɵsanitizeHtml, sanitizeStyle as ɵsanitizeStyle, sanitizeUrl as ɵsanitizeUrl, sanitizeResourceUrl as ɵsanitizeResourceUrl } from './sanitization/sanitization';
|
package/src/di/defs.d.ts
CHANGED
|
@@ -17,13 +17,26 @@ import { ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider,
|
|
|
17
17
|
* `InjectorDef`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
|
|
18
18
|
* that the injectable does not belong to any scope.
|
|
19
19
|
*
|
|
20
|
-
* This
|
|
21
|
-
*
|
|
22
|
-
* @experimental
|
|
20
|
+
* NOTE: This is a private type and should not be exported
|
|
23
21
|
*/
|
|
24
22
|
export interface InjectableDef<T> {
|
|
23
|
+
/**
|
|
24
|
+
* Specifies that the given type belongs to a particular injector:
|
|
25
|
+
* - `InjectorType` such as `NgModule`,
|
|
26
|
+
* - `'root'` the root injector
|
|
27
|
+
* - `'any'` all injectors.
|
|
28
|
+
* - `null`, does not belong to any injector. Must be explicitly listed in the injector
|
|
29
|
+
* `providers`.
|
|
30
|
+
*/
|
|
25
31
|
providedIn: InjectorType<any> | 'root' | 'any' | null;
|
|
32
|
+
/**
|
|
33
|
+
* Factory method to execute to create an instance of the injectable.
|
|
34
|
+
*/
|
|
26
35
|
factory: () => T;
|
|
36
|
+
/**
|
|
37
|
+
* In a case of no explicit injector, a location where the instance of the injectable is stored.
|
|
38
|
+
*/
|
|
39
|
+
value: T | undefined;
|
|
27
40
|
}
|
|
28
41
|
/**
|
|
29
42
|
* Information about the providers to be included in an `Injector` as well as how the given type
|
|
@@ -33,7 +46,7 @@ export interface InjectableDef<T> {
|
|
|
33
46
|
* structure of providers with a defined priority (identically to how `NgModule`s also have
|
|
34
47
|
* an import/dependency structure).
|
|
35
48
|
*
|
|
36
|
-
*
|
|
49
|
+
* NOTE: This is a private type and should not be exported
|
|
37
50
|
*/
|
|
38
51
|
export interface InjectorDef<T> {
|
|
39
52
|
factory: () => T;
|
|
@@ -49,7 +62,10 @@ export interface InjectorDef<T> {
|
|
|
49
62
|
* @experimental
|
|
50
63
|
*/
|
|
51
64
|
export interface InjectableType<T> extends Type<T> {
|
|
52
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Opaque type whose structure is highly version dependent. Do not rely on any properties.
|
|
67
|
+
*/
|
|
68
|
+
ngInjectableDef: never;
|
|
53
69
|
}
|
|
54
70
|
/**
|
|
55
71
|
* A type which has an `InjectorDef` static field.
|
|
@@ -59,7 +75,10 @@ export interface InjectableType<T> extends Type<T> {
|
|
|
59
75
|
* @experimental
|
|
60
76
|
*/
|
|
61
77
|
export interface InjectorType<T> extends Type<T> {
|
|
62
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Opaque type whose structure is highly version dependent. Do not rely on any properties.
|
|
80
|
+
*/
|
|
81
|
+
ngInjectorDef: never;
|
|
63
82
|
}
|
|
64
83
|
/**
|
|
65
84
|
* Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorDefType` with an
|
|
@@ -67,7 +86,7 @@ export interface InjectorType<T> extends Type<T> {
|
|
|
67
86
|
*
|
|
68
87
|
* Objects of this type can be listed in the imports section of an `InjectorDef`.
|
|
69
88
|
*
|
|
70
|
-
*
|
|
89
|
+
* NOTE: This is a private type and should not be exported
|
|
71
90
|
*/
|
|
72
91
|
export interface InjectorTypeWithProviders<T> {
|
|
73
92
|
ngModule: InjectorType<T>;
|
|
@@ -90,9 +109,9 @@ export interface InjectorTypeWithProviders<T> {
|
|
|
90
109
|
* @experimental
|
|
91
110
|
*/
|
|
92
111
|
export declare function defineInjectable<T>(opts: {
|
|
93
|
-
providedIn?: Type<any> | 'root' | null;
|
|
112
|
+
providedIn?: Type<any> | 'root' | 'any' | null;
|
|
94
113
|
factory: () => T;
|
|
95
|
-
}):
|
|
114
|
+
}): never;
|
|
96
115
|
/**
|
|
97
116
|
* Construct an `InjectorDef` which configures an injector.
|
|
98
117
|
*
|
|
@@ -117,4 +136,4 @@ export declare function defineInjector(options: {
|
|
|
117
136
|
factory: () => any;
|
|
118
137
|
providers?: any[];
|
|
119
138
|
imports?: any[];
|
|
120
|
-
}):
|
|
139
|
+
}): never;
|
package/src/di/injectable.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare type InjectableProvider = ValueSansProvider | ExistingSansProvide
|
|
|
10
10
|
/**
|
|
11
11
|
* Type of the Injectable decorator / constructor function.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
*
|
|
14
14
|
*/
|
|
15
15
|
export interface InjectableDecorator {
|
|
16
16
|
/**
|
|
@@ -34,7 +34,7 @@ export interface InjectableDecorator {
|
|
|
34
34
|
*
|
|
35
35
|
* {@example core/di/ts/metadata_spec.ts region='InjectableThrows'}
|
|
36
36
|
*
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
*/
|
|
39
39
|
(): any;
|
|
40
40
|
(options?: {
|
|
@@ -58,7 +58,7 @@ export declare function convertInjectableProviderToFactory(type: Type<any>, prov
|
|
|
58
58
|
/**
|
|
59
59
|
* Injectable decorator and metadata.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
61
|
+
*
|
|
62
62
|
* @Annotation
|
|
63
63
|
*/
|
|
64
64
|
export declare const Injectable: InjectableDecorator;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Type } from '../type';
|
|
9
|
-
import { InjectableDef } from './defs';
|
|
10
9
|
/**
|
|
11
10
|
* Creates a token that can be used in a DI Provider.
|
|
12
11
|
*
|
|
@@ -43,11 +42,11 @@ import { InjectableDef } from './defs';
|
|
|
43
42
|
*
|
|
44
43
|
* {@example core/di/ts/injector_spec.ts region='InjectionToken'}
|
|
45
44
|
*
|
|
46
|
-
*
|
|
45
|
+
*
|
|
47
46
|
*/
|
|
48
47
|
export declare class InjectionToken<T> {
|
|
49
48
|
protected _desc: string;
|
|
50
|
-
readonly ngInjectableDef:
|
|
49
|
+
readonly ngInjectableDef: never | undefined;
|
|
51
50
|
constructor(_desc: string, options?: {
|
|
52
51
|
providedIn?: Type<any> | 'root' | null;
|
|
53
52
|
factory: () => T;
|
|
@@ -55,5 +54,5 @@ export declare class InjectionToken<T> {
|
|
|
55
54
|
toString(): string;
|
|
56
55
|
}
|
|
57
56
|
export interface InjectableDefToken<T> extends InjectionToken<T> {
|
|
58
|
-
ngInjectableDef:
|
|
57
|
+
ngInjectableDef: never;
|
|
59
58
|
}
|
package/src/di/injector.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Type } from '../type';
|
|
9
|
-
import { InjectableDef } from './defs';
|
|
10
9
|
import { InjectionToken } from './injection_token';
|
|
11
10
|
import { StaticProvider } from './provider';
|
|
12
11
|
export declare const SOURCE = "__source";
|
|
@@ -43,7 +42,7 @@ export declare class NullInjector implements Injector {
|
|
|
43
42
|
* `Injector` returns itself when given `Injector` as a token:
|
|
44
43
|
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
|
45
44
|
*
|
|
46
|
-
*
|
|
45
|
+
*
|
|
47
46
|
*/
|
|
48
47
|
export declare abstract class Injector {
|
|
49
48
|
static THROW_IF_NOT_FOUND: Object;
|
|
@@ -70,7 +69,7 @@ export declare abstract class Injector {
|
|
|
70
69
|
parent?: Injector;
|
|
71
70
|
name?: string;
|
|
72
71
|
}): Injector;
|
|
73
|
-
static ngInjectableDef:
|
|
72
|
+
static ngInjectableDef: never;
|
|
74
73
|
}
|
|
75
74
|
export declare const USE_VALUE: string;
|
|
76
75
|
export declare class StaticInjector implements Injector {
|
|
@@ -84,17 +83,22 @@ export declare class StaticInjector implements Injector {
|
|
|
84
83
|
}
|
|
85
84
|
/**
|
|
86
85
|
* Injection flags for DI.
|
|
87
|
-
*
|
|
88
|
-
* @stable
|
|
89
86
|
*/
|
|
90
87
|
export declare const enum InjectFlags {
|
|
91
88
|
Default = 0,
|
|
92
|
-
/**
|
|
93
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Specifies that an injector should retrieve a dependency from any injector until reaching the
|
|
91
|
+
* host element of the current component. (Only used with Element Injector)
|
|
92
|
+
*/
|
|
93
|
+
Host = 1,
|
|
94
94
|
/** Don't descend into ancestors of the node requesting injection. */
|
|
95
95
|
Self = 2,
|
|
96
|
+
/** Skip the node that is requesting injection. */
|
|
97
|
+
SkipSelf = 4,
|
|
98
|
+
/** Inject `defaultValue` instead if token not found. */
|
|
99
|
+
Optional = 8,
|
|
96
100
|
}
|
|
97
|
-
export declare function setCurrentInjector(injector: Injector | null): Injector | null;
|
|
101
|
+
export declare function setCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
|
|
98
102
|
/**
|
|
99
103
|
* Injects a token from the currently active injector.
|
|
100
104
|
*
|
|
@@ -109,7 +113,6 @@ export declare function setCurrentInjector(injector: Injector | null): Injector
|
|
|
109
113
|
*
|
|
110
114
|
* @experimental
|
|
111
115
|
*/
|
|
112
|
-
export declare function inject<T>(token: Type<T> | InjectionToken<T
|
|
113
|
-
export declare function inject<T>(token: Type<T> | InjectionToken<T>,
|
|
114
|
-
export declare function inject<T>(token: Type<T> | InjectionToken<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
|
116
|
+
export declare function inject<T>(token: Type<T> | InjectionToken<T>): T;
|
|
117
|
+
export declare function inject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;
|
|
115
118
|
export declare function injectArgs(types: (Type<any> | InjectionToken<any> | any[])[]): any[];
|
package/src/di/metadata.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type of the Inject decorator / constructor function.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
5
|
*/
|
|
6
6
|
export interface InjectDecorator {
|
|
7
7
|
/**
|
|
@@ -29,7 +29,7 @@ export interface InjectDecorator {
|
|
|
29
29
|
*
|
|
30
30
|
* {@example core/di/ts/metadata_spec.ts region='InjectWithoutDecorator'}
|
|
31
31
|
*
|
|
32
|
-
*
|
|
32
|
+
*
|
|
33
33
|
*/
|
|
34
34
|
(token: any): any;
|
|
35
35
|
new (token: any): Inject;
|
|
@@ -37,7 +37,7 @@ export interface InjectDecorator {
|
|
|
37
37
|
/**
|
|
38
38
|
* Type of the Inject metadata.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
*/
|
|
42
42
|
export interface Inject {
|
|
43
43
|
token: any;
|
|
@@ -45,14 +45,14 @@ export interface Inject {
|
|
|
45
45
|
/**
|
|
46
46
|
* Inject decorator and metadata.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
* @Annotation
|
|
50
50
|
*/
|
|
51
51
|
export declare const Inject: InjectDecorator;
|
|
52
52
|
/**
|
|
53
53
|
* Type of the Optional decorator / constructor function.
|
|
54
54
|
*
|
|
55
|
-
*
|
|
55
|
+
*
|
|
56
56
|
*/
|
|
57
57
|
export interface OptionalDecorator {
|
|
58
58
|
/**
|
|
@@ -74,7 +74,7 @@ export interface OptionalDecorator {
|
|
|
74
74
|
*
|
|
75
75
|
* {@example core/di/ts/metadata_spec.ts region='Optional'}
|
|
76
76
|
*
|
|
77
|
-
*
|
|
77
|
+
*
|
|
78
78
|
*/
|
|
79
79
|
(): any;
|
|
80
80
|
new (): Optional;
|
|
@@ -82,21 +82,21 @@ export interface OptionalDecorator {
|
|
|
82
82
|
/**
|
|
83
83
|
* Type of the Optional metadata.
|
|
84
84
|
*
|
|
85
|
-
*
|
|
85
|
+
*
|
|
86
86
|
*/
|
|
87
87
|
export interface Optional {
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Optional decorator and metadata.
|
|
91
91
|
*
|
|
92
|
-
*
|
|
92
|
+
*
|
|
93
93
|
* @Annotation
|
|
94
94
|
*/
|
|
95
95
|
export declare const Optional: OptionalDecorator;
|
|
96
96
|
/**
|
|
97
97
|
* Type of the Self decorator / constructor function.
|
|
98
98
|
*
|
|
99
|
-
*
|
|
99
|
+
*
|
|
100
100
|
*/
|
|
101
101
|
export interface SelfDecorator {
|
|
102
102
|
/**
|
|
@@ -117,7 +117,7 @@ export interface SelfDecorator {
|
|
|
117
117
|
*
|
|
118
118
|
* {@example core/di/ts/metadata_spec.ts region='Self'}
|
|
119
119
|
*
|
|
120
|
-
*
|
|
120
|
+
*
|
|
121
121
|
*/
|
|
122
122
|
(): any;
|
|
123
123
|
new (): Self;
|
|
@@ -125,21 +125,21 @@ export interface SelfDecorator {
|
|
|
125
125
|
/**
|
|
126
126
|
* Type of the Self metadata.
|
|
127
127
|
*
|
|
128
|
-
*
|
|
128
|
+
*
|
|
129
129
|
*/
|
|
130
130
|
export interface Self {
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* Self decorator and metadata.
|
|
134
134
|
*
|
|
135
|
-
*
|
|
135
|
+
*
|
|
136
136
|
* @Annotation
|
|
137
137
|
*/
|
|
138
138
|
export declare const Self: SelfDecorator;
|
|
139
139
|
/**
|
|
140
140
|
* Type of the SkipSelf decorator / constructor function.
|
|
141
141
|
*
|
|
142
|
-
*
|
|
142
|
+
*
|
|
143
143
|
*/
|
|
144
144
|
export interface SkipSelfDecorator {
|
|
145
145
|
/**
|
|
@@ -160,7 +160,7 @@ export interface SkipSelfDecorator {
|
|
|
160
160
|
*
|
|
161
161
|
* {@example core/di/ts/metadata_spec.ts region='SkipSelf'}
|
|
162
162
|
*
|
|
163
|
-
*
|
|
163
|
+
*
|
|
164
164
|
*/
|
|
165
165
|
(): any;
|
|
166
166
|
new (): SkipSelf;
|
|
@@ -168,21 +168,21 @@ export interface SkipSelfDecorator {
|
|
|
168
168
|
/**
|
|
169
169
|
* Type of the SkipSelf metadata.
|
|
170
170
|
*
|
|
171
|
-
*
|
|
171
|
+
*
|
|
172
172
|
*/
|
|
173
173
|
export interface SkipSelf {
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* SkipSelf decorator and metadata.
|
|
177
177
|
*
|
|
178
|
-
*
|
|
178
|
+
*
|
|
179
179
|
* @Annotation
|
|
180
180
|
*/
|
|
181
181
|
export declare const SkipSelf: SkipSelfDecorator;
|
|
182
182
|
/**
|
|
183
183
|
* Type of the Host decorator / constructor function.
|
|
184
184
|
*
|
|
185
|
-
*
|
|
185
|
+
*
|
|
186
186
|
*/
|
|
187
187
|
export interface HostDecorator {
|
|
188
188
|
/**
|
|
@@ -204,7 +204,7 @@ export interface HostDecorator {
|
|
|
204
204
|
*
|
|
205
205
|
* {@example core/di/ts/metadata_spec.ts region='Host'}
|
|
206
206
|
*
|
|
207
|
-
*
|
|
207
|
+
*
|
|
208
208
|
*/
|
|
209
209
|
(): any;
|
|
210
210
|
new (): Host;
|
|
@@ -212,14 +212,14 @@ export interface HostDecorator {
|
|
|
212
212
|
/**
|
|
213
213
|
* Type of the Host metadata.
|
|
214
214
|
*
|
|
215
|
-
*
|
|
215
|
+
*
|
|
216
216
|
*/
|
|
217
217
|
export interface Host {
|
|
218
218
|
}
|
|
219
219
|
/**
|
|
220
220
|
* Host decorator and metadata.
|
|
221
221
|
*
|
|
222
|
-
*
|
|
222
|
+
*
|
|
223
223
|
* @Annotation
|
|
224
224
|
*/
|
|
225
225
|
export declare const Host: HostDecorator;
|