@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/fesm2015/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
|
*/
|
|
@@ -261,7 +261,7 @@ function resetFakeAsyncZone() {
|
|
|
261
261
|
*
|
|
262
262
|
* Can be used to wrap `inject()` calls.
|
|
263
263
|
*
|
|
264
|
-
* @param fn The function that you want to wrap in the `
|
|
264
|
+
* @param fn The function that you want to wrap in the `fakeAsync` zone.
|
|
265
265
|
*
|
|
266
266
|
* @usageNotes
|
|
267
267
|
* ### Example
|
|
@@ -3494,20 +3494,20 @@ function getNamespace$1() {
|
|
|
3494
3494
|
* @param tView The current TView
|
|
3495
3495
|
*/
|
|
3496
3496
|
function registerPreOrderHooks(directiveIndex, directiveDef, tView) {
|
|
3497
|
+
var _a, _b, _c, _d, _e;
|
|
3497
3498
|
ngDevMode && assertFirstCreatePass(tView);
|
|
3498
3499
|
const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;
|
|
3499
3500
|
if (ngOnChanges) {
|
|
3500
3501
|
const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);
|
|
3501
|
-
(tView.preOrderHooks
|
|
3502
|
-
(tView.preOrderCheckHooks
|
|
3503
|
-
.push(directiveIndex, wrappedOnChanges);
|
|
3502
|
+
((_a = tView.preOrderHooks) !== null && _a !== void 0 ? _a : (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);
|
|
3503
|
+
((_b = tView.preOrderCheckHooks) !== null && _b !== void 0 ? _b : (tView.preOrderCheckHooks = [])).push(directiveIndex, wrappedOnChanges);
|
|
3504
3504
|
}
|
|
3505
3505
|
if (ngOnInit) {
|
|
3506
|
-
(tView.preOrderHooks
|
|
3506
|
+
((_c = tView.preOrderHooks) !== null && _c !== void 0 ? _c : (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);
|
|
3507
3507
|
}
|
|
3508
3508
|
if (ngDoCheck) {
|
|
3509
|
-
(tView.preOrderHooks
|
|
3510
|
-
(tView.preOrderCheckHooks
|
|
3509
|
+
((_d = tView.preOrderHooks) !== null && _d !== void 0 ? _d : (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);
|
|
3510
|
+
((_e = tView.preOrderCheckHooks) !== null && _e !== void 0 ? _e : (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);
|
|
3511
3511
|
}
|
|
3512
3512
|
}
|
|
3513
3513
|
/**
|
|
@@ -3529,6 +3529,7 @@ function registerPreOrderHooks(directiveIndex, directiveDef, tView) {
|
|
|
3529
3529
|
* @param tNode The TNode whose directives are to be searched for hooks to queue
|
|
3530
3530
|
*/
|
|
3531
3531
|
function registerPostOrderHooks(tView, tNode) {
|
|
3532
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
3532
3533
|
ngDevMode && assertFirstCreatePass(tView);
|
|
3533
3534
|
// It's necessary to loop through the directives at elementEnd() (rather than processing in
|
|
3534
3535
|
// directiveCreate) so we can preserve the current hook order. Content, view, and destroy
|
|
@@ -3539,21 +3540,21 @@ function registerPostOrderHooks(tView, tNode) {
|
|
|
3539
3540
|
const lifecycleHooks = directiveDef.type.prototype;
|
|
3540
3541
|
const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;
|
|
3541
3542
|
if (ngAfterContentInit) {
|
|
3542
|
-
(tView.contentHooks
|
|
3543
|
+
((_a = tView.contentHooks) !== null && _a !== void 0 ? _a : (tView.contentHooks = [])).push(-i, ngAfterContentInit);
|
|
3543
3544
|
}
|
|
3544
3545
|
if (ngAfterContentChecked) {
|
|
3545
|
-
(tView.contentHooks
|
|
3546
|
-
(tView.contentCheckHooks
|
|
3546
|
+
((_b = tView.contentHooks) !== null && _b !== void 0 ? _b : (tView.contentHooks = [])).push(i, ngAfterContentChecked);
|
|
3547
|
+
((_c = tView.contentCheckHooks) !== null && _c !== void 0 ? _c : (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);
|
|
3547
3548
|
}
|
|
3548
3549
|
if (ngAfterViewInit) {
|
|
3549
|
-
(tView.viewHooks
|
|
3550
|
+
((_d = tView.viewHooks) !== null && _d !== void 0 ? _d : (tView.viewHooks = [])).push(-i, ngAfterViewInit);
|
|
3550
3551
|
}
|
|
3551
3552
|
if (ngAfterViewChecked) {
|
|
3552
|
-
(tView.viewHooks
|
|
3553
|
-
(tView.viewCheckHooks
|
|
3553
|
+
((_e = tView.viewHooks) !== null && _e !== void 0 ? _e : (tView.viewHooks = [])).push(i, ngAfterViewChecked);
|
|
3554
|
+
((_f = tView.viewCheckHooks) !== null && _f !== void 0 ? _f : (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);
|
|
3554
3555
|
}
|
|
3555
3556
|
if (ngOnDestroy != null) {
|
|
3556
|
-
(tView.destroyHooks
|
|
3557
|
+
((_g = tView.destroyHooks) !== null && _g !== void 0 ? _g : (tView.destroyHooks = [])).push(i, ngOnDestroy);
|
|
3557
3558
|
}
|
|
3558
3559
|
}
|
|
3559
3560
|
}
|
|
@@ -7232,13 +7233,14 @@ function isDOMParserAvailable() {
|
|
|
7232
7233
|
}
|
|
7233
7234
|
|
|
7234
7235
|
/**
|
|
7235
|
-
* A pattern that recognizes
|
|
7236
|
+
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
|
|
7237
|
+
* contexts.
|
|
7236
7238
|
*
|
|
7237
7239
|
* This regular expression matches a subset of URLs that will not cause script
|
|
7238
7240
|
* execution if used in URL context within a HTML document. Specifically, this
|
|
7239
|
-
* regular expression matches if
|
|
7240
|
-
*
|
|
7241
|
-
*
|
|
7241
|
+
* regular expression matches if:
|
|
7242
|
+
* (1) Either a protocol that is not javascript:, and that has valid characters
|
|
7243
|
+
* (alphanumeric or [+-.]).
|
|
7242
7244
|
* (2) or no protocol. A protocol must be followed by a colon. The below
|
|
7243
7245
|
* allows that by allowing colons only after one of the characters [/?#].
|
|
7244
7246
|
* A colon after a hash (#) must be in the fragment.
|
|
@@ -7257,7 +7259,7 @@ function isDOMParserAvailable() {
|
|
|
7257
7259
|
*
|
|
7258
7260
|
* This regular expression was taken from the Closure sanitization library.
|
|
7259
7261
|
*/
|
|
7260
|
-
const SAFE_URL_PATTERN = /^(
|
|
7262
|
+
const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;
|
|
7261
7263
|
function _sanitizeUrl(url) {
|
|
7262
7264
|
url = String(url);
|
|
7263
7265
|
if (url.match(SAFE_URL_PATTERN))
|
|
@@ -8695,7 +8697,7 @@ class Version {
|
|
|
8695
8697
|
/**
|
|
8696
8698
|
* @publicApi
|
|
8697
8699
|
*/
|
|
8698
|
-
const VERSION = new Version('15.2.
|
|
8700
|
+
const VERSION = new Version('15.2.6');
|
|
8699
8701
|
|
|
8700
8702
|
// This default value is when checking the hierarchy for a token.
|
|
8701
8703
|
//
|
|
@@ -11194,6 +11196,7 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11194
11196
|
}
|
|
11195
11197
|
/** Initializes the data structures necessary for a list of directives to be instantiated. */
|
|
11196
11198
|
function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {
|
|
11199
|
+
var _a, _b;
|
|
11197
11200
|
ngDevMode && assertFirstCreatePass(tView);
|
|
11198
11201
|
// Publishes the directive types to DI so they can be injected. Needs to
|
|
11199
11202
|
// happen in a separate pass before the TNode flags have been initialized.
|
|
@@ -11236,11 +11239,11 @@ function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostD
|
|
|
11236
11239
|
// We will push the actual hook function into this array later during dir instantiation.
|
|
11237
11240
|
// We cannot do it now because we must ensure hooks are registered in the same
|
|
11238
11241
|
// order that directives are created (i.e. injection order).
|
|
11239
|
-
(tView.preOrderHooks
|
|
11242
|
+
((_a = tView.preOrderHooks) !== null && _a !== void 0 ? _a : (tView.preOrderHooks = [])).push(tNode.index);
|
|
11240
11243
|
preOrderHooksFound = true;
|
|
11241
11244
|
}
|
|
11242
11245
|
if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {
|
|
11243
|
-
(tView.preOrderCheckHooks
|
|
11246
|
+
((_b = tView.preOrderCheckHooks) !== null && _b !== void 0 ? _b : (tView.preOrderCheckHooks = [])).push(tNode.index);
|
|
11244
11247
|
preOrderCheckHooksFound = true;
|
|
11245
11248
|
}
|
|
11246
11249
|
directiveIdx++;
|
|
@@ -11424,10 +11427,11 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
11424
11427
|
* - storing index of component's host element so it will be queued for view refresh during CD.
|
|
11425
11428
|
*/
|
|
11426
11429
|
function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
11430
|
+
var _a;
|
|
11427
11431
|
ngDevMode && assertFirstCreatePass(tView);
|
|
11428
11432
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
11429
11433
|
hostTNode.componentOffset = componentOffset;
|
|
11430
|
-
(tView.components
|
|
11434
|
+
((_a = tView.components) !== null && _a !== void 0 ? _a : (tView.components = [])).push(hostTNode.index);
|
|
11431
11435
|
}
|
|
11432
11436
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
11433
11437
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
@@ -21008,6 +21012,7 @@ function pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thi
|
|
|
21008
21012
|
* @codeGenApi
|
|
21009
21013
|
*/
|
|
21010
21014
|
function ɵɵpipe(index, pipeName) {
|
|
21015
|
+
var _a;
|
|
21011
21016
|
const tView = getTView();
|
|
21012
21017
|
let pipeDef;
|
|
21013
21018
|
const adjustedIndex = index + HEADER_OFFSET;
|
|
@@ -21017,7 +21022,7 @@ function ɵɵpipe(index, pipeName) {
|
|
|
21017
21022
|
pipeDef = getPipeDef(pipeName, tView.pipeRegistry);
|
|
21018
21023
|
tView.data[adjustedIndex] = pipeDef;
|
|
21019
21024
|
if (pipeDef.onDestroy) {
|
|
21020
|
-
(tView.destroyHooks
|
|
21025
|
+
((_a = tView.destroyHooks) !== null && _a !== void 0 ? _a : (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
|
|
21021
21026
|
}
|
|
21022
21027
|
}
|
|
21023
21028
|
else {
|
|
@@ -21473,7 +21478,7 @@ function createTemplateRef(hostTNode, hostLView) {
|
|
|
21473
21478
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
21474
21479
|
*
|
|
21475
21480
|
* A view container instance can contain other view containers,
|
|
21476
|
-
* creating a [view hierarchy](guide/glossary#view-
|
|
21481
|
+
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
21477
21482
|
*
|
|
21478
21483
|
* @see `ComponentRef`
|
|
21479
21484
|
* @see `EmbeddedViewRef`
|