@angular/core 18.0.0-rc.0 → 18.0.0-rc.2

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 (73) hide show
  1. package/esm2022/primitives/event-dispatch/contract_binary.mjs +3 -3
  2. package/esm2022/primitives/event-dispatch/index.mjs +2 -2
  3. package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +221 -0
  4. package/esm2022/primitives/event-dispatch/src/attribute.mjs +63 -65
  5. package/esm2022/primitives/event-dispatch/src/cache.mjs +10 -10
  6. package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +52 -176
  7. package/esm2022/primitives/event-dispatch/src/earlyeventcontract.mjs +15 -9
  8. package/esm2022/primitives/event-dispatch/src/event_contract_defines.mjs +1 -19
  9. package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +24 -362
  10. package/esm2022/primitives/event-dispatch/src/key_code.mjs +11 -13
  11. package/esm2022/primitives/event-dispatch/src/legacy_dispatcher.mjs +252 -2
  12. package/esm2022/primitives/event-dispatch/src/property.mjs +30 -27
  13. package/esm2022/primitives/event-dispatch/src/register_events.mjs +16 -17
  14. package/esm2022/primitives/event-dispatch/src/restriction.mjs +2 -2
  15. package/esm2022/src/application/application_ref.mjs +6 -3
  16. package/esm2022/src/application/create_application.mjs +12 -5
  17. package/esm2022/src/change_detection/scheduling/exhaustive_check_no_changes.mjs +150 -0
  18. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +6 -4
  19. package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +3 -1
  20. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +9 -6
  21. package/esm2022/src/core.mjs +2 -1
  22. package/esm2022/src/core_private_export.mjs +2 -1
  23. package/esm2022/src/core_reactivity_export_internal.mjs +1 -3
  24. package/esm2022/src/core_render3_private_export.mjs +1 -3
  25. package/esm2022/src/defer/instructions.mjs +20 -12
  26. package/esm2022/src/defer/interfaces.mjs +1 -3
  27. package/esm2022/src/errors.mjs +1 -1
  28. package/esm2022/src/hydration/event_replay.mjs +67 -79
  29. package/esm2022/src/hydration/utils.mjs +1 -2
  30. package/esm2022/src/metadata/directives.mjs +1 -1
  31. package/esm2022/src/platform/platform_ref.mjs +10 -4
  32. package/esm2022/src/render3/after_render_hooks.mjs +4 -2
  33. package/esm2022/src/render3/component_ref.mjs +1 -1
  34. package/esm2022/src/render3/index.mjs +1 -3
  35. package/esm2022/src/render3/instructions/change_detection.mjs +13 -10
  36. package/esm2022/src/render3/instructions/listener.mjs +12 -1
  37. package/esm2022/src/render3/interfaces/public_definitions.mjs +1 -1
  38. package/esm2022/src/render3/state.mjs +14 -4
  39. package/esm2022/src/render3/view_ref.mjs +3 -2
  40. package/esm2022/src/util/callback_scheduler.mjs +12 -26
  41. package/esm2022/src/version.mjs +1 -1
  42. package/esm2022/src/zone/ng_zone.mjs +9 -23
  43. package/esm2022/testing/src/component_fixture.mjs +2 -4
  44. package/esm2022/testing/src/defer.mjs +1 -2
  45. package/esm2022/testing/src/logger.mjs +3 -3
  46. package/esm2022/testing/src/test_bed.mjs +1 -3
  47. package/esm2022/testing/src/test_bed_compiler.mjs +3 -6
  48. package/event-dispatch-contract.min.js +1 -1
  49. package/fesm2022/core.mjs +800 -660
  50. package/fesm2022/core.mjs.map +1 -1
  51. package/fesm2022/primitives/event-dispatch.mjs +484 -807
  52. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  53. package/fesm2022/primitives/signals.mjs +1 -1
  54. package/fesm2022/rxjs-interop.mjs +1 -1
  55. package/fesm2022/testing.mjs +4 -10
  56. package/fesm2022/testing.mjs.map +1 -1
  57. package/index.d.ts +36 -4
  58. package/package.json +1 -1
  59. package/primitives/event-dispatch/index.d.ts +111 -162
  60. package/primitives/signals/index.d.ts +1 -1
  61. package/rxjs-interop/index.d.ts +1 -1
  62. package/schematics/migrations/http-providers/bundle.js +110 -71
  63. package/schematics/migrations/http-providers/bundle.js.map +3 -3
  64. package/schematics/migrations/invalid-two-way-bindings/bundle.js +197 -167
  65. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
  66. package/schematics/ng-generate/control-flow-migration/bundle.js +205 -175
  67. package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
  68. package/schematics/ng-generate/standalone-migration/bundle.js +481 -451
  69. package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
  70. package/testing/index.d.ts +1 -4
  71. package/esm2022/primitives/event-dispatch/src/base_dispatcher.mjs +0 -96
  72. package/esm2022/primitives/event-dispatch/src/custom_events.mjs +0 -63
  73. package/esm2022/primitives/event-dispatch/src/replay.mjs +0 -389
