@angular/core 18.2.0-next.0 → 18.2.0-next.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/event-dispatch/contract_binary.mjs +3 -3
- package/esm2022/primitives/event-dispatch/index.mjs +6 -7
- package/esm2022/primitives/event-dispatch/src/a11y_click.mjs +1 -1
- package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +1 -1
- package/esm2022/primitives/event-dispatch/src/bootstrap_app_scoped.mjs +29 -0
- package/esm2022/primitives/event-dispatch/src/bootstrap_global.mjs +21 -0
- package/esm2022/primitives/event-dispatch/src/cache.mjs +10 -21
- package/esm2022/primitives/event-dispatch/src/earlyeventcontract.mjs +32 -21
- package/esm2022/primitives/event-dispatch/src/event.mjs +3 -3
- package/esm2022/primitives/event-dispatch/src/event_contract_defines.mjs +1 -6
- package/esm2022/primitives/event-dispatch/src/event_type.mjs +19 -21
- package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +6 -8
- package/esm2022/primitives/event-dispatch/src/property.mjs +1 -1
- package/esm2022/src/event_delegation_utils.mjs +10 -10
- package/esm2022/src/hydration/event_replay.mjs +17 -22
- package/esm2022/src/render3/after_render_hooks.mjs +7 -2
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/event-dispatch-contract.min.js +1 -1
- package/fesm2022/core.mjs +33 -33
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +452 -529
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +4 -4
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +23 -37
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +40 -31
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
- package/schematics/ng-generate/control-flow-migration/bundle.js +47 -31
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +611 -65
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/primitives/event-dispatch/src/register_events.mjs +0 -31
package/fesm2022/testing.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.2.0-next.
|
|
2
|
+
* @license Angular v18.2.0-next.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4518,9 +4518,9 @@ declare const GLOBAL_PUBLISH_EXPANDO_KEY = "ng";
|
|
|
4518
4518
|
declare class GlobalEventDelegation implements OnDestroy {
|
|
4519
4519
|
private eventContractDetails;
|
|
4520
4520
|
ngOnDestroy(): void;
|
|
4521
|
-
supports(
|
|
4522
|
-
addEventListener(element: HTMLElement,
|
|
4523
|
-
removeEventListener(element: HTMLElement,
|
|
4521
|
+
supports(eventType: string): boolean;
|
|
4522
|
+
addEventListener(element: HTMLElement, eventType: string, handler: Function): Function;
|
|
4523
|
+
removeEventListener(element: HTMLElement, eventType: string, callback: Function): void;
|
|
4524
4524
|
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalEventDelegation, never>;
|
|
4525
4525
|
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalEventDelegation>;
|
|
4526
4526
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.2.0-next.
|
|
2
|
+
* @license Angular v18.2.0-next.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -33,19 +33,6 @@ export declare const Attribute: {
|
|
|
33
33
|
JSACTION: "jsaction";
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* Provides a factory function for bootstrapping an event contract on a
|
|
38
|
-
* specified object (by default, exposed on the `window`).
|
|
39
|
-
* @param field The property on the object that the event contract will be placed on.
|
|
40
|
-
* @param container The container that listens to events
|
|
41
|
-
* @param appId A given identifier for an application. If there are multiple apps on the page
|
|
42
|
-
* then this is how contracts can be initialized for each one.
|
|
43
|
-
* @param eventTypes An array of event names that should be listened to.
|
|
44
|
-
* @param captureEventTypes An array of event names that should be listened to with capture.
|
|
45
|
-
* @param earlyJsactionTracker The object that should receive the event contract.
|
|
46
|
-
*/
|
|
47
|
-
export declare function bootstrapEarlyEventContract(field: string, container: HTMLElement, appId: string, eventTypes?: string[], captureEventTypes?: string[], earlyJsactionTracker?: EventContractTracker<EarlyJsactionDataContainer>): void;
|
|
48
|
-
|
|
49
36
|
/** Clones an `EventInfo` */
|
|
50
37
|
declare function cloneEventInfo(eventInfo: EventInfo): EventInfo;
|
|
51
38
|
|
|
@@ -83,18 +70,23 @@ declare type Dispatcher = (eventInfo: eventInfoLib.EventInfo, globalDispatch?: b
|
|
|
83
70
|
declare interface EarlyJsactionData {
|
|
84
71
|
/** List used to keep track of the early JSAction event types. */
|
|
85
72
|
et: string[];
|
|
86
|
-
/** List used to keep track of capture event types. */
|
|
73
|
+
/** List used to keep track of the early JSAction capture event types. */
|
|
87
74
|
etc: string[];
|
|
88
|
-
/**
|
|
89
|
-
q: EventInfo[];
|
|
90
|
-
/** Early Jsaction handler. */
|
|
75
|
+
/** Early JSAction handler for all events. */
|
|
91
76
|
h: (event: Event) => void;
|
|
77
|
+
/** Dispatcher handler. Initializes to populating `q`. */
|
|
78
|
+
d: (eventInfo: EventInfo) => void;
|
|
79
|
+
/** List used to push `EventInfo` objects if the dispatcher is not registered. */
|
|
80
|
+
q: EventInfo[];
|
|
92
81
|
/** Container for listening to events. */
|
|
93
82
|
c: HTMLElement;
|
|
94
83
|
}
|
|
95
84
|
|
|
96
85
|
export declare interface EarlyJsactionDataContainer {
|
|
97
86
|
_ejsa?: EarlyJsactionData;
|
|
87
|
+
_ejsas?: {
|
|
88
|
+
[appId: string]: EarlyJsactionData | undefined;
|
|
89
|
+
};
|
|
98
90
|
}
|
|
99
91
|
|
|
100
92
|
/**
|
|
@@ -113,7 +105,6 @@ export declare interface EarlyJsactionDataContainer {
|
|
|
113
105
|
*/
|
|
114
106
|
export declare class EventContract implements UnrenamedEventContract {
|
|
115
107
|
private readonly useActionResolver?;
|
|
116
|
-
static A11Y_CLICK_SUPPORT: boolean;
|
|
117
108
|
static MOUSE_SPECIAL_SUPPORT: boolean;
|
|
118
109
|
private containerManager;
|
|
119
110
|
/**
|
|
@@ -163,7 +154,7 @@ export declare class EventContract implements UnrenamedEventContract {
|
|
|
163
154
|
* in the provided event contract. Once all the events are replayed, it cleans
|
|
164
155
|
* up the early contract.
|
|
165
156
|
*/
|
|
166
|
-
replayEarlyEvents(
|
|
157
|
+
replayEarlyEvents(earlyJsactionData?: EarlyJsactionData | undefined): void;
|
|
167
158
|
/**
|
|
168
159
|
* Returns all JSAction event types that have been registered for a given
|
|
169
160
|
* browser event type.
|
|
@@ -246,12 +237,6 @@ declare interface EventContractContainerManager {
|
|
|
246
237
|
cleanUp(): void;
|
|
247
238
|
}
|
|
248
239
|
|
|
249
|
-
export declare type EventContractTracker<T> = {
|
|
250
|
-
[key: string]: {
|
|
251
|
-
[appId: string]: T;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
|
|
255
240
|
/**
|
|
256
241
|
* A dispatcher that uses browser-based `Event` semantics, for example bubbling, `stopPropagation`,
|
|
257
242
|
* `currentTarget`, etc.
|
|
@@ -396,6 +381,14 @@ declare function getA11yClickKey(eventInfo: EventInfo): boolean | undefined;
|
|
|
396
381
|
/** Added for readability when accessing stable property names. */
|
|
397
382
|
declare function getAction(eventInfo: EventInfo): ActionInfoInternal | undefined;
|
|
398
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Reads the jsaction parser cache for the given DOM element. If no cache is yet present,
|
|
386
|
+
* creates an empty one.
|
|
387
|
+
*/
|
|
388
|
+
export declare function getActionCache(element: Element): {
|
|
389
|
+
[key: string]: string | undefined;
|
|
390
|
+
};
|
|
391
|
+
|
|
399
392
|
/** Added for readability when accessing stable property names. */
|
|
400
393
|
declare function getActionElement(actionInfo: ActionInfoInternal): Element;
|
|
401
394
|
|
|
@@ -424,18 +417,16 @@ declare function getTargetElement(eventInfo: EventInfo): Element;
|
|
|
424
417
|
declare function getTimestamp(eventInfo: EventInfo): number;
|
|
425
418
|
|
|
426
419
|
/**
|
|
427
|
-
*
|
|
428
|
-
* Decides whether or not an event type is an event that only has a capture phase.
|
|
429
|
-
*
|
|
420
|
+
* Whether or not an event type should be registered in the capture phase.
|
|
430
421
|
* @param eventType
|
|
431
422
|
* @returns bool
|
|
432
423
|
*/
|
|
433
|
-
export declare const
|
|
424
|
+
export declare const isCaptureEventType: (eventType: string) => boolean;
|
|
434
425
|
|
|
435
426
|
/**
|
|
436
|
-
*
|
|
427
|
+
* Whether or not an event type is registered in the early contract.
|
|
437
428
|
*/
|
|
438
|
-
export declare const
|
|
429
|
+
export declare const isEarlyEventType: (eventType: string) => boolean;
|
|
439
430
|
|
|
440
431
|
/**
|
|
441
432
|
* Registers deferred functionality for an EventContract and a Jsaction
|
|
@@ -444,9 +435,6 @@ export declare const isSupportedEvent: (eventType: string) => boolean;
|
|
|
444
435
|
export declare function registerDispatcher(eventContract: UnrenamedEventContract, dispatcher: EventDispatcher): void;
|
|
445
436
|
|
|
446
437
|
|
|
447
|
-
export declare function registerEventType(element: Element, eventType: string, action: string): void;
|
|
448
|
-
|
|
449
|
-
|
|
450
438
|
/**
|
|
451
439
|
* @fileoverview An enum to control who can call certain jsaction APIs.
|
|
452
440
|
*/
|
|
@@ -481,8 +469,6 @@ declare function setTargetElement(eventInfo: EventInfo, targetElement: Element):
|
|
|
481
469
|
/** Added for readability when accessing stable property names. */
|
|
482
470
|
declare function setTimestamp(eventInfo: EventInfo, timestamp: number): void;
|
|
483
471
|
|
|
484
|
-
export declare function unregisterEventType(element: Element, eventType: string): void;
|
|
485
|
-
|
|
486
472
|
/**
|
|
487
473
|
* The API of an EventContract that is safe to call from any compilation unit.
|
|
488
474
|
*/
|
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -14420,7 +14420,7 @@ var _Tokenizer = class {
|
|
|
14420
14420
|
const nameCursor = this._cursor.clone();
|
|
14421
14421
|
let allowDigit = false;
|
|
14422
14422
|
this._attemptCharCodeUntilFn((code) => {
|
|
14423
|
-
if (isAsciiLetter(code) || code
|
|
14423
|
+
if (isAsciiLetter(code) || code === $$ || code === $_ || allowDigit && isDigit(code)) {
|
|
14424
14424
|
allowDigit = true;
|
|
14425
14425
|
return false;
|
|
14426
14426
|
}
|
|
@@ -23078,6 +23078,7 @@ function convertQueryPredicate(predicate) {
|
|
|
23078
23078
|
return Array.isArray(predicate) ? predicate : createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1);
|
|
23079
23079
|
}
|
|
23080
23080
|
function convertDirectiveFacadeToMetadata(facade) {
|
|
23081
|
+
var _a2;
|
|
23081
23082
|
const inputsFromMetadata = parseInputsArray(facade.inputs || []);
|
|
23082
23083
|
const outputsFromMetadata = parseMappingStringArray(facade.outputs || []);
|
|
23083
23084
|
const propMetadata = facade.propMetadata;
|
|
@@ -23100,6 +23101,19 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
23100
23101
|
});
|
|
23101
23102
|
}
|
|
23102
23103
|
}
|
|
23104
|
+
const hostDirectives = ((_a2 = facade.hostDirectives) == null ? void 0 : _a2.length) ? facade.hostDirectives.map((hostDirective) => {
|
|
23105
|
+
return typeof hostDirective === "function" ? {
|
|
23106
|
+
directive: wrapReference(hostDirective),
|
|
23107
|
+
inputs: null,
|
|
23108
|
+
outputs: null,
|
|
23109
|
+
isForwardReference: false
|
|
23110
|
+
} : {
|
|
23111
|
+
directive: wrapReference(hostDirective.directive),
|
|
23112
|
+
isForwardReference: false,
|
|
23113
|
+
inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,
|
|
23114
|
+
outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null
|
|
23115
|
+
};
|
|
23116
|
+
}) : null;
|
|
23103
23117
|
return __spreadProps(__spreadValues({}, facade), {
|
|
23104
23118
|
typeArgumentCount: 0,
|
|
23105
23119
|
typeSourceSpan: facade.typeSourceSpan,
|
|
@@ -23112,31 +23126,37 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
23112
23126
|
providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
|
|
23113
23127
|
viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),
|
|
23114
23128
|
fullInheritance: false,
|
|
23115
|
-
hostDirectives
|
|
23129
|
+
hostDirectives
|
|
23116
23130
|
});
|
|
23117
23131
|
}
|
|
23118
23132
|
function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
23119
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i;
|
|
23133
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j;
|
|
23134
|
+
const hostDirectives = ((_a2 = declaration.hostDirectives) == null ? void 0 : _a2.length) ? declaration.hostDirectives.map((dir) => ({
|
|
23135
|
+
directive: wrapReference(dir.directive),
|
|
23136
|
+
isForwardReference: false,
|
|
23137
|
+
inputs: dir.inputs ? getHostDirectiveBindingMapping(dir.inputs) : null,
|
|
23138
|
+
outputs: dir.outputs ? getHostDirectiveBindingMapping(dir.outputs) : null
|
|
23139
|
+
})) : null;
|
|
23120
23140
|
return {
|
|
23121
23141
|
name: declaration.type.name,
|
|
23122
23142
|
type: wrapReference(declaration.type),
|
|
23123
23143
|
typeSourceSpan,
|
|
23124
|
-
selector: (
|
|
23144
|
+
selector: (_b2 = declaration.selector) != null ? _b2 : null,
|
|
23125
23145
|
inputs: declaration.inputs ? inputsPartialMetadataToInputMetadata(declaration.inputs) : {},
|
|
23126
|
-
outputs: (
|
|
23146
|
+
outputs: (_c2 = declaration.outputs) != null ? _c2 : {},
|
|
23127
23147
|
host: convertHostDeclarationToMetadata(declaration.host),
|
|
23128
|
-
queries: ((
|
|
23129
|
-
viewQueries: ((
|
|
23148
|
+
queries: ((_d2 = declaration.queries) != null ? _d2 : []).map(convertQueryDeclarationToMetadata),
|
|
23149
|
+
viewQueries: ((_e2 = declaration.viewQueries) != null ? _e2 : []).map(convertQueryDeclarationToMetadata),
|
|
23130
23150
|
providers: declaration.providers !== void 0 ? new WrappedNodeExpr(declaration.providers) : null,
|
|
23131
|
-
exportAs: (
|
|
23132
|
-
usesInheritance: (
|
|
23133
|
-
lifecycle: { usesOnChanges: (
|
|
23151
|
+
exportAs: (_f2 = declaration.exportAs) != null ? _f2 : null,
|
|
23152
|
+
usesInheritance: (_g2 = declaration.usesInheritance) != null ? _g2 : false,
|
|
23153
|
+
lifecycle: { usesOnChanges: (_h2 = declaration.usesOnChanges) != null ? _h2 : false },
|
|
23134
23154
|
deps: null,
|
|
23135
23155
|
typeArgumentCount: 0,
|
|
23136
23156
|
fullInheritance: false,
|
|
23137
|
-
isStandalone: (
|
|
23138
|
-
isSignal: (
|
|
23139
|
-
hostDirectives
|
|
23157
|
+
isStandalone: (_i = declaration.isStandalone) != null ? _i : false,
|
|
23158
|
+
isSignal: (_j = declaration.isSignal) != null ? _j : false,
|
|
23159
|
+
hostDirectives
|
|
23140
23160
|
};
|
|
23141
23161
|
}
|
|
23142
23162
|
function convertHostDeclarationToMetadata(host = {}) {
|
|
@@ -23151,24 +23171,13 @@ function convertHostDeclarationToMetadata(host = {}) {
|
|
|
23151
23171
|
}
|
|
23152
23172
|
};
|
|
23153
23173
|
}
|
|
23154
|
-
function
|
|
23155
|
-
|
|
23156
|
-
|
|
23157
|
-
|
|
23158
|
-
|
|
23159
|
-
directive: wrapReference(hostDirective),
|
|
23160
|
-
inputs: null,
|
|
23161
|
-
outputs: null,
|
|
23162
|
-
isForwardReference: false
|
|
23163
|
-
} : {
|
|
23164
|
-
directive: wrapReference(hostDirective.directive),
|
|
23165
|
-
isForwardReference: false,
|
|
23166
|
-
inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,
|
|
23167
|
-
outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null
|
|
23168
|
-
};
|
|
23169
|
-
});
|
|
23174
|
+
function getHostDirectiveBindingMapping(array) {
|
|
23175
|
+
let result = null;
|
|
23176
|
+
for (let i = 1; i < array.length; i += 2) {
|
|
23177
|
+
result = result || {};
|
|
23178
|
+
result[array[i - 1]] = array[i];
|
|
23170
23179
|
}
|
|
23171
|
-
return
|
|
23180
|
+
return result;
|
|
23172
23181
|
}
|
|
23173
23182
|
function convertOpaqueValuesToExpressions(obj) {
|
|
23174
23183
|
const result = {};
|
|
@@ -23439,7 +23448,7 @@ function publishFacade(global) {
|
|
|
23439
23448
|
}
|
|
23440
23449
|
|
|
23441
23450
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23442
|
-
var VERSION2 = new Version("18.2.0-next.
|
|
23451
|
+
var VERSION2 = new Version("18.2.0-next.1");
|
|
23443
23452
|
|
|
23444
23453
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23445
23454
|
var _VisitorMode;
|