Socket
Socket
Sign inDemoInstall

@angular/core

Package Overview
Dependencies
Maintainers
2
Versions
837
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/core - npm Package Compare versions

Comparing version 18.0.0-rc.1 to 18.0.0-rc.2

2

event-dispatch-contract.min.js

@@ -1,1 +0,1 @@

!function(){"use strict";function t(t){return t.eventType}function e(t,e){t.eventType=e}function n(t){return t.event}function i(t){return t.eic}function o(t){return t.eia}function r(t,e,n){t.eia=[e,n]}function E(t){return t[1]}function s(t){return t.eiack}function a(t){return{eventType:t.eventType,event:t.event,targetElement:t.targetElement,eic:t.eic,eia:t.eia,timeStamp:t.timeStamp,eirp:t.eirp,eiack:t.eiack}}const c={AUXCLICK:"auxclick",CHANGE:"change",CLICK:"click",CLICKMOD:"clickmod",CLICKONLY:"clickonly",DBLCLICK:"dblclick",FOCUS:"focus",FOCUSIN:"focusin",BLUR:"blur",FOCUSOUT:"focusout",SUBMIT:"submit",KEYDOWN:"keydown",KEYPRESS:"keypress",KEYUP:"keyup",MOUSEUP:"mouseup",MOUSEDOWN:"mousedown",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",POINTERUP:"pointerup",POINTERDOWN:"pointerdown",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERMOVE:"pointermove",POINTERCANCEL:"pointercancel",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",ERROR:"error",LOAD:"load",UNLOAD:"unload",TOUCHSTART:"touchstart",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",INPUT:"input",SCROLL:"scroll",TOGGLE:"toggle",CUSTOM:"_custom"};var u;function p(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function T(t){let e=t.target;return!e.getAttribute&&e.parentNode&&(e=e.parentNode),e}!function(t){t[t.MAC_ENTER=3]="MAC_ENTER",t[t.ENTER=13]="ENTER",t[t.SPACE=32]="SPACE"}(u||(u={}));let O="undefined"!=typeof navigator&&/Macintosh/.test(navigator.userAgent);const l="undefined"!=typeof navigator&&!/Opera/.test(navigator.userAgent)&&/WebKit/.test(navigator.userAgent);"undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident/.test(navigator.userAgent)),"undefined"!=typeof navigator&&!/Opera|WebKit/.test(navigator.userAgent)&&/Gecko/.test(navigator.product);const h={A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1};const d={Enter:u.ENTER," ":u.SPACE},C={A:u.ENTER,BUTTON:0,CHECKBOX:u.SPACE,COMBOBOX:u.ENTER,FILE:0,GRIDCELL:u.ENTER,LINK:u.ENTER,LISTBOX:u.ENTER,MENU:0,MENUBAR:0,MENUITEM:0,MENUITEMCHECKBOX:0,MENUITEMRADIO:0,OPTION:0,RADIO:u.SPACE,RADIOGROUP:u.SPACE,RESET:0,SUBMIT:0,SWITCH:u.SPACE,TAB:0,TREE:u.ENTER,TREEITEM:u.ENTER};function N(t){return(t.getAttribute("type")||t.tagName).toUpperCase()in v}function f(t){return(t.getAttribute("type")||t.tagName).toUpperCase()in A}const v={CHECKBOX:!0,FILE:!0,OPTION:!0,RADIO:!0},A={COLOR:!0,DATE:!0,DATETIME:!0,"DATETIME-LOCAL":!0,EMAIL:!0,MONTH:!0,NUMBER:!0,PASSWORD:!0,RANGE:!0,SEARCH:!0,TEL:!0,TEXT:!0,TEXTAREA:!0,TIME:!0,URL:!0,WEEK:!0},R={A:!0,AREA:!0,BUTTON:!0,DIALOG:!0,IMG:!0,INPUT:!0,LINK:!0,MENU:!0,OPTGROUP:!0,OPTION:!0,PROGRESS:!0,SELECT:!0,TEXTAREA:!0},S="undefined"!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent);class I{constructor(t){this.element=t,this.handlerInfos=[]}addEventListener(t,e){S&&(this.element.style.cursor="pointer"),this.handlerInfos.push(function(t,e,n){let i=!1;return e!==c.FOCUS&&e!==c.BLUR&&e!==c.ERROR&&e!==c.LOAD&&e!==c.TOGGLE||(i=!0),t.addEventListener(e,n,i),{eventType:e,handler:n,capture:i}}(this.element,t,e(this.element)))}cleanUp(){for(let n=0;n<this.handlerInfos.length;n++)e=this.handlerInfos[n],(t=this.element).removeEventListener?t.removeEventListener(e.eventType,e.handler,e.capture):t.detachEvent&&t.detachEvent(`on${e.eventType}`,e.handler);var t,e;this.handlerInfos=[]}}function y(t){(function(t){let e=t.which||t.keyCode;if(!e&&t.key&&(e=d[t.key]),l&&e===u.MAC_ENTER&&(e=u.ENTER),e!==u.ENTER&&e!==u.SPACE)return!1;const n=T(t);if(t.type!==c.KEYDOWN||!function(t){return"getAttribute"in t&&!f(t)&&!function(t){return"BUTTON"===t.tagName.toUpperCase()||!!t.type&&"FILE"===t.type.toUpperCase()}(t)&&!t.isContentEditable}(n)||function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t))return!1;if(N(n)&&e===u.SPACE)return!1;if(!function(t){return(t.tagName in h||function(t){const e=t.getAttributeNode("tabindex");return null!=e&&e.specified}(t))&&!t.disabled}(n))return!1;const i=(n.getAttribute("role")||n.type||n.tagName).toUpperCase(),o=C[i]%e==0,r=!(i in C)&&e===u.ENTER,E="INPUT"!==n.tagName.toUpperCase()||!!n.type;return(o||r)&&E})(n(t))&&(function(t,e){t.eiack=!0}(t),e(t,c.CLICK))}function U(t){s(t)&&(function(t){const e=t.which||t.keyCode,n=T(t),i=(n.type||n.tagName).toUpperCase();return e===u.SPACE&&"CHECKBOX"!==i}(n(t))||function(t){const e=T(t),n=e.tagName.toUpperCase(),i=(e.getAttribute("role")||"").toUpperCase();return"BUTTON"===n||"BUTTON"===i||!!function(t){return t.tagName.toUpperCase()in R}(e)&&"A"!==n&&"SELECT"!==n&&!N(e)&&!f(e)}(n(t)))&&p(n(t))}function P(n,i,E){o(i)||t(i)!==c.CLICK||s(i)||void 0===E[c.CLICKONLY]||(e(i,c.CLICKONLY),r(i,E[c.CLICKONLY],n))}var L;!function(t){t.JSACTION="jsaction",t.JSNAMESPACE="jsnamespace",t.OI="oi",t.VED="ved",t.VET="vet",t.JSINSTANCE="jsinstance",t.JSTRACK="jstrack"}(L||(L={}));var M;!function(t){t.JSACTION="__jsaction",t.JSNAMESPACE="__jsnamespace",t.OI="__oi",t.OWNER="__owner"}(M||(M={}));const g={};function m(t,e){t[M.JSACTION]=e}const k={},K=/\s*;\s*/,_=c.CLICK;class D{constructor({customEventSupport:t=!1,syntheticMouseEventSupport:e=!1}={}){this.a11yClickSupport=!1,this.updateEventInfoForA11yClick=void 0,this.preventDefaultForA11yClick=void 0,this.populateClickOnlyAction=void 0,this.customEventSupport=t,this.syntheticMouseEventSupport=e}resolve(i){if(this.customEventSupport&&t(i)===c.CUSTOM){const t=n(i).detail;if(!t||!t._type)return;e(i,t._type)}this.populateAction(i)}populateAction(r){var s;t(r)===c.CLICK&&(s=n(r),O&&s.metaKey||!O&&s.ctrlKey||function(t){return 2===t.which||null==t.which&&4===t.button}(s)||s.shiftKey)?e(r,c.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(r);let a=function(t){return t.targetElement}(r);for(;a&&a!==i(r)&&(a.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(a,r),!o(r));)a=a[M.OWNER]?a[M.OWNER]:"#document-fragment"!==a.parentNode?.nodeName?a.parentNode:a.parentNode?.host??null;const u=o(r);if(u&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(r),this.syntheticMouseEventSupport&&(t(r)===c.MOUSEENTER||t(r)===c.MOUSELEAVE||t(r)===c.POINTERENTER||t(r)===c.POINTERLEAVE)))if(function(t,e,n){const i=t.relatedTarget;return(t.type===c.MOUSEOVER&&e===c.MOUSEENTER||t.type===c.MOUSEOUT&&e===c.MOUSELEAVE||t.type===c.POINTEROVER&&e===c.POINTERENTER||t.type===c.POINTEROUT&&e===c.POINTERLEAVE)&&(!i||i!==n&&!function(t,e){if(null===e)return!1;if("contains"in t&&1===e.nodeType)return t.contains(e);if("compareDocumentPosition"in t)return t===e||Boolean(16&t.compareDocumentPosition(e));for(;e&&t!==e;)e=e.parentNode;return e===t}(n,i))}(n(r),t(r),E(u))){const t=function(t,e){const n={};for(const e in t){if("srcElement"===e||"target"===e)continue;const i=t[e];"function"!=typeof i&&(n[e]=i)}return n.type=t.type===c.MOUSEOVER?c.MOUSEENTER:t.type===c.MOUSEOUT?c.MOUSELEAVE:t.type===c.POINTEROVER?c.POINTERENTER:c.POINTERLEAVE,n.target=n.srcElement=e,n.bubbles=!1,n}(n(r),E(u));!function(t,e){t.event=e}(r,t),function(t,e){t.targetElement=e}(r,E(u))}else!function(t){t.eia=void 0}(r)}populateActionOnElement(e,n){const i=this.parseActions(e),o=i[t(n)];void 0!==o&&r(n,o,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,n,i)}parseActions(t){let e=t[M.JSACTION];if(!e){const n=t.getAttribute(L.JSACTION);if(n){if(e=g[n],!e){e={};const t=n.split(K);for(let n=0;n<t.length;n++){const i=t[n];if(!i)continue;const o=i.indexOf(":"),r=-1!==o,E=r?i.substr(0,o).trim():_,s=r?i.substr(o+1).trim():i;e[E]=s}g[n]=e}m(t,e)}else e=k,m(t,e)}return e}addA11yClickSupport(t,e,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=t,this.preventDefaultForA11yClick=e,this.populateClickOnlyAction=n}}class b{static{this.CUSTOM_EVENT_SUPPORT=!1}static{this.A11Y_CLICK_SUPPORT=!1}static{this.MOUSE_SPECIAL_SUPPORT=!1}constructor(t){this.actionResolver=new D({customEventSupport:b.CUSTOM_EVENT_SUPPORT,syntheticMouseEventSupport:b.MOUSE_SPECIAL_SUPPORT}),this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[],this.addA11yClickListener=!1,this.containerManager=t,b.CUSTOM_EVENT_SUPPORT&&this.addEvent(c.CUSTOM),b.A11Y_CLICK_SUPPORT&&this.addA11yClickSupport()}handleEvent(t,e,n){const i=function(t,e,n,i,o,r,E,s){return{eventType:t,event:e,targetElement:n,eic:i,timeStamp:Date.now(),eia:void 0,eirp:void 0,eiack:void 0}}(t,e,e.target,n);this.handleEventInfo(i)}handleEventInfo(e){if(!this.dispatcher)return function(t,e){t.eirp=!0}(e),void this.queuedEventInfos?.push(e);this.actionResolver.resolve(e);const i=o(e);i&&function(e,n){return"A"===e.tagName&&(t(n)===c.CLICK||t(n)===c.CLICKMOD)}(E(i),e)&&p(n(e)),this.dispatcher(e)}addEvent(t,e){if(t in this.eventHandlers||!this.containerManager)return;if(!b.MOUSE_SPECIAL_SUPPORT&&(t===c.MOUSEENTER||t===c.MOUSELEAVE||t===c.POINTERENTER||t===c.POINTERLEAVE))return;const n=(t,e,n)=>{this.handleEvent(t,e,n)};this.eventHandlers[t]=n;const i=function(t){return t===c.MOUSEENTER?c.MOUSEOVER:t===c.MOUSELEAVE?c.MOUSEOUT:t===c.POINTERENTER?c.POINTEROVER:t===c.POINTERLEAVE?c.POINTEROUT:t}(e||t);if(i!==t){const e=this.browserEventTypeToExtraEventTypes[i]||[];e.push(t),this.browserEventTypeToExtraEventTypes[i]=e}this.containerManager.addEventListener(i,e=>i=>{n(t,i,e)}),this.addA11yClickListener&&t===c.CLICK&&this.addEvent(c.KEYDOWN)}replayEarlyEvents(t=window){const n=t._ejsa;if(!n)return;const i=n.q;for(let t=0;t<i.length;t++){const n=i[t],o=this.getEventTypesForBrowserEventType(n.eventType);for(let t=0;t<o.length;t++){const i=a(n);e(i,o[t]),this.handleEventInfo(i)}}const o=n.h;V(n.c,n.et,o),V(n.c,n.etc,o,!0),delete t._ejsa}getEventTypesForBrowserEventType(t){const e=[];return this.eventHandlers[t]&&e.push(t),this.browserEventTypeToExtraEventTypes[t]&&e.push(...this.browserEventTypeToExtraEventTypes[t]),e}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,e){this.ecrd(t,e)}ecrd(t,e){if(this.dispatcher=t,this.queuedEventInfos?.length){for(let t=0;t<this.queuedEventInfos.length;t++)this.handleEventInfo(this.queuedEventInfos[t]);this.queuedEventInfos=null}}addA11yClickSupport(){this.addA11yClickSupportImpl(y,U,P)}exportAddA11yClickSupport(){this.addA11yClickListener=!0,this.ecaacs=this.addA11yClickSupportImpl.bind(this)}addA11yClickSupportImpl(t,e,n){this.addA11yClickListener=!0,this.actionResolver.addA11yClickSupport(t,e,n)}}function V(t,e,n,i){for(let o=0;o<e.length;o++)t.removeEventListener(e[o],n,i)}window.__jsaction_bootstrap=function(t,e,n,i,o=window){o[t]||(o[t]={});const r=new b(new I(e));o[t][n]=r;for(const t of i)r.addEvent(t)}}();
(()=>{function p(i,n,t,e,r,o,s,a){return{eventType:i,event:n,targetElement:t,eic:e,timeStamp:r,eia:o,eirp:s,eiack:a}}var c=class{constructor(n=window,t=window.document.documentElement){this.replaySink=n,this.container=t,n._ejsa={c:t,q:[],et:[],etc:[],h:e=>{let r=p(e.type,e,e.target,t,Date.now());n._ejsa.q.push(r)}}}addEvents(n,t){let e=this.replaySink._ejsa;for(let r=0;r<n.length;r++){let o=n[r];(t?e.etc:e.et).push(o),this.container.addEventListener(o,e.h,t)}}};function u(i,n,t,e,r,o=window){o[i]||(o[i]={}),o[i][t]={};let s=new c(o[i][t],n);e&&s.addEvents(e),r&&s.addEvents(r,!0)}window.__jsaction_bootstrap=u;})();
{
"name": "@angular/core",
"version": "18.0.0-rc.1",
"version": "18.0.0-rc.2",
"description": "Angular - the core framework",

@@ -5,0 +5,0 @@ "author": "angular",

/**
* @license Angular v18.0.0-rc.1
* @license Angular v18.0.0-rc.2
* (c) 2010-2024 Google LLC. https://angular.io/

@@ -8,3 +8,3 @@ * License: MIT

declare namespace a11yClickLib {
declare namespace a11yClick {
export {

@@ -28,2 +28,50 @@ updateEventInfoForA11yClick,

/** Resolves actions for Events. */
declare class ActionResolver {
private a11yClickSupport;
private readonly syntheticMouseEventSupport;
private updateEventInfoForA11yClick?;
private preventDefaultForA11yClick?;
private populateClickOnlyAction?;
constructor({ syntheticMouseEventSupport, }?: {
syntheticMouseEventSupport?: boolean;
});
resolve(eventInfo: eventInfoLib.EventInfo): void;
/**
* Searches for a jsaction that the DOM event maps to and creates an
* object containing event information used for dispatching by
* jsaction.Dispatcher. This method populates the `action` and `actionElement`
* fields of the EventInfo object passed in by finding the first
* jsaction attribute above the target Node of the event, and below
* the container Node, that specifies a jsaction for the event
* type. If no such jsaction is found, then action is undefined.
*
* @param eventInfo `EventInfo` to set `action` and `actionElement` if an
* action is found on any `Element` in the path of the `Event`.
*/
private populateAction;
/**
* Accesses the jsaction map on a node and retrieves the name of the
* action the given event is mapped to, if any. It parses the
* attribute value and stores it in a property on the node for
* subsequent retrieval without re-parsing and re-accessing the
* attribute.
*
* @param actionElement The DOM node to retrieve the jsaction map from.
* @param eventInfo `EventInfo` to set `action` and `actionElement` if an
* action is found on the `actionElement`.
*/
private populateActionOnElement;
/**
* Parses and caches an element's jsaction element into a map.
*
* This is primarily for internal use.
*
* @param actionElement The DOM node to retrieve the jsaction map from.
* @return Map from event to qualified name of the jsaction bound to it.
*/
private parseActions;
addA11yClickSupport(updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction): void;
}
/**

@@ -40,16 +88,4 @@ * Provides a factory function for bootstrapping an event contract on a

*/
export declare function bootstrapEarlyEventContract(field: string, container: HTMLElement, appId: string, eventTypes: string[], captureEventTypes: string[], earlyJsactionTracker?: EventContractTracker<EarlyJsactionDataContainer>): void;
export declare function bootstrapEarlyEventContract(field: string, container: HTMLElement, appId: string, eventTypes?: string[], captureEventTypes?: string[], earlyJsactionTracker?: EventContractTracker<EarlyJsactionDataContainer>): void;
/**
* Provides a factory function for bootstrapping an event contract on a
* specified object (by default, exposed on the `window`).
* @param field The property on the object that the event contract will be placed on.
* @param container The container that listens to events
* @param appId A given identifier for an application. If there are multiple apps on the page
* then this is how contracts can be initialized for each one.
* @param events An array of event names that should be listened to.
* @param earlyJsactionTracker The object that should receive the event contract.
*/
export declare function bootstrapEventContract(field: string, container: Element, appId: string, events: string[], earlyJsactionTracker?: EventContractTracker<EventContract>): void;
/** Clones an `EventInfo` */

@@ -89,26 +125,19 @@ declare function cloneEventInfo(eventInfo: EventInfo): EventInfo;

export declare class Dispatcher {
private readonly getHandler?;
private readonly baseDispatcher;
/** Whether to stop propagation for an `EventInfo`. */
private readonly stopPropagation;
/**
* The actions that are registered for this Dispatcher instance.
* This should be the primary one used once migration off of registerHandlers
* is done.
*/
private readonly actions;
/** A map of global event handlers, where each key is an event type. */
private readonly globalHandlers;
/** The event replayer. */
private readonly dispatchDelegate;
private actionResolver?;
/** The replayer function to be called when there are queued events. */
private eventReplayer?;
/** Whether the event replay is scheduled. */
private eventReplayScheduled;
/** The queue of events. */
private readonly replayEventInfoWrappers;
/**
* Receives a DOM event, determines the jsaction associated with the source
* element of the DOM event, and invokes the handler associated with the
* jsaction.
*
* @param getHandler A function that knows how to get the handler for a
* given event info.
* Options are:
* 1. `eventReplayer`: When the event contract dispatches replay events
* to the Dispatcher, the Dispatcher collects them and in the next tick
* dispatches them to the `eventReplayer`.
* @param dispatchDelegate A function that should handle dispatching an `EventInfoWrapper` to handlers.
*/
constructor(getHandler?: ((eventInfoWrapper: EventInfoWrapper) => EventInfoWrapperHandler | void) | undefined, { stopPropagation, eventReplayer, }?: {
stopPropagation?: boolean;
constructor(dispatchDelegate: (eventInfoWrapper: EventInfoWrapper) => void, { actionResolver, eventReplayer, }?: {
actionResolver?: ActionResolver;
eventReplayer?: Replayer;

@@ -136,80 +165,9 @@ });

*/
dispatch(eventInfo: EventInfo, isGlobalDispatch?: boolean): void;
dispatch(eventInfo: EventInfo): void;
/**
* Dispatches an `EventInfoWrapper`.
* Schedules an `EventInfoWrapper` for replay. The replaying will happen in its own
* stack once the current flow cedes control. This is done to mimic
* browser event handling.
*/
private dispatchToHandler;
/**
* Registers multiple methods all bound to the same object
* instance. This is a common case: an application module binds
* multiple of its methods under public names to the event contract of
* the application. So we provide a shortcut for it.
* Attempts to replay the queued events after registering the handlers.
*
* @param namespace The namespace of the jsaction name.
*
* @param instance The object to bind the methods to. If this is null, then
* the functions are not bound, but directly added under the public names.
*
* @param methods A map from public name to functions that will be bound to
* instance and registered as action under the public name. I.e. the
* property names are the public names. The property values are the
* methods of instance.
*/
registerEventInfoHandlers<T>(namespace: string, instance: T | null, methods: {
[key: string]: EventInfoWrapperHandler;
}): void;
/**
* Unregisters an action. Provided as an easy way to reverse the effects of
* registerHandlers.
* @param namespace The namespace of the jsaction name.
* @param name The action name to unbind.
*/
unregisterHandler(namespace: string, name: string): void;
/** Registers a global event handler. */
registerGlobalHandler(eventType: string, handler: GlobalHandler): void;
/** Unregisters a global event handler. */
unregisterGlobalHandler(eventType: string, handler: GlobalHandler): void;
/**
* Checks whether there is an action registered under the given
* name. This returns true if there is a namespace handler, even
* if it can not yet handle the event.
*
* @param name Action name.
* @return Whether the name is registered.
* @see #canDispatch
*/
hasAction(name: string): boolean;
/**
* Whether this dispatcher can dispatch the event. This can be used by
* event replayer to check whether the dispatcher can replay an event.
*/
canDispatch(eventInfoWrapper: EventInfoWrapper): boolean;
/**
* Sets the event replayer, enabling queued events to be replayed when actions
* are bound. To replay events, you must register the dispatcher to the
* contract after setting the `EventReplayer`. The event replayer takes as
* parameters the queue of events and the dispatcher (used to check whether
* actions have handlers registered and can be replayed). The event replayer
* is also responsible for dequeuing events.
*
* Example: An event replayer that replays only the last event.
*
* const dispatcher = new Dispatcher();
* // ...
* dispatcher.setEventReplayer((queue, dispatcher) => {
* const lastEventInfoWrapper = queue[queue.length -1];
* if (dispatcher.canDispatch(lastEventInfoWrapper.getAction())) {
* jsaction.replay.replayEvent(
* lastEventInfoWrapper.getEvent(),
* lastEventInfoWrapper.getTargetElement(),
* lastEventInfoWrapper.getEventType(),
* );
* queue.length = 0;
* }
* });
*
* @param eventReplayer It allows elements to be replayed and dequeuing.
*/
setEventReplayer(eventReplayer: Replayer): void;
private scheduleEventInfoWrapperReplay;
}

@@ -224,10 +182,15 @@

declare interface EarlyJsactionData {
/** List used to keep track of the early JSAction event types. */
et: string[];
/** List used to keep track of capture event types. */
etc: string[];
/** List used to keep track of the JSAction events if using earlyeventcontract. */
q: EventInfo[];
/** Early Jsaction handler. */
h: (event: Event) => void;
/** Container for listening to events. */
c: HTMLElement;
}
declare interface EarlyJsactionDataContainer {
export declare interface EarlyJsactionDataContainer {
_ejsa?: EarlyJsactionData;

@@ -251,7 +214,7 @@ }

export declare class EventContract implements UnrenamedEventContract {
static CUSTOM_EVENT_SUPPORT: boolean;
private readonly useActionResolver;
static A11Y_CLICK_SUPPORT: boolean;
static MOUSE_SPECIAL_SUPPORT: boolean;
private containerManager;
private readonly actionResolver;
private readonly actionResolver?;
/**

@@ -281,4 +244,4 @@ * The DOM events which this contract covers. Used to prevent double

private addA11yClickListener;
ecaacs?: (updateEventInfoForA11yClick: typeof a11yClickLib.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClickLib.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClickLib.populateClickOnlyAction) => void;
constructor(containerManager: EventContractContainerManager);
ecaacs?: (updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction) => void;
constructor(containerManager: EventContractContainerManager, useActionResolver?: boolean);
private handleEvent;

@@ -511,7 +474,2 @@ /**

/**
* A handler is dispatched to during normal handling.
*/
declare type EventInfoWrapperHandler = (eventInfoWrapper: EventInfoWrapper) => void;
/** Added for readability when accessing stable property names. */

@@ -548,8 +506,2 @@ declare function getA11yClickKey(eventInfo: EventInfo): boolean | undefined;

/**
* A global handler is dispatched to before normal handler dispatch. Returning
* false will `preventDefault` on the event.
*/
declare type GlobalHandler = (event: Event) => boolean | void;
/**
* Sets the `action` to `clickonly` for a click event that is not an a11y click

@@ -578,3 +530,3 @@ * and if there is not already a click action.

*/
declare type Replayer = (eventInfoWrappers: EventInfoWrapper[], dispatcher: Dispatcher) => void;
declare type Replayer = (eventInfoWrappers: EventInfoWrapper[]) => void;

@@ -586,3 +538,3 @@

declare enum Restriction {
I_AM_THE_JSACTION_FRAMEWORK = 1
I_AM_THE_JSACTION_FRAMEWORK = 0
}

@@ -619,3 +571,3 @@

ecrd(dispatcher: Dispatcher_2, restriction: Restriction): void;
ecaacs?: (updateEventInfoForA11yClick: typeof a11yClickLib.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClickLib.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClickLib.populateClickOnlyAction) => void;
ecaacs?: (updateEventInfoForA11yClick: typeof a11yClick.updateEventInfoForA11yClick, preventDefaultForA11yClick: typeof a11yClick.preventDefaultForA11yClick, populateClickOnlyAction: typeof a11yClick.populateClickOnlyAction) => void;
}

@@ -622,0 +574,0 @@

/**
* @license Angular v18.0.0-rc.1
* @license Angular v18.0.0-rc.2
* (c) 2010-2024 Google LLC. https://angular.io/

@@ -4,0 +4,0 @@ * License: MIT

/**
* @license Angular v18.0.0-rc.1
* @license Angular v18.0.0-rc.2
* (c) 2010-2024 Google LLC. https://angular.io/

@@ -4,0 +4,0 @@ * License: MIT

@@ -63,3 +63,3 @@ var __create = Object.create;

// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
var http_providers_exports = {};

@@ -73,3 +73,3 @@ __export(http_providers_exports, {

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
var import_core = require("@angular-devkit/core");

@@ -154,7 +154,7 @@ function getProjectTsConfigPaths(tree) {

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
var import_path = require("path");
var import_typescript2 = __toESM(require("typescript"), 1);
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
var path = __toESM(require("path"), 1);

@@ -176,3 +176,3 @@ var import_typescript = __toESM(require("typescript"), 1);

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {

@@ -210,9 +210,9 @@ const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);

// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
var import_typescript7 = __toESM(require("typescript"), 1);
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
var import_typescript4 = __toESM(require("typescript"), 1);
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
var import_path2 = require("path");

@@ -401,3 +401,3 @@ var import_typescript3 = __toESM(require("typescript"), 1);

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
var ChangeTracker = class {

@@ -465,6 +465,6 @@ constructor(_printer, _importRemapper) {

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
var import_typescript6 = __toESM(require("typescript"), 1);
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
var import_typescript5 = __toESM(require("typescript"), 1);

@@ -529,3 +529,3 @@ function getImportOfIdentifier(typeChecker, node) {

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
function getCallDecoratorImport(typeChecker, decorator) {

@@ -539,3 +539,3 @@ if (!import_typescript6.default.isCallExpression(decorator.expression) || !import_typescript6.default.isIdentifier(decorator.expression.expression)) {

// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/ng_decorators.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/ng_decorators.mjs
function getAngularDecorators(typeChecker, decorators) {

@@ -550,3 +550,3 @@ return decorators.map((node) => ({ node, importData: getCallDecoratorImport(typeChecker, node) })).filter(({ importData }) => importData && importData.importModule.startsWith("@angular/")).map(({ node, importData }) => ({

// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
var HTTP_CLIENT_MODULE = "HttpClientModule";

@@ -584,3 +584,3 @@ var HTTP_CLIENT_XSRF_MODULE = "HttpClientXsrfModule";

decorators.forEach((decorator) => {
migrateDecorator(decorator, commonHttpIdentifiers, addedImports, changeTracker);
migrateDecorator(decorator, commonHttpIdentifiers, commonHttpTestingIdentifiers, addedImports, changeTracker);
});

@@ -624,3 +624,3 @@ }

}
function migrateDecorator(decorator, commonHttpIdentifiers, addedImports, changeTracker) {
function migrateDecorator(decorator, commonHttpIdentifiers, commonHttpTestingIdentifiers, addedImports, changeTracker) {
var _a;

@@ -638,3 +638,3 @@ if (decorator.name !== "NgModule" && decorator.name !== "Component" || decorator.node.expression.arguments.length < 1) {

}
const importedModules = getImportedHttpModules(moduleImports, commonHttpIdentifiers);
const importedModules = getImportedHttpModules(moduleImports, commonHttpIdentifiers, commonHttpTestingIdentifiers);
if (!importedModules) {

@@ -645,3 +645,4 @@ return;

const commonHttpAddedImports = addedImports.get(COMMON_HTTP);
if (importedModules.client) {
commonHttpAddedImports == null ? void 0 : commonHttpAddedImports.add(PROVIDE_HTTP_CLIENT);
if (importedModules.client || importedModules.clientTesting) {
commonHttpAddedImports == null ? void 0 : commonHttpAddedImports.add(WITH_INTERCEPTORS_FROM_DI);

@@ -664,15 +665,24 @@ addedProviders.add(createCallExpression(WITH_INTERCEPTORS_FROM_DI));

const newImports = import_typescript7.default.factory.createArrayLiteralExpression([
...moduleImports.elements.filter((item) => item !== importedModules.client && item !== importedModules.clientJsonp && item !== importedModules.xsrf)
...moduleImports.elements.filter((item) => item !== importedModules.client && item !== importedModules.clientJsonp && item !== importedModules.xsrf && item !== importedModules.clientTesting)
]);
commonHttpAddedImports == null ? void 0 : commonHttpAddedImports.add(PROVIDE_HTTP_CLIENT);
const providers = getProvidersFromLiteralExpr(metadata);
let provideHttpClientTestingExpr;
if (importedModules.clientTesting) {
const commonHttpTestingAddedImports = addedImports.get(COMMON_HTTP_TESTING);
commonHttpTestingAddedImports == null ? void 0 : commonHttpTestingAddedImports.add(PROVIDE_HTTP_CLIENT_TESTING);
provideHttpClientTestingExpr = createCallExpression(PROVIDE_HTTP_CLIENT_TESTING);
}
const provideHttpExpr = createCallExpression(PROVIDE_HTTP_CLIENT, [...addedProviders]);
const providersToAppend = provideHttpClientTestingExpr ? [provideHttpExpr, provideHttpClientTestingExpr] : [provideHttpExpr];
let newProviders;
if (!providers) {
newProviders = import_typescript7.default.factory.createArrayLiteralExpression([provideHttpExpr]);
newProviders = import_typescript7.default.factory.createArrayLiteralExpression(providersToAppend);
} else {
newProviders = import_typescript7.default.factory.updateArrayLiteralExpression(providers, import_typescript7.default.factory.createNodeArray([...providers.elements, provideHttpExpr], providers.elements.hasTrailingComma));
newProviders = import_typescript7.default.factory.updateArrayLiteralExpression(providers, import_typescript7.default.factory.createNodeArray([...providers.elements, ...providersToAppend], providers.elements.hasTrailingComma));
}
const newDecoratorArgs = import_typescript7.default.factory.createObjectLiteralExpression([
...metadata.properties.filter((p) => p.getText() === "imports"),
...metadata.properties.filter((property) => {
var _a2, _b;
return ((_a2 = property.name) == null ? void 0 : _a2.getText()) !== "imports" && ((_b = property.name) == null ? void 0 : _b.getText()) !== "providers";
}),
import_typescript7.default.factory.createPropertyAssignment("imports", newImports),

@@ -771,6 +781,7 @@ import_typescript7.default.factory.createPropertyAssignment("providers", newProviders)

}
function getImportedHttpModules(imports, commonHttpIdentifiers) {
function getImportedHttpModules(imports, commonHttpIdentifiers, commonHttpTestingIdentifiers) {
let client = null;
let clientJsonp = null;
let xsrf = null;
let clientTesting = null;
let xsrfOptions = null;

@@ -780,3 +791,3 @@ for (const item of imports.elements) {

const moduleName = item.getText();
if (!commonHttpIdentifiers.has(moduleName)) {
if (!commonHttpIdentifiers.has(moduleName) && !commonHttpTestingIdentifiers.has(moduleName)) {
continue;

@@ -790,2 +801,4 @@ }

xsrf = item;
} else if (moduleName === HTTP_CLIENT_TESTING_MODULE) {
clientTesting = item;
}

@@ -807,4 +820,4 @@ } else if (import_typescript7.default.isCallExpression(item) && import_typescript7.default.isPropertyAccessExpression(item.expression)) {

}
if (client !== null || clientJsonp !== null || xsrf !== null) {
return { client, clientJsonp, xsrf, xsrfOptions };
if (client !== null || clientJsonp !== null || xsrf !== null || clientTesting !== null) {
return { client, clientJsonp, xsrf, xsrfOptions, clientTesting };
}

@@ -818,2 +831,6 @@ return null;

return import_typescript7.default.factory.updateObjectLiteralExpression(configureTestingModuleArgs, [
...configureTestingModuleArgs.properties.filter((property) => {
var _a, _b;
return ((_a = property.name) == null ? void 0 : _a.getText()) !== "imports" && ((_b = property.name) == null ? void 0 : _b.getText()) !== "providers";
}),
import_typescript7.default.factory.createPropertyAssignment("imports", newImports),

@@ -824,3 +841,3 @@ import_typescript7.default.factory.createPropertyAssignment("providers", newProviders)

// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
function http_providers_default() {

@@ -832,3 +849,3 @@ return (tree) => __async(this, null, function* () {

if (!allPaths.length) {
throw new import_schematics.SchematicsException("Could not find any tsconfig file. Cannot run the transfer state migration.");
throw new import_schematics.SchematicsException("Could not find any tsconfig file. Cannot run the http providers migration.");
}

@@ -835,0 +852,0 @@ for (const tsconfigPath of allPaths) {

/**
* @license Angular v18.0.0-rc.1
* @license Angular v18.0.0-rc.2
* (c) 2010-2024 Google LLC. https://angular.io/

@@ -4,0 +4,0 @@ * License: MIT

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc