@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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v6.0.0
|
|
2
|
+
* @license Angular v6.0.0
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
(function (global, factory) {
|
|
8
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')
|
|
9
|
-
typeof define === 'function' && define.amd ? define(['exports', '@angular/core'
|
|
10
|
-
(factory((global.
|
|
11
|
-
}(this, (function (exports,core
|
|
8
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
|
|
9
|
+
typeof define === 'function' && define.amd ? define('@angular/core/testing', ['exports', '@angular/core'], factory) :
|
|
10
|
+
(factory((global.ng = global.ng || {}, global.ng.core = global.ng.core || {}, global.ng.core.testing = {}),global.ng.core));
|
|
11
|
+
}(this, (function (exports,core) { 'use strict';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -33,7 +33,7 @@ var _global = (typeof window === 'undefined' ? global : window);
|
|
|
33
33
|
* });
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
|
-
*
|
|
36
|
+
*
|
|
37
37
|
*/
|
|
38
38
|
function asyncFallback(fn) {
|
|
39
39
|
// If we're running using the Jasmine test framework, adapt to call the 'done'
|
|
@@ -133,7 +133,7 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
|
|
|
133
133
|
* });
|
|
134
134
|
* ```
|
|
135
135
|
*
|
|
136
|
-
*
|
|
136
|
+
*
|
|
137
137
|
*/
|
|
138
138
|
function async(fn) {
|
|
139
139
|
var _Zone = typeof Zone !== 'undefined' ? Zone : null;
|
|
@@ -163,7 +163,7 @@ function async(fn) {
|
|
|
163
163
|
/**
|
|
164
164
|
* Fixture for debugging and testing a component.
|
|
165
165
|
*
|
|
166
|
-
*
|
|
166
|
+
*
|
|
167
167
|
*/
|
|
168
168
|
var ComponentFixture = /** @class */ (function () {
|
|
169
169
|
function ComponentFixture(componentRef, ngZone, _autoDetect) {
|
|
@@ -643,6 +643,82 @@ function flushMicrotasks() {
|
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
+
/*! *****************************************************************************
|
|
647
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
648
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
649
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
650
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
651
|
+
|
|
652
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
653
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
654
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
655
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
656
|
+
|
|
657
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
658
|
+
and limitations under the License.
|
|
659
|
+
***************************************************************************** */
|
|
660
|
+
/* global Reflect, Promise */
|
|
661
|
+
|
|
662
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
663
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
664
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
665
|
+
|
|
666
|
+
function __extends(d, b) {
|
|
667
|
+
extendStatics(d, b);
|
|
668
|
+
function __() { this.constructor = d; }
|
|
669
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
function __values(o) {
|
|
689
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
690
|
+
if (m) return m.call(o);
|
|
691
|
+
return {
|
|
692
|
+
next: function () {
|
|
693
|
+
if (o && i >= o.length) o = void 0;
|
|
694
|
+
return { value: o && o[i++], done: !o };
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
function __read(o, n) {
|
|
700
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
701
|
+
if (!m) return o;
|
|
702
|
+
var i = m.call(o), r, ar = [], e;
|
|
703
|
+
try {
|
|
704
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
705
|
+
}
|
|
706
|
+
catch (error) { e = { error: error }; }
|
|
707
|
+
finally {
|
|
708
|
+
try {
|
|
709
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
710
|
+
}
|
|
711
|
+
finally { if (e) throw e.error; }
|
|
712
|
+
}
|
|
713
|
+
return ar;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
function __spread() {
|
|
717
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
718
|
+
ar = ar.concat(__read(arguments[i]));
|
|
719
|
+
return ar;
|
|
720
|
+
}
|
|
721
|
+
|
|
646
722
|
/**
|
|
647
723
|
* @license
|
|
648
724
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -687,7 +763,7 @@ function unimplemented() {
|
|
|
687
763
|
* @experimental
|
|
688
764
|
*/
|
|
689
765
|
var TestingCompiler = /** @class */ (function (_super) {
|
|
690
|
-
|
|
766
|
+
__extends(TestingCompiler, _super);
|
|
691
767
|
function TestingCompiler() {
|
|
692
768
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
693
769
|
}
|
|
@@ -803,7 +879,7 @@ var ComponentFixtureNoNgZone = new core.InjectionToken('ComponentFixtureNoNgZone
|
|
|
803
879
|
*
|
|
804
880
|
* TestBed is the primary api for writing unit tests for Angular applications and libraries.
|
|
805
881
|
*
|
|
806
|
-
*
|
|
882
|
+
*
|
|
807
883
|
*/
|
|
808
884
|
var TestBed = /** @class */ (function () {
|
|
809
885
|
function TestBed() {
|
|
@@ -1107,16 +1183,16 @@ var TestBed = /** @class */ (function () {
|
|
|
1107
1183
|
TestBed.prototype.configureTestingModule = function (moduleDef) {
|
|
1108
1184
|
this._assertNotInstantiated('TestBed.configureTestingModule', 'configure the test module');
|
|
1109
1185
|
if (moduleDef.providers) {
|
|
1110
|
-
(_a = this._providers).push.apply(_a,
|
|
1186
|
+
(_a = this._providers).push.apply(_a, __spread(moduleDef.providers));
|
|
1111
1187
|
}
|
|
1112
1188
|
if (moduleDef.declarations) {
|
|
1113
|
-
(_b = this._declarations).push.apply(_b,
|
|
1189
|
+
(_b = this._declarations).push.apply(_b, __spread(moduleDef.declarations));
|
|
1114
1190
|
}
|
|
1115
1191
|
if (moduleDef.imports) {
|
|
1116
|
-
(_c = this._imports).push.apply(_c,
|
|
1192
|
+
(_c = this._imports).push.apply(_c, __spread(moduleDef.imports));
|
|
1117
1193
|
}
|
|
1118
1194
|
if (moduleDef.schemas) {
|
|
1119
|
-
(_d = this._schemas).push.apply(_d,
|
|
1195
|
+
(_d = this._schemas).push.apply(_d, __spread(moduleDef.schemas));
|
|
1120
1196
|
}
|
|
1121
1197
|
if (moduleDef.aotSummaries) {
|
|
1122
1198
|
this._aotSummaries.push(moduleDef.aotSummaries);
|
|
@@ -1156,7 +1232,7 @@ var TestBed = /** @class */ (function () {
|
|
|
1156
1232
|
}
|
|
1157
1233
|
}
|
|
1158
1234
|
try {
|
|
1159
|
-
for (var _a =
|
|
1235
|
+
for (var _a = __values(this._templateOverrides), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
1160
1236
|
var _c = _b.value, component = _c.component, templateOf = _c.templateOf;
|
|
1161
1237
|
var compFactory = this._compiler.getComponentFactory(templateOf);
|
|
1162
1238
|
core.ɵoverrideComponentView(component, compFactory);
|
|
@@ -1188,7 +1264,7 @@ var TestBed = /** @class */ (function () {
|
|
|
1188
1264
|
TestBed.prototype._createCompilerAndModule = function () {
|
|
1189
1265
|
var _this = this;
|
|
1190
1266
|
var providers = this._providers.concat([{ provide: TestBed, useValue: this }]);
|
|
1191
|
-
var declarations =
|
|
1267
|
+
var declarations = __spread(this._declarations, this._templateOverrides.map(function (entry) { return entry.templateOf; }));
|
|
1192
1268
|
var rootScopeImports = [];
|
|
1193
1269
|
var rootProviderOverrides = this._rootProviderOverrides;
|
|
1194
1270
|
if (this._isRoot) {
|
|
@@ -1197,7 +1273,7 @@ var TestBed = /** @class */ (function () {
|
|
|
1197
1273
|
}
|
|
1198
1274
|
RootScopeModule.decorators = [
|
|
1199
1275
|
{ type: core.NgModule, args: [{
|
|
1200
|
-
providers:
|
|
1276
|
+
providers: __spread(rootProviderOverrides),
|
|
1201
1277
|
},] },
|
|
1202
1278
|
];
|
|
1203
1279
|
/** @nocollapse */
|
|
@@ -1222,7 +1298,7 @@ var TestBed = /** @class */ (function () {
|
|
|
1222
1298
|
var compilerFactory = this.platform.injector.get(TestingCompilerFactory);
|
|
1223
1299
|
this._compiler = compilerFactory.createTestingCompiler(this._compilerOptions);
|
|
1224
1300
|
try {
|
|
1225
|
-
for (var _a =
|
|
1301
|
+
for (var _a = __values(__spread([this._testEnvAotSummaries], this._aotSummaries)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
1226
1302
|
var summary = _b.value;
|
|
1227
1303
|
this._compiler.loadAotSummaries(summary);
|
|
1228
1304
|
}
|
|
@@ -1396,7 +1472,7 @@ function getTestBed() {
|
|
|
1396
1472
|
* eventually
|
|
1397
1473
|
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
|
1398
1474
|
*
|
|
1399
|
-
*
|
|
1475
|
+
*
|
|
1400
1476
|
*/
|
|
1401
1477
|
function inject(tokens, fn) {
|
|
1402
1478
|
var testBed = getTestBed();
|