@angular/core 18.1.0-next.0 → 18.1.0-next.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 (48) hide show
  1. package/esm2022/primitives/event-dispatch/index.mjs +2 -1
  2. package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +4 -3
  3. package/esm2022/primitives/event-dispatch/src/event_dispatcher.mjs +4 -6
  4. package/esm2022/primitives/event-dispatch/src/event_type.mjs +2 -2
  5. package/esm2022/primitives/signals/src/graph.mjs +6 -5
  6. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +2 -4
  7. package/esm2022/src/core.mjs +1 -1
  8. package/esm2022/src/core_private_export.mjs +2 -2
  9. package/esm2022/src/event_delegation_utils.mjs +68 -0
  10. package/esm2022/src/event_emitter.mjs +20 -11
  11. package/esm2022/src/hydration/annotate.mjs +18 -7
  12. package/esm2022/src/hydration/api.mjs +2 -2
  13. package/esm2022/src/hydration/event_replay.mjs +46 -69
  14. package/esm2022/src/hydration/tokens.mjs +6 -1
  15. package/esm2022/src/pending_tasks.mjs +15 -20
  16. package/esm2022/src/render3/after_render_hooks.mjs +67 -132
  17. package/esm2022/src/render3/component_ref.mjs +1 -1
  18. package/esm2022/src/render3/instructions/change_detection.mjs +27 -24
  19. package/esm2022/src/render3/instructions/listener.mjs +5 -5
  20. package/esm2022/src/render3/instructions/shared.mjs +3 -3
  21. package/esm2022/src/render3/reactive_lview_consumer.mjs +56 -3
  22. package/esm2022/src/version.mjs +1 -1
  23. package/esm2022/testing/src/logger.mjs +3 -3
  24. package/fesm2022/core.mjs +474 -432
  25. package/fesm2022/core.mjs.map +1 -1
  26. package/fesm2022/primitives/event-dispatch.mjs +9 -10
  27. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  28. package/fesm2022/primitives/signals.mjs +6 -5
  29. package/fesm2022/primitives/signals.mjs.map +1 -1
  30. package/fesm2022/rxjs-interop.mjs +1 -1
  31. package/fesm2022/testing.mjs +1 -1
  32. package/index.d.ts +218 -28
  33. package/package.json +2 -2
  34. package/primitives/event-dispatch/index.d.ts +66 -1
  35. package/primitives/signals/index.d.ts +1 -1
  36. package/rxjs-interop/index.d.ts +1 -1
  37. package/schematics/migrations/after-render-phase/bundle.js +602 -0
  38. package/schematics/migrations/after-render-phase/bundle.js.map +7 -0
  39. package/schematics/migrations/http-providers/bundle.js +10 -2
  40. package/schematics/migrations/http-providers/bundle.js.map +2 -2
  41. package/schematics/migrations/invalid-two-way-bindings/bundle.js +177 -8
  42. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
  43. package/schematics/migrations.json +5 -0
  44. package/schematics/ng-generate/control-flow-migration/bundle.js +192 -16
  45. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  46. package/schematics/ng-generate/standalone-migration/bundle.js +9197 -9490
  47. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  48. package/testing/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.1.0-next.0
2
+ * @license Angular v18.1.0-next.2
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -329,7 +329,7 @@ const NON_BUBBLING_MOUSE_EVENTS = [
329
329
  /**
330
330
  * Detects whether a given event type is supported by JSAction.
331
331
  */
332
- const isSupportedEvent = (eventType) => SUPPORTED_EVENTS.includes(eventType);
332
+ const isSupportedEvent = (eventType) => SUPPORTED_EVENTS.indexOf(eventType) >= 0;
333
333
  const SUPPORTED_EVENTS = [
334
334
  EventType.CLICK,
335
335
  EventType.DBLCLICK,
@@ -1696,8 +1696,9 @@ function shouldPreventDefaultBeforeDispatching(actionElement, eventInfoWrapper)
1696
1696
  // and we are dispatching the action now. Note that the targetElement may be
1697
1697
  // a child of an anchor that has a jsaction attached. For that reason, we
1698
1698
  // need to check the actionElement rather than the targetElement.
1699
- return ((actionElement.tagName === 'A' && eventInfoWrapper.getEventType() === EventType.CLICK) ||
1700
- eventInfoWrapper.getEventType() === EventType.CLICKMOD);
1699
+ return (actionElement.tagName === 'A' &&
1700
+ (eventInfoWrapper.getEventType() === EventType.CLICK ||
1701
+ eventInfoWrapper.getEventType() === EventType.CLICKMOD));
1701
1702
  }
1702
1703
  /**
1703
1704
  * Registers deferred functionality for an EventContract and a Jsaction
@@ -1719,11 +1720,9 @@ const PREVENT_DEFAULT_ERROR_MESSAGE_DETAILS = ' Because event replay occurs afte
1719
1720
  'effect. You can check whether an event is being replayed by accessing the event phase: ' +
1720
1721
  '`event.eventPhase === EventPhase.REPLAY`.';
1721
1722
  const PREVENT_DEFAULT_ERROR_MESSAGE = `\`preventDefault\` called during event replay.`;
1722
- const COMPOSED_PATH_ERROR_MESSAGE_DETAILS = () => ngDevMode
1723
- ? ' Because event replay occurs after browser ' +
1724
- 'dispatch, `composedPath()` will be empty. Iterate parent nodes from `event.target` or ' +
1725
- '`event.currentTarget` if you need to check elements in the event path.'
1726
- : '';
1723
+ const COMPOSED_PATH_ERROR_MESSAGE_DETAILS = ' Because event replay occurs after browser ' +
1724
+ 'dispatch, `composedPath()` will be empty. Iterate parent nodes from `event.target` or ' +
1725
+ '`event.currentTarget` if you need to check elements in the event path.';
1727
1726
  const COMPOSED_PATH_ERROR_MESSAGE = `\`composedPath\` called during event replay.`;
1728
1727
  /**
1729
1728
  * A dispatcher that uses browser-based `Event` semantics, for example bubbling, `stopPropagation`,
@@ -2270,5 +2269,5 @@ function bootstrapEarlyEventContract(field, container, appId, eventTypes, captur
2270
2269
  eventContract.addEvents(captureEventTypes, true);
2271
2270
  }
2272
2271
 
2273
- export { EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, bootstrapEarlyEventContract, isCaptureEvent, isSupportedEvent, registerDispatcher };
2272
+ export { Attribute, EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, JSACTION$1 as JSACTION, JSINSTANCE, JSTRACK, OI$1 as OI, VED, VET, bootstrapEarlyEventContract, isCaptureEvent, isSupportedEvent, registerDispatcher };
2274
2273
  //# sourceMappingURL=event-dispatch.mjs.map