package/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Angular v18.0.0-rc.0
2
+ * @license Angular v18.0.0-rc.2
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
 
8
8
  import { BehaviorSubject } from 'rxjs';
9
+ import { EnvironmentProviders as EnvironmentProviders_2 } from '@angular/core';
9
10
  import { Observable } from 'rxjs';
10
11
  import { ReactiveNode } from '@angular/core/primitives/signals';
11
12
  import { SIGNAL } from '@angular/core/primitives/signals';
@@ -646,7 +647,6 @@ export declare class ApplicationRef {
646
647
  private readonly zonelessEnabled;
647
648
  private externalTestViews;
648
649
  private beforeRender;
649
- private get allViews();
650
650
  /**
651
651
  * Indicates whether this instance was destroyed.
652
652
  */
@@ -1325,6 +1325,8 @@ export declare interface Component extends Directive {
1325
1325
  encapsulation?: ViewEncapsulation;
1326
1326
  /**
1327
1327
  * Overrides the default interpolation start and end delimiters (`{{` and `}}`).
1328
+ *
1329
+ * @deprecated use Angular's default interpolation delimiters instead.
1328
1330
  */
1329
1331
  interpolation?: [string, string];
1330
1332
  /**
@@ -8169,6 +8171,32 @@ declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
8169
8171
  */
8170
8172
  declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
8171
8173
 
8174
+ /**
8175
+ * Used to periodically verify no expressions have changed after they were checked.
8176
+ *
8177
+ * @param options Used to configure when the check will execute.
8178
+ * - `interval` will periodically run exhaustive `checkNoChanges` on application views
8179
+ * - `useNgZoneOnStable` will us ZoneJS to determine when change detection might have run
8180
+ * in an application using ZoneJS to drive change detection. When the `NgZone.onStable` would
8181
+ * have emit, all views attached to the `ApplicationRef` are checked for changes.
8182
+ * - 'exhaustive' means that all views attached to `ApplicationRef` and all the descendants of those views will be
8183
+ * checked for changes (excluding those subtrees which are detached via `ChangeDetectorRef.detach()`).
8184
+ * This is useful because the check that runs after regular change detection does not work for components using `ChangeDetectionStrategy.OnPush`.
8185
+ * This check is will surface any existing errors hidden by `OnPush` components. By default, this check is exhaustive
8186
+ * and will always check all views, regardless of their "dirty" state and `ChangeDetectionStrategy`.
8187
+ *
8188
+ * When the `useNgZoneOnStable` option is `true`, this function will provide its own `NgZone` implementation and needs
8189
+ * to come after any other `NgZone` provider, including `provideZoneChangeDetection()` and `provideExperimentalZonelessChangeDetection()`.
8190
+ *
8191
+ * @experimental
8192
+ * @publicApi
8193
+ */
8194
+ export declare function provideExperimentalCheckNoChangesForDebug(options: {
8195
+ interval?: number;
8196
+ useNgZoneOnStable?: boolean;
8197
+ exhaustive?: boolean;
8198
+ }): EnvironmentProviders_2;
8199
+
8172
8200
  /**
8173
8201
  * Provides change detection without ZoneJS for the application bootstrapped using
8174
8202
  * `bootstrapApplication`.
@@ -12288,7 +12316,6 @@ export declare const ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR: InjectionToken<ɵDefe
12288
12316
  /**
12289
12317
  * Options for configuring defer blocks behavior.
12290
12318
  * @publicApi
12291
- * @developerPreview
12292
12319
  */
12293
12320
  export declare enum ɵDeferBlockBehavior {
12294
12321
  /**
@@ -12343,7 +12370,6 @@ export declare interface ɵDeferBlockDetails {
12343
12370
  * Describes the current state of this defer block instance.
12344
12371
  *
12345
12372
  * @publicApi
12346
- * @developerPreview
12347
12373
  */
12348
12374
  export declare enum ɵDeferBlockState {
12349
12375
  /** The placeholder block content is rendered */
@@ -12828,6 +12854,11 @@ export declare interface ɵInternalEnvironmentProviders extends EnvironmentProvi
12828
12854
  ɵfromNgModule?: true;
12829
12855
  }
12830
12856
 
12857
+ export declare function ɵinternalProvideZoneChangeDetection({ ngZoneFactory, ignoreChangesOutsideZone, }: {
12858
+ ngZoneFactory?: () => NgZone;
12859
+ ignoreChangesOutsideZone?: boolean;
12860
+ }): StaticProvider[];
12861
+
12831
12862
  /**
12832
12863
  * Internal token that specifies whether DOM reuse logic
12833
12864
  * during hydration is enabled.
@@ -13504,6 +13535,7 @@ export declare const enum ɵRuntimeErrorCode {
13504
13535
  ASYNC_INITIALIZERS_STILL_RUNNING = 405,
13505
13536
  APPLICATION_REF_ALREADY_DESTROYED = 406,
13506
13537
  RENDERER_NOT_FOUND = 407,
13538
+ PROVIDED_BOTH_ZONE_AND_ZONELESS = 408,
13507
13539
  HYDRATION_NODE_MISMATCH = -500,
13508
13540
  HYDRATION_MISSING_SIBLINGS = -501,
13509
13541
  HYDRATION_MISSING_NODE = -502,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "18.0.0-rc.0",
3
+ "version": "18.0.0-rc.2",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v18.0.0-rc.0
2
+ * @license Angular v18.0.0-rc.2
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
 
8
- declare namespace a11yClickLib {
8
+ declare namespace a11yClick {
9
9
  export {
10
10
  updateEventInfoForA11yClick,
11
11
  preventDefaultForA11yClick,
@@ -24,18 +24,66 @@ declare interface ActionInfo {
24
24
 
25
25
  declare type ActionInfoInternal = [name: string, element: Element];
26
26
 
27
+ /** Resolves actions for Events. */
28
+ declare class ActionResolver {
29
+ private a11yClickSupport;
30
+ private readonly syntheticMouseEventSupport;
31
+ private updateEventInfoForA11yClick?;
32
+ private preventDefaultForA11yClick?;
33
+ private populateClickOnlyAction?;
34
+ constructor({ syntheticMouseEventSupport, }?: {
35
+ syntheticMouseEventSupport?: boolean;
36
+ });
37
+ resolve(eventInfo: eventInfoLib.EventInfo): void;
38
+ /**
39
+ * Searches for a jsaction that the DOM event maps to and creates an
40
+ * object containing event information used for dispatching by
41
+ * jsaction.Dispatcher. This method populates the `action` and `actionElement`
42
+ * fields of the EventInfo object passed in by finding the first
43
+ * jsaction attribute above the target Node of the event, and below
44
+ * the container Node, that specifies a jsaction for the event
45
+ * type. If no such jsaction is found, then action is undefined.
46
+ *
47
+ * @param eventInfo `EventInfo` to set `action` and `actionElement` if an
48
+ * action is found on any `Element` in the path of the `Event`.
49
+ */
50
+ private populateAction;
51
+ /**
52
+ * Accesses the jsaction map on a node and retrieves the name of the
53
+ * action the given event is mapped to, if any. It parses the
54
+ * attribute value and stores it in a property on the node for
55
+ * subsequent retrieval without re-parsing and re-accessing the
56
+ * attribute.
57
+ *
58
+ * @param actionElement The DOM node to retrieve the jsaction map from.
59
+ * @param eventInfo `EventInfo` to set `action` and `actionElement` if an
60
+ * action is found on the `actionElement`.
61
+ */
62
+ private populateActionOnElement;
63
+ /**
64
+ * Parses and caches an element's jsaction element into a map.
65
+ *
66
+ * This is primarily for internal use.
67
+ *
68
+ * @param actionElement The DOM node to retrieve the jsaction map from.
69
+ * @return Map from event to qualified name of the jsaction bound to it.
70
+ */
71
+ private parseActions;
72
+ addA11yClickSupport(updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction): void;
73
+ }
74
+
27
75
  /**
28
76
  * Provides a factory function for bootstrapping an event contract on a
29
- * window object.
30
- * @param field The property on the window that the event contract will be placed on.
77
+ * specified object (by default, exposed on the `window`).
78
+ * @param field The property on the object that the event contract will be placed on.
31
79
  * @param container The container that listens to events
32
80
  * @param appId A given identifier for an application. If there are multiple apps on the page
33
81
  * then this is how contracts can be initialized for each one.
34
- * @param events An array of event names that should be listened to.
35
- * @param anyWindow The global window object that should receive the event contract.
36
- * @returns The `event` contract. This is both assigned to `anyWindow` and returned for testing.
82
+ * @param eventTypes An array of event names that should be listened to.
83
+ * @param captureEventTypes An array of event names that should be listened to with capture.
84
+ * @param earlyJsactionTracker The object that should receive the event contract.
37
85
  */
38
- export declare function bootstrapEventContract(field: string, container: Element, appId: string, events: string[], anyWindow?: any): EventContract;
86
+ export declare function bootstrapEarlyEventContract(field: string, container: HTMLElement, appId: string, eventTypes?: string[], captureEventTypes?: string[], earlyJsactionTracker?: EventContractTracker<EarlyJsactionDataContainer>): void;
39
87
 
40
88
  /** Clones an `EventInfo` */
41
89
  declare function cloneEventInfo(eventInfo: EventInfo): EventInfo;
@@ -71,30 +119,23 @@ declare function createEventInfoFromParameters(eventType: string, event: Event,
71
119
  * jsaction.
72
120
  */
73
121
  export declare class Dispatcher {
74
- private readonly getHandler?;
75
- private readonly baseDispatcher;
76
- /** Whether to stop propagation for an `EventInfo`. */
77
- private readonly stopPropagation;
78
- /**
79
- * The actions that are registered for this Dispatcher instance.
80
- * This should be the primary one used once migration off of registerHandlers
81
- * is done.
82
- */
83
- private readonly actions;
84
- /** A map of global event handlers, where each key is an event type. */
85
- private readonly globalHandlers;
86
- /** The event replayer. */
122
+ private readonly dispatchDelegate;
123
+ private actionResolver?;
124
+ /** The replayer function to be called when there are queued events. */
87
125
  private eventReplayer?;
88
- /**
89
- * Receives a DOM event, determines the jsaction associated with the source
90
- * element of the DOM event, and invokes the handler associated with the
91
- * jsaction.
92
- *
93
- * @param getHandler A function that knows how to get the handler for a
94
- * given event info.
95
- */
96
- constructor(getHandler?: ((eventInfoWrapper: EventInfoWrapper) => EventInfoWrapperHandler | void) | undefined, { stopPropagation, eventReplayer, }?: {
97
- stopPropagation?: boolean;
126
+ /** Whether the event replay is scheduled. */
127
+ private eventReplayScheduled;
128
+ /** The queue of events. */
129
+ private readonly replayEventInfoWrappers;
130
+ /**
131
+ * Options are:
132
+ * 1. `eventReplayer`: When the event contract dispatches replay events
133
+ * to the Dispatcher, the Dispatcher collects them and in the next tick
134
+ * dispatches them to the `eventReplayer`.
135
+ * @param dispatchDelegate A function that should handle dispatching an `EventInfoWrapper` to handlers.
136
+ */
137
+ constructor(dispatchDelegate: (eventInfoWrapper: EventInfoWrapper) => void, { actionResolver, eventReplayer, }?: {
138
+ actionResolver?: ActionResolver;
98
139
  eventReplayer?: Replayer;
99
140
  });
100
141
  /**
@@ -116,92 +157,39 @@ export declare class Dispatcher {
116
157
  *
117
158
  * @param eventInfo The info for the event that triggered this call or the
118
159
  * queue of events from EventContract.
119
- * @param isGlobalDispatch If true, dispatches a global event instead of a
120
- * regular jsaction handler.
121
- */
122
- dispatch(eventInfo: EventInfo, isGlobalDispatch?: boolean): void;
123
- /**
124
- * Dispatches an `EventInfoWrapper`.
125
- */
126
- private dispatchToHandler;
127
- /**
128
- * Registers multiple methods all bound to the same object
129
- * instance. This is a common case: an application module binds
130
- * multiple of its methods under public names to the event contract of
131
- * the application. So we provide a shortcut for it.
132
- * Attempts to replay the queued events after registering the handlers.
133
- *
134
- * @param namespace The namespace of the jsaction name.
135
- *
136
- * @param instance The object to bind the methods to. If this is null, then
137
- * the functions are not bound, but directly added under the public names.
138
- *
139
- * @param methods A map from public name to functions that will be bound to
140
- * instance and registered as action under the public name. I.e. the
141
- * property names are the public names. The property values are the
142
- * methods of instance.
143
160
  */
144
- registerEventInfoHandlers<T>(namespace: string, instance: T | null, methods: {
145
- [key: string]: EventInfoWrapperHandler;
146
- }): void;
161
+ dispatch(eventInfo: EventInfo): void;
147
162
  /**
148
- * Unregisters an action. Provided as an easy way to reverse the effects of
149
- * registerHandlers.
150
- * @param namespace The namespace of the jsaction name.
151
- * @param name The action name to unbind.
163
+ * Schedules an `EventInfoWrapper` for replay. The replaying will happen in its own
164
+ * stack once the current flow cedes control. This is done to mimic
165
+ * browser event handling.
152
166
  */
153
- unregisterHandler(namespace: string, name: string): void;
154
- /** Registers a global event handler. */
155
- registerGlobalHandler(eventType: string, handler: GlobalHandler): void;
156
- /** Unregisters a global event handler. */
157
- unregisterGlobalHandler(eventType: string, handler: GlobalHandler): void;
158
- /**
159
- * Checks whether there is an action registered under the given
160
- * name. This returns true if there is a namespace handler, even
161
- * if it can not yet handle the event.
162
- *
163
- * @param name Action name.
164
- * @return Whether the name is registered.
165
- * @see #canDispatch
166
- */
167
- hasAction(name: string): boolean;
168
- /**
169
- * Whether this dispatcher can dispatch the event. This can be used by
170
- * event replayer to check whether the dispatcher can replay an event.
171
- */
172
- canDispatch(eventInfoWrapper: EventInfoWrapper): boolean;
173
- /**
174
- * Sets the event replayer, enabling queued events to be replayed when actions
175
- * are bound. To replay events, you must register the dispatcher to the
176
- * contract after setting the `EventReplayer`. The event replayer takes as
177
- * parameters the queue of events and the dispatcher (used to check whether
178
- * actions have handlers registered and can be replayed). The event replayer
179
- * is also responsible for dequeuing events.
180
- *
181
- * Example: An event replayer that replays only the last event.
182
- *
183
- * const dispatcher = new Dispatcher();
184
- * // ...
185
- * dispatcher.setEventReplayer((queue, dispatcher) => {
186
- * const lastEventInfoWrapper = queue[queue.length -1];
187
- * if (dispatcher.canDispatch(lastEventInfoWrapper.getAction())) {
188
- * jsaction.replay.replayEvent(
189
- * lastEventInfoWrapper.getEvent(),
190
- * lastEventInfoWrapper.getTargetElement(),
191
- * lastEventInfoWrapper.getEventType(),
192
- * );
193
- * queue.length = 0;
194
- * }
195
- * });
196
- *
197
- * @param eventReplayer It allows elements to be replayed and dequeuing.
198
- */
199
- setEventReplayer(eventReplayer: Replayer): void;
167
+ private scheduleEventInfoWrapperReplay;
200
168
  }
201
169
 
202
170
  /** A function that is called to handle events captured by the EventContract. */
203
171
  declare type Dispatcher_2 = (eventInfo: eventInfoLib.EventInfo, globalDispatch?: boolean) => void;
204
172
 
173
+ /**
174
+ * Defines the early jsaction data types.
175
+ */
176
+ declare interface EarlyJsactionData {
177
+ /** List used to keep track of the early JSAction event types. */
178
+ et: string[];
179
+ /** List used to keep track of capture event types. */
180
+ etc: string[];
181
+ /** List used to keep track of the JSAction events if using earlyeventcontract. */
182
+ q: EventInfo[];
183
+ /** Early Jsaction handler. */
184
+ h: (event: Event) => void;
185
+ /** Container for listening to events. */
186
+ c: HTMLElement;
187
+ }
188
+
189
+ export declare interface EarlyJsactionDataContainer {
190
+ _ejsa?: EarlyJsactionData;
191
+ }
192
+
205
193
  /**
206
194
  * EventContract intercepts events in the bubbling phase at the
207
195
  * boundary of a container element, and maps them to generic actions
@@ -217,12 +205,11 @@ declare type Dispatcher_2 = (eventInfo: eventInfoLib.EventInfo, globalDispatch?:
217
205
  * be delay loaded in a generic way.
218
206
  */
219
207
  export declare class EventContract implements UnrenamedEventContract {
220
- static CUSTOM_EVENT_SUPPORT: boolean;
221
- static STOP_PROPAGATION: boolean;
208
+ private readonly useActionResolver;
222
209
  static A11Y_CLICK_SUPPORT: boolean;
223
210
  static MOUSE_SPECIAL_SUPPORT: boolean;
224
- static JSNAMESPACE_SUPPORT: boolean;
225
211
  private containerManager;
212
+ private readonly actionResolver?;
226
213
  /**
227
214
  * The DOM events which this contract covers. Used to prevent double
228
215
  * registration of event types. The value of the map is the
@@ -245,48 +232,15 @@ export declare class EventContract implements UnrenamedEventContract {
245
232
  * as soon as the `Dispatcher` is registered.
246
233
  */
247
234
  private queuedEventInfos;
248
- /** Whether a11y click support has been loaded or not. */
249
- private hasA11yClickSupport;
250
235
  /** Whether to add an a11y click listener. */
251
236
  private addA11yClickListener;
252
- private updateEventInfoForA11yClick?;
253
- private preventDefaultForA11yClick?;
254
- private populateClickOnlyAction?;
255
- ecaacs?: (updateEventInfoForA11yClick: typeof a11yClickLib.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClickLib.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClickLib.populateClickOnlyAction) => void;
256
- constructor(containerManager: EventContractContainerManager);
237
+ ecaacs?: (updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction) => void;
238
+ constructor(containerManager: EventContractContainerManager, useActionResolver?: boolean);
257
239
  private handleEvent;
258
240
  /**
259
241
  * Handle an `EventInfo`.
260
242
  */
261
243
  private handleEventInfo;
262
- /**
263
- * Searches for a jsaction that the DOM event maps to and creates an
264
- * object containing event information used for dispatching by
265
- * jsaction.Dispatcher. This method populates the `action` and `actionElement`
266
- * fields of the EventInfo object passed in by finding the first
267
- * jsaction attribute above the target Node of the event, and below
268
- * the container Node, that specifies a jsaction for the event
269
- * type. If no such jsaction is found, then action is undefined.
270
- *
271
- * @param eventInfo `EventInfo` to set `action` and `actionElement` if an
272
- * action is found on any `Element` in the path of the `Event`.
273
- */
274
- private populateAction;
275
- /**
276
- * Accesses the jsaction map on a node and retrieves the name of the
277
- * action the given event is mapped to, if any. It parses the
278
- * attribute value and stores it in a property on the node for
279
- * subsequent retrieval without re-parsing and re-accessing the
280
- * attribute. In order to fully qualify jsaction names using a
281
- * namespace, the DOM is searched starting at the current node and
282
- * going through ancestor nodes until a jsnamespace attribute is
283
- * found.
284
- *
285
- * @param actionElement The DOM node to retrieve the jsaction map from.
286
- * @param eventInfo `EventInfo` to set `action` and `actionElement` if an
287
- * action is found on the `actionElement`.
288
- */
289
- private populateActionOnElement;
290
244
  /**
291
245
  * Enables jsaction handlers to be called for the event type given by
292
246
  * name.
@@ -306,7 +260,7 @@ export declare class EventContract implements UnrenamedEventContract {
306
260
  * in the provided event contract. Once all the events are replayed, it cleans
307
261
  * up the early contract.
308
262
  */
309
- replayEarlyEvents(): void;
263
+ replayEarlyEvents(earlyJsactionContainer?: EarlyJsactionDataContainer): void;
310
264
  /**
311
265
  * Returns all JSAction event types that have been registered for a given
312
266
  * browser event type.
@@ -393,6 +347,12 @@ declare interface EventContractContainerManager {
393
347
  cleanUp(): void;
394
348
  }
395
349
 
350
+ export declare type EventContractTracker<T> = {
351
+ [key: string]: {
352
+ [appId: string]: T;
353
+ };
354
+ };
355
+
396
356
  /**
397
357
  * A function that handles an event dispatched from the browser.
398
358
  *
@@ -503,11 +463,6 @@ export declare class EventInfoWrapper {
503
463
  clone(): EventInfoWrapper;
504
464
  }
505
465
 
506
- /**
507
- * A handler is dispatched to during normal handling.
508
- */
509
- declare type EventInfoWrapperHandler = (eventInfoWrapper: EventInfoWrapper) => void;
510
-
511
466
  /** Added for readability when accessing stable property names. */
512
467
  declare function getA11yClickKey(eventInfo: EventInfo): boolean | undefined;
513
468
 
@@ -538,12 +493,6 @@ declare function getTargetElement(eventInfo: EventInfo): Element;
538
493
  /** Added for readability when accessing stable property names. */
539
494
  declare function getTimestamp(eventInfo: EventInfo): number;
540
495
 
541
- /**
542
- * A global handler is dispatched to before normal handler dispatch. Returning
543
- * false will `preventDefault` on the event.
544
- */
545
- declare type GlobalHandler = (event: Event) => boolean | void;
546
-
547
496
  /**
548
497
  * Sets the `action` to `clickonly` for a click event that is not an a11y click
549
498
  * and if there is not already a click action.
@@ -568,14 +517,14 @@ export declare function registerDispatcher(eventContract: UnrenamedEventContract
568
517
  * A replayer is a function that is called when there are queued events,
569
518
  * either from the `EventContract` or when there are no detected handlers.
570
519
  */
571
- declare type Replayer = (eventInfoWrappers: EventInfoWrapper[], dispatcher: Dispatcher) => void;
520
+ declare type Replayer = (eventInfoWrappers: EventInfoWrapper[]) => void;
572
521
 
573
522
 
574
523
  /**
575
524
  * @fileoverview An enum to control who can call certain jsaction APIs.
576
525
  */
577
526
  declare enum Restriction {
578
- I_AM_THE_JSACTION_FRAMEWORK = 1
527
+ I_AM_THE_JSACTION_FRAMEWORK = 0
579
528
  }
580
529
 
581
530
  /** Added for readability when accessing stable property names. */
@@ -607,7 +556,7 @@ declare function setTimestamp(eventInfo: EventInfo, timestamp: number): void;
607
556
  */
608
557
  declare interface UnrenamedEventContract {
609
558
  ecrd(dispatcher: Dispatcher_2, restriction: Restriction): void;
610
- ecaacs?: (updateEventInfoForA11yClick: typeof a11yClickLib.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClickLib.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClickLib.populateClickOnlyAction) => void;
559
+ ecaacs?: (updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction) => void;
611
560
  }
612
561
 
613
562
  /** Added for readability when accessing stable property names. */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-rc.0
2
+ * @license Angular v18.0.0-rc.2
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-rc.0
2
+ * @license Angular v18.0.0-rc.2
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */