@angular/core 18.1.3 → 18.1.5

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 (52) hide show
  1. package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +6 -3
  2. package/esm2022/primitives/event-dispatch/src/event_dispatcher.mjs +8 -3
  3. package/esm2022/src/application/application_init.mjs +2 -2
  4. package/esm2022/src/application/application_module.mjs +2 -2
  5. package/esm2022/src/application/application_ref.mjs +2 -2
  6. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +3 -3
  7. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +2 -2
  8. package/esm2022/src/console.mjs +2 -2
  9. package/esm2022/src/event_delegation_utils.mjs +21 -9
  10. package/esm2022/src/event_dispatch/event_delegation.mjs +9 -2
  11. package/esm2022/src/hydration/annotate.mjs +1 -1
  12. package/esm2022/src/hydration/cleanup.mjs +8 -4
  13. package/esm2022/src/hydration/i18n.mjs +13 -5
  14. package/esm2022/src/hydration/skip_hydration.mjs +11 -1
  15. package/esm2022/src/image_performance_warning.mjs +2 -2
  16. package/esm2022/src/linker/compiler.mjs +2 -2
  17. package/esm2022/src/linker/view_container_ref.mjs +1 -1
  18. package/esm2022/src/platform/platform_ref.mjs +2 -2
  19. package/esm2022/src/render3/component_ref.mjs +1 -1
  20. package/esm2022/src/render3/i18n/i18n_parse.mjs +2 -1
  21. package/esm2022/src/render3/instructions/element_container.mjs +6 -3
  22. package/esm2022/src/render3/interfaces/i18n.mjs +1 -1
  23. package/esm2022/src/render3/interfaces/renderer.mjs +1 -1
  24. package/esm2022/src/render3/interfaces/renderer_dom.mjs +1 -1
  25. package/esm2022/src/render3/node_manipulation.mjs +2 -13
  26. package/esm2022/src/sanitization/html_sanitizer.mjs +2 -2
  27. package/esm2022/src/sanitization/inert_body.mjs +2 -2
  28. package/esm2022/src/testability/testability.mjs +3 -3
  29. package/esm2022/src/version.mjs +1 -1
  30. package/esm2022/testing/src/application_error_handler.mjs +3 -3
  31. package/esm2022/testing/src/logger.mjs +3 -3
  32. package/fesm2022/core.mjs +78 -45
  33. package/fesm2022/core.mjs.map +1 -1
  34. package/fesm2022/primitives/event-dispatch.mjs +13 -5
  35. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  36. package/fesm2022/primitives/signals.mjs +1 -1
  37. package/fesm2022/rxjs-interop.mjs +1 -1
  38. package/fesm2022/testing.mjs +4 -4
  39. package/index.d.ts +11 -9
  40. package/package.json +1 -1
  41. package/primitives/event-dispatch/index.d.ts +3 -2
  42. package/primitives/signals/index.d.ts +1 -1
  43. package/rxjs-interop/index.d.ts +1 -1
  44. package/schematics/migrations/after-render-phase/bundle.js +12 -12
  45. package/schematics/migrations/http-providers/bundle.js +15 -15
  46. package/schematics/migrations/invalid-two-way-bindings/bundle.js +164 -164
  47. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
  48. package/schematics/ng-generate/control-flow-migration/bundle.js +172 -172
  49. package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
  50. package/schematics/ng-generate/standalone-migration/bundle.js +459 -459
  51. package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
  52. package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.1.3
2
+ * @license Angular v18.1.5
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7855,6 +7855,16 @@ function isInSkipHydrationBlock(tNode) {
7855
7855
  }
7856
7856
  return false;
7857
7857
  }
7858
+ /**
7859
+ * Check if an i18n block is in a skip hydration section by looking at a parent TNode
7860
+ * to determine if this TNode is in a skip hydration section or the TNode has
7861
+ * the `ngSkipHydration` attribute.
7862
+ */
7863
+ function isI18nInSkipHydrationBlock(parentTNode) {
7864
+ return (hasInSkipHydrationBlockFlag(parentTNode) ||
7865
+ hasSkipHydrationAttrOnTNode(parentTNode) ||
7866
+ isInSkipHydrationBlock(parentTNode));
7867
+ }
7858
7868
 
7859
7869
  // Keeps track of the currently-active LViews.
