@angular/core 17.2.0-next.1 → 17.2.0-rc.1
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/primitives/signals/index.mjs +3 -3
- package/esm2022/src/application/application_ngmodule_factory_compiler.mjs +61 -0
- package/esm2022/src/application/application_ref.mjs +55 -69
- package/esm2022/src/authoring/input/input.mjs +48 -0
- package/esm2022/src/authoring/input/input_signal.mjs +40 -0
- package/esm2022/src/authoring/input/input_signal_node.mjs +22 -0
- package/esm2022/src/authoring/input/input_type_checking.mjs +9 -0
- package/esm2022/src/authoring/model/model.mjs +50 -0
- package/esm2022/src/authoring/model/model_signal.mjs +68 -0
- package/esm2022/src/authoring/model/model_signal_node.mjs +21 -0
- package/esm2022/src/authoring/output.mjs +33 -0
- package/esm2022/src/authoring/queries.mjs +1 -1
- package/esm2022/src/authoring.mjs +3 -2
- package/esm2022/src/core.mjs +7 -5
- package/esm2022/src/core_reactivity_export_internal.mjs +2 -2
- package/esm2022/src/core_render3_private_export.mjs +5 -4
- package/esm2022/src/defer/instructions.mjs +13 -6
- package/esm2022/src/di/create_injector.mjs +1 -1
- package/esm2022/src/di/injector_compatibility.mjs +1 -1
- package/esm2022/src/di/injector_token.mjs +1 -1
- package/esm2022/src/di/null_injector.mjs +1 -1
- package/esm2022/src/di/r3_injector.mjs +1 -1
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/utils.mjs +1 -1
- package/esm2022/src/platform/platform_ref.mjs +3 -2
- package/esm2022/src/render3/after_render_hooks.mjs +2 -6
- package/esm2022/src/render3/apply_value_input_field.mjs +1 -1
- package/esm2022/src/render3/component_ref.mjs +2 -2
- package/esm2022/src/render3/definition.mjs +2 -2
- package/esm2022/src/render3/di.mjs +1 -1
- package/esm2022/src/render3/errors_di.mjs +2 -2
- package/esm2022/src/render3/features/ng_onchanges_feature.mjs +1 -1
- package/esm2022/src/render3/i18n/i18n_locale_id.mjs +2 -2
- package/esm2022/src/render3/index.mjs +2 -2
- package/esm2022/src/render3/instructions/all.mjs +2 -1
- package/esm2022/src/render3/instructions/change_detection.mjs +6 -6
- package/esm2022/src/render3/instructions/listener.mjs +13 -4
- package/esm2022/src/render3/instructions/queries.mjs +3 -5
- package/esm2022/src/render3/instructions/queries_signals.mjs +4 -5
- package/esm2022/src/render3/instructions/render.mjs +5 -2
- package/esm2022/src/render3/instructions/shared.mjs +2 -2
- package/esm2022/src/render3/instructions/styling.mjs +1 -1
- package/esm2022/src/render3/instructions/two_way.mjs +70 -0
- package/esm2022/src/render3/instructions/write_to_directive_input.mjs +2 -2
- package/esm2022/src/render3/interfaces/attribute_marker.mjs +9 -0
- package/esm2022/src/render3/interfaces/definition.mjs +2 -8
- package/esm2022/src/render3/interfaces/input_flags.mjs +15 -0
- package/esm2022/src/render3/interfaces/node.mjs +1 -1
- package/esm2022/src/render3/interfaces/query.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/jit/environment.mjs +5 -2
- package/esm2022/src/render3/node_selector_matcher.mjs +1 -1
- package/esm2022/src/render3/query.mjs +17 -3
- package/esm2022/src/render3/query_reactive.mjs +51 -75
- package/esm2022/src/render3/reactivity/signal.mjs +21 -1
- package/esm2022/src/render3/styling/static_styling.mjs +1 -1
- package/esm2022/src/render3/util/attrs_utils.mjs +1 -1
- package/esm2022/src/render3/util/discovery_utils.mjs +1 -1
- package/esm2022/src/render3/util/view_utils.mjs +3 -3
- package/esm2022/src/render3/view_ref.mjs +1 -1
- package/esm2022/src/util/stringify.mjs +2 -2
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +4 -4
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +14568 -14203
- 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 +4 -4
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +366 -11
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +2 -2
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +413 -91
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/ng-generate/control-flow-migration/bundle.js +413 -91
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +6087 -5623
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/src/authoring/input.mjs +0 -48
- package/esm2022/src/authoring/input_signal.mjs +0 -40
- package/esm2022/src/authoring/input_signal_node.mjs +0 -22
- package/esm2022/src/authoring/input_type_checking.mjs +0 -9
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.2.0-
|
|
2
|
+
* @license Angular v17.2.0-rc.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -756,6 +756,8 @@ export declare class ApplicationRef {
|
|
|
756
756
|
* detection pass during which all change detection must complete.
|
|
757
757
|
*/
|
|
758
758
|
tick(): void;
|
|
759
|
+
private detectChangesInAttachedViews;
|
|
760
|
+
private detectChangesInView;
|
|
759
761
|
/**
|
|
760
762
|
* Attaches a view so that it will be dirty checked.
|
|
761
763
|
* The view will be automatically detached when it is destroyed.
|
|
@@ -1879,6 +1881,26 @@ export declare type ContentChild = Query;
|
|
|
1879
1881
|
*/
|
|
1880
1882
|
export declare const ContentChild: ContentChildDecorator;
|
|
1881
1883
|
|
|
1884
|
+
/**
|
|
1885
|
+
* Initializes a content child query. Consider using `contentChild.required` for queries that should
|
|
1886
|
+
* always match.
|
|
1887
|
+
*
|
|
1888
|
+
* @usageNotes
|
|
1889
|
+
* Create a child query in your component by declaring a
|
|
1890
|
+
* class field and initializing it with the `contentChild()` function.
|
|
1891
|
+
*
|
|
1892
|
+
* ```ts
|
|
1893
|
+
* @Component({...})
|
|
1894
|
+
* export class TestComponent {
|
|
1895
|
+
* headerEl = contentChild<ElementRef>('h'); // Signal<ElementRef|undefined>
|
|
1896
|
+
* headerElElRequired = contentChild.required<ElementRef>('h'); // Signal<ElementRef>
|
|
1897
|
+
* header = contentChild(MyHeader); // Signal<MyHeader|undefined>
|
|
1898
|
+
* headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>
|
|
1899
|
+
* }
|
|
1900
|
+
* ```
|
|
1901
|
+
*/
|
|
1902
|
+
export declare const contentChild: ContentChildFunction;
|
|
1903
|
+
|
|
1882
1904
|
/**
|
|
1883
1905
|
* Type of the ContentChild decorator / constructor function.
|
|
1884
1906
|
*
|
|
@@ -1956,6 +1978,46 @@ export declare interface ContentChildDecorator {
|
|
|
1956
1978
|
}): ContentChild;
|
|
1957
1979
|
}
|
|
1958
1980
|
|
|
1981
|
+
/**
|
|
1982
|
+
* Type of the `contentChild` function.
|
|
1983
|
+
*
|
|
1984
|
+
* The contentChild function creates a singular content query. It is a special function that also
|
|
1985
|
+
* provides access to required query results via the `.required` property.
|
|
1986
|
+
*
|
|
1987
|
+
* @developerPreview
|
|
1988
|
+
*/
|
|
1989
|
+
export declare interface ContentChildFunction {
|
|
1990
|
+
/**
|
|
1991
|
+
* Initializes a content child query.
|
|
1992
|
+
*
|
|
1993
|
+
* Consider using `contentChild.required` for queries that should always match.
|
|
1994
|
+
* @developerPreview
|
|
1995
|
+
*/
|
|
1996
|
+
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
|
|
1997
|
+
descendants?: boolean;
|
|
1998
|
+
read?: undefined;
|
|
1999
|
+
}): Signal<LocatorT | undefined>;
|
|
2000
|
+
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
|
|
2001
|
+
descendants?: boolean;
|
|
2002
|
+
read: ProviderToken<ReadT>;
|
|
2003
|
+
}): Signal<ReadT | undefined>;
|
|
2004
|
+
/**
|
|
2005
|
+
* Initializes a content child query that is always expected to match.
|
|
2006
|
+
*
|
|
2007
|
+
* @developerPreview
|
|
2008
|
+
*/
|
|
2009
|
+
required: {
|
|
2010
|
+
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
|
|
2011
|
+
descendants?: boolean;
|
|
2012
|
+
read?: undefined;
|
|
2013
|
+
}): Signal<LocatorT>;
|
|
2014
|
+
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
|
|
2015
|
+
descendants?: boolean;
|
|
2016
|
+
read: ProviderToken<ReadT>;
|
|
2017
|
+
}): Signal<ReadT>;
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
|
|
1959
2021
|
/**
|
|
1960
2022
|
* Type of the ContentChildren metadata.
|
|
1961
2023
|
*
|
|
@@ -1974,6 +2036,16 @@ export declare type ContentChildren = Query;
|
|
|
1974
2036
|
*/
|
|
1975
2037
|
export declare const ContentChildren: ContentChildrenDecorator;
|
|
1976
2038
|
|
|
2039
|
+
export declare function contentChildren<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
|
|
2040
|
+
descendants?: boolean;
|
|
2041
|
+
read?: undefined;
|
|
2042
|
+
}): Signal<ReadonlyArray<LocatorT>>;
|
|
2043
|
+
|
|
2044
|
+
export declare function contentChildren<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
|
|
2045
|
+
descendants?: boolean;
|
|
2046
|
+
read: ProviderToken<ReadT>;
|
|
2047
|
+
}): Signal<ReadonlyArray<ReadT>>;
|
|
2048
|
+
|
|
1977
2049
|
/**
|
|
1978
2050
|
* Type of the ContentChildren decorator / constructor function.
|
|
1979
2051
|
*
|
|
@@ -3327,9 +3399,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3327
3399
|
* - Because declared and public name are usually same we only generate the array
|
|
3328
3400
|
* `['declared', 'public']` format when they differ, or there is a transform.
|
|
3329
3401
|
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
3330
|
-
* inconsistent behavior in that it uses declared names rather than minified or public.
|
|
3331
|
-
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
3332
|
-
* API will be simplified to be consistent with `output`.
|
|
3402
|
+
* inconsistent behavior in that it uses declared names rather than minified or public.
|
|
3333
3403
|
*/
|
|
3334
3404
|
declare type DirectiveInputs<T> = {
|
|
3335
3405
|
[P in keyof T]?: string | [
|
|
@@ -6133,6 +6203,14 @@ declare interface LQueries {
|
|
|
6133
6203
|
* @param tView
|
|
6134
6204
|
*/
|
|
6135
6205
|
detachView(tView: TView): void;
|
|
6206
|
+
/**
|
|
6207
|
+
* A method called when a view finishes its creation pass. As a result all impacted
|
|
6208
|
+
* `LQuery` objects (and associated `QueryList`) are marked as dirty. This additional dirty
|
|
6209
|
+
* marking gives us a precise point in time where we can collect results for a given view in an
|
|
6210
|
+
* atomic way.
|
|
6211
|
+
* @param tView
|
|
6212
|
+
*/
|
|
6213
|
+
finishViewCreation(tView: TView): void;
|
|
6136
6214
|
}
|
|
6137
6215
|
|
|
6138
6216
|
/**
|
|
@@ -6556,6 +6634,122 @@ export declare enum MissingTranslationStrategy {
|
|
|
6556
6634
|
Ignore = 2
|
|
6557
6635
|
}
|
|
6558
6636
|
|
|
6637
|
+
/**
|
|
6638
|
+
* `model` declares a writeable signal that is exposed as an input/output pair on the containing
|
|
6639
|
+
* directive. The input name is taken either from the class member or from the `alias` option.
|
|
6640
|
+
* The output name is generated by taking the input name and appending `Change`.
|
|
6641
|
+
*
|
|
6642
|
+
* Initializes a model with an initial value. If no explicit value
|
|
6643
|
+
* is specified, Angular will use `undefined`.
|
|
6644
|
+
*
|
|
6645
|
+
* Consider using `model.required` for models that don't need an
|
|
6646
|
+
* initial value.
|
|
6647
|
+
*
|
|
6648
|
+
* @usageNotes
|
|
6649
|
+
* Initialize a model in your directive or component by declaring a
|
|
6650
|
+
* class field and initializing it with the `model()` or `model.required()`
|
|
6651
|
+
* function.
|
|
6652
|
+
*
|
|
6653
|
+
* ```ts
|
|
6654
|
+
* @Directive({..})
|
|
6655
|
+
* export class MyDir {
|
|
6656
|
+
* firstName = model<string>(); // string|undefined
|
|
6657
|
+
* lastName = model.required<string>(); // string
|
|
6658
|
+
* age = model(0); // number
|
|
6659
|
+
* }
|
|
6660
|
+
* ```
|
|
6661
|
+
*
|
|
6662
|
+
* @developerPreview
|
|
6663
|
+
*/
|
|
6664
|
+
export declare const model: ModelFunction;
|
|
6665
|
+
|
|
6666
|
+
/**
|
|
6667
|
+
* `model` declares a writeable signal that is exposed as an input/output pair on the containing
|
|
6668
|
+
* directive. The input name is taken either from the class member or from the `alias` option.
|
|
6669
|
+
* The output name is generated by taking the input name and appending `Change`.
|
|
6670
|
+
*
|
|
6671
|
+
* The function exposes an API for also declaring required models via the
|
|
6672
|
+
* `model.required` function.
|
|
6673
|
+
*
|
|
6674
|
+
* @usageNotes
|
|
6675
|
+
* Initialize a model in your directive or component by declaring a
|
|
6676
|
+
* class field and initializing it with the `model()` or `model.required()`
|
|
6677
|
+
* function.
|
|
6678
|
+
*
|
|
6679
|
+
* ```ts
|
|
6680
|
+
* @Directive({..})
|
|
6681
|
+
* export class MyDir {
|
|
6682
|
+
* firstName = model<string>(); // string|undefined
|
|
6683
|
+
* lastName = model.required<string>(); // string
|
|
6684
|
+
* age = model(0); // number
|
|
6685
|
+
* }
|
|
6686
|
+
* ```
|
|
6687
|
+
*
|
|
6688
|
+
* @developerPreview
|
|
6689
|
+
*/
|
|
6690
|
+
export declare interface ModelFunction {
|
|
6691
|
+
/**
|
|
6692
|
+
* Initializes a model with an initial value. If no explicit value
|
|
6693
|
+
* is specified, Angular will use `undefined`.
|
|
6694
|
+
*
|
|
6695
|
+
* Consider using `model.required` for models that don't need an
|
|
6696
|
+
* initial value.
|
|
6697
|
+
*
|
|
6698
|
+
* @developerPreview
|
|
6699
|
+
*/
|
|
6700
|
+
<T>(): ModelSignal<T | undefined>;
|
|
6701
|
+
<T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;
|
|
6702
|
+
/**
|
|
6703
|
+
* Initializes a required model.
|
|
6704
|
+
*
|
|
6705
|
+
* Users of your directive/component need to bind to the input side of the model.
|
|
6706
|
+
* If unset, a compile time error will be reported.
|
|
6707
|
+
*
|
|
6708
|
+
* @developerPreview
|
|
6709
|
+
*/
|
|
6710
|
+
required<T>(opts?: ModelOptions): ModelSignal<T>;
|
|
6711
|
+
}
|
|
6712
|
+
|
|
6713
|
+
/**
|
|
6714
|
+
* @developerPreview
|
|
6715
|
+
*
|
|
6716
|
+
* Options for model signals.
|
|
6717
|
+
*/
|
|
6718
|
+
export declare interface ModelOptions {
|
|
6719
|
+
/**
|
|
6720
|
+
* Optional public name of the input side of the model. The output side will have the same
|
|
6721
|
+
* name as the input, but suffixed with `Change`. By default, the class field name is used.
|
|
6722
|
+
*/
|
|
6723
|
+
alias?: string;
|
|
6724
|
+
}
|
|
6725
|
+
|
|
6726
|
+
/**
|
|
6727
|
+
* `ModelSignal` represents a special `Signal` for a directive/component model field.
|
|
6728
|
+
*
|
|
6729
|
+
* A model signal is a writeable signal that can be exposed as an output.
|
|
6730
|
+
* Whenever its value is updated, it emits to the output.
|
|
6731
|
+
*
|
|
6732
|
+
* @developerPreview
|
|
6733
|
+
*/
|
|
6734
|
+
export declare interface ModelSignal<T> extends WritableSignal<T> {
|
|
6735
|
+
[SIGNAL]: ModelSignalNode<T>;
|
|
6736
|
+
[ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
|
|
6737
|
+
[ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: T;
|
|
6738
|
+
/** @deprecated Do not use, will be removed. */
|
|
6739
|
+
subscribe(callback: (value: T) => void): {
|
|
6740
|
+
unsubscribe: () => void;
|
|
6741
|
+
};
|
|
6742
|
+
}
|
|
6743
|
+
|
|
6744
|
+
/**
|
|
6745
|
+
* Reactive node type for a model signal. Model signals extend
|
|
6746
|
+
* signals by adding the ability to track subscriptions and to be required.
|
|
6747
|
+
*/
|
|
6748
|
+
declare interface ModelSignalNode<T> extends SignalNode<T> {
|
|
6749
|
+
/** Used by the runtime to write a value to the signal input. */
|
|
6750
|
+
applyValueToInputSignal: (node: ModelSignalNode<T>, value: T) => void;
|
|
6751
|
+
}
|
|
6752
|
+
|
|
6559
6753
|
/**
|
|
6560
6754
|
* Combination of NgModuleFactory and ComponentFactories.
|
|
6561
6755
|
*
|
|
@@ -10662,6 +10856,29 @@ export declare type ViewChild = Query;
|
|
|
10662
10856
|
*/
|
|
10663
10857
|
export declare const ViewChild: ViewChildDecorator;
|
|
10664
10858
|
|
|
10859
|
+
/**
|
|
10860
|
+
* Initializes a view child query.
|
|
10861
|
+
*
|
|
10862
|
+
* Consider using `viewChild.required` for queries that should always match.
|
|
10863
|
+
*
|
|
10864
|
+
* @usageNotes
|
|
10865
|
+
* Create a child query in your component by declaring a
|
|
10866
|
+
* class field and initializing it with the `viewChild()` function.
|
|
10867
|
+
*
|
|
10868
|
+
* ```ts
|
|
10869
|
+
* @Component({template: '<div #el></div><my-component #cmp />'})
|
|
10870
|
+
* export class TestComponent {
|
|
10871
|
+
* divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>
|
|
10872
|
+
* divElRequired = viewChild.required<ElementRef>('el'); // Signal<ElementRef>
|
|
10873
|
+
* cmp = viewChild(MyComponent); // Signal<MyComponent|undefined>
|
|
10874
|
+
* cmpRequired = viewChild.required(MyComponent); // Signal<MyComponent>
|
|
10875
|
+
* }
|
|
10876
|
+
* ```
|
|
10877
|
+
*
|
|
10878
|
+
* @developerPreview
|
|
10879
|
+
*/
|
|
10880
|
+
export declare const viewChild: ViewChildFunction;
|
|
10881
|
+
|
|
10665
10882
|
/**
|
|
10666
10883
|
* Type of the ViewChild decorator / constructor function.
|
|
10667
10884
|
*
|
|
@@ -10735,6 +10952,38 @@ export declare interface ViewChildDecorator {
|
|
|
10735
10952
|
}): ViewChild;
|
|
10736
10953
|
}
|
|
10737
10954
|
|
|
10955
|
+
/**
|
|
10956
|
+
* Type of the `viewChild` function. The viewChild function creates a singular view query.
|
|
10957
|
+
*
|
|
10958
|
+
* It is a special function that also provides access to required query results via the `.required`
|
|
10959
|
+
* property.
|
|
10960
|
+
*
|
|
10961
|
+
* @developerPreview
|
|
10962
|
+
*/
|
|
10963
|
+
export declare interface ViewChildFunction {
|
|
10964
|
+
/**
|
|
10965
|
+
* Initializes a view child query. Consider using `viewChild.required` for queries that should
|
|
10966
|
+
* always match.
|
|
10967
|
+
*
|
|
10968
|
+
* @developerPreview
|
|
10969
|
+
*/
|
|
10970
|
+
<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT | undefined>;
|
|
10971
|
+
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
|
|
10972
|
+
read: ProviderToken<ReadT>;
|
|
10973
|
+
}): Signal<ReadT | undefined>;
|
|
10974
|
+
/**
|
|
10975
|
+
* Initializes a view child query that is expected to always match an element.
|
|
10976
|
+
*
|
|
10977
|
+
* @developerPreview
|
|
10978
|
+
*/
|
|
10979
|
+
required: {
|
|
10980
|
+
<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT>;
|
|
10981
|
+
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
|
|
10982
|
+
read: ProviderToken<ReadT>;
|
|
10983
|
+
}): Signal<ReadT>;
|
|
10984
|
+
};
|
|
10985
|
+
}
|
|
10986
|
+
|
|
10738
10987
|
/**
|
|
10739
10988
|
* Type of the ViewChildren metadata.
|
|
10740
10989
|
*
|
|
@@ -10750,6 +10999,12 @@ export declare type ViewChildren = Query;
|
|
|
10750
10999
|
*/
|
|
10751
11000
|
export declare const ViewChildren: ViewChildrenDecorator;
|
|
10752
11001
|
|
|
11002
|
+
export declare function viewChildren<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<ReadonlyArray<LocatorT>>;
|
|
11003
|
+
|
|
11004
|
+
export declare function viewChildren<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
|
|
11005
|
+
read: ProviderToken<ReadT>;
|
|
11006
|
+
}): Signal<ReadonlyArray<ReadT>>;
|
|
11007
|
+
|
|
10753
11008
|
/**
|
|
10754
11009
|
* Type of the ViewChildren decorator / constructor function.
|
|
10755
11010
|
*
|
|
@@ -11101,10 +11356,14 @@ declare interface ViewRefTracker {
|
|
|
11101
11356
|
detachView(viewRef: ViewRef): void;
|
|
11102
11357
|
}
|
|
11103
11358
|
|
|
11359
|
+
/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
|
|
11360
|
+
declare const WRITABLE_SIGNAL: unique symbol;
|
|
11361
|
+
|
|
11104
11362
|
/**
|
|
11105
11363
|
* A `Signal` with a value that can be mutated via a setter interface.
|
|
11106
11364
|
*/
|
|
11107
11365
|
export declare interface WritableSignal<T> extends Signal<T> {
|
|
11366
|
+
[WRITABLE_SIGNAL]: T;
|
|
11108
11367
|
/**
|
|
11109
11368
|
* Directly set the signal to a new value, and notify any dependents.
|
|
11110
11369
|
*/
|
|
@@ -11139,7 +11398,7 @@ export declare class ɵAfterRenderEventManager {
|
|
|
11139
11398
|
/**
|
|
11140
11399
|
* Executes callbacks. Returns `true` if any callbacks executed.
|
|
11141
11400
|
*/
|
|
11142
|
-
execute():
|
|
11401
|
+
execute(): void;
|
|
11143
11402
|
ngOnDestroy(): void;
|
|
11144
11403
|
/** @nocollapse */
|
|
11145
11404
|
static ɵprov: unknown;
|
|
@@ -11183,6 +11442,7 @@ export declare const enum ɵAnimationRendererType {
|
|
|
11183
11442
|
*/
|
|
11184
11443
|
export declare function ɵannotateForHydration(appRef: ApplicationRef, doc: Document): void;
|
|
11185
11444
|
|
|
11445
|
+
|
|
11186
11446
|
/**
|
|
11187
11447
|
* A set of marker values to be used in the attributes arrays. These markers indicate that some
|
|
11188
11448
|
* items are not regular attributes and the processing should be adapted accordingly.
|
|
@@ -12424,6 +12684,56 @@ export declare function ɵnoSideEffects<T>(fn: () => T): T;
|
|
|
12424
12684
|
|
|
12425
12685
|
export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
|
|
12426
12686
|
|
|
12687
|
+
/**
|
|
12688
|
+
* The `outputs` function allows declaration of outputs in directives and
|
|
12689
|
+
* components.
|
|
12690
|
+
*
|
|
12691
|
+
* Initializes an output that can emit values to consumers of your
|
|
12692
|
+
* directive/component.
|
|
12693
|
+
*
|
|
12694
|
+
* @usageNotes
|
|
12695
|
+
* Initialize an output in your directive by declaring a
|
|
12696
|
+
* class field and initializing it with the `output()` function.
|
|
12697
|
+
*
|
|
12698
|
+
* ```ts
|
|
12699
|
+
* @Directive({..})
|
|
12700
|
+
* export class MyDir {
|
|
12701
|
+
* nameChange = output<string>(); // OutputEmitter<string>
|
|
12702
|
+
* onClick = output(); // OutputEmitter<void>
|
|
12703
|
+
* }
|
|
12704
|
+
* ```
|
|
12705
|
+
*
|
|
12706
|
+
* @developerPreview
|
|
12707
|
+
*/
|
|
12708
|
+
export declare function ɵoutput<T = void>(opts?: ɵOutputOptions): ɵOutputEmitter<T>;
|
|
12709
|
+
|
|
12710
|
+
|
|
12711
|
+
/**
|
|
12712
|
+
* An `OutputEmitter` is created by the `output()` function and can be
|
|
12713
|
+
* used to emit values to consumers of your directive or component.
|
|
12714
|
+
*
|
|
12715
|
+
* Consumers of your directive/component can bind to the output and
|
|
12716
|
+
* subscribe to changes via the bound event syntax. For example:
|
|
12717
|
+
*
|
|
12718
|
+
* ```html
|
|
12719
|
+
* <my-comp (valueChange)="processNewValue($event)" />
|
|
12720
|
+
* ```
|
|
12721
|
+
*
|
|
12722
|
+
* @developerPreview
|
|
12723
|
+
*/
|
|
12724
|
+
export declare interface ɵOutputEmitter<T> {
|
|
12725
|
+
emit(value: T): void;
|
|
12726
|
+
}
|
|
12727
|
+
|
|
12728
|
+
/**
|
|
12729
|
+
* Options for declaring an output.
|
|
12730
|
+
*
|
|
12731
|
+
* @developerPreview
|
|
12732
|
+
*/
|
|
12733
|
+
export declare interface ɵOutputOptions {
|
|
12734
|
+
alias?: string;
|
|
12735
|
+
}
|
|
12736
|
+
|
|
12427
12737
|
/**
|
|
12428
12738
|
* Patch the definition of a component with directives and pipes from the compilation scope of
|
|
12429
12739
|
* a given module.
|
|
@@ -12851,6 +13161,8 @@ export declare const enum ɵRuntimeErrorCode {
|
|
|
12851
13161
|
COMPONENT_ID_COLLISION = -912,
|
|
12852
13162
|
IMAGE_PERFORMANCE_WARNING = -913,
|
|
12853
13163
|
REQUIRED_INPUT_NO_VALUE = -950,
|
|
13164
|
+
REQUIRED_QUERY_NO_VALUE = -951,
|
|
13165
|
+
REQUIRED_MODEL_NO_VALUE = -952,
|
|
12854
13166
|
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
|
|
12855
13167
|
RUNTIME_DEPS_ORPHAN_COMPONENT = 1001
|
|
12856
13168
|
}
|
|
@@ -13031,7 +13343,7 @@ export declare function ɵtriggerResourceLoading(tDetails: TDeferBlockDetails, l
|
|
|
13031
13343
|
*
|
|
13032
13344
|
* @param string
|
|
13033
13345
|
* @param maxLength of the output string
|
|
13034
|
-
* @returns
|
|
13346
|
+
* @returns ellipsed string with ... in the middle
|
|
13035
13347
|
*/
|
|
13036
13348
|
export declare function ɵtruncateMiddle(str: string, maxLength?: number): string;
|
|
13037
13349
|
|
|
@@ -13055,6 +13367,14 @@ export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
|
|
|
13055
13367
|
|
|
13056
13368
|
export declare function ɵunwrapSafeValue<T>(value: T): T;
|
|
13057
13369
|
|
|
13370
|
+
/**
|
|
13371
|
+
* Utility function used during template type checking to extract the value from a `WritableSignal`.
|
|
13372
|
+
* @codeGenApi
|
|
13373
|
+
*/
|
|
13374
|
+
export declare function ɵunwrapWritableSignal<T>(value: T | {
|
|
13375
|
+
[WRITABLE_SIGNAL]: T;
|
|
13376
|
+
}): T;
|
|
13377
|
+
|
|
13058
13378
|
/**
|
|
13059
13379
|
* Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation.
|
|
13060
13380
|
* The value "false" means the old code path based on patching scope info into the types will be
|
|
@@ -13072,7 +13392,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
13072
13392
|
* This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
|
|
13073
13393
|
*/
|
|
13074
13394
|
private _cdRefInjectingView?;
|
|
13075
|
-
|
|
13395
|
+
readonly notifyErrorHandler: boolean;
|
|
13076
13396
|
private _appRef;
|
|
13077
13397
|
private _attachedToViewContainer;
|
|
13078
13398
|
get rootNodes(): any[];
|
|
@@ -14033,18 +14353,17 @@ export declare function ɵɵconditional<T>(containerIndex: number, matchingTempl
|
|
|
14033
14353
|
export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any): void;
|
|
14034
14354
|
|
|
14035
14355
|
/**
|
|
14036
|
-
*
|
|
14037
|
-
* refresh).
|
|
14356
|
+
* Creates a new content query and binds it to a signal created by an authoring function.
|
|
14038
14357
|
*
|
|
14039
14358
|
* @param directiveIndex Current directive index
|
|
14359
|
+
* @param target The target signal to which the query should be bound
|
|
14040
14360
|
* @param predicate The type for which the query will search
|
|
14041
14361
|
* @param flags Flags associated with the query
|
|
14042
14362
|
* @param read What to save in the query
|
|
14043
|
-
* @returns QueryList<T>
|
|
14044
14363
|
*
|
|
14045
14364
|
* @codeGenApi
|
|
14046
14365
|
*/
|
|
14047
|
-
export declare function ɵɵcontentQuerySignal<T>(target: Signal<T>,
|
|
14366
|
+
export declare function ɵɵcontentQuerySignal<T>(directiveIndex: number, target: Signal<T>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
|
|
14048
14367
|
|
|
14049
14368
|
/**
|
|
14050
14369
|
* Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
|
|
@@ -14763,6 +15082,7 @@ export declare interface ɵɵInjectorDef<T> {
|
|
|
14763
15082
|
imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
|
|
14764
15083
|
}
|
|
14765
15084
|
|
|
15085
|
+
|
|
14766
15086
|
/** Flags describing an input for a directive. */
|
|
14767
15087
|
export declare enum ɵɵInputFlags {
|
|
14768
15088
|
None = 0,
|
|
@@ -16951,6 +17271,41 @@ export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): Trust
|
|
|
16951
17271
|
*/
|
|
16952
17272
|
export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
|
|
16953
17273
|
|
|
17274
|
+
/**
|
|
17275
|
+
* Function used inside two-way listeners to conditionally set the value of the bound expression.
|
|
17276
|
+
*
|
|
17277
|
+
* @param target Field on which to set the value.
|
|
17278
|
+
* @param value Value to be set to the field.
|
|
17279
|
+
*
|
|
17280
|
+
* @codeGenApi
|
|
17281
|
+
*/
|
|
17282
|
+
export declare function ɵɵtwoWayBindingSet<T>(target: unknown, value: T): boolean;
|
|
17283
|
+
|
|
17284
|
+
/**
|
|
17285
|
+
* Adds an event listener that updates a two-way binding to the current node.
|
|
17286
|
+
*
|
|
17287
|
+
* @param eventName Name of the event.
|
|
17288
|
+
* @param listenerFn The function to be called when event emits.
|
|
17289
|
+
*
|
|
17290
|
+
* @codeGenApi
|
|
17291
|
+
*/
|
|
17292
|
+
export declare function ɵɵtwoWayListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵtwoWayListener;
|
|
17293
|
+
|
|
17294
|
+
/**
|
|
17295
|
+
* Update a two-way bound property on a selected element.
|
|
17296
|
+
*
|
|
17297
|
+
* Operates on the element selected by index via the {@link select} instruction.
|
|
17298
|
+
*
|
|
17299
|
+
* @param propName Name of property.
|
|
17300
|
+
* @param value New value to write.
|
|
17301
|
+
* @param sanitizer An optional function used to sanitize the value.
|
|
17302
|
+
* @returns This function returns itself so that it may be chained
|
|
17303
|
+
* (e.g. `twoWayProperty('name', ctx.name)('title', ctx.title)`)
|
|
17304
|
+
*
|
|
17305
|
+
* @codeGenApi
|
|
17306
|
+
*/
|
|
17307
|
+
export declare function ɵɵtwoWayProperty<T>(propName: string, value: T | WritableSignal<T>, sanitizer?: SanitizerFn | null): typeof ɵɵtwoWayProperty;
|
|
17308
|
+
|
|
16954
17309
|
|
|
16955
17310
|
/**
|
|
16956
17311
|
* Validation function invoked at runtime for each binding that might potentially
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.2.0-
|
|
2
|
+
* @license Angular v17.2.0-rc.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -14,7 +14,7 @@ declare type ComputedGetter<T> = (() => T) & {
|
|
|
14
14
|
*
|
|
15
15
|
* `Computed`s are both producers and consumers of reactivity.
|
|
16
16
|
*/
|
|
17
|
-
declare interface ComputedNode<T> extends ReactiveNode {
|
|
17
|
+
export declare interface ComputedNode<T> extends ReactiveNode {
|
|
18
18
|
/**
|
|
19
19
|
* Current value of the computation, or one of the sentinel values above (`UNSET`, `COMPUTING`,
|
|
20
20
|
* `ERROR`).
|
package/rxjs-interop/index.d.ts
CHANGED