@angular/core 11.2.0-rc.0 → 11.2.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 +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 +31 -17
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +98 -98
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/src/render3/assert.js +10 -2
- package/esm2015/src/render3/collect_native_nodes.js +7 -12
- package/esm2015/src/render3/node_manipulation.js +20 -8
- package/esm2015/src/version.js +1 -1
- package/fesm2015/core.js +31 -17
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/package.json +1 -1
- 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 v11.2.0
|
|
2
|
+
* @license Angular v11.2.0
|
|
3
3
|
* (c) 2010-2020 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1225,6 +1225,14 @@
|
|
|
1225
1225
|
throwError("Index out of range (expecting " + lower + " <= " + index + " < " + upper + ")");
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
|
+
function assertProjectionSlots(lView, errMessage) {
|
|
1229
|
+
assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');
|
|
1230
|
+
assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage ||
|
|
1231
|
+
'Components with projection nodes (<ng-content>) must have projection slots defined.');
|
|
1232
|
+
}
|
|
1233
|
+
function assertParentView(lView, errMessage) {
|
|
1234
|
+
assertDefined(lView, errMessage || 'Component views should always have a parent view (component\'s host view)');
|
|
1235
|
+
}
|
|
1228
1236
|
/**
|
|
1229
1237
|
* This is a basic sanity check that the `injectorIndex` seems to point to what looks like a
|
|
1230
1238
|
* NodeInjector data structure.
|
|
@@ -7896,12 +7904,14 @@
|
|
|
7896
7904
|
return rNode || unwrapRNode(lView[tNode.index]);
|
|
7897
7905
|
}
|
|
7898
7906
|
else {
|
|
7899
|
-
var
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7907
|
+
var projectionNodes = getProjectionNodes(lView, tNode);
|
|
7908
|
+
if (projectionNodes !== null) {
|
|
7909
|
+
if (Array.isArray(projectionNodes)) {
|
|
7910
|
+
return projectionNodes[0];
|
|
7911
|
+
}
|
|
7912
|
+
var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);
|
|
7913
|
+
ngDevMode && assertParentView(parentView);
|
|
7914
|
+
return getFirstNativeNode(parentView, projectionNodes);
|
|
7905
7915
|
}
|
|
7906
7916
|
else {
|
|
7907
7917
|
return getFirstNativeNode(lView, tNode.next);
|
|
@@ -7910,6 +7920,16 @@
|
|
|
7910
7920
|
}
|
|
7911
7921
|
return null;
|
|
7912
7922
|
}
|
|
7923
|
+
function getProjectionNodes(lView, tNode) {
|
|
7924
|
+
if (tNode !== null) {
|
|
7925
|
+
var componentView = lView[DECLARATION_COMPONENT_VIEW];
|
|
7926
|
+
var componentHost = componentView[T_HOST];
|
|
7927
|
+
var slotIdx = tNode.projection;
|
|
7928
|
+
ngDevMode && assertProjectionSlots(lView);
|
|
7929
|
+
return componentHost.projection[slotIdx];
|
|
7930
|
+
}
|
|
7931
|
+
return null;
|
|
7932
|
+
}
|
|
7913
7933
|
function getBeforeNodeForView(viewIndexInContainer, lContainer) {
|
|
7914
7934
|
var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;
|
|
7915
7935
|
if (nextViewIndex < lContainer.length) {
|
|
@@ -21933,7 +21953,7 @@
|
|
|
21933
21953
|
/**
|
|
21934
21954
|
* @publicApi
|
|
21935
21955
|
*/
|
|
21936
|
-
var VERSION = new Version('11.2.0
|
|
21956
|
+
var VERSION = new Version('11.2.0');
|
|
21937
21957
|
|
|
21938
21958
|
/**
|
|
21939
21959
|
* @license
|
|
@@ -23055,19 +23075,13 @@
|
|
|
23055
23075
|
}
|
|
23056
23076
|
}
|
|
23057
23077
|
else if (tNodeType & 16 /* Projection */) {
|
|
23058
|
-
var
|
|
23059
|
-
var componentHost = componentView[T_HOST];
|
|
23060
|
-
var slotIdx = tNode.projection;
|
|
23061
|
-
ngDevMode &&
|
|
23062
|
-
assertDefined(componentHost.projection, 'Components with projection nodes (<ng-content>) must have projection slots defined.');
|
|
23063
|
-
var nodesInSlot = componentHost.projection[slotIdx];
|
|
23078
|
+
var nodesInSlot = getProjectionNodes(lView, tNode);
|
|
23064
23079
|
if (Array.isArray(nodesInSlot)) {
|
|
23065
23080
|
result.push.apply(result, __spread(nodesInSlot));
|
|
23066
23081
|
}
|
|
23067
23082
|
else {
|
|
23068
|
-
var parentView = getLViewParent(
|
|
23069
|
-
ngDevMode &&
|
|
23070
|
-
assertDefined(parentView, 'Component views should always have a parent view (component\'s host view)');
|
|
23083
|
+
var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);
|
|
23084
|
+
ngDevMode && assertParentView(parentView);
|
|
23071
23085
|
collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);
|
|
23072
23086
|
}
|
|
23073
23087
|
}
|