@angular/core 8.0.0-rc.3 → 8.0.1
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 -24
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +13 -13
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +123 -93
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +116 -131
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +32 -15
- package/core.metadata.json +1 -1
- package/esm2015/src/core_private_export.js +1 -1
- package/esm2015/src/di/injectable.js +1 -1
- package/esm2015/src/di/injector.js +3 -5
- package/esm2015/src/di/interface/defs.js +2 -2
- package/esm2015/src/di/jit/injectable.js +2 -2
- package/esm2015/src/metadata/di.js +1 -1
- package/esm2015/src/profile/profile.js +5 -1
- package/esm2015/src/profile/wtf_impl.js +2 -1
- package/esm2015/src/render3/component_ref.js +2 -4
- package/esm2015/src/render3/empty.js +5 -1
- package/esm2015/src/render3/index.js +1 -1
- package/esm2015/src/render3/instructions/all.js +2 -2
- package/esm2015/src/render3/instructions/projection.js +52 -13
- package/esm2015/src/render3/instructions/shared.js +7 -2
- package/esm2015/src/render3/interfaces/injector.js +3 -4
- package/esm2015/src/render3/interfaces/projection.js +1 -1
- package/esm2015/src/render3/jit/directive.js +2 -2
- package/esm2015/src/render3/jit/environment.js +13 -8
- package/esm2015/src/render3/jit/module.js +12 -9
- package/esm2015/src/render3/jit/pipe.js +2 -2
- package/esm2015/src/render3/node_selector_matcher.js +2 -27
- package/esm2015/src/render3/styling/class_and_style_bindings.js +2 -2
- package/esm2015/src/render3/util/misc_utils.js +8 -3
- package/esm2015/src/util/array_utils.js +16 -17
- package/esm2015/src/util/empty.js +5 -1
- package/esm2015/src/util/microtask.js +2 -2
- package/esm2015/src/util/ng_i18n_closure_mode.js +5 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/testing/src/r3_test_bed.js +1 -27
- package/esm2015/testing/src/test_bed.js +1 -18
- package/esm2015/testing/src/test_bed_common.js +1 -22
- package/esm5/src/core_private_export.js +1 -1
- package/esm5/src/di/injectable.js +1 -1
- package/esm5/src/di/injector.js +3 -4
- package/esm5/src/di/interface/defs.js +2 -2
- package/esm5/src/di/jit/injectable.js +2 -2
- package/esm5/src/metadata/di.js +1 -1
- package/esm5/src/profile/profile.js +5 -1
- package/esm5/src/profile/wtf_impl.js +1 -1
- package/esm5/src/render3/component_ref.js +2 -4
- package/esm5/src/render3/empty.js +5 -1
- package/esm5/src/render3/index.js +1 -1
- package/esm5/src/render3/instructions/projection.js +49 -14
- package/esm5/src/render3/instructions/shared.js +4 -2
- package/esm5/src/render3/interfaces/injector.js +3 -3
- package/esm5/src/render3/interfaces/projection.js +1 -1
- package/esm5/src/render3/jit/directive.js +2 -2
- package/esm5/src/render3/jit/environment.js +10 -8
- package/esm5/src/render3/jit/module.js +12 -9
- package/esm5/src/render3/jit/pipe.js +2 -2
- package/esm5/src/render3/node_selector_matcher.js +2 -23
- package/esm5/src/render3/styling/class_and_style_bindings.js +2 -2
- package/esm5/src/render3/util/misc_utils.js +8 -4
- package/esm5/src/util/array_utils.js +15 -16
- package/esm5/src/util/empty.js +5 -1
- package/esm5/src/util/microtask.js +2 -2
- package/esm5/src/util/ng_i18n_closure_mode.js +5 -1
- package/esm5/src/version.js +1 -1
- package/esm5/testing/src/r3_test_bed.js +1 -17
- package/esm5/testing/src/test_bed.js +1 -8
- package/esm5/testing/src/test_bed_common.js +1 -1
- package/fesm2015/core.js +133 -98
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -44
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +123 -93
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -24
- package/fesm5/testing.js.map +1 -1
- package/package.json +2 -2
- package/schematics/migrations/injectable-pipe/index.js +7 -4
- package/schematics/migrations/move-document/index.js +7 -4
- package/schematics/migrations/static-queries/angular/directive_inputs.js +3 -2
- package/schematics/migrations/static-queries/angular/ng_query_visitor.d.ts +2 -0
- package/schematics/migrations/static-queries/angular/ng_query_visitor.js +21 -7
- package/schematics/migrations/static-queries/angular/query-definition.d.ts +9 -2
- package/schematics/migrations/static-queries/angular/query-definition.js +1 -1
- package/schematics/migrations/static-queries/index.d.ts +0 -5
- package/schematics/migrations/static-queries/index.js +105 -77
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.d.ts +2 -2
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.js +10 -19
- package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.d.ts +1 -1
- package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.js +2 -2
- package/schematics/migrations/static-queries/strategies/timing-strategy.d.ts +2 -2
- package/schematics/migrations/static-queries/strategies/timing-strategy.js +1 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.d.ts +28 -5
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.js +107 -11
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.d.ts +6 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.js +86 -66
- package/schematics/migrations/static-queries/transform.js +13 -10
- package/schematics/migrations/template-var-assignment/index.js +9 -7
- package/schematics/utils/ng_component_template.js +2 -1
- package/schematics/utils/project_tsconfig_paths.js +5 -3
- package/src/r3_symbols.d.ts +2 -2
- package/testing/testing.d.ts +5 -84
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/schematics/utils/typescript/visit_nodes.d.ts +0 -13
- package/schematics/utils/typescript/visit_nodes.js +0 -26
package/fesm5/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v8.0.
|
|
2
|
+
* @license Angular v8.0.1
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -273,7 +273,7 @@ function fillProperties(target, source) {
|
|
|
273
273
|
* * `factory` gives the zero argument function which will create an instance of the injectable.
|
|
274
274
|
* The factory can call `inject` to access the `Injector` and request injection of dependencies.
|
|
275
275
|
*
|
|
276
|
-
* @
|
|
276
|
+
* @codeGenApi
|
|
277
277
|
*/
|
|
278
278
|
function ɵɵdefineInjectable(opts) {
|
|
279
279
|
return {
|
|
@@ -1020,7 +1020,7 @@ function compileInjectable(type, srcMeta) {
|
|
|
1020
1020
|
// Can't happen - either hasAProvider will be false, or one of the providers will be set.
|
|
1021
1021
|
throw new Error("Unreachable state.");
|
|
1022
1022
|
}
|
|
1023
|
-
def = getCompilerFacade().compileInjectable(angularCoreDiEnv, "ng
|
|
1023
|
+
def = getCompilerFacade().compileInjectable(angularCoreDiEnv, "ng:///" + type.name + "/ngInjectableDef.js", compilerMeta);
|
|
1024
1024
|
}
|
|
1025
1025
|
return def;
|
|
1026
1026
|
},
|
|
@@ -1291,12 +1291,11 @@ var ɵ2 = getClosureSafeProperty;
|
|
|
1291
1291
|
var USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ2 });
|
|
1292
1292
|
var NG_TOKEN_PATH = 'ngTokenPath';
|
|
1293
1293
|
var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';
|
|
1294
|
-
var NULL_INJECTOR = Injector.NULL;
|
|
1295
1294
|
var NEW_LINE = /\n/gm;
|
|
1296
1295
|
var NO_NEW_LINE = 'ɵ';
|
|
1297
1296
|
var StaticInjector = /** @class */ (function () {
|
|
1298
1297
|
function StaticInjector(providers, parent, source) {
|
|
1299
|
-
if (parent === void 0) { parent =
|
|
1298
|
+
if (parent === void 0) { parent = Injector.NULL; }
|
|
1300
1299
|
if (source === void 0) { source = null; }
|
|
1301
1300
|
this.parent = parent;
|
|
1302
1301
|
this.source = source;
|
|
@@ -1454,7 +1453,7 @@ function resolveToken(token, record, records, parent, notFoundValue, flags) {
|
|
|
1454
1453
|
records,
|
|
1455
1454
|
// If we don't know how to resolve dependency and we should not check parent for it,
|
|
1456
1455
|
// than pass in Null injector.
|
|
1457
|
-
!childRecord && !(options & 4 /* CheckParent */) ?
|
|
1456
|
+
!childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default));
|
|
1458
1457
|
}
|
|
1459
1458
|
}
|
|
1460
1459
|
record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);
|
|
@@ -2865,7 +2864,11 @@ var EMPTY_OBJ = {};
|
|
|
2865
2864
|
var EMPTY_ARRAY$1 = [];
|
|
2866
2865
|
// freezing the values prevents any code from accidentally inserting new values in
|
|
2867
2866
|
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
2867
|
+
// These property accesses can be ignored because ngDevMode will be set to false
|
|
2868
|
+
// when optimizing code and the whole if statement will be dropped.
|
|
2869
|
+
// tslint:disable-next-line:no-toplevel-property-access
|
|
2868
2870
|
Object.freeze(EMPTY_OBJ);
|
|
2871
|
+
// tslint:disable-next-line:no-toplevel-property-access
|
|
2869
2872
|
Object.freeze(EMPTY_ARRAY$1);
|
|
2870
2873
|
}
|
|
2871
2874
|
|
|
@@ -3245,9 +3248,12 @@ function stringifyForError(value) {
|
|
|
3245
3248
|
}
|
|
3246
3249
|
return renderStringify(value);
|
|
3247
3250
|
}
|
|
3248
|
-
var
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
+
var ɵ0$5 = function () {
|
|
3252
|
+
return (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only
|
|
3253
|
+
setTimeout // everything else
|
|
3254
|
+
).bind(_global);
|
|
3255
|
+
};
|
|
3256
|
+
var defaultScheduler = (ɵ0$5)();
|
|
3251
3257
|
/**
|
|
3252
3258
|
*
|
|
3253
3259
|
* @codeGenApi
|
|
@@ -3725,10 +3731,10 @@ var NodeInjectorFactory = /** @class */ (function () {
|
|
|
3725
3731
|
}
|
|
3726
3732
|
return NodeInjectorFactory;
|
|
3727
3733
|
}());
|
|
3728
|
-
var FactoryPrototype = NodeInjectorFactory.prototype;
|
|
3729
3734
|
function isFactory(obj) {
|
|
3730
3735
|
// See: https://jsperf.com/instanceof-vs-getprototypeof
|
|
3731
|
-
return obj !== null && typeof obj == 'object' &&
|
|
3736
|
+
return obj !== null && typeof obj == 'object' &&
|
|
3737
|
+
Object.getPrototypeOf(obj) == NodeInjectorFactory.prototype;
|
|
3732
3738
|
}
|
|
3733
3739
|
|
|
3734
3740
|
/**
|
|
@@ -4491,9 +4497,9 @@ var RendererStyleFlags3;
|
|
|
4491
4497
|
function isProceduralRenderer(renderer) {
|
|
4492
4498
|
return !!(renderer.listen);
|
|
4493
4499
|
}
|
|
4494
|
-
var ɵ0$
|
|
4500
|
+
var ɵ0$6 = function (hostElement, rendererType) { return document; };
|
|
4495
4501
|
var domRendererFactory3 = {
|
|
4496
|
-
createRenderer: ɵ0$
|
|
4502
|
+
createRenderer: ɵ0$6
|
|
4497
4503
|
};
|
|
4498
4504
|
|
|
4499
4505
|
/**
|
|
@@ -8887,7 +8893,7 @@ function getInitialStyleStringValue(context) {
|
|
|
8887
8893
|
return styleString;
|
|
8888
8894
|
}
|
|
8889
8895
|
/**
|
|
8890
|
-
* Returns the current cached
|
|
8896
|
+
* Returns the current cached multi-value for a given directiveIndex within the provided context.
|
|
8891
8897
|
*/
|
|
8892
8898
|
function readCachedMapValue(context, entryIsClassBased, directiveIndex) {
|
|
8893
8899
|
var values = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];
|
|
@@ -9266,27 +9272,6 @@ function getProjectAsAttrValue(tNode) {
|
|
|
9266
9272
|
}
|
|
9267
9273
|
return null;
|
|
9268
9274
|
}
|
|
9269
|
-
/**
|
|
9270
|
-
* Checks a given node against matching projection selectors and returns
|
|
9271
|
-
* selector index (or 0 if none matched).
|
|
9272
|
-
*
|
|
9273
|
-
* This function takes into account the parsed ngProjectAs selector from the node's attributes.
|
|
9274
|
-
* If present, it will check whether the ngProjectAs selector matches any of the projection
|
|
9275
|
-
* selectors.
|
|
9276
|
-
*/
|
|
9277
|
-
function matchingProjectionSelectorIndex(tNode, selectors) {
|
|
9278
|
-
var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
|
|
9279
|
-
for (var i = 0; i < selectors.length; i++) {
|
|
9280
|
-
// If we ran into an `ngProjectAs` attribute, we should match its parsed selector
|
|
9281
|
-
// to the list of selectors, otherwise we fall back to matching against the node.
|
|
9282
|
-
if (ngProjectAsAttrVal === null ?
|
|
9283
|
-
isNodeMatchingSelectorList(tNode, selectors[i], /* isProjectionMode */ true) :
|
|
9284
|
-
isSelectorInSelectorList(ngProjectAsAttrVal, selectors[i])) {
|
|
9285
|
-
return i + 1; // first matching selector "captures" a given node
|
|
9286
|
-
}
|
|
9287
|
-
}
|
|
9288
|
-
return 0;
|
|
9289
|
-
}
|
|
9290
9275
|
function getNameOnlyMarkerIndex(nodeAttrs) {
|
|
9291
9276
|
for (var i = 0; i < nodeAttrs.length; i++) {
|
|
9292
9277
|
var nodeAttr = nodeAttrs[i];
|
|
@@ -9329,11 +9314,12 @@ function isSelectorInSelectorList(selector, list) {
|
|
|
9329
9314
|
return false;
|
|
9330
9315
|
}
|
|
9331
9316
|
|
|
9317
|
+
var ɵ0$7 = function () { return Promise.resolve(null); };
|
|
9332
9318
|
/**
|
|
9333
9319
|
* A permanent marker promise which signifies that the current CD tree is
|
|
9334
9320
|
* clean.
|
|
9335
9321
|
*/
|
|
9336
|
-
var _CLEAN_PROMISE =
|
|
9322
|
+
var _CLEAN_PROMISE = (ɵ0$7)();
|
|
9337
9323
|
/**
|
|
9338
9324
|
* Refreshes the view, executing the following steps in that order:
|
|
9339
9325
|
* triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host
|
|
@@ -13044,6 +13030,35 @@ function ɵɵnextContext(level) {
|
|
|
13044
13030
|
return nextContextImpl(level);
|
|
13045
13031
|
}
|
|
13046
13032
|
|
|
13033
|
+
/**
|
|
13034
|
+
* Checks a given node against matching projection slots and returns the
|
|
13035
|
+
* determined slot index. Returns "null" if no slot matched the given node.
|
|
13036
|
+
*
|
|
13037
|
+
* This function takes into account the parsed ngProjectAs selector from the
|
|
13038
|
+
* node's attributes. If present, it will check whether the ngProjectAs selector
|
|
13039
|
+
* matches any of the projection slot selectors.
|
|
13040
|
+
*/
|
|
13041
|
+
function matchingProjectionSlotIndex(tNode, projectionSlots) {
|
|
13042
|
+
var wildcardNgContentIndex = null;
|
|
13043
|
+
var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
|
|
13044
|
+
for (var i = 0; i < projectionSlots.length; i++) {
|
|
13045
|
+
var slotValue = projectionSlots[i];
|
|
13046
|
+
// The last wildcard projection slot should match all nodes which aren't matching
|
|
13047
|
+
// any selector. This is necessary to be backwards compatible with view engine.
|
|
13048
|
+
if (slotValue === '*') {
|
|
13049
|
+
wildcardNgContentIndex = i;
|
|
13050
|
+
continue;
|
|
13051
|
+
}
|
|
13052
|
+
// If we ran into an `ngProjectAs` attribute, we should match its parsed selector
|
|
13053
|
+
// to the list of selectors, otherwise we fall back to matching against the node.
|
|
13054
|
+
if (ngProjectAsAttrVal === null ?
|
|
13055
|
+
isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :
|
|
13056
|
+
isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {
|
|
13057
|
+
return i; // first matching selector "captures" a given node
|
|
13058
|
+
}
|
|
13059
|
+
}
|
|
13060
|
+
return wildcardNgContentIndex;
|
|
13061
|
+
}
|
|
13047
13062
|
/**
|
|
13048
13063
|
* Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
|
|
13049
13064
|
* It takes all the selectors from the entire component's template and decides where
|
|
@@ -13062,28 +13077,34 @@ function ɵɵnextContext(level) {
|
|
|
13062
13077
|
* - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
|
|
13063
13078
|
* template author).
|
|
13064
13079
|
*
|
|
13065
|
-
* @param
|
|
13066
|
-
*
|
|
13080
|
+
* @param projectionSlots? A collection of projection slots. A projection slot can be based
|
|
13081
|
+
* on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
|
|
13082
|
+
* all nodes which do not match any selector. If not specified, a single wildcard
|
|
13083
|
+
* selector projection slot will be defined.
|
|
13067
13084
|
*
|
|
13068
13085
|
* @codeGenApi
|
|
13069
13086
|
*/
|
|
13070
|
-
function ɵɵprojectionDef(
|
|
13087
|
+
function ɵɵprojectionDef(projectionSlots) {
|
|
13071
13088
|
var componentNode = findComponentView(getLView())[T_HOST];
|
|
13072
13089
|
if (!componentNode.projection) {
|
|
13073
|
-
|
|
13090
|
+
// If no explicit projection slots are defined, fall back to a single
|
|
13091
|
+
// projection slot with the wildcard selector.
|
|
13092
|
+
var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;
|
|
13074
13093
|
var projectionHeads = componentNode.projection =
|
|
13075
|
-
new Array(
|
|
13094
|
+
new Array(numProjectionSlots).fill(null);
|
|
13076
13095
|
var tails = projectionHeads.slice();
|
|
13077
13096
|
var componentChild = componentNode.child;
|
|
13078
13097
|
while (componentChild !== null) {
|
|
13079
|
-
var
|
|
13080
|
-
if (
|
|
13081
|
-
tails[
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13098
|
+
var slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;
|
|
13099
|
+
if (slotIndex !== null) {
|
|
13100
|
+
if (tails[slotIndex]) {
|
|
13101
|
+
tails[slotIndex].projectionNext = componentChild;
|
|
13102
|
+
}
|
|
13103
|
+
else {
|
|
13104
|
+
projectionHeads[slotIndex] = componentChild;
|
|
13105
|
+
}
|
|
13106
|
+
tails[slotIndex] = componentChild;
|
|
13085
13107
|
}
|
|
13086
|
-
tails[bucketIndex] = componentChild;
|
|
13087
13108
|
componentChild = componentChild.next;
|
|
13088
13109
|
}
|
|
13089
13110
|
}
|
|
@@ -15023,12 +15044,12 @@ var EMPTY_ARRAY$2 = [];
|
|
|
15023
15044
|
/**
|
|
15024
15045
|
* A lazily initialized NullInjector.
|
|
15025
15046
|
*/
|
|
15026
|
-
var NULL_INJECTOR
|
|
15047
|
+
var NULL_INJECTOR = undefined;
|
|
15027
15048
|
function getNullInjector() {
|
|
15028
|
-
if (NULL_INJECTOR
|
|
15029
|
-
NULL_INJECTOR
|
|
15049
|
+
if (NULL_INJECTOR === undefined) {
|
|
15050
|
+
NULL_INJECTOR = new NullInjector();
|
|
15030
15051
|
}
|
|
15031
|
-
return NULL_INJECTOR
|
|
15052
|
+
return NULL_INJECTOR;
|
|
15032
15053
|
}
|
|
15033
15054
|
/**
|
|
15034
15055
|
* Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
|
@@ -16576,7 +16597,7 @@ var Version = /** @class */ (function () {
|
|
|
16576
16597
|
/**
|
|
16577
16598
|
* @publicApi
|
|
16578
16599
|
*/
|
|
16579
|
-
var VERSION = new Version('8.0.
|
|
16600
|
+
var VERSION = new Version('8.0.1');
|
|
16580
16601
|
|
|
16581
16602
|
/**
|
|
16582
16603
|
* @license
|
|
@@ -19722,10 +19743,8 @@ var ComponentFactory$1 = /** @class */ (function (_super) {
|
|
|
19722
19743
|
_this.ngModule = ngModule;
|
|
19723
19744
|
_this.componentType = componentDef.type;
|
|
19724
19745
|
_this.selector = componentDef.selectors[0][0];
|
|
19725
|
-
// The component definition does not include the wildcard ('*') selector in its list.
|
|
19726
|
-
// It is implicitly expected as the first item in the projectable nodes array.
|
|
19727
19746
|
_this.ngContentSelectors =
|
|
19728
|
-
componentDef.ngContentSelectors ?
|
|
19747
|
+
componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];
|
|
19729
19748
|
_this.isBoundToModule = !!ngModule;
|
|
19730
19749
|
return _this;
|
|
19731
19750
|
}
|
|
@@ -19857,9 +19876,13 @@ var ComponentRef$1 = /** @class */ (function (_super) {
|
|
|
19857
19876
|
* NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.
|
|
19858
19877
|
*/
|
|
19859
19878
|
if (typeof ngI18nClosureMode === 'undefined') {
|
|
19879
|
+
// These property accesses can be ignored because ngI18nClosureMode will be set to false
|
|
19880
|
+
// when optimizing code and the whole if statement will be dropped.
|
|
19860
19881
|
// Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
|
|
19882
|
+
// tslint:disable-next-line:no-toplevel-property-access
|
|
19861
19883
|
_global['ngI18nClosureMode'] =
|
|
19862
19884
|
// TODO(FW-1250): validate that this actually, you know, works.
|
|
19885
|
+
// tslint:disable-next-line:no-toplevel-property-access
|
|
19863
19886
|
typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
|
|
19864
19887
|
}
|
|
19865
19888
|
|
|
@@ -19882,28 +19905,27 @@ function addAllToArray(items, arr) {
|
|
|
19882
19905
|
}
|
|
19883
19906
|
}
|
|
19884
19907
|
/**
|
|
19885
|
-
* Flattens an array
|
|
19908
|
+
* Flattens an array.
|
|
19886
19909
|
*/
|
|
19887
|
-
function flatten(list,
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19910
|
+
function flatten(list, dst) {
|
|
19911
|
+
if (dst === undefined)
|
|
19912
|
+
dst = list;
|
|
19913
|
+
for (var i = 0; i < list.length; i++) {
|
|
19891
19914
|
var item = list[i];
|
|
19892
19915
|
if (Array.isArray(item)) {
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
i++;
|
|
19916
|
+
// we need to inline it.
|
|
19917
|
+
if (dst === list) {
|
|
19918
|
+
// Our assumption that the list was already flat was wrong and
|
|
19919
|
+
// we need to clone flat since we need to write to it.
|
|
19920
|
+
dst = list.slice(0, i);
|
|
19899
19921
|
}
|
|
19922
|
+
flatten(item, dst);
|
|
19900
19923
|
}
|
|
19901
|
-
else {
|
|
19902
|
-
|
|
19903
|
-
i++;
|
|
19924
|
+
else if (dst !== list) {
|
|
19925
|
+
dst.push(item);
|
|
19904
19926
|
}
|
|
19905
19927
|
}
|
|
19906
|
-
return
|
|
19928
|
+
return dst;
|
|
19907
19929
|
}
|
|
19908
19930
|
|
|
19909
19931
|
/**
|
|
@@ -22731,12 +22753,7 @@ function noModuleError(id) {
|
|
|
22731
22753
|
* Use of this source code is governed by an MIT-style license that can be
|
|
22732
22754
|
* found in the LICENSE file at https://angular.io/license
|
|
22733
22755
|
*/
|
|
22734
|
-
|
|
22735
|
-
* A mapping of the @angular/core API surface used in generated expressions to the actual symbols.
|
|
22736
|
-
*
|
|
22737
|
-
* This should be kept up to date with the public exports of @angular/core.
|
|
22738
|
-
*/
|
|
22739
|
-
var angularCoreEnv = {
|
|
22756
|
+
var ɵ0$8 = function () { return ({
|
|
22740
22757
|
'ɵɵdefineBase': ɵɵdefineBase,
|
|
22741
22758
|
'ɵɵdefineComponent': ɵɵdefineComponent,
|
|
22742
22759
|
'ɵɵdefineDirective': ɵɵdefineDirective,
|
|
@@ -22861,7 +22878,13 @@ var angularCoreEnv = {
|
|
|
22861
22878
|
'ɵɵsanitizeUrl': ɵɵsanitizeUrl,
|
|
22862
22879
|
'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,
|
|
22863
22880
|
'ɵregisterNgModuleType': registerNgModuleType,
|
|
22864
|
-
};
|
|
22881
|
+
}); };
|
|
22882
|
+
/**
|
|
22883
|
+
* A mapping of the @angular/core API surface used in generated expressions to the actual symbols.
|
|
22884
|
+
*
|
|
22885
|
+
* This should be kept up to date with the public exports of @angular/core.
|
|
22886
|
+
*/
|
|
22887
|
+
var angularCoreEnv = (ɵ0$8)();
|
|
22865
22888
|
|
|
22866
22889
|
/**
|
|
22867
22890
|
* @license
|
|
@@ -22940,13 +22963,15 @@ function compileNgModuleDefs(moduleType, ngModule) {
|
|
|
22940
22963
|
configurable: true,
|
|
22941
22964
|
get: function () {
|
|
22942
22965
|
if (ngModuleDef === null) {
|
|
22943
|
-
ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, "ng
|
|
22966
|
+
ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, "ng:///" + moduleType.name + "/ngModuleDef.js", {
|
|
22944
22967
|
type: moduleType,
|
|
22945
|
-
bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$4
|
|
22968
|
+
bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$4).map(resolveForwardRef),
|
|
22946
22969
|
declarations: declarations.map(resolveForwardRef),
|
|
22947
|
-
imports: flatten(ngModule.imports || EMPTY_ARRAY$4
|
|
22970
|
+
imports: flatten(ngModule.imports || EMPTY_ARRAY$4)
|
|
22971
|
+
.map(resolveForwardRef)
|
|
22948
22972
|
.map(expandModuleWithProviders),
|
|
22949
|
-
exports: flatten(ngModule.exports || EMPTY_ARRAY$4
|
|
22973
|
+
exports: flatten(ngModule.exports || EMPTY_ARRAY$4)
|
|
22974
|
+
.map(resolveForwardRef)
|
|
22950
22975
|
.map(expandModuleWithProviders),
|
|
22951
22976
|
emitInline: true,
|
|
22952
22977
|
schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,
|
|
@@ -22973,7 +22998,7 @@ function compileNgModuleDefs(moduleType, ngModule) {
|
|
|
22973
22998
|
(ngModule.exports || EMPTY_ARRAY$4).map(resolveForwardRef),
|
|
22974
22999
|
],
|
|
22975
23000
|
};
|
|
22976
|
-
ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, "ng
|
|
23001
|
+
ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, "ng:///" + moduleType.name + "/ngInjectorDef.js", meta);
|
|
22977
23002
|
}
|
|
22978
23003
|
return ngInjectorDef;
|
|
22979
23004
|
},
|
|
@@ -22990,17 +23015,18 @@ function verifySemanticsOfNgModuleDef(moduleType) {
|
|
|
22990
23015
|
var errors = [];
|
|
22991
23016
|
var declarations = maybeUnwrapFn(ngModuleDef.declarations);
|
|
22992
23017
|
var imports = maybeUnwrapFn(ngModuleDef.imports);
|
|
22993
|
-
flatten(imports
|
|
23018
|
+
flatten(imports).map(unwrapModuleWithProvidersImports).forEach(verifySemanticsOfNgModuleDef);
|
|
22994
23019
|
var exports = maybeUnwrapFn(ngModuleDef.exports);
|
|
22995
23020
|
declarations.forEach(verifyDeclarationsHaveDefinitions);
|
|
22996
|
-
var combinedDeclarations = __spread(declarations.map(resolveForwardRef), flatten(imports.map(computeCombinedExports)
|
|
23021
|
+
var combinedDeclarations = __spread(declarations.map(resolveForwardRef), flatten(imports.map(computeCombinedExports)).map(resolveForwardRef));
|
|
22997
23022
|
exports.forEach(verifyExportsAreDeclaredOrReExported);
|
|
22998
23023
|
declarations.forEach(verifyDeclarationIsUnique);
|
|
22999
23024
|
declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);
|
|
23000
23025
|
var ngModule = getAnnotation(moduleType, 'NgModule');
|
|
23001
23026
|
if (ngModule) {
|
|
23002
23027
|
ngModule.imports &&
|
|
23003
|
-
flatten(ngModule.imports
|
|
23028
|
+
flatten(ngModule.imports)
|
|
23029
|
+
.map(unwrapModuleWithProvidersImports)
|
|
23004
23030
|
.forEach(verifySemanticsOfNgModuleDef);
|
|
23005
23031
|
ngModule.bootstrap && ngModule.bootstrap.forEach(verifyCorrectBootstrapType);
|
|
23006
23032
|
ngModule.bootstrap && ngModule.bootstrap.forEach(verifyComponentIsPartOfNgModule);
|
|
@@ -23346,7 +23372,7 @@ function compileDirective(type, directive) {
|
|
|
23346
23372
|
get: function () {
|
|
23347
23373
|
if (ngDirectiveDef === null) {
|
|
23348
23374
|
var name_1 = type && type.name;
|
|
23349
|
-
var sourceMapUrl = "ng
|
|
23375
|
+
var sourceMapUrl = "ng:///" + name_1 + "/ngDirectiveDef.js";
|
|
23350
23376
|
var compiler = getCompilerFacade();
|
|
23351
23377
|
var facade = directiveMetadata(type, directive);
|
|
23352
23378
|
facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name_1, sourceMapUrl);
|
|
@@ -23528,7 +23554,7 @@ function compilePipe(type, meta) {
|
|
|
23528
23554
|
if (ngPipeDef === null) {
|
|
23529
23555
|
var typeName = type.name;
|
|
23530
23556
|
ngPipeDef =
|
|
23531
|
-
getCompilerFacade().compilePipe(angularCoreEnv, "ng
|
|
23557
|
+
getCompilerFacade().compilePipe(angularCoreEnv, "ng:///" + typeName + "/ngPipeDef.js", {
|
|
23532
23558
|
type: type,
|
|
23533
23559
|
typeArgumentCount: 0,
|
|
23534
23560
|
name: typeName,
|
|
@@ -23551,7 +23577,7 @@ function compilePipe(type, meta) {
|
|
|
23551
23577
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23552
23578
|
* found in the LICENSE file at https://angular.io/license
|
|
23553
23579
|
*/
|
|
23554
|
-
var ɵ0$
|
|
23580
|
+
var ɵ0$9 = function (dir) {
|
|
23555
23581
|
if (dir === void 0) { dir = {}; }
|
|
23556
23582
|
return dir;
|
|
23557
23583
|
}, ɵ1$2 = function (type, meta) { return SWITCH_COMPILE_DIRECTIVE(type, meta); };
|
|
@@ -23560,7 +23586,7 @@ var ɵ0$6 = function (dir) {
|
|
|
23560
23586
|
*
|
|
23561
23587
|
* @publicApi
|
|
23562
23588
|
*/
|
|
23563
|
-
var Directive = makeDecorator('Directive', ɵ0$
|
|
23589
|
+
var Directive = makeDecorator('Directive', ɵ0$9, undefined, undefined, ɵ1$2);
|
|
23564
23590
|
var ɵ2$2 = function (c) {
|
|
23565
23591
|
if (c === void 0) { c = {}; }
|
|
23566
23592
|
return (__assign({ changeDetection: ChangeDetectionStrategy.Default }, c));
|
|
@@ -23647,7 +23673,7 @@ var SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__PRE_R3__;
|
|
|
23647
23673
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23648
23674
|
* found in the LICENSE file at https://angular.io/license
|
|
23649
23675
|
*/
|
|
23650
|
-
var ɵ0$
|
|
23676
|
+
var ɵ0$a = function (ngModule) { return ngModule; }, ɵ1$3 =
|
|
23651
23677
|
/**
|
|
23652
23678
|
* Decorator that marks the following class as an NgModule, and supplies
|
|
23653
23679
|
* configuration metadata for it.
|
|
@@ -23664,7 +23690,7 @@ function (type, meta) { return SWITCH_COMPILE_NGMODULE(type, meta); };
|
|
|
23664
23690
|
* @Annotation
|
|
23665
23691
|
* @publicApi
|
|
23666
23692
|
*/
|
|
23667
|
-
var NgModule = makeDecorator('NgModule', ɵ0$
|
|
23693
|
+
var NgModule = makeDecorator('NgModule', ɵ0$a, undefined, undefined, ɵ1$3);
|
|
23668
23694
|
function preR3NgModuleCompile(moduleType, metadata) {
|
|
23669
23695
|
var imports = (metadata && metadata.imports) || [];
|
|
23670
23696
|
if (metadata && metadata.exports) {
|
|
@@ -24026,6 +24052,7 @@ function noopScope(arg0, arg1) {
|
|
|
24026
24052
|
* an exception is expected during normal execution while profiling.
|
|
24027
24053
|
*
|
|
24028
24054
|
* @publicApi
|
|
24055
|
+
* @deprecated the Web Tracing Framework is no longer supported in Angular
|
|
24029
24056
|
*/
|
|
24030
24057
|
var wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };
|
|
24031
24058
|
/**
|
|
@@ -24036,6 +24063,7 @@ var wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { re
|
|
|
24036
24063
|
*
|
|
24037
24064
|
* Returns the `returnValue for easy chaining.
|
|
24038
24065
|
* @publicApi
|
|
24066
|
+
* @deprecated the Web Tracing Framework is no longer supported in Angular
|
|
24039
24067
|
*/
|
|
24040
24068
|
var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };
|
|
24041
24069
|
/**
|
|
@@ -24050,6 +24078,7 @@ var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };
|
|
|
24050
24078
|
* });
|
|
24051
24079
|
* }
|
|
24052
24080
|
* @publicApi
|
|
24081
|
+
* @deprecated the Web Tracing Framework is no longer supported in Angular
|
|
24053
24082
|
*/
|
|
24054
24083
|
var wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };
|
|
24055
24084
|
/**
|
|
@@ -24057,6 +24086,7 @@ var wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, actio
|
|
|
24057
24086
|
* [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
|
|
24058
24087
|
* enabled.
|
|
24059
24088
|
* @publicApi
|
|
24089
|
+
* @deprecated the Web Tracing Framework is no longer supported in Angular
|
|
24060
24090
|
*/
|
|
24061
24091
|
var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };
|
|
24062
24092
|
|
|
@@ -24067,7 +24097,7 @@ var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };
|
|
|
24067
24097
|
* Use of this source code is governed by an MIT-style license that can be
|
|
24068
24098
|
* found in the LICENSE file at https://angular.io/license
|
|
24069
24099
|
*/
|
|
24070
|
-
var promise = Promise.resolve(0);
|
|
24100
|
+
var promise = (function () { return Promise.resolve(0); })();
|
|
24071
24101
|
function scheduleMicroTask(fn) {
|
|
24072
24102
|
if (typeof Zone === 'undefined') {
|
|
24073
24103
|
// use promise to schedule microTask instead of use Zone
|