7860
7870
  const TRACKED_LVIEWS = new Map();
@@ -9733,7 +9743,7 @@ class DOMParserHelper {
9733
9743
  // the `inertDocumentHelper` instead.
9734
9744
  return this.inertDocumentHelper.getInertBodyElement(html);
9735
9745
  }
9736
- body.removeChild(body.firstChild);
9746
+ body.firstChild?.remove();
9737
9747
  return body;
9738
9748
  }
9739
9749
  catch {
@@ -10076,7 +10086,7 @@ function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
10076
10086
  if (inertBodyElement) {
10077
10087
  const parent = getTemplateContent(inertBodyElement) || inertBodyElement;
10078
10088
  while (parent.firstChild) {
10079
- parent.removeChild(parent.firstChild);
10089
+ parent.firstChild.remove();
10080
10090
  }
10081
10091
  }
10082
10092
  }
@@ -11413,14 +11423,6 @@ function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove)
11413
11423
  nativeAppendChild(renderer, parent, child);
11414
11424
  }
11415
11425
  }
11416
- /** Removes a node from the DOM given its native parent. */
11417
- function nativeRemoveChild(renderer, parent, child, isHostElement) {
11418
- renderer.removeChild(parent, child, isHostElement);
11419
- }
11420
- /** Checks if an element is a `<template>` node. */
11421
- function isTemplateNode(node) {
11422
- return node.tagName === 'TEMPLATE' && node.content !== undefined;
11423
- }
11424
11426
  /**
11425
11427
  * Returns a native parent of a given native node.
11426
11428
  */
@@ -11598,10 +11600,7 @@ function getBeforeNodeForView(viewIndexInContainer, lContainer) {
11598
11600
  */
11599
11601
  function nativeRemoveNode(renderer, rNode, isHostElement) {
11600
11602
  ngDevMode && ngDevMode.rendererRemoveNode++;
11601
- const nativeParent = nativeParentNode(renderer, rNode);
11602
- if (nativeParent) {
11603
- nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);
11604
- }
11603
+ renderer.removeChild(null, rNode, isHostElement);
11605
11604
  }
11606
11605
  /**
11607
11606
  * Clears the contents of a given RElement.
@@ -15579,6 +15578,10 @@ function trySerializeI18nBlock(lView, index, context) {
15579
15578
  if (!tI18n || !tI18n.ast) {
15580
15579
  return null;
15581
15580
  }
15581
+ const parentTNode = tView.data[tI18n.parentTNodeIndex];
15582
+ if (parentTNode && isI18nInSkipHydrationBlock(parentTNode)) {
15583
+ return null;
15584
+ }
15582
15585
  const serializedI18nBlock = {
15583
15586
  caseQueue: [],
15584
15587
  disconnectedNodes: new Set(),
@@ -15727,13 +15730,16 @@ function forkHydrationState(state, nextNode) {
15727
15730
  return { currentNode: nextNode, isConnected: state.isConnected };
15728
15731
  }
15729
15732
  function prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex) {
15730
- if (!isI18nHydrationSupportEnabled()) {
15731
- return;
15732
- }
15733
15733
  const hydrationInfo = lView[HYDRATION];
15734
15734
  if (!hydrationInfo) {
15735
15735
  return;
15736
15736
  }
15737
+ if (!isI18nHydrationSupportEnabled() ||
15738
+ (parentTNode &&
15739
+ (isI18nInSkipHydrationBlock(parentTNode) ||
15740
+ isDisconnectedNode$1(hydrationInfo, parentTNode.index - HEADER_OFFSET)))) {
15741
+ return;
15742
+ }
15737
15743
  const tView = lView[TVIEW];
15738
15744
  const tI18n = tView.data[index];
15739
15745
  ngDevMode &&
@@ -15966,6 +15972,13 @@ function removeDehydratedView(dehydratedView, renderer) {
15966
15972
  */
15967
15973
  function cleanupLContainer(lContainer) {
15968
15974
  removeDehydratedViews(lContainer);
15975
+ // The host could be an LView if this container is on a component node.
15976
+ // In this case, descend into host LView for further cleanup. See also
15977
+ // LContainer[HOST] docs for additional information.
15978
+ const hostLView = lContainer[HOST];
15979
+ if (isLView(hostLView)) {
15980
+ cleanupLView(hostLView);
15981
+ }
15969
15982
  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
15970
15983
  cleanupLView(lContainer[i]);
15971
15984
  }
