@angular/core 17.1.0-rc.0 → 17.1.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/esm2022/src/core_reactivity_export_internal.mjs +2 -2
- package/esm2022/src/defer/interfaces.mjs +3 -2
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/index.mjs +2 -3
- package/esm2022/src/render3/instructions/all.mjs +3 -2
- package/esm2022/src/render3/instructions/queries.mjs +98 -0
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/query.mjs +11 -98
- package/esm2022/src/render3/reactivity/effect.mjs +15 -37
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +5 -5
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +7 -6
- package/fesm2022/core.mjs +8009 -8029
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +10 -9
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +8 -33
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +200 -166
- package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +209 -175
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +895 -600
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.1.0
|
|
2
|
+
* @license Angular v17.1.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { ɵDeferBlockState, ɵtriggerResourceLoading, ɵrenderDeferBlockState, ɵCONTAINER_HEADER_OFFSET, ɵgetDeferBlocks, InjectionToken, inject as inject$1, ɵNoopNgZone, NgZone,
|
|
7
|
+
import { ɵDeferBlockState, ɵtriggerResourceLoading, ɵrenderDeferBlockState, ɵCONTAINER_HEADER_OFFSET, ɵgetDeferBlocks, InjectionToken, inject as inject$1, ɵNoopNgZone, NgZone, ɵEffectScheduler, ApplicationRef, getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetAsyncClassMetadataFn, ɵgenerateStandaloneInDeclarationsError, ɵDeferBlockBehavior, ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ɵdepsTracker, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵisComponentDefPendingResolution, ɵresolveComponentResources, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, ɵclearResolutionOfComponentResourcesQueue, ɵrestoreComponentResolutionQueue, provideZoneChangeDetection, Compiler, ɵDEFER_BLOCK_CONFIG, COMPILER_OPTIONS, Injector, ɵisEnvironmentProviders, ɵNgModuleFactory, ModuleWithComponentFactories, ɵconvertToBitFlags, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, runInInjectionContext, EnvironmentInjector, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
8
8
|
export { ɵDeferBlockBehavior as DeferBlockBehavior, ɵDeferBlockState as DeferBlockState } from '@angular/core';
|
|
9
9
|
import { Subscription } from 'rxjs';
|
|
10
10
|
import { ResourceLoader } from '@angular/compiler';
|
|
@@ -171,7 +171,7 @@ class ComponentFixture {
|
|
|
171
171
|
this.noZoneOptionIsSet = inject$1(ComponentFixtureNoNgZone, { optional: true });
|
|
172
172
|
this._ngZone = this.noZoneOptionIsSet ? new ɵNoopNgZone() : inject$1(NgZone);
|
|
173
173
|
this._autoDetect = inject$1(ComponentFixtureAutoDetect, { optional: true }) ?? false;
|
|
174
|
-
this.effectRunner = inject$1(
|
|
174
|
+
this.effectRunner = inject$1(ɵEffectScheduler);
|
|
175
175
|
this._subscriptions = new Subscription();
|
|
176
176
|
// Inject ApplicationRef to ensure NgZone stableness causes after render hooks to run
|
|
177
177
|
// This will likely happen as a result of fixture.detectChanges because it calls ngZone.run
|
|
@@ -245,7 +245,7 @@ class ComponentFixture {
|
|
|
245
245
|
* Trigger a change detection cycle for the component.
|
|
246
246
|
*/
|
|
247
247
|
detectChanges(checkNoChanges = true) {
|
|
248
|
-
this.effectRunner
|
|
248
|
+
this.effectRunner.flush();
|
|
249
249
|
// Run the change detection inside the NgZone so that any async tasks as part of the change
|
|
250
250
|
// detection are captured by the zone and can be waited for in isStable.
|
|
251
251
|
this._ngZone.run(() => {
|
|
@@ -253,7 +253,7 @@ class ComponentFixture {
|
|
|
253
253
|
});
|
|
254
254
|
// Run any effects that were created/dirtied during change detection. Such effects might become
|
|
255
255
|
// dirty in response to input signals changing.
|
|
256
|
-
this.effectRunner
|
|
256
|
+
this.effectRunner.flush();
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
* Do a change detection run to make sure there were no changes.
|
|
@@ -1581,6 +1581,7 @@ class R3TestCompiler {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
|
|
1583
1583
|
// The formatter and CI disagree on how this import statement should be formatted. Both try to keep
|
|
1584
|
+
const DEFER_BLOCK_DEFAULT_BEHAVIOR = ɵDeferBlockBehavior.Playthrough;
|
|
1584
1585
|
let _nextRootElementId = 0;
|
|
1585
1586
|
/**
|
|
1586
1587
|
* Returns a singleton of the `TestBed` class.
|
|
@@ -1603,7 +1604,7 @@ class TestBedImpl {
|
|
|
1603
1604
|
* Defer block behavior option that specifies whether defer blocks will be triggered manually
|
|
1604
1605
|
* or set to play through.
|
|
1605
1606
|
*/
|
|
1606
|
-
this._instanceDeferBlockBehavior =
|
|
1607
|
+
this._instanceDeferBlockBehavior = DEFER_BLOCK_DEFAULT_BEHAVIOR;
|
|
1607
1608
|
// Properties
|
|
1608
1609
|
this.platform = null;
|
|
1609
1610
|
this.ngModule = null;
|
|
@@ -1795,7 +1796,7 @@ class TestBedImpl {
|
|
|
1795
1796
|
this._instanceTeardownOptions = undefined;
|
|
1796
1797
|
this._instanceErrorOnUnknownElementsOption = undefined;
|
|
1797
1798
|
this._instanceErrorOnUnknownPropertiesOption = undefined;
|
|
1798
|
-
this._instanceDeferBlockBehavior =
|
|
1799
|
+
this._instanceDeferBlockBehavior = DEFER_BLOCK_DEFAULT_BEHAVIOR;
|
|
1799
1800
|
}
|
|
1800
1801
|
}
|
|
1801
1802
|
return this;
|
|
@@ -1821,7 +1822,7 @@ class TestBedImpl {
|
|
|
1821
1822
|
this._instanceTeardownOptions = moduleDef.teardown;
|
|
1822
1823
|
this._instanceErrorOnUnknownElementsOption = moduleDef.errorOnUnknownElements;
|
|
1823
1824
|
this._instanceErrorOnUnknownPropertiesOption = moduleDef.errorOnUnknownProperties;
|
|
1824
|
-
this._instanceDeferBlockBehavior = moduleDef.deferBlockBehavior ??
|
|
1825
|
+
this._instanceDeferBlockBehavior = moduleDef.deferBlockBehavior ?? DEFER_BLOCK_DEFAULT_BEHAVIOR;
|
|
1825
1826
|
// Store the current value of the strict mode option,
|
|
1826
1827
|
// so we can restore it later
|
|
1827
1828
|
this._previousErrorOnUnknownElementsOption = ɵgetUnknownElementStrictMode();
|
|
@@ -2041,7 +2042,7 @@ class TestBedImpl {
|
|
|
2041
2042
|
* @developerPreview
|
|
2042
2043
|
*/
|
|
2043
2044
|
flushEffects() {
|
|
2044
|
-
this.inject(
|
|
2045
|
+
this.inject(ɵEffectScheduler).flush();
|
|
2045
2046
|
}
|
|
2046
2047
|
}
|
|
2047
2048
|
/**
|