@angular/core 15.2.4 → 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/instructions/styling.mjs +5 -2
- 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 +35 -27
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +35 -27
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +30 -27
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +30 -27
- 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 +326 -341
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +2 -2
package/fesm2020/core.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
|
*/
|
|
@@ -2256,16 +2256,15 @@ function registerPreOrderHooks(directiveIndex, directiveDef, tView) {
|
|
|
2256
2256
|
const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;
|
|
2257
2257
|
if (ngOnChanges) {
|
|
2258
2258
|
const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);
|
|
2259
|
-
(tView.preOrderHooks
|
|
2260
|
-
(tView.preOrderCheckHooks
|
|
2261
|
-
.push(directiveIndex, wrappedOnChanges);
|
|
2259
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);
|
|
2260
|
+
(tView.preOrderCheckHooks ?? (tView.preOrderCheckHooks = [])).push(directiveIndex, wrappedOnChanges);
|
|
2262
2261
|
}
|
|
2263
2262
|
if (ngOnInit) {
|
|
2264
|
-
(tView.preOrderHooks
|
|
2263
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);
|
|
2265
2264
|
}
|
|
2266
2265
|
if (ngDoCheck) {
|
|
2267
|
-
(tView.preOrderHooks
|
|
2268
|
-
(tView.preOrderCheckHooks
|
|
2266
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);
|
|
2267
|
+
(tView.preOrderCheckHooks ?? (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);
|
|
2269
2268
|
}
|
|
2270
2269
|
}
|
|
2271
2270
|
/**
|
|
@@ -2297,21 +2296,21 @@ function registerPostOrderHooks(tView, tNode) {
|
|
|
2297
2296
|
const lifecycleHooks = directiveDef.type.prototype;
|
|
2298
2297
|
const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;
|
|
2299
2298
|
if (ngAfterContentInit) {
|
|
2300
|
-
(tView.contentHooks
|
|
2299
|
+
(tView.contentHooks ?? (tView.contentHooks = [])).push(-i, ngAfterContentInit);
|
|
2301
2300
|
}
|
|
2302
2301
|
if (ngAfterContentChecked) {
|
|
2303
|
-
(tView.contentHooks
|
|
2304
|
-
(tView.contentCheckHooks
|
|
2302
|
+
(tView.contentHooks ?? (tView.contentHooks = [])).push(i, ngAfterContentChecked);
|
|
2303
|
+
(tView.contentCheckHooks ?? (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);
|
|
2305
2304
|
}
|
|
2306
2305
|
if (ngAfterViewInit) {
|
|
2307
|
-
(tView.viewHooks
|
|
2306
|
+
(tView.viewHooks ?? (tView.viewHooks = [])).push(-i, ngAfterViewInit);
|
|
2308
2307
|
}
|
|
2309
2308
|
if (ngAfterViewChecked) {
|
|
2310
|
-
(tView.viewHooks
|
|
2311
|
-
(tView.viewCheckHooks
|
|
2309
|
+
(tView.viewHooks ?? (tView.viewHooks = [])).push(i, ngAfterViewChecked);
|
|
2310
|
+
(tView.viewCheckHooks ?? (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);
|
|
2312
2311
|
}
|
|
2313
2312
|
if (ngOnDestroy != null) {
|
|
2314
|
-
(tView.destroyHooks
|
|
2313
|
+
(tView.destroyHooks ?? (tView.destroyHooks = [])).push(i, ngOnDestroy);
|
|
2315
2314
|
}
|
|
2316
2315
|
}
|
|
2317
2316
|
}
|
|
@@ -6966,13 +6965,14 @@ function isDOMParserAvailable() {
|
|
|
6966
6965
|
}
|
|
6967
6966
|
|
|
6968
6967
|
/**
|
|
6969
|
-
* A pattern that recognizes
|
|
6968
|
+
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
|
|
6969
|
+
* contexts.
|
|
6970
6970
|
*
|
|
6971
6971
|
* This regular expression matches a subset of URLs that will not cause script
|
|
6972
6972
|
* execution if used in URL context within a HTML document. Specifically, this
|
|
6973
|
-
* regular expression matches if
|
|
6974
|
-
*
|
|
6975
|
-
*
|
|
6973
|
+
* regular expression matches if:
|
|
6974
|
+
* (1) Either a protocol that is not javascript:, and that has valid characters
|
|
6975
|
+
* (alphanumeric or [+-.]).
|
|
6976
6976
|
* (2) or no protocol. A protocol must be followed by a colon. The below
|
|
6977
6977
|
* allows that by allowing colons only after one of the characters [/?#].
|
|
6978
6978
|
* A colon after a hash (#) must be in the fragment.
|
|
@@ -6991,7 +6991,7 @@ function isDOMParserAvailable() {
|
|
|
6991
6991
|
*
|
|
6992
6992
|
* This regular expression was taken from the Closure sanitization library.
|
|
6993
6993
|
*/
|
|
6994
|
-
const SAFE_URL_PATTERN = /^(
|
|
6994
|
+
const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;
|
|
6995
6995
|
function _sanitizeUrl(url) {
|
|
6996
6996
|
url = String(url);
|
|
6997
6997
|
if (url.match(SAFE_URL_PATTERN))
|
|
@@ -8347,7 +8347,7 @@ class Version {
|
|
|
8347
8347
|
/**
|
|
8348
8348
|
* @publicApi
|
|
8349
8349
|
*/
|
|
8350
|
-
const VERSION = new Version('15.2.
|
|
8350
|
+
const VERSION = new Version('15.2.6');
|
|
8351
8351
|
|
|
8352
8352
|
// This default value is when checking the hierarchy for a token.
|
|
8353
8353
|
//
|
|
@@ -10935,11 +10935,11 @@ function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostD
|
|
|
10935
10935
|
// We will push the actual hook function into this array later during dir instantiation.
|
|
10936
10936
|
// We cannot do it now because we must ensure hooks are registered in the same
|
|
10937
10937
|
// order that directives are created (i.e. injection order).
|
|
10938
|
-
(tView.preOrderHooks
|
|
10938
|
+
(tView.preOrderHooks ?? (tView.preOrderHooks = [])).push(tNode.index);
|
|
10939
10939
|
preOrderHooksFound = true;
|
|
10940
10940
|
}
|
|
10941
10941
|
if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {
|
|
10942
|
-
(tView.preOrderCheckHooks
|
|
10942
|
+
(tView.preOrderCheckHooks ?? (tView.preOrderCheckHooks = [])).push(tNode.index);
|
|
10943
10943
|
preOrderCheckHooksFound = true;
|
|
10944
10944
|
}
|
|
10945
10945
|
directiveIdx++;
|
|
@@ -11125,7 +11125,7 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
11125
11125
|
ngDevMode && assertFirstCreatePass(tView);
|
|
11126
11126
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
11127
11127
|
hostTNode.componentOffset = componentOffset;
|
|
11128
|
-
(tView.components
|
|
11128
|
+
(tView.components ?? (tView.components = [])).push(hostTNode.index);
|
|
11129
11129
|
}
|
|
11130
11130
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
11131
11131
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
@@ -16074,8 +16074,11 @@ function isStylingValuePresent(value) {
|
|
|
16074
16074
|
* @param suffix
|
|
16075
16075
|
*/
|
|
16076
16076
|
function normalizeSuffix(value, suffix) {
|
|
16077
|
-
if (value == null
|
|
16077
|
+
if (value == null || value === '') {
|
|
16078
16078
|
// do nothing
|
|
16079
|
+
// Do not add the suffix if the value is going to be empty.
|
|
16080
|
+
// As it produce invalid CSS, which the browsers will automatically omit but Domino will not.
|
|
16081
|
+
// Example: `"left": "px;"` instead of `"left": ""`.
|
|
16079
16082
|
}
|
|
16080
16083
|
else if (typeof suffix === 'string') {
|
|
16081
16084
|
value = value + suffix;
|
|
@@ -20712,7 +20715,7 @@ function ɵɵpipe(index, pipeName) {
|
|
|
20712
20715
|
pipeDef = getPipeDef(pipeName, tView.pipeRegistry);
|
|
20713
20716
|
tView.data[adjustedIndex] = pipeDef;
|
|
20714
20717
|
if (pipeDef.onDestroy) {
|
|
20715
|
-
(tView.destroyHooks
|
|
20718
|
+
(tView.destroyHooks ?? (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
|
|
20716
20719
|
}
|
|
20717
20720
|
}
|
|
20718
20721
|
else {
|
|
@@ -21167,7 +21170,7 @@ function createTemplateRef(hostTNode, hostLView) {
|
|
|
21167
21170
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
21168
21171
|
*
|
|
21169
21172
|
* A view container instance can contain other view containers,
|
|
21170
|
-
* creating a [view hierarchy](guide/glossary#view-
|
|
21173
|
+
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
21171
21174
|
*
|
|
21172
21175
|
* @see `ComponentRef`
|
|
21173
21176
|
* @see `EmbeddedViewRef`
|
|
@@ -25596,7 +25599,7 @@ class ViewRef extends ChangeDetectorRef {
|
|
|
25596
25599
|
}
|
|
25597
25600
|
/**
|
|
25598
25601
|
* Represents an Angular [view](guide/glossary#view) in a view container.
|
|
25599
|
-
* An [embedded view](guide/glossary#view-
|
|
25602
|
+
* An [embedded view](guide/glossary#view-hierarchy) can be referenced from a component
|
|
25600
25603
|
* other than the hosting component whose template defines it, or it can be defined
|
|
25601
25604
|
* independently by a `TemplateRef`.
|
|
25602
25605
|
*
|