@angular/core 8.0.0 → 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 -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 +51 -39
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +74 -82
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +17 -5
- package/core.metadata.json +1 -1
- package/esm2015/src/di/injectable.js +1 -1
- package/esm2015/src/render3/component_ref.js +2 -4
- 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/interfaces/projection.js +1 -1
- 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/version.js +1 -1
- package/esm5/src/di/injectable.js +1 -1
- package/esm5/src/render3/component_ref.js +2 -4
- package/esm5/src/render3/index.js +1 -1
- package/esm5/src/render3/instructions/projection.js +49 -14
- package/esm5/src/render3/interfaces/projection.js +1 -1
- 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/version.js +1 -1
- package/fesm2015/core.js +54 -42
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm5/core.js +51 -39
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/package.json +1 -1
- package/schematics/migrations/injectable-pipe/index.js +5 -2
- package/schematics/migrations/move-document/index.js +5 -2
- package/schematics/migrations/static-queries/index.js +5 -2
- package/schematics/migrations/template-var-assignment/index.js +6 -3
- package/src/r3_symbols.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
package/fesm2015/testing.js
CHANGED
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
|
*/
|
|
@@ -8893,7 +8893,7 @@ function getInitialStyleStringValue(context) {
|
|
|
8893
8893
|
return styleString;
|
|
8894
8894
|
}
|
|
8895
8895
|
/**
|
|
8896
|
-
* Returns the current cached
|
|
8896
|
+
* Returns the current cached multi-value for a given directiveIndex within the provided context.
|
|
8897
8897
|
*/
|
|
8898
8898
|
function readCachedMapValue(context, entryIsClassBased, directiveIndex) {
|
|
8899
8899
|
var values = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];
|
|
@@ -9272,27 +9272,6 @@ function getProjectAsAttrValue(tNode) {
|
|
|
9272
9272
|
}
|
|
9273
9273
|
return null;
|
|
9274
9274
|
}
|
|
9275
|
-
/**
|
|
9276
|
-
* Checks a given node against matching projection selectors and returns
|
|
9277
|
-
* selector index (or 0 if none matched).
|
|
9278
|
-
*
|
|
9279
|
-
* This function takes into account the parsed ngProjectAs selector from the node's attributes.
|
|
9280
|
-
* If present, it will check whether the ngProjectAs selector matches any of the projection
|
|
9281
|
-
* selectors.
|
|
9282
|
-
*/
|
|
9283
|
-
function matchingProjectionSelectorIndex(tNode, selectors) {
|
|
9284
|
-
var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
|
|
9285
|
-
for (var i = 0; i < selectors.length; i++) {
|
|
9286
|
-
// If we ran into an `ngProjectAs` attribute, we should match its parsed selector
|
|
9287
|
-
// to the list of selectors, otherwise we fall back to matching against the node.
|
|
9288
|
-
if (ngProjectAsAttrVal === null ?
|
|
9289
|
-
isNodeMatchingSelectorList(tNode, selectors[i], /* isProjectionMode */ true) :
|
|
9290
|
-
isSelectorInSelectorList(ngProjectAsAttrVal, selectors[i])) {
|
|
9291
|
-
return i + 1; // first matching selector "captures" a given node
|
|
9292
|
-
}
|
|
9293
|
-
}
|
|
9294
|
-
return 0;
|
|
9295
|
-
}
|
|
9296
9275
|
function getNameOnlyMarkerIndex(nodeAttrs) {
|
|
9297
9276
|
for (var i = 0; i < nodeAttrs.length; i++) {
|
|
9298
9277
|
var nodeAttr = nodeAttrs[i];
|
|
@@ -13051,6 +13030,35 @@ function ɵɵnextContext(level) {
|
|
|
13051
13030
|
return nextContextImpl(level);
|
|
13052
13031
|
}
|
|
13053
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
|
+
}
|
|
13054
13062
|
/**
|
|
13055
13063
|
* Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
|
|
13056
13064
|
* It takes all the selectors from the entire component's template and decides where
|
|
@@ -13069,28 +13077,34 @@ function ɵɵnextContext(level) {
|
|
|
13069
13077
|
* - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
|
|
13070
13078
|
* template author).
|
|
13071
13079
|
*
|
|
13072
|
-
* @param
|
|
13073
|
-
*
|
|
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.
|
|
13074
13084
|
*
|
|
13075
13085
|
* @codeGenApi
|
|
13076
13086
|
*/
|
|
13077
|
-
function ɵɵprojectionDef(
|
|
13087
|
+
function ɵɵprojectionDef(projectionSlots) {
|
|
13078
13088
|
var componentNode = findComponentView(getLView())[T_HOST];
|
|
13079
13089
|
if (!componentNode.projection) {
|
|
13080
|
-
|
|
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;
|
|
13081
13093
|
var projectionHeads = componentNode.projection =
|
|
13082
|
-
new Array(
|
|
13094
|
+
new Array(numProjectionSlots).fill(null);
|
|
13083
13095
|
var tails = projectionHeads.slice();
|
|
13084
13096
|
var componentChild = componentNode.child;
|
|
13085
13097
|
while (componentChild !== null) {
|
|
13086
|
-
var
|
|
13087
|
-
if (
|
|
13088
|
-
tails[
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
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;
|
|
13092
13107
|
}
|
|
13093
|
-
tails[bucketIndex] = componentChild;
|
|
13094
13108
|
componentChild = componentChild.next;
|
|
13095
13109
|
}
|
|
13096
13110
|
}
|
|
@@ -16583,7 +16597,7 @@ var Version = /** @class */ (function () {
|
|
|
16583
16597
|
/**
|
|
16584
16598
|
* @publicApi
|
|
16585
16599
|
*/
|
|
16586
|
-
var VERSION = new Version('8.0.
|
|
16600
|
+
var VERSION = new Version('8.0.1');
|
|
16587
16601
|
|
|
16588
16602
|
/**
|
|
16589
16603
|
* @license
|
|
@@ -19729,10 +19743,8 @@ var ComponentFactory$1 = /** @class */ (function (_super) {
|
|
|
19729
19743
|
_this.ngModule = ngModule;
|
|
19730
19744
|
_this.componentType = componentDef.type;
|
|
19731
19745
|
_this.selector = componentDef.selectors[0][0];
|
|
19732
|
-
// The component definition does not include the wildcard ('*') selector in its list.
|
|
19733
|
-
// It is implicitly expected as the first item in the projectable nodes array.
|
|
19734
19746
|
_this.ngContentSelectors =
|
|
19735
|
-
componentDef.ngContentSelectors ?
|
|
19747
|
+
componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];
|
|
19736
19748
|
_this.isBoundToModule = !!ngModule;
|
|
19737
19749
|
return _this;
|
|
19738
19750
|
}
|