@angular/core 15.2.5 → 15.2.7
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/component_ref.mjs +5 -4
- 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 +33 -27
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +33 -27
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +28 -27
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +28 -27
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +4 -4
- package/package.json +1 -1
- package/schematics/ng-generate/standalone-migration/bundle.js +43 -20
- 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.7
|
|
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.7');
|
|
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) {
|
|
@@ -12223,7 +12223,8 @@ class ComponentRef extends ComponentRef$1 {
|
|
|
12223
12223
|
if (inputData !== null && (dataValue = inputData[name])) {
|
|
12224
12224
|
const lView = this._rootLView;
|
|
12225
12225
|
setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);
|
|
12226
|
-
|
|
12226
|
+
const childComponentLView = getComponentLViewByIndex(this._tNode.index, lView);
|
|
12227
|
+
markViewDirty(childComponentLView);
|
|
12227
12228
|
}
|
|
12228
12229
|
else {
|
|
12229
12230
|
if (ngDevMode) {
|
|
@@ -20715,7 +20716,7 @@ function ɵɵpipe(index, pipeName) {
|
|
|
20715
20716
|
pipeDef = getPipeDef(pipeName, tView.pipeRegistry);
|
|
20716
20717
|
tView.data[adjustedIndex] = pipeDef;
|
|
20717
20718
|
if (pipeDef.onDestroy) {
|
|
20718
|
-
(tView.destroyHooks
|
|
20719
|
+
(tView.destroyHooks ?? (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
|
|
20719
20720
|
}
|
|
20720
20721
|
}
|
|
20721
20722
|
else {
|
|
@@ -21170,7 +21171,7 @@ function createTemplateRef(hostTNode, hostLView) {
|
|
|
21170
21171
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
21171
21172
|
*
|
|
21172
21173
|
* A view container instance can contain other view containers,
|
|
21173
|
-
* creating a [view hierarchy](guide/glossary#view-
|
|
21174
|
+
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
21174
21175
|
*
|
|
21175
21176
|
* @see `ComponentRef`
|
|
21176
21177
|
* @see `EmbeddedViewRef`
|
|
@@ -25599,7 +25600,7 @@ class ViewRef extends ChangeDetectorRef {
|
|
|
25599
25600
|
}
|
|
25600
25601
|
/**
|
|
25601
25602
|
* Represents an Angular [view](guide/glossary#view) in a view container.
|
|
25602
|
-
* An [embedded view](guide/glossary#view-
|
|
25603
|
+
* An [embedded view](guide/glossary#view-hierarchy) can be referenced from a component
|
|
25603
25604
|
* other than the hosting component whose template defines it, or it can be defined
|
|
25604
25605
|
* independently by a `TemplateRef`.
|
|
25605
25606
|
*
|