@angular/core 17.0.0-next.3 → 17.0.0-next.5
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.mjs +2 -2
- package/esm2022/src/core_private_export.mjs +3 -1
- package/esm2022/src/core_reactivity_export_internal.mjs +3 -3
- package/esm2022/src/core_render3_private_export.mjs +3 -2
- package/esm2022/src/di/initializer_token.mjs +1 -1
- package/esm2022/src/di/internal_tokens.mjs +1 -1
- package/esm2022/src/di/r3_injector.mjs +3 -4
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/metadata/ng_module_def.mjs +1 -1
- package/esm2022/src/metadata/resource_loading.mjs +27 -14
- package/esm2022/src/render3/after_render_hooks.mjs +123 -30
- package/esm2022/src/render3/component_ref.mjs +3 -4
- package/esm2022/src/render3/deps_tracker/api.mjs +1 -1
- package/esm2022/src/render3/deps_tracker/deps_tracker.mjs +13 -3
- package/esm2022/src/render3/index.mjs +2 -2
- package/esm2022/src/render3/instructions/change_detection.mjs +3 -3
- package/esm2022/src/render3/instructions/defer.mjs +121 -40
- package/esm2022/src/render3/interfaces/defer.mjs +66 -1
- package/esm2022/src/render3/interfaces/definition.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/jit/directive.mjs +6 -2
- package/esm2022/src/render3/local_compilation.mjs +8 -2
- package/esm2022/src/render3/pipe.mjs +2 -1
- package/esm2022/src/render3/reactive_lview_consumer.mjs +1 -1
- package/esm2022/src/render3/reactivity/effect.mjs +134 -43
- package/esm2022/src/render3/scope.mjs +10 -4
- package/esm2022/src/signals/index.mjs +2 -2
- package/esm2022/src/signals/src/api.mjs +2 -2
- package/esm2022/src/signals/src/computed.mjs +50 -45
- package/esm2022/src/signals/src/graph.mjs +10 -2
- package/esm2022/src/signals/src/signal.mjs +11 -6
- package/esm2022/src/signals/src/watch.mjs +40 -12
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +20 -3
- package/esm2022/testing/src/defer.mjs +84 -0
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +24 -3
- package/esm2022/testing/src/test_bed_common.mjs +1 -1
- package/esm2022/testing/src/test_bed_compiler.mjs +7 -4
- package/esm2022/testing/src/testing.mjs +3 -1
- package/fesm2022/core.mjs +694 -285
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +124 -7
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +260 -25
- package/package.json +3 -3
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/guard-and-resolve-interfaces/bundle.js +13 -13
- package/schematics/migrations/remove-module-id/bundle.js +14 -14
- package/schematics/ng-generate/standalone-migration/bundle.js +1962 -1303
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +50 -2
package/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.0.0-next.
|
|
2
|
+
* @license Angular v17.0.0-next.5
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -9,6 +9,8 @@ import { ChangeDetectorRef } from '@angular/core';
|
|
|
9
9
|
import { Component } from '@angular/core';
|
|
10
10
|
import { ComponentRef } from '@angular/core';
|
|
11
11
|
import { DebugElement } from '@angular/core';
|
|
12
|
+
import { ɵDeferBlockBehavior as DeferBlockBehavior } from '@angular/core';
|
|
13
|
+
import { ɵDeferBlockState as DeferBlockState } from '@angular/core';
|
|
12
14
|
import { Directive } from '@angular/core';
|
|
13
15
|
import { ElementRef } from '@angular/core';
|
|
14
16
|
import { InjectFlags } from '@angular/core';
|
|
@@ -21,6 +23,8 @@ import { PlatformRef } from '@angular/core';
|
|
|
21
23
|
import { ProviderToken } from '@angular/core';
|
|
22
24
|
import { SchemaMetadata } from '@angular/core';
|
|
23
25
|
import { Type } from '@angular/core';
|
|
26
|
+
import { ɵDeferBlockDetails } from '@angular/core';
|
|
27
|
+
import { ɵFlushableEffectRunner } from '@angular/core';
|
|
24
28
|
|
|
25
29
|
/**
|
|
26
30
|
* This API should be removed. But doing so seems to break `google3` and so it requires a bit of
|
|
@@ -47,6 +51,7 @@ export declare function async(fn: Function): (done: any) => any;
|
|
|
47
51
|
export declare class ComponentFixture<T> {
|
|
48
52
|
componentRef: ComponentRef<T>;
|
|
49
53
|
ngZone: NgZone | null;
|
|
54
|
+
private effectRunner;
|
|
50
55
|
private _autoDetect;
|
|
51
56
|
/**
|
|
52
57
|
* The DebugElement associated with the root element of this component.
|
|
@@ -77,7 +82,8 @@ export declare class ComponentFixture<T> {
|
|
|
77
82
|
private _onStableSubscription;
|
|
78
83
|
private _onMicrotaskEmptySubscription;
|
|
79
84
|
private _onErrorSubscription;
|
|
80
|
-
|
|
85
|
+
/** @nodoc */
|
|
86
|
+
constructor(componentRef: ComponentRef<T>, ngZone: NgZone | null, effectRunner: ɵFlushableEffectRunner | null, _autoDetect: boolean);
|
|
81
87
|
private _tick;
|
|
82
88
|
/**
|
|
83
89
|
* Trigger a change detection cycle for the component.
|
|
@@ -105,6 +111,10 @@ export declare class ComponentFixture<T> {
|
|
|
105
111
|
* asynchronous change detection.
|
|
106
112
|
*/
|
|
107
113
|
whenStable(): Promise<any>;
|
|
114
|
+
/**
|
|
115
|
+
* Retrieves all defer block fixtures in the component fixture
|
|
116
|
+
*/
|
|
117
|
+
getDeferBlocks(): Promise<DeferBlockFixture[]>;
|
|
108
118
|
private _getRenderer;
|
|
109
119
|
/**
|
|
110
120
|
* Get a promise that resolves when the ui state is stable following animations.
|
|
@@ -126,6 +136,33 @@ export declare const ComponentFixtureAutoDetect: InjectionToken<boolean>;
|
|
|
126
136
|
*/
|
|
127
137
|
export declare const ComponentFixtureNoNgZone: InjectionToken<boolean>;
|
|
128
138
|
|
|
139
|
+
export { DeferBlockBehavior }
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Represents an individual `{#defer}` block for testing purposes.
|
|
143
|
+
*
|
|
144
|
+
* @publicApi
|
|
145
|
+
* @developerPreview
|
|
146
|
+
*/
|
|
147
|
+
export declare class DeferBlockFixture {
|
|
148
|
+
private block;
|
|
149
|
+
private componentFixture;
|
|
150
|
+
/** @nodoc */
|
|
151
|
+
constructor(block: ɵDeferBlockDetails, componentFixture: ComponentFixture<unknown>);
|
|
152
|
+
/**
|
|
153
|
+
* Renders the specified state of the defer fixture.
|
|
154
|
+
* @param state the defer state to render
|
|
155
|
+
*/
|
|
156
|
+
render(state: DeferBlockState): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Retrieves all nested child defer block fixtures
|
|
159
|
+
* in a given defer block.
|
|
160
|
+
*/
|
|
161
|
+
getDeferBlocks(): Promise<DeferBlockFixture[]>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export { DeferBlockState }
|
|
165
|
+
|
|
129
166
|
/**
|
|
130
167
|
* Discard all remaining periodic tasks.
|
|
131
168
|
*
|
|
@@ -324,6 +361,12 @@ export declare interface TestBed {
|
|
|
324
361
|
}): TestBed;
|
|
325
362
|
overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBed;
|
|
326
363
|
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
|
364
|
+
/**
|
|
365
|
+
* Execute any pending effects.
|
|
366
|
+
*
|
|
367
|
+
* @developerPreview
|
|
368
|
+
*/
|
|
369
|
+
flushEffects(): void;
|
|
327
370
|
}
|
|
328
371
|
|
|
329
372
|
/**
|
|
@@ -403,6 +446,11 @@ export declare interface TestModuleMetadata {
|
|
|
403
446
|
* @see [NG8002](/errors/NG8002) for the description of the error and how to fix it
|
|
404
447
|
*/
|
|
405
448
|
errorOnUnknownProperties?: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* Whether defer blocks should behave with manual triggering or play through normally.
|
|
451
|
+
* Defaults to `manual`.
|
|
452
|
+
*/
|
|
453
|
+
deferBlockBehavior?: DeferBlockBehavior;
|
|
406
454
|
}
|
|
407
455
|
|
|
408
456
|
/**
|