@angular/core 17.3.0-next.1 → 17.3.0-rc.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.
Files changed (55) hide show
  1. package/esm2022/rxjs-interop/src/index.mjs +3 -1
  2. package/esm2022/rxjs-interop/src/output_from_observable.mjs +68 -0
  3. package/esm2022/rxjs-interop/src/output_to_observable.mjs +29 -0
  4. package/esm2022/rxjs-interop/src/to_observable.mjs +1 -1
  5. package/esm2022/src/application/application_ref.mjs +46 -33
  6. package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
  7. package/esm2022/src/authoring/model/model.mjs +4 -1
  8. package/esm2022/src/authoring/model/model_signal.mjs +9 -18
  9. package/esm2022/src/authoring/output/output.mjs +35 -0
  10. package/esm2022/src/authoring/output/output_emitter_ref.mjs +74 -0
  11. package/esm2022/src/authoring/output/output_ref.mjs +9 -0
  12. package/esm2022/src/authoring.mjs +3 -2
  13. package/esm2022/src/core_private_export.mjs +4 -3
  14. package/esm2022/src/di/interface/provider.mjs +1 -1
  15. package/esm2022/src/di/metadata.mjs +1 -1
  16. package/esm2022/src/di/r3_injector.mjs +26 -15
  17. package/esm2022/src/errors.mjs +1 -1
  18. package/esm2022/src/event_emitter.mjs +19 -2
  19. package/esm2022/src/hydration/api.mjs +2 -2
  20. package/esm2022/src/render3/after_render_hooks.mjs +2 -2
  21. package/esm2022/src/render3/component_ref.mjs +103 -93
  22. package/esm2022/src/render3/instructions/listener.mjs +7 -9
  23. package/esm2022/src/render3/instructions/render.mjs +3 -2
  24. package/esm2022/src/render3/interfaces/view.mjs +1 -1
  25. package/esm2022/src/render3/node_manipulation.mjs +13 -4
  26. package/esm2022/src/render3/reactivity/effect.mjs +11 -7
  27. package/esm2022/src/render3/reactivity/signal.mjs +3 -4
  28. package/esm2022/src/render3/view_manipulation.mjs +24 -17
  29. package/esm2022/src/util/assert.mjs +7 -1
  30. package/esm2022/src/version.mjs +1 -1
  31. package/esm2022/testing/src/component_fixture.mjs +78 -19
  32. package/esm2022/testing/src/logger.mjs +3 -3
  33. package/esm2022/testing/src/test_bed_compiler.mjs +26 -4
  34. package/fesm2022/core.mjs +10715 -10595
  35. package/fesm2022/core.mjs.map +1 -1
  36. package/fesm2022/primitives/signals.mjs +1 -1
  37. package/fesm2022/rxjs-interop.mjs +82 -3
  38. package/fesm2022/rxjs-interop.mjs.map +1 -1
  39. package/fesm2022/testing.mjs +102 -21
  40. package/fesm2022/testing.mjs.map +1 -1
  41. package/index.d.ts +124 -76
  42. package/package.json +1 -1
  43. package/primitives/signals/index.d.ts +1 -1
  44. package/rxjs-interop/index.d.ts +39 -1
  45. package/schematics/migrations/block-template-entities/bundle.js +18 -33
  46. package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
  47. package/schematics/migrations/invalid-two-way-bindings/bundle.js +26381 -0
  48. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +7 -0
  49. package/schematics/migrations.json +5 -0
  50. package/schematics/ng-generate/control-flow-migration/bundle.js +18 -33
  51. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  52. package/schematics/ng-generate/standalone-migration/bundle.js +77 -66
  53. package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
  54. package/testing/index.d.ts +1 -1
  55. package/esm2022/src/authoring/output.mjs +0 -33
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.3.0-next.1
2
+ * @license Angular v17.3.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -644,6 +644,9 @@ export declare class ApplicationRef {
644
644
  private _destroyListeners;
645
645
  private readonly internalErrorHandler;
646
646
  private readonly afterRenderEffectManager;
647
+ private externalTestViews;
648
+ private beforeRender;
649
+ private afterTick;
647
650
  /**
648
651
  * Indicates whether this instance was destroyed.
649
652
  */
@@ -757,7 +760,6 @@ export declare class ApplicationRef {
757
760
  */
758
761
  tick(): void;
759
762
  private detectChangesInAttachedViews;
760
- private detectChangesInView;
761
763
  /**
762
764
  * Attaches a view so that it will be dirty checked.
763
765
  * The view will be automatically detached when it is destroyed.
@@ -1104,7 +1106,7 @@ declare interface ClassDebugInfo {
1104
1106
 
1105
1107
  /**
1106
1108
  * Configures the `Injector` to return an instance of `useClass` for a token.
1107
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1109
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1108
1110
  *
1109
1111
  * @usageNotes
1110
1112
  *
@@ -1136,7 +1138,7 @@ export declare interface ClassProvider extends ClassSansProvider {
1136
1138
  * Configures the `Injector` to return a value by invoking a `useClass` function.
1137
1139
  * Base for `ClassProvider` decorator.
1138
1140
  *
1139
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1141
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1140
1142
  *
1141
1143
  * @publicApi
1142
1144
  */
@@ -1817,7 +1819,7 @@ export declare function computed<T>(computation: () => T, options?: CreateComput
1817
1819
  /**
1818
1820
  * Configures the `Injector` to return an instance of a token.
1819
1821
  *
1820
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1822
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1821
1823
  *
1822
1824
  * @usageNotes
1823
1825
  *
@@ -1844,7 +1846,7 @@ export declare interface ConstructorProvider extends ConstructorSansProvider {
1844
1846
  /**
1845
1847
  * Configures the `Injector` to return an instance of a token.
1846
1848
  *
1847
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1849
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1848
1850
  *
1849
1851
  * @usageNotes
1850
1852
  *
@@ -3801,7 +3803,7 @@ export declare class ErrorHandler {
3801
3803
  * @see [Observables in Angular](guide/observables-in-angular)
3802
3804
  * @publicApi
3803
3805
  */
3804
- export declare interface EventEmitter<T> extends Subject<T> {
3806
+ export declare interface EventEmitter<T> extends Subject<T>, OutputRef<T> {
3805
3807
  /**
3806
3808
  * Creates an instance of this class that can
3807
3809
  * deliver events synchronously or asynchronously.
@@ -3846,7 +3848,7 @@ export declare const EventEmitter: {
3846
3848
  /**
3847
3849
  * Configures the `Injector` to return a value of another `useExisting` token.
3848
3850
  *
3849
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3851
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3850
3852
  *
3851
3853
  * @usageNotes
3852
3854
  *
@@ -3874,7 +3876,7 @@ export declare interface ExistingProvider extends ExistingSansProvider {
3874
3876
  * Configures the `Injector` to return a value of another `useExisting` token.
3875
3877
  *
3876
3878
  * @see {@link ExistingProvider}
3877
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3879
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3878
3880
  *
3879
3881
  * @publicApi
3880
3882
  */
@@ -3902,7 +3904,7 @@ declare type FactoryFn<T> = {
3902
3904
 
3903
3905
  /**
3904
3906
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
3905
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3907
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3906
3908
  *
3907
3909
  * @usageNotes
3908
3910
  *
@@ -3934,7 +3936,7 @@ export declare interface FactoryProvider extends FactorySansProvider {
3934
3936
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
3935
3937
  *
3936
3938
  * @see {@link FactoryProvider}
3937
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3939
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3938
3940
  *
3939
3941
  * @publicApi
3940
3942
  */
@@ -5189,7 +5191,7 @@ export declare interface InjectDecorator {
5189
5191
  * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
5190
5192
  * </code-example>
5191
5193
  *
5192
- * @see ["Dependency Injection Guide"](guide/dependency-injection)
5194
+ * @see [Dependency Injection Guide](guide/dependency-injection)
5193
5195
  *
5194
5196
  */
5195
5197
  (token: any): any;
@@ -6795,12 +6797,10 @@ export declare interface ModelOptions {
6795
6797
  *
6796
6798
  * @developerPreview
6797
6799
  */
6798
- export declare interface ModelSignal<T> extends WritableSignal<T> {
6800
+ export declare interface ModelSignal<T> extends WritableSignal<T>, OutputRef<T> {
6799
6801
  [SIGNAL]: InputSignalNode<T, T>;
6800
6802
  [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
6801
6803
  [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: T;
6802
- /** @deprecated Do not use, will be removed. */
6803
- subscribe(callback: (value: T) => void): () => void;
6804
6804
  }
6805
6805
 
6806
6806
  /**
@@ -7541,7 +7541,7 @@ export declare interface OptionalDecorator {
7541
7541
  * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
7542
7542
  * </code-example>
7543
7543
  *
7544
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
7544
+ * @see [Dependency Injection Guide](guide/dependency-injection).
7545
7545
  */
7546
7546
  (): any;
7547
7547
  new (): Optional;
@@ -7565,6 +7565,29 @@ export declare interface Output {
7565
7565
  */
7566
7566
  export declare const Output: OutputDecorator;
7567
7567
 
7568
+ /**
7569
+ * The `outputs` function allows declaration of outputs in directives and
7570
+ * components.
7571
+ *
7572
+ * Initializes an output that can emit values to consumers of your
7573
+ * directive/component.
7574
+ *
7575
+ * @usageNotes
7576
+ * Initialize an output in your directive by declaring a
7577
+ * class field and initializing it with the `output()` function.
7578
+ *
7579
+ * ```ts
7580
+ * @Directive({..})
7581
+ * export class MyDir {
7582
+ * nameChange = output<string>(); // OutputEmitterRef<string>
7583
+ * onClick = output(); // OutputEmitterRef<void>
7584
+ * }
7585
+ * ```
7586
+ *
7587
+ * @developerPreview
7588
+ */
7589
+ export declare function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T>;
7590
+
7568
7591
  /**
7569
7592
  * Type of the Output decorator / constructor function.
7570
7593
  *
@@ -7591,6 +7614,67 @@ export declare interface OutputDecorator {
7591
7614
  new (alias?: string): any;
7592
7615
  }
7593
7616
 
7617
+ /**
7618
+ * An `OutputEmitterRef` is created by the `output()` function and can be
7619
+ * used to emit values to consumers of your directive or component.
7620
+ *
7621
+ * Consumers of your directive/component can bind to the output and
7622
+ * subscribe to changes via the bound event syntax. For example:
7623
+ *
7624
+ * ```html
7625
+ * <my-comp (valueChange)="processNewValue($event)" />
7626
+ * ```
7627
+ *
7628
+ * @developerPreview
7629
+ */
7630
+ export declare class OutputEmitterRef<T> implements OutputRef<T> {
7631
+ private destroyed;
7632
+ private listeners;
7633
+ constructor();
7634
+ subscribe(callback: (value: T) => void): OutputRefSubscription;
7635
+ /** Emits a new value to the output. */
7636
+ emit(value: T): void;
7637
+ }
7638
+
7639
+ /**
7640
+ * Options for declaring an output.
7641
+ *
7642
+ * @developerPreview
7643
+ */
7644
+ export declare interface OutputOptions {
7645
+ alias?: string;
7646
+ }
7647
+
7648
+ /**
7649
+ * A reference to an Angular output.
7650
+ *
7651
+ * @developerPreview
7652
+ */
7653
+ export declare interface OutputRef<T> {
7654
+ /**
7655
+ * Registers a callback that is invoked whenever the output
7656
+ * emits a new value of type `T`.
7657
+ *
7658
+ * Angular will automatically clean up the subscription when
7659
+ * the directive/component of the output is destroyed.
7660
+ */
7661
+ subscribe(callback: (value: T) => void): OutputRefSubscription;
7662
+ }
7663
+
7664
+
7665
+ /**
7666
+ * Function that can be used to manually clean up a
7667
+ * programmatic {@link OutputRef#subscribe} subscription.
7668
+ *
7669
+ * Note: Angular will automatically clean up subscriptions
7670
+ * when the directive/component of the output is destroyed.
7671
+ *
7672
+ * @developerPreview
7673
+ */
7674
+ export declare interface OutputRefSubscription {
7675
+ unsubscribe(): void;
7676
+ }
7677
+
7594
7678
  /**
7595
7679
  * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
7596
7680
  * the application
@@ -7863,7 +7947,7 @@ declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
7863
7947
 
7864
7948
  /**
7865
7949
  * Describes how the `Injector` should be configured.
7866
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
7950
+ * @see [Dependency Injection Guide](guide/dependency-injection).
7867
7951
  *
7868
7952
  * @see {@link StaticProvider}
7869
7953
  *
@@ -9088,7 +9172,7 @@ export declare type StateKey<T> = string & {
9088
9172
 
9089
9173
  /**
9090
9174
  * Configures the `Injector` to return an instance of `useClass` for a token.
9091
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
9175
+ * @see [Dependency Injection Guide](guide/dependency-injection).
9092
9176
  *
9093
9177
  * @usageNotes
9094
9178
  *
@@ -9140,7 +9224,7 @@ export declare interface StaticClassSansProvider {
9140
9224
  * A static provider provides tokens to an injector for various types of dependencies.
9141
9225
  *
9142
9226
  * @see {@link Injector.create()}
9143
- * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
9227
+ * @see [Dependency Injection Guide](guide/dependency-injection-providers).
9144
9228
  *
9145
9229
  * @publicApi
9146
9230
  */
@@ -10837,7 +10921,7 @@ export declare type ValueEqualityFn<T> = (a: T, b: T) => boolean;
10837
10921
 
10838
10922
  /**
10839
10923
  * Configures the `Injector` to return a value for a token.
10840
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
10924
+ * @see [Dependency Injection Guide](guide/dependency-injection).
10841
10925
  *
10842
10926
  * @usageNotes
10843
10927
  *
@@ -11410,14 +11494,11 @@ declare interface ViewRefTracker {
11410
11494
  detachView(viewRef: ViewRef): void;
11411
11495
  }
11412
11496
 
11413
- /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
11414
- declare const WRITABLE_SIGNAL: unique symbol;
11415
-
11416
11497
  /**
11417
11498
  * A `Signal` with a value that can be mutated via a setter interface.
11418
11499
  */
11419
11500
  export declare interface WritableSignal<T> extends Signal<T> {
11420
- [WRITABLE_SIGNAL]: T;
11501
+ [ɵWRITABLE_SIGNAL]: T;
11421
11502
  /**
11422
11503
  * Directly set the signal to a new value, and notify any dependents.
11423
11504
  */
@@ -12014,6 +12095,8 @@ export declare enum ɵDeferBlockState {
12014
12095
  /** The deps tracker to be used in the current Angular app in dev mode. */
12015
12096
  export declare const ɵdepsTracker: DepsTracker;
12016
12097
 
12098
+ export declare function ɵdetectChangesInViewIfRequired(lView: LView, isFirstPass: boolean, notifyErrorHandler: boolean): void;
12099
+
12017
12100
 
12018
12101
  export declare function ɵdevModeEqual(a: any, b: any): boolean;
12019
12102
 
@@ -12338,6 +12421,9 @@ export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
12338
12421
  */
12339
12422
  export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
12340
12423
 
12424
+ /** Gets the owning `DestroyRef` for the given output. */
12425
+ export declare function ɵgetOutputDestroyRef(ref: OutputRef<unknown>): DestroyRef | undefined;
12426
+
12341
12427
  export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
12342
12428
 
12343
12429
  /**
@@ -12493,6 +12579,14 @@ export declare function ɵisComponentDefPendingResolution(type: Type<any>): bool
12493
12579
 
12494
12580
  export declare function ɵisEnvironmentProviders(value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders): value is ɵInternalEnvironmentProviders;
12495
12581
 
12582
+ /**
12583
+ * Used to patch behavior that needs to _temporarily_ be different between g3 and external.
12584
+ *
12585
+ * For example, make breaking changes ahead of the main branch targeting a major version.
12586
+ * Permanent differences between g3 and external should be configured by individual patches.
12587
+ */
12588
+ export declare const ɵisG3 = false;
12589
+
12496
12590
  export declare function ɵisInjectable(type: any): boolean;
12497
12591
 
12498
12592
  export declare function ɵisNgModule<T>(value: Type<T>): value is Type<T> & {
@@ -12739,56 +12833,6 @@ export declare function ɵnoSideEffects<T>(fn: () => T): T;
12739
12833
 
12740
12834
  export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
12741
12835
 
12742
- /**
12743
- * The `outputs` function allows declaration of outputs in directives and
12744
- * components.
12745
- *
12746
- * Initializes an output that can emit values to consumers of your
12747
- * directive/component.
12748
- *
12749
- * @usageNotes
12750
- * Initialize an output in your directive by declaring a
12751
- * class field and initializing it with the `output()` function.
12752
- *
12753
- * ```ts
12754
- * @Directive({..})
12755
- * export class MyDir {
12756
- * nameChange = output<string>(); // OutputEmitter<string>
12757
- * onClick = output(); // OutputEmitter<void>
12758
- * }
12759
- * ```
12760
- *
12761
- * @developerPreview
12762
- */
12763
- export declare function ɵoutput<T = void>(opts?: ɵOutputOptions): ɵOutputEmitter<T>;
12764
-
12765
-
12766
- /**
12767
- * An `OutputEmitter` is created by the `output()` function and can be
12768
- * used to emit values to consumers of your directive or component.
12769
- *
12770
- * Consumers of your directive/component can bind to the output and
12771
- * subscribe to changes via the bound event syntax. For example:
12772
- *
12773
- * ```html
12774
- * <my-comp (valueChange)="processNewValue($event)" />
12775
- * ```
12776
- *
12777
- * @developerPreview
12778
- */
12779
- export declare interface ɵOutputEmitter<T> {
12780
- emit(value: T): void;
12781
- }
12782
-
12783
- /**
12784
- * Options for declaring an output.
12785
- *
12786
- * @developerPreview
12787
- */
12788
- export declare interface ɵOutputOptions {
12789
- alias?: string;
12790
- }
12791
-
12792
12836
  /**
12793
12837
  * Patch the definition of a component with directives and pipes from the compilation scope of
12794
12838
  * a given module.
@@ -13235,6 +13279,7 @@ export declare const enum ɵRuntimeErrorCode {
13235
13279
  REQUIRED_INPUT_NO_VALUE = -950,
13236
13280
  REQUIRED_QUERY_NO_VALUE = -951,
13237
13281
  REQUIRED_MODEL_NO_VALUE = -952,
13282
+ OUTPUT_REF_DESTROYED = 953,
13238
13283
  RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
13239
13284
  RUNTIME_DEPS_ORPHAN_COMPONENT = 1001
13240
13285
  }
@@ -13433,7 +13478,7 @@ export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir>
13433
13478
  };
13434
13479
 
13435
13480
  /** Retrieves the `WriteT` of an `InputSignal` and `InputSignalWithTransform`. */
13436
- declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<unknown, infer WriteT> ? WriteT : never;
13481
+ declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<any, infer WriteT> ? WriteT : never;
13437
13482
 
13438
13483
  export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
13439
13484
 
@@ -13444,7 +13489,7 @@ export declare function ɵunwrapSafeValue<T>(value: T): T;
13444
13489
  * @codeGenApi
13445
13490
  */
13446
13491
  export declare function ɵunwrapWritableSignal<T>(value: T | {
13447
- [WRITABLE_SIGNAL]: T;
13492
+ [ɵWRITABLE_SIGNAL]: T;
13448
13493
  }): T;
13449
13494
 
13450
13495
  /**
@@ -13722,6 +13767,9 @@ export declare type ɵWritable<T> = {
13722
13767
  -readonly [K in keyof T]: T[K];
13723
13768
  };
13724
13769
 
13770
+ /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
13771
+ declare const ɵWRITABLE_SIGNAL: unique symbol;
13772
+
13725
13773
  /**
13726
13774
  * URL for the XSS security documentation.
13727
13775
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "17.3.0-next.1",
3
+ "version": "17.3.0-rc.0",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.3.0-next.1
2
+ * @license Angular v17.3.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.3.0-next.1
2
+ * @license Angular v17.3.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -9,9 +9,47 @@ import { DestroyRef } from '@angular/core';
9
9
  import { Injector } from '@angular/core';
10
10
  import { MonoTypeOperatorFunction } from 'rxjs';
11
11
  import { Observable } from 'rxjs';
12
+ import { OutputOptions } from '@angular/core';
13
+ import { OutputRef } from '@angular/core';
12
14
  import { Signal } from '@angular/core';
13
15
  import { Subscribable } from 'rxjs';
14
16
 
17
+ /**
18
+ * Declares an Angular output that is using an RxJS observable as a source
19
+ * for events dispatched to parent subscribers.
20
+ *
21
+ * The behavior for an observable as source is defined as followed:
22
+ * 1. New values are forwarded to the Angular output (next notifications).
23
+ * 2. Errors notifications are not handled by Angular. You need to handle these manually.
24
+ * For example by using `catchError`.
25
+ * 3. Completion notifications stop the output from emitting new values.
26
+ *
27
+ * @usageNotes
28
+ * Initialize an output in your directive by declaring a
29
+ * class field and initializing it with the `outputFromObservable()` function.
30
+ *
31
+ * ```ts
32
+ * @Directive({..})
33
+ * export class MyDir {
34
+ * nameChange$ = <some-observable>;
35
+ * nameChange = outputFromObservable(this.nameChange$);
36
+ * }
37
+ * ```
38
+ *
39
+ * @developerPreview
40
+ */
41
+ export declare function outputFromObservable<T>(observable: Observable<T>, opts?: OutputOptions): OutputRef<T>;
42
+
43
+ /**
44
+ * Converts an Angular output declared via `output()` or `outputFromObservable()`
45
+ * to an observable.
46
+ *
47
+ * You can subscribe to the output via `Observable.subscribe` then.
48
+ *
49
+ * @developerPreview
50
+ */
51
+ export declare function outputToObservable<T>(ref: OutputRef<T>): Observable<T>;
52
+
15
53
  /**
16
54
  * Operator which completes the Observable when the calling context (component, directive, service,
17
55
  * etc) is destroyed.
@@ -7227,13 +7227,10 @@ var ExpressionKind;
7227
7227
  ExpressionKind2[ExpressionKind2["EmptyExpr"] = 17] = "EmptyExpr";
7228
7228
  ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
7229
7229
  ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
7230
- ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 20] = "SanitizerExpr";
7231
- ExpressionKind2[ExpressionKind2["TrustedValueFnExpr"] = 21] = "TrustedValueFnExpr";
7232
- ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 22] = "SlotLiteralExpr";
7233
- ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
7234
- ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
7235
- ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
7236
- ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 26] = "TwoWayBindingSet";
7230
+ ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 20] = "SlotLiteralExpr";
7231
+ ExpressionKind2[ExpressionKind2["ConditionalCase"] = 21] = "ConditionalCase";
7232
+ ExpressionKind2[ExpressionKind2["ConstCollected"] = 22] = "ConstCollected";
7233
+ ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 23] = "TwoWayBindingSet";
7237
7234
  })(ExpressionKind || (ExpressionKind = {}));
7238
7235
  var VariableFlags;
7239
7236
  (function(VariableFlags2) {
@@ -7252,12 +7249,6 @@ var CompatibilityMode;
7252
7249
  CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
7253
7250
  CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
7254
7251
  })(CompatibilityMode || (CompatibilityMode = {}));
7255
- var DeferSecondaryKind;
7256
- (function(DeferSecondaryKind2) {
7257
- DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
7258
- DeferSecondaryKind2[DeferSecondaryKind2["Placeholder"] = 1] = "Placeholder";
7259
- DeferSecondaryKind2[DeferSecondaryKind2["Error"] = 2] = "Error";
7260
- })(DeferSecondaryKind || (DeferSecondaryKind = {}));
7261
7252
  var BindingKind;
7262
7253
  (function(BindingKind2) {
7263
7254
  BindingKind2[BindingKind2["Attribute"] = 0] = "Attribute";
@@ -7331,10 +7322,6 @@ var TRAIT_DEPENDS_ON_SLOT_CONTEXT = {
7331
7322
  var TRAIT_CONSUMES_VARS = {
7332
7323
  [ConsumesVarsTrait]: true
7333
7324
  };
7334
- var TRAIT_USES_VAR_OFFSET = {
7335
- [UsesVarOffset]: true,
7336
- varOffset: null
7337
- };
7338
7325
  function hasConsumesSlotTrait(op) {
7339
7326
  return op[ConsumesSlot] === true;
7340
7327
  }
@@ -9599,7 +9586,7 @@ var ElementAttributes = class {
9599
9586
  this.propertyBindings = null;
9600
9587
  this.projectAs = null;
9601
9588
  }
9602
- isKnown(kind, name, value) {
9589
+ isKnown(kind, name) {
9603
9590
  var _a2;
9604
9591
  const nameToValue = (_a2 = this.known.get(kind)) != null ? _a2 : /* @__PURE__ */ new Set();
9605
9592
  this.known.set(kind, nameToValue);
@@ -9612,7 +9599,7 @@ var ElementAttributes = class {
9612
9599
  add(kind, name, value, namespace, trustedValueFn) {
9613
9600
  var _a2;
9614
9601
  const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
9615
- if (!allowDuplicates && this.isKnown(kind, name, value)) {
9602
+ if (!allowDuplicates && this.isKnown(kind, name)) {
9616
9603
  return;
9617
9604
  }
9618
9605
  if (name === "ngProjectAs") {
@@ -10212,7 +10199,7 @@ function createI18nMessage(job, context, messagePlaceholder) {
10212
10199
  }
10213
10200
  function formatIcuPlaceholder(op) {
10214
10201
  if (op.strings.length !== op.expressionPlaceholders.length + 1) {
10215
- throw Error(`AsserionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
10202
+ throw Error(`AssertionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
10216
10203
  }
10217
10204
  const values = op.expressionPlaceholders.map(formatValue);
10218
10205
  return op.strings.flatMap((str, i) => [str, values[i] || ""]).join("");
@@ -16858,7 +16845,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
16858
16845
  }
16859
16846
  if (op.emptyView !== null) {
16860
16847
  const emptyView = unit.job.views.get(op.emptyView);
16861
- addNamesToView(emptyView, `${baseName}_${`${op.functionNameSuffix}Empty`}_${op.handle.slot + 2}`, state, compatibility);
16848
+ addNamesToView(emptyView, `${baseName}_${op.functionNameSuffix}Empty_${op.handle.slot + 2}`, state, compatibility);
16862
16849
  }
16863
16850
  addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);
16864
16851
  break;
@@ -17279,7 +17266,7 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
17279
17266
  break;
17280
17267
  case OpKind.RepeaterCreate:
17281
17268
  const forView = unit.job.views.get(op.xref);
17282
- subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
17269
+ subTemplateIndex = propagateI18nBlocksForView(forView, i18nBlock, op.i18nPlaceholder, subTemplateIndex);
17283
17270
  if (op.emptyView !== null) {
17284
17271
  subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
17285
17272
  }
@@ -18379,11 +18366,11 @@ function processLexicalScope(view, ops) {
18379
18366
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
18380
18367
  function resolveDollarEvent(job) {
18381
18368
  for (const unit of job.units) {
18382
- transformDollarEvent(unit, unit.create);
18383
- transformDollarEvent(unit, unit.update);
18369
+ transformDollarEvent(unit.create);
18370
+ transformDollarEvent(unit.update);
18384
18371
  }
18385
18372
  }
18386
- function transformDollarEvent(unit, ops) {
18373
+ function transformDollarEvent(ops) {
18387
18374
  for (const op of ops) {
18388
18375
  if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
18389
18376
  transformExpressionsInOp(op, (expr) => {
@@ -18554,7 +18541,7 @@ function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18n
18554
18541
  addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
18555
18542
  }
18556
18543
  function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
18557
- const { startName, closeName } = i18nPlaceholder;
18544
+ const { closeName } = i18nPlaceholder;
18558
18545
  const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
18559
18546
  if (closeName) {
18560
18547
  addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
@@ -18581,14 +18568,14 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
18581
18568
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
18582
18569
  function resolveI18nExpressionPlaceholders(job) {
18583
18570
  var _a2;
18584
- const subTemplateIndicies = /* @__PURE__ */ new Map();
18571
+ const subTemplateIndices = /* @__PURE__ */ new Map();
18585
18572
  const i18nContexts = /* @__PURE__ */ new Map();
18586
18573
  const icuPlaceholders = /* @__PURE__ */ new Map();
18587
18574
  for (const unit of job.units) {
18588
18575
  for (const op of unit.create) {
18589
18576
  switch (op.kind) {
18590
18577
  case OpKind.I18nStart:
18591
- subTemplateIndicies.set(op.xref, op.subTemplateIndex);
18578
+ subTemplateIndices.set(op.xref, op.subTemplateIndex);
18592
18579
  break;
18593
18580
  case OpKind.I18nContext:
18594
18581
  i18nContexts.set(op.xref, op);
@@ -18605,7 +18592,7 @@ function resolveI18nExpressionPlaceholders(job) {
18605
18592
  for (const op of unit.update) {
18606
18593
  if (op.kind === OpKind.I18nExpression) {
18607
18594
  const index = expressionIndices.get(referenceIndex(op)) || 0;
18608
- const subTemplateIndex = (_a2 = subTemplateIndicies.get(op.i18nOwner)) != null ? _a2 : null;
18595
+ const subTemplateIndex = (_a2 = subTemplateIndices.get(op.i18nOwner)) != null ? _a2 : null;
18609
18596
  const value = {
18610
18597
  value: index,
18611
18598
  subTemplateIndex,
@@ -18669,7 +18656,7 @@ function processLexicalScope2(unit, ops, savedView) {
18669
18656
  if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
18670
18657
  continue;
18671
18658
  }
18672
- transformExpressionsInOp(op, (expr, flags) => {
18659
+ transformExpressionsInOp(op, (expr) => {
18673
18660
  if (expr instanceof LexicalReadExpr) {
18674
18661
  if (scope.has(expr.name)) {
18675
18662
  return new ReadVariableExpr(scope.get(expr.name));
@@ -19271,7 +19258,6 @@ function optimizeVariablesInOpList(ops, compatibility) {
19271
19258
  const toInline = [];
19272
19259
  for (const [id, count] of varUsages) {
19273
19260
  const decl = varDecls.get(id);
19274
- const varInfo = opMap.get(decl);
19275
19261
  const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);
19276
19262
  if (count !== 1 || isAlwaysInline) {
19277
19263
  continue;
@@ -19974,7 +19960,6 @@ function ingestIcu(unit, icu) {
19974
19960
  var _a2;
19975
19961
  if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
19976
19962
  const xref = unit.job.allocateXrefId();
19977
- const icuNode = icu.i18n.nodes[0];
19978
19963
  unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
19979
19964
  for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
19980
19965
  if (text2 instanceof BoundText) {
@@ -26070,7 +26055,7 @@ function publishFacade(global) {
26070
26055
  }
26071
26056
 
26072
26057
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
26073
- var VERSION2 = new Version("17.3.0-next.1");
26058
+ var VERSION2 = new Version("17.3.0-rc.0");
26074
26059
 
26075
26060
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
26076
26061
  var _VisitorMode;