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