@@ -16003,9 +16016,6 @@ function cleanupDehydratedViews(appRef) {
16003
16016
  cleanupLView(lNode);
16004
16017
  }
16005
16018
  else {
16006
- // Cleanup in the root component view
16007
- const componentLView = lNode[HOST];
16008
- cleanupLView(componentLView);
16009
16019
  // Cleanup in all views within this view container
16010
16020
  cleanupLContainer(lNode);
16011
16021
  }
@@ -17218,7 +17228,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
17218
17228
  function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
17219
17229
  if (rootSelectorOrNode) {
17220
17230
  // The placeholder will be replaced with the actual version at build time.
17221
- setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.1.3']);
17231
+ setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.1.5']);
17222
17232
  }
17223
17233
  else {
17224
17234
  // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
@@ -24552,7 +24562,10 @@ let _locateOrCreateElementContainerNode = (tView, lView, tNode, index) => {
24552
24562
  function locateOrCreateElementContainerNode(tView, lView, tNode, index) {
24553
24563
  let comment;
24554
24564
  const hydrationInfo = lView[HYDRATION];
24555
- const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock$1() || isDetachedByI18n(tNode);
24565
+ const isNodeCreationMode = !hydrationInfo ||
24566
+ isInSkipHydrationBlock$1() ||
24567
+ isDisconnectedNode$1(hydrationInfo, index) ||
24568
+ isDetachedByI18n(tNode);
24556
24569
  lastNodeWasCreated(isNodeCreationMode);
24557
24570
  // Regular creation mode.
24558
24571
  if (isNodeCreationMode) {
@@ -25652,6 +25665,7 @@ function i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message
25652
25665
  create: createOpCodes,
25653
25666
  update: updateOpCodes,
25654
25667
  ast: astStack[0],
25668
+ parentTNodeIndex,
25655
25669
  };
25656
25670
  }
25657
25671
  /**
@@ -31014,7 +31028,7 @@ class Version {
31014
31028
  /**
31015
31029
  * @publicApi
31016
31030
  */
31017
- const VERSION = new Version('18.1.3');
31031
+ const VERSION = new Version('18.1.5');
31018
31032
 
31019
31033
  /*
31020
31034
  * This file exists to support compilation of @angular/core in Ivy mode.
@@ -31046,7 +31060,7 @@ class Console {
31046
31060
  // tslint:disable-next-line:no-console
31047
31061
  console.warn(message);
31048
31062
  }
31049
- static { this.ɵfac = function Console_Factory(ɵt) { return new (ɵt || Console)(); }; }
31063
+ static { this.ɵfac = function Console_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Console)(); }; }
31050
31064
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac, providedIn: 'platform' }); }
31051
31065
  }
31052
31066
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{
@@ -32110,7 +32124,7 @@ class Testability {
32110
32124
  // TODO(juliemr): implement.
32111
32125
  return [];
32112
32126
  }
32113
- static { this.ɵfac = function Testability_Factory(ɵt) { return new (ɵt || Testability)(ɵɵinject(NgZone), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER)); }; }
32127
+ static { this.ɵfac = function Testability_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Testability)(ɵɵinject(NgZone), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER)); }; }
32114
32128
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac }); }
32115
32129
  }
32116
32130
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Testability, [{
@@ -32177,7 +32191,7 @@ class TestabilityRegistry {
32177
32191
  findTestabilityInTree(elem, findInAncestors = true) {
32178
32192
  return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;
32179
32193
  }
32180
- static { this.ɵfac = function TestabilityRegistry_Factory(ɵt) { return new (ɵt || TestabilityRegistry)(); }; }
32194
+ static { this.ɵfac = function TestabilityRegistry_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TestabilityRegistry)(); }; }
32181
32195
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac, providedIn: 'platform' }); }
32182
32196
  }
32183
32197
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{
@@ -32384,7 +32398,7 @@ class ApplicationInitStatus {
32384
32398
  }
32385
32399
  this.initialized = true;
32386
32400
  }
32387
- static { this.ɵfac = function ApplicationInitStatus_Factory(ɵt) { return new (ɵt || ApplicationInitStatus)(); }; }
32401
+ static { this.ɵfac = function ApplicationInitStatus_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationInitStatus)(); }; }
32388
32402
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' }); }
32389
32403
  }
32390
32404
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
@@ -32854,7 +32868,7 @@ class ApplicationRef {
32854
32868
  console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));
32855
32869
  }
32856
32870
  }
32857
- static { this.ɵfac = function ApplicationRef_Factory(ɵt) { return new (ɵt || ApplicationRef)(); }; }
32871
+ static { this.ɵfac = function ApplicationRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationRef)(); }; }
32858
32872
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' }); }
32859
32873
  }
32860
32874
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
@@ -32975,7 +32989,7 @@ class Compiler {
32975
32989
  getModuleId(moduleType) {
32976
32990
  return undefined;
32977
32991
  }
32978
- static { this.ɵfac = function Compiler_Factory(ɵt) { return new (ɵt || Compiler)(); }; }
32992
+ static { this.ɵfac = function Compiler_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Compiler)(); }; }
32979
32993
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' }); }
32980
32994
  }
32981
32995
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
@@ -33072,7 +33086,7 @@ class NgZoneChangeDetectionScheduler {
33072
33086
  ngOnDestroy() {
33073
33087
  this._onMicrotaskEmptySubscription?.unsubscribe();
33074
33088
  }
33075
- static { this.ɵfac = function NgZoneChangeDetectionScheduler_Factory(ɵt) { return new (ɵt || NgZoneChangeDetectionScheduler)(); }; }
33089
+ static { this.ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)(); }; }
33076
33090
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: NgZoneChangeDetectionScheduler, factory: NgZoneChangeDetectionScheduler.ɵfac, providedIn: 'root' }); }
33077
33091
  }
33078
33092
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
@@ -33205,7 +33219,7 @@ class ZoneStablePendingTask {
33205
33219
  ngOnDestroy() {
33206
33220
  this.subscription.unsubscribe();
33207
33221
  }
33208
- static { this.ɵfac = function ZoneStablePendingTask_Factory(ɵt) { return new (ɵt || ZoneStablePendingTask)(); }; }
33222
+ static { this.ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ZoneStablePendingTask)(); }; }
33209
33223
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ZoneStablePendingTask, factory: ZoneStablePendingTask.ɵfac, providedIn: 'root' }); }
33210
33224
  }
33211
33225
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
@@ -33409,7 +33423,7 @@ class ChangeDetectionSchedulerImpl {
33409
33423
  this.taskService.remove(taskId);
33410
33424
  }
33411
33425
  }
33412
- static { this.ɵfac = function ChangeDetectionSchedulerImpl_Factory(ɵt) { return new (ɵt || ChangeDetectionSchedulerImpl)(); }; }
33426
+ static { this.ɵfac = function ChangeDetectionSchedulerImpl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ChangeDetectionSchedulerImpl)(); }; }
33413
33427
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ChangeDetectionSchedulerImpl, factory: ChangeDetectionSchedulerImpl.ɵfac, providedIn: 'root' }); }
33414
33428
  }
33415
33429
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ChangeDetectionSchedulerImpl, [{
@@ -33808,7 +33822,7 @@ class PlatformRef {
33808
33822
  get destroyed() {
33809
33823
  return this._destroyed;
33810
33824
  }
33811
- static { this.ɵfac = function PlatformRef_Factory(ɵt) { return new (ɵt || PlatformRef)(ɵɵinject(Injector)); }; }
33825
+ static { this.ɵfac = function PlatformRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PlatformRef)(ɵɵinject(Injector)); }; }
33812
33826
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' }); }
33813
33827
  }
33814
33828
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
@@ -35930,7 +35944,7 @@ const platformCore = createPlatformFactory(null, 'core', []);
35930
35944
  class ApplicationModule {
35931
35945
  // Inject ApplicationRef to make it eager...
35932
35946
  constructor(appRef) { }
35933
- static { this.ɵfac = function ApplicationModule_Factory(ɵt) { return new (ɵt || ApplicationModule)(ɵɵinject(ApplicationRef)); }; }
35947
+ static { this.ɵfac = function ApplicationModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationModule)(ɵɵinject(ApplicationRef)); }; }
35934
35948
  static { this.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule }); }
35935
35949
  static { this.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({}); }
35936
35950
  }
@@ -36630,7 +36644,7 @@ class ImagePerformanceWarning {
36630
36644
  const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
36631
36645
  return oversizedWidth || oversizedHeight;
36632
36646
  }
36633
- static { this.ɵfac = function ImagePerformanceWarning_Factory(ɵt) { return new (ɵt || ImagePerformanceWarning)(); }; }
36647
+ static { this.ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ImagePerformanceWarning)(); }; }
36634
36648
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ImagePerformanceWarning, factory: ImagePerformanceWarning.ɵfac, providedIn: 'root' }); }
36635
36649
  }
36636
36650
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{
@@ -36827,16 +36841,28 @@ class GlobalEventDelegation {
36827
36841
  supports(eventType) {
36828
36842
  return isEarlyEventType(eventType);
36829
36843
  }
36830
- addEventListener(element, eventName, handler) {
36831
- this.eventContractDetails.instance.addEvent(eventName);
36832
- sharedStashFunction(element, eventName, handler);
36833
- getActionCache(element)[eventName] = '';
36834
- return () => this.removeEventListener(element, eventName, handler);
36844
+ addEventListener(element, eventType, handler) {
36845
+ // Note: contrary to the type, Window and Document can be passed in
36846
+ // as well.
36847
+ if (element.nodeType === Node.ELEMENT_NODE) {
36848
+ this.eventContractDetails.instance.addEvent(eventType);
36849
+ getActionCache(element)[eventType] = '';
36850
+ sharedStashFunction(element, eventType, handler);
36851
+ }
36852
+ else {
36853
+ element.addEventListener(eventType, handler);
36854
+ }
36855
+ return () => this.removeEventListener(element, eventType, handler);
36835
36856
  }
36836
36857
  removeEventListener(element, eventType, callback) {
36837
- getActionCache(element)[eventType] = undefined;
36858
+ if (element.nodeType === Node.ELEMENT_NODE) {
36859
+ getActionCache(element)[eventType] = undefined;
36860
+ }
36861
+ else {
36862
+ element.removeEventListener(eventType, callback);
36863
+ }
36838
36864
  }
36839
- static { this.ɵfac = function GlobalEventDelegation_Factory(ɵt) { return new (ɵt || GlobalEventDelegation)(); }; }
36865
+ static { this.ɵfac = function GlobalEventDelegation_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GlobalEventDelegation)(); }; }
36840
36866
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: GlobalEventDelegation, factory: GlobalEventDelegation.ɵfac }); }
36841
36867
  }
36842
36868
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(GlobalEventDelegation, [{
@@ -36847,7 +36873,7 @@ const initGlobalEventDelegation = (eventContractDetails, injector) => {
36847
36873
  return;
36848
36874
  }
36849
36875
  const eventContract = (eventContractDetails.instance = new EventContract(new EventContractContainer(document.body)));
36850
- const dispatcher = new EventDispatcher(invokeRegisteredListeners);
36876
+ const dispatcher = new EventDispatcher(invokeRegisteredListeners, /** clickModSupport */ false);
36851
36877
  registerDispatcher(eventContract, dispatcher);
36852
36878
  };
36853
36879
 
@@ -37768,8 +37794,10 @@ function verifySsrContentsIntegrity() {
37768
37794
 
37769
37795
  /**
37770
37796
  * Returns a set of providers required to setup support for event delegation.
37797
+ * @param multiContract - Experimental support to provide one event contract
37798
+ * when there are multiple binaries on the page.
37771
37799
  */
37772
- function provideGlobalEventDelegation() {
37800
+ function provideGlobalEventDelegation(multiContract = false) {
37773
37801
  return [
37774
37802
  {
37775
37803
  provide: IS_GLOBAL_EVENT_DELEGATION_ENABLED,
@@ -37780,7 +37808,12 @@ function provideGlobalEventDelegation() {
37780
37808
  useValue: () => {
37781
37809
  const injector = inject(Injector);
37782
37810
  const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);
37811
+ if (multiContract && window.__jsaction_contract) {
37812
+ eventContractDetails.instance = window.__jsaction_contract;
37813
+ return;
37814
+ }
37783
37815
  initGlobalEventDelegation(eventContractDetails, injector);
37816
+ window.__jsaction_contract = eventContractDetails.instance;
37784
37817
  },
37785
37818
  multi: true,
37786
37819
  },