@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/bundles/core.umd.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
|
*/
|
|
@@ -8943,7 +8943,7 @@
|
|
|
8943
8943
|
return styleString;
|
|
8944
8944
|
}
|
|
8945
8945
|
/**
|
|
8946
|
-
* Returns the current cached
|
|
8946
|
+
* Returns the current cached multi-value for a given directiveIndex within the provided context.
|
|
8947
8947
|
*/
|
|
8948
8948
|
function readCachedMapValue(context, entryIsClassBased, directiveIndex) {
|
|
8949
8949
|
var values = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];
|
|
@@ -9322,27 +9322,6 @@
|
|
|
9322
9322
|
}
|
|
9323
9323
|
return null;
|
|
9324
9324
|
}
|
|
9325
|
-
/**
|
|
9326
|
-
* Checks a given node against matching projection selectors and returns
|
|
9327
|
-
* selector index (or 0 if none matched).
|
|
9328
|
-
*
|
|
9329
|
-
* This function takes into account the parsed ngProjectAs selector from the node's attributes.
|
|
9330
|
-
* If present, it will check whether the ngProjectAs selector matches any of the projection
|
|
9331
|
-
* selectors.
|
|
9332
|
-
*/
|
|
9333
|
-
function matchingProjectionSelectorIndex(tNode, selectors) {
|
|
9334
|
-
var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
|
|
9335
|
-
for (var i = 0; i < selectors.length; i++) {
|
|
9336
|
-
// If we ran into an `ngProjectAs` attribute, we should match its parsed selector
|
|
9337
|
-
// to the list of selectors, otherwise we fall back to matching against the node.
|
|
9338
|
-
if (ngProjectAsAttrVal === null ?
|
|
9339
|
-
isNodeMatchingSelectorList(tNode, selectors[i], /* isProjectionMode */ true) :
|
|
9340
|
-
isSelectorInSelectorList(ngProjectAsAttrVal, selectors[i])) {
|
|
9341
|
-
return i + 1; // first matching selector "captures" a given node
|
|
9342
|
-
}
|
|
9343
|
-
}
|
|
9344
|
-
return 0;
|
|
9345
|
-
}
|
|
9346
9325
|
function getNameOnlyMarkerIndex(nodeAttrs) {
|
|
9347
9326
|
for (var i = 0; i < nodeAttrs.length; i++) {
|
|
9348
9327
|
var nodeAttr = nodeAttrs[i];
|
|
@@ -13101,6 +13080,35 @@
|
|
|
13101
13080
|
return nextContextImpl(level);
|
|
13102
13081
|
}
|
|
13103
13082
|
|
|
13083
|
+
/**
|
|
13084
|
+
* Checks a given node against matching projection slots and returns the
|
|
13085
|
+
* determined slot index. Returns "null" if no slot matched the given node.
|
|
13086
|
+
*
|
|
13087
|
+
* This function takes into account the parsed ngProjectAs selector from the
|
|
13088
|
+
* node's attributes. If present, it will check whether the ngProjectAs selector
|
|
13089
|
+
* matches any of the projection slot selectors.
|
|
13090
|
+
*/
|
|
13091
|
+
function matchingProjectionSlotIndex(tNode, projectionSlots) {
|
|
13092
|
+
var wildcardNgContentIndex = null;
|
|
13093
|
+
var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
|
|
13094
|
+
for (var i = 0; i < projectionSlots.length; i++) {
|
|
13095
|
+
var slotValue = projectionSlots[i];
|
|
13096
|
+
// The last wildcard projection slot should match all nodes which aren't matching
|
|
13097
|
+
// any selector. This is necessary to be backwards compatible with view engine.
|
|
13098
|
+
if (slotValue === '*') {
|
|
13099
|
+
wildcardNgContentIndex = i;
|
|
13100
|
+
continue;
|
|
13101
|
+
}
|
|
13102
|
+
// If we ran into an `ngProjectAs` attribute, we should match its parsed selector
|
|
13103
|
+
// to the list of selectors, otherwise we fall back to matching against the node.
|
|
13104
|
+
if (ngProjectAsAttrVal === null ?
|
|
13105
|
+
isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :
|
|
13106
|
+
isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {
|
|
13107
|
+
return i; // first matching selector "captures" a given node
|
|
13108
|
+
}
|
|
13109
|
+
}
|
|
13110
|
+
return wildcardNgContentIndex;
|
|
13111
|
+
}
|
|
13104
13112
|
/**
|
|
13105
13113
|
* Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
|
|
13106
13114
|
* It takes all the selectors from the entire component's template and decides where
|
|
@@ -13119,28 +13127,34 @@
|
|
|
13119
13127
|
* - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
|
|
13120
13128
|
* template author).
|
|
13121
13129
|
*
|
|
13122
|
-
* @param
|
|
13123
|
-
*
|
|
13130
|
+
* @param projectionSlots? A collection of projection slots. A projection slot can be based
|
|
13131
|
+
* on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
|
|
13132
|
+
* all nodes which do not match any selector. If not specified, a single wildcard
|
|
13133
|
+
* selector projection slot will be defined.
|
|
13124
13134
|
*
|
|
13125
13135
|
* @codeGenApi
|
|
13126
13136
|
*/
|
|
13127
|
-
function ɵɵprojectionDef(
|
|
13137
|
+
function ɵɵprojectionDef(projectionSlots) {
|
|
13128
13138
|
var componentNode = findComponentView(getLView())[T_HOST];
|
|
13129
13139
|
if (!componentNode.projection) {
|
|
13130
|
-
|
|
13140
|
+
// If no explicit projection slots are defined, fall back to a single
|
|
13141
|
+
// projection slot with the wildcard selector.
|
|
13142
|
+
var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;
|
|
13131
13143
|
var projectionHeads = componentNode.projection =
|
|
13132
|
-
new Array(
|
|
13144
|
+
new Array(numProjectionSlots).fill(null);
|
|
13133
13145
|
var tails = projectionHeads.slice();
|
|
13134
13146
|
var componentChild = componentNode.child;
|
|
13135
13147
|
while (componentChild !== null) {
|
|
13136
|
-
var
|
|
13137
|
-
if (
|
|
13138
|
-
tails[
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13148
|
+
var slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;
|
|
13149
|
+
if (slotIndex !== null) {
|
|
13150
|
+
if (tails[slotIndex]) {
|
|
13151
|
+
tails[slotIndex].projectionNext = componentChild;
|
|
13152
|
+
}
|
|
13153
|
+
else {
|
|
13154
|
+
projectionHeads[slotIndex] = componentChild;
|
|
13155
|
+
}
|
|
13156
|
+
tails[slotIndex] = componentChild;
|
|
13142
13157
|
}
|
|
13143
|
-
tails[bucketIndex] = componentChild;
|
|
13144
13158
|
componentChild = componentChild.next;
|
|
13145
13159
|
}
|
|
13146
13160
|
}
|
|
@@ -16628,7 +16642,7 @@
|
|
|
16628
16642
|
/**
|
|
16629
16643
|
* @publicApi
|
|
16630
16644
|
*/
|
|
16631
|
-
var VERSION = new Version('8.0.
|
|
16645
|
+
var VERSION = new Version('8.0.1');
|
|
16632
16646
|
|
|
16633
16647
|
/**
|
|
16634
16648
|
* @license
|
|
@@ -19774,10 +19788,8 @@
|
|
|
19774
19788
|
_this.ngModule = ngModule;
|
|
19775
19789
|
_this.componentType = componentDef.type;
|
|
19776
19790
|
_this.selector = componentDef.selectors[0][0];
|
|
19777
|
-
// The component definition does not include the wildcard ('*') selector in its list.
|
|
19778
|
-
// It is implicitly expected as the first item in the projectable nodes array.
|
|
19779
19791
|
_this.ngContentSelectors =
|
|
19780
|
-
componentDef.ngContentSelectors ?
|
|
19792
|
+
componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];
|
|
19781
19793
|
_this.isBoundToModule = !!ngModule;
|
|
19782
19794
|
return _this;
|
|
19783
19795
|
}
|