@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.
- package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +6 -3
- package/esm2022/primitives/event-dispatch/src/event_dispatcher.mjs +8 -3
- package/esm2022/src/application/application_init.mjs +2 -2
- package/esm2022/src/application/application_module.mjs +2 -2
- package/esm2022/src/application/application_ref.mjs +2 -2
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +3 -3
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +2 -2
- package/esm2022/src/console.mjs +2 -2
- package/esm2022/src/event_delegation_utils.mjs +21 -9
- package/esm2022/src/event_dispatch/event_delegation.mjs +9 -2
- package/esm2022/src/hydration/annotate.mjs +1 -1
- package/esm2022/src/hydration/cleanup.mjs +8 -4
- package/esm2022/src/hydration/i18n.mjs +13 -5
- package/esm2022/src/hydration/skip_hydration.mjs +11 -1
- package/esm2022/src/image_performance_warning.mjs +2 -2
- package/esm2022/src/linker/compiler.mjs +2 -2
- package/esm2022/src/linker/view_container_ref.mjs +1 -1
- package/esm2022/src/platform/platform_ref.mjs +2 -2
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/i18n/i18n_parse.mjs +2 -1
- package/esm2022/src/render3/instructions/element_container.mjs +6 -3
- package/esm2022/src/render3/interfaces/i18n.mjs +1 -1
- package/esm2022/src/render3/interfaces/renderer.mjs +1 -1
- package/esm2022/src/render3/interfaces/renderer_dom.mjs +1 -1
- package/esm2022/src/render3/node_manipulation.mjs +2 -13
- package/esm2022/src/sanitization/html_sanitizer.mjs +2 -2
- package/esm2022/src/sanitization/inert_body.mjs +2 -2
- package/esm2022/src/testability/testability.mjs +3 -3
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/application_error_handler.mjs +3 -3
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +78 -45
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +13 -5
- 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 +4 -4
- package/index.d.ts +11 -9
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +3 -2
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/after-render-phase/bundle.js +12 -12
- package/schematics/migrations/http-providers/bundle.js +15 -15
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +164 -164
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
- package/schematics/ng-generate/control-flow-migration/bundle.js +172 -172
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +459 -459
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.1.
|
|
2
|
+
* @license Angular v18.1.5
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1337,12 +1337,14 @@ const REGEXP_SEMICOLON = /\s*;\s*/;
|
|
|
1337
1337
|
const DEFAULT_EVENT_TYPE = EventType.CLICK;
|
|
1338
1338
|
/** Resolves actions for Events. */
|
|
1339
1339
|
class ActionResolver {
|
|
1340
|
-
constructor({ syntheticMouseEventSupport = false, } = {}) {
|
|
1340
|
+
constructor({ syntheticMouseEventSupport = false, clickModSupport = true, } = {}) {
|
|
1341
1341
|
this.a11yClickSupport = false;
|
|
1342
|
+
this.clickModSupport = true;
|
|
1342
1343
|
this.updateEventInfoForA11yClick = undefined;
|
|
1343
1344
|
this.preventDefaultForA11yClick = undefined;
|
|
1344
1345
|
this.populateClickOnlyAction = undefined;
|
|
1345
1346
|
this.syntheticMouseEventSupport = syntheticMouseEventSupport;
|
|
1347
|
+
this.clickModSupport = clickModSupport;
|
|
1346
1348
|
}
|
|
1347
1349
|
resolveEventType(eventInfo) {
|
|
1348
1350
|
// We distinguish modified and plain clicks in order to support the
|
|
@@ -1378,7 +1380,8 @@ class ActionResolver {
|
|
|
1378
1380
|
// addEvent() is necessary for CLICK, KEYDOWN, and KEYPRESS event types. If
|
|
1379
1381
|
// a11y click support is enabled, addEvent() will set up the appropriate key
|
|
1380
1382
|
// event handler automatically.
|
|
1381
|
-
if (
|
|
1383
|
+
if (this.clickModSupport &&
|
|
1384
|
+
getEventType(eventInfo) === EventType.CLICK &&
|
|
1382
1385
|
isModifiedClickEvent(getEvent(eventInfo))) {
|
|
1383
1386
|
setEventType(eventInfo, EventType.CLICKMOD);
|
|
1384
1387
|
}
|
|
@@ -1685,9 +1688,10 @@ const COMPOSED_PATH_ERROR_MESSAGE = `\`composedPath\` called during event replay
|
|
|
1685
1688
|
* `currentTarget`, etc.
|
|
1686
1689
|
*/
|
|
1687
1690
|
class EventDispatcher {
|
|
1688
|
-
constructor(dispatchDelegate) {
|
|
1691
|
+
constructor(dispatchDelegate, clickModSupport = true) {
|
|
1689
1692
|
this.dispatchDelegate = dispatchDelegate;
|
|
1690
|
-
this.
|
|
1693
|
+
this.clickModSupport = clickModSupport;
|
|
1694
|
+
this.actionResolver = new ActionResolver({ clickModSupport });
|
|
1691
1695
|
this.dispatcher = new Dispatcher((eventInfoWrapper) => {
|
|
1692
1696
|
this.dispatchToDelegate(eventInfoWrapper);
|
|
1693
1697
|
}, {
|
|
@@ -1718,8 +1722,10 @@ class EventDispatcher {
|
|
|
1718
1722
|
}
|
|
1719
1723
|
function prepareEventForBubbling(eventInfoWrapper) {
|
|
1720
1724
|
const event = eventInfoWrapper.getEvent();
|
|
1725
|
+
const originalStopPropagation = eventInfoWrapper.getEvent().stopPropagation.bind(event);
|
|
1721
1726
|
const stopPropagation = () => {
|
|
1722
1727
|
event[PROPAGATION_STOPPED_SYMBOL] = true;
|
|
1728
|
+
originalStopPropagation();
|
|
1723
1729
|
};
|
|
1724
1730
|
patchEventInstance(event, 'stopPropagation', stopPropagation);
|
|
1725
1731
|
patchEventInstance(event, 'stopImmediatePropagation', stopPropagation);
|
|
@@ -1731,9 +1737,11 @@ function propagationStopped(eventInfoWrapper) {
|
|
|
1731
1737
|
function prepareEventForReplay(eventInfoWrapper) {
|
|
1732
1738
|
const event = eventInfoWrapper.getEvent();
|
|
1733
1739
|
const target = eventInfoWrapper.getTargetElement();
|
|
1740
|
+
const originalPreventDefault = event.preventDefault.bind(event);
|
|
1734
1741
|
patchEventInstance(event, 'target', target);
|
|
1735
1742
|
patchEventInstance(event, 'eventPhase', EventPhase.REPLAY);
|
|
1736
1743
|
patchEventInstance(event, 'preventDefault', () => {
|
|
1744
|
+
originalPreventDefault();
|
|
1737
1745
|
throw new Error(PREVENT_DEFAULT_ERROR_MESSAGE + (ngDevMode ? PREVENT_DEFAULT_ERROR_MESSAGE_DETAILS : ''));
|
|
1738
1746
|
});
|
|
1739
1747
|
patchEventInstance(event, 'composedPath', () => {
|