@angular/core 14.0.4 → 14.0.7
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 +2 -2
- 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/r3_injector.mjs +7 -1
- package/esm2020/src/errors.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 +9 -3
- package/esm2020/src/render3/index.mjs +4 -4
- package/esm2020/src/render3/instructions/change_detection.mjs +2 -20
- 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 +19 -57
- 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/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/esm2020/testing/src/test_bed_common.mjs +1 -1
- package/fesm2015/core.mjs +1671 -1877
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +1702 -2000
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +1671 -1877
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +1702 -2000
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +57 -129
- package/package.json +1 -1
- package/testing/index.d.ts +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.
|
|
2
|
+
* @license Angular v14.0.7
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -529,7 +529,7 @@ export declare class ApplicationRef {
|
|
|
529
529
|
private _loadComponent;
|
|
530
530
|
/**
|
|
531
531
|
* Destroys an Angular application represented by this `ApplicationRef`. Calling this function
|
|
532
|
-
* will destroy the associated
|
|
532
|
+
* will destroy the associated environment injectors as well as all the bootstrapped components
|
|
533
533
|
* with their views.
|
|
534
534
|
*/
|
|
535
535
|
destroy(): void;
|
|
@@ -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
|
*
|
|
@@ -1599,49 +1601,6 @@ declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U
|
|
|
1599
1601
|
|
|
1600
1602
|
declare const CONTEXT = 8;
|
|
1601
1603
|
|
|
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
1604
|
/**
|
|
1646
1605
|
* Create a new environment injector.
|
|
1647
1606
|
*
|
|
@@ -2936,6 +2895,14 @@ export declare interface GetTestability {
|
|
|
2936
2895
|
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
|
2937
2896
|
}
|
|
2938
2897
|
|
|
2898
|
+
/**
|
|
2899
|
+
* The goal here is to make sure that the browser DOM API is the Renderer.
|
|
2900
|
+
* We do this by defining a subset of DOM API to be the renderer and then
|
|
2901
|
+
* use that at runtime for rendering.
|
|
2902
|
+
*
|
|
2903
|
+
* At runtime we can then use the DOM api directly, in server or web-worker
|
|
2904
|
+
* it will be easy to implement such API.
|
|
2905
|
+
*/
|
|
2939
2906
|
declare type GlobalTargetName = 'document' | 'window' | 'body';
|
|
2940
2907
|
|
|
2941
2908
|
declare type GlobalTargetResolver = (element: any) => EventTarget;
|
|
@@ -3140,9 +3107,6 @@ export declare interface HostDecorator {
|
|
|
3140
3107
|
new (): Host;
|
|
3141
3108
|
}
|
|
3142
3109
|
|
|
3143
|
-
/** See CreateComponentOptions.hostFeatures */
|
|
3144
|
-
declare type HostFeature = (<T>(component: T, componentDef: ɵComponentDef<T>) => void);
|
|
3145
|
-
|
|
3146
3110
|
/**
|
|
3147
3111
|
* Type of the HostListener metadata.
|
|
3148
3112
|
*
|
|
@@ -4580,9 +4544,9 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
4580
4544
|
/** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
|
|
4581
4545
|
readonly [INJECTOR_2]: Injector | null;
|
|
4582
4546
|
/** Factory to be used for creating Renderer. */
|
|
4583
|
-
[RENDERER_FACTORY]:
|
|
4547
|
+
[RENDERER_FACTORY]: RendererFactory;
|
|
4584
4548
|
/** Renderer to be used for this view. */
|
|
4585
|
-
[RENDERER]:
|
|
4549
|
+
[RENDERER]: Renderer;
|
|
4586
4550
|
/** An optional custom sanitizer. */
|
|
4587
4551
|
[SANITIZER]: Sanitizer | null;
|
|
4588
4552
|
/**
|
|
@@ -5427,21 +5391,6 @@ declare interface NodeInjectorDebug {
|
|
|
5427
5391
|
parentInjectorIndex: number;
|
|
5428
5392
|
}
|
|
5429
5393
|
|
|
5430
|
-
/**
|
|
5431
|
-
* Object Oriented style of API needed to create elements and text nodes.
|
|
5432
|
-
*
|
|
5433
|
-
* This is the native browser API style, e.g. operations are methods on individual objects
|
|
5434
|
-
* like HTMLElement. With this style, no additional code is needed as a facade
|
|
5435
|
-
* (reducing payload size).
|
|
5436
|
-
* */
|
|
5437
|
-
declare interface ObjectOrientedRenderer3 {
|
|
5438
|
-
createComment(data: string): RComment;
|
|
5439
|
-
createElement(tagName: string): RElement;
|
|
5440
|
-
createElementNS(namespace: string, tagName: string): RElement;
|
|
5441
|
-
createTextNode(data: string): RText;
|
|
5442
|
-
querySelector(selectors: string): RElement | null;
|
|
5443
|
-
}
|
|
5444
|
-
|
|
5445
5394
|
/**
|
|
5446
5395
|
* @description
|
|
5447
5396
|
* A lifecycle hook that is called when any data-bound property of a directive changes.
|
|
@@ -5866,41 +5815,6 @@ declare const enum PreOrderHookFlags {
|
|
|
5866
5815
|
NumberOfInitHooksCalledMask = 4294901760
|
|
5867
5816
|
}
|
|
5868
5817
|
|
|
5869
|
-
/**
|
|
5870
|
-
* Procedural style of API needed to create elements and text nodes.
|
|
5871
|
-
*
|
|
5872
|
-
* In non-native browser environments (e.g. platforms such as web-workers), this is the
|
|
5873
|
-
* facade that enables element manipulation. This also facilitates backwards compatibility
|
|
5874
|
-
* with Renderer2.
|
|
5875
|
-
*/
|
|
5876
|
-
declare interface ProceduralRenderer3 {
|
|
5877
|
-
destroy(): void;
|
|
5878
|
-
createComment(value: string): RComment;
|
|
5879
|
-
createElement(name: string, namespace?: string | null): RElement;
|
|
5880
|
-
createText(value: string): RText;
|
|
5881
|
-
/**
|
|
5882
|
-
* This property is allowed to be null / undefined,
|
|
5883
|
-
* in which case the view engine won't call it.
|
|
5884
|
-
* This is used as a performance optimization for production mode.
|
|
5885
|
-
*/
|
|
5886
|
-
destroyNode?: ((node: RNode) => void) | null;
|
|
5887
|
-
appendChild(parent: RElement, newChild: RNode): void;
|
|
5888
|
-
insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
|
|
5889
|
-
removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
|
|
5890
|
-
selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
|
|
5891
|
-
parentNode(node: RNode): RElement | null;
|
|
5892
|
-
nextSibling(node: RNode): RNode | null;
|
|
5893
|
-
setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
|
|
5894
|
-
removeAttribute(el: RElement, name: string, namespace?: string | null): void;
|
|
5895
|
-
addClass(el: RElement, name: string): void;
|
|
5896
|
-
removeClass(el: RElement, name: string): void;
|
|
5897
|
-
setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
|
|
5898
|
-
removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
|
|
5899
|
-
setProperty(el: RElement, name: string, value: any): void;
|
|
5900
|
-
setValue(node: RText | RComment, value: string): void;
|
|
5901
|
-
listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
5818
|
/**
|
|
5905
5819
|
* Describes a function that is used to process provider lists (such as provider
|
|
5906
5820
|
* overrides).
|
|
@@ -6629,6 +6543,40 @@ declare interface RElement extends RNode {
|
|
|
6629
6543
|
|
|
6630
6544
|
declare const RENDERER = 11;
|
|
6631
6545
|
|
|
6546
|
+
/**
|
|
6547
|
+
* Procedural style of API needed to create elements and text nodes.
|
|
6548
|
+
*
|
|
6549
|
+
* In non-native browser environments (e.g. platforms such as web-workers), this is the
|
|
6550
|
+
* facade that enables element manipulation. In practice, this is implemented by `Renderer2`.
|
|
6551
|
+
*/
|
|
6552
|
+
declare interface Renderer {
|
|
6553
|
+
destroy(): void;
|
|
6554
|
+
createComment(value: string): RComment;
|
|
6555
|
+
createElement(name: string, namespace?: string | null): RElement;
|
|
6556
|
+
createText(value: string): RText;
|
|
6557
|
+
/**
|
|
6558
|
+
* This property is allowed to be null / undefined,
|
|
6559
|
+
* in which case the view engine won't call it.
|
|
6560
|
+
* This is used as a performance optimization for production mode.
|
|
6561
|
+
*/
|
|
6562
|
+
destroyNode?: ((node: RNode) => void) | null;
|
|
6563
|
+
appendChild(parent: RElement, newChild: RNode): void;
|
|
6564
|
+
insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
|
|
6565
|
+
removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
|
|
6566
|
+
selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
|
|
6567
|
+
parentNode(node: RNode): RElement | null;
|
|
6568
|
+
nextSibling(node: RNode): RNode | null;
|
|
6569
|
+
setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
|
|
6570
|
+
removeAttribute(el: RElement, name: string, namespace?: string | null): void;
|
|
6571
|
+
addClass(el: RElement, name: string): void;
|
|
6572
|
+
removeClass(el: RElement, name: string): void;
|
|
6573
|
+
setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2): void;
|
|
6574
|
+
removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2): void;
|
|
6575
|
+
setProperty(el: RElement, name: string, value: any): void;
|
|
6576
|
+
setValue(node: RText | RComment, value: string): void;
|
|
6577
|
+
listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
6578
|
+
}
|
|
6579
|
+
|
|
6632
6580
|
/**
|
|
6633
6581
|
* Extend this base class to implement custom rendering. By default, Angular
|
|
6634
6582
|
* renders a template into DOM. You can use custom rendering to intercept
|
|
@@ -6805,10 +6753,14 @@ export declare abstract class Renderer2 {
|
|
|
6805
6753
|
abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
6806
6754
|
}
|
|
6807
6755
|
|
|
6808
|
-
declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
|
|
6809
|
-
|
|
6810
6756
|
declare const RENDERER_FACTORY = 10;
|
|
6811
6757
|
|
|
6758
|
+
declare interface RendererFactory {
|
|
6759
|
+
createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer;
|
|
6760
|
+
begin?(): void;
|
|
6761
|
+
end?(): void;
|
|
6762
|
+
}
|
|
6763
|
+
|
|
6812
6764
|
/**
|
|
6813
6765
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
6814
6766
|
*
|
|
@@ -6837,12 +6789,6 @@ export declare abstract class RendererFactory2 {
|
|
|
6837
6789
|
abstract whenRenderingDone?(): Promise<any>;
|
|
6838
6790
|
}
|
|
6839
6791
|
|
|
6840
|
-
declare interface RendererFactory3 {
|
|
6841
|
-
createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
|
|
6842
|
-
begin?(): void;
|
|
6843
|
-
end?(): void;
|
|
6844
|
-
}
|
|
6845
|
-
|
|
6846
6792
|
/**
|
|
6847
6793
|
* Flags for renderer-specific style modifiers.
|
|
6848
6794
|
* @publicApi
|
|
@@ -6858,11 +6804,6 @@ export declare enum RendererStyleFlags2 {
|
|
|
6858
6804
|
DashCase = 2
|
|
6859
6805
|
}
|
|
6860
6806
|
|
|
6861
|
-
declare enum RendererStyleFlags3 {
|
|
6862
|
-
Important = 1,
|
|
6863
|
-
DashCase = 2
|
|
6864
|
-
}
|
|
6865
|
-
|
|
6866
6807
|
/**
|
|
6867
6808
|
* Used by `RendererFactory2` to associate custom rendering data and styles
|
|
6868
6809
|
* with a rendering implementation.
|
|
@@ -7038,6 +6979,7 @@ declare const enum RuntimeErrorCode {
|
|
|
7038
6979
|
INJECTOR_ALREADY_DESTROYED = 205,
|
|
7039
6980
|
PROVIDER_IN_WRONG_CONTEXT = 207,
|
|
7040
6981
|
MISSING_INJECTION_TOKEN = 208,
|
|
6982
|
+
INVALID_MULTI_PROVIDER = 209,
|
|
7041
6983
|
MULTIPLE_COMPONENTS_MATCH = -300,
|
|
7042
6984
|
EXPORT_NOT_FOUND = -301,
|
|
7043
6985
|
PIPE_NOT_FOUND = -302,
|
|
@@ -7052,6 +6994,7 @@ declare const enum RuntimeErrorCode {
|
|
|
7052
6994
|
PLATFORM_ALREADY_DESTROYED = 404,
|
|
7053
6995
|
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
|
7054
6996
|
APPLICATION_REF_ALREADY_DESTROYED = 406,
|
|
6997
|
+
RENDERER_NOT_FOUND = 407,
|
|
7055
6998
|
INVALID_I18N_STRUCTURE = 700,
|
|
7056
6999
|
MISSING_LOCALE_DATA = 701,
|
|
7057
7000
|
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
|
|
@@ -10689,21 +10632,6 @@ export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements I
|
|
|
10689
10632
|
onDestroy(callback: () => void): void;
|
|
10690
10633
|
}
|
|
10691
10634
|
|
|
10692
|
-
/**
|
|
10693
|
-
* Bootstraps a Component into an existing host element and returns an instance
|
|
10694
|
-
* of the component.
|
|
10695
|
-
*
|
|
10696
|
-
* Use this function to bootstrap a component into the DOM tree. Each invocation
|
|
10697
|
-
* of this function will create a separate tree of components, injectors and
|
|
10698
|
-
* change detection cycles and lifetimes. To dynamically insert a new component
|
|
10699
|
-
* into an existing tree such that it shares the same injection, change detection
|
|
10700
|
-
* and object lifetime, use {@link ViewContainer#createComponent}.
|
|
10701
|
-
*
|
|
10702
|
-
* @param componentType Component to bootstrap
|
|
10703
|
-
* @param options Optional parameters which control bootstrapping
|
|
10704
|
-
*/
|
|
10705
|
-
export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
|
|
10706
|
-
|
|
10707
10635
|
/**
|
|
10708
10636
|
* Flags passed into template functions to determine which blocks (i.e. creation, update)
|
|
10709
10637
|
* should be executed.
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.
|
|
2
|
+
* @license Angular v14.0.7
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -237,7 +237,7 @@ export declare type MetadataOverride<T> = {
|
|
|
237
237
|
* @publicApi
|
|
238
238
|
*/
|
|
239
239
|
export declare interface ModuleTeardownOptions {
|
|
240
|
-
/** Whether the test module should be destroyed after every test. */
|
|
240
|
+
/** Whether the test module should be destroyed after every test. Defaults to `true`. */
|
|
241
241
|
destroyAfterEach: boolean;
|
|
242
242
|
/** Whether errors during test module destruction should be re-thrown. Defaults to `true`. */
|
|
243
243
|
rethrowErrors?: boolean;
|