@angular/core 15.2.5 → 15.2.6
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/esm2020/src/linker/component_factory.mjs +1 -1
- package/esm2020/src/linker/view_container_ref.mjs +2 -2
- package/esm2020/src/linker/view_ref.mjs +2 -2
- package/esm2020/src/render3/hooks.mjs +13 -14
- package/esm2020/src/render3/instructions/shared.mjs +4 -4
- package/esm2020/src/render3/pipe.mjs +2 -2
- package/esm2020/src/sanitization/url_sanitizer.mjs +7 -6
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/fake_async.mjs +2 -2
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +31 -26
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +31 -26
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +26 -26
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +26 -26
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +4 -4
- package/package.json +1 -1
- package/schematics/migrations/relative-link-resolution/bundle.js +7 -7
- package/schematics/migrations/router-link-with-href/bundle.js +10 -10
- package/schematics/ng-generate/standalone-migration/bundle.js +323 -323
- package/schematics/ng-generate/standalone-migration/bundle.js.map +1 -1
- package/testing/index.d.ts +2 -2
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.6
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -260,7 +260,7 @@ function resetFakeAsyncZone() {
|
|
|
260
260
|
*
|
|
261
261
|
* Can be used to wrap `inject()` calls.
|
|
262
262
|
*
|
|
263
|
-
* @param fn The function that you want to wrap in the `
|
|
263
|
+
* @param fn The function that you want to wrap in the `fakeAsync` zone.
|
|
264
264
|
*
|
|
265
265
|
* @usageNotes
|
|
266
266
|
* ### Example
|
|
@@ -3515,16 +3515,15 @@ function registerPreOrderHooks(directiveIndex, directiveDef, tView) {
|
|
|
3515
3515
|
const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;
|
|
3516
3516
|
if (ngOnChanges) {
|
|
3517
3517
|
const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);
|
|
3518
|
-
(tView.preOrderHooks
|
|
3519
|
-
(tView.preOrderCheckHooks
|
|
3520
|
-
.push(directiveIndex, wrappedOnChanges);
|
|
3518
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);
|
|
3519
|
+
(tView.preOrderCheckHooks ?? (tView.preOrderCheckHooks = [])).push(directiveIndex, wrappedOnChanges);
|
|
3521
3520
|
}
|
|
3522
3521
|
if (ngOnInit) {
|
|
3523
|
-
(tView.preOrderHooks
|
|
3522
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);
|
|
3524
3523
|
}
|
|
3525
3524
|
if (ngDoCheck) {
|
|
3526
|
-
(tView.preOrderHooks
|
|
3527
|
-
(tView.preOrderCheckHooks
|
|
3525
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);
|
|
3526
|
+
(tView.preOrderCheckHooks ?? (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);
|
|
3528
3527
|
}
|
|
3529
3528
|
}
|
|
3530
3529
|
/**
|
|
@@ -3556,21 +3555,21 @@ function registerPostOrderHooks(tView, tNode) {
|
|
|
3556
3555
|
const lifecycleHooks = directiveDef.type.prototype;
|
|
3557
3556
|
const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;
|
|
3558
3557
|
if (ngAfterContentInit) {
|
|
3559
|
-
(tView.contentHooks
|
|
3558
|
+
(tView.contentHooks ?? (tView.contentHooks = [])).push(-i, ngAfterContentInit);
|
|
3560
3559
|
}
|
|
3561
3560
|
if (ngAfterContentChecked) {
|
|
3562
|
-
(tView.contentHooks
|
|
3563
|
-
(tView.contentCheckHooks
|
|
3561
|
+
(tView.contentHooks ?? (tView.contentHooks = [])).push(i, ngAfterContentChecked);
|
|
3562
|
+
(tView.contentCheckHooks ?? (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);
|
|
3564
3563
|
}
|
|
3565
3564
|
if (ngAfterViewInit) {
|
|
3566
|
-
(tView.viewHooks
|
|
3565
|
+
(tView.viewHooks ?? (tView.viewHooks = [])).push(-i, ngAfterViewInit);
|
|
3567
3566
|
}
|
|
3568
3567
|
if (ngAfterViewChecked) {
|
|
3569
|
-
(tView.viewHooks
|
|
3570
|
-
(tView.viewCheckHooks
|
|
3568
|
+
(tView.viewHooks ?? (tView.viewHooks = [])).push(i, ngAfterViewChecked);
|
|
3569
|
+
(tView.viewCheckHooks ?? (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);
|
|
3571
3570
|
}
|
|
3572
3571
|
if (ngOnDestroy != null) {
|
|
3573
|
-
(tView.destroyHooks
|
|
3572
|
+
(tView.destroyHooks ?? (tView.destroyHooks = [])).push(i, ngOnDestroy);
|
|
3574
3573
|
}
|
|
3575
3574
|
}
|
|
3576
3575
|
}
|
|
@@ -7242,13 +7241,14 @@ function isDOMParserAvailable() {
|
|
|
7242
7241
|
}
|
|
7243
7242
|
|
|
7244
7243
|
/**
|
|
7245
|
-
* A pattern that recognizes
|
|
7244
|
+
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
|
|
7245
|
+
* contexts.
|
|
7246
7246
|
*
|
|
7247
7247
|
* This regular expression matches a subset of URLs that will not cause script
|
|
7248
7248
|
* execution if used in URL context within a HTML document. Specifically, this
|
|
7249
|
-
* regular expression matches if
|
|
7250
|
-
*
|
|
7251
|
-
*
|
|
7249
|
+
* regular expression matches if:
|
|
7250
|
+
* (1) Either a protocol that is not javascript:, and that has valid characters
|
|
7251
|
+
* (alphanumeric or [+-.]).
|
|
7252
7252
|
* (2) or no protocol. A protocol must be followed by a colon. The below
|
|
7253
7253
|
* allows that by allowing colons only after one of the characters [/?#].
|
|
7254
7254
|
* A colon after a hash (#) must be in the fragment.
|
|
@@ -7267,7 +7267,7 @@ function isDOMParserAvailable() {
|
|
|
7267
7267
|
*
|
|
7268
7268
|
* This regular expression was taken from the Closure sanitization library.
|
|
7269
7269
|
*/
|
|
7270
|
-
const SAFE_URL_PATTERN = /^(
|
|
7270
|
+
const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;
|
|
7271
7271
|
function _sanitizeUrl(url) {
|
|
7272
7272
|
url = String(url);
|
|
7273
7273
|
if (url.match(SAFE_URL_PATTERN))
|
|
@@ -8705,7 +8705,7 @@ class Version {
|
|
|
8705
8705
|
/**
|
|
8706
8706
|
* @publicApi
|
|
8707
8707
|
*/
|
|
8708
|
-
const VERSION = new Version('15.2.
|
|
8708
|
+
const VERSION = new Version('15.2.6');
|
|
8709
8709
|
|
|
8710
8710
|
// This default value is when checking the hierarchy for a token.
|
|
8711
8711
|
//
|
|
@@ -11245,11 +11245,11 @@ function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostD
|
|
|
11245
11245
|
// We will push the actual hook function into this array later during dir instantiation.
|
|
11246
11246
|
// We cannot do it now because we must ensure hooks are registered in the same
|
|
11247
11247
|
// order that directives are created (i.e. injection order).
|
|
11248
|
-
(tView.preOrderHooks
|
|
11248
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(tNode.index);
|
|
11249
11249
|
preOrderHooksFound = true;
|
|
11250
11250
|
}
|
|
11251
11251
|
if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {
|
|
11252
|
-
(tView.preOrderCheckHooks
|
|
11252
|
+
(tView.preOrderCheckHooks ?? (tView.preOrderCheckHooks = [])).push(tNode.index);
|
|
11253
11253
|
preOrderCheckHooksFound = true;
|
|
11254
11254
|
}
|
|
11255
11255
|
directiveIdx++;
|
|
@@ -11435,7 +11435,7 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
11435
11435
|
ngDevMode && assertFirstCreatePass(tView);
|
|
11436
11436
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
11437
11437
|
hostTNode.componentOffset = componentOffset;
|
|
11438
|
-
(tView.components
|
|
11438
|
+
(tView.components ?? (tView.components = [])).push(hostTNode.index);
|
|
11439
11439
|
}
|
|
11440
11440
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
11441
11441
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
@@ -21025,7 +21025,7 @@ function ɵɵpipe(index, pipeName) {
|
|
|
21025
21025
|
pipeDef = getPipeDef(pipeName, tView.pipeRegistry);
|
|
21026
21026
|
tView.data[adjustedIndex] = pipeDef;
|
|
21027
21027
|
if (pipeDef.onDestroy) {
|
|
21028
|
-
(tView.destroyHooks
|
|
21028
|
+
(tView.destroyHooks ?? (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
|
|
21029
21029
|
}
|
|
21030
21030
|
}
|
|
21031
21031
|
else {
|
|
@@ -21480,7 +21480,7 @@ function createTemplateRef(hostTNode, hostLView) {
|
|
|
21480
21480
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
21481
21481
|
*
|
|
21482
21482
|
* A view container instance can contain other view containers,
|
|
21483
|
-
* creating a [view hierarchy](guide/glossary#view-
|
|
21483
|
+
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
21484
21484
|
*
|
|
21485
21485
|
* @see `ComponentRef`
|
|
21486
21486
|
* @see `EmbeddedViewRef`
|