UNPKG

31.8 kBTypeScriptView Raw
1/**
2 * @license Angular v13.0.3
3 * (c) 2010-2021 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7import { ComponentRef } from '@angular/core';
8import { DebugElement } from '@angular/core';
9import { DebugNode } from '@angular/core';
10import { GetTestability } from '@angular/core';
11import * as i0 from '@angular/core';
12import * as i1 from '@angular/common';
13import { InjectionToken } from '@angular/core';
14import { ModuleWithProviders } from '@angular/core';
15import { NgZone } from '@angular/core';
16import { OnDestroy } from '@angular/core';
17import { PlatformRef } from '@angular/core';
18import { Predicate } from '@angular/core';
19import { Renderer2 } from '@angular/core';
20import { RendererFactory2 } from '@angular/core';
21import { RendererType2 } from '@angular/core';
22import { Sanitizer } from '@angular/core';
23import { SecurityContext } from '@angular/core';
24import { StaticProvider } from '@angular/core';
25import { Testability } from '@angular/core';
26import { TestabilityRegistry } from '@angular/core';
27import { Type } from '@angular/core';
28import { Version } from '@angular/core';
29import { ɵConsole } from '@angular/core';
30import { ɵDomAdapter } from '@angular/common';
31import { ɵgetDOM } from '@angular/common';
32
33/**
34 * Exports required infrastructure for all Angular apps.
35 * Included by default in all Angular apps created with the CLI
36 * `new` command.
37 * Re-exports `CommonModule` and `ApplicationModule`, making their
38 * exports and providers available to all apps.
39 *
40 * @publicApi
41 */
42export declare class BrowserModule {
43 constructor(parentModule: BrowserModule | null);
44 /**
45 * Configures a browser-based app to transition from a server-rendered app, if
46 * one is present on the page.
47 *
48 * @param params An object containing an identifier for the app to transition.
49 * The ID must match between the client and server versions of the app.
50 * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
51 */
52 static withServerTransition(params: {
53 appId: string;
54 }): ModuleWithProviders<BrowserModule>;
55 static ɵfac: i0.ɵɵFactoryDeclaration<BrowserModule, [{ optional: true; skipSelf: true; }]>;
56 static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserModule, never, never, [typeof i1.CommonModule, typeof i0.ApplicationModule]>;
57 static ɵinj: i0.ɵɵInjectorDeclaration<BrowserModule>;
58}
59
60/**
61 * NgModule to install on the client side while using the `TransferState` to transfer state from
62 * server to client.
63 *
64 * @publicApi
65 */
66export declare class BrowserTransferStateModule {
67 static ɵfac: i0.ɵɵFactoryDeclaration<BrowserTransferStateModule, never>;
68 static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserTransferStateModule, never, never, never>;
69 static ɵinj: i0.ɵɵInjectorDeclaration<BrowserTransferStateModule>;
70}
71
72/**
73 * Predicates for use with {@link DebugElement}'s query functions.
74 *
75 * @publicApi
76 */
77export declare class By {
78 /**
79 * Match all nodes.
80 *
81 * @usageNotes
82 * ### Example
83 *
84 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
85 */
86 static all(): Predicate<DebugNode>;
87 /**
88 * Match elements by the given CSS selector.
89 *
90 * @usageNotes
91 * ### Example
92 *
93 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
94 */
95 static css(selector: string): Predicate<DebugElement>;
96 /**
97 * Match nodes that have the given directive present.
98 *
99 * @usageNotes
100 * ### Example
101 *
102 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
103 */
104 static directive(type: Type<any>): Predicate<DebugNode>;
105}
106
107/**
108 * Disables Angular tools.
109 *
110 * @publicApi
111 */
112export declare function disableDebugTools(): void;
113
114/**
115 * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
116 * values to be safe to use in the different DOM contexts.
117 *
118 * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
119 * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
120 * the website.
121 *
122 * In specific situations, it might be necessary to disable sanitization, for example if the
123 * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
124 * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
125 * methods, and then binding to that value from the template.
126 *
127 * These situations should be very rare, and extraordinary care must be taken to avoid creating a
128 * Cross Site Scripting (XSS) security bug!
129 *
130 * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
131 * close as possible to the source of the value, to make it easy to verify no security bug is
132 * created by its use.
133 *
134 * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
135 * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
136 * code. The sanitizer leaves safe values intact.
137 *
138 * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
139 * sanitization for the value passed in. Carefully check and audit all values and code paths going
140 * into this call. Make sure any user data is appropriately escaped for this security context.
141 * For more detail, see the [Security Guide](https://g.co/ng/security).
142 *
143 * @publicApi
144 */
145export declare abstract class DomSanitizer implements Sanitizer {
146 /**
147 * Sanitizes a value for use in the given SecurityContext.
148 *
149 * If value is trusted for the context, this method will unwrap the contained safe value and use
150 * it directly. Otherwise, value will be sanitized to be safe in the given context, for example
151 * by replacing URLs that have an unsafe protocol part (such as `javascript:`). The implementation
152 * is responsible to make sure that the value can definitely be safely used in the given context.
153 */
154 abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;
155 /**
156 * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML
157 * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will
158 * leave safe HTML intact, so in most situations this method should not be used.
159 *
160 * **WARNING:** calling this method with untrusted user data exposes your application to XSS
161 * security risks!
162 */
163 abstract bypassSecurityTrustHtml(value: string): SafeHtml;
164 /**
165 * Bypass security and trust the given value to be safe style value (CSS).
166 *
167 * **WARNING:** calling this method with untrusted user data exposes your application to XSS
168 * security risks!
169 */
170 abstract bypassSecurityTrustStyle(value: string): SafeStyle;
171 /**
172 * Bypass security and trust the given value to be safe JavaScript.
173 *
174 * **WARNING:** calling this method with untrusted user data exposes your application to XSS
175 * security risks!
176 */
177 abstract bypassSecurityTrustScript(value: string): SafeScript;
178 /**
179 * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used
180 * in hyperlinks or `<img src>`.
181 *
182 * **WARNING:** calling this method with untrusted user data exposes your application to XSS
183 * security risks!
184 */
185 abstract bypassSecurityTrustUrl(value: string): SafeUrl;
186 /**
187 * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may
188 * be used to load executable code from, like `<script src>`, or `<iframe src>`.
189 *
190 * **WARNING:** calling this method with untrusted user data exposes your application to XSS
191 * security risks!
192 */
193 abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
194 static ɵfac: i0.ɵɵFactoryDeclaration<DomSanitizer, never>;
195 static ɵprov: i0.ɵɵInjectableDeclaration<DomSanitizer>;
196}
197
198/**
199 * Enabled Angular debug tools that are accessible via your browser's
200 * developer console.
201 *
202 * Usage:
203 *
204 * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
205 * 1. Type `ng.` (usually the console will show auto-complete suggestion)
206 * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
207 * then hit Enter.
208 *
209 * @publicApi
210 */
211export declare function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
212
213/**
214 * The injection token for the event-manager plug-in service.
215 *
216 * @publicApi
217 */
218export declare const EVENT_MANAGER_PLUGINS: InjectionToken<EventManagerPlugin[]>;
219
220/**
221 * An injectable service that provides event management for Angular
222 * through a browser plug-in.
223 *
224 * @publicApi
225 */
226export declare class EventManager {
227 private _zone;
228 private _plugins;
229 private _eventNameToPlugin;
230 /**
231 * Initializes an instance of the event-manager service.
232 */
233 constructor(plugins: EventManagerPlugin[], _zone: NgZone);
234 /**
235 * Registers a handler for a specific element and event.
236 *
237 * @param element The HTML element to receive event notifications.
238 * @param eventName The name of the event to listen for.
239 * @param handler A function to call when the notification occurs. Receives the
240 * event object as an argument.
241 * @returns A callback function that can be used to remove the handler.
242 */
243 addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
244 /**
245 * Registers a global handler for an event in a target view.
246 *
247 * @param target A target for global event notifications. One of "window", "document", or "body".
248 * @param eventName The name of the event to listen for.
249 * @param handler A function to call when the notification occurs. Receives the
250 * event object as an argument.
251 * @returns A callback function that can be used to remove the handler.
252 * @deprecated No longer being used in Ivy code. To be removed in version 14.
253 */
254 addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
255 /**
256 * Retrieves the compilation zone in which event listeners are registered.
257 */
258 getZone(): NgZone;
259 static ɵfac: i0.ɵɵFactoryDeclaration<EventManager, never>;
260 static ɵprov: i0.ɵɵInjectableDeclaration<EventManager>;
261}
262
263declare abstract class EventManagerPlugin {
264 private _doc;
265 constructor(_doc: any);
266 manager: EventManager;
267 abstract supports(eventName: string): boolean;
268 abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
269 addGlobalEventListener(element: string, eventName: string, handler: Function): Function;
270}
271
272/**
273 * Provides DOM operations in any browser environment.
274 *
275 * @security Tread carefully! Interacting with the DOM directly is dangerous and
276 * can introduce XSS risks.
277 */
278declare abstract class GenericBrowserDomAdapter extends ɵDomAdapter {
279 readonly supportsDOMEvents: boolean;
280}
281
282/**
283 * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.
284 * @see `HammerGestureConfig`
285 *
286 * @ngModule HammerModule
287 * @publicApi
288 */
289export declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
290
291/**
292 * Injection token used to provide a {@link HammerLoader} to Angular.
293 *
294 * @publicApi
295 */
296export declare const HAMMER_LOADER: InjectionToken<HammerLoader>;
297
298/**
299 * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
300 * for gesture recognition. Configures specific event recognition.
301 * @publicApi
302 */
303export declare class HammerGestureConfig {
304 /**
305 * A set of supported event names for gestures to be used in Angular.
306 * Angular supports all built-in recognizers, as listed in
307 * [HammerJS documentation](https://hammerjs.github.io/).
308 */
309 events: string[];
310 /**
311 * Maps gesture event names to a set of configuration options
312 * that specify overrides to the default values for specific properties.
313 *
314 * The key is a supported event name to be configured,
315 * and the options object contains a set of properties, with override values
316 * to be applied to the named recognizer event.
317 * For example, to disable recognition of the rotate event, specify
318 * `{"rotate": {"enable": false}}`.
319 *
320 * Properties that are not present take the HammerJS default values.
321 * For information about which properties are supported for which events,
322 * and their allowed and default values, see
323 * [HammerJS documentation](https://hammerjs.github.io/).
324 *
325 */
326 overrides: {
327 [key: string]: Object;
328 };
329 /**
330 * Properties whose default values can be overridden for a given event.
331 * Different sets of properties apply to different events.
332 * For information about which properties are supported for which events,
333 * and their allowed and default values, see
334 * [HammerJS documentation](https://hammerjs.github.io/).
335 */
336 options?: {
337 cssProps?: any;
338 domEvents?: boolean;
339 enable?: boolean | ((manager: any) => boolean);
340 preset?: any[];
341 touchAction?: string;
342 recognizers?: any[];
343 inputClass?: any;
344 inputTarget?: EventTarget;
345 };
346 /**
347 * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
348 * and attaches it to a given HTML element.
349 * @param element The element that will recognize gestures.
350 * @returns A HammerJS event-manager object.
351 */
352 buildHammer(element: HTMLElement): HammerInstance;
353 static ɵfac: i0.ɵɵFactoryDeclaration<HammerGestureConfig, never>;
354 static ɵprov: i0.ɵɵInjectableDeclaration<HammerGestureConfig>;
355}
356
357declare interface HammerInstance {
358 on(eventName: string, callback?: Function): void;
359 off(eventName: string, callback?: Function): void;
360 destroy?(): void;
361}
362
363/**
364 * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.
365 *
366 * @publicApi
367 */
368export declare type HammerLoader = () => Promise<void>;
369
370/**
371 * Adds support for HammerJS.
372 *
373 * Import this module at the root of your application so that Angular can work with
374 * HammerJS to detect gesture events.
375 *
376 * Note that applications still need to include the HammerJS script itself. This module
377 * simply sets up the coordination layer between HammerJS and Angular's EventManager.
378 *
379 * @publicApi
380 */
381export declare class HammerModule {
382 static ɵfac: i0.ɵɵFactoryDeclaration<HammerModule, never>;
383 static ɵmod: i0.ɵɵNgModuleDeclaration<HammerModule, never, never, never>;
384 static ɵinj: i0.ɵɵInjectorDeclaration<HammerModule>;
385}
386
387/**
388 * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
389 *
390 * Example:
391 *
392 * ```
393 * const COUNTER_KEY = makeStateKey<number>('counter');
394 * let value = 10;
395 *
396 * transferState.set(COUNTER_KEY, value);
397 * ```
398 *
399 * @publicApi
400 */
401export declare function makeStateKey<T = void>(key: string): StateKey<T>;
402
403/**
404 * A service for managing HTML `<meta>` tags.
405 *
406 * Properties of the `MetaDefinition` object match the attributes of the
407 * HTML `<meta>` tag. These tags define document metadata that is important for
408 * things like configuring a Content Security Policy, defining browser compatibility
409 * and security settings, setting HTTP Headers, defining rich content for social sharing,
410 * and Search Engine Optimization (SEO).
411 *
412 * To identify specific `<meta>` tags in a document, use an attribute selection
413 * string in the format `"tag_attribute='value string'"`.
414 * For example, an `attrSelector` value of `"name='description'"` matches a tag
415 * whose `name` attribute has the value `"description"`.
416 * Selectors are used with the `querySelector()` Document method,
417 * in the format `meta[{attrSelector}]`.
418 *
419 * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
420 * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
421 *
422 *
423 * @publicApi
424 */
425export declare class Meta {
426 private _doc;
427 private _dom;
428 constructor(_doc: any);
429 /**
430 * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
431 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
432 * values in the provided tag definition, and verifies that all other attribute values are equal.
433 * If an existing element is found, it is returned and is not modified in any way.
434 * @param tag The definition of a `<meta>` element to match or create.
435 * @param forceCreation True to create a new element without checking whether one already exists.
436 * @returns The existing element with the same attributes and values if found,
437 * the new element if no match is found, or `null` if the tag parameter is not defined.
438 */
439 addTag(tag: MetaDefinition, forceCreation?: boolean): HTMLMetaElement | null;
440 /**
441 * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
442 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
443 * values in the provided tag definition, and verifies that all other attribute values are equal.
444 * @param tags An array of tag definitions to match or create.
445 * @param forceCreation True to create new elements without checking whether they already exist.
446 * @returns The matching elements if found, or the new elements.
447 */
448 addTags(tags: MetaDefinition[], forceCreation?: boolean): HTMLMetaElement[];
449 /**
450 * Retrieves a `<meta>` tag element in the current HTML document.
451 * @param attrSelector The tag attribute and value to match against, in the format
452 * `"tag_attribute='value string'"`.
453 * @returns The matching element, if any.
454 */
455 getTag(attrSelector: string): HTMLMetaElement | null;
456 /**
457 * Retrieves a set of `<meta>` tag elements in the current HTML document.
458 * @param attrSelector The tag attribute and value to match against, in the format
459 * `"tag_attribute='value string'"`.
460 * @returns The matching elements, if any.
461 */
462 getTags(attrSelector: string): HTMLMetaElement[];
463 /**
464 * Modifies an existing `<meta>` tag element in the current HTML document.
465 * @param tag The tag description with which to replace the existing tag content.
466 * @param selector A tag attribute and value to match against, to identify
467 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
468 * If not supplied, matches a tag with the same `name` or `property` attribute value as the
469 * replacement tag.
470 * @return The modified element.
471 */
472 updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null;
473 /**
474 * Removes an existing `<meta>` tag element from the current HTML document.
475 * @param attrSelector A tag attribute and value to match against, to identify
476 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
477 */
478 removeTag(attrSelector: string): void;
479 /**
480 * Removes an existing `<meta>` tag element from the current HTML document.
481 * @param meta The tag definition to match against to identify an existing tag.
482 */
483 removeTagElement(meta: HTMLMetaElement): void;
484 private _getOrCreateElement;
485 private _setMetaElementAttributes;
486 private _parseSelector;
487 private _containsAttributes;
488 private _getMetaKeyMap;
489 static ɵfac: i0.ɵɵFactoryDeclaration<Meta, never>;
490 static ɵprov: i0.ɵɵInjectableDeclaration<Meta>;
491}
492
493/**
494 * Represents the attributes of an HTML `<meta>` element. The element itself is
495 * represented by the internal `HTMLMetaElement`.
496 *
497 * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
498 * @see `Meta`
499 *
500 * @publicApi
501 */
502export declare type MetaDefinition = {
503 charset?: string;
504 content?: string;
505 httpEquiv?: string;
506 id?: string;
507 itemprop?: string;
508 name?: string;
509 property?: string;
510 scheme?: string;
511 url?: string;
512} & {
513 [prop: string]: string;
514};
515
516/**
517 * A factory function that returns a `PlatformRef` instance associated with browser service
518 * providers.
519 *
520 * @publicApi
521 */
522export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
523
524/**
525 * Marker interface for a value that's safe to use as HTML.
526 *
527 * @publicApi
528 */
529export declare interface SafeHtml extends SafeValue {
530}
531
532/**
533 * Marker interface for a value that's safe to use as a URL to load executable code from.
534 *
535 * @publicApi
536 */
537export declare interface SafeResourceUrl extends SafeValue {
538}
539
540/**
541 * Marker interface for a value that's safe to use as JavaScript.
542 *
543 * @publicApi
544 */
545export declare interface SafeScript extends SafeValue {
546}
547
548/**
549 * Marker interface for a value that's safe to use as style (CSS).
550 *
551 * @publicApi
552 */
553export declare interface SafeStyle extends SafeValue {
554}
555
556/**
557 * Marker interface for a value that's safe to use as a URL linking to a document.
558 *
559 * @publicApi
560 */
561export declare interface SafeUrl extends SafeValue {
562}
563
564/**
565 * Marker interface for a value that's safe to use in a particular context.
566 *
567 * @publicApi
568 */
569export declare interface SafeValue {
570}
571
572/**
573 * A type-safe key to use with `TransferState`.
574 *
575 * Example:
576 *
577 * ```
578 * const COUNTER_KEY = makeStateKey<number>('counter');
579 * let value = 10;
580 *
581 * transferState.set(COUNTER_KEY, value);
582 * ```
583 *
584 * @publicApi
585 */
586export declare type StateKey<T> = string & {
587 __not_a_string: never;
588};
589
590/**
591 * A service that can be used to get and set the title of a current HTML document.
592 *
593 * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
594 * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
595 * (representing the `<title>` tag). Instead, this service can be used to set and get the current
596 * title value.
597 *
598 * @publicApi
599 */
600export declare class Title {
601 private _doc;
602 constructor(_doc: any);
603 /**
604 * Get the title of the current HTML document.
605 */
606 getTitle(): string;
607 /**
608 * Set the title of the current HTML document.
609 * @param newTitle
610 */
611 setTitle(newTitle: string): void;
612 static ɵfac: i0.ɵɵFactoryDeclaration<Title, never>;
613 static ɵprov: i0.ɵɵInjectableDeclaration<Title>;
614}
615
616/**
617 * A key value store that is transferred from the application on the server side to the application
618 * on the client side.
619 *
620 * `TransferState` will be available as an injectable token. To use it import
621 * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
622 *
623 * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
624 * boolean, number, string, null and non-class objects will be serialized and deserialized in a
625 * non-lossy manner.
626 *
627 * @publicApi
628 */
629export declare class TransferState {
630 private store;
631 private onSerializeCallbacks;
632 /**
633 * Get the value corresponding to a key. Return `defaultValue` if key is not found.
634 */
635 get<T>(key: StateKey<T>, defaultValue: T): T;
636 /**
637 * Set the value corresponding to a key.
638 */
639 set<T>(key: StateKey<T>, value: T): void;
640 /**
641 * Remove a key from the store.
642 */
643 remove<T>(key: StateKey<T>): void;
644 /**
645 * Test whether a key exists in the store.
646 */
647 hasKey<T>(key: StateKey<T>): boolean;
648 /**
649 * Register a callback to provide the value for a key when `toJson` is called.
650 */
651 onSerialize<T>(key: StateKey<T>, callback: () => T): void;
652 /**
653 * Serialize the current state of the store to JSON.
654 */
655 toJson(): string;
656 static ɵfac: i0.ɵɵFactoryDeclaration<TransferState, never>;
657 static ɵprov: i0.ɵɵInjectableDeclaration<TransferState>;
658}
659
660/**
661 * @publicApi
662 */
663export declare const VERSION: Version;
664
665/**
666 * A `DomAdapter` powered by full browser DOM APIs.
667 *
668 * @security Tread carefully! Interacting with the DOM directly is dangerous and
669 * can introduce XSS risks.
670 */
671export declare class ɵBrowserDomAdapter extends GenericBrowserDomAdapter {
672 static makeCurrent(): void;
673 onAndCancel(el: Node, evt: any, listener: any): Function;
674 dispatchEvent(el: Node, evt: any): void;
675 remove(node: Node): void;
676 createElement(tagName: string, doc?: Document): HTMLElement;
677 createHtmlDocument(): HTMLDocument;
678 getDefaultDocument(): Document;
679 isElementNode(node: Node): boolean;
680 isShadowRoot(node: any): boolean;
681 /** @deprecated No longer being used in Ivy code. To be removed in version 14. */
682 getGlobalEventTarget(doc: Document, target: string): EventTarget | null;
683 getBaseHref(doc: Document): string | null;
684 resetBaseElement(): void;
685 getUserAgent(): string;
686 getCookie(name: string): string | null;
687}
688
689export declare class ɵBrowserGetTestability implements GetTestability {
690 static init(): void;
691 addToWindow(registry: TestabilityRegistry): void;
692 findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
693}
694
695export declare class ɵDomEventsPlugin extends EventManagerPlugin {
696 constructor(doc: any);
697 supports(eventName: string): boolean;
698 addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
699 removeEventListener(target: any, eventName: string, callback: Function): void;
700 static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomEventsPlugin, never>;
701 static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomEventsPlugin>;
702}
703
704export declare class ɵDomRendererFactory2 implements RendererFactory2 {
705 private eventManager;
706 private sharedStylesHost;
707 private appId;
708 private rendererByCompId;
709 private defaultRenderer;
710 constructor(eventManager: EventManager, sharedStylesHost: ɵDomSharedStylesHost, appId: string);
711 createRenderer(element: any, type: RendererType2 | null): Renderer2;
712 begin(): void;
713 end(): void;
714 static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomRendererFactory2, never>;
715 static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomRendererFactory2>;
716}
717
718export declare class ɵDomSanitizerImpl extends DomSanitizer {
719 private _doc;
720 constructor(_doc: any);
721 sanitize(ctx: SecurityContext, value: SafeValue | string | null): string | null;
722 bypassSecurityTrustHtml(value: string): SafeHtml;
723 bypassSecurityTrustStyle(value: string): SafeStyle;
724 bypassSecurityTrustScript(value: string): SafeScript;
725 bypassSecurityTrustUrl(value: string): SafeUrl;
726 bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
727 static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSanitizerImpl, never>;
728 static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomSanitizerImpl>;
729}
730
731export declare class ɵDomSharedStylesHost extends ɵSharedStylesHost implements OnDestroy {
732 private _doc;
733 private _hostNodes;
734 constructor(_doc: any);
735 private _addStylesToHost;
736 addHost(hostNode: Node): void;
737 removeHost(hostNode: Node): void;
738 onStylesAdded(additions: Set<string>): void;
739 ngOnDestroy(): void;
740 static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSharedStylesHost, never>;
741 static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomSharedStylesHost>;
742}
743
744export declare function ɵescapeHtml(text: string): string;
745
746export declare function ɵflattenStyles(compId: string, styles: Array<any | any[]>, target: string[]): string[];
747
748export { ɵgetDOM }
749
750/**
751 * Event plugin that adds Hammer support to an application.
752 *
753 * @ngModule HammerModule
754 */
755export declare class ɵHammerGesturesPlugin extends EventManagerPlugin {
756 private _config;
757 private console;
758 private loader?;
759 private _loaderPromise;
760 constructor(doc: any, _config: HammerGestureConfig, console: ɵConsole, loader?: HammerLoader | null | undefined);
761 supports(eventName: string): boolean;
762 addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
763 isCustomEvent(eventName: string): boolean;
764 static ɵfac: i0.ɵɵFactoryDeclaration<ɵHammerGesturesPlugin, [null, null, null, { optional: true; }]>;
765 static ɵprov: i0.ɵɵInjectableDeclaration<ɵHammerGesturesPlugin>;
766}
767
768export declare function ɵinitDomAdapter(): void;
769
770export declare const ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[];
771
772/**
773 * @publicApi
774 * A browser plug-in that provides support for handling of key events in Angular.
775 */
776export declare class ɵKeyEventsPlugin extends EventManagerPlugin {
777 /**
778 * Initializes an instance of the browser plug-in.
779 * @param doc The document in which key events will be detected.
780 */
781 constructor(doc: any);
782 /**
783 * Reports whether a named key event is supported.
784 * @param eventName The event name to query.
785 * @return True if the named key event is supported.
786 */
787 supports(eventName: string): boolean;
788 /**
789 * Registers a handler for a specific element and key event.
790 * @param element The HTML element to receive event notifications.
791 * @param eventName The name of the key event to listen for.
792 * @param handler A function to call when the notification occurs. Receives the
793 * event object as an argument.
794 * @returns The key event that was registered.
795 */
796 addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
797 static parseEventName(eventName: string): {
798 fullKey: string;
799 domEventName: string;
800 } | null;
801 static getEventFullKey(event: KeyboardEvent): string;
802 /**
803 * Configures a handler callback for a key event.
804 * @param fullKey The event name that combines all simultaneous keystrokes.
805 * @param handler The function that responds to the key event.
806 * @param zone The zone in which the event occurred.
807 * @returns A callback function.
808 */
809 static eventCallback(fullKey: any, handler: Function, zone: NgZone): Function;
810 static ɵfac: i0.ɵɵFactoryDeclaration<ɵKeyEventsPlugin, never>;
811 static ɵprov: i0.ɵɵInjectableDeclaration<ɵKeyEventsPlugin>;
812}
813
814export declare const ɵNAMESPACE_URIS: {
815 [ns: string]: string;
816};
817
818export declare class ɵSharedStylesHost {
819 addStyles(styles: string[]): void;
820 onStylesAdded(additions: Set<string>): void;
821 getAllStyles(): string[];
822 static ɵfac: i0.ɵɵFactoryDeclaration<ɵSharedStylesHost, never>;
823 static ɵprov: i0.ɵɵInjectableDeclaration<ɵSharedStylesHost>;
824}
825
826export declare function ɵshimContentAttribute(componentShortId: string): string;
827
828export declare function ɵshimHostAttribute(componentShortId: string): string;
829
830/**
831 * An id that identifies a particular application being bootstrapped, that should
832 * match across the client/server boundary.
833 */
834export declare const ɵTRANSITION_ID: InjectionToken<unknown>;
835
836export { }
837
\No newline at end of file