@angular/core 11.2.4 → 11.2.5
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 +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +40 -62
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +70 -70
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +25 -34
- package/core.metadata.json +1 -1
- package/esm2015/src/compiler/compiler_facade_interface.js +1 -1
- package/esm2015/src/core_render3_private_export.js +2 -2
- package/esm2015/src/di/injection_token.js +1 -1
- package/esm2015/src/di/interface/defs.js +2 -9
- package/esm2015/src/di/jit/environment.js +2 -18
- package/esm2015/src/di/r3_injector.js +3 -8
- package/esm2015/src/metadata/ng_module.js +5 -6
- package/esm2015/src/render3/definition.js +1 -2
- package/esm2015/src/render3/definition_factory.js +1 -1
- package/esm2015/src/render3/di.js +12 -22
- package/esm2015/src/render3/errors.js +1 -1
- package/esm2015/src/render3/index.js +2 -2
- package/esm2015/src/render3/interfaces/definition.js +1 -1
- package/esm2015/src/render3/jit/environment.js +1 -2
- package/esm2015/src/render3/jit/module.js +22 -4
- package/esm2015/src/render3/util/discovery_utils.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/fesm2015/core.js +41 -62
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +11 -15
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
package/bundles/core.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v11.2.
|
|
2
|
+
* @license Angular v11.2.5
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -692,9 +692,6 @@
|
|
|
692
692
|
*
|
|
693
693
|
* Options:
|
|
694
694
|
*
|
|
695
|
-
* * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to
|
|
696
|
-
* create the type must be provided. If that factory function needs to inject arguments, it can
|
|
697
|
-
* use the `inject` function.
|
|
698
695
|
* * `providers`: an optional array of providers to add to the injector. Each provider must
|
|
699
696
|
* either have a factory or point to a type which has a `ɵprov` static property (the
|
|
700
697
|
* type must be an `InjectableType`).
|
|
@@ -705,11 +702,7 @@
|
|
|
705
702
|
* @codeGenApi
|
|
706
703
|
*/
|
|
707
704
|
function ɵɵdefineInjector(options) {
|
|
708
|
-
return {
|
|
709
|
-
factory: options.factory,
|
|
710
|
-
providers: options.providers || [],
|
|
711
|
-
imports: options.imports || [],
|
|
712
|
-
};
|
|
705
|
+
return { providers: options.providers || [], imports: options.imports || [] };
|
|
713
706
|
}
|
|
714
707
|
/**
|
|
715
708
|
* Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
|
|
@@ -1147,7 +1140,6 @@
|
|
|
1147
1140
|
// See the `initNgDevMode` docstring for more information.
|
|
1148
1141
|
(typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();
|
|
1149
1142
|
var type = componentDefinition.type;
|
|
1150
|
-
var typePrototype = type.prototype;
|
|
1151
1143
|
var declaredInputs = {};
|
|
1152
1144
|
var def = {
|
|
1153
1145
|
type: type,
|
|
@@ -3891,36 +3883,18 @@
|
|
|
3891
3883
|
};
|
|
3892
3884
|
return NodeInjector;
|
|
3893
3885
|
}());
|
|
3894
|
-
/**
|
|
3895
|
-
* @codeGenApi
|
|
3896
|
-
*/
|
|
3897
|
-
function ɵɵgetFactoryOf(type) {
|
|
3898
|
-
var typeAny = type;
|
|
3899
|
-
if (isForwardRef(type)) {
|
|
3900
|
-
return (function () {
|
|
3901
|
-
var factory = ɵɵgetFactoryOf(resolveForwardRef(typeAny));
|
|
3902
|
-
return factory ? factory() : null;
|
|
3903
|
-
});
|
|
3904
|
-
}
|
|
3905
|
-
var factory = getFactoryDef(typeAny);
|
|
3906
|
-
if (factory === null) {
|
|
3907
|
-
var injectorDef = getInjectorDef(typeAny);
|
|
3908
|
-
factory = injectorDef && injectorDef.factory;
|
|
3909
|
-
}
|
|
3910
|
-
return factory || null;
|
|
3911
|
-
}
|
|
3912
3886
|
/**
|
|
3913
3887
|
* @codeGenApi
|
|
3914
3888
|
*/
|
|
3915
3889
|
function ɵɵgetInheritedFactory(type) {
|
|
3916
3890
|
return noSideEffects(function () {
|
|
3917
3891
|
var ownConstructor = type.prototype.constructor;
|
|
3918
|
-
var ownFactory = ownConstructor[NG_FACTORY_DEF] ||
|
|
3892
|
+
var ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);
|
|
3919
3893
|
var objectPrototype = Object.prototype;
|
|
3920
3894
|
var parent = Object.getPrototypeOf(type.prototype).constructor;
|
|
3921
3895
|
// Go up the prototype until we hit `Object`.
|
|
3922
3896
|
while (parent && parent !== objectPrototype) {
|
|
3923
|
-
var factory = parent[NG_FACTORY_DEF] ||
|
|
3897
|
+
var factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);
|
|
3924
3898
|
// If we hit something that has a factory and the factory isn't the same as the type,
|
|
3925
3899
|
// we've found the inherited factory. Note the check that the factory isn't the type's
|
|
3926
3900
|
// own factory is redundant in most cases, but if the user has custom decorators on the
|
|
@@ -3938,6 +3912,15 @@
|
|
|
3938
3912
|
return function (t) { return new t(); };
|
|
3939
3913
|
});
|
|
3940
3914
|
}
|
|
3915
|
+
function getFactoryOf(type) {
|
|
3916
|
+
if (isForwardRef(type)) {
|
|
3917
|
+
return function () {
|
|
3918
|
+
var factory = getFactoryOf(resolveForwardRef(type));
|
|
3919
|
+
return factory && factory();
|
|
3920
|
+
};
|
|
3921
|
+
}
|
|
3922
|
+
return getFactoryDef(type);
|
|
3923
|
+
}
|
|
3941
3924
|
|
|
3942
3925
|
/**
|
|
3943
3926
|
* @license
|
|
@@ -11830,7 +11813,8 @@
|
|
|
11830
11813
|
// Track the InjectorType and add a provider for it. It's important that this is done after the
|
|
11831
11814
|
// def's imports.
|
|
11832
11815
|
this.injectorDefTypes.add(defType);
|
|
11833
|
-
|
|
11816
|
+
var factory = getFactoryDef(defType) || (function () { return new defType(); });
|
|
11817
|
+
this.records.set(defType, makeRecord(factory, NOT_YET));
|
|
11834
11818
|
// Next, include providers listed on the definition itself.
|
|
11835
11819
|
var defProviders = def.providers;
|
|
11836
11820
|
if (defProviders != null && !isDuplicate) {
|
|
@@ -11909,12 +11893,6 @@
|
|
|
11909
11893
|
if (factory !== null) {
|
|
11910
11894
|
return factory;
|
|
11911
11895
|
}
|
|
11912
|
-
// If the token is an NgModule, it's also injectable but the factory is on its injector def
|
|
11913
|
-
// (`ɵinj`)
|
|
11914
|
-
var injectorDef = getInjectorDef(token);
|
|
11915
|
-
if (injectorDef !== null) {
|
|
11916
|
-
return injectorDef.factory;
|
|
11917
|
-
}
|
|
11918
11896
|
// InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.
|
|
11919
11897
|
// If it's missing that, it's an error.
|
|
11920
11898
|
if (token instanceof InjectionToken) {
|
|
@@ -14082,23 +14060,8 @@
|
|
|
14082
14060
|
'ɵɵdefineInjectable': ɵɵdefineInjectable,
|
|
14083
14061
|
'ɵɵdefineInjector': ɵɵdefineInjector,
|
|
14084
14062
|
'ɵɵinject': ɵɵinject,
|
|
14085
|
-
'ɵɵgetFactoryOf': getFactoryOf,
|
|
14086
14063
|
'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
|
|
14087
14064
|
};
|
|
14088
|
-
function getFactoryOf(type) {
|
|
14089
|
-
var typeAny = type;
|
|
14090
|
-
if (isForwardRef(type)) {
|
|
14091
|
-
return (function () {
|
|
14092
|
-
var factory = getFactoryOf(resolveForwardRef(typeAny));
|
|
14093
|
-
return factory ? factory() : null;
|
|
14094
|
-
});
|
|
14095
|
-
}
|
|
14096
|
-
var def = getInjectableDef(typeAny) || getInjectorDef(typeAny);
|
|
14097
|
-
if (!def || def.factory === undefined) {
|
|
14098
|
-
return null;
|
|
14099
|
-
}
|
|
14100
|
-
return def.factory;
|
|
14101
|
-
}
|
|
14102
14065
|
|
|
14103
14066
|
/**
|
|
14104
14067
|
* @license
|
|
@@ -21959,7 +21922,7 @@
|
|
|
21959
21922
|
/**
|
|
21960
21923
|
* @publicApi
|
|
21961
21924
|
*/
|
|
21962
|
-
var VERSION = new Version('11.2.
|
|
21925
|
+
var VERSION = new Version('11.2.5');
|
|
21963
21926
|
|
|
21964
21927
|
/**
|
|
21965
21928
|
* @license
|
|
@@ -27364,7 +27327,6 @@
|
|
|
27364
27327
|
'ɵɵdefineNgModule': ɵɵdefineNgModule,
|
|
27365
27328
|
'ɵɵdefinePipe': ɵɵdefinePipe,
|
|
27366
27329
|
'ɵɵdirectiveInject': ɵɵdirectiveInject,
|
|
27367
|
-
'ɵɵgetFactoryOf': ɵɵgetFactoryOf,
|
|
27368
27330
|
'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,
|
|
27369
27331
|
'ɵɵinject': ɵɵinject,
|
|
27370
27332
|
'ɵɵinjectAttribute': ɵɵinjectAttribute,
|
|
@@ -27584,7 +27546,7 @@
|
|
|
27584
27546
|
enqueueModuleForDelayedScoping(moduleType, ngModule);
|
|
27585
27547
|
}
|
|
27586
27548
|
/**
|
|
27587
|
-
* Compiles and adds the `ɵmod` and `ɵinj` properties to the module class.
|
|
27549
|
+
* Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
|
|
27588
27550
|
*
|
|
27589
27551
|
* It's possible to compile a module via this API which will allow duplicate declarations in its
|
|
27590
27552
|
* root.
|
|
@@ -27628,6 +27590,25 @@
|
|
|
27628
27590
|
return ngModuleDef;
|
|
27629
27591
|
}
|
|
27630
27592
|
});
|
|
27593
|
+
var ngFactoryDef = null;
|
|
27594
|
+
Object.defineProperty(moduleType, NG_FACTORY_DEF, {
|
|
27595
|
+
get: function () {
|
|
27596
|
+
if (ngFactoryDef === null) {
|
|
27597
|
+
var compiler = getCompilerFacade();
|
|
27598
|
+
ngFactoryDef = compiler.compileFactory(angularCoreEnv, "ng:///" + moduleType.name + "/\u0275fac.js", {
|
|
27599
|
+
name: moduleType.name,
|
|
27600
|
+
type: moduleType,
|
|
27601
|
+
deps: reflectDependencies(moduleType),
|
|
27602
|
+
injectFn: 'inject',
|
|
27603
|
+
target: compiler.R3FactoryTarget.NgModule,
|
|
27604
|
+
typeArgumentCount: 0,
|
|
27605
|
+
});
|
|
27606
|
+
}
|
|
27607
|
+
return ngFactoryDef;
|
|
27608
|
+
},
|
|
27609
|
+
// Make the property configurable in dev mode to allow overriding in tests
|
|
27610
|
+
configurable: !!ngDevMode,
|
|
27611
|
+
});
|
|
27631
27612
|
var ngInjectorDef = null;
|
|
27632
27613
|
Object.defineProperty(moduleType, NG_INJ_DEF, {
|
|
27633
27614
|
get: function () {
|
|
@@ -27637,7 +27618,6 @@
|
|
|
27637
27618
|
var meta = {
|
|
27638
27619
|
name: moduleType.name,
|
|
27639
27620
|
type: moduleType,
|
|
27640
|
-
deps: reflectDependencies(moduleType),
|
|
27641
27621
|
providers: ngModule.providers || EMPTY_ARRAY$5,
|
|
27642
27622
|
imports: [
|
|
27643
27623
|
(ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef),
|
|
@@ -28448,11 +28428,10 @@
|
|
|
28448
28428
|
if (metadata && metadata.exports) {
|
|
28449
28429
|
imports = __spread(imports, [metadata.exports]);
|
|
28450
28430
|
}
|
|
28451
|
-
|
|
28452
|
-
|
|
28453
|
-
|
|
28454
|
-
imports: imports
|
|
28455
|
-
});
|
|
28431
|
+
var moduleInjectorType = moduleType;
|
|
28432
|
+
moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, { useClass: moduleType });
|
|
28433
|
+
moduleInjectorType.ɵinj =
|
|
28434
|
+
ɵɵdefineInjector({ providers: metadata && metadata.providers, imports: imports });
|
|
28456
28435
|
}
|
|
28457
28436
|
var SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;
|
|
28458
28437
|
var SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;
|
|
@@ -34131,7 +34110,6 @@
|
|
|
34131
34110
|
exports.ɵɵelementStart = ɵɵelementStart;
|
|
34132
34111
|
exports.ɵɵenableBindings = ɵɵenableBindings;
|
|
34133
34112
|
exports.ɵɵgetCurrentView = ɵɵgetCurrentView;
|
|
34134
|
-
exports.ɵɵgetFactoryOf = ɵɵgetFactoryOf;
|
|
34135
34113
|
exports.ɵɵgetInheritedFactory = ɵɵgetInheritedFactory;
|
|
34136
34114
|
exports.ɵɵhostProperty = ɵɵhostProperty;
|
|
34137
34115
|
exports.ɵɵi18n = ɵɵi18n;
|