index.d.ts 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * @license Angular v19.2.13
  3. * (c) 2010-2025 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. import { EarlyJsactionDataContainer, EventInfo, Restriction } from '../../event_dispatcher.d-K56StcHr.js';
  7. export { EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, registerDispatcher } from '../../event_dispatcher.d-K56StcHr.js';
  8. declare const Attribute: {
  9. /**
  10. * The jsaction attribute defines a mapping of a DOM event to a
  11. * generic event (aka jsaction), to which the actual event handlers
  12. * that implement the behavior of the application are bound. The
  13. * value is a semicolon separated list of colon separated pairs of
  14. * an optional DOM event name and a jsaction name. If the optional
  15. * DOM event name is omitted, 'click' is assumed. The jsaction names
  16. * are dot separated pairs of a namespace and a simple jsaction
  17. * name.
  18. *
  19. * See grammar in README.md for expected syntax in the attribute value.
  20. */
  21. JSACTION: "jsaction";
  22. };
  23. /**
  24. * Reads the jsaction parser cache for the given DOM element. If no cache is yet present,
  25. * creates an empty one.
  26. */
  27. declare function getDefaulted(element: Element): {
  28. [key: string]: string | undefined;
  29. };
  30. /**
  31. * Whether or not an event type should be registered in the capture phase.
  32. * @param eventType
  33. * @returns bool
  34. */
  35. declare const isCaptureEventType: (eventType: string) => boolean;
  36. /**
  37. * Whether or not an event type is registered in the early contract.
  38. */
  39. declare const isEarlyEventType: (eventType: string) => boolean;
  40. /**
  41. * Creates an `EarlyJsactionData`, adds events to it, and populates it on a nested object on
  42. * the window.
  43. */
  44. declare function bootstrapAppScopedEarlyEventContract(container: HTMLElement, appId: string, bubbleEventTypes: string[], captureEventTypes: string[], dataContainer?: EarlyJsactionDataContainer): void;
  45. /** Get the queued `EventInfo` objects that were dispatched before a dispatcher was registered. */
  46. declare function getAppScopedQueuedEventInfos(appId: string, dataContainer?: EarlyJsactionDataContainer): EventInfo[];
  47. /**
  48. * Registers a dispatcher function on the `EarlyJsactionData` present on the nested object on the
  49. * window.
  50. */
  51. declare function registerAppScopedDispatcher(restriction: Restriction, appId: string, dispatcher: (eventInfo: EventInfo) => void, dataContainer?: EarlyJsactionDataContainer): void;
  52. /** Removes all event listener handlers. */
  53. declare function removeAllAppScopedEventListeners(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
  54. /** Clear the early event contract. */
  55. declare function clearAppScopedEarlyEventContract(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
  56. export { Attribute, EarlyJsactionDataContainer, bootstrapAppScopedEarlyEventContract, clearAppScopedEarlyEventContract, getDefaulted as getActionCache, getAppScopedQueuedEventInfos, isCaptureEventType, isEarlyEventType, registerAppScopedDispatcher, removeAllAppScopedEventListeners };