@angular/core 14.1.0-next.3 → 14.1.0-next.4
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/application_ref.mjs +1 -1
- package/esm2020/src/core.mjs +1 -1
- package/esm2020/src/core_render3_private_export.mjs +2 -2
- package/esm2020/src/debug/debug_node.mjs +2 -3
- package/esm2020/src/di/index.mjs +1 -1
- package/esm2020/src/di/injector_compatibility.mjs +11 -1
- package/esm2020/src/di/interface/injector.mjs +2 -1
- package/esm2020/src/di/r3_injector.mjs +13 -1
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/linker/component_factory.mjs +1 -1
- package/esm2020/src/metadata/di.mjs +1 -1
- package/esm2020/src/render/api.mjs +2 -11
- package/esm2020/src/render3/component.mjs +3 -58
- package/esm2020/src/render3/component_ref.mjs +30 -5
- package/esm2020/src/render3/index.mjs +3 -3
- package/esm2020/src/render3/instructions/element_validation.mjs +4 -1
- package/esm2020/src/render3/instructions/listener.mjs +34 -44
- package/esm2020/src/render3/instructions/lview_debug.mjs +1 -1
- package/esm2020/src/render3/instructions/shared.mjs +22 -59
- package/esm2020/src/render3/instructions/styling.mjs +2 -2
- package/esm2020/src/render3/interfaces/renderer.mjs +1 -26
- package/esm2020/src/render3/interfaces/view.mjs +1 -1
- package/esm2020/src/render3/ng_module_ref.mjs +4 -1
- package/esm2020/src/render3/node_manipulation.mjs +24 -87
- package/esm2020/src/render3/node_manipulation_i18n.mjs +1 -1
- package/esm2020/src/render3/util/attrs_utils.mjs +4 -12
- package/esm2020/src/render3/util/view_utils.mjs +3 -6
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +1798 -1946
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +1429 -1669
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +1798 -1946
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +1429 -1669
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +138 -128
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.1.0-next.
|
|
2
|
+
* @license Angular v14.1.0-next.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -608,8 +608,10 @@ export declare interface AttributeDecorator {
|
|
|
608
608
|
|
|
609
609
|
/**
|
|
610
610
|
* Provides additional options to the bootstraping process.
|
|
611
|
+
*
|
|
612
|
+
* @publicApi
|
|
611
613
|
*/
|
|
612
|
-
declare interface BootstrapOptions {
|
|
614
|
+
export declare interface BootstrapOptions {
|
|
613
615
|
/**
|
|
614
616
|
* Optionally specify which `NgZone` should be used.
|
|
615
617
|
*
|
|
@@ -1320,6 +1322,15 @@ declare type ComponentInstance = {};
|
|
|
1320
1322
|
* @publicApi
|
|
1321
1323
|
*/
|
|
1322
1324
|
export declare abstract class ComponentRef<C> {
|
|
1325
|
+
/**
|
|
1326
|
+
* Updates a specified input name to a new value. Using this method will properly mark for check
|
|
1327
|
+
* component using the `OnPush` change detection strategy. It will also assure that the
|
|
1328
|
+
* `OnChanges` lifecycle hook runs when a dynamically created component is change-detected.
|
|
1329
|
+
*
|
|
1330
|
+
* @param name The name of an input.
|
|
1331
|
+
* @param value The new value of an input.
|
|
1332
|
+
*/
|
|
1333
|
+
abstract setInput(name: string, value: unknown): void;
|
|
1323
1334
|
/**
|
|
1324
1335
|
* The host or anchor [element](guide/glossary#element) for this component instance.
|
|
1325
1336
|
*/
|
|
@@ -1452,6 +1463,8 @@ export declare interface ContentChildDecorator {
|
|
|
1452
1463
|
* **Metadata Properties**:
|
|
1453
1464
|
*
|
|
1454
1465
|
* * **selector** - The directive type or the name used for querying.
|
|
1466
|
+
* * **descendants** - If `true` (default) include all descendants of the element. If `false` then
|
|
1467
|
+
* only query direct children of the element.
|
|
1455
1468
|
* * **read** - Used to read a different token from the queried element.
|
|
1456
1469
|
* * **static** - True to resolve query results before change detection runs,
|
|
1457
1470
|
* false to resolve after change detection. Defaults to false.
|
|
@@ -1485,10 +1498,12 @@ export declare interface ContentChildDecorator {
|
|
|
1485
1498
|
* @Annotation
|
|
1486
1499
|
*/
|
|
1487
1500
|
(selector: ProviderToken<unknown> | Function | string, opts?: {
|
|
1501
|
+
descendants?: boolean;
|
|
1488
1502
|
read?: any;
|
|
1489
1503
|
static?: boolean;
|
|
1490
1504
|
}): any;
|
|
1491
1505
|
new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
|
1506
|
+
descendants?: boolean;
|
|
1492
1507
|
read?: any;
|
|
1493
1508
|
static?: boolean;
|
|
1494
1509
|
}): ContentChild;
|
|
@@ -1599,49 +1614,6 @@ declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U
|
|
|
1599
1614
|
|
|
1600
1615
|
declare const CONTEXT = 8;
|
|
1601
1616
|
|
|
1602
|
-
/** Options that control how the component should be bootstrapped. */
|
|
1603
|
-
declare interface CreateComponentOptions {
|
|
1604
|
-
/** Which renderer factory to use. */
|
|
1605
|
-
rendererFactory?: RendererFactory3;
|
|
1606
|
-
/** A custom sanitizer instance */
|
|
1607
|
-
sanitizer?: Sanitizer;
|
|
1608
|
-
/** A custom animation player handler */
|
|
1609
|
-
playerHandler?: ɵPlayerHandler;
|
|
1610
|
-
/**
|
|
1611
|
-
* Host element on which the component will be bootstrapped. If not specified,
|
|
1612
|
-
* the component definition's `tag` is used to query the existing DOM for the
|
|
1613
|
-
* element to bootstrap.
|
|
1614
|
-
*/
|
|
1615
|
-
host?: RElement | string;
|
|
1616
|
-
/** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */
|
|
1617
|
-
injector?: Injector;
|
|
1618
|
-
/**
|
|
1619
|
-
* List of features to be applied to the created component. Features are simply
|
|
1620
|
-
* functions that decorate a component with a certain behavior.
|
|
1621
|
-
*
|
|
1622
|
-
* Typically, the features in this list are features that cannot be added to the
|
|
1623
|
-
* other features list in the component definition because they rely on other factors.
|
|
1624
|
-
*
|
|
1625
|
-
* Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities
|
|
1626
|
-
* to root components in a tree-shakable way. It cannot be added to the component
|
|
1627
|
-
* features list because there's no way of knowing when the component will be used as
|
|
1628
|
-
* a root component.
|
|
1629
|
-
*/
|
|
1630
|
-
hostFeatures?: HostFeature[];
|
|
1631
|
-
/**
|
|
1632
|
-
* A function which is used to schedule change detection work in the future.
|
|
1633
|
-
*
|
|
1634
|
-
* When marking components as dirty, it is necessary to schedule the work of
|
|
1635
|
-
* change detection in the future. This is done to coalesce multiple
|
|
1636
|
-
* {@link markDirty} calls into a single changed detection processing.
|
|
1637
|
-
*
|
|
1638
|
-
* The default value of the scheduler is the `requestAnimationFrame` function.
|
|
1639
|
-
*
|
|
1640
|
-
* It is also useful to override this function for testing purposes.
|
|
1641
|
-
*/
|
|
1642
|
-
scheduler?: (work: () => void) => void;
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
1617
|
/**
|
|
1646
1618
|
* Create a new environment injector.
|
|
1647
1619
|
*
|
|
@@ -2639,6 +2611,17 @@ export declare abstract class EnvironmentInjector implements Injector {
|
|
|
2639
2611
|
* @suppress {duplicate}
|
|
2640
2612
|
*/
|
|
2641
2613
|
abstract get(token: any, notFoundValue?: any): any;
|
|
2614
|
+
/**
|
|
2615
|
+
* Runs the given function in the context of this `EnvironmentInjector`.
|
|
2616
|
+
*
|
|
2617
|
+
* Within the function's stack frame, `inject` can be used to inject dependencies from this
|
|
2618
|
+
* injector. Note that `inject` is only usable synchronously, and cannot be used in any
|
|
2619
|
+
* asynchronous callbacks or after any `await` points.
|
|
2620
|
+
*
|
|
2621
|
+
* @param fn the closure to be run in the context of this injector
|
|
2622
|
+
* @returns the return value of the function, if any
|
|
2623
|
+
*/
|
|
2624
|
+
abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
2642
2625
|
abstract destroy(): void;
|
|
2643
2626
|
}
|
|
2644
2627
|
|
|
@@ -2944,6 +2927,14 @@ export declare interface GetTestability {
|
|
|
2944
2927
|
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
|
2945
2928
|
}
|
|
2946
2929
|
|
|
2930
|
+
/**
|
|
2931
|
+
* The goal here is to make sure that the browser DOM API is the Renderer.
|
|
2932
|
+
* We do this by defining a subset of DOM API to be the renderer and then
|
|
2933
|
+
* use that at runtime for rendering.
|
|
2934
|
+
*
|
|
2935
|
+
* At runtime we can then use the DOM api directly, in server or web-worker
|
|
2936
|
+
* it will be easy to implement such API.
|
|
2937
|
+
*/
|
|
2947
2938
|
declare type GlobalTargetName = 'document' | 'window' | 'body';
|
|
2948
2939
|
|
|
2949
2940
|
declare type GlobalTargetResolver = (element: any) => EventTarget;
|
|
@@ -3148,9 +3139,6 @@ export declare interface HostDecorator {
|
|
|
3148
3139
|
new (): Host;
|
|
3149
3140
|
}
|
|
3150
3141
|
|
|
3151
|
-
/** See CreateComponentOptions.hostFeatures */
|
|
3152
|
-
declare type HostFeature = (<T>(component: T, componentDef: ɵComponentDef<T>) => void);
|
|
3153
|
-
|
|
3154
3142
|
/**
|
|
3155
3143
|
* Type of the HostListener metadata.
|
|
3156
3144
|
*
|
|
@@ -3614,9 +3602,38 @@ export declare function inject<T>(token: ProviderToken<T>): T;
|
|
|
3614
3602
|
* @throws if called outside of a supported context.
|
|
3615
3603
|
*
|
|
3616
3604
|
* @publicApi
|
|
3605
|
+
* @deprecated prefer an options object instead of `InjectFlags`
|
|
3617
3606
|
*/
|
|
3618
3607
|
export declare function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
|
|
3619
3608
|
|
|
3609
|
+
/**
|
|
3610
|
+
* @param token A token that represents a dependency that should be injected.
|
|
3611
|
+
* @param options Control how injection is executed. Options correspond to injection strategies
|
|
3612
|
+
* that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and
|
|
3613
|
+
* `@Optional`.
|
|
3614
|
+
* @returns the injected value if operation is successful.
|
|
3615
|
+
* @throws if called outside of a supported context, or if the token is not found.
|
|
3616
|
+
*
|
|
3617
|
+
* @publicApi
|
|
3618
|
+
*/
|
|
3619
|
+
export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions & {
|
|
3620
|
+
optional?: false;
|
|
3621
|
+
}): T;
|
|
3622
|
+
|
|
3623
|
+
/**
|
|
3624
|
+
* @param token A token that represents a dependency that should be injected.
|
|
3625
|
+
* @param options Control how injection is executed. Options correspond to injection strategies
|
|
3626
|
+
* that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and
|
|
3627
|
+
* `@Optional`.
|
|
3628
|
+
* @returns the injected value if operation is successful, `null` if the token is not
|
|
3629
|
+
* found and optional injection has been requested.
|
|
3630
|
+
* @throws if called outside of a supported context, or if the token is not found and optional
|
|
3631
|
+
* injection was not requested.
|
|
3632
|
+
*
|
|
3633
|
+
* @publicApi
|
|
3634
|
+
*/
|
|
3635
|
+
export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;
|
|
3636
|
+
|
|
3620
3637
|
/**
|
|
3621
3638
|
* Type of the Injectable metadata.
|
|
3622
3639
|
*
|
|
@@ -3740,6 +3757,7 @@ export declare interface InjectDecorator {
|
|
|
3740
3757
|
* Injection flags for DI.
|
|
3741
3758
|
*
|
|
3742
3759
|
* @publicApi
|
|
3760
|
+
* @deprecated use an options object for `inject` instead.
|
|
3743
3761
|
*/
|
|
3744
3762
|
export declare enum InjectFlags {
|
|
3745
3763
|
/** Check self and check parent injector if needed */
|
|
@@ -3814,6 +3832,32 @@ export declare class InjectionToken<T> {
|
|
|
3814
3832
|
toString(): string;
|
|
3815
3833
|
}
|
|
3816
3834
|
|
|
3835
|
+
/**
|
|
3836
|
+
* Type of the options argument to `inject`.
|
|
3837
|
+
*
|
|
3838
|
+
* @publicApi
|
|
3839
|
+
*/
|
|
3840
|
+
export declare interface InjectOptions {
|
|
3841
|
+
/**
|
|
3842
|
+
* Use optional injection, and return `null` if the requested token is not found.
|
|
3843
|
+
*/
|
|
3844
|
+
optional?: boolean;
|
|
3845
|
+
/**
|
|
3846
|
+
* Start injection at the parent of the current injector.
|
|
3847
|
+
*/
|
|
3848
|
+
skipSelf?: boolean;
|
|
3849
|
+
/**
|
|
3850
|
+
* Only query the current injector for the token, and don't fall back to the parent injector if
|
|
3851
|
+
* it's not found.
|
|
3852
|
+
*/
|
|
3853
|
+
self?: boolean;
|
|
3854
|
+
/**
|
|
3855
|
+
* Stop injection at the host component's injector. Only relevant when injecting from an element
|
|
3856
|
+
* injector, and a no-op for environment injectors.
|
|
3857
|
+
*/
|
|
3858
|
+
host?: boolean;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3817
3861
|
/**
|
|
3818
3862
|
* An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
|
|
3819
3863
|
*
|
|
@@ -4588,9 +4632,9 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
4588
4632
|
/** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
|
|
4589
4633
|
readonly [INJECTOR_2]: Injector | null;
|
|
4590
4634
|
/** Factory to be used for creating Renderer. */
|
|
4591
|
-
[RENDERER_FACTORY]:
|
|
4635
|
+
[RENDERER_FACTORY]: RendererFactory;
|
|
4592
4636
|
/** Renderer to be used for this view. */
|
|
4593
|
-
[RENDERER]:
|
|
4637
|
+
[RENDERER]: Renderer;
|
|
4594
4638
|
/** An optional custom sanitizer. */
|
|
4595
4639
|
[SANITIZER]: Sanitizer | null;
|
|
4596
4640
|
/**
|
|
@@ -5435,21 +5479,6 @@ declare interface NodeInjectorDebug {
|
|
|
5435
5479
|
parentInjectorIndex: number;
|
|
5436
5480
|
}
|
|
5437
5481
|
|
|
5438
|
-
/**
|
|
5439
|
-
* Object Oriented style of API needed to create elements and text nodes.
|
|
5440
|
-
*
|
|
5441
|
-
* This is the native browser API style, e.g. operations are methods on individual objects
|
|
5442
|
-
* like HTMLElement. With this style, no additional code is needed as a facade
|
|
5443
|
-
* (reducing payload size).
|
|
5444
|
-
* */
|
|
5445
|
-
declare interface ObjectOrientedRenderer3 {
|
|
5446
|
-
createComment(data: string): RComment;
|
|
5447
|
-
createElement(tagName: string): RElement;
|
|
5448
|
-
createElementNS(namespace: string, tagName: string): RElement;
|
|
5449
|
-
createTextNode(data: string): RText;
|
|
5450
|
-
querySelector(selectors: string): RElement | null;
|
|
5451
|
-
}
|
|
5452
|
-
|
|
5453
5482
|
/**
|
|
5454
5483
|
* @description
|
|
5455
5484
|
* A lifecycle hook that is called when any data-bound property of a directive changes.
|
|
@@ -5874,41 +5903,6 @@ declare const enum PreOrderHookFlags {
|
|
|
5874
5903
|
NumberOfInitHooksCalledMask = 4294901760
|
|
5875
5904
|
}
|
|
5876
5905
|
|
|
5877
|
-
/**
|
|
5878
|
-
* Procedural style of API needed to create elements and text nodes.
|
|
5879
|
-
*
|
|
5880
|
-
* In non-native browser environments (e.g. platforms such as web-workers), this is the
|
|
5881
|
-
* facade that enables element manipulation. This also facilitates backwards compatibility
|
|
5882
|
-
* with Renderer2.
|
|
5883
|
-
*/
|
|
5884
|
-
declare interface ProceduralRenderer3 {
|
|
5885
|
-
destroy(): void;
|
|
5886
|
-
createComment(value: string): RComment;
|
|
5887
|
-
createElement(name: string, namespace?: string | null): RElement;
|
|
5888
|
-
createText(value: string): RText;
|
|
5889
|
-
/**
|
|
5890
|
-
* This property is allowed to be null / undefined,
|
|
5891
|
-
* in which case the view engine won't call it.
|
|
5892
|
-
* This is used as a performance optimization for production mode.
|
|
5893
|
-
*/
|
|
5894
|
-
destroyNode?: ((node: RNode) => void) | null;
|
|
5895
|
-
appendChild(parent: RElement, newChild: RNode): void;
|
|
5896
|
-
insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
|
|
5897
|
-
removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
|
|
5898
|
-
selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
|
|
5899
|
-
parentNode(node: RNode): RElement | null;
|
|
5900
|
-
nextSibling(node: RNode): RNode | null;
|
|
5901
|
-
setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
|
|
5902
|
-
removeAttribute(el: RElement, name: string, namespace?: string | null): void;
|
|
5903
|
-
addClass(el: RElement, name: string): void;
|
|
5904
|
-
removeClass(el: RElement, name: string): void;
|
|
5905
|
-
setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
|
|
5906
|
-
removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
|
|
5907
|
-
setProperty(el: RElement, name: string, value: any): void;
|
|
5908
|
-
setValue(node: RText | RComment, value: string): void;
|
|
5909
|
-
listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
5910
|
-
}
|
|
5911
|
-
|
|
5912
5906
|
/**
|
|
5913
5907
|
* Describes a function that is used to process provider lists (such as provider
|
|
5914
5908
|
* overrides).
|
|
@@ -6307,6 +6301,7 @@ declare class R3Injector extends EnvironmentInjector {
|
|
|
6307
6301
|
*/
|
|
6308
6302
|
destroy(): void;
|
|
6309
6303
|
onDestroy(callback: () => void): void;
|
|
6304
|
+
runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
6310
6305
|
get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
|
|
6311
6306
|
toString(): string;
|
|
6312
6307
|
private assertNotDestroyed;
|
|
@@ -6637,6 +6632,40 @@ declare interface RElement extends RNode {
|
|
|
6637
6632
|
|
|
6638
6633
|
declare const RENDERER = 11;
|
|
6639
6634
|
|
|
6635
|
+
/**
|
|
6636
|
+
* Procedural style of API needed to create elements and text nodes.
|
|
6637
|
+
*
|
|
6638
|
+
* In non-native browser environments (e.g. platforms such as web-workers), this is the
|
|
6639
|
+
* facade that enables element manipulation. In practice, this is implemented by `Renderer2`.
|
|
6640
|
+
*/
|
|
6641
|
+
declare interface Renderer {
|
|
6642
|
+
destroy(): void;
|
|
6643
|
+
createComment(value: string): RComment;
|
|
6644
|
+
createElement(name: string, namespace?: string | null): RElement;
|
|
6645
|
+
createText(value: string): RText;
|
|
6646
|
+
/**
|
|
6647
|
+
* This property is allowed to be null / undefined,
|
|
6648
|
+
* in which case the view engine won't call it.
|
|
6649
|
+
* This is used as a performance optimization for production mode.
|
|
6650
|
+
*/
|
|
6651
|
+
destroyNode?: ((node: RNode) => void) | null;
|
|
6652
|
+
appendChild(parent: RElement, newChild: RNode): void;
|
|
6653
|
+
insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
|
|
6654
|
+
removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
|
|
6655
|
+
selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
|
|
6656
|
+
parentNode(node: RNode): RElement | null;
|
|
6657
|
+
nextSibling(node: RNode): RNode | null;
|
|
6658
|
+
setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
|
|
6659
|
+
removeAttribute(el: RElement, name: string, namespace?: string | null): void;
|
|
6660
|
+
addClass(el: RElement, name: string): void;
|
|
6661
|
+
removeClass(el: RElement, name: string): void;
|
|
6662
|
+
setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2): void;
|
|
6663
|
+
removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2): void;
|
|
6664
|
+
setProperty(el: RElement, name: string, value: any): void;
|
|
6665
|
+
setValue(node: RText | RComment, value: string): void;
|
|
6666
|
+
listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
6667
|
+
}
|
|
6668
|
+
|
|
6640
6669
|
/**
|
|
6641
6670
|
* Extend this base class to implement custom rendering. By default, Angular
|
|
6642
6671
|
* renders a template into DOM. You can use custom rendering to intercept
|
|
@@ -6813,10 +6842,14 @@ export declare abstract class Renderer2 {
|
|
|
6813
6842
|
abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
6814
6843
|
}
|
|
6815
6844
|
|
|
6816
|
-
declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
|
|
6817
|
-
|
|
6818
6845
|
declare const RENDERER_FACTORY = 10;
|
|
6819
6846
|
|
|
6847
|
+
declare interface RendererFactory {
|
|
6848
|
+
createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer;
|
|
6849
|
+
begin?(): void;
|
|
6850
|
+
end?(): void;
|
|
6851
|
+
}
|
|
6852
|
+
|
|
6820
6853
|
/**
|
|
6821
6854
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
6822
6855
|
*
|
|
@@ -6845,12 +6878,6 @@ export declare abstract class RendererFactory2 {
|
|
|
6845
6878
|
abstract whenRenderingDone?(): Promise<any>;
|
|
6846
6879
|
}
|
|
6847
6880
|
|
|
6848
|
-
declare interface RendererFactory3 {
|
|
6849
|
-
createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
|
|
6850
|
-
begin?(): void;
|
|
6851
|
-
end?(): void;
|
|
6852
|
-
}
|
|
6853
|
-
|
|
6854
6881
|
/**
|
|
6855
6882
|
* Flags for renderer-specific style modifiers.
|
|
6856
6883
|
* @publicApi
|
|
@@ -6866,11 +6893,6 @@ export declare enum RendererStyleFlags2 {
|
|
|
6866
6893
|
DashCase = 2
|
|
6867
6894
|
}
|
|
6868
6895
|
|
|
6869
|
-
declare enum RendererStyleFlags3 {
|
|
6870
|
-
Important = 1,
|
|
6871
|
-
DashCase = 2
|
|
6872
|
-
}
|
|
6873
|
-
|
|
6874
6896
|
/**
|
|
6875
6897
|
* Used by `RendererFactory2` to associate custom rendering data and styles
|
|
6876
6898
|
* with a rendering implementation.
|
|
@@ -7060,6 +7082,7 @@ declare const enum RuntimeErrorCode {
|
|
|
7060
7082
|
PLATFORM_ALREADY_DESTROYED = 404,
|
|
7061
7083
|
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
|
7062
7084
|
APPLICATION_REF_ALREADY_DESTROYED = 406,
|
|
7085
|
+
RENDERER_NOT_FOUND = 407,
|
|
7063
7086
|
INVALID_I18N_STRUCTURE = 700,
|
|
7064
7087
|
MISSING_LOCALE_DATA = 701,
|
|
7065
7088
|
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
|
|
@@ -10678,6 +10701,7 @@ export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
|
|
|
10678
10701
|
changeDetectorRef: ChangeDetectorRef;
|
|
10679
10702
|
componentType: Type<T>;
|
|
10680
10703
|
constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: LView, _tNode: TElementNode | TContainerNode | TElementContainerNode);
|
|
10704
|
+
setInput(name: string, value: unknown): void;
|
|
10681
10705
|
get injector(): Injector;
|
|
10682
10706
|
destroy(): void;
|
|
10683
10707
|
onDestroy(callback: () => void): void;
|
|
@@ -10693,25 +10717,11 @@ export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements I
|
|
|
10693
10717
|
readonly componentFactoryResolver: ComponentFactoryResolver_2;
|
|
10694
10718
|
constructor(ngModuleType: Type<T>, _parent: Injector | null);
|
|
10695
10719
|
get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
|
|
10720
|
+
runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
10696
10721
|
destroy(): void;
|
|
10697
10722
|
onDestroy(callback: () => void): void;
|
|
10698
10723
|
}
|
|
10699
10724
|
|
|
10700
|
-
/**
|
|
10701
|
-
* Bootstraps a Component into an existing host element and returns an instance
|
|
10702
|
-
* of the component.
|
|
10703
|
-
*
|
|
10704
|
-
* Use this function to bootstrap a component into the DOM tree. Each invocation
|
|
10705
|
-
* of this function will create a separate tree of components, injectors and
|
|
10706
|
-
* change detection cycles and lifetimes. To dynamically insert a new component
|
|
10707
|
-
* into an existing tree such that it shares the same injection, change detection
|
|
10708
|
-
* and object lifetime, use {@link ViewContainer#createComponent}.
|
|
10709
|
-
*
|
|
10710
|
-
* @param componentType Component to bootstrap
|
|
10711
|
-
* @param options Optional parameters which control bootstrapping
|
|
10712
|
-
*/
|
|
10713
|
-
export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
|
|
10714
|
-
|
|
10715
10725
|
/**
|
|
10716
10726
|
* Flags passed into template functions to determine which blocks (i.e. creation, update)
|
|
10717
10727
|
* should be executed.
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED